Skip to content

Instantly share code, notes, and snippets.

@tempusfrangit
tempusfrangit / example.py
Created August 10, 2017 17:26
Meta Example
`import re
import six
class Meta(type):
registry = {}
def __new__(meta, name, bases, class_dict):
cls = None
parts = [p.lower() for p in re.split(r'([A-Z][a-z]*)', name) if p]
name = '_'.join(parts)
@cloudnull
cloudnull / keystone-capstone-venv-create.sh
Last active March 23, 2016 00:12
Create a virtual environment containing the Keystone and Capstone projects.
#!/usr/local/env bash
set -ev
apt-get install -y libffi-dev libldap2-dev libsasl2-dev libxslt1.1 libxslt1-dev python-dev curl libssl-dev
curl https://bootstrap.pypa.io/get-pip.py | python
pip install -U virtualenv