XD blog

blog page

2015-05


2015-05-24 Install pip and setuptools

pip was recently updated. It cannot be updated using pip install -U pip on Windows because it has to replace itself. So read the documentation. You can:

Or you can just download the package from pipy, unzip and install them with python setup.py install.

2015-05-23 Jenkins, TortoiseGit and locked files on Windows

Some errors can be very annoying sometimes if they come back again and again. Here is one of them: TortoiseGit locks repository folders so that the user can't delete them which I throught was caused by Jenkins. So annoying that it was mentioned in a couple of issues 401, 497, 1880. I could avoid using TortoiseGit but that's the only git GUI I don't have to remember the usage.

So let's tweak the TortoiseGit's Settings even if some changes seem to fix it:

TGitCache now checks file sizes before checking file contents. 
This should mitigate possible "file is locked" problems.
TGitCache now does not check the contents of files with filesize > 10 MiB any more
and falls back to checking the timestamp of the files (as if TGitCacheCheckContent
is set to "false") according the the git index. This limit can be changed by adjusting
TGitCacheCheckContentMaxSize (measured in KiB) in TortoiseGit advanced settings.
The reason for this change is that libgit2 reads a file to memory for hashing and,
thus, locking the file and the repository for this time span.

A couple of tricks:

2015-05-21 Github Awards

I discovered this website Github Awards which ranks people implementing or contributing to open source projects. You can even drill down per language, city... And you find some popular script you did not even know about: ipycache or TimeSide (audio processing) or Facebook Python SDK.

2015-05-20 Jolla, Sailfish, OS pour SmartPhone

La guerre froide version smartphone. See Jolla, Sailfish.

2015-05-19 Continuous integration

I'm using Travis to check that my open source modules works on Linux. I discovered the following video Olivier Grisel - Build and test wheel packages on Linux, OSX & Windows - PyCon 2015 which explains how this is done for scikit-learn. AppVeyor offers the same service as Travis but for Windows (it works with Azure). The setup is more complex as Python is the C++ compiler is still a pain to configure. You can check how it is done for scikit-learn: windows_testing_downloader.ps1, appveyor.yml. A few other interesting scripts: mingw.py.

2015-05-18 Ordonner les onglets sous Excel

On me demandait récemment comment ordonner les onglets sous Excel. Mon premier réflexe de chercher sur un moteur de recherche ordonner les onglets sous Excel. Je recopie ici le code trouver sur le site de Microsoft : Comment trier les onglets d'un classeur

Pour s'en servir, il suffit de recopier ce code dans l'éditeur VBA qui apparaît dès qu'on utilise la combinaison ALT+F11. Il faut le recopier dans la fenêtre associée à l'intitulé ThisWorkbook.


more...

2015-05-17 Notebook to slides

Notebooks can be converted into slides with nbconvert. It produces a slideshow with reveal.js if metadata are added to some cells. It indicates when a new slide of subslide should be started.

The trick is if you have many notebooks to convert, it is unlikely you are going to open all of them to tag each slide and subslide. So I implemented this very basic function add_tag_slide which automatically tags the cells. You can see an example of the outcome here. I also recommend to copy/paste reveal.js locally. It works better.

2015-05-10 Notebook on Github

Github now renders notebooks and do not show the raw text by default: Features ou modèle. It is still a little bit slow but why did I spend some time to convert them? I wonder.

2015-05-09 Data Scientist à San Francisco

Clément, "data scientist" à San Francisco pour 5 950 euros par mois Avec ce salaire-là, on se place dans les 3% les mieux rémunérés en France. Je serai curieux d'avoir le même aperçu dans dix ans, avec les coûts liés à la garde des enfants, leur éducation.

2015-05-08 Collectionneur de numérique

Je suis tombé sur un documentation d'envoyé spécial Vieilles voitures : la rouille à prix d'or et suis resté scotché devant l'engouement des collectionneurs pour les vieilles voitures, presque des épaves pour certaines d'entre elles. Après trente ans, elles sont d'ailleurs considérées comme des oeuvres d'art et bénéficient du régime fiscal associé. La résistance au temps est sans doute le meilleur critère qui donne de la valeur à tel ou tel objet. La rareté vient en second. Ceci pourrait-il s'appliquer au domaine numérique ?

La rareté est assez difficile à concevoir. Comme toute chose numérique, une fois que ça marche, c'est très facile à reproduire. Le support numérique ne vieillit pas. Certains codes vieux de trente ans sont toujours de mise, des jeux ont été portés des vieux ordinateurs aux plus récents. Ils ne nécessitent pas d'entretien particulier. Le reportage suggérait qu'on collectionne les voitures dans lesquelles nos parents nous ont fait voyager. C'est de là que vient notre envie de conserver des vieilles choses. D'ailleurs, je crois que je pourrais passer des heures dans une vieille Dyane verte. Je suis trop vieux pour avoir grandi avec une tablette à mes côtés. Ces objets ont aussi la fâcheuse tendance à passer très vite sans nous laisser le temps de nous y attacher. Est-ce qu'un enfant né aujourd'hui pourrait refaire marcher une tablette d'aujourd'hui comme mon père serait capable d'aller farfouiller le moteur d'une voiture... Ou peut-être qu'on pourra simplement imprimer en 3D des objets électroniques, alors une voiture...

2015-05-06 Probability puzzles

J'ai découvert le terme de probability puzzle. Ils résonnent comme les mots clés qui permettent de trouver de nombreux devinettes de probabilités.

2015-05-05 c3.js

c3.js is a framework based on d3.js. Simple graphs can be obtained with shorter scripts compared to d3.js. If you are curious, you can look for b3.js, a3.js (for 3D graphs). Then you an go on with d4.js...


Xavier Dupré