Skip to content

tamnd/Python-100-Days-English

Repository files navigation

Python - 100 Days from Beginner to Master

Author: Luo Hao

Note: If visiting GitHub is rather slow, you can follow my Zhihu account (Python-Jack). The Learn Python from Scratch column there, which corresponds to the first 20 days of this project, is more suitable for beginners. Other columns such as Data Thinking and Statistical Thinking, Data Analysis Based on Python, and An AI Journey Whenever You Want to Go are also being updated continuously. Everyone is welcome to follow, like, and comment. At present, the free QQ communication group is already overcrowded, and the messages are too messy, so there is no way to reply one by one. If you want to study together by daily check-in or need paid consultation, you can join the paid communication group. New users can pay through the QR code below and then add my personal WeChat (jackfrued). After that, I will invite everyone into the paid study check-in group. When adding me on WeChat, please note your name and your needs. I will provide help within my ability.

Some videos corresponding to this project have already been synced to Bilibili. If you are interested, please like, toss a coin, and follow. Give it the one-click triple support!

Python Application Areas and Career Development Analysis

Simply speaking, Python is an "elegant", "explicit", and "simple" programming language.

  • The learning curve is low, and even non-professionals can get started.
  • It is an open-source system and has a powerful ecosystem.
  • It is an interpreted language with perfect platform portability.
  • It is a dynamically typed language that supports both object-oriented and functional programming.
  • Its code style is highly standardized and very readable.

Python can show its ability in the following fields.

  • Backend development - Python / Java / Go / PHP
  • DevOps - Python / Shell / Ruby
  • Data collection - Python / C++ / Java
  • Quantitative trading - Python / C++ / R
  • Data science - Python / R / Julia / Matlab
  • Machine learning - Python / R / C++ / Julia
  • Automated testing - Python / Shell

As a Python developer, according to your personal preferences and career planning, there are also very many employment fields you can choose from.

  • Python backend engineer (servers, cloud platforms, data APIs)
  • Python operations engineer (automated operations, SRE, DevOps)
  • Python data analyst (data analysis, business intelligence, digital operations)
  • Python data scientist (machine learning, deep learning, algorithm specialist)
  • Python crawler engineer (this track is not recommended!!!)
  • Python test engineer (automated testing, test development)

Note: At present, the data science track is a very hot direction, because no matter whether it is the internet industry or traditional industries, they have already accumulated a large amount of data. All walks of life need data scientists to discover more business value from the existing data, so as to provide data support for enterprise decisions. This is what is called data-driven decision-making.

Several suggestions for beginners:

  • Make English your working language.
  • Practice makes perfect.
  • All experience comes from the mistakes you've made.
  • Don't be a freeloader.
  • Embrace AI to boost your productivity.

Day01~20 - Python Language Basics

  1. Introduction to Python
    • A brief history of Python
    • Pros and cons of Python
    • Python application areas
  2. Installing the Python environment
    • Windows environment
    • macOS environment
  1. Tools for writing code
  2. Hello, world
  3. Commenting your code
  1. Some basic common sense
  2. Variables and types
  3. Variable naming
  4. Using variables
  1. Arithmetic operators
  2. Assignment operators
  3. Comparison operators and logical operators
  4. Applications of operators and expressions
    • Fahrenheit and Celsius conversion
    • Calculating the circumference and area of a circle
    • Determining whether a year is a leap year

Day05 - Branching

  1. Building branching structures with if and else
  2. Building branching structures with match and case
  3. Applications of branching structures
    • Evaluating a piecewise function
    • Converting percentage grades into grade levels
    • Calculating the perimeter and area of a triangle

