Skip to content

Instantly share code, notes, and snippets.

View jedt's full-sized avatar

jed tiotuico jedt

View GitHub Profile
@jedt
jedt / prompt.md
Created June 3, 2025 14:18
Prompt for adding type hints by deepseek

Task: Add modern Python type hints to the following code. Follow these rules:

  1. Annotate all function parameters and return types
  2. Use built-in generics (e.g., list[str] not List[str])
  3. Use | for unions instead of Union (Python 3.10+ style)
  4. Add -> None for void returns
  5. Import required types ONLY when needed
  6. Preserve original functionality exactly
  7. For ambiguous types, use:
    • Any for completely unknown types
  • TypeVar for generic relationships
@jedt
jedt / rtsp-rtp-sample.py
Created August 28, 2022 08:30 — forked from jn0/rtsp-rtp-sample.py
Sample Python script to employ RTSP/RTP to play a stream from an IP-cam (from stackoverflow)
"""
http://stackoverflow.com/questions/28022432/receiving-rtp-packets-after-rtsp-setup
A demo python code that ..
1) Connects to an IP cam with RTSP
2) Draws RTP/NAL/H264 packets from the camera
3) Writes them to a file that can be read with any stock video player (say, mplayer, vlc & other ffmpeg based video-players)
Done for educative/demonstrative purposes, not for efficiency..!