I hereby claim:
- I am ambv on github.
- I am ambv (https://keybase.io/ambv) on keybase.
- I have a public key whose fingerprint is E3FF 2839 C048 B25C 084D EBE9 B269 95E3 1025 0568
To claim this, I am signing this object:
| #!/bin/bash -e | |
| # Create the environment | |
| rm -rf .v # remove old stuff if present | |
| python3 -m venv .v | |
| source .v/bin/activate | |
| cd .v | |
| pip install flake8==3.2.1 | |
| pip install flake8-bugbear==16.12.1 # the newer version works around the issue |
| import ctypes | |
| import sys | |
| import signal | |
| def ensure_dead_with_parent(): | |
| """A last resort measure to make sure this process dies with its parent. | |
| Defensive programming for unhandled errors. | |
| """ | |
| if not sys.platform.startswith('linux'): | |
| return # not supported on OS X, Windows, etc. Use process groups. |
| import asyncio | |
| import time | |
| loop = asyncio.get_event_loop() | |
| async def go(sleep): | |
| await asyncio.sleep(sleep) | |
| print('I slept', sleep, 'seconds') | |
| def clog(sleep): |
| from functools import lru_cache | |
| import threading | |
| import time | |
| def per_instance(factory, *factory_args, **factory_kwargs): | |
| """Applies the given decorator on a per-instance basis.""" | |
| def lazy_binder(method): | |
| """Replaces the method just in time when it is first invoked.""" |
| from contextlib import ExitStack | |
| d = {index: str(index) for index in range(100)} | |
| with ExitStack() as stack: | |
| for key in d: | |
| if key % 13 == 0: | |
| stack.callback(d.pop, key) | |
| print(d) |
| def func(): | |
| try: | |
| raise ValueError('ve') | |
| except Exception as e: | |
| handle_exception(e) | |
| def handle_exception(e): | |
| if 'some terrible thing' in e.args[0]: | |
| raise |
| from __future__ import print_function | |
| import sys | |
| def example1(): | |
| try: | |
| pass # nothing is raised | |
| except Exception as e1: | |
| pass |
| #!/usr/bin/env python3 | |
| """Repacks entries in a ZIP file so that they become correctly zipimportable \ | |
| in Python 3.5. See https://bugs.python.org/issue25710 for details. | |
| """ | |
| import argparse | |
| from pathlib import Path | |
| import importlib._bootstrap_external | |
| import sys |
I hereby claim:
To claim this, I am signing this object:
| $ pip install testunicodepackagedependant | |
| Downloading/unpacking testunicodepackagedependant | |
| Downloading testunicodepackagedependant-1.0.tar.gz | |
| Storing download in cache at /Users/ambv/.pip/cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Ft%2Ftestunicodepackagedependant%2Ftestunicodepackagedependant-1.0.tar.gz | |
| Running setup.py (path:/private/tmp/testestest/build/testunicodepackagedependant/setup.py) egg_info for package testunicodepackagedependant | |
| Downloading/unpacking testunicodepackage==1.0 (from testunicodepackagedependant) | |
| Downloading testunicodepackage-1.0.tar.gz | |
| Cleaning up... | |
| Exception: |