Posts Tagged ‘primer’

This tutorial discusses some techniques of functional programming that might be of interest to mathematicians or people who use Python for scientific computation. We first start off with a brief overview of procedural and object-oriented programming, and then discuss functional programming techniques. Along the way, we briefly review Python’s built-in support for functional programming, including [...]


The macro \today presents dates in US format, which can be annoying when you want dates to be typeset in Australian or universal formats. Use the following macros to typeset dates in Australian format.

% Format date in the form 12 March 2007, for example.
\usepackage{datetime}
\newdateformat{auDateFormat}{%
\twodigit{\THEDAY}~\monthname[\THEMONTH]~\THEYEAR
}
\auDateFormat

To get the universal format, simply re-arrange the day, [...]


Here’s a quick tip for renaming multiple files with the same name <name> but different extensions <ext>. You want to retain the extensions and only change <name> to <new-name>.

for i in `ls`; do
mv -fv “$i” `ls “$i” | sed ’s/././’`
done