This is a test to see if psycogreen is necessary to run sqlalchemy + gevent + psycopg2 concurrently.
ab -n 10 -c 10 127.0.0.1:8080/wait
gunicorn -b 127.0.0.1:8080 -w 2 test:app
| package main | |
| import ( | |
| "fmt" | |
| "os" | |
| "os/exec" | |
| "syscall" | |
| ) | |
| func main() { |
| /* Useful celery config. | |
| app = Celery('tasks', | |
| broker='redis://localhost:6379', | |
| backend='redis://localhost:6379') | |
| app.conf.update( | |
| CELERY_TASK_RESULT_EXPIRES=3600, | |
| CELERY_QUEUES=( | |
| Queue('default', routing_key='tasks.#'), |
| 0.0 TEL | Telepresence 0.73-1694-g146d6ec launched at Tue Jan 10 19:15:06 2023 | |
| 0.0 TEL | ./usr/local/bin/telepresence --mount=false --also-proxy=10.0.0.0/8 --run zsh | |
| 0.0 TEL | Using images version 0.73 (dev) | |
| 0.0 TEL | uname: uname_result(system='Darwin', node='192.168.1.2', release='21.5.0', version='Darwin Kernel Version 21.5.0: Tue Apr 26 21:08:29 PDT 2022; root:xnu-8020.121.3~4/RELEASE_ARM64_T8101', machine='x86_64') | |
| 0.0 TEL | Platform: darwin | |
| 0.0 TEL | WSL: False | |
| 0.0 TEL | Python 3.9.6 (v3.9.6:db3ff76da1, Jun 28 2021, 11:49:53) | |
| 0.0 TEL | [Clang 6.0 (clang-600.0.57)] | |
| 0.0 TEL | BEGIN SPAN main.py:40(main) | |
| 0.0 TEL | BEGIN SPAN startup.py:83(set_kube_command) |
Picking the right architecture = Picking the right battles + Managing trade-offs
This is the resource repositry for my memory managment lecture / workshop series at Breda University of applied sciences - Games. It is mainly targeted for game developers
| from __future__ import annotations | |
| import time | |
| from heapq import heapify, heappush, heappop | |
| import math | |
| from io import StringIO | |
| class NotFound(Exception): | |
| def __init__(self, *args: object, msg: str) -> None: | |
| super().__init__(*args, msg) |
| // Finding primes upto N | |
| // From this video: https://www.youtube.com/watch?v=fwxjMKBMR7s | |
| package snippets | |
| import ( | |
| "container/heap" | |
| "fmt" | |
| "time" | |
| ) |
| import os | |
| from collections import deque | |
| from collections.abc import Iterator, Sequence | |
| from typing import Final, Protocol | |
| # Protocol is much like interfaces in go where you have objects implementing the methods | |
| # defined under a class inherting the Protocol class. | |
| class SeekableBytesFile(Protocol): | |
| def seek(self, position: int, whence: int = ..., /) -> int: ... |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>TOP-UP SOP Decision Tree</title> | |
| <style> | |
| * { | |
| margin: 0; | |
| padding: 0; |