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
pip install pip-tools pyinstaller | |
pip-compile requirements.in | |
pip install -r requirements.txt | |
pyinstaller test.py --onefile |
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/bash | |
set -eu | |
files=$(find ./ -name "*[0-9]_d.png" -type f) | |
for f in ${files[@]}; do | |
echo ${f} | |
num=$(echo ${f} | sed -e 's/.*marbling_\([0-9]\+\)_d.png$/\1/g') | |
num_zero=$(printf "%010d" "$num") | |
newpath=$(echo ${f} | sed -e 's/\([0-9]\+\)_d.png$/'${num_zero}'_1t.png/g') |
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/bash | |
# to install 7-zip | |
# https://www.7-zip.org/ | |
# | |
# open directory by cygwin or git-bash | |
# and run 'sh compress_child_dir.sh' | |
set -eu |
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
{ | |
"vim.handleKeys": { | |
"<C-a>": false, | |
"<C-f>": false | |
}, | |
} |
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
<?php | |
/** | |
* Combine mutiple strings to path | |
* @param string $arg1 first path string | |
* @param string $args path string array | |
* @return string connected path | |
*/ | |
function combinePath(string $arg1, string ...$args): string { | |
$path = $arg1; |
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 os | |
import numpy as np | |
import cv2 | |
from datetime import datetime | |
def judge_iter(s): | |
return hasattr(s, '__iter__') and not('str' in str(type(s))) | |
def get_image_list(path): |
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 | |
import sys | |
import cv2 | |
def enumerate_image(dirpath, imageext=[".tif", ".tiff", ".jpeg", ".jpg", ".png", ".bmp"]): | |
for f in os.listdir(dirpath): | |
fullpath = os.path.join(dirpath, f) | |
if os.path.isdir(fullpath): | |
for f in enumerate_image(fullpath): | |
yield f |
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 | |
import sys | |
import random | |
import math | |
import shutil | |
SEED = 124512341 | |
random.seed(SEED) | |
if __name__ == '__main__': |
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
#/usr/bin/python | |
# -*- coding:utf-8 -*- | |
import pydoc | |
import string | |
class checkModule: | |
def __init__(self): | |
self.modules = [] | |
pydoc.ModuleScanner().run(self.__callback, onerror=self.__onerror) |
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
$ node -v | |
v6.11.2 | |
$ npm -v | |
3.10.10 | |
$ tsc -v | |
Version 2.4.1 |
NewerOlder