How does Python's super () work with multiple inheritance?
I'm a stranger to object-oriented Python programming, especially when it comes to multiple inheritance, and it's hard for me to understand the super() function (the new style class).
For example, if you have something similar:
class First(object):
def __init__(self):
print "first"
class Second(object):
def __init__(self): ...
Posted by ConnorSBB on Wed, 18 Dec 2019 02:15:16 -0800
Notes on data science and artificial intelligence technology
XIX. Data sorting (5)
Author: Chris Albon
Translator: Flying dragon
Agreement: CC BY-NC-SA 4.0
Standardization column
# Import required modules
import pandas as pd
from sklearn import preprocessing
# Set chart inline
%matplotlib inline
# Create a sample data frame with an denormalized column
data = {'score': [234,24,14,27,-74,4 ...
Posted by mingmangat on Sun, 01 Dec 2019 21:15:41 -0800
python common standard library
system interface
sys module can view and add environment variables
import sys
sys.path
>>['E:\\360MoveData\\Users\\Administrator\\Desktop\\PyTorch',
'E:\\anzhuang\\anaconda\\python37.zip',
'E:\\anzhuang\\anaconda\\DLLs',
'E:\\anzhuang\\anaconda\\lib',
'E:\\anzhuang\\anaconda',
'',
'C:\\Users\\Administrator\\AppDat ...
Posted by toshog on Fri, 29 Nov 2019 13:34:09 -0800
python self study journal 9 -- select data structure
1. Write a program to read in a word list from the file, and print out the word set of all palindromes
This palindrome is different from the one previously understood, for example:
['deltas','desalt','lasted','salted','slated','staled']
['retainers','ternaries']
All words with the same letters are included in the palindrome word set
According t ...
Posted by theoph on Mon, 04 Nov 2019 11:34:12 -0800
Data visualization: matplotlib
1. Introduction to Matplotlib
Matplotlib is a Python 2D drawing library that can generate publication quality data in various hard copy formats and cross platform interactive environments. Matplotlib can be used for Python scripts, Python and IPython shell s, Jupyter notebooks, Web application servers, and four GUI toolkits.
2. matplotlib inst ...
Posted by Fataqui on Sat, 02 Nov 2019 07:32:39 -0700
python self study diary 5 - word game
It's better to record yourself or observe others' thinking from mistakes to right when learning python than only seeing the right answers
1. Judge whether there is letter "e" in the word“
Write a function has no e to return True when the given word does not contain the letter 'e'
At the beginning, I wrote as follows:
def has_no_ ...
Posted by NeverPool on Wed, 23 Oct 2019 11:58:30 -0700
Python multitasking protocol
Preface
The core point of the collaboration is the use of the collaboration, that is, you only need to know how to use the collaboration; but if you want to know how to achieve the collaboration, you need to know the iterator, the generator in turn.
If you only want to see the use of the coordinator, you just need to look at the first part; i ...
Posted by Kitkat on Mon, 14 Oct 2019 23:48:58 -0700
PyTorch: Introduction and Practical Learning-1
Tensor and Autoograd - --- Tensor
Tensor
Establish:
Tensor(*size) does not allocate space immediately when created, but only when used, while others are allocated immediately when created.
ones(*sizes)
zeros(*sizes)
eye(*sizes) diagonal 1 other 0
arange(s,e,step) steps from s to e
linspace(s ...
Posted by laide234 on Fri, 04 Oct 2019 05:23:05 -0700
Data Analysis in Practice We Rate Dogs': Twitter Data Analysis
Through this project, learners have the opportunity to experience the whole process of data analysis, from data collection to data cleaning and analysis, and finally to visualize the analysis.
The data comes from Twitter account'We Rate Dogs'which ratings people's pet dogs in a humorous way. These score ...
Posted by quintus on Sun, 21 Jul 2019 03:58:25 -0700
Convolution and Pooling of TensorFlow Basic Operations
As mentioned earlier Operation and Significance of Image Convolution And some examples are implemented with filter2D function in OpenCV. The filter 2D function in OpenCV only uses a convolution core to deconvolute a single image matrix. In TensorFlow, the convolution operation is mainly used in the convolution layer of CNN, so the input is no ...
Posted by Gregg on Fri, 21 Jun 2019 16:28:00 -0700