Skip to content

Instantly share code, notes, and snippets.

View wenhoujx's full-sized avatar

Wenshuai Hou wenhoujx

  • Washington, DC
View GitHub Profile
@wenhoujx
wenhoujx / exclude.py
Created June 11, 2014 16:53
remove from csv1 all csv2, and overwrite csv1.
import sys
import pandas as pd
if __name__ == "__main__":
"""
excluding from f1.csv all those names in f2.csv
and write back to f1
"""
f1, f2 = sys.argv[1:]
@wenhoujx
wenhoujx / dtw1.py
Last active August 29, 2015 14:02
compute dtw with mlpy package
from mlpy import dtw_std
import numpy as np
def dtw_mlpy( x):
distmat = np.array([dtw_std( xx,yy) for xx in x for yy in x])
return distmat
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_background" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/use_theme_colors" --type bool false
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/palette" --type string "#070736364242:#D3D301010202:#858599990000:#B5B589890000:#26268B8BD2D2:#D3D336368282:#2A2AA1A19898:#EEEEE8E8D5D5:#00002B2B3636:#CBCB4B4B1616:#58586E6E7575:#65657B7B8383:#838394949696:#6C6C7171C4C4:#9393A1A1A1A1:#FDFDF6F6E3E3"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/background_color" --type string "#00002B2B3636"
gconftool-2 --set "/apps/gnome-terminal/profiles/Default/foreground_color" --type string "#65657B7B8383"