1. Ready to do a login 126 mailbox operation, with Firefox firebug view the user name box ID, password box ID is id= "auto-id-1491067388576"
Such a class, F5 refresh the browser, looked back at the User name box, password box ID is changed, so you
python terminology:
3. Press F5 in the idle editor to "load" the module's code into the idle shell, where the module name is specifically imported into the idle namespace, which is important when using idle, as well as explicit use of the import
This article from the blog Vander, csdn blog, if you need to reprint please indicate the source, respect for original thank you Blog address: http://blog.csdn.net/l540675759/article/details/61236376 What is a word cloud?
The word cloud is also
This time, I have a venv environment for other purposes, but some Python libraries need to be compiled by gcc ... Can not download directly, and this environment can not be networked.I'll copy every library that needs to be compiled. Silly. Directly
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
Reptiles are sometimes slow to crawl some Web pages, affecting performance. All can set timeout time.Timeout Unit secondsSet the timeout time to 0, using the Try statement.
#coding:
The utf-8 **urllib2**
timeout can be set directly through the
P1494 Yang Hui's the number of even numbers in a triangle accepted Label: curimit [Display label]
background
Curimit has been in a particularly bad mood lately, especially seeing even numbers. Description
One day, curimit in play, found a paper on
ASCII is a character set, including uppercase and lowercase letters, numbers, control characters, etc., which are represented by a byte, and the range is 0-127 Unicode into UTF-8 and UTF-16.
UTF-8 variable length, up to 6 bytes, less than 127
Sometimes we post bar in Baidu, in a website, save some pictures on the page, the picture name is sometimes a string of very long numbers and letters, but without exception, the image will not appear duplicate. This unique ID, generally obtained by
Recently in doing micro-blog text processing, in the choice of Word tools, respectively, selected: Jieba \ Nlpir LTP
These three kinds of participle tools, here to share the next ~
1.jieba participle:
#-*-coding:utf-8-*-import
os
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
=========================== Module ===========================1.Python the py file is called a module.2. The use of modules needs to be introduced, for example:Import Sys3. The import module needs to set the path.
>>> Import sys
>>> print (sys.path)
1. List common relational databases and non-relational types. 关系型 : MySQL,SQL Server ,Oracle , Sybase, DB2 非关系型 : Redis, MongodDB 2.MySQL Common Database engine and comparison?Innodb,myisam,ndb,memory, etc.3. Describe the three main paradigms of
You must first mention the rules for finding variables in the execution of a python programThe more official search mechanism is:Local scope--external function scope--global scope--built-in function scopeIn fact, the scope of the general built-in
One, variable 1. Type (variable name) to see the types of the variable 2. For string two operators + and * , respectively, perform stitching and repeat operations 3. Formatted output
%s
String
%d
Integral
Today is so hot, so it is not dug to dig, read a few days of the Python crawler, learned the XPath parsingA code to play "Don't say anything, optimize the like, just finished, ran a while, can be quite stable#-*-Coding:utf-8-*-#Xm17import osimport
Print(ABS (-11))#Todo takes absolute value Print(Bin (3))#todo decimal into binary Print(Oct (6))#Todo decimal to octal Print(Hex (19))#todo decimal to hexadecimal Print(bool (0))#Todo to ask for a Boolean value Print(Bytes ('Steven', encoding='Utf-8
1. Python Input and outputName = input ("Name:") Enter name, the default type is String typeage = Int (input ("Age:")) forces the type to be converted to int typeType of print (type (age)) output variableCharacter Stitching output:First format:info =
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