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

Uploaded Source

Built Distribution

eli_utils-0.0.21-py3-none-any.whl (8.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: eli_utils-0.0.21.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for eli_utils-0.0.21.tar.gz
Algorithm Hash digest
SHA256 bfefcbc43d64b96a21de6bb51274dd6c2966d1a95a9c215f796a2d7fccfea7e2
MD5 963df8478b74a585508772fa79d2b3b7
BLAKE2b-256 8311784deea05576fef3677a8ffb8b1d56b9a6d99a5aa4a1b3cf57443c0a7722

See more details on using hashes here.

File details

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

File metadata

  • Download URL: eli_utils-0.0.21-py3-none-any.whl
  • Upload date:
  • Size: 8.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.11.9

File hashes

Hashes for eli_utils-0.0.21-py3-none-any.whl
Algorithm Hash digest
SHA256 d18075050a6098895cf33a0b5d13613bd53c65324d4c4effbc6d0d77d5b3c46c
MD5 956b28f036ebdea8fef1270c7d4d6b1a
BLAKE2b-256 2dd1b00879fa9633c7fef268d859fd0427d19a102a8bf6c298737c640d6f54d3

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