First, installation and configuration1. Download and install#1, install path is D:\MongoDB, add D:\MongoDB\bin directory to environment variable#2. Create new directory and fileD:\mongodb\data\dbd:\mongodb\log\mongod.log#3. New configuration file
First, time of the common methods:Import Time,datetime# There are three ways to show time: timestamps, time tuples, formatted timePrint (Time.time ()) #当前时间戳Print (int (time.time ()))Print (Time.strftime ('%y-%m-%d%h:%m:%s ')) #格式化的时间Print
One, counting sortProfile: Time complexity O (n), spatial complexity O (k), K is the range of values of the input sequence (maximum-minimum), is stable. The count sort is generally used for a relatively small range of known input values, such as
First Python does not support polymorphism, nor does it support polymorphism, Python is a polymorphic language, advocating duck type.In program design, Duck type (English: Duck typing) is a style of dynamic type. In this style, an object's valid
Learn python for the first time, confused, write a simple login verification, make notesusername = ‘cc‘ #用户名userpassword = ‘123‘ #密码count = 0 #计数器while countThe code is simple and hopefully one year later you can write the code for the
Crawler applet, get the contents of the main page, and get the connection under the main page content#coding: Utf-8import reimport requestsurl= ' http://ai.51cto.com/' con=requests.get (URL) file=open (R ' D:\Python27\ Sevenot_test\curbug3\test.txt '
One, set.A collection is an unordered, non-repeating collection of data in which the elements are hashed (immutable types), but the collection itself is not hashed (so the collection cannot be a key to the dictionary). The following are the two most
Document of DictionariesTen Minutes to PandasCreation of Series and DataFrameImportPandas as PDImportNumPy as NPImportMatplotlib.pyplot as Plts= PD. Series ([1, 2, 5, Np.nan, 6, 8])#An array similar to NumPy is just one dimension, one dimension only#
Data type
Numbers (number) int-signed integer/long-long integer/float-float/complex-Complex
String (String)
List (lists) []
Tuple (tuple) ()
Dictionary (dictionary) {}
Data type conversionsNumber: Int (x), Long (x),
Open Blog for a long time, do not know what to write, because I was also a technical slag, last year, accidentally heard the old boy Alex Big God told the Python video course, deeply to Python attracted, grammar simple rough, is the Python language
Conditional Statement if ElseLoop statement while forBreak of the Loop continue The break statement terminates the Loop statement, that is, the loop condition does not have a false condition, or the sequence is not fully recursive, and the loop
Recently in the company's work content changes, short-term workload has become less, which also let me have time to organize some daily study and work in the harvest or ideas. So I applied for a blog and intend to keep updating it.Quick sort adopts
In the case of idle use:Open Idle and click "File", "New file" in the menu bar.In the new file, save it. Right-click the file, open with, select Python idle open.After the code is finished, press F5 to run.In which to output a, also need to put in
Python crawler _ example of collecting data of city buses, subway stations, and lines, and python Crawler
The urban public transit and subway data reflect the public transportation of the city. The data can be used to mine the traffic structure,
Python opencv implements perspective conversion from any angle to the instance code, pythonopencv
This article mainly shares an example of pivoting transformation from any angle using python + opencv, as shown below:
#-*-Coding: UTF-8-*-import
Tornado high concurrency Processing Method Instance code, tornado Processing Method
This article mainly shares an example of Tornado high concurrency processing method, which is as follows:
#! /Bin/env python #-*-coding: UTF-8-*-import tornado.
Python pickle module, pythonpickle
1 import pickle 2 3 # in python, if we have some objects that require persistent storage and do not lose the types and data of our objects, 4 # We need to serialize these objects, after serialization, when we need
Python basics === monkeytype can automatically add annotation modules !, PythonmonkeytypeMonkeytype: a module that can automatically add comments!
Download:
Pip install monkeytype
Take the sample code on the official website as an
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