
| Source File or URL: | Submitted By: | Description: |
|---|---|---|
| withls.txt | Levente Sandor | This is a 'with' method for Python -- the equivalent of the 'with' statement in Pascal or VB |
| Unzip.txt | Christopher P. Smith | This code will unzip lists which have been zipped together. If you created a zipped list, l=zip(a,b,c), you can use unzip to extract one or more of the lists: a,b,c=unzip(l) b=unzip(l,1) a,c=unzip(0,2) |
| 332gl.py | Gregor Lingl | |
| float_vs_int_silly.py | Paul Winkler | This is indeed useless. It does a bunch of random arithmetic on some numbers, and compares the amount of accumulating error when each stage truncates to integer, rounds to integer, or keeps the result as a float. I was curious how much error integer arithmetic could accumulate. Quite a lot! |
| pipe-test-r.py pipe-test-w.py |
Paul Winkler | A pair of scripts I wrote to see how hard I could push the sched module writing to stdout before its timing got bad. I used them like this on unix: pipe-test-w.py 100 10 | pipe-test-r.py This writes 100 text lines per second for 10 seconds; pipe-test-r.py then reports statistics on the intended and actual delivery times. |
| Decision_Analysis_Beta28.py | Paul Winkler | I thought the decision maker was pretty interesting, but when I looked at the source code I was surprised at how much cut-n-paste was going on ... e.g. defining an identical function three or four times. I started refactoring and stopped when I fell asleep. There's more that could be done, but it's already about 25% shorter and IMHO more readable and maintainable. |
| russianroulette.py | Tesla Coil | |
| bulk-mail.py | Paul Winkler | sends a message to a bunch of addresses contained in a file in which each line contains an email address. I don't use this for spam; I have an announcement list that people actually sign up for. People who send spam are evil scum. |
| address-mangler.py | Paul Winkler | reads from stdin, mangles email addresses into a form that should be human-readable but not friendly to spambots, writes to stdout. |
| FormSummarize.py | Danny Yoo | Here's another useless script I cooked up to help me look at HTML forms embedded in large, messy HTML. (I'm using it to help debug some CGIs at the moment.) It's another example of htmllib, so I thought it might be instructive for people. |
by Rob Andrews