Skip to content

Instantly share code, notes, and snippets.


cyberbikepunk cyberbikepunk

View GitHub Profile
cyberbikepunk /
Created Jun 18, 2016 — forked from ricardo-rossi/
Installing ElasticSearch on Ubuntu 14.04
### ./ 1.7 will install Elasticsearch 1.7
### ./ will fail because no version was specified (exit code 1)
### CLI options Contributed by @janpieper
### Check for latest version of ElasticSearch
cyberbikepunk /
Created May 16, 2016
Print all CAPITALIZED settings in a settings file.
def show_settings():
""" Echo all settings. """
print('Current m5 settings:', end='\n\n')
objects = dir(modules[__name__])
parameters = [x for x in objects if x.isupper() and x is not 'PASSWORD']
for p in parameters:
value = getattr(modules[__name__], p)
print('{item} = {value!r}'.format(item=p.rjust(20, ' '), value=value))
cyberbikepunk /
Last active May 10, 2016
StackOverflow Question 37124766
from pytest import mark
items = [
'text': 'bla bla',
'fields': [('bla', 0), ('foo', -1)]
'text': 'foo bar',
cyberbikepunk /
Last active Oct 22, 2015
Regex patterns for postal codes of ~150 countries
# Source:
'AD': '(?:AD)*(\d{3})',
'AM': '(\d{6})',
'AR': '[A-Z]\d{4}[A-Z]{3})',
'AT': '(\d{4})',
'AU': '(\d{4})',
'AX': '(?:FI)*(\d{5})',
'AZ': '(?:AZ)*(\d{4})',
'BA': '(\d{5})',
View defender.js
This AI simply saves the planet.
function find_closest_rock(rocks){
var closest = 0
for (var i = 1; i < rocks.length; i++){
if (rocks[i].distance < rocks[closest].distance){
closest = i
cyberbikepunk /
Last active Oct 5, 2015 — forked from anonymous/
Quick Unittest Mock tutorial
my_singleton = None
class Foo(object):
def __init__(self):
def do(arg):

Micro CV

Personal info

  • Born in 1975 in Paris, currently in Berlin
  • English (native), French (native), German (pretty good)


  • MSci. in physics, Imperial College London
  • Ph.D in experimental atmospheric physics, University of Toronto
cyberbikepunk /
Last active Sep 19, 2015
Download all files from a GitHub repo
""" This module interfaces with GitHub. """
from os.path import splitext
from json import loads
from base64 import b64decode
from requests import get
from .murls import https
cyberbikepunk /
Last active Sep 19, 2015
Random string processors
from string import ascii_letters, digits
from re import match, sub
from time import strptime
from unicodedata import normalize
from datetime import datetime
_multiple_seperators_regex = '%s{2,}' % SLUG_SEPERATOR # eg. bla-bla--bla
cyberbikepunk / generic.ipynb
Last active Sep 19, 2015
The generic ipython notebook format
View generic.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.