Skip to content

Instantly share code, notes, and snippets.

View MostAwesomeDude's full-sized avatar

Corbin Simpson MostAwesomeDude

View GitHub Profile
#!/usr/bin/env python
# encoding: utf-8
"""
jdism.py
Created by Tyler Kennedy on 2011-02-27.
Copyright (c) 2011 Tyler Kennedy. All rights reserved.
"""
__all__ = ["OperandTypes", "StreamAssembler", "StreamDisassembler"]
diff --git a/dump.py b/dump.py
index 5298ae5..51e9cdd 100644
--- a/dump.py
+++ b/dump.py
@@ -191,6 +191,16 @@ def items_pass(jar, name):
return ret
+def blocks_pass(jar, name):
+ """
"E": {
"<init>": [
18,
12
],
"a": [
"sand"
],
"c": [
0.5
commit a50f7aee7c792c7deac811e592eead151e2170e4
Author: Corbin Simpson <MostAwesomeDude@gmail.com>
Date: Thu May 26 05:33:07 2011 -0700
identify: Add the login handler class.
To get at the protocol version.
diff --git a/burger/toppings/identify.py b/burger/toppings/identify.py
index 3cc0717..c636578 100644
@MostAwesomeDude
MostAwesomeDude / .bashrc
Created August 6, 2011 01:01
Highway Star
# /etc/skel/.bashrc
#
# This file is sourced by all *interactive* bash shells on startup,
# including some apparently interactive shells such as scp and rcp
# that can't tolerate any output. So make sure this doesn't display
# anything or bad things will happen !
# Test for an interactive shell. There is no need to set anything
# past this point for scp and rcp, and it's important to refrain from
commit be6c1758ea376f9559aa117bf1ec44340b4eff2c
Author: Corbin Simpson <simpsoco@osuosl.org>
Date: Fri Oct 21 13:48:16 2011 -0700
static: Don't try to dereference possibly undefined module when initializing.
Fixes failed init when Logging isn't enabled.
diff --git a/gateone/static/gateone.js b/gateone/static/gateone.js
index cf8907e..56d6473 100644
@MostAwesomeDude
MostAwesomeDude / simplegeo_zips.py
Created November 15, 2011 01:31 — forked from joshsmith/simplegeo_zips.py
Finding zip codes within the radius of a given address using SimpleGeo
from math import pi,sqrt,sin,cos,asin,atan2
from simplegeo import Client
import json
# Instantiate the SimpleGeo Client
client = Client('KEY', 'SECRET')
context = client.context.get_context_by_address("4275 Swift Ave, San Diego, CA")
lat1 = float(context['query']['latitude'])
lon1 = float(context['query']['longitude'])
from twisted.python import log
from sys import stdout
log.startLogging(stdout)
from twisted.internet.protocol import Protocol, Factory
class EchoProtocol(Protocol):
def dataReceived(self, data):
self.transport.write(data)
class EchoFactory(Factory):
def mk_nested_defaultdict(levels, factory):
base = lambda: defaultdict(factory)
while levels:
levels -= 1
base = lambda: defaultdict(base)
return defaultdict(base)
data Protocol s a = Protocol { state :: s
, connected :: Bool
, transport :: Maybe Transport
, makeConnection :: Transport -> Protocol s a
, connectionMade :: Protocol s a
, dataReceived :: [a] -> Protocol s a -> ([a], Protocol s a)
, connectionLost :: Maybe Reason -> Protocol s a }