Python has many modules that can be run directly from the command line using python -m xxx. This article provides a comprehensive overview, introducing the usage of each module and discovering over 50 of them! (Related: For more about "-m", check out Typical Usage, Principle Analysis and Evolution of -m in Python)
TL;DR
ChatTTS turns heads with eerily human intonation while Alibaba's Qwen2 and Google's mesop both go open source; PEP 789 tames async generators, and a seven-language speed contest caps it off.
Articles & Tutorials
× 12The author was a teaching assistant for computer science courses at Carnegie Mellon University. His favorite programming problem to teach is calculating the length of a number. This seemingly simple problem has many layers of deep thinking, which the article explains in detail.
Circular dependency issues between modules are common errors, generally recommended to be solved through code structural layering. The author provides a short and practical fix: simply delay the lookup of function module bodies so that required modules can complete initialization first.
A newly proposed draft PEP suggesting adding a sys.prevent_yields() context manager to prevent tasks when yield would raise RuntimeError, improving safety.
PyCon US 2024 has concluded, and official recorded videos and presentation materials are still awaiting release. This is a lengthy travelogue from an attendee, reviewing the scenery, activities, presentation topics, people met, and more over several days. Truly impressed by the great atmosphere of the official PyCon!
From the "Python Game Development" series, which has been updated with two articles. Introduces the installation and basic usage of the Panda3D 3D game engine library, with truly impressive rendered effects.
The article introduces how to deploy the ChatTTS project locally (which has been hot for the past two weeks), basic usage, and advanced features.
How to extract text information from an image containing book text, and optimize performance? The article uses the scikit-image library for image processing, first using Numba for acceleration, then optimizing the algorithm multiple times to achieve ideal performance improvements.
OpenAI's newly released GPT-4o is powerful, so how well can it generate a Flask project with database operations, HTML pages, and Tailwind styling? The article provides main prompts and code, with pretty good final results.
Scrapscript is a small, content-addressable, network-first programming language. The author details the process of developing a new compiler for it using Python, explaining implementation principles of key modules.
This is a long article, but not boring. The author uses a great example of finding people in a constantly changing office to introduce hash functions, equality functions, immutability and hashability, hash collisions, and more.
The article implements a word frequency counting problem in 7 languages with many constraints. It provides detailed introductions to each language's implementation and discusses optimization approaches. The end also lists implementations in many other programming languages.
Projects & Resources
× 12"Think Python" has a new edition! The Chinese title is "Think Like a Computer Scientist with Python". The previous edition was published in 2015, with both original and translated versions scoring 8.8 on Douban.
A series of Python notebook resources on music processing fundamentals, a collection of materials for education and learning in music processing. (Shared by: Yunyun)
A text-to-speech model that remains highly popular, supporting Chinese and English with excellent voice effects. (21.7K stars)
ChatTTS-ui provides a simple local web interface and external API. (3.4K stars) ChatTTS_colab offers one-click deployment (including offline packages)! ChatTTS-Forge provides comprehensive ChatTTS wrapping, including API, WebUI, Playground, etc.
Open-sourced by Nike, for building data pipelines with PySpark integration.
Generates book structure and expands to create entire book content based on prompts. Provides a version hosted on Streamlit for online experience.
5-20 times faster than other caching libraries, very low memory usage (one-third of dictionaries), supports over 7 caching algorithms, completely thread-safe.
Google's internal UI framework for rapid web app development, write UI with Python code, responsive UI, hot reload, type safety, rich IDE support. (1.1K stars)
Official repository for Qwen2, supports 128K context, significantly improved coding and math capabilities. (4.2K stars)
Translates RSS titles or content, bilingual display, supports multiple translation engines like DeepL, OpenAI, Gemini, AI content summarization, automatic full-text retrieval, caches translated content.
Open source alternative to Perplexity, can run local or cloud large models. Next.js frontend, FastAPI backend, Logfire logging. (2K stars)
Command line source switching tool supporting multiple operating systems and CPUs, can test speeds of different mirror sources and select the fastest one.
Podcasts & Videos
× 3A Reddit post with many shares in the comments section worth checking out.
Recorded live at PyCon 2024 with core developers present, this brief podcast discusses some noteworthy current topics.
This podcast series introduces one Turing Award winner per episode, including their growth experiences, contributions, social impact, etc., with detailed materials presented in an accessible way.