Skip to content

Instantly share code, notes, and snippets.

Will Rigby wrigby

  • New York, USA
Block or report user

Report or block wrigby

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
wrigby /
Created Dec 22, 2016
Reading a 24-bit wave file in Python
def sign_extend(bits, value):
""" Sign-extend from """
sign_bit = 1 << (bits - 1)
return (value & (sign_bit - 1)) - (value & sign_bit)
def get_samples(w):
num_samples = w.getnframes()
sample_depth = w.getsampwidth()

Keybase proof

I hereby claim:

  • I am wrigby on github.
  • I am wrigby ( on keybase.
  • I have a public key whose fingerprint is 47E0 AE95 3A5A E818 4805 9A03 A5AB 9C37 F71B 6BCE

To claim this, I am signing this object:

wrigby / recolor_background.css
Last active Jan 25, 2016
Applying CSS filters to background images
View recolor_background.css
/* Some elements may need this to make sure they are the
* position parent of the child pseudo-element we'll create
* below
your_element {
position: relative;
/* This pseudo-element copies the background from its parent,
* allowing you to apply CSS filters just to the background image.
wrigby / Axis Session
Last active Jul 18, 2016
Python suds plugin for Apache Axis sessions
View Axis Session


  • Because the MultiRef support in Suds doesn't handle references in the header of the reply, but it does remove all the multirefs from the body, so it eats the session ID before you can do anything about it.
  • Because with this plugin, you don't even have to think about handling sessions
  • Because I was trying to figure out how to use Diamond IP's IPControl SOAP API, and had to write this to make it work

How to use it?

session_plugin = AxisSessionPlugin()
c = Client(..., plugins=[session_plugin])
You can’t perform that action at this time.