Python Trending Weekly
ISSUE 46

How to Predict Solar Eclipse Time and Path with Python?

2024-04-13 Season 2

TL;DR

Predicting a solar eclipse's time and path with Python, just as the real one nears; PEP 744 weighs in on the JIT, and jiaTansSSHAgent recreates the XZ backdoor to show how stealthy supply-chain attacks can be.

Articles 13 Projects 12 Media 2
🦄

Articles & Tutorials

× 13
01 How to Predict Solar Eclipse Time and Path with Python? erikbern.com

This Monday (04.08) featured this year's only total solar eclipse, which inspired the author to think about how to predict eclipse timing using programming methods. The article shares calculation techniques, plots the trajectory of this total solar eclipse, and predicts all eclipses between 2020-2030.

This year's total solar eclipse trajectory
02 503 Days Working Full-Time on Open Source: Lessons Learned mathspp.com

The author joined Textualize full-time and participated in developing the popular Python libraries Rich and Textual. The article mainly shares experiences in four areas: getting job opportunities through online presence, not letting your ego interfere with your work, how to interact with users and contributors, and how to develop on completely unfamiliar large codebases.

03 Best Practices for Eliminating Python Code Smells arjancodes.com

Code smells aren't errors themselves, but they affect code quality and maintainability. The article introduces 5 common types of code smells and best practices for fixing these issues.

04 How to Do Prime Factorization with Python? compucademy.net

The article introduces several methods for prime factorization in Python, from brute force solutions to the classic Sieve of Eratosthenes, focusing on the algorithm's logic and code optimization methods.

05 Supervisor - Persistent Process Deployment Solution juejin.cn

Supervisor is a C/S architecture process monitoring and management tool. The article introduces its basic usage and some advanced features, used to solve stability issues in deploying persistent processes (overcoming the drawbacks of nohup cmd & commands).

06 PEP-744 – About JIT Compilation peps.python.org

The JIT compiler has been merged into CPython 3.13's main branch. This newly proposed PEP aims to answer common questions about it, with the main goal of clarifying what conditions this JIT should meet to become a non-experimental feature.

07 How Can Zapier Automatically Execute Billions of Tasks? newsletter.systemdesign.one

Zapier is a popular online automation platform supporting thousands of apps. The article introduces Zapier's technical architecture, including using Django framework for backend, RabbitMQ and Celery to create distributed workflow engines, Kafka for distributed event storage and stream processing, etc.

08 Meta Launched Threads in Just 5 Months Using Monolithic Architecture infoq.com

A major tech news last year was Zuckerberg's Meta launching Threads to compete with Musk's Twitter. Threads' tech stack is almost identical to Instagram's: large monolithic architecture, Django framework-modified backend, data stored in TAO, using ZippyDB for caching.

09 Python Naming Conventions: Best Practices and Examples compucademy.net

Python is known for its readability and simplicity, and it has naming conventions that help maintain code consistency and clarity. The article introduces Python's correct naming styles through examples and provides counterexamples. (Also: Google's internal "Code Health" series focused on code quality has a latest article sharing several naming principles with a Zen of Python flavor)

10 Great_Tables Design Philosophy posit-dev.github.io

The article reviews the history of tables (from ancient grids to highly structured data formats), presents problems tables face today, and introduces how to create more beautiful and useful tables through the Great Tables library.

Components of a table
11 Why Can't Python Use Lists as Dictionary Keys? blog.dailydoseofds.com

Using a list as a dictionary key will raise a TypeError. Why is this? How does Python execute internally during this process? The article answers this question - it's related to the __hash__() magic method.

12 Building a Temperature Monitor with Raspberry Pi + Python + InfluxDB nathanielkaiser.xyz

