$ git clone https://gist.github.com/256bcfd64e47b27507d7.git
$ cd 256bcfd64e47b27507d7
$ virtualenv env && source env/bin/activate
$ pip install https://github.com/vmagamedov/kinko/archive/master.zip
$ npm install --save-dev browser-sync gulp gulp-stylus
$ gulp
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 Env(jinja2.sandbox.SandboxedEnvironment): | |
def is_safe_attribute(self, obj, attr, value): | |
if isinstance(obj, basestring) and attr == 'format': | |
return False | |
return super(Env, self).is_safe_attribute(obj, attr, value) |
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
from functools import wraps | |
import re | |
from hiku.graph import GraphTransformer, apply | |
from hiku.graph import Field, Link, Graph, Root, Node, Option | |
from hiku.types import Sequence, TypeRef | |
from hiku.query import Field as QueryField | |
from hiku.engine import Engine | |
from hiku.result import denormalize |
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 pylons | |
from webob import Request | |
from paste.registry import RegistryManager | |
from werkzeug.debug import DebuggedApplication | |
from werkzeug.serving import run_simple | |
def pylons_controller(environ, start_response): | |
1/0 |
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
export PYTHON_VERSION="3.7.1" | |
export PYTHON_PIP_VERSION="18.1" | |
export SYSTEM_PACKAGES="" | |
export SYSTEM_DEV_PACKAGES="" | |
export PYTHON_PACKAGES="$1" | |
export PYTHON_GPG_KEY="0D96DF4D4110E5C43FBFB17F2D347EA6AA65421D" | |
apt-get update | |
apt-get install -y --no-install-recommends ca-certificates netbase ${SYSTEM_PACKAGES} |
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
01e8e2aa-cd8c-c37e-4689-5db093f8847f | |
01e8e2aa-cd8c-c6bc-4689-5db093f88480 | |
01e8e2aa-cd8c-c842-4689-5db093f88481 | |
01e8e2aa-cd8c-c98c-4689-5db093f88482 | |
01e8e2aa-cd8c-cb30-4689-5db093f88483 | |
gen_uuid() -> 0.047747763 | |
uuid.uuid1() -> 0.06972335500000001 | |
uuid.uuid4() -> 0.10280339599999999 | |
ObjectId() -> 0.05833711899999999 | |
uuid0.generate() -> 0.12896245299999998 |
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
""" | |
This library can help you debug your asyncio application, to understand who | |
blocks event loop. | |
Install parameters: | |
- ``total_threshold`` (seconds, 0.1 by default) - we analyze callbacks which | |
took longer than this time to execute | |
- ``func_threshold`` (seconds, 0.01 by default) - we log functions which took | |
longer that this time to execute (total time) |
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 grpc | |
import grpc_testing | |
from google.protobuf import symbol_database | |
class _UnaryUnary: | |
def __init__(self, server, method_descriptor): | |
self._server = server | |
self._method_descriptor = method_descriptor |
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 re | |
from functools import partial | |
from markupsafe import Markup, escape | |
_RE = re.compile(r'\[([\w\s]*)\|\s*([a-z0-9_]+)\s*\]') | |
def rich_text(text, **params): |
OlderNewer