Day06 - Loops

  1. for-in loops
  2. while loops
  3. break and continue
  4. Nested loop structures
  5. Applications of loops
    • Determining prime numbers
    • Greatest common divisor
    • Guess-the-number game
  1. Example 1: Prime numbers within 100
  2. Example 2: Fibonacci sequence
  3. Example 3: Finding narcissistic numbers
  4. Example 4: The hundred-chickens problem
  5. Example 5: The CRAPS gambling game
  1. Creating lists
  2. List operations
  3. Traversing elements
  1. List methods
    • Adding and deleting elements
    • Element positions and frequencies
    • Sorting and reversing elements
  2. List comprehensions
  3. Nested lists
  4. Applications of lists
  1. Tuple definition and operations
  2. Packing and unpacking
  3. Swapping variable values
  4. Comparing tuples and lists
  1. Defining strings
    • Escape characters
    • Raw strings
    • Special character representations
  2. String operations
    • Concatenation and repetition
    • Comparison operations
    • Membership operations
    • Getting string length
    • Indexing and slicing
  3. Traversing characters
  4. String methods
    • Case conversion
    • Search operations
    • Property checks
    • Formatting
    • Trimming
    • Replacing
    • Splitting and joining
    • Encoding and decoding
    • Other methods
  1. Creating sets
  2. Variables of elements
  3. Set operations
    • Membership operations
    • Binary operations
    • Comparison operations
  4. Set methods
  5. Immutable sets
  1. Creating and using dictionaries
  2. Dictionary operations
  3. Dictionary methods
  4. Applications of dictionaries
  1. Defining functions
  2. Function parameters
    • Positional arguments and keyword arguments
    • Default values for arguments
    • Variable-length arguments
  3. Managing functions with modules
  4. Modules and functions in the standard library
  1. Example 1: Random verification code
  2. Example 2: Determining prime numbers
  3. Example 3: Greatest common divisor and least common multiple
  4. Example 4: Data statistics
  5. Example 5: Random double-color ball number selection
  1. Higher-order functions
  2. Lambda functions
  3. Partial functions
  1. Decorators
  2. Recursive calls
  1. Classes and objects
  2. Defining classes
  3. Creating and using objects
  4. Initialization methods
  5. The pillars of object orientation
  6. Object-oriented cases
    • Example 1: A digital clock
    • Example 2: A point on a plane
  1. Visibility and property decorators
  2. Dynamic attributes
  3. Static methods and class methods
  4. Inheritance and polymorphism
  1. Poker game
  2. Payroll settlement system

Day21~30 - Python Language Applications

  1. Opening and closing files
  2. Reading and writing text files
  3. Exception-handling mechanisms
  4. Context-manager syntax
  5. Reading and writing binary files
  1. JSON overview
  2. Reading and writing JSON data
  3. The pip package-management tool
  4. Getting data through web APIs
  1. Introduction to CSV files
  2. Writing data to CSV files
  3. Reading data from CSV files
  1. Introduction to Excel
  2. Reading Excel files
  3. Writing Excel files
  4. Adjusting styles
  5. Formula calculation
  1. Introduction to Excel
  2. Reading Excel files
  3. Writing Excel files
  4. Adjusting styles
  5. Generating statistical charts
  1. Working with Word documents
  2. Generating PowerPoint presentations
  1. Extracting text from PDF files
  2. Rotating and overlaying pages
  3. Encrypting PDF files
  4. Batch watermarking
  5. Creating PDF files
  1. Introductory concepts
  2. Processing images with Pillow
  3. Drawing with Pillow
  1. Sending email
  2. Sending text messages
  1. Knowledge related to regular expressions
  2. Python support for regular expressions
    • Example 1: Input validation
    • Example 2: Content extraction
    • Example 3: Content replacement
    • Example 4: Long-sentence splitting

Day31~35 - Other Related Content

  1. Important knowledge points
  2. Data structures and algorithms
  3. Ways of using functions
  4. Object-oriented knowledge
  5. Iterators and generators
  6. Concurrent programming
  1. Using HTML tags to carry page content
  2. Rendering pages with CSS
  3. Handling interactive behavior with JavaScript
  4. Introduction to Vue.js
  5. Using Element
  6. Using Bootstrap
  1. History of operating-system development and an overview of Linux
  2. Basic Linux commands
  3. Utilities in Linux
  4. The Linux file system
  5. Applications of the Vim editor
  6. Environment variables and shell programming
  7. Software installation and service configuration
  8. Network access and management
  9. Other related content

Day36~45 - Database Basics and Advanced Topics

  1. Overview of relational databases
  2. Introduction to MySQL
  3. Installing MySQL
  4. Basic MySQL commands
  1. Creating databases and tables
  2. Dropping tables and modifying tables
  1. insert operations
  2. delete operations
  3. update operations
  1. Projection and aliases
  2. Filtering data
  3. Null handling
  4. Deduplication
  5. Sorting
  6. Aggregate functions
  7. Nested queries
  8. Grouping
  9. Table joins
    • Cartesian product
    • Inner join
    • Natural join
    • Outer join
  10. Window functions
  • Defining windows
  • Ranking functions
  • Value-retrieval functions
  1. Creating users
  2. Granting privileges
  3. Revoking privileges
  • JSON type
  • Window functions
  • Common table expressions
  1. Views
    • Usage scenarios
    • Creating views
    • Usage restrictions
  2. Functions
    • Built-in functions
    • User-defined functions (UDF)
  3. Procedures
    • Creating procedures
    • Calling procedures

Day43 - Indexes

  1. Execution plans
  2. Principles of indexing
  3. Creating indexes
    • Regular indexes
    • Unique indexes
    • Prefix indexes
    • Composite indexes
  4. Points to note
  1. Installing third-party libraries
  2. Creating a connection
  3. Getting a cursor
  4. Executing SQL statements
  5. Fetching data through a cursor
  6. Transaction commit and rollback
  7. Releasing connections
  8. Writing ETL scripts
  1. Overview of Hive
  2. Environment setup
  3. Common commands
  4. Basic syntax
  5. Table-creation operations
  6. Writing data
  7. Common functions
  8. Grouping and aggregation
  9. Sampling operations
  10. Sorting operations
  11. Lateral expansion
  12. Performance optimization

Day46~60 - Django in Practice

  1. How web applications work
  2. HTTP requests and responses
  3. Overview of the Django framework
  4. A quick start in 5 minutes
  1. Relational-database configuration
  2. Using the ORM to complete CRUD operations on models
  3. Using the admin backend
  4. Django model best practices
  5. Model-definition reference
  1. Loading static resources
  2. Ajax overview
  3. Using Ajax to implement voting
  1. Implementing user tracking
  2. The relationship between cookies and sessions
  3. Django framework support for sessions
  4. Reading and writing cookies in view functions
  1. Modifying response headers through HttpResponse
  2. Using StreamingHttpResponse to handle large files
  3. Using xlwt to generate Excel reports
  4. Using reportlab to generate PDF reports
  5. Using ECharts to generate frontend charts
  1. Configuring logs
  2. Configuring Django Debug Toolbar
  3. Optimizing ORM code
  1. What middleware is
  2. Built-in middleware in Django
  3. Custom middleware and its application scenarios
  1. Returning JSON-format data
  2. Rendering pages with Vue.js
  1. Overview of REST
  2. Getting started with the DRF library
  3. Frontend-backend separation development
  4. Applications of JWT
  1. Using CBV
  2. Data pagination
  3. Data filtering
  1. The first law of website optimization
  2. Using Redis to provide caching services in Django projects
  3. Reading and writing cache in view functions
  4. Using decorators to implement page caching
  5. Providing caching services for data APIs
  1. File-upload form controls and image preview
  2. How the server handles uploaded files
  1. The second law of website optimization
  2. Configuring a message queue service
  3. Using Celery in a project to make tasks asynchronous
  4. Using Celery in a project to implement scheduled tasks

Day59 - Unit Testing

  1. Unit testing in Python
  2. Django framework support for unit testing
  3. Using version-control systems
  4. Configuring and using uWSGI
  5. Separating dynamic and static resources and configuring Nginx
  6. Configuring HTTPS
  7. Configuring domain-name resolution

Day61~65 - Web Data Collection

  1. The concept of web crawlers and their application areas
  2. Discussion of the legality of web crawlers
  3. Tools related to developing web crawlers
  4. The structure of a crawler program

Day62 - Data Fetching and Parsing

  1. Using the requests third-party library to fetch data
  2. Three ways to parse pages
    • Regular-expression parsing
    • XPath parsing
    • CSS-selector parsing

