Skip to content

Instantly share code, notes, and snippets.

View BibMartin's full-sized avatar

Martin Journois BibMartin

View GitHub Profile
git config --global alias.lola "log --graph --decorate --pretty=oneline --abbrev-commit --all"
np.interp(
target.index.values.astype(int),
source.index.values.astype(int),
source.values,
)
@BibMartin
BibMartin / How to install several mongo shards on a single machine.md
Created March 2, 2016 09:07
How to install several mongo shards on a single machine

Inspired by this article

In this tutorial, my IP machine is 192.168.1.65 ; please replace it by your own IP machine.

sudo -s
apt-get install git
apt-get install mongodb-server
nano /etc/mongodb.conf          # replace 127.0.0.1 by the machine IP
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BibMartin
BibMartin / test_continuum_repo.py
Created February 25, 2016 10:49
Test continuum repo consistency
import requests, re
import numpy as np
import pandas as pd
out = pd.Series([])
for i in range(10):
r = requests.get('https://repo.continuum.io/pkgs/free/linux-64/')
assert r.ok
libs = re.findall('<tr>\s*<td>.*?>(.*?)</a></td>', r.text, re.DOTALL)
assert len(libs) == len(re.findall('<tr>\s*<td>(.*?)</td>', r.text, re.DOTALL))
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BibMartin
BibMartin / HowTo embed python-nvd3 chart in folium.ipynb
Last active February 7, 2016 11:06
HowTo embed python-nvd3 chart in folium
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BibMartin
BibMartin / Create Map label with folium.ipynb
Created January 31, 2016 14:55
Create map label with folium
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@BibMartin
BibMartin / main.md
Created January 26, 2016 13:45
Create and enable a kernel for jupyter notebook with conda
conda create -n py27 python=2.7 ipykernel
source activate py27

python -m ipykernel install --user --name py27 --display-name "Python 2.7"