View reflection.json
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
[ | |
{ | |
"name" : "org.apache.log4j.Category", | |
"allDeclaredConstructors" : true, | |
"allPublicConstructors" : true, | |
"allDeclaredMethods" : true, | |
"allPublicMethods" : true, | |
"allDeclaredClasses" : true, | |
"allPublicClasses" : true | |
}, |
View morelia.py
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 os | |
import re | |
import unicodedata | |
from django.conf import settings | |
from morelia import run | |
from morelia.grammar import Scenario | |
from morelia.parser import Parser | |
View SketchSystems.spec
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
CHECKOUT FLOW | |
View bag* | |
checkout -> Checkout summary | |
Checkout summary | |
buy -> Reserve stock | |
Reserve stock | |
Lock product* | |
locked -> Insert purchase record | |
failed -> Error | |
Insert purchase record |
View show_locks.sql
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
-- Usage: | |
-- --------------------------- | |
-- BEGIN; | |
-- <statements to analyze: ALTER TABLE ...whatever...;> | |
-- SELECT * FROM show_locks(); | |
-- ROLLBACK; | |
-- --------------------------- | |
CREATE OR REPLACE FUNCTION show_locks() | |
RETURNS TABLE ( | |
"lock_type" VARCHAR, |
View test_pyparsing_indented.py
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 collections import namedtuple | |
from functools import partial | |
import re | |
import pyparsing as pp | |
import pytest | |
def _flatten(tokens): | |
# type: (pp.ParseResults) -> pp.ParseResults |
View test_pyparsing_grammar.py
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 collections import namedtuple | |
import re | |
import pytest | |
from myproject import grammar | |
EXAMPLES = ( | |
pytest.param( |
View hyper.js
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
// Future versions of Hyper may add additional config options, | |
// which will not automatically be merged into this file. | |
// See https://hyper.is#cfg for all currently supported options. | |
module.exports = { | |
config: { | |
// default font size in pixels for all tabs | |
fontSize: 12, | |
// font family with optional fallbacks |
View django_custom_manager.py
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
class CustomQuerySetManager(Manager): | |
""" | |
A re-usable Manager to access a custom QuerySet | |
""" | |
def __getattr__(self, attr, *args): | |
try: | |
return getattr(self.__class__, attr, *args) | |
except AttributeError: | |
# don't delegate internal methods to queryset | |
# NOTE: without this, Manager._copy_to_model will end up calling |
View git-getpull
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
#!/bin/sh | |
if [ -z "$1" ]; then | |
echo "Usage: git getpull <SHA>" | |
exit 1 | |
elif [ -z "$(git rev-parse --git-dir 2>/dev/null)" ]; then | |
echo "Not in a git directory" | |
exit 1 | |
else | |
repo_details=( \ |
View retry.py
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 time | |
from logging import getLogger | |
class RetryContextInvalidResult(Exception): | |
pass | |
class RetryContext(object): |
NewerOlder