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
//Actually it is built-in for Mac as well, no need of 3 pages of Js, | |
//In the contentview: | |
@State private var searchText = "" | |
//inside its navigationsplitview/stack the automatic field | |
.searchable(text: $searchText) | |
//In the view: |
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
DEFAULT PERSIST_OFF | |
sudo log config --subsystem com.apple.bluetooth --mode level:default,persist:off | |
sudo log config --subsystem com.apple.powerd --mode level:default,persist:off | |
sudo log config --subsystem com.apple.SkyLight --mode level:default,persist:off | |
sudo log config --subsystem com.apple.runningboard --mode level:default,persist:off | |
sudo log config --subsystem com.apple.amp.mediaremote --mode level:default,persist:off |
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 onnx | |
model = onnx.load("path_to_your_model/model.onnx") | |
print("Inputs: ", [input.name for input in model.graph.input]) | |
print("Outputs: ", [output.name for output in model.graph.output]) |
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
system_profiler SPDisplaysDataType |
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
IS_HIGH_VERSION = [int(m) for m in list(re.findall(r"^([0-9]+)\.([0-9]+)\.([0-9]+)([^0-9][a-zA-Z0-9]*)?(\+git.*)?$",\ | |
torch.__version__)[0][:3])] >= [1, 12, 0] | |
def gpu_is_available(): | |
if IS_HIGH_VERSION: | |
if torch.backends.mps.is_available(): | |
return True | |
return True if torch.cuda.is_available() and torch.backends.cudnn.is_available() else False | |
def get_device(gpu_id=None): |