Daily Archives: May 19, 2011

Python: string substitution using dictionaries

A nice way to populate a string with values is to use a dictionary, which can be defined outside of the print statement. The standard way is to write >>> print "The temperature in %s is %f degrees" % (’celsius’, … Continue reading

Posted in Python | Tagged | 1 Comment

How to install a local WordPress (Linux Ubuntu)

This blog (in French) provides an article that explain how to install a local version of WordPress (Linux Ubuntu) (Le Blog de Lise). Please follow and like us:

Posted in Computer Science, Linux | Tagged | Leave a comment

SED: how to add a line at the top of files

Imagine, you have a set of ReST files, and you want to add the statement “author: your name” at the top of each of them. First, identify the files you want to edit and pipe them to sed: ls *.rst … Continue reading

Posted in Linux | Tagged | Leave a comment