I hereby claim:
- I am hdemers on github.
- I am hdemers (https://keybase.io/hdemers) on keybase.
- I have a public key whose fingerprint is D2D0 47F8 1BFD D447 2400 FCA1 FC21 2198 8E36 D320
To claim this, I am signing this object:
from functools import wraps | |
def decorator(fn): | |
"""A function that *is* a decorator. | |
Use it like so: | |
@decorator | |
def foobar(arg): | |
return arg |
mkvirtualenv datascience | |
sudo apt-get install python-scipy libblas-dev liblapack-dev gfortran | |
sudo apt-get install libffi-dev # for cryptography from scrapy | |
sudo apt-get install libxslt-dev # for libxml from scrapy | |
export BLAS=/usr/lib/libblas.so | |
export LAPACK=/usr/lib/liblapack.so | |
pip install numpy | |
pip install scipy | |
pip install scikit-learn | |
pip install pandas |
cd $HOME | |
# Create the installation directory | |
export DIR=$HOME/.local | |
export SRC=$HOME/src | |
mkdir -p $DIR | |
mkdir -p $SRC | |
# Download libevent, ncurses and tmux | |
cd $SRC | |
wget https://github.com/libevent/libevent/releases/download/release-2.1.8-stable/libevent-2.1.8-stable.tar.gz |
I hereby claim:
To claim this, I am signing this object:
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.9 (GNU/Linux) | |
mQGhBEqdGmsRBACATgfXCQEbnW+OEjVxC41zALr9onmMeKiMIK1HT0D44Wm2BK4A | |
+w0CFgp+86FLFx+BBQlnWwmHAJDhietAgkcrKpbhh/bK2KsZcRLiL7qtu/ljuHVK | |
ZOryVCnGomDOSIkg4gyNJaSFqxh0u8rm/iHqA7Emdzh9qvVC1cZAgnWCewCg6INj | |
Ca2JUcD42wagxE66uvWRNQcD+M4bTYjdghMKjWdw4MvzXNrx3ewuJIsZoEvHQvkS | |
S4jDxRuubp6qVDiGFdGkgWO/mrWThuWMpmOrqY0AXdvzxstmQa2X4lhkpoj444II | |
XVQ91R29lIZWNV7j4UBOR5Kncpn0ZS5bt2P1yOlFcMswbryhK2AZgu8B4mi7CmJ/ | |
trED/1kwTrwehIYxer/hxnTwGKqr+CsRNRTaO4800ftUoD/dmSWEOc7Kxpuo/V/d |
"""UTC time conversion functions. | |
""" | |
from calendar import timegm | |
from datetime import datetime | |
def utcdt2epoch(utcdatetime): | |
"""Convert a datetime object expressed in UTC to a Unix timestamp expressed | |
in seconds since the epoch (Jan 1st 1970). | |
""" |
def chunks(l, n): | |
""" Yield successive n-sized chunks from l. | |
Cf. http://stackoverflow.com/a/312464 | |
""" | |
for i in xrange(0, len(l), n): | |
yield l[i:i+n] |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> | |
<title>d3.js Spinny Globe from Mike Bostock's SVG Open 2011 keynote</title> | |
<script src="http://mbostock.github.com/d3/d3.js"></script> | |
<script src="http://mbostock.github.com/d3/d3.geo.js"></script> | |
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/style.css"/> | |
<link type="text/css" rel="stylesheet" href="http://mbostock.github.com/d3/talk/20111018/colorbrewer/colorbrewer.css"/> | |
<style type="text/css"> |
-- La première requète pour les projets ayant le plus de fork | |
SELECT repository_name, MIN(repository_forks) as mini, MAX(repository_forks) as maxi, MAX(repository_forks) - MIN(repository_forks) as diff | |
FROM githubarchive:github.timeline WHERE type = "ForkEvent" AND LENGTH(actor_attributes_location) > 3 AND repository_forks > 200 | |
GROUP BY repository_name | |
ORDER BY maxi DESC; | |
-- La deuxième requète pour la localisation et le nombre de fork en fonction du temps | |
SELECT created_at, actor_attributes_location, repository_forks | |
FROM githubarchive:github.timeline WHERE type = "ForkEvent" AND LENGTH(actor_attributes_location) > 3 AND repository_name = "bootstrap" AND repository_owner = "twitter" AND repository_fork = "false" | |
ORDER BY repository_forks |