Skip to content

Instantly share code, notes, and snippets.

View BibMartin's full-sized avatar

Martin Journois BibMartin

View GitHub Profile
@BibMartin
BibMartin / HowTo embed python-nvd3 chart in folium.ipynb
Last active February 7, 2016 11:06
HowTo embed python-nvd3 chart in folium
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@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
np.interp(
target.index.values.astype(int),
source.index.values.astype(int),
source.values,
)
git config --global alias.lola "log --graph --decorate --pretty=oneline --abbrev-commit --all"
```python
import numpy as np
import scipy.stats as st
import matplotlib.pyplot as plt
import openturns as ot
import pandas as pd
sequence = ot.LowDiscrepancySequence(ot.HaltonSequence(1000))
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.