Follow me
-
Recent Posts
calendar
April 2025 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 Recent Comments
- Stan on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- Cormac on Pandas : how to compare dataframe with None
- LP on AWK: the substr command to select a substring
- jrab on python argparse issues with the help argument (TypeError: %o format: a number is required, not dict)
- How to disable SSL verification for urlretrieve? – Peter's blog on python: certificate verified failed
Archives
Categories
Meta
Author Archives: Thomas Cokelaer
AWK: the substr command to select a substring
Under Linux, the awk command has quite a few useful functions. One of them, which is called substr, can be used to select a substring from the input. Here is its syntax: substr(s, a, b) : it returns b number … Continue reading
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
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).
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
Missing package in rpy2 (ggplot2)
When using rpy2, the python implementation of R, I quickly came up with the issue of having missing packages (e.g., ggplot2) With a fresh installation of rpy2 (and R-core), if you type the following code in your python shell: from … Continue reading
Fedora: how to add a sudo user (and avoid password)
How to add a user in the sudo list If you need to type commands using sudo, you will soon be tired to enter the sudo password again and again. Here are the steps to add a user in the … Continue reading
Fedora yum update fails
Sometimes, when you want to update your Fedora packages with : yum update the process fails with an error message similar to: Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmfusion-free-updates. Please verify its path and try again The first … Continue reading
Fedora 14, slow wireless
I’ve recently posted a link related to Slow network under Fedora 14 distribution. The solution provided is related to iptables and is still working (on my distribution at least). However, I’ve also noticed that the wireless remains very slow while … Continue reading
Books: Snow, Orhan Pamuk
I’ve read Snow last year, a novel from Orhan Pamuk, a Turkish novelist, Nobel prize in Literature 2006. For an overview you can consult wikipedia entries in French (Neige) or English (Snow).
How to create an ISO image from a Folder (linux)
Under Linux, you can create an ISO image from a folder using a command line argument with the mkisofs tools. The following example creates an ISO image suitable to be used under Windows: mkisofs -J -l -R -V “Label CD” … Continue reading