Follow me
-
Recent Posts
calendar
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
Monthly Archives: May 2011
Skype video missing under linux
In principle in the options->advanced section you should have a section called video devices If not, then quit Skype, and create this environmental variable export LD_PRELOAD=/usr/lib/libv4l/v4l1compat.soexport LD_PRELOAD=/usr/lib/libv4l/v4l1compat.so Restart Skype and go to options->advanced->video devices that should be available now. Tested … Continue reading
What is Virtualenv
Virtualenv is a tool to create isolated Python environments. Its usage could be very useful when dependencies and versions are tricky. Imagine you have an application that needs version 1 of a library, but another application requires version 2. If … Continue reading
Mount an ISO file under linux with bchunk
The tool bchunk can be used to mount an ISO file. Under Fedora 9, you could use it as follows. First, you need to install it: yum install bchunkyum install bchunk bchunk converts a .cue (and its pair-wise .bin) file … Continue reading
Combine AWK and SED to create symbolic links
The unix tools AWK and SED are very powerful tools to manipulate files and perform text processing tasks. It’s true that the syntax is not always very intuitive but it can help you in performing task in a single line. … Continue reading
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