Python Trending Weekly
ISSUE 13

Python Trending Weekly #13 (2023-07-29)

2023-07-29 Season 1

TL;DR

Jupyter Notebook 7 makes its grand debut, and the Steering Council brings good news on PEP 703—the proposal to make the GIL optional—just as the first downloadable Chinese LLaMA2 model arrives.

Articles 15 Projects 12
🦄

Articles & Tutorials

× 15
01 Announcing Jupyter Notebook 7 blog.jupyter.org

Major update of Jupyter Notebook, highlights include real-time collaboration, interactive debugging, directory, themes and dark mode, internationalization, improved accessibility, compact view on mobile devices.

02 Exploring Weak References and Basic Type Support in Python juejin.cn

Python's basic types Int, List, Dict, Tuple, Str do not support weak references, while Object, Type, Set and other types do support weak references, why is this the case? The article gives its own analysis.

03 Introduction and Python Implementation of Distributed Locks so1n.me

When should distributed locks be used? How to implement distributed locks with py-redis, what is the process of locking and unlocking? What are the points to note about the lock timeout, how to implement WatchDog to automatically renew the lock?

04 Unleashing the Power of PyScript: Running Python Code in HTML scofield.hashnode.dev

An introductory tutorial on PyScript, introducing installation, basic knowledge, usage with Flask and advanced features.

05 Faster File I/O Through Concurrency superfastpython.com

What is file I/O, why is it much slower than main memory I/O? What factors does the speed of file I/O depend on? What methods are there to improve file I/O performance?

06 How to Write Impeccably Clean Python Code? dev.to

The article introduces some best programming practices, covering code structure, pre-commit, type hints, docstrings, lint, Pydantic, spell check, testing and other aspects.

07 Python Logging: Comparing the 6 Most Popular Libraries betterstack.com

The article provides a detailed comparison of the currently most popular 6 logging frameworks: logging, loguru, structlog, Eliot, logbook and picologging. The most recommended are undoubtedly the first two, the others are for interest.

08 Using cProfile to Analyze Module-Level Code adamj.eu

How to use cProfile to perform performance analysis on Python code? The article briefly introduces its usage, and gives two advanced usage methods: context manager and decorator.

09 Mastering Functional Programming in Python codium.ai

The article introduces the advantages of functional programming, Python's support for functional programming, best practices and errors to avoid when writing Python programs.

10 Python 3.12 Preview: More Intuitive and Consistent f-string realpython.com

What limitations does f-string have before Python 3.12? What changes will the upcoming 3.12 version bring? New feature preview: embedded expressions can reuse quotes, f-string allows the use of backslashes, comments can be written in multi-line expressions, arbitrary levels of f-string nesting, optimized f-string error prompts...

11 Creating Awaitable Constructors with AsyncMixin dev.to

Introduces how to use a mixin named AsyncMixin to create asynchronous constructors in Python.

12 Finding and Fixing Insecure Direct Object References in Python snyk.io

Insecure Direct Object References (IDOR) is a security vulnerability, the article introduces the harm of this vulnerability, how to identify and fix IDOR vulnerabilities.

13 Overcoming Performance Bottlenecks with Asynchronous Python: A Deep Dive into CPU-Intensive Code medium.com

The author introduces how to identify and optimize CPU-intensive code in feature storage to improve the performance of the core model. What is event loop delay, how to monitor the time consumed by asynchronous code?

14 PEP-720 Cross-Compiling Python Packages peps.python.org

Cross-compiling refers to compiling programs for another architecture on one computer. This PEP attempts to reveal the challenges of cross-compiling and improve upon them.

15 PEP-722 Dependency Specification for Single-File Scripts pep-previews--3210.org.readthedocs.build

There are many solutions for recording and managing third-party libraries in projects. But how to manage third-party library dependencies for single files? This PEP proposes a very simple specification format.

