This means that if the. py file is executed by itself then __NAME__ is assigned a value of __main__, otherwise the assignment is a file name.Role:There is a phrase that sums up the meaning of this code in a classic way:"Make a script both importable
Personal learning python for a long time, but has always been here to pick a point where to learn, a little overwhelmed. Recently I want to see how the adorner used, and then studied the next.Simple point of:#!/usr/bin/pythondef say (key): # Create
2.2 Data typesThe value that the variable is stored in memory. This means that there is a space in memory when creating variables. Based on the data type of the variable, the interpreter allocates the specified memory and determines what data can be
From the basic concept, a simple example can slowly go to the high point of the place.In addition, the functional programming of Python is also a point of interest to me.Overall, I think that OOP can be a big frame and idea, FP can make details when
Pandas get column data bits common functions, but there are some things to note in the wording, here to summarize:' author:zilu.tang2015-12-31 ' ' import pandas as Pddata1 = PD. DataFrame (...) #任意初始化一个列数为3的DataFramedata1. columns=[' A ', ' B ', ' C
Source of the topic
https://leetcode.com/problems/unique-paths/A robot is located at the Top-left corner of a m x n grid (marked ' Start ' in the diagram below).The robot can only move either down or right at any point in time. The robot is
First, Collections seriesCounter is a supplement to the dictionary type that is used to track the number of occurrences of a value, with all the functions of the Dictionary + its own functions1. Counter
1. A small program:Write a program using a text editor:#!/usr/bin/python#filename:helloworld.pyprint ' Hello world! 'Execute it:[email protected] ~]# python helloworld.py Hello world!2. Consider how the last small program works?#!/usr/bin/python
Reference documentsInstall Opencv-python in Windows1. Download the python2.7.x 32-bit installation package and install the Python installation path into the environment variable pathhttps://www.python.org/2. Download the latest version of OpenCV and
Set S is a string:S.isalnum () to judge that all characters are numbers or lettersS.isalpha () to determine that all characters are lettersS.isdigit () to judge that all characters are numbersS.islower () to determine that all characters are
Build a Python development environment and build a python Development Environment
My environment is windows + eclipse
1. First of all, go to the official website to download python
Https://www.python.org/downloads/windows/You can automatically
Hot Topic: Python decides to migrate to GitHub
Python has decided to migrate to GitHub. Although it has been publicly stated that it is against the migration to GitHub, it will be used to a certain extent, and several core developers are also
Jumpserver of django instance, djangojumpserver
Discover a good open source bastion host jumpserver: https://github.com/ibuler/jumpserver
Jumpserver2.0.0 is the first version. The specific implementation method is as follows:
1. Django + uwgsi
Python: crawling statistics on the ratio of men and women in the school BBS (3); python male ratio
This article mainly introduces data processing. I hope you can read it carefully.
I. Data Analysis
We have obtained text data starting with the
Python implements crawling statistics on the ratio of men and women in the school BBS (1) and the ratio of men and women in python
I. project requirements
Each user id on the BBS corresponds to a user. During registration, the user will enter the
Sequence in Python
Python has four built-in data structures: List, tuples, dictionaries, and collections. The dictionary and set will be written later. Now let's talk about the list and meta-group. They are two strings that have been mentioned
Multithreading in Python (2): threading module, pythonthreading
I mentioned the usage of Python multithreading. Today I will introduce the better threading module, which provides Thread classes and some useful synchronization mechanisms.
First
Python Chinese garbled,
Add the following at the beginning of the py script:
1 #-*-coding: UTF-8 -*-
Note: This format is required! If you see that other websites have different formats, you can choose not to list them one by one. If you are
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