Working with vectors it’s nice to have a quick way to print the values contained. Something like: Unfortunately this doesn’t work out of the box with C++… we first need to overload the << operator for vector. Now the code in the first block works fine, but only for vectors of int. Wouldn’t it be […]
Interfacing Python/numpy from C++ (Part 1/3)
Sometimes there is a need to interface Python and numpy from C++. Maybe your Python code is too slow for a specific application or you have an old C++ library that you want to run on your data. In this three part series we will look at how to go from Python to C++ and […]
Visualise the population of Switzerland using Python and bokeh

As some sort of simple introduction to displaying data on a map we can visualize the population of Switzerland. For this we need data on population per canton and the map to plot the data on. Fortunatley both are freely available. <div class="cell border-box-sizing text_cell rendered"> <div class="inner_cell"> <div class="text_cell_render border-box-sizing rendered_html"> <h3 id="Getting-the-map">Getting the […]
Fit data using PyROOT… and plot the result using matplotlib

ROOT is a powerful tool for data processing but the learning curve can be quite steep. Python on the other hand is in general easy to use but specially function fitting is less developed. Using a combination of ROOT trough PyROOT and Python with matplotlib and seaborn we can try to get the best of […]
Academic starter-kit
Data analysis Having dabbled with everything from Excel to Matlab I settled on using Python for the main part of the data analysis that I do. This includes everything from curve fitting to processing some tens of GB of data from hybrid pixel detectors. With a large user base lots of open source tools it is […]
How to include a publication list in WordPress
Having the need to reproduce a list of my publications on various locations (CV, website, applications etc.) it quickly becomes unreasonable time consuming to maintain a hand coded list. Using bibtex to handle references for my articles and CV it makes sense to use it as a base for the webpage as well. 1. Get your […]