Skip to main content

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


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.9.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

eli_utils-0.0.9-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

File details

Details for the file eli_utils-0.0.9.tar.gz.

File metadata

  • Download URL: eli_utils-0.0.9.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

Hashes for eli_utils-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c815af958c02cf990e52c09e30dc986c8fc4117a69d8ec7d1eebacc7cc13eaeb
MD5 5466f13619c0857a9579821ad0f34765
BLAKE2b-256 732a74ec53f957b2e7c07b8cb2f0fc15a6d2fded4f8a4100e708e5f0a5789774

See more details on using hashes here.

File details

Details for the file eli_utils-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: eli_utils-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for eli_utils-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 d83ca5a9dcbee5e536ddf74e3d89745f81b94eea86802528fb43b92065564098
MD5 78aa9a5710f8ff05320ffce82c495b32
BLAKE2b-256 68b9da7a86a2c8a072eefbc3516edb74fead712547d154361c2d688419a7f014

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page