# Monthly Archives: November 2012

## Solving a Linear Programming problem with Python (Pulp)

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 maximize … Continue reading

Posted in Data analysis | Tagged , | 7 Comments

## Raspberry pi: first steps

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 found … Continue reading

## How use R to build permutation or combination

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 values … Continue reading

## Fly with Python

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

## How do use itertools in Python to build permutation or combination

There is a python module dedicated to permutations and combinations called itertools. import itertoolsimport 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 … Continue reading

Posted in Python | Tagged | 6 Comments

## yum update failure: Cannot retrieve repository metadata

Sometimes, using “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 Error: Cannot retrieve repository metadata (repomd.xml) for repository: rpmfusion-free-updates. Please verify … Continue reading

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

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: ls *.txt | … Continue reading

## quick SVN tutorial for end-users

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 who … Continue reading