This file contains 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
# Based on: https://alvinalexander.com/unix/edu/examples/find.shtml | |
# basic 'find file' commands | |
# -------------------------- | |
find / -name foo.txt -type f -print # find regular files under / with name foo.txt | |
find / -name foo.txt -type f # -print is the default action, and may be omitted | |
find . -name foo.txt # search under the current dir, and all types | |
find . -name "foo*" -type d # wildcard name-matching, and only directories | |
find /opt /usr /var -name foo.scala -type f # search multiple dirs | |
find . -iname foo # case-insensitive: foo, Foo, FOo, FOO, etc. |
This file contains 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 sys | |
import traceback | |
import onnx | |
if len(sys.argv) != 2: | |
print(f"Usage: {sys.argv[0]} /path/to/model.onnx") | |
sys.exit(1) | |
model_path = sys.argv[1] |
This file contains 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 os.path | |
import gzip | |
import pickle | |
from zipfile import ZipFile | |
# from https://github.com/onnx/models/blob/8d50e3f/vision/classification/imagenet_val_maps.pklz | |
with gzip.open('imagenet_val_maps.pklz', 'rb') as f: | |
dirs, mappings = pickle.load(f) | |
src_dir = "ILSVRC/Data/CLS-LOC/val" | |
target_dir = "ILSVRC/val" |
This file contains 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
unmap j | |
unmap k | |
unmap h | |
map j scrollLeft | |
map k scrollDown | |
map h scrollUp | |
unmap J | |
unmap H | |
map J goBack |
This file contains 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
P: Parts | |
C: Confusable | |
Ex: Example | |
Mn: Mnemonic | |
adv. -- adverb | |
n. -- noun | |
i-adj. -- I-adjective | |
na-adj. -- NA-adjective | |
prop. n. -- proper noun |
This file contains 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
#!/bin/env python3 | |
import libtorrent as lt | |
with open("/path/to/file.torrent", "rb") as f: | |
e = lt.bdecode(f.read()) | |
info = lt.torrent_info(e) | |
print(info.num_pieces(), 'pieces') | |
files = info.files() | |
def humanize(size_bytes): |
This file contains 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
# Maintainer: John C F <john.ch.fr [at] gmail [dot] com> | |
pkgname=woff2-bin | |
pkgver=1.0.2 | |
_debver=1.0.2-1 | |
pkgrel=1 | |
pkgdesc="Utilities for converting TTF fonts to the compressed WOFF 2.0 format, and vice versa." | |
url="https://github.com/google/woff2" | |
arch=(x86_64) | |
license=(MIT) |
This file contains 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
!include nsDialogs.nsh | |
!include LogicLib.nsh | |
!include MUI2.nsh | |
Name nsDialogs | |
OutFile nsDialogs.exe | |
RequestExecutionLevel user | |
ShowInstDetails show | |
Var Dialog |
This file contains 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
{ | |
"settingsVersion": "1.62", | |
"exclusionRules": [ | |
{ | |
"pattern": "https?://mail.google.com/*", | |
"passKeys": "" | |
} | |
], | |
"filterLinkHints": false, | |
"waitForEnterForFilteredHints": true, |
This file contains 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
set path=%path%;C:\Program Files\7-Zip | |
7z x jdk8.exe -ojdk8 | |
cd jdk8 | |
7z x tools.zip | |
for /r %%w in (*.pack) do bin\unpack200 "%%w" "%%~dpnw.jar" | |
for /r %%w in (*.pack) do del "%%w" | |
del tools.zip javafx-src.zip | |
rmdir /S /Q db lib\missioncontrol lib\visualvm |
NewerOlder