Monthly Archives: November 2012

Solving a Linear Programming problem with Python (Pulp)

Tweet Linear Programming is a type of optimisation where an objective function should be maximised given some constraints. Let us consider the following simple problem (from The GNU Linear Programming Kit, Part 1). Let us say that you want to … Continue reading

Posted in Data analysis | Tagged , | 5 Comments

Raspberry pi: first steps

Tweet My first raspberry pi arrived !! I pluged in a USB mouse and keyboard, the SD card I bought at the same time (it has already a linux system on it), a hdmi cable to the first screen I … Continue reading

Posted in raspberryPi | Tagged | Leave a comment

How use R to build permutation or combination

Tweet In a previous post, I used itertools in Python to create combination and permutation using the standard module itertools. What about using R language to perform the same task. The permutation function allows you to get permutation of N … Continue reading

Posted in Python, R | Tagged , | Leave a comment

Fly with Python

Tweet References: http://xkcd.com/353/

Posted in Python | Tagged | Leave a comment

How do use itertools in Python to build permutation or combination

Tweet There is a python module dedicated to permutations and combinations called itertools.

The permutation function allows you to get permutation of N values within a list, where order matters. For instance, selecting N=2 values with [1,2,3] is done … Continue reading

Posted in Python | Tagged | 4 Comments

yum update failure: Cannot retrieve repository metadata

Tweet Sometimes, using “yum update”, the process fails with an error message similar to::

You could hack your yum repository in /etc/yum.repo.d but the best solution is simply to use the yum option “–disablerep o”:

Posted in Linux | Tagged , | Leave a comment

SED: insert text at the top of a bunch of files

Tweet at a line at the top of a file Imagine, you have a set of files ending in .txt, and you want to add the statement #header at the top of each of them. Then, simply type:

Replace … Continue reading

Posted in Linux | Tagged | Leave a comment

quick SVN tutorial for end-users

Tweet There are lots of resources on the web about SVN. so, this page is just a quick summary of the 4-5 commands you will need to start with. The following commands are for linux users (and therefore Mac users … Continue reading

Posted in Computer Science | Tagged | Leave a comment