Python programming from introduction to practice_ Basic knowledge summary
1. Variables and simple data types
1.1 string
A string is a series of characters. In Python, strings are enclosed in quotation marks, which can be single quotation marks or double quotation marks, as shown below:
"This is a string."
'This is also a string.'
This flexibility allows you to include quotation marks and apostrophes in strin ...
Posted by jerastraub on Thu, 03 Mar 2022 16:03:20 +0100
Ten common Python automation operations
This article is taken from WeChat official account GitPython: Ten common Python automation operations . In case of infringement, the contact must be deleted.
1. OS module
Import: import os
1. Traverse the folder
The premise of batch operation is to traverse the folder, OS Walk traverses the folder and generates three parameters:
Current ...
Posted by sig on Thu, 03 Mar 2022 14:42:47 +0100
Implementation of NLP statistical word segmentation hidden Markov model
1, HMM word segmentation idea
HMM implements word segmentation as a sequence annotation task of words in a string. The basic idea is that each word occupies a certain word formation position (i.e. word position) when constructing a specific word. It is stipulated that each word can only have four word formation positions at most, i.e
...
Posted by roflpwnt on Thu, 03 Mar 2022 13:49:15 +0100
What do you call chicken ribs? Multiprocessing, multithreading, and coprocessing in Python
In the process of writing this article, we refer to the content of the course "Introduction to Python Programming and data science" by Mr. Hu Junfeng.
Concept:
Multiple tasks should be carried out simultaneously at one time, but not necessarily at the same time.Parallel: promote multiple tasks at the same time in a period of time, a ...
Posted by wonderman on Thu, 03 Mar 2022 13:14:01 +0100
JVM tuning tool kit: comparison between JDK built-in tools and Arthas online analysis tools
Arthas online analysis, diagnosis and tuning tool
In the past, when we wanted to troubleshoot online problems, we usually used the tuning tools and commands provided by jdk. The most common is the dump online log, which is then downloaded locally and imported into the jvisual VM tool. There are many changes in this operation. The Arhtas tool d ...
Posted by oh_maestro on Thu, 03 Mar 2022 11:58:39 +0100
Introduction to Python Basics: a tutorial on reading and writing JSON files
Introduction to JSON
JSON(JavaScript Object Notation), namely JavaScript object notation, is a lightweight and general text data format. JSON syntax supports objects, arrays, strings, numbers (int/float), and true/false and null. JSON has a strict format. The main formats are as follows:
You can only use double quotation marks, not single quo ...
Posted by Chappers on Thu, 03 Mar 2022 09:37:32 +0100
The use of selenium in reptiles
The use of selenium in reptiles
I selenium overview
1.1 definitions
Selenium is a Web automated testing tool, which was originally developed for website automated testing. Selenium can directly call the browser. It supports all mainstream browsers (including PhantomJS, which has no interface). It can receive instructions and let the browser ...
Posted by Eskimo887 on Thu, 03 Mar 2022 09:21:58 +0100
matplotlib. pyplot. Scattergram
usage
matplotlib.pyplot.scatter(x, y, s=None, c=None, marker=None, cmap=None, norm=None, vmin=None, vmax=None, alpha=None, linewidths=None, *, edgecolors=None, plotnonfinite=False, data=None, **kwargs)
Parameter introduction
x,yData for plotting scatter plotsfloat or array-like, shape(n,)sA real number or an array with the size of (n,), an ...
Posted by thipse_rahul on Thu, 03 Mar 2022 07:32:32 +0100
Experiment 3 Python files and databases
Experiment 3.1: text file operation
Title Description: create a new program called test Txt file, stored in the directory where the code file is located, and open the file. Then write the contents as shown in Figure 1-1 to the file. Finally, read 5 characters, read the first line of string, read the third line of string, and read all strings. ...
Posted by greenie__ on Thu, 03 Mar 2022 06:39:29 +0100
python/numpy - find the maximum value, minimum value and index for maximum and minimum value - Max, NP max,np.amax,np.nanmax,np.fmax,np.maximum
Introduction
This article is based on PY3 8,system win10,numpy1.12.
np is the abbreviation of numpy.
1, Summary of reference sources and basic knowledge
Performance comparison between python built-in max() and min() functions and Numpy built-in max() and min() functions
Based on python 2.7.15 and system win10, the above article draws ...
Posted by elacdude on Thu, 03 Mar 2022 06:19:12 +0100