Skip to content

Instantly share code, notes, and snippets.

__requires__ = ['cherrypy']
import cherrypy
class Server:
@classmethod
def run(cls):
config = {
https://gist.github.com/dff4968715f64a2dae4fa8541670930b
jaraco@vdev-jaraco:~$ hey http://localhost:38870
Summary:
Total: 40.0206 secs
Slowest: 10.0754 secs
Fastest: 0.0006 secs
Average: 1.1396 secs
Requests/sec: 4.9974
Total data: 1920 bytes
~ $ go/bin/hey http://localhost:57767
Summary:
Total: 40.0799 secs
Slowest: 10.0952 secs
Fastest: 0.0012 secs
Average: 0.8415 secs
Requests/sec: 4.9900
Total data: 1488 bytes
draft $ cat test-pdb.py
import sys
def test_something():
assert 'pdb' not in sys.modules()
draft $ pip-run -q pytest -- -m pytest test-pdb.py
================================================================================== test session starts ==================================================================================
platform darwin -- Python 3.7.2, pytest-4.1.1, py-1.7.0, pluggy-0.8.1
rootdir: /Users/jaraco/draft, inifile:
jaraco.functools master $ tox -e py27
py27 recreate: /Users/jaraco/code/main/jaraco.functools/.tox/py27
py27 installdeps: setuptools>=31.0.1
py27 develop-inst: /Users/jaraco/code/main/jaraco.functools
py27 installed: DEPRECATION: Python 2.7 will reach the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 won't be maintained after that date. A future version of pip will drop support for Python 2.7.,atomicwrites==1.2.1,attrs==18.2.0,backports.functools-lru-cache==1.5,backports.unittest-mock==1.4,configparser==3.7.1,contextlib2==0.5.5,docutils==0.14,enum34==1.1.6,flake8==3.6.0,funcsigs==1.0.2,importlib-metadata==0.8,jaraco.classes==2.0,-e git+gh://jaraco/jaraco.functools@d84738ac9f0fcc7a6f175a9873f63a70b87881c4#egg=jaraco.functools,mccabe==0.6.1,mock==2.0.0,more-itertools==5.0.0,pathlib2==2.3.3,pbr==5.1.1,pluggy==0.8.1,py==1.7.0,pycodesty
__requires__ = ['jsonpickle', 'pymongo']
import json
import datetime
import jsonpickle
import bson.tz_util
ob = datetime.datetime(
__requires__ = ['jsonpickle', 'pymongo']
import json
import datetime
import jsonpickle
import bson.tz_util
ob = datetime.datetime(
// 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: {
// choose either `'stable'` for receiving highly polished,
// or `'canary'` for less polished but more frequent updates
updateChannel: 'canary',
__requires__ = [
'cheroot', 'requests', 'cryptography', 'pytest', 'pyopenssl', 'trustme',
]
import functools
import ssl
import threading
import time
import OpenSSL.SSL