Python Trending Weekly
ISSUE 47

When Your Teacher Wants You to Do Open Source

2024-04-20 Season 2

TL;DR

When your professor wants you to do open source; Ruff v0.4.0 ships a hand-written recursive descent parser, and Fedora mulls building Python with -O3.

Articles 12 Projects 12 Media 2
🦄

Articles & Tutorials

× 12
01 When Your Teacher Wants You to Do Open Source davidism.com

This article raises a sharp question: some teachers suggest students contribute to open source projects but don't provide effective guidance, leading to many ineffective interactions in open source projects. For students wanting to contribute to open source, avoid these mistakes: don't submit PRs with Git practice content to original repos, don't break existing linter and formatting standards, don't do check-in style greetings...

02 Python f-string Codes I Use Every Day pybit.es

f-strings are useful and powerful. The article introduces frequently used scenarios, such as handling numbers (integers, floats, scientific notation, etc.), percentages, dates, padding, positive/negative signs, etc.

03 Building a Voice Notes App with Django and OpenAI circumeo.io

How to develop a note-taking app that can record and transcribe voice? This tutorial uses Django+OpenAI+AlpineJS to develop a simple project.

04 Best Practices for Securing Python Applications arjancodes.com

The article introduces 7 types of practices that can improve web project security, including validating and sanitizing input data, using secure coding tools, using the latest Python and libraries, handling errors and logging wisely, principle of least privilege, using HTTPS for transmission, and regular security audits.

05 Fedora Wants to Build Python with "-O3" Optimization fedoraproject.org

A proposal from Fedora Linux hopes to build the CPython interpreter and standard library with the "-O3" compiler optimization flag, expected to improve overall Python performance by 1.04x. The proposal corresponds to Fedora 41 and Python 3.13.

06 Ruff v0.4.0: A Hand-Written Python Recursive Descent Parser astral.sh

Ruff has released a new version! The new parser is 2x faster, meaning all linting and formatting speeds up by 20-40%. The article introduces many advantages this hand-written parser brings compared to the old parser. (Amazing how the Astral team excels at building in public!)

07 Styling Django RSS Feeds hyteck.de

RSS is a good thing, strongly recommend everyone use it! Personal blogs should provide RSS feeds as standard. Django framework has Syndication for creating RSS feeds, but they're hard to read by default. The article introduces how to add styles to RSS feeds. (PS: My blog also has RSS preview beautification)

08 Fast and Concise Probabilistic Filters in Python lemire.me

How to quickly determine if an element is in a set? The most popular method is Bloom filters, but there are other filters. The article introduces the recently launched binary fuse filter, which is faster and uses less memory. It introduces the pyxorfilter library usage, whose documentation references two academic papers for interested readers.

09 3 Important Little Things I Overlooked During Code Review piglei.com

Code Review is a key part of project development, with many review points worth attention. The author shares 3 important little things once overlooked: naming, guiding comments, and communication methods. The key points summarized in the article play important roles in improving code maintainability and shaping team atmosphere.

10 Recording Daily Keyboard Strokes with Python juejin.cn

The author has a great starting point: major apps have annual summaries, we use keyboards daily, why not give them a work summary? The pynput library can monitor keyboard and mouse events to implement statistics. The article also introduces developing a simple viewing interface with tkinter.

11 Should You Use Upper Bound Version Constraints? iscinumpy.dev

Upper Bound Version Constraints are a mechanism for specifying the highest installable version of software packages. This 10,000-word article mainly points out many drawbacks of this mechanism and explains the concept and limitations of Semantic Versioning (SemVer).

12 How to Write a Code Formatter? yorickpeterse.com

The author recently spent weeks developing a code formatter for their programming language. The article introduces some technical implementation knowledge, mainly how to handle various Abstract Syntax Trees (AST), including text, whitespace, indentation, width, content rendering, comment handling, etc. (PS: The author's article from last year: A Decade of Developing a Programming Language)

🐿️

Projects & Resources

× 12
01 pylyzer: Fast Python Static Code Analyzer and Language Server github.com

A high-performance static code analyzer developed in Rust, over 100x faster than pytype and pyright. Can detect list out-of-bounds and non-existent dictionary keys, supports various language server features like code completion and renaming. (1.9K stars)

02 anthropic-cookbook: Interesting and Effective Ways to Use Claude github.com

Official Claude cookbook with a series of resources and tutorials. (2.7K stars)

03 Flowmium: Python Workflow Orchestrator Written in Rust github.com

A workflow orchestrator using Kubernetes that can define and run container YAML workflows. Provides @flow.task() decorator, each Python function can run as a Kubernetes pod.

04 github2file: Download and Process Files from Github github.com

Used for downloading files from code repositories, convenient for providing to chatbots. Supports filtering by language, can exclude certain directories/file types and test files, supports removing comments and docstrings.

05 Python Knowledge Cheat Sheet kieranholland.com

A knowledge-dense quick reference sheet focusing on Python core content, comprehensive and curated.

06 DouZero: Mastering DouDizhu with Self-Play Deep Reinforcement Learning github.com

A reinforcement learning framework designed specifically for DouDizhu (Fighting the Landlord). DouDizhu involves cooperation, competition, imperfect information, huge state and action spaces. It proposes combining deep Monte Carlo with action encoding and parallel actors, providing a simple and effective solution. (3.9K stars)

07 dashboard-icons: Dashboard Icon Resources github.com

Supports seamless integration with multiple dashboards, with preferred recommendations being Homepage, Homarr, and Dashy. (4K stars)

08 newspaper4k: Extract Articles, Headlines and Metadata from News Websites github.com

newspaper3k is a project with 13.7K stars for extracting various elements from websites, recognizing over 10 text languages. But that project hasn't been updated for over 3 years. newspaper4k is its fork, adding many features and fixing numerous issues.

09 translateLocally: Fast and Secure LLM Translation on Your Machine github.com

Powered by marian and Bergamot, provides local translation with CLI and GUI usage options.

10 constable: Insert Prints Directly into AST for State Debugging github.com

Inserts print statements directly into AST at runtime, can print variable assignments and other information. Simple usage - the constable.trace decorator inserts print statements into function AST when tracked variables are assigned.

11 TextBlob: Sentiment Analysis, Part-of-Speech Tagging, Noun Phrase Extraction, Translation, etc. github.com

A Python library for processing textual data, used for diving into common natural language processing tasks like part-of-speech tagging, noun phrase extraction, sentiment analysis, classification, etc. (8.9K stars)

12 wewe-rss: Generate WeChat Public Account RSS, Supports Private Deployment github.com

Generates RSS subscriptions based on WeChat Reading (supports .atom, .rss, .json formats), automatically updates content on schedule, supports full-text output, supports exporting subscription sources to OPML. (2.7K stars)

🐢

Podcasts & Videos

× 2
01 PyCon Philippines 2024 Talk Video List youtube.com

Philippines' 9th year hosting PyCon activities, this talk video list has 37 videos total.

PyCon Philippines 2024 Talk Videos
02 A Small Guide to Building Large Language Models in 2024 youtube.com

Today's LLMs are sprouting everywhere like mushrooms after rain, and conditions for individual developers to train LLMs are becoming increasingly convenient. This video introduces LLM-related concepts and knowledge needed for training LLMs. The author's other video will provide hands-on practice, applying theory through examples.

ESC
↑↓ select · ↵ open175 issues