English: Official logo of the Université libre de Bruxelles (Photo credit: Wikipedia) Profiling tools like cprofile provide hardly understandable output for my celery based app. So I used a tool called manual profiling by Pierre de Buyl from University of Toronto – Université Libre de Bruxelles (many thanks Pierre for your help 🙂 ) presentation…
In this article I explain how you can profile python code with celery, and why I find this solution disappointing. I propose a better solution in the conclusion. Have fun ! Head of celery, sold as a vegetable. Usually only the stalks are eaten. (Photo credit: Wikipedia) If you are in a hurry, you can…
Sudo (Photo credit: Scelus’ Comix) If you code in Python, you probably use virtualenv to maintain a clean setup and avoid problems with different versions of pythons. But sometimes, you need to replicate / export a virtualenv from a machine to another. This post will explain you exactly how to do this. First, use the…
In this post, I will explain you how to use Celery and print warning messages to stdout. Cross section of celery stalk, showing vascular bundles, which include both phloem and xylem. (Photo credit: Wikipedia) If you use celery, you might be frustrated by the absence of the ‘print’ assertions that you put in your code…
In this post, I will explain you why the good practice in Python programs is to carefully import only what is necessary to run your program. Let’s start with an example. Sometimes, I feel lazy and use: from toto import * This is a bad idea, as sometimes the name of the things that you…
The LaTeX logo, typeset with LaTeX (Photo credit: Wikipedia) I have implemented a simple DeTeX function in Python. I provide this function below, as is and without any guarantee. If you run it, and it should change the example LaTeX text into “simple” text thanks the detex() function defined in the code. It’s a quick…
Django logo (Photo credit: Wikipedia) .Django creates automatically a web admin portal for our web app. We just have to edit the settings.py file and to uncomment “django.contrib.admin” in the INSTALLED_APPS setting. # Uncomment the next line to enable the admin: ‘django.contrib.admin’, # Uncomment the next line to enable admin documentation: ‘django.contrib.admindocs’, We need…