🎁Python Trend Weekly🎁 has been published for free for 13 issues, visit the link below to view all content: https://pythoncat.top/tags/weekly

🐿️

Projects & Resources

× 12
01 Resume-Matcher: Compare resumes with job descriptions, ranked by scoring github.com

An AI-based resume matcher that scores resumes based on the keywords in the job description. It uses Qdrant (an efficient vector similarity search tool) to measure the match between the resume and the job description.

02 awesome-python-htmx: Selected content for web development using htmx in Python github.com

PyHAT aims to promote htmx+ASGI+TailwindCSS in Python, this project lists some introductory resources, tutorials, design theories, peripheral ecosystems, etc.

03 CodeGeeX2: A more powerful multi-language code generation model github.com

Based on the ChatGLM2-6B pedestal language model, it achieves a Pass@1 pass rate of 35.9% in Python, surpassing the larger StarCoder-15B. CodeGeeX plugin supports VS Code, IntelliJ IDEA, PyCharm, GoLand, WebStorm, Android Studio and other IDEs. (star 1K)

AI programming assistant
04 Chinese-Llama-2-7b: The first downloadable and runnable Chinese LLaMA2 model github.com

Open source and commercially available Chinese version of the Llama2 model and Chinese-English SFT dataset, compatible with all optimizations for the original llama-2-chat model. (star 1K)

05 docker-llama2-chat: LLaMA2 (official / Chinese version / INT4 / llama2.cpp) github.com

A Chinese open source project, three steps to get started with LLaMA2, the author has written a series of tutorial blogs.

06 taipy: Transforming data and AI algorithms into complete web applications github.com

A full-stack project that quickly builds web applications from data and AI.

Front and back end schematic
07 pyrasite: Injecting code into a running Python process github.com

Allows injecting custom code into a running Python process to achieve dynamic debugging, modifying variable values, cracking encryption, analyzing runtime behavior, etc. Supports various injection methods, including injecting into the Python interpreter, injecting into specific functions, injecting into specific threads, etc. (star 2.7K)

08 python-manhole: Debugging running Python programs github.com

Provides interactive debugging and monitoring functions in running Python processes, using Python's "ptrace" mechanism, by injecting code into the target process, it can be connected via SSH or telnet protocols for remote interaction. Compatible with gevent and eventlet, with some restrictions.

09 vscode-python: Setting up a Python development environment with VScode and Docker github.com

A very comprehensive tutorial project, guiding how to run Python on Docker, set up development environment and container extensions, testing and deployment, etc.

Development workflow with VScode and Docker
10 webdriver_manager: Webdriver manager for Python github.com

When using frameworks like Selenium and Playwright, you need to manage various browser drivers. This project simplifies the management and usage of browser drivers.

11 lets-plot: Open source plotting library for statistical data github.com

An open-source plotting library by JetBrains, it can create beautiful, interactive statistical charts and data visualizations. It provides a ggplot2-like plotting API for Python and Kotlin developers. (star 1.1K)

12 pdfarranger: Merge or split PDF documents in a graphical interface, support rotation, cropping and rearrangement github.com

A small python-gtk program that edits PDF documents in an intuitive way. Its backend is based on pikepdf, which is a library for reading and writing PDF files. (star 2.3K)

pdfarranger interface
🥂

Discussion & Question

× 1
01 Steering Council Notice about PEP-703 (Making the Global Interpreter Lock Optional in CPython) discuss.python.org

In the 11th issue of the newsletter, we shared "If PEP-703 is adopted, Meta will invest manpower to support", now there is progress, the steering committee plans to accept PEP-703! This post lists several basic principles and a three-stage development plan. Backward compatibility is the top priority, this will not be Python 4.

🐱

Sponsor & Support

If you find the weekly valuable, feel free to appreciate or buy me coffee to support!

If you like the weekly, please share it with others who need it, so that more people can benefit from it~

ESC
↑↓ select · ↵ open175 issues