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
""" | |
指定したフォルダ内の画像ファイルのファイル名・幅・高さ・チャネル数・データタイプをファイルに上書き保存 | |
USAGE | |
python checkImagesChannels --dir path/to/imgs | |
""" | |
import argparse | |
import glob |
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
""" | |
指定ディレクトリのすべての画像ファイルに対してタグ付けして結果をファイルに保存 | |
Usage: | |
python taggingImages.py --image_dir path/to/images | |
""" | |
import argparse | |
import glob |
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
#coding:utf-8 | |
""" | |
i2vを使用して、指定ディレクトリのすべての画像ファイルに対して画像種類のタグを付けて結果をファイルに保存 | |
タグの確からしさ(0~1)も保存 | |
Usage: | |
python taggingImages.py --image_dir path/to/images | |
""" | |
import argparse |
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
""" | |
↓を参考に、デフォルトパラメータ機能もつけた | |
参考:http://python-3-patterns-idioms-test.readthedocs.io/en/latest/Messenger.html | |
""" | |
class EncDecParam: | |
def __init__(self,**kwargs): | |
default_param= {"block":0,"each_block_shortcut":True,"global_ShortCut":False,"en_batch_norm":True,"downScale_conv_kernel":3} | |
for k,v in default_param.items(): | |
self.__dict__[k] =kwargs.get(k,v) |
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
# (事前にカレントディレクトリを変換したいモデルのあるディレクトリへ移動すること) | |
docker run --rm -v "$(pwd):/src" -it lilacs2039/debian_webasm_webdnn | |
python /webdnn/bin/convert_keras.py resnet50.h5 --input_shape '(1,224,224,3)' --out output --backend webassembly |
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 clone --depth 1 https://github.com/mil-tokyo/webdnn webdnn | |
cd webdnn | |
docker run --rm -v "$(pwd):/src" -it lilacs2039/debian_webasm_webdnn | |
# in container... | |
cd /src/example/resnet && python convert_resnet_keras.py --backend webassembly | |
# exit | |
docker run --rm -p 8080:80 -v "$(pwd):/usr/local/apache2/htdocs/" httpd |
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
# coding:utf-8 | |
""" | |
マルチスレッドでリンクをたどりながら画像を収集 | |
Usage: | |
python scrapingImage.py --target_urls (対象URL) --save_dir images | |
↓を参考に加筆したもの | |
http://www.mathgram.xyz/entry/scraping/matome | |
""" |
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
public enum AppState | |
{ | |
Active, Paused, Exit | |
} | |
public static class AppStateExt | |
{ | |
private static Dictionary<AppState, string> viewStrDictionary = new Dictionary<AppState, string>() | |
{ | |
{AppState.Active,"アクティブ" }, | |
{AppState.Paused,"ポーズ" }, |
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
This is free and unencumbered software released into the public domain. | |
Anyone is free to copy, modify, publish, use, compile, sell, or | |
distribute this software, either in source code form or as a compiled | |
binary, for any purpose, commercial or non-commercial, and by any | |
means. | |
In jurisdictions that recognize copyright laws, the author or authors | |
of this software dedicate any and all copyright interest in the | |
software to the public domain. We make this dedication for the benefit |
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
""" | |
""" | |
# Variables | |
outFilename = "FileList.html" | |
outFilename_withFullpathStr = "FileList_withFullPath.html" | |
exts = ['.doc', '.docx', '.xls', '.xlsx', '.ppt', '.pptx', '.pdf', '.msg'] | |
# Programs ************** | |
from pathlib import Path | |
#reference: https://qiita.com/amowwee/items/e63b3610ea750f7dba1b |
OlderNewer