Is Python an ordered set?
Python has a An orderly dictionary . How about an orderly set?
#1 building
For many purposes, just calling sorted is enough. for example
>>> s = set([0, 1, 2, 99, 4, 40, 3, 20, 24, 100, 60])
>>> sorted(s)
[0, 1, 2, 3, 4, 20, 24, 40, 60, 99, 100]
If you want to reuse this feature, calling the sorted function incur ...
Posted by ctoshack on Wed, 29 Jan 2020 22:53:59 -0800
Introduction to deep learning
Catalog
Parameter update
1sgd (random gradient descent) method
1.1SGD drawback
2Momentum method
3AdaGrad method
4Adam method
5 cases
5.1 common folder
5.1.1,common/functions.py
5.1.2,common/gradient.py
5.1.3,common/layers.py
5.1.4,common/util.py
5.1.5,common/optimizer.py
5.1.6,common ...
Posted by tippy_102 on Wed, 29 Jan 2020 20:39:40 -0800
Detectron 2 (target detection framework) - 07: source details - model building - retinaet as an example
The following links are personal opinions on detectron 2 (target detection framework). If there is any error, please point out it. I will correct it as soon as possible. Interested friends can add wechat: a944284742 to discuss technology with each other. If it helps you anything, remember to like it! Be ...
Posted by HA7E on Tue, 28 Jan 2020 05:20:32 -0800
Kotlin series - progress bar with arc
This article has authorized WeChat public number Guo Lin (guolin_blog) to reprint.
This is a progress bar with an arc. In fact, this control has been implemented for a long time, but I want to rewrite and optimize it with Kotlin and explain it.
Project GitHub: CircularArcProgressView
Design sketch
...
Posted by bapi on Tue, 28 Jan 2020 01:19:39 -0800
Python common built-in functions
Built in function table
abs()
all()
any()
ascii()
bin()
bool()
bytes()
callable()
compile()
complex()
chr()
delattr()
dir()
divmod()
enumerate()
eval()
exec()
exit()
filter()
float()
frozenset()
getattr()
globals()
hasattr()
hash()
help()
hex()
id()
input()
int()
isinstance()
iter()
le ...
Posted by 448191 on Tue, 21 Jan 2020 09:19:14 -0800
[python automatic office] insert pictures, generate histogram, line chart and pie chart into Excel file
Insert picture
openpyxl.drawing.image/sheet.add_image()
import os
os.chdir('D:\\python_major\\auto_office9')
from openpyxl import load_workbook
from openpyxl.drawing.image import Image
workbook = load_workbook(filename = 'This is a form.xlsx')
sheet = workbook.active
photo = Image('1.jpg')
photo.heig ...
Posted by phwae on Tue, 21 Jan 2020 05:19:44 -0800
How to redirect to 404 in Rails?
I want to "fake" 404 pages in Rails. In PHP, I only send headers with error codes as follows:
header("HTTP/1.0 404 Not Found");
How does Rails do this?
#1 building
The selected answer does not work in Rails 3.1 + because the error handler has been moved to middleware (see github issue ).
This is a solution that I am ve ...
Posted by woobarb on Mon, 20 Jan 2020 06:07:27 -0800
Machine learning Bayes task05
Bayesian Theory:
Bayesian python implementation:
from sklearn.naive_bayes import GaussianNB
from sklearn.datasets import load_iris
import pandas as pd
import numpy as np
from sklearn.model_selection import train_test_split
iris = load_iris()
X_train, X_test, y_train, y_test = train_test_split(iri ...
Posted by username123 on Mon, 20 Jan 2020 05:38:38 -0800
How to replace nan in dataframe?
In data cleaning and other work, the essential link is missing value processing. When using pandas to read or process data, the missing value of dataframe is filled with nan by default. But in most cases, we need None or Null instead of nan. So, how to replace nan in dataframe?
There are many ways t ...
Posted by JessePHP on Mon, 20 Jan 2020 03:33:10 -0800
tensorflow2.0 series: Eagle execution and Auto Graph
Catalog
Disadvantages of static graph
Eager mode
Basic features of Eagle execution
Support for numpy
Auto Graph - dynamic graph
static analysis VS dynamic flow
Visible domain of local parameter
The use of python collections data in tensorflow control flow
Dimension and data type of sensor in ten ...
Posted by shadypalm88 on Sun, 19 Jan 2020 03:18:26 -0800