The approximate process is this:First installed the python3.6.1, and then found that the wrong σ ( ̄- ̄| |), is the one-bit, unloading the reload Python 3.6.1 (64bit).Then install Easy_install, Pip, Ipython notebook. After the arduous work to fix the
1. Process-oriented programmingIn the order of functions as units, a set of functions are executed#Process orientedlang1={'name':'C + +','score':'9.0'}lang2={'name':'Python','score':'8.5'}deflanginfo (lang):Print '%s:%s'% (lang["name"],lang["score"])
With the ORM, we can represent the 3 tables required by the Web App Model :Import time, UUIDFrom ORMImport Model, Stringfield, Booleanfield, Floatfield, TextFieldDefnext_id():Return'%015d%s000 '% (int (time.time () *(), Uuid.uuid4 ().
One, the use of locks in multi-threading: Thread Mutex lock = threading. The Lock () #创建一个锁对象1, with Lock:pass and process are used in the same way 2, the time to control the end of the thread passes through a global variable # encoding=utf-8import
Main content
File operations
File operation mode for open fileThe mode of opening the file is:
R, read-only mode (default).
W, write-only mode. "unreadable; not exist; create; delete content;"
A, append mode. "Readable;
loop control statements can change the order in which statements are executed. PythonThe following loop control statements are supported:
Control statements
Describe
break statement
terminates loops during
Operation
Is_empty () Determine if the linked list is empty
Length () returns the lengths of the linked list
Travel () traversal
Add (item) adds a node to the head
Append (item) Adds a node to the tail
Insert (POS, item)
Chapter Content
Defined
Variable rules
Assigning values to variables
DefinedVariables are used to store information for subsequent program calculations. Variable information is present in memory. Variable declarationname =
Event ModuleEvent.wait () waits for the equivalent flag bit to false. The parameter number can be passed in () for a few seconds.Event.set () to another line path the flag bit true.Queues QueueSimilar to the list, but the function has built-in mutex
In addition to defining and slicing, here is a summary of the following series:#hanbb Come on!names = ["HBB",'Tian','Bao','Cheng']#AddNames.append ("New")Print(names)#[' hbb ', ' Tian ', ' bao ', ' Cheng ', ' new ']# Insert#Names.insert (1,before 2)
1, Sklearn-train_test_splitParameters: Test_size represents the proportion of the data in the test section to the total data2, Np.ones (m,n)Common one M-row, N-column matrix, filled with "1".3.3.1 Numpy.vstack ((one-dimensional matrix A,
1 #Read the file:2 #The first method:3f = open ('file path','R')4 Print(F.read ())5 f.close ()6 7 #The second method:8 Try:9f = open ('file path','R')Ten Print(F.read ()) One finally: A ifF: - f.close () - the #The third method (simple):
First, arithmetic operatorsThe arithmetic operators have the following types:+: Addition-: Subtraction*: Multiplication/: Division, which is the real division, the result shows the number of decimal parts%: Take-over, two-digit division of the
This use case mainly introduces using three kinds of algorithms to detect the image containing the blob. BLOBs, or spots, are bright areas on a dark background on an image. Or a dark area on a bright background can be called a blob.It mainly uses
Start learning python today, first environment installation
1. Download the Python2. X or 3.X (PS: This is recommended to download 32-bit python , because 64-bit Python developed by the program, packaged as an EXE program will not be compatible
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