Python Trending Weekly
ISSUE 41

Python Trending Weekly #41 (2024-03-09)

2024-03-09 Season 2

TL;DR

How Lyft upgraded 1,500+ repos at scale, Open-Sora-Plan taking aim at Sora, and an LLM running on a Snapdragon 8 Gen 3 phone — this issue is packed.

Articles 12 Projects 12
🦄

Articles & Tutorials

× 12
01 Implementing RSA in Python from Scratch coderoasis.com

In a series of articles (4 in total), the author implements the RSA encryption algorithm in Python, covering the basic steps and mathematical principles of the algorithm, implementing it in Python and optimizing it step by step, implementing security attacks on it, and finally exploring future directions for RSA encryption.

02 Python IAQ: Infrequently Answered Questions norvig.com

A question is infrequently answered either because few people know the answer or because it involves an obscure or subtle point. This article lists many such questions and provides answers. Since it was written 20 years ago, some of the questions have been addressed in later versions of Python, while others remain as relevant as ever.

03 Why I Like Nox hynek.me

Tox and Nox are two similar Python tools, one of their main purposes is to test your project against different Python versions. The author explains why he prefers to use Nox in some cases. (Note: I wrote a tox tutorial 4 years ago, and also translated the Nox documentation. Time flies...)

04 My favorite data structure: The trie jamesg.blog

A trie (prefix tree or dictionary tree) is a tree-like data structure commonly used to store and retrieve information from a collection of strings. This article introduces the data structure and demonstrates basic operations using the pygtrie library.

05 How fast can we process a CSV file datapythonista.me

What are the options for processing CSV files in Python? How do they compare in terms of execution speed, code readability, and hardware implications? The author benchmarks the performance of Pandas with different engines and compares implementations using Numpy/DuckDB/DataFusion/Polars.

06 Multilingual Support In Django medium.com

How to add multilingual support to a Django project? How to detect the current language? How to translate message files, template files, and JS files? How is the translated content served to the frontend?

07 Python Upgrade Playbook. How Lyft upgrades Python at scale—1500+… eng.lyft.com

Lyft upgraded 1500+ codebases across 150+ teams from Python 2 to Python 3.10, and summarized a version upgrade manual.

08 The simplest way to add Tailwind CSS to Django photondesigner.com

This tutorial provides step-by-step instructions, including a video, on how to integrate the popular Tailwind CSS framework into your Django project.

09 Unexpected Python Traps for Beginners bitecode.dev

This article lists several common Python "traps" that can easily trip up beginners. These include: sneaky string concatenation, functions returning None, invisible tuples, the dreaded is, and list multiplication.

10 Better PC Cooling with Python and Grafana calbryant.uk

An article about Python in the real world: the author uses Python to read CPU and water cooler temperatures, control fan and pump speeds, and monitor performance with Grafana, effectively improving PC cooling and reducing fan noise!

11 Run Large AI Models on Android Phones with Snapdragon 8 Gen 3 soulteary.com

The article introduces a simple method to run large AI models on Android phones, allowing you to experience English language models (Llama2 7B, Mistral 7B, RedPajama 3B, Google Gemma 2B, Microsoft PHI 2B); Chinese language models (Mianbi MiniCPM, multimodal models); and Stable Diffusion.

12 14 Years in the Industry, and I Still Find Programming Difficult piglei.com

@piglei, the author of "Python Craftsman," shares his thoughts on programming. I read it last year and still find it insightful. The article compiles eight programming experiences, one of the core ideas being "writing good code," which echoes the original intention of the "Python Craftsman" series: writing elegant and efficient code like a craftsman creating a perfect handicraft.

🎁 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

× 12
01 umami-python: Umami Analytics Client for Python github.com

Many personal websites (including mine) have moved away from using Google Analytics for website traffic analysis in favor of the open-source umami. This project provides a client built on httpx and pydantic that allows you to authenticate, add custom data to umami, and view analytics data from umami.

02 returns: Make your functions return something meaningful, typed, and safe github.com

It brings functional programming to Python, providing primitives for writing declarative business logic, fully typed, supporting functions and coroutines, and is framework agnostic. (3.2k stars)

03 pyquest: Python everything Cheatsheet and a Journey to the land of Python programming github.com

This project collects a series of Python programming learning materials, covering all aspects of Python programming, for a systematic study of Python.

04 flect: a Python framework for building full-stack web applications github.com

Build user interfaces quickly with interactive and beautiful UIs by building your UI with Pydantic models that correspond to your frontend React component props on the backend.

05 docker-android: Android in docker solution with noVNC supported and video recording github.com

A docker image for Android development and testing, with simulators for different devices, support for vnc to view inside the container, support for sharing logs via a web UI, ability to control from outside using adb, and support for various testing frameworks such as Appnium and Espresso. (7K stars)

06 anthropic-sdk-python github.com

Last week's Claude 3 was a hot topic, with performance benchmarks that comprehensively surpassed GPT-4! This project is an officially released Python SDK that supports asynchronous, streaming responses, streaming assistants, usage viewing, returns in Pydantic models, retries, and timeout handling.

07 PhotoMaker: PhotoMaker github.com

Quickly customize in seconds without additional LoRA training; ensure impressive ID fidelity, provide diversity, and generate high quality; can collaborate with other foundation models and LoRA modules as an adapter. (star 7.8K)

PhotoMaker: PhotoMaker
08 metube: Self-hosted YouTube downloader (web UI for youtube-dl / yt-dlp) github.com

A web GUI for youtube-dl (using a fork of yt-dlp) with playlist support. Download videos from YouTube and dozens of other sites. (3.1k stars)

09 cachetools: Extensible memoizing collections and decorators github.com

Provides various in-memory collections and decorators, including a variant of the Python standard library's @lru_cache function decorator. (2K stars)

10 speedtest-cli: Command line interface for testing internet bandwidth using speedtest.net github.com

A network performance diagnostic tool that allows users to measure download and upload speeds and network latency to a specific server from a terminal or command-line environment. Cross-platform and easy to integrate into scripts for automated testing. (13.2K stars)

11 Open-Sora-Plan: This project aims to reproduce Sora (Open AI T2V model) github.com

Sora is a text-to-video model released by OpenAI, representing a significant leap forward in video generation technology. This project aims to reproduce Sora through the power of the open-source community, and has set up the infrastructure but has not yet trained the full model. (5.2K stars)

12 minisora: aims to explore the implementation path and future development direction of Sora github.com

Also aims to reproduce Sora, with a focus on being GPU-friendly and improving training and inference efficiency. Regularly holds roundtable discussions and paper reading sessions to delve deeper into the current state of video generation technology.

ESC
↑↓ select · ↵ open175 issues