This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn.datasets import make_blobs | |
from matplotlib import pyplot as plt | |
import numpy as np | |
def distance(ix, iy): | |
return np.linalg.norm(x_map[ix] - x_map[iy]) | |
def is_cluster(ix): | |
return yy[ix] > 0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 可视化网站 链接http://athena.ecs.csus.edu/~associationcw/FpGrowth.html | |
// 对于一些数据可能会出错误 | |
var align = [["A",1,], | |
["B",2,], | |
["C",3,], | |
["D",4,], | |
["E",5,], | |
["F",6,], | |
["G",7,], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import random | |
A = ["a1","a2","a3","a4"] | |
B = ["b1","b2","b3","b4"] | |
C = ["c1","c2","c3","c4"] | |
D = ["d1","d2"] | |
ALL = [A,B,C,D] | |
def sample(size = 6): | |
li = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ele = $('tbody tr input'); | |
index = 0; | |
value = [0,0,0,0,0, | |
0,0,0,0,0, | |
0,0,0,0,0, | |
0,0, | |
1,1,2,0]; | |
txt = "老师教的很好"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ū#u,1 | |
à#a,4 | |
ǔ#u,3 | |
ǐ#i,3 | |
í#i,2 | |
é#e,2 | |
ó#o,4 | |
ò#o,2 | |
ā#a,1 | |
ú#u,2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class ParallelModel(keras.models.Model): | |
"""Subclasses the standard Keras Model and adds multi-GPU support. | |
It works by creating a copy of the model on each GPU. Then it slices | |
the inputs and sends a slice to each copy of the model, and then | |
merges the outputs together and applies the loss on the combined | |
outputs. | |
""" | |
def __init__(self, keras_model, gpu_count): | |
"""Class constructor. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from keras.layers import Layer | |
import numpy as np | |
from keras.layers import Lambda | |
from librosa.feature import melspectrogram | |
from keras import backend as K | |
from keras.preprocessing.sequence import pad_sequences | |
from sklearn.preprocessing import scale as skscale | |
from scipy import signal | |
class MelFeature(): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python setup.py sdist bdist_wheel | |
SET CountI=0 | |
SET BakDir="./dist/" | |
for /f %%a in ('dir %BakDir% /a:-d /B /o:-D') do ( | |
rem echo %%a | |
SET FileName=%%a | |
SET CountI=CountI+1 | |
rem echo %CountI% | |
if %CountI% == 0 goto bakup2 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Windows Registry Editor Version 5.00 | |
[HKEY_CLASSES_ROOT\.md\ShellNew] | |
"NullFile"="" | |
"FileName"="template.md" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set /p commitmsg=input commitmsg: | |
git add * | |
git commit -m %a% | |
git push |
OlderNewer