Code Monkey home page Code Monkey logo

raykit's Introduction

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

raykit changelog, mmcv

raykit's People

Contributors

anyirao avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.