Skip to content

Instantly share code, notes, and snippets.

View sashahart's full-sized avatar

Sasha Hart sashahart

View GitHub Profile

this is a quick informal guide to d&d for anyone.

roleplaying games

d&d is a roleplaying game. so let me explain roleplaying games real quick.

a few people sit down for a few hours, taking the roles of imaginary characters in an imaginary world.

"""An example of how to deal with XML namespaces using LXML.
"""
blob = b"""
<p:doc xmlns:p="http://my.de/fault/namespace">
<p:title>The dog and the hog</p:title>
<p:section>
<p:title>The dog</p:title>
<p:par>Once upon a time, ...</p:par>
<p:par>And then ...</p:par>
@sashahart
sashahart / ave.sh
Last active August 29, 2015 14:03
some minimal virtualenvwrapper type shell functions
#!/bin/sh
_ave_usage="Usage: ave VIRTUALENVNAME
For example, to activate a virtualenv named FOO, use:
ave FOO
To activate a virtualenv with a space in its name like 'FOO BAR':
ave FOO BAR
Or more explicitly:
ave 'FOO BAR'"
@sashahart
sashahart / gist:5674417
Created May 29, 2013 22:42
sample python data for checking vim highlighting
#!/bin/bash
# coding: utf-8
"""Docstring for this module.
This must be quite readable but does not need to be obtrusive.
"""
from collections import Counter
import re
import hotshot