cache credential for 1 hour : git config --global credential.helper "cache --timeout=3600"
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
def merge_dict(list_dict): | |
return dict((k,v) for d in list_dict for (k,v) in d.items()) |
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 | |
from sqlalchemy import create_engine | |
url = "http://mlr.cs.umass.edu/ml/machine-learning-databases/iris/iris.data" | |
headers = ['Sepal Length', 'Sepal Width', 'Petal Length', 'Petal Width', 'Class'] | |
iris = pd.read_csv(url, header=None, names=headers) | |
# absolute_path = 'sqlite:////{}'.format(path) | |
engine = create_engine('sqlite//:') | |
iris.to_sql('iris',engine) |
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
# unmount card on mac | |
diskutil unmount /dev/disk2s1 | |
# copy data | |
sudo dd bs=4m if=2015-11-21-raspbian-jessie.img of=/dev/rdisk2 # 2 is the number of the volume, put your own path after if |
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
arp -na | grep -i b8:27:eb |
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
def flatten_list(x): | |
return [y for l in x for y in flatten_list(l)] if isinstance(x,list) else [x] |
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
mydict[new_key] = mydict.pop(old_key) |
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
clang++ -std=c++11 -stdlib=libc++ -Wno-c++98-compat main.cpp |
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
vboxmanage --version # check virtualbox version |
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
source ~/.zshrc #reload your zsh config |
OlderNewer