Introduction to installation Use methods User Management Warehouse Management API detailed Pyolite class Usermanager class User class Listkeys class Repositorymanager class repository class Listusers class Git class repo GER Class
adorners (adorners are functions used to decorate functions)
Normal functions:
def function name (formal parameter): # variable name
function body return
variable | constant
print function name (argument)
Decorative
Divided into class and function
1. Class1.1 Class RangeHelp (__builtins__.range)Class Range (object)| Range (stop)-> Range object| Range (start, stop[, step])-> Range Object| Return a sequence of numbers from start to stop by step.We usually use
python3.x
#!/usr/bin/env python3
#coding: Utf-8 Year
= 1
years = 5
BJ = 10000 rate
= 0.05
f = open ("./source /interest.bak ", ' w+ ') while year
python2.x
#!/usr/bin/env python
#coding: Utf-8 Year
= 1
years =
BJ = 10000
rate = 0.05
f = open (
Basic Formula
Bayes theorem: P (a| B) = P (b| A) *p (a)/P (B)Suppose b1,b2 ... BN is independent of each other, then there are: P (b1xb2x...xbn| A) = P (b1| A) XP (b2| A) X...xp (bn| A) data (fictitious)
A1 A2 A3 A4 A5 B
1 1 1 1 3 no
1 1 1 2 2
Enumerate () is a built-in function in Python, using the method
Enumerate (X, [start=0])
The parameter X in a function can be an iterator (iterator) or a sequence, start is the starting count, and the default starts at 0.X can be a dictionary, or
Original address: http://www.cnblogs.com/pzxbc/archive/2012/03/18/2404715.html
In the course of the experiment, we will have various types of data generation. In order to save time and improve efficiency, the data is usually saved and then read.
1, the structure of OpenCV
Like Python, the current OPENCV also has two large versions, OpenCV2 and OpenCV3. Compared to OPENCV2,OPENCV3 provides more features and more convenience features. However, considering the compatibility with the depth
Pip is a Python package management system
Setuptools is a minor project in Python Enterprise application kit (PEAK), a set of enhancements to the Python distutilsde tool (for Python 2.3.5, 64 Bit platforms are available for Python versions above 2.
Error code:
Import NumPy as NP
A=np.zeros (3)
a[0]=0 a[1]=1; a[2]=2
if a==[1,2,3]:
print "OK"
else:
print ' Not OK '
traceback (most recent call last):
File ' ', line 1, in
if a==[1,2,3 ]:
valueerror:the Truth value of an array with more
Found in the code can actually use Chinese as a variable name and function name, good.
#-*-Coding=utf-8-*-
import cv2
import random
import NumPy as np
wide =
high =
def Get location ():
return Random.randint (30, High -30), Random.randint
1. Use Os.system ("cmd")
The feature is the execution of the program will play CMD on Linux implementation of the information.
Import OS
Os.system ("LS")
2. Use Popen module to generate new process
Now most people like to use Popen. The Popen
Uncle Turtle invented Python, and then integrated a bunch of concepts in the language, such as: iterators, adorners, Functions, generators, classes, objects, routines, and so on.
These concepts do not seem to be a understood for beginners, but there
Lists [list] use brackets [] to handle the data structure of a set of ordered items, the type of the list is a mutable data type, and the type is a listThe list is mutable/thread insecure
# type (a) = list uses the type to determine the
IntroductionMany development tasks today require remote access, such as deep learning that requires logging on to a dedicated server. When you need to see some visual results, you may need to use a drawing library such as Matplotlib or Seaborn. Then
The method of decorating is changed into a static method by @staticmethod Adorner, what is static method? In fact, it is not difficult to understand, the ordinary method can be called directly after instantiation, And in the method can pass self.
What is the function overload?function overloading is mainly to solve two problems
Variable parameter types
Number of variable parameters
In addition, a basic design principle is that only if the function of the two functions is identical
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