This file contains hidden or 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 sys | |
| import librosa | |
| import numpy as np | |
| def normalize_audio(raw_audio): | |
| minval = raw_audio.min() | |
| maxval = raw_audio.max() | |
| audio = (((raw_audio - minval) / float(maxval - minval)) - 0.5) * 2.0 | |
| return audio |
This file contains hidden or 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 os | |
| import theano | |
| import numpy as np | |
| import theano.tensor as T | |
| from keras import backend as K | |
| from keras.models import Sequential | |
| from keras.layers.core import Layer, Dense, Lambda | |
| def log_sum_exp(x, axis=None): |
This file contains hidden or 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
| """ | |
| :| | |
| - Email provider doesn't allow me to send certain file types. | |
| - I have python installed on all my machines. | |
| - Inflates the file size by ~4.5X, still remains under 25M for me. | |
| """ | |
| from __future__ import print_function | |
| import sys |
This file contains hidden or 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 Recurrent | |
| import keras.backend as K | |
| from keras import activations | |
| from keras import initializers | |
| from keras import regularizers | |
| from keras import constraints | |
| from keras.engine import Layer | |
| from keras.engine import InputSpec |
This file contains hidden or 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 cv2 | |
| import sys | |
| import numpy as np | |
| from scipy import signal | |
| import matplotlib.pyplot as plt | |
| def get_wld_feats(gray_img): | |
| f00 =np.array([[1, 1, 1], [1, -8, 1], [1, 1, 1]]) | |
| f10 = np.array([[0, -1, 0], [0, 0, 0], [0, 1, 0]]) | |
| f11 = np.array([[0, 0, 0], [1, 0, -1], [0, 0, 0]]) |
This file contains hidden or 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 os | |
| import sys | |
| import torch | |
| import librosa | |
| import numpy as np | |
| import torch.nn as nn | |
| import torch.optim as optim | |
| from torch.autograd import Variable | |
| from sklearn.model_selection import train_test_split |
This file contains hidden or 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
| #include <stdio.h> | |
| #include <stdlib.h> | |
| #include <stdint.h> | |
| #ifdef _MSC_VER | |
| #include <intrin.h> /* for rdtscp and clflush */ | |
| #pragma optimize("gt",on) | |
| #else | |
| #include <x86intrin.h> /* for rdtscp and clflush */ | |
| #endif |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| """ | |
| Replace following four appropriately first: | |
| yourname yourcompany http://yourcompany.com http://yourcompany.com/logo.png | |
| """ | |
| import os | |
| import sys | |
| import urllib | |
| import argparse | |
| parser = argparse.ArgumentParser() |
This file contains hidden or 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
| function snip() { | |
| PS1="\n\[\033[35m\]\$(/bin/date)\n\[\033[32m\]\w\n\[\033[1;31m\]\u@\h: \[\033[1;34m\]\$(/usr/bin/tty | /bin/sed -e 's:/dev/::'): \[\033[1;36m\]\$(/bin/ls -1 | /usr/bin/wc -l | /bin/sed 's: ::g') files \[\033[1;33m\]\$(/bin/ls -lah | /bin/grep -m 1 total | /bin/sed 's/total //')b\[\033[0m\] -> \[\033[0m\] " | |
| } | |
| function swog() { | |
| PS1="\[\e[36;45m\]▓\[\e[m\]\[\e[36;45m\]▒\[\e[m\]\[\e[36;45m\]░\[\e[m\]\[\e[36;45m\]\u\[\e[m\]\[\e[36;45m\]@\[\e[m\]\[\e[36;45m\]\h\[\e[m\]\[\e[36;45m\]:\[\e[m\]\[\e[35;46m\]\w\[\e[m\]\[\e[35;46m\]░\[\e[m\]\[\e[35;46m\]▒\[\e[m\]\[\e[35;46m\]▓\[\e[m\]>>> " | |
| } |
OlderNewer