Many code snippets I write are available at gist.lsw.nz. Some snippets are very useful to me, and are (I believe) nicely written. Others are just amusing, should not be used for any practical purposes. Proceed with caution.
- Program for renaming many files at once using your preferred text editor.
- Implementation of an algorithm which either proves or disproves a given statement in the implicational fragment of minimal logic. Code-wise, this is a little ugly, as the main function is over fifty lines long.
- A python decorator for tail-recursion. Not necessarily a bad idea, but not intended to be a good idea.
- Using python’s
setclass as a flag - essentially a pun.
- Password generator which generates multi-word passwords which are easy for touch-typists to type. Can be set up for your own eccentric/incorrect typing style. Not necessarily safe; while the theoretic entropy is given, I have no idea if python’s randomness is sufficient here. Perhaps this is the starting point of a useful tool.