Day63 - Concurrent Programming in Python

  1. Multithreading
  2. Multiprocessing
  3. Asynchronous I/O
  1. Installing Selenium
  2. Loading pages
  3. Finding elements and simulating user behavior
  4. Implicit waits and explicit waits
  5. Executing JavaScript code
  6. Breaking anti-crawler protections with Selenium
  7. Setting up a headless browser
  1. Core Scrapy components
  2. The Scrapy workflow
  3. Installing Scrapy and creating a project
  4. Writing spider programs
  5. Writing middleware and pipeline programs
  6. Scrapy configuration files

Day66~80 - Python Data Analysis

  1. Responsibilities of a data analyst
  2. The skill stack of a data analyst
  3. Data-analysis libraries
  1. Installing and using Anaconda
    • Commands related to conda
  2. Installing and using JupyterLab
    • Installation and startup
    • Useful tips
  1. Creating array objects
  2. Properties of array objects
  3. Indexing operations on array objects
    • Regular indexing
    • Fancy indexing
    • Boolean indexing
    • Slice indexing
  4. Case study: using arrays to process images
  1. Methods related to array objects
    • Obtaining descriptive statistics
    • Other related methods
  1. Array operations
    • Operations between arrays and scalars
    • Operations between arrays
  2. Universal unary functions
  3. Universal binary functions
  4. Broadcasting
  5. Common NumPy functions
  1. Vectors
  2. Determinants
  3. Matrices
  4. Polynomials
  1. Creating Series objects
  2. Operations on Series objects
  3. Properties and methods of Series objects
  1. Creating DataFrame objects
  2. Properties and methods of DataFrame objects
  3. Reading and writing data in DataFrame
  1. Data reshaping
    • Data concatenation
    • Data merging
  2. Data cleaning
    • Missing values
    • Duplicate values
    • Outliers
    • Preprocessing
  1. Data pivoting
    • Obtaining descriptive statistics
    • Sorting and top values
    • Grouping and aggregation
    • Pivot tables and crosstabs
  2. Data presentation
  1. Calculating year-over-year and period-over-period changes
  2. Window calculations
  3. Determining correlations
  1. Using indexes
    • Range indexes
    • Categorical indexes
    • Multi-level indexes
    • Interval indexes
    • Date-time indexes
  1. Installing and importing matplotlib
  2. Creating the canvas
  3. Creating the axes
  4. Drawing charts
    • Line charts
    • Scatter charts
    • Bar charts
    • Pie charts
    • Histograms
    • Box plots
  5. Displaying and saving charts
  1. Advanced charts
    • Bubble charts
    • Area charts
    • Radar charts
    • Rose charts
    • 3D charts
  1. Seaborn
  2. Pyecharts

