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
#!/usr/bin/python | |
import os | |
for file in os.listdir("."): | |
if file.endswith("wma"): | |
name = file[:-4] | |
command = "ffmpeg -i '{0}.wma' '{0}.mp3' -y".format(name) | |
os.system(command) |
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
CC="gcc -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp " srcdir=. sh ./osdef.sh | |
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -O6 -o objects/buffer.o buffer.c | |
warning: optimization level '-O6' is unsupported; using '-O3' instead | |
1 warning generated. | |
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -O6 -o objects/blowfish.o blowfish.c | |
warning: optimization level '-O6' is unsupported; using '-O3' instead | |
1 warning generated. | |
gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X_UNIX -no-cpp-precomp -O6 -o objects/charset.o charset.c | |
warning: optimization level '-O6' is unsupported; using '-O3' instead | |
1 warning generated. |
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
" Author: Henry Lin | |
" | |
" Here are some helpful vim settings that vim may not have on by default. | |
" To toggle any of these settings off, simply append a " character to the | |
" front of the line | |
" | |
" If there's ever a setting you think this file does not have, then | |
" look it up! There is plenty of documentation online to help you | |
" customize your vim. In particular, this .vimrc does not mention | |
" much about key remapping, which may be of interest to some of you. |
We can make this file beautiful and searchable if this error is corrected: No commas found in this CSV file in line 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
"Sepal.Length" "Sepal.Width" "Petal.Length" "Petal.Width" "Species" | |
"1" 1 3 1 1 "setosa" | |
"2" 1 2 1 1 "setosa" | |
"3" 1 2 1 1 "setosa" | |
"4" 1 2 1 1 "setosa" | |
"5" 1 3 1 1 "setosa" | |
"6" 1 3 1 1 "setosa" | |
"7" 1 3 1 1 "setosa" | |
"8" 1 3 1 1 "setosa" | |
"9" 1 1 1 1 "setosa" |
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 time import time | |
import numpy as np | |
from sklearn import svm | |
print("Starting the timer") | |
start = time() | |
xx, yy = np.meshgrid(np.linspace(-5, 5, 500), np.linspace(-5, 5, 500)) | |
# Generate train data | |
X = 0.3 * np.random.randn(100000, 2) | |
X_train = np.r_[X + 2, X - 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
import smtplib | |
from email.mime.text import MIMEText | |
import time | |
from time import strftime | |
import traceback | |
__author__ = "Henry Lin <[email protected]>" | |
__version__ = "0.1" | |
class Notification(object): |
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 __future__ import print_function | |
import time | |
import sys | |
__author__ = "Henry Lin <[email protected]>" | |
class Timer(object): | |
"""Implements a timer which clocks the amount of time it takes for | |
a piece of code to run. It wraps a "context", which makes timing | |
the code unobtrusive. |
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.preprocessing import LabelEncoder | |
from sklearn.utils.validation import check_random_state, check_X_y, check_array | |
import numpy as np | |
import theano.tensor as T | |
import theano | |
class LogisticRegression(object): | |
floatX = theano.config.floatX |