Follow me
-
Recent Posts
calendar
December 2024 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 31 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
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
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
Tkinter missing dependency
Under Fedora 17, I did an import of Tkinter package but got this error in a python shell: Traceback (most recent call last): File "slider-demo-1.py", line 1, in <module> from Tkinter import * File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 39, in <module> import … Continue reading
Bioconductor: first installation
Bioconductor is a website that gathers open source software for bioinformatics in the R language. You can install a Bioconductor package using their interface. As an example, let us install the RBGL package. First, start a R session, and then … Continue reading
Posted in R
Leave a comment
Installing JPype to use Java from Python
JPype is a Python package that allows you to call Java from Python. First, download the zip file (I got version 0.5.4.2). I will use a virtual environment here, so the syntax is simply: cd /home/user/Downloads # path where the … Continue reading
How to get processor information (linux)
Simply type cat /proc/cpuinfocat /proc/cpuinfo You can also try cat /proc/meminfocat /proc/meminfo
Fedora 17: post installation
Fedora 16 crashed after an update. Good time for a fresh installation of Fedora 17. The installation process provides most of the basic tools (browser, editor…) but some favorites are missing… Here is what I did for the post installation … Continue reading
Upgrading R and rpy2
When upgrading R version, you must recompile rpy2. Let us take a case study based on the upgrade of R2.15 to R2.15.1. First, you need to download the source from the main page http://www.r-project.org/ Once downloaded, get the source tar … Continue reading