Recommended: a beginner's project for beginners in Python

With the rise of artificial intelligence, there is a upsurge of Python learning in China. Most entry-level programming languages choose Python. Experienced programmers also begin to learn Python.

A Python primer try their projects, there has been no and recommend, the open source project or a book, the book's biggest feature is that each chapter is written by an open source in the field of the Daniel, each chapter contains a program implementation, these programs within 500 Lines of code, so the book called - "500 Lines or Less".e5e629280f2f4af3be7329688ffad51e.jpg

The book, named 500lines on GitHub, now has 20,344 stars and 4,697 forks.

Although this book is about the introduction to Python, in fact, not all code is written in Python, and some projects are written in Ruby, C, JavaScript, etc. In fact, the focus of this book is not on the programming language, but on the design decisions and trade-offs programmers make when writing code:

Why use these specific interfaces to divide your application into specific modules?
Why inheritance here and encapsulation there?
How do you predict where your program might need to extend, and how do you make it easy for programmers to implement?cca08cb237de4f36a11845814cdcd3dd.jpg

There are 22 projects in the book. Here are some of them:

(1) Blockcode: A visual programming toolkita87bb773d66d48158d86ff0023ec7a56.jpg
This project is mainly implemented by turtle graphics block language, which creates patterns by simple drag and drop. The whole process is realized by common Html, CSS and JavaScript (each block is composed of Html elements, CSS is used to set styles, and JavaScript time processor is used to drag and drop and modify parameters). Belongs to the picture programming one kind.

(2) A Continuous Integration System
A continuous integration (CI) system is a proprietary system written in Python for testing new code. This project USES Git as a repository for test code. However, it only USES standard source code management calls, which is fine if you are not familiar with Git but are familiar with other version control systems (VCS) such as SVN or Mercurial. The system has three main functions: obtaining the changed code, automatically testing the code, and generating test reports.

(3) Clustering by Consensus (distributed system)
Distributed system paxos principles and implementation, and use some tips to help you as much as possible to reduce and find, fix bugs and special development debugging skills.

(4) Contingent: A Fully Dynamic Build System
Build a documentation system using python.

(5) A Web Crawler With asyncio Coroutines
Hundreds of lines of code to implement a simple Web crawler.

(6)Dagoba: an in-memory graph database
This project is mainly about how to build a graphics database through JavaScript.

(7) DBDB: Dog Bed Database (non-relational Database of key-value)
DBDB (Dog Bed Database) is a Python library that implements a simple key-value non-relational Database designed to protect data when a computer crashes or reports an error.

(8) A Flow Shop Scheduler
Flow Shop scheduling problem: find the global optimal solution from the local optimal solution with a small amount of code through some functional features of Python.

(9) Making Your Own Image Filters
d6c67b0e5f4f46059e0e99ba5e29bd47.jpg
Create an image filter through Processing, a programming language and development environment built in Java.

(10) A Python Interpreter Written in Python
Byterun is a Python interpreter implemented in Python, this project is mainly to help you understand the structure of the interpreter.

(11) A 3D Modeller
Python to achieve a 3D design, display to the screen, can interact.

(12) A-simple-object-model
This chapter explores the implementation of a very simple object model. The code is suitable for Python 2.7 and 3.4, and object model testing is introduced for better understanding.

(13) Optical Character Recognition (OCR)
One well-known application of AI is optical character recognition (OCR). OCR system is a kind of software, this project will use neural network (ANN) to build an OCR system.

(14) A Pedometer in the Real World
How do you use Ruby to build a basic pedometer and add a Web layer to your code to provide a user-friendly UI.

(15) The same-origin Policy (SOP)
SOP is an important part of every modern browser security mechanism. The project builds an SOP model using Alloy, a language for modeling and analyzing software design.

(16) Description A Rejection Sampler
This project will be implemented through Python programming on terms such as sampling, multinomial distribution, random distribution, and so on.

(17) Web Spreadsheet
This project takes just 99 lines of HTML, CSS, and JS code to write a Web spreadsheet

(18) Static Analysis
Julia code to write static analysis tools, one type based static analysis tools, one variable based static analysis tools.

(19) A Template Engine
An important stage in any Web application is to generate the HTML to be provided to the browser. This project USES Python to build a simple template engine that parses static variables and simple statements in HTML.

(20) A Simple Web Server
Build a simple Web server using Python.

(21) An event-driven Web Framework
Build a Web framework in Common Lisp to solve the problem of in-game interaction.

(22) An Archaeology-Inspired Database
488 lines of Clojure source code build the database, where 73 lines are blank and 55 lines are docstrings.

Write in the last:
If you are interested in this book, you can read it for free through the official link, buy the original paperback or PDF version, and get the source code of these 22 projects directly on GitHub.

Read online address: http://aosabook.org/en/index.htmlGitHub address: https://github.com/aosabook/500lines

In order to make domestic developers better understand and read, someone has opened an open source 500 line or less Chinese translation version -- "500LineorLess_CN" on GitHub.

The Chinese version of making address (pending) : https://github.com/HT524/500LineorLess_CN

H2
H3
H4
3 columns
2 columns
1 column
Join the conversation now