The author developed a temperature monitor based on Raspberry Pi 1b and DS18B20 temperature probe, using Python to send temperature data to InfluxDB to monitor temperature changes. (Based on the article's opening description, I suspect the author is currently only 11-12 years old)

13 How to Pass Coding Interviews with One-Line Python Code ivaniscoding.github.io

This article suggests writing answers as one-liners when doing interview programming. It provides examples like reversing binary trees, calculating binary tree depth, finding first palindromes, etc., using various fancy techniques to write code in one line. But note the article's publication date - it's just an April Fool's joke, don't take it seriously!

🎁Python Trending Weekly🎁 Every 30 issues makes a season, and the highlights from the first season have been compiled for easy reference. Online access: Python Trending Weekly Season 1 Highlights Collection (Issues 1~30)

🐿️

Projects & Resources

× 12
01 open-interpreter: Natural Language Interface for Computers github.com

It lets LLMs run code locally (Python, Javascript, Shell, etc.). After installation, run $ interpreter to chat with Open Interpreter through a ChatGPT-like interface in the terminal. (47.1K stars)

02 narwhals: Lightweight and Extensible Compatibility Layer for Polars, pandas, cuDF, Modin github.com

Seamlessly supports Polars, pandas, modin, and cuDF, using a subset of Polars API, using Polars expressions, with 100% branch coverage.

03 mantis: Security Framework for Auto-Discovery, Reconnaissance and Vulnerability Scanning github.com

A command-line framework for automatically scanning security vulnerabilities. Input a top-level domain, and it can discover corresponding subdomains and certificates for reconnaissance, then comprehensively scan for vulnerabilities, secrets, misconfigurations, and phishing domains.

04 FreeAskInternet: Free Private and Local Search Aggregator and Answer Generator github.com

When users ask a question, it searches with multiple engines and combines search results for LLM to generate answers based on search results. No GPU or OpenAI or Google API keys needed - completely free. Uses free ChatGPT3.5 / Qwen / Kimi / ZhipuAI (GLM) APIs, supports ollama, supports Docker deployment. (6.6K stars)

05 Django Learning Resources Compiled by PyCharm Blog blog.jetbrains.com

PyCharm is the most professional Python IDE, and its official blog frequently publishes technical articles and videos on YouTube. This article compiles some Django-related articles and video learning resources.

06 great-tables: Generate Informative and Beautiful Tables with Python github.com

The design philosophy of this library was shared earlier. It defines a series of components according to table parts, supporting flexible table layout adjustments. Uses Pandas or Polars DataFrame data as input.

07 jiaTansSSHAgent: Implementing Some XZ sshd Backdoor Functionality github.com

Recently there was explosive news about the "XZ backdoor incident." This project implements some backdoor functionality in Python, allowing you to explore them through SSH clients.

08 docx2python: Extract Headers, Footers, Text, Footnotes, Endnotes, Properties and Images from docx github.com

It can extract various elements from docx files into Python objects, including text and images, enabling content reading, insertion, modification, and other functions.

09 WechatMoments: WeChat Moments Export Tool github.com

A tool running on Windows that can backup and export Moments to HTML, download images/videos for permanent storage, and supports filtering exports by contacts and Moments time.

10 low_cost_robot: Ultra-Low-Cost Robotic Arm Implementation github.com

How much does it cost to assemble and control a robotic arm? This project's solution costs about $250, with support for adding another arm for a total of $430. Uses Dynamixel XL430 and Dynamixel XL330 servo motors. (2K stars)

11 drawpyo: Generate Draw.io Diagrams with Python github.com

Draw.io is a free online diagramming tool for creating flowcharts, organizational charts, UML diagrams, ER diagrams, network diagrams, etc. This library supports creating, adding objects, setting styles, and other functions.

12 drawdb: Free Intuitive Online Database Design Tool and SQL Generator github.com

A database entity relationship (DBER) editor in the browser that can build diagrams, export SQL scripts, customize editors, etc., without creating an account. (4.3K stars)

drawdb: Free Intuitive Online Database Design Tool and SQL Generator
🐢

Podcasts & Videos

× 2
01 Clone a Streaming ChatGPT with Django, Channels and HTMX youtube.com

This video clones ChatGPT using Django, websockets, and HTMX. Each feature is broken down into commits, with the video explaining code functionality and demonstrating effects.

02 2024 Data Science Learning Video Series youtube.com

This video series has 23 episodes, mainly aimed at beginners entering data science, covering Python programming basics, data analysis, data visualization, big data, machine learning, and other topics.

🐢

Book Giveaway

Irregular giveaway events! This week we're giving away 7 copies of "Python Crash Course (3rd Edition, Revised)". Drawing date: April 19th. Send the number "8046" to the Python Cat WeChat public account to get the lottery mini-program code.

This book is a classic for Python newcomers, covering all aspects of Python programming. The first half introduces basic knowledge and concepts: from installing Python and configuring development environments, to basic knowledge of lists, tuples, strings, dictionaries and various statements, to core concepts like abstraction, exceptions, methods, properties, iterators, Python integration with databases, networks, C language and other tools, as well as Python program testing, packaging, and publishing. The second half provides detailed introductions to the development process of several popular Python projects.

ESC
↑↓ select · ↵ open175 issues