PythonHub
前往频道在 Telegram
2 634
订阅者
+1724 小时
+247 天
+5830 天
帖子存档
2 635
Invent your own comprehensions in Python
Python doesn't have tuple, frozenset, or Counter comprehensions, but you can invent your own by passing a generator expression to any iterable-accepting callable.
https://www.pythonmorsels.com/custom-comprehensions/
2 635
Pytest parameter functions
The post shows how to make complex pytest.mark.parametrize data more readable and maintainable by wrapping each test case in small helper functions instead of raw tuples. It also demonstrates using pytest.param with custom IDs inside those helpers so long, messy parameter values become clear, concise test names that are easier to work with.
https://nedbatchelder.com/blog/202602/pytest_parameter_functions
2 635
PEP 827 - Type Manipulation has just been published
https://www.reddit.com/r/Python/comments/1rimuu7/pep_827_type_manipulation_has_just_been_published/
2 635
code-graph-rag
Code-Graph-RAG builds knowledge graphs from multi-language codebases and enables AI-powered querying and editing. It uses Tree-sitter to parse ASTs across 11 languages, stores structural data in Memgraph, and translates natural language questions into Cypher graph queries. Unlike vector-based RAG, it preserves exact code relationships: call chains, inheritance hierarchies, and module dep...
https://github.com/vitali87/code-graph-rag
2 635
Deprecate confusing APIs like “os.path.commonprefix()”
The article argues that confusing APIs like Python’s os.path.commonprefix() should be deprecated because their misleading naming and placement cause developers to misuse them and introduce security vulnerabilities. It shows how decades of confusion around this function led to real path-traversal bugs and concludes that unsafe or misleading APIs should be replaced by clearer alternatives ...
https://sethmlarson.dev/deprecate-confusing-apis-like-os-path-commonprefix
2 635
Custom Data Structures in E-Graphs
The post explores how Egglog’s e-graph framework can be extended with custom container data structures to represent algebraic structures (like multisets) more efficiently and reduce expression blow-up during rewriting. It shows that by embedding structural invariants into the data representation and using higher-order functions, you can express powerful rewrite rules without explosive gr...
https://uwplse.org/2026/02/24/egglog-containers.html
2 635
databricks-solutions / ai-dev-kit
Databricks Toolkit for Coding Agents provided by Field Engineering
https://github.com/databricks-solutions/ai-dev-kit
2 635
City2Graph
Transform geospatial relations into graphs for Graph Neural Networks and network analysis.
https://github.com/c2g-dev/city2graph
2 635
Comparing Python packages for A/B test analysis (with code examples)
https://e10v.me/python-packages-for-ab-test-analysis/
2 635
What Python's asyncio primitives get wrong about shared state
https://www.inngest.com/blog/no-lost-updates-python-asyncio
2 635
100 days 100 iot project with Micropython
https://github.com/kritishmohapatra/100_Days_100_IoT_Projects
2 635
You’ve Been Underusing Dataclasses (These Tricks Are Wild)
The video demonstrates seven powerful, lesser-known techniques using Python dataclasses, including automatic class registration, lightweight validation, cached derived values, and context manager patterns. It also shows practical uses such as CLI generation and explains advanced features like InitVar, highlighting how dataclasses can enable cleaner and more expressive Python designs.
https://www.youtube.com/watch?v=Y9_h7ehjhO4
2 635
Validating data with pointblank in python
One of the most common tasks of any organization is reviewing data to ensure that it is accurate and does not contain errors. Commonly, this is done by producing graphs or summary information like a median or mean and confirming that it looks reasonable. Pointblank is a newer tool that allows you to really dig into a dataset and task assumptions in a robust and reproducible manner.
https://www.markpitblado.me/blog/validating-data-with-pointblank-in-python
2 635
Designing for Model Swaps
When LLM providers ship breaking changes, a poor architecture turns a config tweak into a 400-line PR. This post introduces seam-driven design - five narrow interfaces (provider, prompt, tools, config, observability) each independently swappable - illustrated with a working FastAPI + LangChain reference app, a practical checklist, and two hands-on drills readers can run immediate
https://garybake.com/seams1.html
2 635
Resume-Tailor
The Resume Tailor is a small tool used to quickly and automatically tailor your resume to a job description. This allows you to have the best odds of getting your resume into the hands of actual humans.
https://github.com/farmerTheodor/Resume-Tailor
2 635
python-apple-fm-sdk
Python bindings for access to the on-device model at the core of Apple Intelligence through the Foundation Models framework.
https://github.com/apple/python-apple-fm-sdk
2 635
FastAPI error handling: types, methods, and best practices
Learn FastAPI error handling with different types, methods, and best practices. Build robust APIs using custom exception handlers and practical examples.
https://www.honeybadger.io/blog/fastapi-error-handling/
2 635
Using tox to Test a Django App Across Multiple Django Versions
The article shows how to use tox to test a Django app across multiple Python and Django versions by creating isolated environments that install specific dependency combinations and run the same test suite. By defining a version matrix in tox.ini, developers can automatically verify compatibility across many Django releases and catch packaging or environment issues before users encounter them.
https://www.djangotricks.com/blog/2026/02/using-tox-to-test-a-django-app-across-multiple-django-versions/
2 635
MicroGPT explained interactively
Walk through Karpathy's 200-line GPT from scratch. Tokenize names into integers, watch softmax convert scores to probabilities, step through backpropagation on a computation graph, explore attention heatmaps, and see a tiny model learn to generate plausible names.
https://growingswe.com/blog/microgpt
