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
""" | |
Turn a piano MIDI file into a basic 3D animated piano video. | |
See the result here: | |
I am leaving it as a script because it is not tested on enough MIDI files yet. | |
Zulko 2014 | |
This script is released under a Public Domain (Creative Commons 0) licence. |
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
#!/usr/bin/env python2 | |
import boto | |
from collections import defaultdict | |
from pprint import pprint | |
import os, sys | |
DIVIDER = """ | |
=========================================== | |
======== ec2-instances ======== |
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
#!/usr/bin/env python2 | |
# coding: utf-8 | |
import os,socket,threading,time | |
#import traceback | |
allow_delete = False | |
local_ip = socket.gethostbyname(socket.gethostname()) | |
local_port = 8888 | |
currdir=os.path.abspath('.') |
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
var active = false; | |
function changeRefer(details) { | |
if (!active) return; | |
for (var i = 0; i < details.requestHeaders.length; ++i) { | |
if (details.requestHeaders[i].name === 'Referer') { | |
details.requestHeaders[i].value = 'http://www.google.com/'; | |
break; | |
} |
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
import vcrutils | |
VCR_CASSETTE_PATH = APPROOT + '/venmo_tests/cassettes/' # eg | |
MAKE_EXTERNAL_REQUESTS = os.environ.get('MAKE_EXTERNAL_REQUESTS') == 'TRUE' | |
@dual_decorator # convert a paramaterized decorator for no-arg use (https://gist.github.com/simon-weber/9956622). | |
def external_call(*args, **kwargs): | |
"""Enable vcrpy to store/mock http requests. |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.so | |
# Packages # |
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
curl ifconfig.me |
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
... | |
public class MyConsumer { | |
private static final int SO_TIMEOUT = 100000; // socket timeout | |
private static final int BUFFER_SIZE = 64 * 1024; // maximum socket receive buffer in bytes | |
private static final int FETCH_SIZE = 100000; // maximum bytes to fetch from topic | |
public static void main(String args[]) { | |
MyConsumer myConsumer = new MyConsumer(); |
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
""" | |
Behave runner for running features asynchronously. | |
""" | |
from multiprocessing import Pool | |
from subprocess import call, Popen, PIPE | |
from glob import glob | |
import logging | |
import argparse | |
import json | |
from functools import partial |
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
;; These notes describe the snapshots of a shared state between | |
;; pariticipants in a system co-ordinated using CRDT methods, hopefully | |
;; matching the Quilt notes from @cemerick at | |
;; http://writings.quilt.org/2014/05/12/distributed-systems-and-the-end-of-the-api/ | |
;; The ambition is to built systems where network failures, replays | |
;; etc. can be safely ignored (instead of just being ignored). | |
;; Maintaining the "timestamps" for the append only database is the only | |
;; thing I feel I don't grok. There are some notes at the end of the | |
;; gist. Hoping for feedback or pointers! |
OlderNewer