The Python language has become more and more popular in recent years, characterized by rapid development, simple syntax, portability and so on. I wrote Demo:https://github.com/tangthis/python3_demo on Python3 Basic grammar, which can be consulted as
This article will cover:
Resource detection
A useful dictionary resource
First violent detector.
Resource detectionResource detection is a resource mapping and information collection phase in penetration testing.There are three
identifiers
The first character must be a letter in the alphabet or an underscore ' _ '.
The other parts of the identifier are composed of letters, numbers, and underscores.
Identifiers are case sensitive.
Can exist in Chinese
Some problems in the world seem to be random (stochastic), there is no regularity, but it is possible that humans have not discovered and mastered the laws of such events, so they are random.Random Walk is a method of solving random problems, which
The first collection, used to look at1. Euclidean distance (Euclidean Distance)Euclidean distance is one of the easiest distance calculations to understand, derived from the distance formula between two points in Euclidean space.(1) Euclidean
The difference between programs, processes, and threadscomputer programs are binary data (or other types) that are executable on disk and they only start their life cycle when they are read into memory by the operating system.A process is an
Directory
1. Using the OS module
Determine if a file can be read or written
2. Using the Try Statement
3. Using the Pathlib module
BodyIt is usually necessary to determine whether a file or directory exists before reading
1. Why use a function?(1) Too many code repetitions (2) Poor readabilityBenefits of using Functions:(1) Code reuse(2) Maintain consistency, easy maintenance(2) Scalability2. Initial function definition and invocation definition of a function def
The datetime module in Python works well, providing a function for converting date formats and string formats to each other Strftime/strptime1. A function converted from a date format to a string format is: Datetime.datetime.strftime ()2. The
Import Urllib.requestImport OS#Download resources to LocalUrlUrlPathLocal Pathdef downloadpic (Url,path): If not os.path.exists (path):#Determine if a folder exists locallyOs.makedirs (PATH)path=path+"1.jpeg"Urllib.request.urlretrieve (URL,
The Ile object is created using the Open function, and the following table lists the functions commonly used by file objects:
Serial Number
Method and Description
1
File.close ()Close the file. The file can no
1. Private Properties#double underline before attribute #to protect property security #a private property cannot be called directly through an object, and a calling method needs to be added to invoke it; classpeople (
You can configure the path to the PIP Source:Three different forms:1.per-user:UNIX Default configuration fileHOME/.CONFIG/PIP/PIP.COnfm ac O Home/library/application support/pip/pip.conf HOME/.CONFIG/PIP/PIP.COnF( if fruit
Python uses virtual environment, python Virtual Environment
Imagine the requirement. To write a series of 1.0 plug-ins used by a project, we need to use 2.0 for a new project. What should we do? Are all updated to version 2.0? In this way, the
Python Pygame and pythonpygame
1. Experiment Introduction
1.1 experiment content
In this lesson, we will explain the common objects and operations of Pygame, including graphics, animations, text, and audio, to ensure that you have a basic
Python-based TCP and UDP (detailed description) and pythontcpudp
In python, UDP and TCP communication is implemented through socket (socket. There are two types of sockets for connection and connectionless, namely TCP socket and UDP socket.
TCP
Detailed description of random graphic verification codes generated by python, and detailed description of python verification Codes
Use the pillow module to generate a random image verification code using python.
1. Install the pillow Module
pip
Basic knowledge of Bastion hosts-paramiko module and basic knowledge of Bastion hosts-paramiko1. paramiko Module
The paramiko module of Python is used to connect to a remote server and perform related operations based on SSH.
1.1 install the
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