resout
This description is under construction.
概要
Output path management tool for results (images, etc.) of numerical experiments, etc. 数値実験等の結果(画像等)の出力パス管理ツール
基本的な使い方
import resout
# 保存ファイル名の生成(自動で連番になる) [resout]
filename = resout.gen_save_path(".txt", label = "exp_result")
with open(filename, "w", encoding = "utf-8") as f:
f.write("hoge")
上記のように、gen_save_path()関数を使用することで連番のファイル名を取得できる
連番の説明
import resout
print(resout.gen_save_path(".txt", "exp_result")) # -> <path>\output_img\20210605T144210\exp_result_0.txt
print(resout.gen_save_path(".txt", "exp_result")) # -> <path>\output_img\20210605T144210\exp_result_1.txt
print(resout.gen_save_path(".txt", "exp_result")) # -> <path>\output_img\20210605T144210\exp_result_2.txt
画像を保存する
import resout
import numpy as np
img = np.zeros((200,200,3), dtype = np.uint8)
# 画像の保存 [resout]
resout.save_img(img, ratio = 1.0, ext = ".png", label = "resout_img")
保存パスの変更
import resout
# 保存パスの設定 [resout]
resout.set_save_dir("./results/")
# 保存ファイル名の生成(自動で連番になる) [resout]
filename = resout.gen_save_path(".txt", label = "exp_result")
with open(filename, "w", encoding = "utf-8") as f:
f.write("hoge")
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
resout-0.0.5.tar.gz
(3.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file resout-0.0.5.tar.gz.
File metadata
- Download URL: resout-0.0.5.tar.gz
- Upload date:
- Size: 3.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48eff58e4b64d8646f76ebc66bb3a80facac376f2324b22294ea4f509aab33e1
|
|
| MD5 |
78b839c27e091b80acd05fe8d8f14150
|
|
| BLAKE2b-256 |
fd08a97794f95d52d36de87b4596edc31cf582d6d6079ed7884025a872434ffc
|
File details
Details for the file resout-0.0.5-py3-none-any.whl.
File metadata
- Download URL: resout-0.0.5-py3-none-any.whl
- Upload date:
- Size: 3.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f90be45f4c78d64a0ae376da84886a4424177de169b5f534b71be94bc23dfcb2
|
|
| MD5 |
c3bdae1b35fa0d565b5a06e6d48e2388
|
|
| BLAKE2b-256 |
18ec276601fa530d9c597a698d6e50c34637cc354e15e757c545bb6fcf918e42
|