MindMap Gallery Python basics
This is a mind map about the basics of Python, summarizing advanced Python skills, Use of Pyecharts library, SQL introduction and practical combat, PySpark case practice, etc.
Edited at 2024-03-12 21:45:47This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about bacteria, and its main contents include: overview, morphology, types, structure, reproduction, distribution, application, and expansion. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about plant asexual reproduction, and its main contents include: concept, spore reproduction, vegetative reproduction, tissue culture, and buds. The summary is comprehensive and meticulous, suitable as review materials.
This is a mind map about the reproductive development of animals, and its main contents include: insects, frogs, birds, sexual reproduction, and asexual reproduction. The summary is comprehensive and meticulous, suitable as review materials.
No relevant template
python
1. knowledge supplement
# -*- coding: utf-8 -*- Specify the file encoding as utf-8
Machine learning third-party library tensorflow keras mxnet
Web application framework third-party library Pylons
os module
help(request) help function
dir(p_object) gets the name list of all methods and attributes in the p_object object
Data container.sort(key,reverse=False) specifies the sorting rule for sorting
Some common built-in functions
Use of map(func,iterable) mapping function
Use of filter(func,iterable) filter function
Use of eval() function
Use of join() string splicing function
Conversion of Json data format
Use of format formatting characters
Pass in parameters
'{}{}..'.format(parameter 1, parameter 2,...) omit parameters
'{0}{1}{2}...'.format(parameter 1, parameter 2, parameter 3,...) positional parameters
'{name}{age}...'.format(name=parameter 1,age=parameter 2,...) keyword parameters
Mix
Tuples and dictionaries as passed parameters
Use of compound field names
.Use of dot sign
[]Use of square brackets
align string
Case
Use of random module
The random() method randomly generates a floating point number in the range [0,1)
The uniform(a,b) method randomly generates a floating point number in the range [a,b)
The randint(a,b) method randomly generates an integer in the range [a,b)
The randrange(start, stop, step) method randomly generates a number in the range [start, start step, start 2*step,..., stop-step], step is an integer, and the default is 1
The choice(sequence) method randomly extracts an element from the sequence sequence.
The shuffle(x) method randomly shuffles the elements in the x list and modifies the original list.
The samle(sequence,k) method randomly removes k elements from the sequence without modifying the original array.
The send(a) method generates a random number seed a which can be an integer, floating point number, string, etc.
Use of jieba Chinese segmentation library
2. basic grammar
1. literal
2. Comment
3. variable
4. type of data
5. Data type conversion
6. identifier
7. operator
8. Three ways to define strings
9. String concatenation ( )
10. String formatting
11. print(str,end=" ") data output statement
12. input() data input statement, returns the input string
3. Judge sentences
1. Boolean types and comparison operators
2. Basic format of if statement
3. if else combined judgment statement
4. if elif else multi-condition judgment statement
5. if x in sequence determines whether x is in the sequence
6. Nesting of judgment statements
4. loop statement
1. while loop basic syntax
2. Nested application of while loop
3. Basic syntax of for loop
4. range statement obtains a simple sequence of numbers
5. Nested use of for loops
6. continue and break
5. function
1. Function introduction
2. Basic definition syntax of functions
3. function parameters passed in
4. function return value
5. Function documentation
6. Nested function calls
7. variable scope
6. data container
1. Understand data containers
2. list(list)
3. tuple(tuple)
4. str(string)
5. Slices of data containers (sequences)
6. set(set)
7. dict(dictionary)
8. Comparative summary of data containers
9. Common operations for data containers
7. Function advanced
1. Function multiple return values
2. Various ways of passing parameters to functions
1. Positional parameters
2. keyword arguments
3. Default parameters
4. variable length parameters
3. anonymous function
1. function passed as parameter
2. lambda anonymous function
8. File operations
1. File encoding concept
2. The open(filename, mode, encoding) function opens a file
3. Read file contents
1. File object.read(num) method
2. File object.readlines() method
3. File object.readline() method
4. for loop reads file lines
4. File object.close() method closes the file object
5. with open() as f: syntax automatically closes the file
6. File object.write(string) method writes string to file
7. File object.seek(offset,whence) method is used to move the position of the pointer
9. Exceptions, modules, packages
1. abnormal
1. try except else finally catch exception
2. Exceptional transitivity
2. module
1. How to import modules
2. Customize the module and import it
3. Bag
1. Custom python package
2. Install third-party packages
10. object-oriented
1. initial object
2. class member methods
3. classes and objects
4. __init__() constructor
5. Other built-in methods (magic methods)
6. encapsulation
7. inherit
8. type annotation
9. Polymorphism
10. Comprehensive case
11. Use of turtle drawing image library
turtle.Turtle() method creates a Turtle object
pen
turtle.pensize(width=1) sets the width of the brush
turtle.speed(speed) sets the brush movement speed
turtle.pencolor() sets the color of the brush
Brush movement commands
turtle.forward(distance) moves forward
turtle.backward(distance) moves backward
turtle.right(degree) rotate clockwise
turtle.left(degree) rotate counterclockwise
turtle.setheading(to_angle) fixed direction rotation
Move forward and backward, rotate forward and backward eg
turtle.penup() raises the pen but does not draw
turtle.pendown() starts drawing
Lift the pen, put the pen down eg
turtle.circle(radius,extend=None) draws a circle with specified radius and angle
turtle.dot(size,*color) draws the origin of the specified radius and color
Draw circles and points eg
turtle.setx(x:float) moves the turtle's x coordinate to the specified position
turtle.sety(y:float) moves the turtle's y coordinate to the specified position
turtle.goto(x,y) moves the brush to the specified position
turtle.home() moves the brush to the origin, facing left
Coordinate movement eg
Brush control commands
turtle.fillcolor(color='black') sets the fill color of the graphic
turtle.color(color1,color2) sets the brush color and fill color
turtle.filling() returns whether the current filling state is
turtle.begin_fill() starts filling
turtle.end_fill() filling is completed
turtle.isvisible() returns the current visible status of the turtle shape
turtle.hideturtle() hides the turtle shape
turtle.showturtle() displays the turtle shape
Graphic fill, brush shape status
global control commands
turtle.clear() clears the window and retains the state
turtle.reset() clears the window and resets the state
turtle.undo() undoes the previous turtle action
turtle.pos() returns the current turtle coordinate position (tuple)
turtle.stamp() draws a copy of the turtle shape
turtle.write(arg,move=False,align='left',font=('Arial',8,'normal'))Write text
turtle.begin_poly() starts recording the vertices of the polygon
turtle.end_poly() stops recording the vertices of a polygon
turtle.get_ply() returns the recorded polygon vertices
Clear, reset, undo, write, get position, turtle shape, record vertex
Commonly used functions in turtle library
turtle.mainloop() or turtle.done() starts the event loop
turtle.delay(delay=10) sets the drawing delay
turtle.mode(mode='standard') sets turtle mode
canvas
turtle.sceensize(canvwidth:int,canvheight:int,bg=None) method sets the size and background color of the canvas
The turtle.setup(width=0.5,height=0.75,startx=None,starty=None) method sets the size of the form and its position on the computer screen
Python advanced skills
1. Getting Started with SQL and Practical Combat
1. Database introduction
2. MySQL installation and getting started
3. SQL Basics
4. SQL-DDL data definition
5. SQL-DML data manipulation
6. SQL-DQL data query
7. python operation-MySQL basic usage
8. Comprehensive case
2. PySpark case practice
1. Introduction
2. Basic preparation
3. data input
4. Data calculation
5. data output
6. Comprehensive case
3. Use of Pyecharts library
1. Dynamic bar chart
Basic bar chart
Basic timeline histogram drawing
Dynamic GDP histogram drawing
2. Map visualization
Basic map usage
National epidemic map construction
Henan Province epidemic map drawing
3. Development of line charts
Build a basic line chart
Case: Data preparation
Case: Generate a line chart of confirmed epidemics in the United States, Japan and India
4. Global configuration options
TitleOpts title configuration object
LegendOpts legend configuration object
ToolboxOpts toolbox configuration object
VisualMapOpts visual mapping configuration object
LabelOpts label configuration object
5. Common objects
Line polyline object
Line() instantiation creates Line object
add_xaxis(xaxis_data:Sequence) method adds x-axis data
add_yaxis(series_name:str,y_axis,color,label_opts) method adds y-axis data
set_global_opts(title_opts,legend_opts,toolbox_opts,visualmap_opts...) method sets chart global configuration options
render(path) method generates the .html file of the chart and returns the file address string
Map map image
Map() instantiation creates a Map object
add(series_name:str,data_pair,maytype:str="china") method adds data
set_global_opts(title_opts,legend_opts,toolbox_opts,visualmap_opts...) method sets chart global configuration options
render(path) method generates the .html file of the chart and returns the file address string
Bar bar chart object
Bar(init_opts=InitOpts(theme=ThemeType.LIGHT)) instantiation creates a Bar object
add_xaxis(xaxis_data:Sequence) method adds x-axis data
add_yaxis(series_name:str,y_axis,color,label_opts) method adds y-axis data
reversal_axis() method reverses the X and Y axes
render(path) method generates the .html file of the chart and returns the file address string
Timeline timeline object
Timeline(init_opts)
add(chart:Base,time_point:str) method adds a chart to the timeline
add_schema(play_interval=None,is_auto_play=False,is_loop_play=True,is_timeline_show=True,...) method sets features such as automatic timeline switching and loop switching (in milliseconds)
6. Conversion of Json data format
7. Introduction to the module of pyecharts
4. Python advanced skills
1. Closure
2. Decorator
3. Design Patterns
4. Multithreading
5. network programming
1. Server side development
2. client development
6. regular expression
1. Common matching methods
1. re.match (matching rule, matched string), returns Match object
2. re.search (matching rule, matched string), returns Match object
Match object
1. span() method, obtains the matched character index tuple
2. group() method to get the matched string
3. re.findall (matching rule, matched string), return list
2. Metacharacter matching
1. single character match
2. Quantity match
3. Boundary matching
4. group matching
3. Case
7. recursion
1. Case: Recursively find files