Useful utilities I re-use in multiple projects
Project description
eli_utils
Install
pip install 'git+https://github.com/elifriedman/eli_utils.git'
How to use
Plotting Utils
from PIL import Image
import numpy as np
from eli_utils import imshow, image_grid
image1 = Image.open("file1.png")
image2 = np.zeros((128, 128, 3))
image3 = np.ones((128, 128, 3))
imshow(image3)
image_grid([image1, image2], shape=(2, 1))
IO Utils
from eli_utils import load_json, save_json
my_dict = {"a": 1, "b": 2}
save_json(my_dict, 'file.json')
loaded_dict = load_json('file.json')
Video Utils
from eli_utils import get_video_properties, load_frames
frames = load_frames("myvideo.mp4")
frame_count, fps, duration = get_video_properties("myvideo.mp4")
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
eli_utils-0.0.13.tar.gz
(5.9 kB
view hashes)
Built Distribution
Close
Hashes for eli_utils-0.0.13-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3592939e825c5cc6d5513f4a7a414dc2bfe64760b200e662a3f5721f911c8069 |
|
MD5 | 34e9a2e262cb0651db5552122c366813 |
|
BLAKE2b-256 | 3b824a7630dce320fba9de7e1952bb4f1064f5b9a92589248426ea5a4cedea0e |