Python Trending Weekly
ISSUE 38

Python Trending Weekly #38 (2024-02-03)

2024-02-03 Season 2

TL;DR

Full-stack development with Django and Next.js leads the issue; a 16-bit CPU built in Excel and DeepSeek-Coder round out the highlights.

Articles 12 Projects 12
🦄

Articles & Tutorials

× 12
01 Building a FullStack Application with Django, Django REST & Next.js dev.to

Django and Next.js are very powerful web frameworks for backend and frontend development. This tutorial builds a restaurant menu management project using Django 4.2 and Next.js 13.

02 A day in the life of a developer - Building a dashboard app with SQL, Node.js, Django and Next.js dev.to

This tutorial for a full-stack project is more comprehensive than the previous one. In addition to implementing CRUD operations, it also covers dashboards, form filtering, Tailwind CSS, working with different databases, and building the backend with Node.js and Django, respectively.

03 Profiling your Numba code pythonspeed.com

Numba is a popular solution to speed up Python code. The author open-sourced a library called Profila that is specifically designed to analyze the performance of Numba code itself. The article introduces how to use it and also discusses three limitations of performance analysis.

04 Ten Python datetime pitfalls, and what libraries are (not) doing about it dev.arie.bovenberg.net

The author analyzes 10 pitfalls of the datetime module and introduces the situation of mainstream third-party libraries (such as arrow, pendulum, DateType, heliclockter), and finds that most of them have the same problems. What is a better date and time library? The author open-sourced a library that attempts to solve the problems in the article.

05 4 Ways to Correct Grammar with Python listendata.com

Here, "grammar" refers to writing grammar, not programming grammar. The article introduces four libraries, language-tool-python, Gramformer, Ginger, and pyaspeller, for checking and automatically correcting grammatical errors.

06 Syntax Error #11: Debugging Python syntaxerror.tech

This is the transcript of a talk the author gave at PyCon Sweden 2023, sharing his debugging mindset, tools, and techniques, including tools like snoop, pdb/ipdb, PuDB, web-pdb, birdseye, Kolo, and more.

07 Debugging a Mixed Python and C Language Stack developer.nvidia.com

Debugging is hard, and debugging across multiple languages is even harder. This article introduces how to debug a mixed language issue, using GDB to debug Python+C, locating and fixing a deadlock issue, and sharing some debugging experiences.

08 Analyzing "Sorting a million 32-bit integers in 2MB of RAM using Python" bitecode.dev

This article is an analysis and interpretation of Guido's 2008 article Sorting a million 32-bit integers in 2MB of RAM using Python. The solution uses the less common modules struct, array, and heapq, as well as techniques such as context managers and generators.

09 Implement Parsers with Pylasu tomassetti.me

This tutorial shows how to define an AST with Pylasu, generate a parser using ANTLR, implement a transformation from the ANTLR parse tree to the Pylasu AST, and finally build a toy programming language parser with a CLI.

10 Dynamic Programming is not Black Magic qsantos.fr

What is dynamic programming? What are its features and advantages compared to other approaches? This article starts with a common programming problem and gradually introduces caching, optimizing the cache, and dynamic programming, unveiling the mystery of dynamic programming.

11 Reasons to avoid static type checking typing.readthedocs.io

Python supports type hints, but it's not mandatory. In fact, there are many cases where it's not recommended to use type hints. This document from the typing module lists some reasons why you might want to avoid using type hints.

12 Running Open Source LLMs In Python - A Practical Guide christophergs.com

How to run large language models on your personal laptop? This tutorial provides a complete walkthrough of running llama.cpp on different operating systems, including selecting and downloading the model, setting prompts, formatting LLM outputs using GBNF grammars, streaming responses, multimodal models, and more.

🎁 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 excelCPU: 16-bit CPU for Excel, and related files github.com

This popular project has nearly 3K stars in just one week! The CPU.xlsx file provides a 16-bit CPU, 16 general-purpose registers, 128KB of RAM, and a 128x128 display area. It is compiled using Python. (3K stars)

02 whenever: Foolproof datetimes for maintainable Python code github.com

This datetime library addresses some of the problems that the standard library and other third-party libraries don't solve very well, as mentioned earlier.

03 deepSeek-Coder: Let the Code Write Itself github.com

It consists of a series of code language models, each of which is a 2T token-trained model with multiple model sizes, advanced code-completion ability, and excellent performance in various benchmarks. (4.3k stars)

Benchmark score comparison with other models
04 fastcrud: FastCRUD is a Python package for FastAPI, offering robust async CRUD operations and flexible endpoint creation utilities github.com

Features: Fully async, SQLAlchemy 2.0, Powerful CRUD, Dynamic construction of complex queries, Advanced SQL joins, Offset or cursor-based pagination, Modular and extensible, Autogenerated API.

05 leptonai: A Pythonic framework to simplify AI service building github.com

This framework enables you to effortlessly build AI services with Python code. Its key features include: well-designed abstractions, model startup with just a few lines of code, built-in examples for common models (e.g., Llama, SDXL, Whisper), automatic batch processing, background tasks, and more. (1.9k stars)

06 GPT Newspaper: Create Personalized Newspapers with GPT github.com

Let AI curate, write, design, and edit content based on your personal taste and interests, powered by 6 specialized agents that search the web for the latest content and aggregate well-known news sources.

07 apprise: Push Notifications that work with just about every platform! github.com

A lightweight notification library written in pure Python that allows you to send notifications via a plethora of services like Telegram, Discord, Slack, Amazon SNS, Gotify, and many more, supporting various notification formats such as SMS, email, and desktop notifications. (9.7K stars)

08 procrastinate: PostgreSQL-based Task Queue for Python github.com

A distributed task processing library based on PostgreSQL, providing Django integration and easy to use with ASGI frameworks. It supports features like async, periodic tasks, retries, arbitrary task locks, etc.

09 flent: The FLExible Network Tester github.com

It can run multiple instances of netperf/iperf/ping simultaneously and aggregate the results, presenting the data through an interactive GUI and an extensible plotting facility. It supports local and remote hosts and can collect statistics about CPU usage, WiFi, qdisc, and TCP sockets, among other things.

flent: The FLExible Network Tester
10 urllib3: New Version Supports Making HTTP Requests in the Browser github.com

urllib3 has released version 2.2.0, which brings support for use in the Pyodide runtime! The latter is a Python interpreter that runs in the browser and is the technical foundation for frameworks like PyScript and Jupyterlite. This has major implications for Python frontend development, and the future looks bright.

11 gnuplotlib: gnuplot for numpy github.com

Gnuplot is a powerful, open-source plotting tool for generating various types of 2D and 3D plots. This project integrates it with Numpy, leveraging its data handling and plotting capabilities.

12 history_rag: Build a Chinese History Q&A App with RAG github.com

RAG (Retrieval-Augmented Generation) + vector database to build a Chinese history knowledge Q&A application, supporting both "Milvus Scheme" (on-premises) and "Zilliz Cloud Pipelines Scheme" (on cloud), providing a web UI interface based on gradio. The default model is GPT4, and other LLMs can be easily switched.

ESC
↑↓ select · ↵ open175 issues