Python learning process

Source: Internet
Author: User
Tags openssl snmp syslog saltstack

1 week the 1th day is mainly variable learning (November 8)

1.1 Python installation (under Win and Linux)
1.2 Ipython Installation and use
1.3 Definition of variables
1.4 Assigning values to variables
1.5 Operators (Assignment, arithmetic, relationship, logic)
1.6 Expressions
Related exercises: 1) write a arithmetic that requires reading the number 2 from the keyboard to realize the difference between input () and raw_input ()
Extended knowledge: decimal and hexadecimal conversions, decimals and strings to each other, int (), Hex (), str ()

1 week 2nd Day Data type (November 9)

1.1 Numeric types (integer, long, float, plural)
1.2 String type of sequence (use of quotation marks, subscript and slice)
1.3 Tuple of sequences
1.4 List of sequences (add, delete, change, check and some methods, experience the method of the object)
1.5 Getting Help
Use the help command under 1.5.1 Ipython for information
1.5.2 Https://docs.python.org/2/library
1.6 Related exercises: 1) Convert a string into a list---list () function 2) the join () method that converts a string---string
Extended knowledge: Remove duplicate elements from the list and experience the use of set ()

1 Week 3rd day Dictionary study (November 10)

Instructions: 2.9 and 3.0 are arranged in front of the study
1.8 Dictionaries
1.9 Dictionary Exercises
2.9 Data type conversions (Compute MAC addresses)
3.0 Data type conversions (lists and dictionaries convert each other)
Knowledge Extension: Save 2 lists in a dictionary, where each element of a list is the key of the dictionary, and the elements of the other list are the value of the dictionary. Mastering the use of the Dict () function

1-week 4th Day Process Control (November 11)

2.0/2.1 Process Control-if condition
2.2 Process Control-for sequence
2.3 Process Control-for dictionary
2.4 Loop exit
Related exercises: printing multiplication tables

1 week 5th day Process Control Part II (November 12)

Description: Saturday should not have scheduled tasks, but in order to correspond to good weeks, extra to arrange a day for the task.
2.5 Process Control-while
2.6 Traversing a file with a for loop
2.7 Traversing a file using a while loop
2.8 Statistical system remaining memory
Related exercises: Statistical system of free memory
Extended Exercise: Count the memory and percentage of Apache processes

2-week 1th Day function (November 14)

1.1 Function definitions
1.2 Function parameters
1.3 Function Default Parameters
1.4 Variables of the function
1.5 function return value
1.6 Multi-type pass-through values and redundancy parameters
Related exercises: 1) Determine if a string is a pure number, use the function 2) and use the IsDigit () method of the string to reconstruct the above example

2 week 2nd day function Part II (November 15)

1.7 Recursive invocation of functions
1.8 Recursively list files in a directory
1.9 Anonymous functions
Related exercises: Recursively list all files in a directory
Python's Exercises Links: http://ask.apelearn.com/question/15707

2 week 3rd day built-in functions and modules (November 16)

2.0-2.4 built-in functions
2.5-2.6 Use of modules

2-Week 4th-day object-oriented programming (November 17)

2.7 Object-oriented introduction
Properties of Class 2.8
Method of Class 2.9
Built-in Methods for class 3.0

2 week 5th Day object-oriented Programming Part II (November 18)

Inheritance of the 3.1/3.2 class
Summary of the 3.3/3.4 class
3.5-3.8 RC Script
Related exercises: Use the class to create an RC script, taking memcached as an example. Through this example, there is a certain understanding of the use of classes, deepening and consolidating some concepts about classes.
Posts http://ask.apelearn.com/question/15734

3 Week 1th Day

1.1 Python handles standard input
1.2 Some methods of file processing
1.3 Python handles standard output
Knowledge Point expansion: Built-in variable __file__
Job Exercise: Use Python to implement commands like tee.
Posts http://ask.apelearn.com/question/15750

3 Week 2nd day

1.4/1.5 Simple WC Command implementation
1.6 Using the Optparse module for WC commands
1.7 Using Functions in WC commands
Homework Exercise: Write a program statistics file size, for example: 1.py [-h] FileName
Supports the-H option to display file files in a readable manner, 1-1024b directly displays file sizes, such as 100. The 1k-1m is shown in unit K, for example 10K. The 1m-1g is displayed in units m, for example 10M.

3 Week 3rd Day

1.8 python version of the WC command
1.9 Understanding __name__ built-in variables
2.0 Extending the WC command
Job Exercise: Use Python to implement commands like Tee-a
http://ask.apelearn.com/question/15775

3 Week 4th Day

1.1 Hashlib Module Use
1.2 Os.walk Module Use
1.3 Understanding Generator Yield
Homework Exercise: Find the top 10 files in the directory that occupy a large space.
Extended exercise (optional): Try to write a program that is the same as the Os.walk function.

3 Week 5th day (11.25)

1.4 Practice file MD5 worth checking
1.5 Dictionary Sort
1.6 Python calls external commands
Related exercises: Use the methods described in the course to execute the ifconfig and Chown commands to realize the results of each execution
http://ask.apelearn.com/question/15792

