Welcome to the Python Trending Weekly, a weekly newsletter about Python, AI and general programming techniques, with the majority links in English and a small portion in Chinese.
The original version of the weekly was written in Chinese. What you are reading here is mostly translated by LLMs.
Substack Channel : Click to subscribe
🦄Articles & Tutorials
Python 3.13 will introduce a copy-and-patch JIT compiler, which makes the most of the LLVM ecosystem. The compiler uses clang, the compiler parameter is set to -o3 to get the best performance, and the binary tools are llvm-objdump and llvm-readelf. The scheme can be described as both new and good.
How to read Excel files with Python? This article compares the performance of Pandas, Tablib, Openpyxl, LibreOffice, DuckDB and Calamine in terms of speed, type and correctness.
Flask is a powerful and flexible web framework. This beginner-friendly tutorial covers how to set up a Flask project, develop a starter project, add multiple pages using blueprints, use Jinja templates, store static files, and more.
Cosine similarity is a widely used metric in machine learning and information retrieval. This article introduces some low-level optimizations, taking the cosine similarity as an example, starting with a pure Python version, NumPy slows it down, SciPy speeds it up by 2-5x, C brings a 200x speedup, SIMD intrinsics a 400x speedup, AVX-512 with BMI2 a 747x speedup, AVX-512FP16 a 1260x speedup, and AVX-512VNNI a 2521x speedup.
The latest AI models like Stable Diffusion XL and Midjourney v6 can generate extremely realistic images, making it harder for the human eye to distinguish between real and fake. The author trained a classifier that can detect AI-generated images with 99% accuracy.
The author keenly found that the functions sum, all, any, and math.prod all have proper default values when the input is an empty list, but the max and min functions will throw an error! The author thinks it should be equal to negative infinity, what do you think?
Appium is a commonly used Android UI automation testing tool, and this article is part of a series of tutorials on Appium automation testing.
How to add real-time events to your Django app asynchronously? Without Redis, using Django's new async features. This article demonstrates the development of a minimalistic web-based instant messaging application.
What are the commonly used numeric data types in Python? What are their characteristics and how are they implemented in CPython? The article introduces integer, floating-point, and complex types, as well as the math, decimal, and fractions modules. (Appendix: PEP-3141--Numeric Tower)
How to implement non-blocking logging in asyncio programs? The article introduces how to use a shared Queue and QueueHandler to log, and use QueueListener to store the logs.
Instagram went from 0 to 14 million users in 2010-2011, with only 3 engineers! What tech stack did they use and what successful experiences can we learn from? The article introduces the relevant technologies and implementation schemes used.
Google designed Starlark to replace Python as a build description language, and the syntax is very similar. This document explains some of its design principles and many differences from the Python language, such as its Boolean values are not integers, strings are not iterable, there is no "is" operator, for/if statements are not allowed outside of functions, and so on.
The article is from the free online e-book Data Engineering Design Patterns, which is being serialized. Data engineering has gone through stages such as SQL, dimensional modeling, business intelligence and big data, MapReduce and Hadoop, and the cloud revolution.
🎁 Python Trending Weekly 🎁 organizes its content into seasons, with every 30 issues forming a season. The highlights from the first season have been compiled for your convenience. You can access them online here (Chinese).
🐿️Projects & Resources
A simple, modern and fast file watching and code reload library for Python. It uses the Notify
library from Rust to handle file system notifications under the hood, and supports both synchronous and asynchronous event handling. (1.4k stars)
from watchfiles import watch
for changes in watch("./path/to/dir"):
print(changes)
Hy is an alternative syntax for Python that provides a variety of additional features, generalizations, and syntactic simplifications over Python. Compared to other Lisps, it offers direct access to Python's built-in and third-party libraries. (star 4.7K)
A tool developed in Rust that builds self-contained Python applications with a runtime installer, creating a single binary for each platform.
Provides a URL class that makes it easy to parse and modify URLs, supporting access to each part of the URL via attributes. (1K stars)
Apispec: A pluggable API specification generator. It currently supports the OpenAPI Specification (formerly known as the Swagger specification). It is framework agnostic and has built-in support for marshmallow. (1.1K stars)
A simple object serialization library that is ORM/ODM/framework agnostic and can be used for validating input data, serializing and deserializing, and comes with a rich set of field types and supports multiple data formats. (star 6.8K)
A one-link website is suitable for use as a personal homepage. This website template uses GitHub Pages for deployment, allowing you to easily and effortlessly build a beautiful personal homepage.
Simplify the handling of document types, supports authentication and authorization, list permission control, document CRUD, document preview, version control, etc.
A Chinese-made tool that automatically generates cover letters using ChatGPT based on your resume and job description, and sends messages to hiring managers in China. Good luck in your job search during this winter hiring season!
A simplified Hacker News reader for the terminal, without features like login, voting, or posting, but with support for viewing user and comment information.
Enables efficient inference of Mixtral-8x7B models, requiring approximately 16 GB of VRAM and 11 GB of RAM. (1.4k stars)
A file & data recovery tool for Linux that supports text search and interactive operation, allowing you to recover deleted or overwritten files. (1.1k stars)
A multimodal vision-language model (MMVLM) that runs on mobile devices, with 1.4B and 2.7B parameter sizes, achieving impressive performance of 21.5 tokens per second and 65.3 tokens per second on Qualcomm Snapdragon 888 CPU and NVIDIA Jeston Orin GPU, respectively.
🐢Podcasts & Videos
How do independent developers make technology selections? Why does Tualading use Python as the backend language for his projects? (Appendix: Another podcast two years ago ByteTalk 3. Chatting with Tualading About the Things of Independent Developers)
This video compares and contrasts Rust programming from the perspective of Python developers, highlighting key differences in features such as Python classes and Rust structs.
🐼Subscribe Welcome
- Blog: Explore my independent blog where you can find a collection of original/translated technical articles over the years, along with some reflections since 2009.
- Newsletter: Subscribe to my channel on Substack for a curated newsletter delivered straight to your inbox, keeping you updated on current affairs.
- Github: Access the Markdown source files of this weekly digest on Github and feel free to use them for anything you have in mind!
- Telegram: Beyond notifications for the weekly digest, I consider it an "extra edition," providing additional, more diverse information.
- Twitter: Follow me on Twitter where my feed is filled with numerous accounts of developers and organizations in the Python community.
Top comments (0)