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 itertools | |
class FSMException(Exception): | |
pass | |
class DuplicateRule(FSMException): | |
pass | |
class InvalidStateTransition(FSMException): |
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 | |
set -e | |
function cleanup() { | |
# clean up our temp folder | |
rm -rf "${TMPDIR}" | |
} | |
trap cleanup EXIT |
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
<?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 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
CREATE TABLE test | |
( | |
id INTEGER, | |
parent INTEGER | |
); | |
INSERT INTO test (id, parent) VALUES | |
(1, NULL), | |
(2, 1), |
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
### 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 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
class _ExceptionHandlerBase: | |
def __init__(self, handler_map): | |
self._handler_map = handler_map | |
def __call__(self, func): | |
def wrapper(*args, **kwargs): | |
with self: | |
func(*args, **kwargs) | |
return wrapper |
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 builtins | |
import collections | |
import contextlib | |
import copy | |
import dis | |
import json | |
import socket | |
import struct | |
import types |
OlderNewer