# Direction of variables
a = "abc"
b = a
a = "def"
print(10/3) # The result is a decimal
print(10//3) #The result is an integer
print(10%3) # Remainder
#Python supports a variety of data types. Within a computer, any data can be viewed as an object, and variables are used in prog ...
Posted by jumphopper on Fri, 10 May 2019 12:10:05 +0200
This article is mainly due to the plan to use django to write a planned task, which can rotate the name of the staff on duty or execute scripts on time and other functions. After Baidu has countless pits, it can finally make use of this set of things to deploy. My English is not good, English is good or people who want to learn ...
Posted by tinkertron on Fri, 10 May 2019 11:12:03 +0200
1. Data type:Digital (Integer, Long Integer, Floating Point, Complex)String: Introducing bytes when introducing character encodingListYuan ZuDictionarySet
2. integer intFunction: Integer numbers such as grade/grade/ID number are correlatedDefinition: age=10. Essentially age=int(10)
The decimal system is converted to... Binary system
Print ( ...
Posted by non_zero on Fri, 10 May 2019 10:54:03 +0200
This example uses the python 2.7 environment, and python 3 should operate similarly.
Two packages, smtplib and email, are required.
Send text type mail
Here's an example of sending text messages (using SMTP from NetEase 163):
# -*- coding: UTF-8 -*-
from email.mime.text import MIMEText
from email.header import Header
from email. ...
Posted by PlasmaDragon on Fri, 10 May 2019 09:20:03 +0200
Step 1 Programming
Take the Queen N problem on github as an example
"""The n queens puzzle.
__all__ = 
"""Generate all valid solutions for the n queens puzzle"""
def __init__(self, size):
# Store the puzzle (problem) size ...
Posted by vishi83 on Fri, 10 May 2019 01:02:03 +0200
According to Wu Enda's machine learning video, the gradient descent algorithm is learned and implemented by code.
The purpose of gradient descent algorithm is to find the value of theta, which minimizes the cost function, and to attach relevant formulas.
The above figure is the definition of hypothetical function and cost f ...
Posted by daanoz on Thu, 09 May 2019 11:18:05 +0200
Python Notes for Files & Exceptions
Python Notes for Files & Exceptions
1. Read data from files
1.1 Read the entire file
1.2 File Path
1.3 read line by line
1.4 Create a list of all lines of a file
1.5 Contents of User Files
1.6 Processing large files
2 Write to file
2.1 Write empty files
2.2 W ...
Posted by ebgames56 on Wed, 08 May 2019 22:54:03 +0200
1. Decorated functions have multiple parameters.
2. Decorated functions have return values
3. Embedding decorators in functions
As you already know from the previous article, if you still don't under ...
Posted by bdeonline on Wed, 08 May 2019 21:45:02 +0200
These days, my friends say they want to read e-books, but they can only read them on the Internet, but they can't download them to the local area. What can I do? I looked at several novel websites. You can only read them directly on the Internet. To download txt, you have to buy members for money, and you can't copy and paste them directly on t ...
Posted by ironman on Wed, 08 May 2019 19:27:03 +0200
conda was used as a virtual environment management tool during development, but sometimes it is temporary and necessary.If you use conda create to create a new environment, it takes a lot of time, sometimes forgot to delete it, and finally a bunch of virtual environments in the system.After accidentally discovering pipenv, try it out and feel t ...
Posted by illushinz on Wed, 08 May 2019 17:36:02 +0200