Skip to content

Instantly share code, notes, and snippets.

View max-lobur's full-sized avatar

Max Lobur max-lobur

View GitHub Profile
max-lobur /
Created May 16, 2019 13:50 proof of my github identity

Keybase proof

I hereby claim:

  • I am max-lobur on github.
  • I am lobur ( on keybase.
  • I have a public key ASBBAvBaCoxEv1vX-l3LRjcj9QLAVd1oD_0O4LP024iabwo

To claim this, I am signing this object:

if [ -z "$1" ]; then echo NEED PATH TO requirements.txt; exit; fi
while read dependency; do
dependency_stripped="$(echo "${dependency}" | sed -e 's/^[[:space:]]*//' -e 's/[[:space:]]*$//')"
# Skip comments
if [[ $dependency_stripped == \#* ]]; then
# Skip blank lines
max-lobur /
Last active November 5, 2015 16:06
Ironic devstack
tar -xzvf $IMAGE.tar.gz
glance image-create --name ubuntu-root --is-public True --disk-format raw --container-format bare --progress < $(IMAGE).img
max-lobur /
Last active January 2, 2021 23:44
devstack tweaks
. ~/devstack/openrc admin demo
for id in $(glance image-list | grep cirros | cut -d'|' -f2); do glance image-delete id; done
glance image-create --name cirros --disk-format qcow2 --container-format bare --file cirros-0.3.4-i386-disk.img --is-public=True --progress
View evenlet brokes futures.ProcessPoolExecutor
import eventlet
import futures
import random
import sys
def test():
if random.choice((True, False)):
raise Exception()
View Omits duplicate
from sqlalchemy.ext.declarative import declarative_base
from sqlalchemy import Column, Integer, ForeignKey, String, create_engine
from sqlalchemy.orm import relationship, sessionmaker
engine = create_engine("sqlite:///:memory:", echo="debug")
Session = sessionmaker(bind=engine)
BASE = declarative_base()
session = Session()