Skip to content

Instantly share code, notes, and snippets.

View ericfourrier's full-sized avatar
🦉
Building neat tools to secure cloud and source code

Eric Fourrier ericfourrier

🦉
Building neat tools to secure cloud and source code
View GitHub Profile
@ericfourrier
ericfourrier / merge_dicts.py
Created July 4, 2015 14:04
merge list of python dictionnary
def merge_dict(list_dict):
return dict((k,v) for d in list_dict for (k,v) in d.items())
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)
# 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
arp -na | grep -i b8:27:eb
def flatten_list(x):
return [y for l in x for y in flatten_list(l)] if isinstance(x,list) else [x]
mydict[new_key] = mydict.pop(old_key)

cache credential for 1 hour : git config --global credential.helper "cache --timeout=3600"

clang++ -std=c++11 -stdlib=libc++ -Wno-c++98-compat main.cpp
vboxmanage --version # check virtualbox version
source ~/.zshrc #reload your zsh config