Start your python data journey
print function
Print (variable name) Print (variable)
print("hello world") # hello world
myString = "hi";
print(myString); # hi
Single-Line Comments
Single line notes begin with #
# Here are the notes
print("hi"); # Here are the notes
Continuation character
A continuation character is required because a line is too long
If ...
Posted by coder4Ever on Fri, 19 Nov 2021 08:31:45 -0800
[python] controls the sub process through the signal mechanism
In python, the use of multiple processes can bypass the limitation of GIL, so as to make full use of multi-core CPU to speed up tasks. However, if the process is not handled properly, it is easy to cause Zombie process or Orphan process , resulting in a waste of system resources.
This paper analyzes the writing methods of these two processes t ...
Posted by xkellix on Fri, 19 Nov 2021 05:53:06 -0800
[software testing] let 0 basic pure beginners also have handwritten Python and nanny level tutorials
In the previous article [software testing], 0 basic pure Xiaobai can also write python. Nanny level tutorial (III) shares the basic knowledge of Python. We will continue to share other contents this time.
catalogue
1, List
2, List element NEW
3, List element modification
4, Query list elements
5, Other actions for the list
6, List sortin ...
Posted by Warptweet on Fri, 19 Nov 2021 05:27:20 -0800
Python learning notes
In order to play the star water cup, I studied it with my teammates in fishing raids, mainly the knowledge of multithreading, multi process and decorators. I know a little about it
Multithreading
My understanding is to open a new thread to execute the functions I assigned to it
_
...
Posted by Spoiler on Thu, 18 Nov 2021 23:03:02 -0800
New logging skills in Python
Introduction: continuous learning, continuous evolution, get logging new skillsIn general, we often use the logging module to record logs. Before using it, we need to configure the template and set the Handler and Formatter to preprocess, such as log output location, output format, log blocking and backup. When using logs in different projects, ...
Posted by kellz on Thu, 18 Nov 2021 20:42:39 -0800
Introduction to Python to mastery
Function (I)
Function parameters do not need to declare types, nor do they need to specify the return value type of the functionFunction does not accept arguments, but also keep a pair ()After the brackets:
Basic syntax of function definition and call
Example 1: Fibonacci sequence
def fib(n):
a, b = 1, 1
while a < n:
pri ...
Posted by unibroue on Thu, 18 Nov 2021 20:10:19 -0800
Python shallow and deep copies
1. Difference between = = and is
==Operator compares values between objects for equality.The is operator compares whether the identities of objects are equal, that is, whether they are the same object and point to the same memory address.
In Python, the identity of each object can be obtained through the function id(object). Therefore, the is ...
Posted by russellbcv on Thu, 18 Nov 2021 18:40:08 -0800
For liver goods, Keras, Redis, Flask and Apache are used for in-depth learning in the production environment
Today we demonstrate how to use Keras, Redis, Flask, and Apache for in-depth learning in a production environment
Over the years, Dega has also sorted out a lot of learning materials about artificial intelligence (including learning roadmap, two deep learning framework videos, image recognition, OpenCV, computer vision, deep learning and neura ...
Posted by said_r3000 on Thu, 18 Nov 2021 05:29:34 -0800
Basic learning notes of Python 15: Python exceptions
1. What is an exception
When an error is detected, the interpreter cannot continue to execute. Instead, some error prompts appear, which is the so-called "exception".
2. Exception presentation
# operator
# print(10/0)
# File exception
f = open('python.txt', 'r')
content = f.readlines()
print(content)
3. Exception capture
Basic ...
Posted by lemist on Thu, 18 Nov 2021 05:17:07 -0800
The mail system of Django framework involves sending HTML, rich text and attachment mail
preface
Over the past few years, I have been struggling in the it industry. Along the way, many have summarized some high-frequency interviews in the python industry. I see most of the new blood in the industry, and I still have all kinds of difficult questions for the answers to all kinds of interview questions or collection
Therefore, I dev ...
Posted by sameveritt on Thu, 18 Nov 2021 02:34:09 -0800