python 3.6, postgres, pip install aiohttp uvloop ujson asyncpg sanic
➤ wrk -d 10 -c 100 -t 12 --timeout 8 http://localhost:8000 # aiohttp
Running 10s test @ http://localhost:8000
FROM python:3.6-alpine | |
RUN pip install gunicorn | |
COPY . /app | |
WORKDIR /app | |
RUN python setup.py develop | |
VOLUME ['/conf'] |
#!/usr/bin/env python | |
# coding=utf-8 | |
""" | |
import CVE from "http://cve.mitre.org/data/downloads/allitems.txt" | |
""" | |
################################################################################ | |
import os | |
import urllib2 | |
import getopt |
Free O'Reilly books and convenient script to just download them.
Thanks /u/FallenAege/ and /u/ShPavel/ from this Reddit post
How to use:
download.sh
file and put it into a directory where you want the files to be saved.cd
into the directory and make sure that it has executable permissions (chmod +x download.sh
should do it)./download.sh
and wee there it goes. Also if you do not want all the files, just simply comment the ones you do not want.This content from this markdown file has moved a new, happier home where it can serve more people. Please check it out : https://docs.microsoft.com/azure/azure-cache-for-redis/cache-best-practices.
my database had 72k annotations at the time I ran these benchmarks, here's the result:
$ python scripts/batch_bench.py conf/development-app.ini dumb
Memory summary: start
types | # objects | total size
=========== | =========== | ============
dict | 13852 | 12.46 MB
frozenset | 349 | 11.85 MB
VM: 327.29Mb
Once in a while, you may need to cleanup resources (containers, volumes, images, networks) ...
// see: https://github.com/chadoe/docker-cleanup-volumes
$ docker volume rm $(docker volume ls -qf dangling=true)
$ docker volume ls -qf dangling=true | xargs -r docker volume rm
1. Go to Sublime Text to: Tools -> Build System -> New Build System | |
and put the next lines: | |
{ | |
"cmd": ["python3", "-i", "-u", "$file"], | |
"file_regex": "^[ ]File \"(...?)\", line ([0-9]*)", | |
"selector": "source.python" | |
} | |
Then save it with a meaningful name like: python3.sublime-build |
FROM phusion/baseimage:0.9.18 | |
MAINTAINER [email protected] | |
ENV PYTHONUNBUFFERED 1 | |
# ...put your own build instructions here... | |
RUN apt-get update --no-install-recommends && \ | |
apt-get install -y --no-install-recommends \ |
# -*- coding: utf-8 -*- | |
from random import randint | |
import tornado.concurrent | |
import tornado.platform.asyncio | |
import tornado.web | |
from aiopg.sa import create_engine as aiopg_create_engine | |
import asyncio |