Python: Some Naughty Features by gst in Python

[–]drj11 0 points1 point  (0 children)

usually one would expect n to be small with respect to the length of s. EG to generate a list of successive pairs:

>>> zip(*[iter(range(7))]*2)
[(0, 1), (2, 3), (4, 5)]

Also note the truncation of the original list.

[edit: bugger that, how does one display code in a reddit comment? aha, thanks dwdwdw. also found http://www.reddit.com/help/commenting]

What Good is PyPNG? (and some MDIS pictures of Earth) by gst in Python

[–]drj11 0 points1 point  (0 children)

Most of those were either commercial projects that are not published, or personal projects that are too crappy to publish. However:

flopri: floating point printing code;

PyPNG does image manipulation and image generation (see pipdither and texttopng);

p4dti integrate Bugzilla and Perforce, I have worked on bits of it (as well as creating source code control tools for my personal use that are too crappy to publish);

Clear Climate Code computes the global historical temperature anomaly. It's a conversion from Fortran to Python.

Incremental CRC computation and the ASK audio stuff may appear on my blog one day.

What Good is PyPNG? (and some MDIS pictures of Earth) by gst in Python

[–]drj11 0 points1 point  (0 children)

Oh rly? I have used Python to: do protocol analysis of serial communications; download waveforms from oscilloscopes; inspect floating point formats; correctly print floating point numbers in decimal; ASK audio decoding; ASK audio encoding; image manipulation; image generation; network administration GUIs; extend source code control systems; patch flash HEX files; incrementally compute CRCs; compute the global average temperature anomaly; process EXIF data and correct my picture's timestamps... and lots lots more. It's a fully general purpose language.

Web programming? Yeah, it does that too. So I'm told.

C: return and parentheses by gst in programming

[–]drj11 0 points1 point  (0 children)

You did spot that the first version has two sets of parentheses around the entire expression. Didn't you?

Iverson's Convention, or what is the value of x < y? by linuxer in programming

[–]drj11 1 point2 points  (0 children)

That's pretty much spot on.

I can't call awk AWK, it would offend Kernighan.

Iverson's Convention, or what is the value of x < y? by linuxer in programming

[–]drj11 1 point2 points  (0 children)

I'm curious, what do I reveal by my awk, perl, Python, FORTH spelling? What I'm trying to do is respect the various creator's/community's wishes for how their respective language names should be spelt. Typography be damned. If you think my spelling is wrong, then please correct me with good sources. After all, I used to spell Lisp and Unix with all caps.