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 |
---|
#!/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] |
# -*- coding: utf-8 -*- | |
# (c) 2020, Jonathan Kelley <[email protected]> | |
# This file belongs as part of Ansible | |
# | |
# Ansible is free software: you can redistribute it and/or modify | |
# it under the terms of the GNU General Public License as published by | |
# the Free Software Foundation, either version 3 of the License, or | |
# (at your option) any later version. | |
# | |
# Ansible is distributed in the hope that it will be useful, |
I hereby claim:
To claim this, I am signing this object: