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.7.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file eli_utils-0.0.7.tar.gz
.
File metadata
- Download URL: eli_utils-0.0.7.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dc446450f0b218c299b06310992078edb7133c24369cfa3ba8dd1a9ebdee302 |
|
MD5 | 04ce6d779ab635104876a2cec354e284 |
|
BLAKE2b-256 | 0ff7c56e7a48a3d35975417d10027748c1b09dd044be7e5aa712a48c220c3e2f |
File details
Details for the file eli_utils-0.0.7-py3-none-any.whl
.
File metadata
- Download URL: eli_utils-0.0.7-py3-none-any.whl
- Upload date:
- Size: 6.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ad254a65a83b0eb23223866c4b0ad4ffd94c9613a0c63b4268dcf6b3027456a8 |
|
MD5 | ed4cadc4bdb42c5f4e4e20f4d6ae7f1c |
|
BLAKE2b-256 | db0e0592cfdbf35be23d6c6e07fa05db0eec4ded814c9682af92d4aac2accd90 |