I’ve created a git repository to house a new project I’ve started, to build a common set of functional utilities for FogBugz. You can find all the links on my projects page.
I’ve created a git repository to house a new project I’ve started, to build a common set of functional utilities for FogBugz. You can find all the links on my projects page.
The following is a collection of little “translation” functions I wrote in python, so that I could wax nostalgic about my days as a Rexx automation programmer, while coding in Python. It’s by no means a COMPLETE list, and the list is by no means complete, either. But I thought I’d post it here for [...]
This, I got from pixelbeat.org. I’m reposting it here, so that I never ever lose it. #!/usr/bin/env python # Try to determine how much RAM is currently being used per program. # Note per _program_, not per process. So for example this script # will report RAM used by all httpd process together. In detail [...]
Here’s a short script to give you an idea of how to programmatically answer basic authentication prompts using python. #!/usr/bin/env python import urllib2, sys, re, base64 from urlparse import urlparse #base64string = base64.encodestring(‘%s:%s’ % (data['name'], data['pass']))[:-1] #req.add_header(“Authorization”, “Basic %s” % base64string) username = ‘some_userid’ password = ‘some_password’ theurl = ‘http://www.techrobatics.com/protected’ #realm = ‘REALM’ base64string = [...]
I wrote this little class to be able to convert in and out of all four temperature formats: #!/usr/bin/env python “”" My Rankines Convertor I am creating these routines to help convert all nonsense temperature systems into the only one that makes any real rational sense. Why does it make more sense than fahrenheit or [...]