Some of the practices described in this HOWTO are considered to be illegal as they often break internal corporate policies. Anything you do, you do at your own risk.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Formel von Dr. Roland Brodbeck, Calsky | |
| # http://lexikon.astronomie.info/zeitgleichung/neu.html | |
| # Uebertragung auf Python 3 von Alexander Klupp 2014-01-14 | |
| import math | |
| pi2 = 2*math.pi | |
| pi = math.pi | |
| RAD = math.pi/180 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import asyncio | |
| import socket | |
| class UDPClient(): | |
| def __init__(self, host, port, loop=None): | |
| self._loop = asyncio.get_event_loop() if loop is None else loop | |
| self._sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) | |
| self._sock.setblocking(False) | |
| self._addr = (host, port) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # import config. | |
| # You can change the default config with `make cnf="config_special.env" build` | |
| cnf ?= config.env | |
| include $(cnf) | |
| export $(shell sed 's/=.*//' $(cnf)) | |
| # import deploy config | |
| # You can change the default deploy config with `make cnf="deploy_special.env" release` | |
| dpl ?= deploy.env | |
| include $(dpl) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """Provide high-level UDP endpoints for asyncio. | |
| Example: | |
| async def main(): | |
| # Create a local UDP enpoint | |
| local = await open_local_endpoint('localhost', 8888) | |
| # Create a remote UDP enpoint, pointing to the first one |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ROOT_CA ?= rootCA | |
| CA_EMAIL ?= foobar@foo.bar | |
| COMMON_NAME ?= mail.foobar.box | |
| DAYS ?= 3650 | |
| $(ROOT_CA).key: ## Create root CA key. | |
| openssl genrsa -out $@ 4096 | |
| $(ROOT_CA).pem: rootCA.key ## Create root CA certificate. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pytest | |
| @pytest.fixture | |
| def domain_fixtures_path(): | |
| import pathlib | |
| fixtures_path = pathlib.Path(__file__).parent / "fixtures" | |
| return fixtures_path | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| xdg-open "$1" & | |
| sleep 1 |
Moved to git-repository: https://github.com/denji/awesome-http-benchmark
Located in alphabetical order (not prefer)
- ab – slow and single threaded, written in
C - apib – most of the features of ApacheBench (
ab), also designed as a more modern replacement, written inC - autocannon – fast HTTP/1.1 benchmarking tool written in Node.js
- baloo – Expressive end-to-end HTTP API testing made easy, written in Go (
golang)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a value (de|en)coder for the github.com/google/uuid UUID type. For best experience, register | |
| // mongoRegistry to mongo client instance via options, e.g. | |
| // clientOptions := options.Client().SetRegistry(mongoRegistry) | |
| // | |
| // Only BSON binary subtype 0x04 is supported. | |
| // | |
| // Use as you please | |
| package repository | |
| import ( |