Skip to main content

Making our programing more efficient.

Project description

utils4ymc Version MIT License

Making our programing more efficient.

utils4ymc 是一个Yummy Chen为自己提高效率,复用代码的库。

示例

Decos装饰器工具

  • 记录函数运行时间工具 logger
@logger(log_path)
def func(*args):
    pass
  • 检查参数的输入类型
@type_assert(*types)
def func(*args):
    pass
  • 忽略错误
@omit_exception(hadle_func)
def func(*args):
	pass
  • 出错重试
@retry()
def func(*args):
    pass

Tools 计算工具

  • One-hot

  • dist 计算两个高阶向量的距离,支持L1、L2距离。

a = np.random.randn(4,3)
b = np.random.randn(2,3)
dist = dist(a, b) # (4, 2)

使用方式

from utils4ymc import *

安装

$ pip install utils4ymc

目录树

. ├── LICENSE ├── README.md ├── setup.cfg ├── setup.py └── utils4ymc ├── Decos │   ├── init.py │   ├── check_args.py │   └── decorators.py ├── Tools │   ├── init.py │   ├── calculate.py │   └── file.py └── init.py

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

utils4ymc-0.1.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

utils4ymc-0.1.2-py3-none-any.whl (6.4 kB view details)

Uploaded Python 3

File details

Details for the file utils4ymc-0.1.2.tar.gz.

File metadata

  • Download URL: utils4ymc-0.1.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for utils4ymc-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a2d9423a5063979396018dccc9650722287989345ef9db07728ea87feeef5876
MD5 dc04e4a1dffe69b63946bf85bbf97fef
BLAKE2b-256 388f8decdb374a4f9eb4ee129480646152f7c328595e2da9b7efdf903976c041

See more details on using hashes here.

File details

Details for the file utils4ymc-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: utils4ymc-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 6.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/44.0.0.post20200106 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.8

File hashes

Hashes for utils4ymc-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3cdc4d5f0dd76ae7ae19efccbe861a815fe08003881fccf8bc7abb15f4a8618
MD5 04c4ee96d737fd512f785c443f2f2ab4
BLAKE2b-256 ef19e0414b7f723aaf62c86ed7a5670882989dcbcffc201ebfcf8880290fc84d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page