4 Week 1th Day (11.28)

1.7 Python exception handling
1.8 Custom Exceptions
1.9 subprocess Module use
Practice Homework: Write a program to display the contents of the file, ask the program to take a parameter, if there is no parameter hint and exit, if the file does not exist prompt exit, if not the standard file prompt exit, use exception handling.
http://ask.apelearn.com/question/15812

4 Week 2nd day (November 29)

2.0 Judging a string is a number
2.1 Statistics Apache process occupies physical memory
2.2-2.3 Dmidecode System Information
Related exercises: Execute dmidecode command in Python and save to file

4 Week 3rd day November 30

2.4-2.5 Collecting IP information
2.6-2.8 Collecting host information
Homework Exercise: 1) Collect host MAC address. Prompt to use tcpdump-nn-i eth0 Port 68-l 2) application environment, used in kickstart centralized deployment
http://ask.apelearn.com/question/15824

4 Week 4th day (December 1)

2.9 Regular Expressions
Some methods of 3.0 re module
3.1 Regular Expression grouping
3.2 Collecting IP information using regular
Job Exercise: 1) Use regular expressions to collect host NIC names, IP addresses, MAC address 2) using regular expressions to match Apache's Access_log and Error_log.
http://ask.apelearn.com/question/15839

4 Week 5th day (December 2)

1.1 Django Introduction and Installation
Extended knowledge: see Django official documentation
Https://docs.djangoproject.com/en/1.8/part1-3
http://djangobook.py3k.cn/2.0/

5 Week 1th Day (December 5)

1.2 Adding an App
1.3 Data Model
1.4 Accessing the database

5 Week 2nd day (December 6)

1.5 data transfer post and get
1.6 Creating a Simplecmdb project
1.7 Collecting host information to the CMDB
Related exercises: Create an app Hostinfo app and use a collection script to save the information to the CMDB.

5 Week 3rd day (December 7)

1.8 Host Group Management
1.9 Serialization Introduction and Pickle Module
2.0 Pickle Module Application

5 Week 4th day (December 8)

2.1 JSON module application and database query
2.2 Api-json Format
2.3 Api-shell Format

6 Week 1th Day (December 12)

1.1 Nagios Installation and configuration file introduction
1.2-1.5 Nagios configuration File Generator
Job: Generating the Nagios configuration file from the host in the CMDB

6 Week 2nd day (December 13)

1.6 Understanding Nagios Plugins
1.7-1.8 writing Nagios plugins-monitoring memory

6 Week 3rd day (December 14)

1.9-2.2 writing Nagios plugins-monitoring syslog
2.3 Nagios Monitors other hosts
Homework:
1. Write a monitor syslog plug-in, if the same error occurred within 1 minutes 3 times and send an email alert.
2. Write plug-ins to monitor the number of Apache processes and the physical memory occupied by the remote host
http://ask.apelearn.com/question/15936

6 Week 4th day (December 22)

1.1 Multi-threading and multithreaded modules-thread
1.2-1.3 Thread's Lock
1.4 Threading Module
1.5-1.6 Mutual Exclusion Lock
Jobs: Use thread and threading module respectively, output Hello World using two threads

6 Week 5th Day (December 23)

1.7-1.8 Inter-thread communication--queue module
Job: One thread generates 10 random numbers, another thread takes out an odd number, and the even is put back in the queue. Use the queue, and use the class implementation.
http://ask.apelearn.com/question/15978

7 Week 1th Day (December 26)

1.9 Multi-process module multiprocessing
2.0 Process Pool
2.1 Paramiko Module

7 Week 2nd day (December 27)

2.2-2.5 Parallel commands
2.6-2.7 Parallel Command and Simplecmdb
2.8 Fabric Module
Homework:
1. Install a Clusterit package yourself, generating a DSH command to implement parallel commands.
2. Implement parallel commands according to your own CMDB
http://ask.apelearn.com/question/15997

7 Week 3rd day (December 28)

2.9 Salt-master Installation
3.0 Salt-minion Installation
3.1 Start Salt service
3.2 Using the Salt command
Jobs: Install salt using PIP mode

7 Week 4th day (December 29)

3.3 Using salt to manage installation software
3.4 Managing files with salt
3.5 using salt to manage services
3.6 Highstate Module
3.7 Salt Multi-environment
Homework: Learn to read saltstack documents

7 Week 5th day (December 30)

3.8 Target (Glob and grain)
3.9 Target (compound)
4.0 Target (Nodegroup)
4.1 SLS File Template
4.2 Configuration file templates
4.3 Salt and Simplecmdb integration
Jobs: Synchronize the following content with Saltstack
1. Software: OPENSSL,OPENSSL-DEVEL,NTP,OPENSSH-CLIENTS,XORG-X11-XAUTH,YPBIND,HTTPD,NET-SNMP-UTILS,NET-SNMP
2. File:/etc/hosts,/etc/yp.conf,/etc/nsswitch.conf,/root/.ssh Directory
3. Service: RPCBIND,YPBIND,SNMPD
4. Crontab, synchronization time per hour

Python learning process

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.