(Github | PyPI | Documentation)
A toolbox of utility functions I commonly use when programming in Python. Includes mostly machine learning utilities.
The full API consists of importable functions from modules located in src/rsbox/
. Functions are documented via docstrings under the function header. An HTML front-end documentation for the API is available here.
$ pip install rsbox
Here are some highlighted functions:
import rsbox
from rsbox import ml, misc
ml.print_model_size(pytorch_net)
current_time_in_string = misc.timestamp()
dataset = ml.image_dir_to_data(dirpath="./data", extension='png')
img_np_array = ml.get_img(url='https://stanford.edu/~rsikand/assets/images/seal.png')
ml.plot(img_np_array)
The modules are located in src/rsbox/
ml.py
: machine learning programming utilities.misc.py
: misc. utilities.