Skip to main content

A small utilis package

Project description

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 🏖️

Intro

raykit with version odd e.g. 0.0.1 is for simple usage, while version even e.g. 0.0.2s is for pytorch-based usage.

Very Easy to Install

pip install raykit

requirements

numpy, tqdm, pytorch(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.

Pytoch

to_numpy and to_torch quickly transfer the datatype.

Reference

mmcv

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

raykit-0.0.4.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

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

raykit-0.0.4-py3-none-any.whl (8.7 kB view details)

Uploaded Python 3

File details

Details for the file raykit-0.0.4.tar.gz.

File metadata

  • Download URL: raykit-0.0.4.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for raykit-0.0.4.tar.gz
Algorithm Hash digest
SHA256 736ba71d342eb6bcde46f99a4d4ca57288fcc4ea0f198654bec2ca47fc79ff75
MD5 9ae37ea8b75a679b938e8eba12cbf03b
BLAKE2b-256 f71edf232565ee8af56c76fae9b7ffdd1415a636a17dc8c663707bded5ce52f3

See more details on using hashes here.

File details

Details for the file raykit-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: raykit-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 8.7 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/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for raykit-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 680742e0f8bcb4c2763ab4363eccef734739cd1882fd5a61eaf53a1e97c8b44b
MD5 1db70e0409d0c74f23bb8f6364e0c5cc
BLAKE2b-256 b6f3d071ba7910dcec17f984c8d7708dc2b95d9f019322ce05499a8c10223c7b

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