Skip to main content

Utility functions for Jupyter/Colab notebooks

Project description

🧰 tsilva-notebook-utils

🔬 Handy utilities for enhancing your Jupyter and Google Colab notebooks

📖 Overview

tsilva-notebook-utils is a collection of utility functions designed to make working with Jupyter and Google Colab notebooks more efficient. It provides tools for video rendering, notification systems, and Colab-specific features like automatic disconnection after idle periods.

🛠️ Usage

Video Rendering

from tsilva_notebook_utils import render_video

# Render a simple video from frames
frames = [frame1, frame2, frame3]  # List of numpy arrays
video = render_video(frames, fps=30, scale=1.5)
display(video)

# Render frames with labels
labeled_frames = [(frame1, "Start"), (frame2, "Middle"), (frame3, "End")]
video = render_video(labeled_frames, fps=24)
display(video)

# Compare multiple videos side by side
from tsilva_notebook_utils import render_videos
render_videos([(video1_frames, "Original"), (video2_frames, "Processed")])

Google Colab Utilities

from tsilva_notebook_utils import disconnect_after_timeout

# Automatically disconnect Colab after 5 minutes of inactivity
disconnect_after_timeout(timeout_seconds=300)

Notifications

Send notifications to PopDesk notification server:

from tsilva_notebook_utils import send_popdesk_notification

# Send a notification when your long-running notebook task completes
send_popdesk_notification(
    url="https://your-popdesk-url",
    auth_token="your-auth-token",
    title="Training Complete",
    message="Your model has finished training with 95% accuracy"
)

📄 License

This project is licensed under the MIT License.

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

tsilva_notebook_utils-0.0.103.tar.gz (25.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsilva_notebook_utils-0.0.103-py3-none-any.whl (30.6 kB view details)

Uploaded Python 3

File details

Details for the file tsilva_notebook_utils-0.0.103.tar.gz.

File metadata

File hashes

Hashes for tsilva_notebook_utils-0.0.103.tar.gz
Algorithm Hash digest
SHA256 3c7ae44f7d48887b7f0fae17ea7ee654d42e7d5fb9dcffb51f0b23ca025c9168
MD5 bebd9d4c83cae9d1006b59f4494a8697
BLAKE2b-256 d03ede757fc4128f5b3f3f76b59c08ed958610e53bd237b7e3c254a3f5fd39ca

See more details on using hashes here.

File details

Details for the file tsilva_notebook_utils-0.0.103-py3-none-any.whl.

File metadata

File hashes

Hashes for tsilva_notebook_utils-0.0.103-py3-none-any.whl
Algorithm Hash digest
SHA256 f57a4b2754f37b0183cd8bdd7f475d1014d0b4ddb63a88fb4d2af81d11d31ec8
MD5 f137b293fd9ea5e08fd752facee9087c
BLAKE2b-256 79b888ba7021108a07ec501a44127d0e4642ab60f1a6a1493a4a15b60b7a2e9d

See more details on using hashes here.

Supported by

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