kevin-toolbox-dev 1.3.1__py3-none-any.whl → 1.3.3__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/cache_manager/__init__.py +1 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/cache/__init__.py +2 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/cache/cache_base.py +89 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/cache/memo_cache.py +36 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager.py +218 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/strategy/__init__.py +5 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/strategy/fifo_strategy.py +21 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lfu_strategy.py +80 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lru_strategy.py +43 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lst_strategy.py +26 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/strategy/strategy_base.py +45 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/test/__init__.py +0 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/test/test_cache_builder.py +37 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/test/test_cache_manager.py +197 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/test/test_cache_strategy.py +129 -0
- kevin_toolbox/computer_science/algorithm/cache_manager/variable.py +28 -0
- kevin_toolbox/computer_science/algorithm/registration/registry.py +38 -16
- kevin_toolbox/data_flow/core/cache/__init__.py +1 -1
- kevin_toolbox/data_flow/core/cache/cache_manager_for_iterator.py +36 -168
- kevin_toolbox/data_flow/core/cache/test/__init__.py +0 -0
- kevin_toolbox/data_flow/core/cache/test/test_cache_manager_for_iterator.py +34 -0
- kevin_toolbox/data_flow/core/reader/file_iterative_reader.py +44 -9
- kevin_toolbox/data_flow/core/reader/unified_reader.py +2 -2
- kevin_toolbox/data_flow/core/reader/unified_reader_base.py +4 -5
- kevin_toolbox/data_flow/file/json_/converter/__init__.py +2 -2
- kevin_toolbox/data_flow/file/json_/converter/escape_tuple_and_set.py +23 -0
- kevin_toolbox/data_flow/file/json_/converter/{unescape_tuple.py → unescape_tuple_and_set.py} +7 -5
- kevin_toolbox/data_flow/file/json_/read_json.py +3 -3
- kevin_toolbox/data_flow/file/json_/write_json.py +3 -3
- kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py +6 -5
- kevin_toolbox/data_flow/file/kevin_notation/read.py +4 -2
- kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py +15 -3
- kevin_toolbox/data_flow/file/markdown/generate_table.py +2 -2
- kevin_toolbox/math/utils/__init__.py +1 -1
- kevin_toolbox/math/utils/{spilt_integer_most_evenly.py → split_integer_most_evenly.py} +2 -2
- kevin_toolbox/nested_dict_list/get_nodes.py +9 -4
- kevin_toolbox/nested_dict_list/name_handler/build_name.py +1 -1
- kevin_toolbox/nested_dict_list/name_handler/parse_name.py +1 -1
- kevin_toolbox/nested_dict_list/set_default.py +44 -28
- kevin_toolbox/patches/for_matplotlib/__init__.py +1 -0
- kevin_toolbox/patches/for_matplotlib/generate_color_list.py +33 -0
- kevin_toolbox/patches/for_numpy/linalg/__init__.py +1 -0
- kevin_toolbox/patches/for_numpy/linalg/entropy.py +26 -0
- kevin_toolbox/patches/for_numpy/random/__init__.py +3 -0
- kevin_toolbox/patches/for_numpy/random/get_rng.py +64 -0
- kevin_toolbox/patches/for_numpy/random/truncated_multivariate_normal.py +129 -0
- kevin_toolbox/patches/for_numpy/random/truncated_normal.py +89 -0
- kevin_toolbox/patches/for_numpy/random/variable.py +10 -0
- kevin_toolbox/patches/for_optuna/serialize/for_study/dump.py +10 -2
- kevin_toolbox_dev-1.3.3.dist-info/METADATA +75 -0
- {kevin_toolbox_dev-1.3.1.dist-info → kevin_toolbox_dev-1.3.3.dist-info}/RECORD +54 -29
- kevin_toolbox/data_flow/file/json_/converter/escape_tuple.py +0 -20
- kevin_toolbox_dev-1.3.1.dist-info/METADATA +0 -91
- {kevin_toolbox_dev-1.3.1.dist-info → kevin_toolbox_dev-1.3.3.dist-info}/WHEEL +0 -0
- {kevin_toolbox_dev-1.3.1.dist-info → kevin_toolbox_dev-1.3.3.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,75 @@
|
|
1
|
+
Metadata-Version: 2.1
|
2
|
+
Name: kevin-toolbox-dev
|
3
|
+
Version: 1.3.3
|
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.3 (2024-04-01)【bug fix】【new feature】
|
55
|
+
- math.utils
|
56
|
+
- 【bug fix】更正拼写错误,将原有的 spilt_integer_most_evenly() 中的 "spilt" 改正为 "split",新的函数名为 split_integer_most_evenly
|
57
|
+
|
58
|
+
- patches.for_numpy.random
|
59
|
+
- 【bug fix】modify get_rng(),改进以避免遇到 rng 中不存在的函数时报错。
|
60
|
+
|
61
|
+
- data_flow.file
|
62
|
+
- json_
|
63
|
+
- 【new feature】将 escape_tuple() 改成 escape_tuple_and_set(),新增对 set 进行处理。
|
64
|
+
- 【new feature】将 unescape_tuple() 改成 unescape_tuple_and_set()。
|
65
|
+
|
66
|
+
- core.reader
|
67
|
+
- 【new feature】为 File_Iterative_Reader 新增了 file_obj 参数,支持直接输入文件对象。
|
68
|
+
|
69
|
+
- kevin_notation
|
70
|
+
- 【new feature】根据 File_Iterative_Reader 的修改,为 Kevin_Notation_Reader 和 read() 对应增加 file_obj 参数,以支持直接输入文件对象。
|
71
|
+
- 补充了对应的测试用例。
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
|
@@ -1,6 +1,22 @@
|
|
1
|
-
kevin_toolbox/__init__.py,sha256=
|
1
|
+
kevin_toolbox/__init__.py,sha256=SLC9_d60jm2WkdRlGpjY4ED_icVGwHgWLxaZOqS0zbk,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
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/__init__.py,sha256=p2hddkZ1HfYF9-m2Hx-o9IotwQHd4QwDCePy2ADpTDA,41
|
5
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/cache_manager.py,sha256=e_mesTHjYlSV2VjXfmrA_osJRZhGe3nyS5SX1R5rfOQ,9151
|
6
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/variable.py,sha256=j6yLezcZxf7gNdxwUxP0PPy2zauVpTr6KFMCg66m9lo,835
|
7
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/cache/__init__.py,sha256=Tt8XgrZsHP3J3f6UucGNhGAN8L7HiVjLLO1JzICR2Mc,70
|
8
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/cache/cache_base.py,sha256=Jln4Ey0sUGrzUqpkHaMP0S_z6NUw43iLnwMbmm-8msg,2229
|
9
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/cache/memo_cache.py,sha256=tG_5NZlGmLfom0B82GyPejhfuK64qZylBaHkKCoKw6k,963
|
10
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/strategy/__init__.py,sha256=JG7671omAwwRIDSEIrfWoLXEGe1ycE8e1Y5b0DjpNxY,199
|
11
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/strategy/fifo_strategy.py,sha256=8r6o9gd47ECbXLpDIFNVNCZ8psa872oeA55hYT0BylY,770
|
12
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lfu_strategy.py,sha256=beL1hX96q_7f0Vv9wtTqjrMGsmYgu7pW0PMxOVlLmrw,2557
|
13
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lru_strategy.py,sha256=kr12FjO1e2KGsAapASmcn-N4W2pMGTc8oocrnCnEVXs,1376
|
14
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/strategy/lst_strategy.py,sha256=UeJFTp_L70WS5TVfPt0FJwgKC6F82aOkTY2qvWQLd0o,1106
|
15
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/strategy/strategy_base.py,sha256=4SdJ8_GVlFRmA_mXdW2oZkS7MHWwA5J9rrGd7g7V7jE,1457
|
16
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
17
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/test/test_cache_builder.py,sha256=kYZ9pdnc4Zj7IX3LX9Dq5liKPupXTINdqiq42CDVCPk,1108
|
18
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/test/test_cache_manager.py,sha256=9KWjpkz9IOMVKEAcQwdt6vX6z6T1jmXlo_Xgum3aUZ8,7944
|
19
|
+
kevin_toolbox/computer_science/algorithm/cache_manager/test/test_cache_strategy.py,sha256=1DPd2UVgBoCcinsKoYgLVh_VLe2cLGoVPL1MjOifVW0,5310
|
4
20
|
kevin_toolbox/computer_science/algorithm/combinatorial_optimization/__init__.py,sha256=fBMX0_WiV8kfHLWZNfVe2uL67gsN_oHfpbuHaHUOiys,142
|
5
21
|
kevin_toolbox/computer_science/algorithm/combinatorial_optimization/get_subset_with_largest_product.py,sha256=d43k85Jafgu97E37GtPW2zgOY7O6jwAcZlljr4JJZJ4,1832
|
6
22
|
kevin_toolbox/computer_science/algorithm/combinatorial_optimization/zero_one_knapsack_problem.py,sha256=PR-JBphNdGZZvg016Q5iKzU9c44dTbqRFWrOg31EaIY,2819
|
@@ -25,7 +41,7 @@ kevin_toolbox/computer_science/algorithm/parallel_and_concurrent/multi_thread_ex
|
|
25
41
|
kevin_toolbox/computer_science/algorithm/pareto_front/__init__.py,sha256=R3ztTEfD_i3pHfGrrghUhbFEhVCgU_OKopnTskIianE,68
|
26
42
|
kevin_toolbox/computer_science/algorithm/pareto_front/get_pareto_points_idx.py,sha256=WR-_9BruqAWH0QECa40b1Iz1_k6uesBrUYrn2s9ALBM,3008
|
27
43
|
kevin_toolbox/computer_science/algorithm/registration/__init__.py,sha256=teEd9HkrB6baLpwNwae5c4wn0QRwV3KtBv-2V9-Z7cc,49
|
28
|
-
kevin_toolbox/computer_science/algorithm/registration/registry.py,sha256=
|
44
|
+
kevin_toolbox/computer_science/algorithm/registration/registry.py,sha256=vTply8VnVuI3zaRxCJewKICpVwVcUF_Vl7Yu_LG7O4w,17385
|
29
45
|
kevin_toolbox/computer_science/algorithm/scheduler/__init__.py,sha256=ENzZsNaMu6ISilTxeE3_EP_L0dNi8SI7IYdTdxic2nw,76
|
30
46
|
kevin_toolbox/computer_science/algorithm/scheduler/strategy_manager.py,sha256=yLh2GBEsedJhqvB90zEmAOdZ8IF7nn1r9lSE95BbnEQ,12194
|
31
47
|
kevin_toolbox/computer_science/algorithm/scheduler/trigger.py,sha256=YlqTX2TE44BwcQI0jfvcBCJhouhdAYuhwu2QJhuBWP0,4470
|
@@ -45,32 +61,34 @@ kevin_toolbox/dangerous/__init__.py,sha256=7TqcyVO0IUUZnFw6vFybvdY7UCg-Bv1Moh95I
|
|
45
61
|
kevin_toolbox/dangerous/dump_into_pickle_with_executor_attached.py,sha256=oaPlXyMsG57XbahVqrZENvGSZy2EefoRCmfpm_6tNEQ,2898
|
46
62
|
kevin_toolbox/data_flow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
47
63
|
kevin_toolbox/data_flow/core/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
48
|
-
kevin_toolbox/data_flow/core/cache/__init__.py,sha256=
|
49
|
-
kevin_toolbox/data_flow/core/cache/cache_manager_for_iterator.py,sha256=
|
64
|
+
kevin_toolbox/data_flow/core/cache/__init__.py,sha256=xA92Lpp3iOdqsiDl-vA-93rLT-vLP29OInnpIWZ6Yn8,67
|
65
|
+
kevin_toolbox/data_flow/core/cache/cache_manager_for_iterator.py,sha256=DqTNiZbnLWv0BjQMoUV5-tiqTcsIBJetjZ7BwYEtNoY,10095
|
66
|
+
kevin_toolbox/data_flow/core/cache/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
67
|
+
kevin_toolbox/data_flow/core/cache/test/test_cache_manager_for_iterator.py,sha256=OjJEEmvWtsGCPFXp2NQP2lpUGFXe9Zr2EpQSfRTDfRI,1147
|
50
68
|
kevin_toolbox/data_flow/core/reader/__init__.py,sha256=i2118MlsNSJHG5u6ZuPcN3NW2LZmYUtDO7dNEdnOncI,146
|
51
|
-
kevin_toolbox/data_flow/core/reader/file_iterative_reader.py,sha256=
|
52
|
-
kevin_toolbox/data_flow/core/reader/unified_reader.py,sha256=
|
53
|
-
kevin_toolbox/data_flow/core/reader/unified_reader_base.py,sha256=
|
69
|
+
kevin_toolbox/data_flow/core/reader/file_iterative_reader.py,sha256=l6UMYnvWwqQm3zEA2g5fDA1oJeKLlbRYnzrRJvuCxBg,10158
|
70
|
+
kevin_toolbox/data_flow/core/reader/unified_reader.py,sha256=l6JxPoDUOdx2ZIPX2WLXbGU3VZtTd1AeHn5q6L8GWAI,2453
|
71
|
+
kevin_toolbox/data_flow/core/reader/unified_reader_base.py,sha256=4gIADdV8UKpt2yD8dZjQsXFcF75nJ83ooIae3D7bw2s,11783
|
54
72
|
kevin_toolbox/data_flow/file/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
55
73
|
kevin_toolbox/data_flow/file/json_/__init__.py,sha256=VAt8COS2tO3PJRuhSc43i35fEOlArFM_YahdTmEBaHE,85
|
56
|
-
kevin_toolbox/data_flow/file/json_/read_json.py,sha256=
|
57
|
-
kevin_toolbox/data_flow/file/json_/write_json.py,sha256=
|
58
|
-
kevin_toolbox/data_flow/file/json_/converter/__init__.py,sha256=
|
74
|
+
kevin_toolbox/data_flow/file/json_/read_json.py,sha256=S-rlY-spIAJVyB-zPQOmKUDdtNAgedSmXHjkY_TNGUE,1808
|
75
|
+
kevin_toolbox/data_flow/file/json_/write_json.py,sha256=mWaxePr_QzfyeCb0hAy4xTKOGX7q0eFjep0jDqOqIgw,2379
|
76
|
+
kevin_toolbox/data_flow/file/json_/converter/__init__.py,sha256=oQMgAgzELLq_f4LIIfz5E6l_E7g4lFsXqfmnJ3tPZTY,401
|
59
77
|
kevin_toolbox/data_flow/file/json_/converter/convert_dict_key_to_number.py,sha256=SuSZj_HCqKZutHAJ5AttABnGBRZplPGQhMxJBt2Wlgc,559
|
60
78
|
kevin_toolbox/data_flow/file/json_/converter/convert_ndarray_to_list.py,sha256=GALpC1MFJ4aMzs0FZIfJScYznfCP-gmhPeM8sWXGSWg,391
|
61
79
|
kevin_toolbox/data_flow/file/json_/converter/escape_non_str_dict_key.py,sha256=83qwH_-v4A5UvSxdctE1TBdxw8PFewoctKEX5nECNG8,809
|
62
|
-
kevin_toolbox/data_flow/file/json_/converter/
|
80
|
+
kevin_toolbox/data_flow/file/json_/converter/escape_tuple_and_set.py,sha256=u4i8bG0Hgszh-3lEsmBmP4VWVOfJBfgXRyGxm1L3PvA,763
|
63
81
|
kevin_toolbox/data_flow/file/json_/converter/integrate.py,sha256=uEnRMqt4hTCVHL8p3tH7jir7mYSo3vGhZ4WS_Qi4Rms,377
|
64
82
|
kevin_toolbox/data_flow/file/json_/converter/unescape_non_str_dict_key.py,sha256=KDBjxJHn8q9dqM-kbtbUunjpc-6shZypYSyihVtkzgI,808
|
65
|
-
kevin_toolbox/data_flow/file/json_/converter/
|
83
|
+
kevin_toolbox/data_flow/file/json_/converter/unescape_tuple_and_set.py,sha256=3vCFr6CtNZxiVR1nRVDcuodIzHRfrmDsvBPCWtnWtBs,814
|
66
84
|
kevin_toolbox/data_flow/file/kevin_notation/__init__.py,sha256=g9UUF9nJrOMc0ndCwVROQLsux4Or2yVMJMdhK5P9nRc,259
|
67
85
|
kevin_toolbox/data_flow/file/kevin_notation/converter.py,sha256=5k_Yxw-fBKEkxFG0bnl1fRsz06MlUS-4f3gZ--bmDs8,3621
|
68
|
-
kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py,sha256=
|
86
|
+
kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_reader.py,sha256=iN6nV8mMbifTbECNmjc-G2pzpxivhks5kCXGVdvS9fQ,8297
|
69
87
|
kevin_toolbox/data_flow/file/kevin_notation/kevin_notation_writer.py,sha256=dyzkufi_SM-uU7cyI3yLFd8U4GnyRR5pyS88op6mhRY,16331
|
70
|
-
kevin_toolbox/data_flow/file/kevin_notation/read.py,sha256=
|
88
|
+
kevin_toolbox/data_flow/file/kevin_notation/read.py,sha256=w0RE0WwTmWycEozJVshAiE0gMBxproBRwBEMLS6tB6c,544
|
71
89
|
kevin_toolbox/data_flow/file/kevin_notation/write.py,sha256=gPabz_h2mtXqCTyBVzip_QSb6L4tsrNSqibFzuqsIv8,556
|
72
90
|
kevin_toolbox/data_flow/file/kevin_notation/test/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
73
|
-
kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py,sha256=
|
91
|
+
kevin_toolbox/data_flow/file/kevin_notation/test/test_kevin_notation.py,sha256=ab402r5LGyNz4XW2SnjvicNtQqBAAHZTaGfYMNdMExI,7345
|
74
92
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
75
93
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_0.py,sha256=CKRb86O3JV9lkGrMtyJzEH041o0xABfT32Zo4GQ5Qis,324
|
76
94
|
kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_1.py,sha256=Xs8oFJqwi0uPOJewulij7DY0iMEp6dWBMiiDIwPlm4s,176
|
@@ -78,7 +96,7 @@ kevin_toolbox/data_flow/file/kevin_notation/test/test_data/data_all.py,sha256=cv
|
|
78
96
|
kevin_toolbox/data_flow/file/markdown/__init__.py,sha256=iTZTBvcEUehBdcWxzFQEW4iEcXbAQkdkEmENiGtBjqs,125
|
79
97
|
kevin_toolbox/data_flow/file/markdown/generate_link.py,sha256=9okSyCFIDQW5T35a6-epVyoCkCL1vFH5215P5MRXfYk,304
|
80
98
|
kevin_toolbox/data_flow/file/markdown/generate_list.py,sha256=Gv5BcqWE4M4w8ADN8NX5LyD9DxILXTQtJvcazi_NuyE,1006
|
81
|
-
kevin_toolbox/data_flow/file/markdown/generate_table.py,sha256=
|
99
|
+
kevin_toolbox/data_flow/file/markdown/generate_table.py,sha256=Ct2gfnciBv0GGZHOKlIHyTlE7KqXsL0L5vBRCrQnOpI,7209
|
82
100
|
kevin_toolbox/developing/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
|
83
101
|
kevin_toolbox/developing/general_matrix_multiplication.py,sha256=Ie9c8mYBYR-Bg7CjU4L1dsOxXsxnx1jz-rA7_ez7vjg,2089
|
84
102
|
kevin_toolbox/developing/test.py,sha256=6Y23SY3FJVrvZmiiXKNPKv84lhVRW-XyjNeecj9lLYA,241
|
@@ -190,25 +208,25 @@ kevin_toolbox/math/transform/dct/dct_calculator.py,sha256=4goxXUMvYF3gkDH-lLFwX8
|
|
190
208
|
kevin_toolbox/math/transform/dct/generate_dct_trans_matrix.py,sha256=za6eaq0QoxZSiCj-hZ2dYjvpxMXcNABAHbVig811ER4,4305
|
191
209
|
kevin_toolbox/math/transform/scaling_and_shift/__init__.py,sha256=UXJcL7hyz1ag5rzz5eTvua36i76P4L2M94hhfV436pI,29
|
192
210
|
kevin_toolbox/math/transform/scaling_and_shift/scaling.py,sha256=HypsgC1KYsUmti6I0nEYzQpL1_343hXtfppDJ3ucje0,1280
|
193
|
-
kevin_toolbox/math/utils/__init__.py,sha256=
|
211
|
+
kevin_toolbox/math/utils/__init__.py,sha256=ceXYQaTpFeQD2QPutLz__bJlq3ECNbHUCnoLGUPHKok,289
|
194
212
|
kevin_toolbox/math/utils/convert_dtype.py,sha256=WW8KE5NlkjZ76BM48_cRClm41lZRybe6xnBBc4qEY70,1943
|
195
213
|
kevin_toolbox/math/utils/get_crop_by_box.py,sha256=oiM14a0jsyxOnVn5n0pU0chdNRc5VOw3_KbS7CArdfw,1620
|
196
214
|
kevin_toolbox/math/utils/get_function_table_for_array_and_tensor.py,sha256=hZrXb3427SMyMsUBcz5DWF2FhV-bSWzBqx5cvrvk_8w,1553
|
197
215
|
kevin_toolbox/math/utils/set_crop_by_box.py,sha256=NzW7M26Av097RchLUAhaO84ETLV121uxsNot_U6otLw,1775
|
198
|
-
kevin_toolbox/math/utils/
|
216
|
+
kevin_toolbox/math/utils/split_integer_most_evenly.py,sha256=6hTWKXYx3YlotNMaw8cmecWO0A4C_Ny2kxgN9asiN9A,345
|
199
217
|
kevin_toolbox/nested_dict_list/__init__.py,sha256=ALcn1tYdBdDWUHyIQj588UfHgrAwbUcZu_bN2v-cEAc,333
|
200
218
|
kevin_toolbox/nested_dict_list/copy_.py,sha256=MvzNRKm8htYpMe7Td1ao2-ZoaYVC_iNTG7O2SBVrJKE,6144
|
201
219
|
kevin_toolbox/nested_dict_list/count_leaf_node_nums.py,sha256=l67u47EvO1inoGinUqH6RZ7cHXwN0VcBQPUvSheqAvA,614
|
202
220
|
kevin_toolbox/nested_dict_list/get_hash.py,sha256=Ygadnn5dnvIeE-9t39p2EwNKNRLzomL37ZsRD5daXxo,1286
|
203
|
-
kevin_toolbox/nested_dict_list/get_nodes.py,sha256=
|
221
|
+
kevin_toolbox/nested_dict_list/get_nodes.py,sha256=doEcLPYOig4gGloGXEPlroXFcRWe5ovuH0RozsxYZ0U,3748
|
204
222
|
kevin_toolbox/nested_dict_list/get_value.py,sha256=isvUhqSQyUNHBXgNuZX6_o2c84UV_SpjNjAYm2M3gd4,2083
|
205
|
-
kevin_toolbox/nested_dict_list/set_default.py,sha256=
|
223
|
+
kevin_toolbox/nested_dict_list/set_default.py,sha256=laSgGP1CbApNgFB9HZGCtxCG9fe7u1C-YOx9ZCoHJms,3460
|
206
224
|
kevin_toolbox/nested_dict_list/set_value.py,sha256=pmSWzC0y0jBxk7yritsjKU2Q-PPMar0X3A9bF6uWvoQ,3470
|
207
225
|
kevin_toolbox/nested_dict_list/traverse.py,sha256=5_EirnYVy34JLfXxuTvb-mMjDeO1veyfLOcaVYcuGF8,6846
|
208
226
|
kevin_toolbox/nested_dict_list/name_handler/__init__.py,sha256=P_pWq78oN6NdvWg2h6AduW_sUqbeaaVyoWWbW9kbgmU,107
|
209
|
-
kevin_toolbox/nested_dict_list/name_handler/build_name.py,sha256=
|
227
|
+
kevin_toolbox/nested_dict_list/name_handler/build_name.py,sha256=VPWyjE8i8l-4Zm4tkD06Ie4J2NCsmI32ecOxZQqqmok,989
|
210
228
|
kevin_toolbox/nested_dict_list/name_handler/escape_node.py,sha256=niT9MxmsyrSZYhKXlWzdoKXVYhWRCR-kmQBkZopznpA,1163
|
211
|
-
kevin_toolbox/nested_dict_list/name_handler/parse_name.py,sha256=
|
229
|
+
kevin_toolbox/nested_dict_list/name_handler/parse_name.py,sha256=vUlAXPocpVSxtb3EnRi7U5K40Tz9plFG-_sbwLfYiy4,2280
|
212
230
|
kevin_toolbox/nested_dict_list/serializer/__init__.py,sha256=xLDfzSZIDNBssHArUEK84gF6WZFR64qJy0iOpM8LbP8,92
|
213
231
|
kevin_toolbox/nested_dict_list/serializer/enum_variable.py,sha256=RWPydtXI4adOJYGo_k5CWHSL0Odzj_bsahb24p1ranY,847
|
214
232
|
kevin_toolbox/nested_dict_list/serializer/read.py,sha256=8196AZW3y1eZNguw5fDi5gQmOtpJ0MdqhRNHZ5EWYHI,2577
|
@@ -233,15 +251,22 @@ kevin_toolbox/nested_dict_list/value_parser/parse_references.py,sha256=G470xNzrR
|
|
233
251
|
kevin_toolbox/patches/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
234
252
|
kevin_toolbox/patches/for_logging/__init__.py,sha256=xymF6mjwY4Cin7CoEwanFY5ZVk8oY0pDLqjZAGa7_Rg,39
|
235
253
|
kevin_toolbox/patches/for_logging/build_logger.py,sha256=0UoRMKaERd8wlHGTiNR3dbLQRAtXcb0QZuGkX2oFgGo,3071
|
236
|
-
kevin_toolbox/patches/for_matplotlib/__init__.py,sha256=
|
254
|
+
kevin_toolbox/patches/for_matplotlib/__init__.py,sha256=iFN3eCUhKN_QbnAiYSc7dPNLmjhjo7i9D2OdLprEdOw,180
|
237
255
|
kevin_toolbox/patches/for_matplotlib/add_trajectory_2d.py,sha256=mKXRUNJiEZBcff3pAkwL_gcKGn55CLRhYCTSd3fj1Go,1837
|
238
256
|
kevin_toolbox/patches/for_matplotlib/add_trajectory_3d.py,sha256=VGlZfVY0xhUBOUzWJVPxZZNHHRvWLR0HZzhADA_cbsU,1696
|
239
257
|
kevin_toolbox/patches/for_matplotlib/arrow3d.py,sha256=JSnNMr1hU2N4FUX526I4MDr04mksDgu4VuegYFDxk1Q,1361
|
258
|
+
kevin_toolbox/patches/for_matplotlib/generate_color_list.py,sha256=byGZiehbPMUz4DnMtAUbjLL6UADahWEA4vBbaneDPH8,984
|
240
259
|
kevin_toolbox/patches/for_numpy/__init__.py,sha256=SNjZGxTRBn-uzkyZi6Jcz-9juhhZKT8TI70qH-fhGGc,21
|
241
|
-
kevin_toolbox/patches/for_numpy/linalg/__init__.py,sha256=
|
260
|
+
kevin_toolbox/patches/for_numpy/linalg/__init__.py,sha256=TH-M0Orrakyf9S9A8FiDf3zLHY24gP2SGGTuNmLhDP4,128
|
242
261
|
kevin_toolbox/patches/for_numpy/linalg/cos_similar.py,sha256=bFkfDwrW3maXq5i9ZABidKfg8ZdEdXfFgNzW_uygrM4,423
|
262
|
+
kevin_toolbox/patches/for_numpy/linalg/entropy.py,sha256=PSdwkzySvWF4h4Xi27w2kvLq5WAeM_ysLstPFNBMoX8,1080
|
243
263
|
kevin_toolbox/patches/for_numpy/linalg/normalize.py,sha256=7qstt__rwUkk3jRJOQoneBp9YdfhYQtWfh6PZoWbvaA,625
|
244
264
|
kevin_toolbox/patches/for_numpy/linalg/softmax.py,sha256=M4a3jyKZBMFdiC_sPqO7AVts6AnEju8WbLc_GNSEtQ4,2095
|
265
|
+
kevin_toolbox/patches/for_numpy/random/__init__.py,sha256=f1nOm2jr-4x5ZW80S5VzvIAtag0aQTGiYVzxgGG1Oq8,149
|
266
|
+
kevin_toolbox/patches/for_numpy/random/get_rng.py,sha256=QblrMKg4OFVy-C4A6rQ-zq26uDKzhMifKTFUlyW3Ksw,1999
|
267
|
+
kevin_toolbox/patches/for_numpy/random/truncated_multivariate_normal.py,sha256=ZOaFZrzFI-ty7oRwUXxLx7pJMLTPPAAN28_AM6LeUDk,5859
|
268
|
+
kevin_toolbox/patches/for_numpy/random/truncated_normal.py,sha256=uej3SQnLu0HsBTD47Yrgft1NpnsoEIOm925H9ipS8UQ,3726
|
269
|
+
kevin_toolbox/patches/for_numpy/random/variable.py,sha256=Sam-QZgkx9_IvHzZhpUrXld0izP5MZfMBiM8qRWcB6M,231
|
245
270
|
kevin_toolbox/patches/for_optuna/__init__.py,sha256=5ZVEXbL6zp6a0rqH2LPsiErZrgpcILWUEtTyK31gzSY,249
|
246
271
|
kevin_toolbox/patches/for_optuna/build_sampler.py,sha256=0gRv2vPLyr71mlnTi2cJ4_SxO8WAyQOGL8DXiY7o2Es,1705
|
247
272
|
kevin_toolbox/patches/for_optuna/build_storage.py,sha256=kGY7fsWroFJ4TQUGy5j_qG5xDuapdB0H5dy2IKSJoYw,3327
|
@@ -250,7 +275,7 @@ kevin_toolbox/patches/for_optuna/copy_study.py,sha256=neBGpGuNhVQB5R5wtHem48A2hq
|
|
250
275
|
kevin_toolbox/patches/for_optuna/sample_from_feasible_domain.py,sha256=-Ckwo2N4vhWr08F7ROLfwLWIx4ERwdwn4Q5Ft2JRm7g,7071
|
251
276
|
kevin_toolbox/patches/for_optuna/serialize/__init__.py,sha256=7WTrwFsW1xnW85zECUQtPTRqVUdPU9V1L8UWrFZyyms,35
|
252
277
|
kevin_toolbox/patches/for_optuna/serialize/for_study/__init__.py,sha256=YSROCv89O84gzzRP2NfVl0Xhd4_RsdoqU3Nnr-vhWhk,46
|
253
|
-
kevin_toolbox/patches/for_optuna/serialize/for_study/dump.py,sha256=
|
278
|
+
kevin_toolbox/patches/for_optuna/serialize/for_study/dump.py,sha256=eUEVtLeD4qDXL64OCaVgHWbALn3ibOAhf2YkdNNEQqg,2088
|
254
279
|
kevin_toolbox/patches/for_optuna/serialize/for_study/load.py,sha256=DwnDheJx5IJpVfrR5j4ehyW-jENMe7lL6KbcdDPYw_k,1818
|
255
280
|
kevin_toolbox/patches/for_optuna/serialize/for_trial/__init__.py,sha256=YSROCv89O84gzzRP2NfVl0Xhd4_RsdoqU3Nnr-vhWhk,46
|
256
281
|
kevin_toolbox/patches/for_optuna/serialize/for_trial/dump.py,sha256=FT-Z1rzCNUYz5St1Yc0bfDWAV10WaV41rlbWIS72Jp0,982
|
@@ -277,7 +302,7 @@ kevin_toolbox/patches/for_torch/math/get_y_at_x.py,sha256=bfoVcasZ_tMdhR_1Me0Jli
|
|
277
302
|
kevin_toolbox/patches/for_torch/math/my_around.py,sha256=ptpU3ids50gwf663EpHbw7raj9tNrDGBFZ5t_uMNH14,1378
|
278
303
|
kevin_toolbox/patches/for_torch/nn/__init__.py,sha256=aJs3RMqRzQmd8KKDmQW9FxwCqS5yfPqEdg-m0PwlQro,39
|
279
304
|
kevin_toolbox/patches/for_torch/nn/lambda_layer.py,sha256=KUuLiX_Dr4bvRmpAaCW5QTDWDcnMPRnw0jg4NNXTFhM,223
|
280
|
-
kevin_toolbox_dev-1.3.
|
281
|
-
kevin_toolbox_dev-1.3.
|
282
|
-
kevin_toolbox_dev-1.3.
|
283
|
-
kevin_toolbox_dev-1.3.
|
305
|
+
kevin_toolbox_dev-1.3.3.dist-info/METADATA,sha256=LkQQ3jJCLlHGvHeAnCCGC_uiNz6qoWLFNSt_K00N0qs,2228
|
306
|
+
kevin_toolbox_dev-1.3.3.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
|
307
|
+
kevin_toolbox_dev-1.3.3.dist-info/top_level.txt,sha256=S5TeRGF-PwlhsaUEPTI-f2vWrpLmh3axpyI6v-Fi75o,14
|
308
|
+
kevin_toolbox_dev-1.3.3.dist-info/RECORD,,
|
@@ -1,20 +0,0 @@
|
|
1
|
-
def escape_tuple(x):
|
2
|
-
"""
|
3
|
-
将 tuple 进行转义
|
4
|
-
转义: x ==> f"<eval>{x}"
|
5
|
-
反转义: f"<eval>{x}" ==> x
|
6
|
-
|
7
|
-
为什么要进行转义?
|
8
|
-
由于 json 中会将 tuple 作为 list 进行保存,因此在保存过程中会丢失相应信息。
|
9
|
-
"""
|
10
|
-
if isinstance(x, tuple) or (isinstance(x, (str,)) and x.startswith("<eval>")):
|
11
|
-
return f'<eval>{x}'
|
12
|
-
else:
|
13
|
-
return x
|
14
|
-
|
15
|
-
|
16
|
-
if __name__ == '__main__':
|
17
|
-
print(escape_tuple((1, 2, "\'1\'")))
|
18
|
-
# <eval>(1, 2, "'1'")
|
19
|
-
print(escape_tuple("<eval>233"))
|
20
|
-
# <eval><eval>233
|
@@ -1,91 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: kevin-toolbox-dev
|
3
|
-
Version: 1.3.1
|
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
|
-
Classifier: License :: OSI Approved :: MIT License
|
12
|
-
Classifier: Programming Language :: Python
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
-
Requires-Python: >=3.6
|
15
|
-
Description-Content-Type: text/markdown
|
16
|
-
Requires-Dist: torch (>=1.2.0)
|
17
|
-
Requires-Dist: numpy (>=1.19.0)
|
18
|
-
Provides-Extra: plot
|
19
|
-
Requires-Dist: matplotlib (>=3.0) ; extra == 'plot'
|
20
|
-
Provides-Extra: rest
|
21
|
-
Requires-Dist: pytest (>=6.2.5) ; extra == 'rest'
|
22
|
-
Requires-Dist: line-profiler (>=3.5) ; extra == 'rest'
|
23
|
-
|
24
|
-
# kevin_toolbox
|
25
|
-
|
26
|
-
一个通用的工具代码包集合
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
环境要求
|
31
|
-
|
32
|
-
```shell
|
33
|
-
numpy>=1.19
|
34
|
-
pytorch>=1.2
|
35
|
-
```
|
36
|
-
|
37
|
-
安装方法:
|
38
|
-
|
39
|
-
```shell
|
40
|
-
pip install kevin-toolbox --no-dependencies
|
41
|
-
```
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
[项目地址 Repo](https://github.com/cantbeblank96/kevin_toolbox)
|
46
|
-
|
47
|
-
[使用指南 User_Guide](./notes/User_Guide.md)
|
48
|
-
|
49
|
-
[免责声明 Disclaimer](./notes/Disclaimer.md)
|
50
|
-
|
51
|
-
[版本更新记录](./notes/Release_Record.md):
|
52
|
-
|
53
|
-
- v 1.3.1 (2024-01-05)【new feature】【bug fix】
|
54
|
-
- nested_dict_list
|
55
|
-
- 【new feature】add set_default(),该方法实现了类似于 dict.setdefault() 的行为,当 name 指向的位置在 var 中不存在时,将会把 default 插入到对应的位置。
|
56
|
-
- 添加了测试用例。
|
57
|
-
|
58
|
-
- patches.for_optuna
|
59
|
-
|
60
|
-
- 【new feature】add build_sampler(),用于从配置构建采样优化算法实例
|
61
|
-
|
62
|
-
- 【new feature】add build_storage(),用于从配置构建数据库实例
|
63
|
-
|
64
|
-
- 【new feature】add build_study(),用于从配置构建实验
|
65
|
-
|
66
|
-
- 【new feature】add copy_study(),用于复制实验。
|
67
|
-
|
68
|
-
- 该函数改进自 optuna.copy_study,但是支持更多复制方式:内存与静态数据库之间,内存到内存,静态数据库到静态数据库等等。
|
69
|
-
|
70
|
-
- 【new feature】add serialize,新增序列化模块,用于将 optuna 中的 trial、study 对象序列化为可以使用 json 或者 ndl 保存的结构。包含以下子模块:
|
71
|
-
|
72
|
-
- for_trial,包含 dump() 和 load() 方法。
|
73
|
-
|
74
|
-
- for_study,包含 dump() 和 load() 方法。
|
75
|
-
|
76
|
-
- 添加了对应的测试用例。
|
77
|
-
|
78
|
-
- patches.for_numpy.linalg
|
79
|
-
|
80
|
-
- 【bug fix】fix bug in softmax(),修复了当输入的概率分布是整数类型时会引发的异常。
|
81
|
-
|
82
|
-
- computer_science.algorithm.pareto_front
|
83
|
-
|
84
|
-
- modify get_pareto_points_idx(),增加了枚举类型 Direction 用于检查函数的 directions 参数,让其对异常输入能够及时报错。
|
85
|
-
|
86
|
-
- patches
|
87
|
-
|
88
|
-
- 【new feature】add module for_logging,内含 build_logger() 函数用于构建 logger,并注册到给定的 registry 空间中。
|
89
|
-
- 添加了对应的测试用例。
|
90
|
-
|
91
|
-
|
File without changes
|
File without changes
|