Python | Typhoon GPI | Potential Intensity

Python | Typhoon GPI | Potential Intensity

Typhoon “Capricorn” The “Capricorn” typhoon passed… Lin Daiyu pulling down the willow GPI I often see or hear about GPI in some articles and group meetings, but I never knew what it was, so I spent half an hour to understand it. Genesis Potential Index (GPI) is an index used to predict the likelihood of … Read more

Introduction to Tkinter and Python GUI Programming

Introduction to Tkinter and Python GUI Programming

As a well-known Python blogger, I will organize this article about Tkinter GUI programming, suitable for WeChat public account publishing format. Introduction: Why Choose Tkinter? Tkinter is the standard GUI library for Python, included in the Python installation package, requiring no additional installation. It is easy to learn and powerful, making it the best choice … Read more

Python – Chapter 2: Comments

Python - Chapter 2: Comments

Python – Chapter 2: Comments Comments are a very important part of code; they are used to explain the purpose of the code, helping others or oneself to understand the logic of the code in the future. In Python, comments are not executed by the Python interpreter; they are merely auxiliary information for programmers to … Read more

Learning Python (Part 2) – Basic Syntax

Learning Python (Part 2) - Basic Syntax

As a data analyst, have you encountered these scenarios: You receive a messy dataset and want to quickly extract key information but get stuck on string processing; while cleaning data with pandas, you cause feature extraction chaos due to list slicing errors; when writing analysis scripts, you mess up category mapping because you’re not familiar … Read more

Python GUI Programming (Tkinter and Python Programming)

Python GUI Programming (Tkinter and Python Programming)

Python GUI Programming (Tkinter and Python Programming) This section will first introduce general GUI programming, and then focus on how to create Python GUI applications using Tkinter and its components. Tkinter Module: Adding Tk to Your Application So what do you need to do to make Tkinter a part of your application? First, an existing … Read more

Introduction to Python: Functions

Introduction to Python: Functions

Functions are organized, reusable code blocks that implement a single or related functionality. Functions enhance the modularity of applications and the reusability of code. Python provides many built-in functions, such as print(). However, you can also create your own functions, known as user-defined functions. Table of Contents 1. What is a Function 2. Defining and … Read more

How to Create Beautiful Architecture Diagrams with Python – Super Easy!

How to Create Beautiful Architecture Diagrams with Python - Super Easy!

Source: Internet > Build with the code from the gist linked here. Some Background Story Earlier, I stumbled upon a striking and interesting Python library: diagrams, which creates diagrams with the same name. The generated diagrams are usually created by pasting awkward images into draw.io or Google Diagrams.Then, I wasted a lot of time aligning … Read more

Example of Communication Between Qt C++ and Python Using Shared Memory

Example of Communication Between Qt C++ and Python Using Shared Memory

Below is a complete example of implementing communication between Qt C++ and Python using shared memory. This example consists of two parts: a Qt C++ application as the writer and a Python script as the reader. Qt C++ Writer (SharedMemoryWriter) // main.cpp#include <QCoreApplication>#include <QSharedMemory>#include <QBuffer>#include <QDataStream>#include <QDebug>#include <QThread> int main(int argc, char *argv[]){ QCoreApplication a(argc, … Read more

Example of Communication Between Qt C++ and Python Using ZMQ

Example of Communication Between Qt C++ and Python Using ZMQ

Below is a complete example demonstrating how to use ZeroMQ for communication between a Qt C++ application and a Python script. This example uses the REQ-REP pattern, where the Qt C++ client sends requests to the Python server and receives responses. Preparation First, install the necessary dependencies: # Install ZeroMQ C++ library sudo apt-get install … Read more

Performance Leap: How to Build High-Performance Python Modules with Rust

Performance Leap: How to Build High-Performance Python Modules with Rust

Introduction Python, as a flexible and easy-to-use programming language, is loved by developers. However, when dealing with compute-intensive tasks, Python’s performance bottlenecks can often be frustrating. At this point, the Rust language, with its excellent performance and memory safety features, becomes an ideal choice for extending Python. With tools like PyO3 and maturin, we can … Read more