Python

Be better at programming with static program analysis

- What is static program analysis ? Static program analysis allows the gathering of informations about the execution behaviour of your code without actually executing it. It is the opposite of dynamic program analysis (like debugging) which required the code to be executed. - Ok! But why should I use this in practice ? To save time by suppressing the save/execute cycles induced by syntax errors (missing ";", function or variable not initialized, typos, ...). Correcting these errors at the [...]

By | 2017-04-29T17:13:51+00:00 May 8, 2015|Categories: Performance, Python, R|Tags: , |0 Comments

Database Content Versioning Using SQLAlchemy

One of the important functionality required of a LIMS is keeping a history of the changes applied to the data stored within the underlying database. This can be a tricky aspect to develop and/or put in place and there are certainly a number of ways one can go about implementing such a solution. Fortunately for all you SQLAlchemy fans out there, a fully implemented versioning solution is provided in the ORM's examples page. While the examples page provides a few [...]

By | 2017-05-01T10:27:33+00:00 October 5, 2014|Categories: Computer science, Database, Python|Tags: , , , |0 Comments

python and pandas

R is undeniably a must-use language. Especially for data visualization. But R can sometimes be a little bit slow when dealing with big datasets. If you don't need to create awesome graphs or don't have time to wait, there's an alternative in Python that can be quite fast for data manipulation. The Python Data Analysis Library, pandas, provides an easy way to manipulate data in python. Recently, I had to deal with a big gene expression file (21024 genes x [...]

By | 2017-04-29T15:49:18+00:00 April 17, 2014|Categories: Data Analysis, Python|Tags: , |1 Comment

What’s the fastest?

Often, we rely on our old habits. We get comfortable and have a tendency to do things the same old way. Same thing happens when you're programming. But a day will come when you’ll ask yourself, is this the fastest way to perform this task ? And when this happens to you (and if the given task is in Python), you’ll be glad that a package like timeit exist. Sure there are other ways to organize timing contest in Python. [...]

By | 2017-05-01T10:25:40+00:00 April 2, 2014|Categories: Performance, Python|0 Comments

lifelines (or doing survival analysis in Python)

Lately, I've been doing survival analysis.  I'm not an expert but we had a self-learning group based on David G. Kleinbaum and Mitchel Klein’s  book,   "Survival Analysis. A Self-Learning Text" .  At the end of this book, there's code provided to help you get started in SAS, Stata, SPSS and... R!  I've played with the R package survival which is quite good!  My problem was that I wanted to do survival analysis in Python.  I've started by doing it with [...]

By | 2017-04-29T17:16:41+00:00 March 24, 2014|Categories: Data Analysis, Python, Statistics|Tags: |0 Comments