Complete Guide to Using RPi.GPIO with Raspberry Pi 3

Complete Guide to Using RPi.GPIO with Raspberry Pi 3

Complete Guide to Using RPi.GPIO with Raspberry Pi 31. Introduction to RPi.GPIORPi.GPIO is a Python module designed specifically for the Raspberry Pi, allowing you to control the GPIO (General Purpose Input/Output) pins. Through these pins, you can connect various electronic components (such as LEDs, buttons, sensors, etc.) and control them to create various interesting projects.1.1 … Read more

Python Programming Tips – Lambda Functions and Filter

Python Programming Tips - Lambda Functions and Filter

Today, we will look at another exciting combination technique in Python. Let’s start with a pure music piece~ filter() is a built-in higher-order function in Python used to filter iterable objects (such as lists, tuples, etc.). By combining it with a lambda function, we can succinctly define filtering conditions. For example, filtering even numbers: numbers … Read more

Fundamentals of Python: Variables

Fundamentals of Python: Variables

Table of ContentsPart One: Basic Concepts of Variables What is a Variable Variable Naming Rules Basic Data Types Variable Assignment and Reassignment Part Two: In-Depth Data Types Numeric Types (Integer, Float, Complex) String Types Boolean Types Type Conversion Part Three: Advanced Variable Concepts Concept of Constants Multiple Assignments Variable Scope Basics of Memory Management Detailed … Read more

Python Learning Notes: Detailed Explanation of Class Methods and Static Methods

Python Learning Notes: Detailed Explanation of Class Methods and Static Methods

Hello everyone! Today I bring you the twenty-ninth learning note, which is still about basic knowledge. Let’s talk about two special methods in Python classes: class methods and static methods. These two methods are very practical in daily development and can help us better organize our code. 1. Static Methods: Utility Functions Independent of Class … Read more

Raspberry Pi Emo Desktop Robot

Raspberry Pi Emo Desktop Robot

Recently, I started working with the Raspberry Pi, a small yet powerful ARM-based computer board, which is the smallest board in the world capable of running an operating system. I have a Raspberry Pi 4B and have explored various applications of the Raspberry Pi. Recently, AI smart hardware has become quite popular, and the desktop … Read more

Exploring Python Programming for AI Chips

Exploring Python Programming for AI Chips

Exploring Python Programming for AI Chips In today’s technological era, artificial intelligence (AI) has become a hot topic. With the advancement of hardware technology, chips specifically designed for AI tasks are gradually coming into our view. These chips typically feature high performance and low power consumption, making them well-suited for applications such as deep learning … Read more

Exploring the Premium Course at ShanghaiTech University | Introduction to Information Science and Technology

Exploring the Premium Course at ShanghaiTech University | Introduction to Information Science and Technology

Click the blue text Follow us The premium course “Introduction to Information Science and Technology” (referred to as “Info Course”) at ShanghaiTech University is a mandatory general education course for all first-year students, established at the inception of the university. There are many mysterious legends surrounding the “Info Course” on campus. For students who have … Read more

How to Use Python to Write a Simple Game? Let Me Teach You!

How to Use Python to Write a Simple Game? Let Me Teach You!

Click the blue text above to follow us We hope that through this game programming, more parents and children can easily access youth programming, and further understand programming. Parents can learn and practice together with their children, observing their interest in programming, thus understanding whether their child has an interest in this area. We always … Read more

Good Morning | What is Python Programming?

Good Morning | What is Python Programming?

Friends who clicked in Are you also curious like me What is Python programming? Maybe we don’t know But the security guard definitely knows Which security guard? emmm The security guard from Peking University The security guard Xu Wenlong has a vocabulary of fifteen thousand words, and can converse in English with international students; Jiao … Read more

The Magic of Python’s lru_cache: Enhancing Function Performance

The Magic of Python's lru_cache: Enhancing Function Performance

The Magic of Python’s lru_cache: Enhancing Function Performance Dialogue Transcript Novice: (frustrated) Some of the functions I wrote take a long time to compute, and they have to recalculate every time they are called. Is there any way to optimize this? Expert: (with a mysterious smile) You must learn about the magical feature called lru_cache! … Read more