News & links about Python programming. https://pythonhub.dev/ Administrator: @rukeba
From Boring Object-Oriented to INSANE Functional Code
This video demonstrates that there's a place for both object-oriented and functional code. In Python, these two approaches can be combined effectively, allowing you to leverage the strengths of each for the best results.
https://www.youtube.com/watch?v=DvdZv_DD0DY
Automating Boolean-Based SQL Injection with Python
How to be efficiently lazy at finding hidden gems in predictable places – Database Edition.
https://trebledj.me/posts/automating-boolean-sql-injection-with-python/
Deep-Live-Cam
Real time face swap and one-click video deepfake with only a single image.
https://github.com/hacksider/Deep-Live-Cam
CSVs Are Kinda Bad. DSVs Are Kinda Good.
The article argues that CSVs (Comma-Separated Values) are problematic due to various edge cases involving delimiters, quotes, and newlines, and proposes using Delimiter-Separated Values (DSV) with ASCII control characters as a more robust alternative. It demonstrates how DSVs can handle complex data without escaping or quoting issues, but acknowledges that the lack of widespread tool sup...
https://matthodges.com/posts/2024-08-12-csv-bad-dsv-good/
emval
emval is a blazingly fast Python email validator written in Rust.
https://github.com/bnkc/emval
FlexAttention: The Flexibility of PyTorch with the Performance of FlashAttention
https://pytorch.org/blog/flexattention/
Django: create sub-commands within a management command
https://adamj.eu/tech/2024/08/14/django-management-command-sub-commands/
AgentK
An autoagentic AGI that is self-evolving and modular.
https://github.com/mikekelly/AgentK
Python Hub Weekly Digest for 2024-08-18
https://pythonhub.dev/digest/2024-08-18/
alexta69 / metube
Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp)
https://github.com/alexta69/metube
dir-assistant
Chat with your current directory's files using a local or API LLM.
https://github.com/curvedinf/dir-assistant/
GIL Become Optional in Python 3.13
https://geekpython.in/gil-become-optional-in-python
A Knownbits Abstract Domain for the Toy Optimizer, Correctly
The article discusses the implementation of a "Knownbits" abstract domain for the Toy optimizer, which tracks individual bits of a variable as "known zero," "known one," or "unknown" to optimize integer operations. It details the construction of the domain, transfer functions, and correctness proofs using property-based testing and automated proofs, with plans to apply a more complex ver...
https://pypy.org/posts/2024/08/toy-knownbits.html
Python extensions should be lazy
https://www.gauge.sh/blog/python-extensions-should-be-lazy
Talk to Django with natural language. Text to SQL and more.
The video demonstrates using Djeno database for natural language to SQL queries via embeddings, emphasizing semantic search, and integration with Django. It covers setting up PostgreSQL, creating Django models, embedding for efficient search, and caching for performance, while addressing bugs and customizing prompts in the SQL engine.
https://www.youtube.com/watch?v=GfDJ-Sxn4dE
llm_aided_ocr
Enhance Tesseract OCR output for scanned PDFs by applying Large Language Model (LLM) corrections.
https://github.com/Dicklesworthstone/llm_aided_ocr
DeltaDB
DeltaDB is a lightweight, fast, and scalable database built on polars and deltalake.
https://github.com/uname-n/deltadb
goauthentik / authentik
The authentication glue you need.
https://github.com/goauthentik/authentik
Some more batteries to do stuff with Mapping related data structures
This library provides utility functions for manipulating and transforming data structures which have or include Mapping-like characteristics.
https://github.com/erivlis/mappingtools
pgai
Bring AI models closer to your PostgreSQL data.
https://github.com/timescale/pgai
Unstract
No-code LLM Platform to launch APIs and ETL Pipelines to structure unstructured documents.
https://github.com/Zipstack/unstract
Optimizing PyTorch Docker images: how to cut size by 60%
https://mveg.es/posts/optimizing-pytorch-docker-images-cut-size-by-60percent/
Crawling Pages with Infinite Scroll using Scrapy and Playwright
This post provides a detailed guide on how to scrape infinite scroll websites using Scrapy and Playwright in Python. It covers the setup process, explains how to implement a custom downloader middleware to handle JavaScript rendering, and demonstrates how to extract data from dynamically loaded content, offering a practical solution for web scraping challenges posed by modern web applica...
https://www.xiegerts.com/post/infinite-scroll-scrapy-playwright/
Log context propagation in Python ASGI apps
The article explains how to implement log context propagation in Python ASGI applications using middleware to automatically tag log messages with contextual information like user ID and platform. This approach simplifies logging by eliminating the need for manual context passing across different layers of an application, ensuring all logs within a request-response cycle are consistently ...
https://rednafi.com/python/log_context_propagation/
OpenAdapt
AI-First Process Automation with Large Multimodal Models (LMMs).
https://github.com/OpenAdaptAI/OpenAdapt
RAG Fundamentals and Advanced Techniques
This course will guide you through the basics of Retrieval-Augmented Generation (RAG), starting with its fundamental concepts and components. You'll learn how to build a RAG system for chatting with documents, explore advanced techniques, and understand the pitfalls of naive RAG.
https://www.youtube.com/watch?v=ea2W8IogX80
Django 5.1 released
Django 5.1 introduces LoginRequiredMiddleware for easier authentication enforcement, accessibility enhancements like improved screen reader support and better HTML semantics, and a new querystring template tag for simpler URL handling in templates.
https://www.djangoproject.com/weblog/2024/aug/07/django-51-released/
AudioSample
AudioSample is an optimized numpy-like audio manipulation library, created for researchers, used by developers.
https://github.com/deepdub-ai/audiosample
nano-llama31
nanoGPT style version of Llama 3.1
https://github.com/karpathy/nano-llama31
DCPerf
DCPerf benchmark suite for hyperscale cloud applications,
https://github.com/facebookresearch/DCPerf