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
#!/usr/bin/python3 | |
""" Obtaining all form fields (dynamically) from a POST request. | |
$ curl http://127.0.0.1:8000/post -d "name=Nemo&country=Norway" | |
$ curl http://127.0.0.1:8000/data -d "company=Axos Inc.&business=IT Outsourcing" | |
""" | |
from flask import abort, Flask, jsonify, request | |
__author__ = "@ivanleoncz" |
log-format: '{"timestamp":%Ts,"frontend_name":"%f","remote_addr":"%ci","bytes_read":%B,"upstream_addr":"%si","backend_name":"%b","retries":%rc,"bytes_uploaded":%U,"upstream_connect_time":"%Tc","session_duration":"%Tt","termination_state":"%ts","srv_queue":%sq,"backend_queue":"%bq","frontend_concurrent_conns":%fc,"backend_concurrent_conns":%bc}' |
from requests import get | |
from pprint import pprint | |
from json import dump | |
from csv import QUOTE_ALL, DictWriter | |
API_KEY = 'XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX' | |
def address_resolver(json): | |
final = {} | |
if json['results']: | |
data = json['results'][0] | |
for item in data['address_components']: |
map $http_x_forwarded_proto $proxy_x_forwarded_proto { | |
default $http_x_forwarded_proto; | |
'' $scheme; | |
} | |
map $http_upgrade $connection_upgrade { | |
default upgrade; | |
'' close; | |
} |
The McAfee central America Travel Guide | |
Posted by: John McAfee , November 24, 2012 @ http://www.whoismcafee.com/the-travel-guide/ | |
As all of my close friends know, I have not always been a teetotalling, drug fighting citizen. Prior to 1983 I was a synthesis of corporate manager and drug dealer. The drug dealer eventually won out, and for a period of time that was my only occupation. Well ….. taking the drugs that I sold also became a principal occupation. This is not a secret, I tell anyone who asks, even the press. Not many in the press reported much about it, until Josh Davis’ eBook came out. I am not ashamed of my past. Our collective pasts make us who we are. In 1983 I joined Alcoholics Anonymous and gave up alcohol and drugs entirely. My exceptions are coffee, which some classify as a drug, and, occassionally, cigarettes. Not proud of the cigarettes, I know thay are bad. | |
During my drug dealing days I became adept at those talents required of a successful drug dealer: clandestine travel throu |
########################################################################################### | |
# Liquidsoap Radio System - built by GeekBrony, based from Liquidsoap. # | |
########################################################################################### | |
# Primary Features: | |
# - AutoDJ that crossfades between songs and has a 1/10 chance of landing on a Station ID/Jingle/Ad. | |
# - AutoDJ also selects tracks from "High Priority", "Low Priority" and "New Songs" playlists randomly. | |
# - Live Shows (that automatically dump to a directory) | |
# - Mic to speak over the stream. | |
# - Requests via Telnet/Web Interface, which have a 80-90% chance of queuing up when a song ends. |
# This is a GitLab CI configuration to build the project as a docker image | |
# The file is generic enough to be dropped in a project containing a working Dockerfile | |
# Author: Florent CHAUVEAU <florent.chauveau@gmail.com> | |
# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/ | |
# do not use "latest" here, if you want this to work in the future | |
image: docker:18 | |
stages: | |
- build |
# GNU Screen - main configuration file | |
# All other .screenrc files will source this file to inherit settings. | |
# Author: Christian Wills - cwills.sys@gmail.com | |
# Allow bold colors - necessary for some reason | |
attrcolor b ".I" | |
# Tell screen how to set colors. AB = background, AF=foreground | |
termcapinfo xterm 'Co#256:AB=\E[48;5;%dm:AF=\E[38;5;%dm' |
/** | |
* This method is responsible for creating the Jenkins job. | |
* @param jobName jobName | |
* @param timerConfig cron expression to schedule the job | |
* @return | |
*/ | |
def createJenkinsJob(def jobName, def timerConfig) { | |
echo "Creating the job ${jobName}" | |
// Here I'm using a shared library in the pipeline, so I have loaded my shared library here |