Design pattern and Python implementation
What is the design pattern?
Christopher Alexander: "each pattern describes a recurring problem around us and the core of the solution to the problem * so that you can use the solution again and again without having to do repetitive work."
Design patterns are summarized and optimized to provide ...
the snowflakes all over the sky and walking on the horizon have always been what I think is a very romantic picture. After research, it is finally implemented in Python! In this article, let's take a look at the snow map with background pictures and music.
1, Effect drawing of snowflakes all over the sky
The snowflakes a ...
Posted by shameermp on Mon, 23 May 2022 10:27:19 +0300
1. Data import and export
(1) Data import and export of csv file
import pandas
# Import 1.csv data into the data variable
data = pandas.read_csv(
# file path
'D:/1.csv',
# Set the engine parameter so that the Chinese meaning in the path will not report an error
engine='python',
# set encoding format
encoding='utf8'
)
# Data output
# de ...
Posted by EvilWalrus on Mon, 23 May 2022 07:22:19 +0300
Burpy is a plug-in that can open up the relationship between BurpSuite and Python. From now on, you can use your python to process Http packets arbitrarily!
effect
Execute the specified python script and return the processing result to BurpSuite.
Function, UI introduction
Here's a note: use python2.
Specify your own python script in Burpy PY f ...
Posted by nielskg on Mon, 23 May 2022 05:57:28 +0300
Python Pandas is popular for its basic functionality. The pandas library has many essential basic functions and functions to make your daily work easier. It is strongly recommended for beginners to master the basic functions of Pandas.
Basic functions of pandas
Before starting Pandas basic functionality, you must learn to import libraries For ...
1, tcp basic syntax
The server communicates with the client through socket. In order to ensure data integrity, tcp protocol needs to shake hands three times, and can only communicate with one client at a time
Server side writing method:
# Server
#Import socket module
import socket
#Create socket object
sk=socket.socket()
#Bind server IP port
...
Posted by Kitkat on Mon, 23 May 2022 02:16:35 +0300
Recently, I am learning python crawler. When crawling some websites, I need to submit encrypted data, so I record the crawling process.
For your own study and archive.
1. Target website
The China Air Quality Online Monitoring and Analysis Platform includes PM2.5 and weather information data of 367 cities across the country, including AQI, ...
Posted by chris1 on Sun, 22 May 2022 23:56:59 +0300
Scrapy is well-known. Seeing that the mv of a website is good, it's too troublesome to download it manually, so we use scrapy to grab it.
The basic idea is to study the home page of the website, the list page of movies, and its playing page, obtain the formatted information in the page, the jump relationship from page to page, and finally obta ...
Posted by reyes99 on Sun, 22 May 2022 20:58:28 +0300
Web crawler:
Web crawler (also known as web page) spider , network robot, in FOAF In the middle of the community, more often referred to as web page chaser), it is a kind of automatic crawling according to certain rules web A program or script that contains information. Other names that are not often used are Ants , automatic indexing, emulator ...
Posted by Blekk on Sun, 22 May 2022 18:28:14 +0300
Getting Started with the Requests Library
Seven main methods
method
illustrate
requests.request()
Construct a request that supports the underlying methods of the following methods
requests.get()
The main method for obtaining HTML pages, corresponding to HTTP GET
requests.head()
The method for obtaining the header information of HT ...
Posted by busin3ss on Sun, 22 May 2022 16:59:39 +0300