Skip to content

Instantly share code, notes, and snippets.

# Ensure we're in a virtualenv.
if [ -d "$VIRTUAL_ENV" ]
then
echo "ERROR: not in a virtual environment."
exit -1
fi
# Make temp directory.
CACHE=$(mktemp -d /tmp/install-pygtk-XXXXXX)
@nixon
nixon / stats.awk
Last active September 18, 2022 22:20 — forked from mikewallace1979/stats.sh
add median absolute deviation
#!/usr/bin/awk -f
# based on:
# https://gist.github.com/mikewallace1979/3973059
# Quick hacky script that computes basic statistics from a single
# column of numbers from stdin - inspired by the CouchDB _stats reducer
function median(arr, sorted, n, _m) {
n = asort(arr, sorted)