kevin-toolbox-dev 1.3.5__py3-none-any.whl → 1.3.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kevin_toolbox/__init__.py +2 -2
- kevin_toolbox/computer_science/algorithm/pareto_front/__init__.py +1 -0
- kevin_toolbox/computer_science/algorithm/pareto_front/optimum_picker.py +218 -0
- kevin_toolbox/computer_science/algorithm/statistician/__init__.py +1 -0
- kevin_toolbox/computer_science/algorithm/statistician/accumulator_base.py +2 -2
- kevin_toolbox/computer_science/algorithm/statistician/accumulator_for_ndl.py +69 -0
- kevin_toolbox/computer_science/algorithm/statistician/average_accumulator.py +16 -4
- kevin_toolbox/computer_science/algorithm/statistician/exponential_moving_average.py +5 -12
- kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py +3 -0
- kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation_debug.py +27 -0
- kevin_toolbox/data_flow/file/kevin_notation/write.py +3 -0
- kevin_toolbox/data_flow/file/markdown/__init__.py +3 -0
- kevin_toolbox/data_flow/file/markdown/find_tables.py +65 -0
- kevin_toolbox/data_flow/file/markdown/generate_table.py +19 -5
- kevin_toolbox/data_flow/file/markdown/parse_table.py +135 -0
- kevin_toolbox/data_flow/file/markdown/save_images_in_ndl.py +81 -0
- kevin_toolbox/data_flow/file/markdown/variable.py +17 -0
- kevin_toolbox/nested_dict_list/serializer/read.py +1 -1
- kevin_toolbox/nested_dict_list/serializer/write.py +9 -2
- kevin_toolbox/patches/for_matplotlib/common_charts/__init__.py +6 -0
- kevin_toolbox/patches/for_matplotlib/common_charts/plot_bars.py +54 -0
- kevin_toolbox/patches/for_matplotlib/common_charts/plot_confusion_matrix.py +60 -0
- kevin_toolbox/patches/for_matplotlib/common_charts/plot_distribution.py +65 -0
- kevin_toolbox/patches/for_matplotlib/common_charts/plot_lines.py +61 -0
- kevin_toolbox/patches/for_matplotlib/common_charts/plot_scatters.py +53 -0
- kevin_toolbox/patches/for_matplotlib/common_charts/plot_scatters_matrix.py +54 -0
- kevin_toolbox/patches/for_os/__init__.py +2 -0
- kevin_toolbox/patches/for_os/find_files_in_dir.py +30 -0
- kevin_toolbox/patches/for_os/path/__init__.py +2 -0
- kevin_toolbox/patches/for_os/path/find_illegal_chars.py +47 -0
- kevin_toolbox/patches/for_os/path/replace_illegal_chars.py +49 -0
- kevin_toolbox_dev-1.3.6.dist-info/METADATA +95 -0
- {kevin_toolbox_dev-1.3.5.dist-info → kevin_toolbox_dev-1.3.6.dist-info}/RECORD +35 -17
- kevin_toolbox_dev-1.3.5.dist-info/METADATA +0 -74
- {kevin_toolbox_dev-1.3.5.dist-info → kevin_toolbox_dev-1.3.6.dist-info}/WHEEL +0 -0
- {kevin_toolbox_dev-1.3.5.dist-info → kevin_toolbox_dev-1.3.6.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,47 @@
|
|
1
|
+
import os
|
2
|
+
import re
|
3
|
+
|
4
|
+
ILLEGAL_CHARS = {
|
5
|
+
'<': '<',
|
6
|
+
'>': '>',
|
7
|
+
':': ':',
|
8
|
+
'"': '"',
|
9
|
+
'/': '/',
|
10
|
+
'\\': '\',
|
11
|
+
'|': '|',
|
12
|
+
'?': '?',
|
13
|
+
'*': '*'
|
14
|
+
}
|
15
|
+
|
16
|
+
ILLEGAL_CHARS_PATTERN = re.compile(r'[<>:"/\\|?*]')
|
17
|
+
|
18
|
+
|
19
|
+
def find_illegal_chars(file_name, b_is_path=False):
|
20
|
+
"""
|
21
|
+
找出给定的文件名/路径中出现了哪些非法符号
|
22
|
+
所谓非法符号是指在特定系统(win/mac等)中文件名不允许出现的字符,
|
23
|
+
不建议在任何系统下使用带有这些符号的文件名,即使这些符号在当前系统中是合法的,
|
24
|
+
以免在跨系统时出现兼容性问题
|
25
|
+
|
26
|
+
参数:
|
27
|
+
file_name: <str>
|
28
|
+
b_is_path: <bool> 是否将file_name视为路径
|
29
|
+
默认为 False
|
30
|
+
当设置为 True 时,将会首先将file_name分割,再逐级从目录名中查找
|
31
|
+
"""
|
32
|
+
global ILLEGAL_CHARS_PATTERN
|
33
|
+
|
34
|
+
if b_is_path:
|
35
|
+
temp = [i for i in file_name.split(os.sep, -1) if len(i) > 0]
|
36
|
+
else:
|
37
|
+
temp = [file_name]
|
38
|
+
res = []
|
39
|
+
for i in temp:
|
40
|
+
res.extend(ILLEGAL_CHARS_PATTERN.findall(i))
|
41
|
+
return res
|
42
|
+
|
43
|
+
|
44
|
+
if __name__ == '__main__':
|
45
|
+
file_path = '//data0//b/<?>.md'
|
46
|
+
print(find_illegal_chars(file_name=file_path, b_is_path=True))
|
47
|
+
print(find_illegal_chars(file_name=file_path, b_is_path=False))
|
@@ -0,0 +1,49 @@
|
|
1
|
+
import os
|
2
|
+
import re
|
3
|
+
|
4
|
+
ILLEGAL_CHARS = {
|
5
|
+
'<': '<',
|
6
|
+
'>': '>',
|
7
|
+
':': ':',
|
8
|
+
'"': '"',
|
9
|
+
'/': '/',
|
10
|
+
'\\': '\',
|
11
|
+
'|': '|',
|
12
|
+
'?': '?',
|
13
|
+
'*': '*'
|
14
|
+
}
|
15
|
+
ILLEGAL_CHARS_PATTERN = re.compile('|'.join(re.escape(char) for char in ILLEGAL_CHARS.keys()))
|
16
|
+
|
17
|
+
|
18
|
+
def replace_illegal_chars(file_name, b_is_path=False):
|
19
|
+
"""
|
20
|
+
将给定的文件名/路径中的非法符号替换为合法形式
|
21
|
+
所谓非法符号是指在特定系统(win/mac等)中文件名不允许出现的字符,
|
22
|
+
不建议在任何系统下使用带有这些符号的文件名,即使这些符号在当前系统中是合法的,
|
23
|
+
以免在跨系统时出现兼容性问题。
|
24
|
+
|
25
|
+
参数:
|
26
|
+
file_name: <str>
|
27
|
+
b_is_path: <bool> 是否将file_name视为路径
|
28
|
+
默认为 False
|
29
|
+
当设置为 True 时,将会首先将file_name分割,再逐级处理目录名,最后合并为路径
|
30
|
+
"""
|
31
|
+
if not b_is_path:
|
32
|
+
res = _replace_illegal_chars(var=file_name)
|
33
|
+
else:
|
34
|
+
temp = file_name.split(os.sep, -1)
|
35
|
+
res = os.path.join(*[_replace_illegal_chars(var=i) for i in temp if len(i) > 0])
|
36
|
+
if len(temp[0]) == 0:
|
37
|
+
res = os.sep + res
|
38
|
+
return res
|
39
|
+
|
40
|
+
|
41
|
+
def _replace_illegal_chars(var):
|
42
|
+
global ILLEGAL_CHARS_PATTERN
|
43
|
+
return ILLEGAL_CHARS_PATTERN.sub(lambda m: ILLEGAL_CHARS[m.group(0)], var)
|
44
|
+
|
45
|
+
|
46
|
+
if __name__ == '__main__':
|
47
|
+
file_path = 'data0//b/<?>.md'
|
48
|
+
print(replace_illegal_chars(file_name=file_path, b_is_path=True))
|
49
|
+
print(replace_illegal_chars(file_name=file_path, b_is_path=False))
|
@@ -0,0 +1,95 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: kevin-toolbox-dev
|
3
|
+
Version: 1.3.6
|
4
|
+
Summary: 一个常用的工具代码包集合
|
5
|
+
Home-page: https://github.com/cantbeblank96/kevin_toolbox
|
6
|
+
Download-URL: https://github.com/username/your-package/archive/refs/tags/v1.0.0.tar.gz
|
7
|
+
Author: kevin hsu
|
8
|
+
Author-email: xukaiming1996@163.com
|
9
|
+
License: MIT
|
10
|
+
Keywords: mathematics,pytorch,numpy,machine-learning,algorithm
|
11
|
+
Platform: UNKNOWN
|
12
|
+
Classifier: License :: OSI Approved :: MIT License
|
13
|
+
Classifier: Programming Language :: Python
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
15
|
+
Requires-Python: >=3.6
|
16
|
+
Description-Content-Type: text/markdown
|
17
|
+
Requires-Dist: torch (>=1.2.0)
|
18
|
+
Requires-Dist: numpy (>=1.19.0)
|
19
|
+
Provides-Extra: plot
|
20
|
+
Requires-Dist: matplotlib (>=3.0) ; extra == 'plot'
|
21
|
+
Provides-Extra: rest
|
22
|
+
Requires-Dist: pytest (>=6.2.5) ; extra == 'rest'
|
23
|
+
Requires-Dist: line-profiler (>=3.5) ; extra == 'rest'
|
24
|
+
|
25
|
+
# kevin_toolbox
|
26
|
+
|
27
|
+
一个通用的工具代码包集合
|
28
|
+
|
29
|
+
|
30
|
+
|
31
|
+
环境要求
|
32
|
+
|
33
|
+
```shell
|
34
|
+
numpy>=1.19
|
35
|
+
pytorch>=1.2
|
36
|
+
```
|
37
|
+
|
38
|
+
安装方法:
|
39
|
+
|
40
|
+
```shell
|
41
|
+
pip install kevin-toolbox --no-dependencies
|
42
|
+
```
|
43
|
+
|
44
|
+
|
45
|
+
|
46
|
+
[项目地址 Repo](https://github.com/cantbeblank96/kevin_toolbox)
|
47
|
+
|
48
|
+
[使用指南 User_Guide](./notes/User_Guide.md)
|
49
|
+
|
50
|
+
[免责声明 Disclaimer](./notes/Disclaimer.md)
|
51
|
+
|
52
|
+
[版本更新记录](./notes/Release_Record.md):
|
53
|
+
|
54
|
+
- v 1.3.6 (2024-07-03)【new feature】
|
55
|
+
- patches
|
56
|
+
- for_os
|
57
|
+
- 【new feature】add find_files_in_dir(),找出目录下带有给定后缀的所有文件的生成器。
|
58
|
+
- for_os.path
|
59
|
+
- 【new feature】add find_illegal_chars(),找出给定的文件名/路径中出现了哪些非法符号。
|
60
|
+
- 【new feature】add replace_illegal_chars(),将给定的文件名/路径中的非法符号替换为合法形式。
|
61
|
+
- for_matplotlib
|
62
|
+
- 【new feature】add module common_charts,新增模块——常用图表,该模块下包含以下函数:
|
63
|
+
- plot_bars(),绘制柱状图
|
64
|
+
- plot_scatters(),绘制散点图
|
65
|
+
- plot_lines(),绘制折线图
|
66
|
+
- plot_distribution(),绘制分布图
|
67
|
+
- plot_scatters_matrix(),绘制散点图矩阵(常用于多变量关系分析)
|
68
|
+
- plot_confusion_matrix(),绘制混淆矩阵(常用于混淆矩阵、相关性矩阵、特征图可视化)
|
69
|
+
- 添加了测试用例。
|
70
|
+
- data_flow.file
|
71
|
+
- markdown
|
72
|
+
- 【new feature】add save_images_in_ndl(),将ndl结构叶节点下的图片对象保存到 plot_dir 中,并替换为该图片的markdown链接。
|
73
|
+
- 便于对表格中的图片或者列表中的图片进行保存和替换。
|
74
|
+
- 【new feature】add find_tables(),用于从文本中找出markdown格式的表格,并以二维数组的列表形式返回。
|
75
|
+
- 【new feature】add parse_table(),将二维数组形式的表格(比如find_tables()的返回列表的元素),解析成指定的格式。
|
76
|
+
- kevin_notation
|
77
|
+
- 【bug fix】fix bug in Kevin_Notation_Writer,增加检验写入的列的元素数量是否一致,不一致时进行报错。
|
78
|
+
- 【bug fix】fix bug in write(),避免对输入参数 metadata 中的内容进行意料之外的改动。
|
79
|
+
- nested_dict_list
|
80
|
+
- add para b_allow_override to serializer.write to allow overwriting,增加参数用于允许强制覆盖已有文件。
|
81
|
+
- computer_science.algorithm
|
82
|
+
- pareto_front
|
83
|
+
- 【new feature】add Optimum_Picker,帕累托最优值选取器。
|
84
|
+
- 记录并更新帕累托最优值
|
85
|
+
- 同时支持监控以下行为,并触发设定的执行器,详见参数 trigger_for_new 和 trigger_for_out。
|
86
|
+
- 新加值是一个新的帕累托最优值
|
87
|
+
- 抛弃一个不再是最优的旧的最优值
|
88
|
+
- statistician
|
89
|
+
- 【new feature】add Accumulator_for_Ndl,适用于 ndl 结构的统计器。
|
90
|
+
- 【bug fix】fix bug in Accumulator_Base._init_var()
|
91
|
+
- 【new feature】modify Average_Accumulator,在 add() 中新增了 weight 参数用于计算带权重的平均值
|
92
|
+
- modify Exponential_Moving_Average,add_sequence() 不再支持 weight_ls 参数,让该接口与其他类更加一致。
|
93
|
+
- 添加了测试用例。
|
94
|
+
|
95
|
+
|
@@ -1,4 +1,4 @@
|
|
1
|
-
kevin_toolbox/__init__.py,sha256=
|
1
|
+
kevin_toolbox/__init__.py,sha256=GlBohqsdsyQwDemVwoyESNeDlLwAoCVkFPWXyasVc5U,410
|
2
2
|
kevin_toolbox/computer_science/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
3
|
kevin_toolbox/computer_science/algorithm/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
4
4
|
kevin_toolbox/computer_science/algorithm/cache_manager/__init__.py,sha256=p2hddkZ1HfYF9-m2Hx-o9IotwQHd4QwDCePy2ADpTDA,41
|
@@ -38,8 +38,9 @@ kevin_toolbox/computer_science/algorithm/locks/mutex_lock.py,sha256=81cCw3oTXCZx
|
|
38
38
|
kevin_toolbox/computer_science/algorithm/parallel_and_concurrent/__init__.py,sha256=EUy1RptOJCLzu6L0ZWGdyto0btI_vEvjEJHvKKBN4pk,55
|
39
39
|
kevin_toolbox/computer_science/algorithm/parallel_and_concurrent/async_executor.py,sha256=yWHpD_1XrC8hG3PWXUZEDj5rnfM0-d-NptRE856tcmY,896
|
40
40
|
kevin_toolbox/computer_science/algorithm/parallel_and_concurrent/multi_thread_execute.py,sha256=WSQZ9BE-21oc59leHxd-2IRMMxpmEezX7SX7e1UyV-4,3126
|
41
|
-
kevin_toolbox/computer_science/algorithm/pareto_front/__init__.py,sha256=
|
41
|
+
kevin_toolbox/computer_science/algorithm/pareto_front/__init__.py,sha256=F1uD0ZT2Ukb708_Eay96SEhaDfCq9YEheJRust33P6w,111
|
42
42
|
kevin_toolbox/computer_science/algorithm/pareto_front/get_pareto_points_idx.py,sha256=WR-_9BruqAWH0QECa40b1Iz1_k6uesBrUYrn2s9ALBM,3008
|
43
|
+
kevin_toolbox/computer_science/algorithm/pareto_front/optimum_picker.py,sha256=wnYN2s9r2g1z5wF0FvFLawRYITUJbMXbBs4TPsdvhlE,9923
|
43
44
|
kevin_toolbox/computer_science/algorithm/registration/__init__.py,sha256=teEd9HkrB6baLpwNwae5c4wn0QRwV3KtBv-2V9-Z7cc,49
|
44
45
|
kevin_toolbox/computer_science/algorithm/registration/registry.py,sha256=vTply8VnVuI3zaRxCJewKICpVwVcUF_Vl7Yu_LG7O4w,17385
|
45
46
|
kevin_toolbox/computer_science/algorithm/scheduler/__init__.py,sha256=ENzZsNaMu6ISilTxeE3_EP_L0dNi8SI7IYdTdxic2nw,76
|
@@ -47,10 +48,11 @@ kevin_toolbox/computer_science/algorithm/scheduler/strategy_manager.py,sha256=yL
|
|
47
48
|
kevin_toolbox/computer_science/algorithm/scheduler/trigger.py,sha256=YlqTX2TE44BwcQI0jfvcBCJhouhdAYuhwu2QJhuBWP0,4470
|
48
49
|
kevin_toolbox/computer_science/algorithm/search/__init__.py,sha256=zja7FXLTNd2dSVzzGp1TbBp4i3TDY8S9tcJ9pqc684A,41
|
49
50
|
kevin_toolbox/computer_science/algorithm/search/binary_search.py,sha256=FcOdgxfuNews_AhPF_CoQDr2vBPqpUpifF7Fmgml1p4,1013
|
50
|
-
kevin_toolbox/computer_science/algorithm/statistician/__init__.py,sha256=
|
51
|
-
kevin_toolbox/computer_science/algorithm/statistician/accumulator_base.py,sha256=
|
52
|
-
kevin_toolbox/computer_science/algorithm/statistician/
|
53
|
-
kevin_toolbox/computer_science/algorithm/statistician/
|
51
|
+
kevin_toolbox/computer_science/algorithm/statistician/__init__.py,sha256=sYp7CrchsIdv89bBbiFHr3sIj6TGPBTQGHshSSk-9Z8,220
|
52
|
+
kevin_toolbox/computer_science/algorithm/statistician/accumulator_base.py,sha256=iv-Mdw74u_iRceLX80_CSoEd4N3uAavU54Yw5Gw9t1o,6113
|
53
|
+
kevin_toolbox/computer_science/algorithm/statistician/accumulator_for_ndl.py,sha256=BBPuJHhMI7m6-qP3EDB1Z2dlCg4a_Fev7WQ5zFMPuuE,2275
|
54
|
+
kevin_toolbox/computer_science/algorithm/statistician/average_accumulator.py,sha256=Dfd6zYALU-plkm8doc3xNyiR4sFqlib86IVH8FI8ciI,2896
|
55
|
+
kevin_toolbox/computer_science/algorithm/statistician/exponential_moving_average.py,sha256=fc4l85FH-KbZSIQY15lJ6SDnXiU-F5XjbQimKCnIju8,5076
|
54
56
|
kevin_toolbox/computer_science/algorithm/statistician/init_var/__init__.py,sha256=LrrLKilP-LqkNeLEqClZN4wMl9TvEaDktgbmw7CN1mY,121
|
55
57
|
kevin_toolbox/computer_science/algorithm/statistician/init_var/init_by_data_format.py,sha256=vCLguGS7het-gwPZ5uR2KDxnHV4gPaNbzJflocLbmLQ,769
|
56
58
|
kevin_toolbox/computer_science/algorithm/statistician/init_var/init_by_like.py,sha256=8QfvltiNDqZUYiNW6Ebt0UIuYvyqhSpsCYn99T2q70c,572
|
@@ -84,19 +86,24 @@ kevin_toolbox/data_flow/file/json_/converter/unescape_tuple_and_set.py,sha256=3v
|
|
84
86
|
kevin_toolbox/data_flow/file/kevin_notation/__init__.py,sha256=g9UUF9nJrOMc0ndCwVROQLsux4Or2yVMJMdhK5P9nRc,259
|
85
87
|
kevin_toolbox/data_flow/file/kevin_notation/converter.py,sha256=5k_Yxw-fBKEkxFG0bnl1fRsz06MlUS-4f3gZ--bmDs8,3621
|
86
88
|
kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py,sha256=iN6nV8mMbifTbECNmjc-G2pzpxivhks5kCXGVdvS9fQ,8297
|
87
|
-
kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py,sha256=
|
89
|
+
kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py,sha256=ceZty_XPPEVgagQs1ddx9X23JDja22sr3gl7wrBIHfE,16546
|
88
90
|
kevin_toolbox/data_flow/file/kevin_notation/read.py,sha256=w0RE0WwTmWycEozJVshAiE0gMBxproBRwBEMLS6tB6c,544
|
89
|
-
kevin_toolbox/data_flow/file/kevin_notation/write.py,sha256=
|
91
|
+
kevin_toolbox/data_flow/file/kevin_notation/write.py,sha256=X6k9ccpGEoMr6ccvjUj8zVJ6aPxjvdsY2fZqYu3Etww,657
|
90
92
|
kevin_toolbox/data_flow/file/kevin_notation/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
91
93
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py,sha256=ab402r5LGyNz4XW2SnjvicNtQqBAAHZTaGfYMNdMExI,7345
|
94
|
+
kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation_debug.py,sha256=_s9KPa3OjX6hTMq3TNrvtHy2D-Wlp65qgr7LxH-nn8o,999
|
92
95
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
93
96
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_0.py,sha256=CKRb86O3JV9lkGrMtyJzEH041o0xABfT32Zo4GQ5Qis,324
|
94
97
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_1.py,sha256=Xs8oFJqwi0uPOJewulij7DY0iMEp6dWBMiiDIwPlm4s,176
|
95
98
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_all.py,sha256=cvwrNzMVqB2YF1Ya3pw4NSOOzQBcGCFVCB2lN-sKmfw,438
|
96
|
-
kevin_toolbox/data_flow/file/markdown/__init__.py,sha256=
|
99
|
+
kevin_toolbox/data_flow/file/markdown/__init__.py,sha256=oPUUDFM0i3roBPLJm6jleF_uSq1_2_fD0-zG_7n2lys,250
|
100
|
+
kevin_toolbox/data_flow/file/markdown/find_tables.py,sha256=YZrdy0koiG_KMCNeJFtNShzx9f1whg0xnaBhB0F8k4o,1699
|
97
101
|
kevin_toolbox/data_flow/file/markdown/generate_link.py,sha256=9okSyCFIDQW5T35a6-epVyoCkCL1vFH5215P5MRXfYk,304
|
98
102
|
kevin_toolbox/data_flow/file/markdown/generate_list.py,sha256=Gv5BcqWE4M4w8ADN8NX5LyD9DxILXTQtJvcazi_NuyE,1006
|
99
|
-
kevin_toolbox/data_flow/file/markdown/generate_table.py,sha256=
|
103
|
+
kevin_toolbox/data_flow/file/markdown/generate_table.py,sha256=u-FLyjQi7R7xkKmSZSyXBCWVMuICYfShSgBlz-vptkI,7991
|
104
|
+
kevin_toolbox/data_flow/file/markdown/parse_table.py,sha256=aKR8SNpA3Tr24GZQRtr2mx7TQYYKhNLArV9su5H5kWU,5957
|
105
|
+
kevin_toolbox/data_flow/file/markdown/save_images_in_ndl.py,sha256=F_c6FP4QgWjlCF_ftSDpa6KoyfUrlE3cH216_w_0q3E,3897
|
106
|
+
kevin_toolbox/data_flow/file/markdown/variable.py,sha256=fQp_wxhXJv_HosuaiiEPkDTodT4jzcxN19HXGAzeckc,857
|
100
107
|
kevin_toolbox/developing/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
101
108
|
kevin_toolbox/developing/general_matrix_multiplication.py,sha256=Ie9c8mYBYR-Bg7CjU4L1dsOxXsxnx1jz-rA7_ez7vjg,2089
|
102
109
|
kevin_toolbox/developing/test.py,sha256=6Y23SY3FJVrvZmiiXKNPKv84lhVRW-XyjNeecj9lLYA,241
|
@@ -229,10 +236,10 @@ kevin_toolbox/nested_dict_list/name_handler/escape_node.py,sha256=niT9MxmsyrSZYh
|
|
229
236
|
kevin_toolbox/nested_dict_list/name_handler/parse_name.py,sha256=vUlAXPocpVSxtb3EnRi7U5K40Tz9plFG-_sbwLfYiy4,2280
|
230
237
|
kevin_toolbox/nested_dict_list/serializer/__init__.py,sha256=79dd9l-mNz0bycFKjNm7YsfWPR-JsVx9NoG_Ofqy-HQ,153
|
231
238
|
kevin_toolbox/nested_dict_list/serializer/enum_variable.py,sha256=RWPydtXI4adOJYGo_k5CWHSL0Odzj_bsahb24p1ranY,847
|
232
|
-
kevin_toolbox/nested_dict_list/serializer/read.py,sha256=
|
239
|
+
kevin_toolbox/nested_dict_list/serializer/read.py,sha256=BjsEWYoyvEHgRKKVKw0suf1ukug2tAFLMCAmEnndqgg,2945
|
233
240
|
kevin_toolbox/nested_dict_list/serializer/saved_node_name_builder.py,sha256=qsD-rmDmVaKZP4owN3Wm3QY2Ksi71XlYETqw4VmIsSU,1011
|
234
241
|
kevin_toolbox/nested_dict_list/serializer/variable.py,sha256=ZywG6obipRBCGY1cY42gdvsuWk8GLZXr6eCYcW7ZJ9c,392
|
235
|
-
kevin_toolbox/nested_dict_list/serializer/write.py,sha256=
|
242
|
+
kevin_toolbox/nested_dict_list/serializer/write.py,sha256=HCT_vAUqJPQgMrEZKzLzlu1mA2aSZnmGQ1SqNe5X1fI,21845
|
236
243
|
kevin_toolbox/nested_dict_list/serializer/backends/__init__.py,sha256=8g7y-L3cmctxao616dVkGiot00FJzKNmNl_69V2bSmE,39
|
237
244
|
kevin_toolbox/nested_dict_list/serializer/backends/_json_.py,sha256=oJXIc28yjxsD9ZJuw120pVHTVsTzCdaXEhVUSQeydq4,2145
|
238
245
|
kevin_toolbox/nested_dict_list/serializer/backends/_ndl.py,sha256=3YkAq_Bqzehnw0kGxqxwtF6uUz0EV37tLI-1ROHjixY,1794
|
@@ -258,6 +265,13 @@ kevin_toolbox/patches/for_matplotlib/add_trajectory_2d.py,sha256=mKXRUNJiEZBcff3
|
|
258
265
|
kevin_toolbox/patches/for_matplotlib/add_trajectory_3d.py,sha256=VGlZfVY0xhUBOUzWJVPxZZNHHRvWLR0HZzhADA_cbsU,1696
|
259
266
|
kevin_toolbox/patches/for_matplotlib/arrow3d.py,sha256=JSnNMr1hU2N4FUX526I4MDr04mksDgu4VuegYFDxk1Q,1361
|
260
267
|
kevin_toolbox/patches/for_matplotlib/generate_color_list.py,sha256=byGZiehbPMUz4DnMtAUbjLL6UADahWEA4vBbaneDPH8,984
|
268
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/__init__.py,sha256=etey2r0LO4PTLnH3VzcRKFe7IHP9I5TMW3DEz3sQx2c,270
|
269
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/plot_bars.py,sha256=crS1h79Dz6gGOnqhjuuN2o5pl8CekhCenx9lRz5KPiI,1887
|
270
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/plot_confusion_matrix.py,sha256=dxkgiXeoIdtXzcg_HoUnRGqhJk91iNoB5VbLuoG7o_M,2191
|
271
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/plot_distribution.py,sha256=stuyaULWM_vVW3r9WrpzGqA8rohQrdNKT3Agsbobqck,2396
|
272
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/plot_lines.py,sha256=qhkshWw9kKF2_acv1h59CwZgJIpJ3eiPTmcEcNyhlQE,1985
|
273
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/plot_scatters.py,sha256=JCCBV9gLJ07b8y57rBb6SawZVhLPqwUXI-UBPyT18h8,1652
|
274
|
+
kevin_toolbox/patches/for_matplotlib/common_charts/plot_scatters_matrix.py,sha256=-ki6h4j-4OHJNCyb2a04l_2uQxUqD2QOMgYfRLmHmVU,1983
|
261
275
|
kevin_toolbox/patches/for_numpy/__init__.py,sha256=SNjZGxTRBn-uzkyZi6Jcz-9juhhZKT8TI70qH-fhGGc,21
|
262
276
|
kevin_toolbox/patches/for_numpy/linalg/__init__.py,sha256=TH-M0Orrakyf9S9A8FiDf3zLHY24gP2SGGTuNmLhDP4,128
|
263
277
|
kevin_toolbox/patches/for_numpy/linalg/cos_similar.py,sha256=bFkfDwrW3maXq5i9ZABidKfg8ZdEdXfFgNzW_uygrM4,423
|
@@ -282,12 +296,16 @@ kevin_toolbox/patches/for_optuna/serialize/for_study/load.py,sha256=DwnDheJx5IJp
|
|
282
296
|
kevin_toolbox/patches/for_optuna/serialize/for_trial/__init__.py,sha256=YSROCv89O84gzzRP2NfVl0Xhd4_RsdoqU3Nnr-vhWhk,46
|
283
297
|
kevin_toolbox/patches/for_optuna/serialize/for_trial/dump.py,sha256=FT-Z1rzCNUYz5St1Yc0bfDWAV10WaV41rlbWIS72Jp0,982
|
284
298
|
kevin_toolbox/patches/for_optuna/serialize/for_trial/load.py,sha256=2fpeeHPKA9bT7CjQ6DVRXOarF6IAA6_f2pXbB1rXcvE,796
|
285
|
-
kevin_toolbox/patches/for_os/__init__.py,sha256=
|
299
|
+
kevin_toolbox/patches/for_os/__init__.py,sha256=OhGxHkzI-oBek6M07kkrRgTQfY42l1Y2nOIR95JYD-g,219
|
286
300
|
kevin_toolbox/patches/for_os/copy.py,sha256=PWFLu15DpIA4JZxatvphHANNn2H3nC93qTbLLxDl5NU,1509
|
301
|
+
kevin_toolbox/patches/for_os/find_files_in_dir.py,sha256=KtjUJTMTNivAoWXGYgVkuaXukU1ktEAA-u8peusznmU,1266
|
287
302
|
kevin_toolbox/patches/for_os/pack.py,sha256=A6u4g3dfwXPtlU4gBcThNrktz6dO4DVi2wmQXytqfDI,656
|
288
303
|
kevin_toolbox/patches/for_os/remove.py,sha256=PmwqzVJbyfdqwXn_T1F9d4Oar8CwQ2YFaqcZQkfnrnI,750
|
289
304
|
kevin_toolbox/patches/for_os/unpack.py,sha256=d_fO7nPmExy1VIg7ADIMayCzjBBeFxvJLhIsulIRlzI,1047
|
290
305
|
kevin_toolbox/patches/for_os/walk.py,sha256=LrtEeRUDwzZgu_zGZ-kPsFJd4D-8R8ECHW6WNdEsDSw,8376
|
306
|
+
kevin_toolbox/patches/for_os/path/__init__.py,sha256=M4XaYawTDj-SjwZ_bWS5D38lqzPujxvAtVEvzRLDhtU,108
|
307
|
+
kevin_toolbox/patches/for_os/path/find_illegal_chars.py,sha256=QmqzeaeBY50of28qtvfEmnDW9xeVIfCXi6QVzLzngks,1416
|
308
|
+
kevin_toolbox/patches/for_os/path/replace_illegal_chars.py,sha256=OhxndHEJ8xK-ip-sWYQehTNSho8eNFeKj2iwPHR02os,1672
|
291
309
|
kevin_toolbox/patches/for_test/__init__.py,sha256=sFr2VZD1zk8Vtjq2_F8uE4xNovJF6yDY8j1YND5XAw0,49
|
292
310
|
kevin_toolbox/patches/for_test/check_consistency.py,sha256=cerf4NywkvWYMvuJUjimfRRVU7D9vL30jTAX0NxxRoM,9422
|
293
311
|
kevin_toolbox/patches/for_torch/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
@@ -305,7 +323,7 @@ kevin_toolbox/patches/for_torch/math/get_y_at_x.py,sha256=bfoVcasZ_tMdhR_1Me0Jli
|
|
305
323
|
kevin_toolbox/patches/for_torch/math/my_around.py,sha256=ptpU3ids50gwf663EpHbw7raj9tNrDGBFZ5t_uMNH14,1378
|
306
324
|
kevin_toolbox/patches/for_torch/nn/__init__.py,sha256=aJs3RMqRzQmd8KKDmQW9FxwCqS5yfPqEdg-m0PwlQro,39
|
307
325
|
kevin_toolbox/patches/for_torch/nn/lambda_layer.py,sha256=KUuLiX_Dr4bvRmpAaCW5QTDWDcnMPRnw0jg4NNXTFhM,223
|
308
|
-
kevin_toolbox_dev-1.3.
|
309
|
-
kevin_toolbox_dev-1.3.
|
310
|
-
kevin_toolbox_dev-1.3.
|
311
|
-
kevin_toolbox_dev-1.3.
|
326
|
+
kevin_toolbox_dev-1.3.6.dist-info/METADATA,sha256=c8MZR_BQteWmD6dhfIvq056-O0Ve0Gv4cyPwNn_86t4,4178
|
327
|
+
kevin_toolbox_dev-1.3.6.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
328
|
+
kevin_toolbox_dev-1.3.6.dist-info/top_level.txt,sha256=S5TeRGF-PwlhsaUEPTI-f2vWrpLmh3axpyI6v-Fi75o,14
|
329
|
+
kevin_toolbox_dev-1.3.6.dist-info/RECORD,,
|
@@ -1,74 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: kevin-toolbox-dev
|
3
|
-
Version: 1.3.5
|
4
|
-
Summary: 一个常用的工具代码包集合
|
5
|
-
Home-page: https://github.com/cantbeblank96/kevin_toolbox
|
6
|
-
Download-URL: https://github.com/username/your-package/archive/refs/tags/v1.0.0.tar.gz
|
7
|
-
Author: kevin hsu
|
8
|
-
Author-email: xukaiming1996@163.com
|
9
|
-
License: MIT
|
10
|
-
Keywords: mathematics,pytorch,numpy,machine-learning,algorithm
|
11
|
-
Platform: UNKNOWN
|
12
|
-
Classifier: License :: OSI Approved :: MIT License
|
13
|
-
Classifier: Programming Language :: Python
|
14
|
-
Classifier: Programming Language :: Python :: 3
|
15
|
-
Requires-Python: >=3.6
|
16
|
-
Description-Content-Type: text/markdown
|
17
|
-
Requires-Dist: torch (>=1.2.0)
|
18
|
-
Requires-Dist: numpy (>=1.19.0)
|
19
|
-
Provides-Extra: plot
|
20
|
-
Requires-Dist: matplotlib (>=3.0) ; extra == 'plot'
|
21
|
-
Provides-Extra: rest
|
22
|
-
Requires-Dist: pytest (>=6.2.5) ; extra == 'rest'
|
23
|
-
Requires-Dist: line-profiler (>=3.5) ; extra == 'rest'
|
24
|
-
|
25
|
-
# kevin_toolbox
|
26
|
-
|
27
|
-
一个通用的工具代码包集合
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
环境要求
|
32
|
-
|
33
|
-
```shell
|
34
|
-
numpy>=1.19
|
35
|
-
pytorch>=1.2
|
36
|
-
```
|
37
|
-
|
38
|
-
安装方法:
|
39
|
-
|
40
|
-
```shell
|
41
|
-
pip install kevin-toolbox --no-dependencies
|
42
|
-
```
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
[项目地址 Repo](https://github.com/cantbeblank96/kevin_toolbox)
|
47
|
-
|
48
|
-
[使用指南 User_Guide](./notes/User_Guide.md)
|
49
|
-
|
50
|
-
[免责声明 Disclaimer](./notes/Disclaimer.md)
|
51
|
-
|
52
|
-
[版本更新记录](./notes/Release_Record.md):
|
53
|
-
|
54
|
-
- v 1.3.5 (2024-05-18)【bug fix】【new feature】
|
55
|
-
- patches
|
56
|
-
- for_os
|
57
|
-
- 【new feature】add copy(),无论是文件/目录/软连接都可以使用该函数进行复制。
|
58
|
-
- 同时支持follow_symlinks参数用于决定是否跟随符号链接复制其指向的内容,支持remove_dst_if_exists用于决定当目标存在时是否尝试进行移除。
|
59
|
-
- for_test
|
60
|
-
- 【bug fix】fix bug in check_consistency(),解决了以下问题:
|
61
|
-
- 对于含有 np.nan 值的array错误地一律都判断为不相等,修改后将相同位置的 np.nan 值视为相等。
|
62
|
-
- require_same_shape=False 时无法正常为不对齐的 可变长度类型 报错。
|
63
|
-
- 对于包含 requires_grad=True 的 tensor 的复杂 tuple 异常报错。
|
64
|
-
- 添加了对应的测试用例。
|
65
|
-
- nested_dict_list
|
66
|
-
- 【bug fix】modify temporary file management in write() and read(),加强对写入和读取时创建的临时文件的管理,保证异常退出时能够自动清理临时文件夹。
|
67
|
-
- data_flow.file
|
68
|
-
- json_
|
69
|
-
- 【new feature】modify read(),新增了 file_obj 参数,支持直接从 BytesIO 和 StringIO 中读取json文件。
|
70
|
-
- 添加了对应的测试用例。
|
71
|
-
- 在更高版本的numpy中已经没有 np.warnings 了,因此将所有 np.warnings 替换为 warnings。
|
72
|
-
|
73
|
-
|
74
|
-
|
File without changes
|
File without changes
|