Python
Notes on the Python programming language — testing, async, type hints, and practical patterns.
Build Unix-style command pipelines in Python using subprocess.run with stdout piping for efficient process chaining and output capture.
Create reusable generators by implementing __iter__ in a class, allowing multiple lazy iterations without memory overhead or repeated function calls.
Replace inheritance-based template pattern with composition and Protocol types to create cleaner, testable Python code without namespace pollution.
Modern Python dependency management using pip-tools, hatch, and PEP-621 for web apps and libraries with reproducible builds.
Build a traceroute clone in Python using UDP and ICMP sockets to trace network packet routes and measure hop latency with TTL manipulation.
Sort Django querysets by custom attribute sequences using Case and When expressions for database-level ordering with SQL CASE statements.
Master techniques to remove duplicates from Python iterables while maintaining original order using sets, OrderedDict, and nested deduplication.
Stream real-time server updates to web clients using Server-Sent Events (SSE) as a simpler alternative to WebSockets for unidirectional data flow.
Gracefully shutdown Python's ThreadingTCPServer with signal handlers for SIGINT, SIGTERM handling and client notification on server shutdown.
Poll multiple data sources in a single thread using Python generators with itertools.cycle to alternate between infinite data streams efficiently.
Skip elements in iterables until a condition is met using itertools.dropwhile for efficient lazy evaluation that works with generators.
Build a pausable socket server with Python's socketserver module using threading for intermittent request handling and background tasks.
Connect Jupyter Notebook to Dockerized Django apps using ipykernel and django-extensions for interactive debugging and data exploration.
Use Django query expressions like Replace, Upper, Lower, Concat, and Substr for efficient database-level text manipulation without fetching data.
Display progress bars for concurrent Python tasks using tqdm with ThreadPoolExecutor and as_completed for real-time execution monitoring.