in Python, the OS module and Shutil module used frequently in the file and directory operation are often use. 1. Get the current working folder, that is, the folder path of the current Python script work: OS.GETCWD ()2. Returns all file and folder
Yeild: Returns a Generator object;Adorner: itself is a function that functions to decorate other functions (calling other functions)Function: Enhance the function of the decorated functionAdorners generally accept a function object as a parameter,
Environment: Windows8.1, Python3.6 pycharm Community 2017There is a configuration file under the C drive: Setup1 with open ('c:\\setup','r') as F:2 F.read ()Hint always weird: filenotfounderror: [Errno 2] No such file or directory: '
The essence of the import module is to import the code inside the module, from top to bottom to execute it againThe order of the modules to find, first from the current directory to find, can not find, then the environment variable inside to
If a folder has __init__.py this file, then this folder can be called a package.So what is a bag? (consisting of multiple modules, i.e.. py files)But for the difference between Python2 and Python3,When importing a module, it can be written from.
Regular expressionsFirst, query functionImportRes='Besttest is good are'Print(Re.match (R' be', s). Group ())#string pre-plus R for the original string#The match method receives 3 parameters, the first one is the regular expression, the second is
The final review compared busy time to write Scrapy framework use, today describes how to use Python to generate word cloud, although there are many word cloud generation tools on the Web, but their own python to write is not a more fulfilling sense.
1. String length
#strlen (str) # string length function nameStr= ' Apples ' # assigns the string "apples" to the variable strPrint (len (str)) # Prints the length of the string
2. Find characters
#strchr (STR1,STR2) # Find character function
One, top 3,000 people list page
2) Analysis page structure: Each TD is, a person.
First small to rank
The second a tag is the nickname and Username, and the home page's blog address. User name interception by address acquisition
The fourth small
Job One: Write the login interface
1. Enter your user name and password
2. Display welcome message after successful authentication
3. Three times after the wrong lock
The above work, with a number of ideas to solve the problem, but essentially
Expression Expand
Word Break II
Partition Equal subset Sum
Expression Expand
String expansion problem, according to the number of [] before the expansion of the string, mainly to maintain two stacks, one is the expansion of the stack is the
Python and Python3 are exactly two languages.
0x00 Import Caffe FAILED Environment for Ubuntu Cuda 8.0 NVIDIA 361.77 Anaconda2. Yesterday inexplicably Caffe can not be used:
>>> Import Caffetraceback (most recent): file "", line 1, in File "
HTTP protocol:
HTTP (Hypertext Transfer Protocol): The Hypertext Transfer Protocol. URLs are Internet paths that access resources through the HTTP protocol, and a URL corresponds to a data resource.
The HTTP protocol operates on resources:
The
The product environment model deploys, creates the simple Web APP, the user uploads the image, runs the inception model, realizes the image automatic classification.
Build TensorFlow service development environment. Install Docker,. Create a Docker
Use of 1.==,is
Summarize
is is to compare whether two references point to the same object (reference comparison).
== is a comparison of two objects for equality.
2. Deep copy, Shallow copy
1. Shallow copy
A shallow copy is a top-level copy of
Job: Shopping mall
Product Display, Price
Buy, add to Cart
Payment, not enough money
Specifically, the following functions are implemented:1, can purchase the product information display2. Display the product information, quantity, total amount in
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