Skip to content

Instantly share code, notes, and snippets.

@rpls
rpls / colorsaver.py
Created November 24, 2014 21:07
A small script to send colored- and bw-pages to seperate printers.
#!/usr/bin/env python
# coding: utf-8
import argparse
import itertools
import re
import subprocess
def run_coverage(filename, gs):
"""
@rpls
rpls / gist:3760188
Created September 21, 2012 07:25
Loading and norming WAV files in python.
import wave
import numpy as np
def readwavefile(filename):
"""
Reads a WAV file and returns all the frames converted to floats and the framerate.
"""
assert os.path.exists(filename) and os.path.isfile(filename)
wavefile = wave.open(filename, 'r')
nframes = wavefile.getnframes()