一个常用的工具代码包集合
Project description
kevin_toolbox
一个通用的工具代码包集合
环境要求
numpy>=1.19
pytorch>=1.2
安装方法:
pip install kevin-toolbox --no-dependencies
-
v 1.4.8 (2025-03-06)【new feature】【refactor】
- 【new feature】network,新增网络模块。
- 该模块包含网络访问相关的函数:
- get_response(),获取 url 的响应。
- fetch_metadata(),从 URL/response 中获取文件名、后缀(扩展名)、大小等元信息。
- fetch_content(),从 URL/response 中获取内容。
- download_file(),下载文件。
- 该模块包含网络访问相关的函数:
- env_info
- modify Env_Vars_Parser.parse(),新增 default 参数用于支持解释失败时候返回默认值。
- computer_science.algorithm
- 【refactor】【new feature】decorator,从 developing 中将装饰器相关模块整合到 cs.algorithm 中。
- 该目录目前包含以下函数:
- retry(),在函数执行失败时,等待一定时间后重试多次。
- restore_original_work_path(),在运行函数 func 前备份当前工作目录,并在函数运行结束后还原到原始工作目录。
- 该目录目前包含以下函数:
- registration
- 【new feature】add Serializer_for_Registry_Execution,用于对基于 Registry 中成员构建的执行过程进行序列化和反序列化操作。
- 【refactor】【new feature】decorator,从 developing 中将装饰器相关模块整合到 cs.algorithm 中。
- nested_dict_list.serializer
- modify write(),增加返回值,返回保存到的路径。
- patches.for_matplotlib
- 【new feature】add COMMON_CHARTS,增加该注册器用于管理 common_charts 模块中的方法。
- common_charts
- 为所有plot_xx函数增加了注释和测试用例。
- 为所有plot_xx函数增加以下参数:
- b_generate_record:是否保存函数参数为档案。
- 默认为 False,当设置为 True 时将会把函数参数保存成 [output_path].record.tar。
- 后续可以使用 plot_from_record() 函数或者 Serializer_for_Registry_Execution 读取该档案,并进行修改和重新绘制。
- 该参数仅在 output_dir 和 output_path 非 None 时起效。
- output_path:图片输出路径。
- 支持直接指定图片要保存的路径,在原有的通过 output_dir 和 title 自动生成路径的方式之外,提供了另一个指定的方式。
- b_generate_record:是否保存函数参数为档案。
- 【new feature】add plot_from_record,从保存的档案 .record.tar 文件中恢复并绘制图像。
- 【new feature】network,新增网络模块。
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kevin-toolbox-dev-1.4.8.tar.gz
(206.7 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 kevin-toolbox-dev-1.4.8.tar.gz.
File metadata
- Download URL: kevin-toolbox-dev-1.4.8.tar.gz
- Upload date:
- Size: 206.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
82849c765190b8dc498540446864a17129fe8db7174d5d7b9b28129cc14dea32
|
|
| MD5 |
79286fa7c9210d8f83a652f88646e7eb
|
|
| BLAKE2b-256 |
f045a540e7e0237deae7782a40667305f01c42192bda154a19f4bc8b7b10bbea
|
File details
Details for the file kevin_toolbox_dev-1.4.8-py3-none-any.whl.
File metadata
- Download URL: kevin_toolbox_dev-1.4.8-py3-none-any.whl
- Upload date:
- Size: 376.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.7.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d9c03f00e93d6535f8e9545fc640fe28258a541fbcbcae9dac09e6d233582c3
|
|
| MD5 |
3add4a2dba5d7bcf1b0f31867f8bf086
|
|
| BLAKE2b-256 |
3fb7032ecd9c4df8419210f9d4601004d54520a8db267810e6aa49ad8c1da310
|