I hereby claim:
- I am psobot on github.
- I am psobot (https://keybase.io/psobot) on keybase.
- I have a public key whose fingerprint is B8C4 380D 42A7 C58C 9528 93AD 66BD 052C A0BF 6065
To claim this, I am signing this object:
.PHONY: run | |
run: test | |
./$< | |
test: test.o runtime.o | |
gcc -arch i386 $^ -o $@ | |
%.o: %.asm | |
nasm -f macho $< -o $@ |
I hereby claim:
To claim this, I am signing this object:
<?php | |
function isOntarioPostalCode($string){ | |
return preg_match("%[PKLNM]\d[ABCEGHJKLMNPRSTVWXYZ]( )?\d[ABCEGHJKLMNPRSTVWXYZ]\d%i"), $string); | |
} | |
?> |
# Jobmine Data Parser v0.1 | |
# Peter Sobot, January 15, 2012 | |
# | |
# Takes in a Jobmine search result dump (i.e.: "ps.xls" which is actually HTML) | |
# puts it all into a DB for easy self-searching and fun | |
# | |
# Assumed table system: | |
# | |
# CREATE TABLE `jobs` ( |
import Queue | |
import threading | |
import sys | |
__author__ = 'psobot' | |
class ExceptionThread(threading.Thread): | |
def __init__(self, *args, **kwargs): | |
threading.Thread.__init__(self, *args, **kwargs) | |
self.__status_queue = Queue.Queue() |
proxy_cache_path /tmp/recipe_cache levels=1:2 keys_zone=RECIPE:64m inactive=3600m max_size=360m; | |
# Yada yada yada... | |
server { | |
# Yada yada yada, more in here... | |
location ^~ /recipes { | |
rewrite ^/recipes\??(.*) /recipes?key={your_private_api_key_here}&$1 break; |
class RoundingDict(dict): | |
def __getitem__(self, key): | |
if key in self: | |
return dict.__getitem__(self, key) | |
try: | |
values = [abs(x - key) for x in self.keys()] | |
return self.values()[values.index(min(values))] | |
except (TypeError, ValueError): | |
raise KeyError(key) |
""" | |
"The Beatbox Machine" by Peter Sobot and Borna Almasi | |
Designed and written in 4 hours on Sept. 25, 2011 at Music Hack Day Montréal | |
Dependencies: | |
EchoNest.Remix | |
Wubmachine.Remixer (https://github.com/psobot/wub-machine) | |
this file should end up in <wub-root>/remixers/beatbox.py | |
Honestly, this is just a code-dump to Github. (And the code only sorta-kinda-works, with hardcoded values.) |
;; Read-only, network-free sandbox | |
;; Mac OS X 10.7+ | |
;; Restricts file writes and network access for any command run like: | |
;; sandbox-exec -f ronf.sb <command> | |
;; Useful for untrusted programs that should only do computation. | |
(version 1) | |
(allow default) | |
(deny file-write*) | |
(deny network*) |
\documentclass[10pt]{article} | |
\usepackage[margin=1in]{geometry} | |
\usepackage[utf8]{inputenc} | |
\usepackage{amsmath} | |
\usepackage{amsfonts} | |
\usepackage{amssymb} | |
\setcounter{secnumdepth}{0} | |
\usepackage{fancyhdr, lastpage} | |
\pagestyle{fancy} |