Drill-bits: Handy tools for ML in Python
Project description
Install
pip install drill-bits
Examples
All type read & write:
from drill-bits.io import io_utils
data = io_utils.omni_load(file_name)
io_utils.omni_save(file_name, data)
Currently supported extensions including: .npy, .txt, .pkl, .jpg, .png.
A decorator saves you from reprocessing:
import time
from drill_bits.operation import base_operation
def foo(n):
time.sleep(1)
if n == 1:
return 1
else:
return n * foo(n-1)
opt = BaseOperation(path).get_handle(force_run=False, verbose=True)
foo_warp = opt(foo)
print(foo_warp(5)) # it will take 5s to run
print(foo_warp(5)) # it will finish immediately
opt = BaseOperation(path).get_handle(force_run=True, verbose=True)
foo_warp = opt(foo)
print(foo_warp(5)) # it will take 5s to run again
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
drill_bits-0.0.4.tar.gz
(5.8 kB
view hashes)
Built Distribution
Close
Hashes for drill_bits-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0431be43bc667950c6b56bd3d22a2951523360dabd8d33ce215e5ff70e8754fa |
|
MD5 | fe4e0bf210445cbd11a048d4906f88fe |
|
BLAKE2b-256 | 5c1477dee5100765403c1c93e1b825cd2d7ed803f450c6586e643f82d6e9b74c |