I hereby claim:
- I am dfee on github.
- I am dfee (https://keybase.io/dfee) on keybase.
- I have a public key ASC0E1cJpr9CJuyKtMmAVBusRIYT8HnmxIhUHRxeUWy5wAo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
consideration:
Missing appropriate here? ... it is handled as a default param for inspect.Parametersig.arg(), sig.args, sig.kwarg, sig.kwargs()signaturenext:
| class stackify(object): | |
| """Wrapper for stack-based recursion with memoisation | |
| When the function is called and argument is not in cache, push it to stack | |
| Attempt to call the function on the arguments in the stack such that an | |
| exception is raised if the function tries to recurse. In that case, add the | |
| function argument to the stack and continue | |
| The order of successful arguments also provides a topological sort |
| import asyncio | |
| from inspect import iscoroutinefunction | |
| import pytest | |
| import rx | |
| # pylint: disable=W0621, redefined-outer-name | |
| def debug(value): |
| from collections import OrderedDict | |
| import graphene | |
| import rx | |
| subject = rx.subjects.Subject() | |
| class Author(graphene.ObjectType): |
| FROM debian:stable | |
| ARG PYTHON_VERSION=3.6.2 | |
| ### Setup python:{version} ### | |
| # helpful links: | |
| # https://github.com/pyenv/pyenv/wiki/Common-build-problems | |
| # https://github.com/pyenv/pyenv/blob/32922007863c4a54feca2a95226c8307cfdfea3d/plugins/python-build/README.md | |
| # https://github.com/pyenv/pyenv/issues/990 | |
| RUN apt-get update && \ | |
| DEBIAN_FRONTEND=noninteractive apt-get install -y \ |
| from setuptools import setup, find_packages | |
| setup( | |
| name='server', | |
| version='0.1', | |
| packages=find_packages(), | |
| include_package_data=True, | |
| install_requires=[ | |
| 'aiohttp', | |
| # 'aiohttp-graphql', |
| import asyncio | |
| from asphalt.core import Context | |
| import functools | |
| def guard_executor(func): | |
| no_ctx_msg = ('Context must be the first arg, or an instance variable of ' | |
| '`self` (if wrapping an instance method).') | |
| not_in_executor_msg = '{} must be run in an executor'.format(func.__name__) |
| # Constructed with help from | |
| # http://stackoverflow.com/questions/53497/regular-expression-that-matches-valid-ipv6-addresses | |
| # Try it on regex101: https://regex101.com/r/yVdrJQ/1 | |
| import re | |
| IPV4SEG = r'(?:25[0-5]|(?:2[0-4]|1{0,1}[0-9]){0,1}[0-9])' | |
| IPV4ADDR = r'(?:(?:' + IPV4SEG + r'\.){3,3}' + IPV4SEG + r')' | |
| IPV6SEG = r'(?:(?:[0-9a-fA-F]){1,4})' | |
| IPV6GROUPS = ( |