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
| .......... | |
| $static_framework = ['<SOME_POD_NAME>'] | |
| pre_install do |installer| | |
| Pod::Installer::Xcode::TargetValidator.send(:define_method, :verify_no_static_framework_transitive_dependencies) {} | |
| installer.pod_targets.each do |pod| | |
| if $static_framework.include?(pod.name) | |
| def pod.build_type; | |
| Pod::Target::BuildType.static_library |
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
| git config --global credential.helper store && git fetch --all && cat ~/.git-credentials |
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 lsof -i -P -n | grep LISTEN |
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
| var sampleBytes = new Int8Array(4096*1000*100); | |
| var saveByteArray = (function () { | |
| var a = document.createElement("a"); | |
| document.body.appendChild(a); | |
| a.style = "display: none"; | |
| return function (data, name) { | |
| var blob = new Blob(data, {type: "octet/stream"}), | |
| url = window.URL.createObjectURL(blob); | |
| console.log("Blob URL: ", url); |
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
| ;// store 3822 | |
| mov x8, #3822 | |
| ;// next: (4969 << 16) | 3822 | |
| movk x8, #4969, lsl #16 ;// now `x8` is 325652206 | |
| ;// next: (2 << 32) | ((4969 << 16) | 3822) | |
| movk x8, #2, lsl #32 ;// now `x8` is 8915586798 | |
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 numpy as np | |
| import matplotlib.pyplot as plt | |
| def func1(x): | |
| return np.sin(x) | |
| def func1der(x): | |
| return np.cos(x) |
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 tfcoreml as tf_converter | |
| tf_converter.convert(tf_model_path='my_model.pb', | |
| mlmodel_path='my_model.mlmodel', | |
| input_name_shape_dict=input_tensor_shapes, | |
| output_feature_names=output_tensor_names) |
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 coremltools | |
| your_model = coremltools.converters.keras.convert('your_model.h5', | |
| input_names=['image'], | |
| output_names=['output'], | |
| image_input_names='image') | |
| your_model.save('your_model_name.mlmodel') |
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
| #!/usr/bin/python | |
| # -*- coding: utf-8 -*- | |
| import json | |
| import re | |
| import time | |
| from functools import reduce | |
| import pyperclip | |
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
| gcloud ai-platform jobs submit training ${job_name} --job-dir ${job_dir} \ | |
| --python-version 3.5 \ | |
| --runtime-version 1.9 \ | |
| --package-path ./trainer `# trainer module ` \ | |
| --module-name trainer.train `# file train.py from trainer module` \ | |
| --region ${region} \ | |
| --scale-tier BASIC_GPU `# single NVIDIA Tesla K80 GPU` \ | |
| -- `# Next, the params for train.py` \ | |
| --weights_stage "${job_dir}/weights_stage_exported_tiny.h5" `# exported stage pre-trained model ` \ | |
| --weights_final "${job_dir}/weights_final_exported_tiny.h5"" `# exported final pre-trained model ` \ |