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
corrplot function in Python
We’ve implemented a corrplot function in Python, which is available in BioKit package – github https://github.com/biokit/biokit – pypi https://pypi.python.org/pypi/biokit For illustration, let us create some random data sets: import pandas as pd import string letters = string.uppercase[0:15] df = pd.DataFrame(dict(( … Continue reading
About matplotlib colormap and how to get RGB values of the map
matplotlib comes with lots of colormaps. First, let us see where and how to find them. Then, we will see how to extract individual colors (e.g., in RGB) from the colormap itself. Let us first creat an image from matplotlib … Continue reading
git and github : skip password typing with ssh
Assuming you have already provided your ssh key in your github settings, you can avoid typing your username and password when when pushing content into your github account, by cloning the SSH repository instead of the default HTTP one. ssh://git@github.com/username/repo.gitssh://git@github.com/username/repo.git … Continue reading
Installing Python2.6 in a virtual environment
First, install python2.6 executable. see previous post if you have issues when compiling (gcc not found). Make sure you have installed python-dev with apt-get or yum. Then, following the instructions on the same topic but for Python 3 in a … Continue reading
Installation of Python 2.6 error fixed
I wanted to install python2.6 in a virtual environment. The first step was to compile python 2.6 executable from the source code. Once the source are extracted, just type: ./configure –prefix=<PATH_WHERE_TO_INSTALL> make./configure –prefix=<PATH_WHERE_TO_INSTALL> make If you are lucky, everything is … Continue reading
Installing another Python version into virtualenv
The idea is that we do not want to install a new version of Python on the system (e.g., for testing purpose), which may interfere with your entire distribution. Instead, we want to create a virtual environment with virtualenv tool. … Continue reading
How to add badges in your pypi project
1. pypi badge To get the pypi badge, go to https://badge.fury.io/for/py page and enter the name of a valid package. Select the code you’d like to insert into your documentation (e.g., RST) and you check get a image like this: … Continue reading
Posted in Python
3 Comments
Migrating from a Subversion repository to GitHub
I’ve just moved a SVN repository to github. I was a bit afraid of spending time and lost the history but fortunately, I came upon this great post http://www.samaxes.com/2013/11/move-from-svn-to-git/ , followed the instructions and it worked almost like a charm. … Continue reading
Posted in Uncategorized
Leave a comment
How to calculate mean in AWK
Another trick with awk to compute mean of a column. Imagine that you have a file with many lines and you want to compute the mean of the fourth item on each line. E.g: Lowest value found .2 Lowest value … Continue reading
How to send svn diff to meld
On one hand meld provides a nice GUI to visualise the differences between 2 files. On the other hand, with SVN diff command, you can obtain the differences between 2 versions of the same file so you end up with … Continue reading