raykit
raykit is a python toolkit including a diverse set of useful functions for fast-prototyping in research, which is developed by Anyi Rao.
For fun only 🏖️
Install with One Line
pip install raykit
Version explanation
raykit with version odd e.g. 0.0.3 is for simple usage, while version even e.g. 0.0.4 is for pytorch-based usage. you can specifiy it with e.g.
pip install raykit==0.0.3
Requirements pytorch is needed for even number version.
How to Use
For laziness
from raykit.package import *
Usually when we start a python program, we need to import a lot of packages such as argparse, os, os.path as osp, numpy as np etc. Just simply use from raykit.package import *, you get all.
Basic folder operation
When you are at the terminal, you want to check a file quickly but you don't have a GUI. Use the following. With read_txt_list, read_json, read_pkl, you read a txt as list or a json as dict or a pickle as it be. mmcv have the the similar functionalities, such as mmcv.load('test.json'), mmcv.load('test.yaml'), mmcv.load('test.pkl') but do not load txt.
With write_txt_list, write_json, write_pkl, you write as vice versa as above.
With get_folder_list, you os.listdir and output the list to a desired location.
With mkdir_ifmiss, you do not need to use os.makedirs(,exist_ok=True).
Others
With strcal(string,num,fill) you are able to calculate a string type data and a float or int number and zfill it.
Pytorch
to_numpy and to_torch quickly transfer the datatype.
Reference
Metadata
Release files for raykit 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| raykit-0.0.6.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| raykit-0.0.6-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 13.3 kB
Release files / raykit-0.0.6.tar.gz
| Download URL | raykit-0.0.6.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
80b5e11a2c8a26ca32559a19ddeefee32f54c30ce0b360feb4e92891710de8e6
|
|
BLAKE2b-256 checksum How to use checksums |
3dd98fb5fa4180f4b53e9908a4490fc948cf46b77a6c45e04ef4af82b926d31f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|
Release files / raykit-0.0.6-py3-none-any.whl
| Download URL | raykit-0.0.6-py3-none-any.whl |
|---|---|
| Size | 9.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0eebcbaf637c2b297c778b7a698255c0180902a15746aaa23228fff16eb6053a
|
|
BLAKE2b-256 checksum How to use checksums |
0d8720fc86dd2b9bbb5e6174caee244ff4748d953f14dd2e090c929edc1f5eca
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2
|