This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SkPath star() { | |
| SkPath starPath; | |
| float cx = 100, cy = 100; | |
| float outerRadius = 80; | |
| float innerRadius = 35; | |
| int numPoints = 5; | |
| for (int i = 0; i <= numPoints * 2; ++i) { | |
| float angle = i * SK_ScalarPI / numPoints - SK_ScalarPI / 2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import lldb | |
| """ | |
| in lldb shell: command script import ~/Desktop/safari-debug/scripts/mylldb.py | |
| """ | |
| def __lldb_init_module(debugger, internal_dict): | |
| # debugger.HandleCommand('b CC_SHA1_Update') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const libname = "libSystem.B.dylib"; | |
| function CC_SHA1_Update(){ | |
| //CC_SHA1_Update(CC_SHA1_CTX *c, const void *data, CC_LONG len); | |
| Interceptor.attach(Module.findExportByName(libname, "CC_SHA1_Update"), | |
| { | |
| onEnter: function(args) { | |
| var ccsha1update = { | |
| 'operation': 'CC_SHA1_Update', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gclient sync && \ | |
| rm -rf ./out && \ | |
| gn gen out/arm64 --args='target_os="ios" ios_enable_code_signing=false use_xcode_clang=true is_component_build=false rtc_include_tests=false is_debug=false target_cpu="arm64" rtc_libvpx_build_vp9=false enable_ios_bitcode=false use_goma=false rtc_enable_symbol_export=true enable_dsyms=true enable_stripping=true' && \ | |
| ninja -C out/arm64 sdk:framework_objc && \ | |
| rm -rf ~/Desktop/client-sdk-swift/Frameworks/WebRTC.xcframework && \ | |
| xcodebuild \ | |
| -create-xcframework \ | |
| -framework ./out/arm64/WebRTC.framework \ | |
| -output ~/Desktop/client-sdk-swift/Frameworks/WebRTC.xcframework |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @register_mil_to_nn_mapping(override=True) | |
| def grid_sample(const_context, builder, op): | |
| image_name = make_input(const_context, builder, op.input) | |
| grid_name = make_input(const_context, builder, op.grid) | |
| out_name = op.outputs[0].name | |
| suffix = "_prepared" | |
| input_names1 = [grid_name] | |
| out_names1 = [out_name + suffix] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @register_torch_op(torch_alias=["grid_sampler"], override=True) | |
| def torch_grid_sample(context, node): | |
| inputs = mil_get_inputs(context, node, expected=5) | |
| res = mb.grid_sample( | |
| input=inputs[0], | |
| grid=inputs[1], | |
| mode=inputs[2], | |
| padding_mode=inputs[3], | |
| align_corners=inputs[4], | |
| name=node.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @register_torch_op(torch_alias=["grid_sampler"], override=True) | |
| def torch_grid_sample(context, node): | |
| inputs = mil_get_inputs(context, node, expected=5) | |
| res = mb.grid_sample( | |
| input=inputs[0], | |
| grid=inputs[1], | |
| mode=inputs[2], | |
| padding_mode=inputs[3], | |
| align_corners=inputs[4], | |
| name=node.name |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| IN_WH = 512 | |
| GRID_WH = 256 | |
| class TestModel(nn.Module): | |
| def forward(self, x, grid): | |
| grid_resized = self.resize_grid(grid) | |
| return F.grid_sample( | |
| x, grid_resized | |
| ) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| sudo defaults write /Library/Preferences/com.apple.security.libraryvalidation.plist DisableLibraryValidation -bool true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Config.Schema.API.methods[Config.Schema.API.methods.findIndex(x=>x.method=="messages.readHistory")].params = [{name: "emperor", type: "InputPeer"}, {name: "nmaid", type: "int"}] |
NewerOlder