gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker
Macbook Pro 2015 Python 3.7
Framework | Server | Req/s | Max latency | +/- Stdev |
---|
#include <WiFi.h> | |
#include <HTTPClient.h> | |
#include <time.h> | |
#include <esp_sleep.h> | |
const char* ssid = "your_ssid"; | |
const char* password = "your_password"; | |
const char* influx_url = "http://192.168.1.100:8086/api/v2/write?org=myorg&bucket=mybucket&precision=s"; | |
const char* influx_token = "your_token"; |
#include <Arduino.h> | |
void setup() { | |
// Initialize serial communication | |
Serial.begin(115200); | |
// Wait for serial to be ready | |
while (!Serial) { | |
delay(10); | |
} |
#!/usr/bin/env python3 | |
""" | |
(Copyleft) 2025 Jonathan D. Kelley | |
ROM Organizer Tool | |
================== | |
This script organizes ROM files into structured directories based on region | |
and alphabetical ranges. It supports recursive scanning, dry-run mode, | |
and automatic directory cleanup. |
kubectl apply -f flink-configuration-configmap.yaml | |
kubectl apply -f jobmanager-svc.yaml | |
kubectl apply -f jobmanager-session-deployment.yaml -f task-manager-session-deployment.yaml |
awk 'function hextodec(str,ret,n,i,k,c){ | |
ret = 0 | |
n = length(str) | |
for (i = 1; i <= n; i++) { | |
c = tolower(substr(str, i, 1)) | |
k = index("123456789abcdef", c) | |
ret = ret * 16 + k | |
} | |
return ret | |
} |
# 1) Deploy the pod | |
# | |
# kubectl create -f busybox-non-root.yaml | |
# | |
# 2) Access the shell | |
# | |
# kubectl exec -ti busybox-1000 -- sh | |
# | |
# 3) from the shell run: | |
# |
from time import sleep | |
from tornado.httpserver import HTTPServer | |
from tornado.ioloop import IOLoop | |
from tornado.web import Application, asynchronous, RequestHandler | |
from multiprocessing.pool import ThreadPool | |
_workers = ThreadPool(10) | |
def run_background(func, callback, args=(), kwds={}): | |
def _callback(result): |
gunicorn run:app --workers=9
gunicorn run:app --workers=9 --worker-class=meinheld.gmeinheld.MeinheldWorker
Macbook Pro 2015 Python 3.7
Framework | Server | Req/s | Max latency | +/- Stdev |
---|
# pip3 install cachepy | |
# https://github.com/scidam/cachepy | |
import time # used to simulate heavy CPU penalty | |
from cachepy import FileCache | |
from os.path import expanduser | |
from os import environ | |
import warnings |
#The version that modifies in-place (very much like Ned Batchelders solution): | |
# https://stackoverflow.com/questions/3405715/elegant-way-to-remove-fields-from-nested-dictionaries | |
from collections import MutableMapping | |
from contextlib import suppress | |
def delete_keys_from_dict(dictionary, keys): | |
for key in keys: | |
with suppress(KeyError): | |
del dictionary[key] |