Day81~90 - Machine Learning

  1. History of artificial intelligence
  2. What machine learning is
  3. Machine-learning application areas
  4. Classifications of machine learning
  5. The steps of machine learning
  6. A first machine-learning exercise
  1. Distance measurement
  2. Introduction to the dataset
  3. Implementing kNN classification
  4. Model evaluation
  5. Parameter tuning
  6. Implementing kNN regression
  1. Building decision trees
    • Feature selection
    • Data splitting
    • Tree pruning
  2. Implementing a decision-tree model
  3. Overview of random forests
  1. Bayes' theorem
  2. Naive Bayes
  3. Algorithm principles
    • Training stage
    • Prediction stage
    • Code implementation
  4. Advantages and disadvantages of the algorithm
  1. Categories of regression models
  2. Calculating regression coefficients
  3. Introduction to a new dataset
  4. Code implementation of linear regression
  5. Evaluation of regression models
  6. Introducing regularization terms
  7. Another implementation of linear regression
  8. Polynomial regression
  9. Logistic regression
  1. Algorithm principles
  2. Mathematical description
  3. Code implementation
  1. Categories of algorithms
  2. AdaBoost
  3. GBDT
  4. XGBoost
  5. LightGBM
  1. Basic composition
  2. Working principles
  3. Code implementation
  4. Advantages and disadvantages of the model
  1. Bag-of-words model
  2. Word vectors
  3. NPLM and RNN
  4. Seq2Seq
  5. Transformer
  1. Data exploration
  2. Feature engineering
  3. Model training
  4. Model evaluation
  5. Model deployment
  1. Software process models

    • Classical process model (waterfall model)

      • Feasibility analysis (study whether to do it or not), output: "Feasibility Analysis Report"
      • Requirements analysis (study what to build), output: "Requirements Specification" and product-interface prototypes
      • High-level design and detailed design, output: conceptual model diagrams (ER diagrams), physical model diagrams, class diagrams, sequence diagrams, and so on
      • Coding / testing
      • Release / maintenance

      The biggest disadvantage of the waterfall model is that it cannot embrace changing requirements. You only see the product after the entire process is finished, which lowers team morale.

    • Agile development (Scrum) - product owner, Scrum Master, developers - Sprint

      • Product backlog (user stories, product prototypes)
      • Planning meetings (estimation and budgeting)
      • Daily development (stand-up meetings, Pomodoro technique, pair programming, test-first development, code refactoring, and so on)
      • Bug fixing (issue description, reproduction steps, tester, assignee)
      • Version releases
      • Review meetings (showcase, with user participation)
      • Retrospective meetings (summarize the current iteration cycle)

      Supplement: Manifesto for Agile Software Development

      • Individuals and interactions over processes and tools
      • Working software over comprehensive documentation
      • Customer collaboration over contract negotiation
      • Responding to change over following a plan

      Roles: product owner (decides what to build and has the authority to finalize requirements), team lead (solves various problems, focuses on improving the way the team works, and shields the development team from outside interference), development team (project executors, specifically developers and testers).

      Preparatory work: business case and funding, contracts, vision, initial product requirements, initial release plan, equity allocation, team formation.

      Agile teams usually have 8-10 people.

      Workload estimation: quantify development tasks, including prototypes, logo design, UI design, frontend development, and so on. Break each item down to the smallest task unit possible; the standard is that the smallest task should not take more than two days. Then estimate the total project duration. Put each task on the task board, which is divided into three parts: to do, in progress, and done.

  2. Building the project team

    • Team composition and roles

      company_architecture

    • Programming standards and code review (flake8, pylint)

    • Some "conventions" in Python (please refer to Python Programming Conventions - How to Write Pythonic Code)

    • Factors that affect code readability:

      • Too few comments or no comments
      • Code breaks the best practices of the language
      • Anti-pattern programming (spaghetti code, copy-paste programming, arrogant programming, ...)
  3. Introduction to team-development tools

    Please refer to Problems and Solutions in Team Project Development.

Project Topic Selection and Understanding the Business
  1. Defining the topic scope

    • CMS (client side): news aggregation websites, Q&A / sharing communities, movie-review / book-review websites, and so on
    • MIS (client side + admin side): KMS, KPI assessment systems, HRS, CRM systems, supply-chain systems, warehouse-management systems, and so on
    • App backends (admin side + data APIs): second-hand trading, newspapers and magazines, niche e-commerce, news and information, travel, social apps, reading apps, and so on
    • Other types: your own industry background and work experience, and business domains that are easier to understand and control
  2. Understanding requirements, dividing modules, and assigning tasks

    • Requirement understanding: brainstorming and competitor analysis
    • Module division: draw mind maps (XMind). Each module is a branch node, and each concrete function is a leaf node (expressed with verbs). Ensure that each leaf node cannot be split into new nodes. Determine the importance, priority, and workload of each leaf node.
    • Task assignment: the project lead assigns tasks to each team member based on the above indicators.

  3. Creating the project schedule (updated daily)

    Module Function Member Status Done Hours Planned Start Actual Start Planned End Actual End Notes
    Comments Add comment Wang Dachui In progress 50% 4 2018/8/7 2018/8/7
    Delete comment Wang Dachui Waiting 0% 2 2018/8/7 2018/8/7
    View comment Bai Yuanfang In progress 20% 4 2018/8/7 2018/8/7 Code review needed
    Comment voting Bai Yuanfang Waiting 0% 4 2018/8/8 2018/8/8
  4. OOAD and database design

    • UML class diagrams

      uml

    • Creating tables from models (forward engineering)

      For example, in a Django project you can create database tables with the commands below.

      python manage.py makemigrations app
      python manage.py migrate
    • Using PowerDesigner to draw physical model diagrams

    • Creating models from database tables (reverse engineering)

      For example, in a Django project you can generate models with the command below.

      python manage.py inspectdb > app/models.py
  1. Introduction to Docker
  2. Installing Docker
  3. Creating containers with Docker (Nginx, MySQL, Redis, Gitlab, Jenkins)
  4. Building Docker images (writing Dockerfiles and related directives)
  5. Container orchestration (Docker Compose)
  6. Cluster management (Kubernetes)
  1. Basic principles
  2. The InnoDB engine
  3. Using indexes and the points to note
  4. Data partitioning
  5. SQL optimization
  6. Configuration optimization
  7. Architecture optimization
  1. Design principles
    • Key issues
    • Other issues
  2. Writing documentation
