This file contains hidden or 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
fakemail: python fakemail.py localhost ${MAIL_PORT:-4467} |
This file contains hidden or 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
import random | |
sherlock = open('sherlock-normalized.txt', 'r').read() | |
sherlock[100:200] | |
# look at each word (DONE) | |
# look at the next word in the sequence | |
# add the next word to the list of words following the first word | |
class Markov(object): |
This file contains hidden or 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
#!/bin/bash | |
conf=$1 | |
count=$2 | |
if [ -z "${conf}" ] || [ -z "${count}" ]; then | |
echo "Usage: $0 conf count" 1>&2 | |
exit 1 | |
fi | |
dir=$(echo $conf | sed "s/service/instances/") |
This file contains hidden or 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
#cloud-config | |
coreos: | |
etcd: | |
#discovery: https://discovery.etcd.io/203df1b81a502546048a45336d7d669b | |
addr: $public_ipv4:4001 | |
peer-addr: $public_ipv4:7001 | |
units: | |
- name: etcd.service | |
command: start |
This file contains hidden or 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
alias wheel_add="pip wheel --wheel-dir=$HOME/wheelhouse" | |
alias wheel_install="pip install --use-wheel --no-index --find-links=$HOME/wheelhouse" |
This file contains hidden or 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
[ | |
{ | |
"children": [], | |
"name": "a task @done", | |
"tags": { | |
"done": null | |
} | |
}, | |
{ | |
"children": [ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 BaseHTTPServer import HTTPServer, BaseHTTPRequestHandler | |
import json | |
from multiprocessing import Pool, Queue | |
import random | |
import requests | |
from requests.packages.urllib3.exceptions import ProtocolError | |
import sys | |
import time | |
from timeit import timeit |
This file contains hidden or 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
# Description: | |
# Control marathon via hubot | |
# | |
# Configuration: | |
# HUBOT_MARATHON_HOST=marathon.yourcompany.com:8080 | |
# | |
# Commands: | |
# hubot marathon - show the instances of all apps | |
# hubot marathon <id> - show the number of instances for app <id> | |
# hubot scale <id> <number> - scale app ID to <number> instances |
This file contains hidden or 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
# -*- encoding: utf-8 -*- | |
import hashlib | |
import itertools | |
import os | |
class BlobStore(dict): | |
def identify(self, blob): | |
return 'sha1-%s' % hashlib.sha1(blob).hexdigest() |