I. Note->1. #号注释; 2. " To serve as a note;
Two. In Python2, as long as there is Chinese, as long as Chinese is part of the program, including annotations, you need to add in the program: #coding =utf-8 or #-*-coding=utf-8-*-
Three. Print placeholder
#coding: UTF8 import os import os.path import XLWT import XLRD #---Get the current path---filepath=os.getcwd () #---Specify the test path---fil E01= ' F:\SVNBaloon\BalloonBlast\Assets\Scripts ' #---Start a specific identity---' Debug.Log ("'
Import NumPy as NP;
Import Matplotlib.pyplot as plt import cv2;
Import Math; From Cmath import sin from numpy.core.numeric import dtype to scipy.signal import butter, Lfilter, freqz from Scipy.fftp
ACK import FFT;
' A few comments:the Nyquist
The Python library contains several different types of components.
It contains data types, such as numbers and lists, that are often considered to be part of the language "core". For these types, the Python language core defines the form of text
First step (note the project file name do not take into json.py)
Import JSON
Second Step
First read into the JSON file, assuming that in D disk Inputjson
Inputjson=open ("D://inputjson.txt"). Read ()
The Read method can read all of the
The total entrance is load_module.
The imported file has a py file, go load_source_module
1. Get the latest time of the py file
2. Try to open PYc, open failed, then recompile, open successfully, from the PYc Inside Out magic and timestamp, there
Python method for removing the middle space of a string
1. Use string function Replace
>>> a = ' Hello World '
>>> a.replace (', ' ')
' HelloWorld '
It is really stupid to look at this method. 2. Use String function split
>>> a = '. Join
I'm using the raspberry Pie 1 B, which actually has a higher type of raspberry pie, but the principle of waste utilization
The version I'm using is
2016-09-23-raspbian-jessie.zip
The advantage of this version is that it can be connected to SSH
Too lazy to explain, the program is almost the annotation. This code only provides learning, in order to avoid improper use, causing unnecessary trouble, the code in the URL deleted.
#-*-Coding:utf-8-*-#------------------------------------------#
Time 2016.10.20
Excerpt from: Liaoche python3.5 Tutorial
Content: Python's built-in ordered collection list and tuple
One, List
classmates = [' xiaomin ', ' xiaohong ', ' Chen ']
A list is similar to a container, which is enclosed by [], where
3, the connection database database is a sound website is essential here use MySQL to do the database in the previous schema directory structure, find methods, create the db.py file inside, and then establish the Connection object and cursor object
To do deep learning projects, the original picture will generally be converted to other formats, to facilitate the learning framework for direct reading, such as Caffe's Leveldb, Lmdb,matlab's. m format, TensorFlow tfrecords format, etc.
Python
Create a meta ancestor
Ages= (11,32,22,98,56)
Ages=tuple ((11,32,22,98,56))
("Lary", "Huni", "Hony") Yuan Zu can not be modified
["Lary", "Huni", "Hony"] list to modify
Slice
STR string
Change to reopen space
List of lists
Modified memory
Although not the idea of how to do it, but feel the understanding of the problem is a step further, the previous use of Java to think for a long time to think very confused, or Python language concise, especially good understanding, as follows:
#!/usr/bin/env python
#coding: UTF-8
"" "
Author:jefferchen@163.com
You can either have the destination IP directly on the command line or the IP list in a text file.
Destip Example: a) Single: 192.168.11.1
b) Multiple:
Python first knowledge and variables :variable Name:-- letter -- number -- underline "see the meaning of the name"(PS: Numbers do not start; they cannot be keywords; it is better not to repeat with Python built-in)-- Basics :"1" The first sentence
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