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 functools import partial | |
from fnmatch import fnmatchcase | |
from collections import defaultdict | |
class Event(dict): | |
handlers = defaultdict(list) | |
@classmethod | |
def subscribe(cls, *args): | |
if not callable(args[-1]): |
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 python | |
"""jobclient.py | |
Usage: | |
jobclient.py [options] <jobboard_name> create <name> <details> | |
jobclient.py [options] <jobboard_name> list | |
jobclient.py [options] <jobboard_name> delete <uuid> | |
jobclient.py [options] <jobboard_name> clear | |
Options: |
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 itertools | |
class FSMException(Exception): | |
pass | |
class DuplicateRule(FSMException): | |
pass | |
class InvalidStateTransition(FSMException): |
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/python | |
import socket | |
import struct | |
def enum(*args, **kwargs): | |
kwargs["__getitem__"] = lambda self, key: args[key] | |
return type('Enum', (object,), dict(zip(args, values), **kwargs))() | |
class IPCClient(object): |
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 ssdp | |
import requests | |
from xml.etree import ElementTree | |
class RokuApp(object): | |
def __init__(self, app_id, name, version, remote=None): | |
self.id = app_id | |
self.name = name | |
self.version = version | |
self._remote = remote |
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 python | |
"""supercmd | |
Usage: | |
supercmd [-c <file>] list | |
supercmd [-c <file>] show <environment> [<command>] | |
supercmd [-c <file>] keyring [set|get] <environment> <parameter> | |
supercmd [-c <file>] <environment> <command> [<args>...] | |
supercmd -h | --help |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- Place this file in /usr/share/gtksourceview-3.0/language-specs/ --> | |
<language id="smilebasic" _name="SmileBASIC" version="2.0" _section="Sources"> | |
<metadata> | |
<property name="mimetypes">text/x-smilebasic</property> | |
<property name="globs">*.sbas</property> | |
<property name="line-comment-start">'</property> | |
</metadata> |
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
### Keybase proof | |
I hereby claim: | |
* I am dankrause on github. | |
* I am dankrause (https://keybase.io/dankrause) on keybase. | |
* I have a public key ASBmYrX3pc6j-rDw3Yfm1F_mBjHX0SLjDc1izIvsgICs7wo | |
To claim this, I am signing this object: |
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 python | |
import json, optparse, sys | |
try: | |
import PIL.Image, PIL.PngImagePlugin | |
except: | |
print >> sys.stderr, "Unable to import Python Imaging Library. Please ensure that it is installed." | |
sys.exit(1) |
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 builtins | |
import collections | |
import contextlib | |
import copy | |
import dis | |
import json | |
import socket | |
import struct | |
import types |
OlderNewer