Skip to content

Instantly share code, notes, and snippets.


Christoffer Torris Olsen ctolsen

View GitHub Profile
ctolsen /
Last active Oct 22, 2015
primaryjoin with bindparam test case
from sqlalchemy import Column, Integer, ForeignKey, bindparam, and_, create_engine
from sqlalchemy.orm import relationship, sessionmaker
from sqlalchemy.ext.declarative import declarative_base
Base = declarative_base()
def get_age():
"""Method that would get some data from a Flask request context, although
the behaviour is the same regardless."""
ctolsen /
Last active May 15, 2022
"Copy to cURL" in Chrome to Apache Bench command
#!/usr/bin/env python3
import sys
import os
def curl_to_ab(curl_cmd: list, num: int=200, cur: int=4) -> str:
Translate a cURL command created by Chrome's developer tools into a
command for ``ab``, the ApacheBench HTTP benchmarking tool.

Keybase proof

I hereby claim:

  • I am ctolsen on github.
  • I am ctolsen ( on keybase.
  • I have a public key whose fingerprint is 8CA3 5114 80AB 300F C831 01B9 4824 26F8 7AD0 1CB3

To claim this, I am signing this object: