$ echo manual | sudo tee /etc/init/logstash-web.override
$ sudo stop logstash-web
$ sudo stop logstash
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# From: http://www.reddit.com/r/Python/comments/2lzry9/most_efficient_way_to_generate_random_dataevents/clzoj3t | |
head -c <large number> /dev/zero ¦ tr '\0' '\n' ¦ cat -n ¦ xargs -L1 printf 'This is message number %s\n' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from itertools import chain, product | |
from re import match, findall | |
GRAMMAR = ''' | |
<sentence> ::= <noun phrase=""> <verb phrase=""> | |
<noun> ::= "boy " | "troll " | "moon " | "telescope " | |
<transitive verb=""> ::= "hits " | "sees " | |
<intransitive verb=""> ::= "runs " | "sleeps " | |
<adjective> ::= "big " | "red " |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from postcode import uk as uk_postcode | |
""" | |
452012,S119FJ,53.357507510309200,-1.505868797298880 | |
452013,S119FL,53.357735137233300,-1.506572342021560 | |
452014,S119FN,53.356698394080900,-1.503669525537920 | |
""" | |
for line in open('postcodes.csv'): | |
pieces = line.strip().split(',') |
Moved to github.com/marklit/recommend
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from random import randint | |
LIVING_SPACE_CELL_SIZE = 24 | |
class Alive(object): | |
pass | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pip install requests termcolor tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"ACE-BFS": { | |
"airports": { | |
"ACE": { | |
"airport_name": "Lanzarote Airport", | |
"iata": "ACE", | |
"latitude": 28.94556, | |
"longitude": -13.60528 | |
}, | |
"BFS": { |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ABE | CLT | 49130 | |
---|---|---|---|
ABE | DTW | 31350 | |
ABE | MYR | 7670 | |
ABE | PHL | 34670 | |
ABE | PIE | 24270 | |
ABX | SYD | 225400 | |
ABZ | BHX | 125060 | |
ABZ | DUB | 47295 | |
ABZ | KOI | 49091 | |
ABZ | LCY | 63163 |
OlderNewer