Common Issues in Project Development
  1. Database configuration (multiple databases, master-slave replication, database routing)
  2. Cache configuration (partitioned caching, key settings, timeout settings, master-slave replication, failover with Sentinel)
  3. Logging configuration
  4. Analysis and debugging (Django Debug Toolbar)
  5. Useful Python modules (date calculation, image processing, data encryption, third-party APIs)
REST API Design
  1. RESTful architecture
  2. Writing API interface documentation
  3. Applying django-REST-framework
Analysis of Key and Difficult Points in the Project
  1. Using caching to reduce database pressure - Redis
  2. Using message queues to decouple services and smooth traffic peaks - Celery + RabbitMQ
Unit Testing
  1. Types of testing
  2. Writing unit tests (unittest, pytest, nose2, tox, ddt, and so on)
  3. Test coverage (coverage)
Deploying Django Projects
  1. Preparations before deployment
    • Key settings (SECRET_KEY / DEBUG / ALLOWED_HOSTS / cache / database)
    • HTTPS / CSRF_COOKIE_SECURE / SESSION_COOKIE_SECURE
    • Log-related configuration
  2. Review of common Linux commands
  3. Installation and configuration of common Linux services
  4. Using uWSGI / Gunicorn and Nginx
    • Comparison between Gunicorn and uWSGI
      • For simple applications that do not need a lot of customization, Gunicorn is a good choice. The learning curve of uWSGI is much steeper than Gunicorn, and Gunicorn's default parameters can already fit most applications.
      • uWSGI supports heterogeneous deployment.
      • Because Nginx itself supports uWSGI, in production Nginx and uWSGI are usually deployed together, and uWSGI is a full-featured and highly customizable WSGI middleware.
      • In performance, Gunicorn and uWSGI are actually quite close.
  5. Deploying test and production environments with virtualization technology (Docker)
Performance Testing
  1. Using AB
  2. Using SQLslap
  3. Using sysbench
Automated Testing
  1. Using Shell and Python for automated testing
  2. Using Selenium for automated testing
    • Selenium IDE
    • Selenium WebDriver
    • Selenium Remote Control
  3. Introduction to Robot Framework
  1. Business models and key requirements
  2. Physical-model design
  3. Third-party login
  4. Cache preheating and query caching
  5. Shopping-cart implementation
  6. Payment integration
  7. Flash-sale and overselling issues
  8. Static-resource management
  9. Full-text search solutions
  1. MySQL database tuning
  2. Web-server performance optimization
    • Nginx load-balancing configuration
    • Using Keepalived to achieve high availability
  3. Code performance tuning
    • Multithreading
    • Asynchronization
  4. Static-resource access optimization
    • Cloud storage
    • CDN
  1. Computer-science fundamentals
  2. Python fundamentals
  3. Questions related to web frameworks
  4. Questions related to crawlers
  5. Data analysis
  6. Project-related questions
  • Interview handbooks
    • Python interview handbook
    • SQL interview handbook (for data analysts)
    • Business-analysis interview handbook
    • Machine-learning interview handbook
  • Mathematical foundations of machine learning
  • Deep learning
    • Computer vision
    • Large language models

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors