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.#'), |
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
| 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: ... |