- 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
| #!/bin/bash | |
| ### USAGE | |
| ### | |
| ### ./ElasticSearch.sh 1.7 will install Elasticsearch 1.7 | |
| ### ./ElasticSearch.sh will fail because no version was specified (exit code 1) | |
| ### | |
| ### CLI options Contributed by @janpieper | |
| ### Check http://www.elasticsearch.org/download/ for latest version of ElasticSearch |
| 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)) |
| from pytest import mark | |
| items = [ | |
| { | |
| 'text': 'bla bla', | |
| 'fields': [('bla', 0), ('foo', -1)] | |
| }, | |
| { | |
| 'text': 'foo bar', |
| # Source: http://download.geonames.org/export/dump/countryInfo.txt | |
| POSTAL_CODES = { | |
| '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})', |
| /* | |
| 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 |
| my_singleton = None | |
| class Foo(object): | |
| def __init__(self): | |
| pass | |
| def do(arg): |
| """ 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 | |
| from string import ascii_letters, digits | |
| from re import match, sub | |
| from time import strptime | |
| from unicodedata import normalize | |
| from datetime import datetime | |
| SLUG_SEPERATOR = '-' | |
| _multiple_seperators_regex = '%s{2,}' % SLUG_SEPERATOR # eg. bla-bla--bla |