Computing the argmax is a common programming problem: you have a set of candidates \(C\), a score function \(f\), and you want to compute an optimal candidate \(c \in C\) according to \(f\), i.e. one that maximizes \(f(c)\). If there is only one such candidate, it is called the “argmax” of \(f\) on \(C\). One can find solutions for this on-line, e.g. in this blog post, but I realized recently that Python’s max() function can actually handle the job. Here is how.
À propos des Anonymous
Tout à commencé par l’arrestation d’un membre supposé des Anonymous par la DCRI, rapportée ici par OWNI. Comme je considère vaguement qu’il est de mon devoir de faire circuler l’information en-dehors du cercle geek où je l’ai piochée (et où les gens savent globalement de quoi il est question), je saisis ma plume et envoie un e-mail pas piqué des vers à ma famille et quelques personnes non-techno-initiées pour leur raconter l’histoire. Parce qu’elle me semble importante, et que nous ne servons à rien si nous, qui comprenons un peu ce dont il est question, ne prenons pas la peine d’en parler avec les gens de « la majorité », qui elle n’y comprend rien, et n’est aidée en rien par les médias.
Or voilà en substance ce que l’un de mes proches me répond : « Cher Stéphane, tu es bien gentil avec tes histoires, mais n’est-il pas normal que l’on cherche à tout prix à dévoiler un groupe
- célèbre pour ses attaques informatiques ;
- qui a dévoilé les données personelles de 541 policiers ;
- incitant à la haine à l’égard des policiers ;
- manifestant pour télécharger illégalement ;
- bloquant l’Élysée, la Maison Blanche, et même le site EDF.
Tout ceci est-il normal ? Où va-t-on ? On aura tout vu ! » Comme quoi, j’ai bien fait de lancer le débat
Et comme, encore une fois, nous ne servons à rien si nous ne prenons pas la peine d’expliquer, voici grosso-modo ce que j’ai répondu. (D’avance désolé pour les imprécisions éventuelles, mais il était hors de question de rentrer dans des détails trop pointus.)
Want to discover music? Lose your iPod!
I was pretty upset when I discovered a few months ago that I had, substantially, lost all my music. Something actually worse than merely having all the files erased: for some reason I still don’t understand, my files had been corrupted (it seems) at random. Some of them you could play fine all the way through, some would stop in the middle of the song, some wouldn’t even start playing… A nightmare.
First, I had to find an automated way to detect corrupt files and either detect the cause or make sure no new files were getting corrupted every day. (The latter happened, so as of today I still don’t know how my library got spoiled.) Then, I had to build a new library from the remains of the previous one.
But my point is that this accident turned out to be a chance for me. A chance to give some thoughts to the way I listen to music, and discover how much I have been conditioned (yes, in the Pavlov understanding) by the iPod/iTunes way to listen to music. These are the thoughts I want to share today.
Continue reading
Reason and linear models
Today I found yet another (recent) paper reading:
It is reasonable to suppose that [complex phenomenon] can be approximated by a linear function of a combination of [collected features].
Wiktionary provides three possible meanings to the word “reasonable”:
- Just; fair; agreeable to reason.
- Not expensive; fairly priced.
- Satisfactory.
In this case, only the second one applies for sure. Otherwise, a linear model is indeed
- simple, often the simplest, to use/solve,
- readable: if the regressands have semantics, then so have the linear coefficients,
- able to capture the dynamics of your problem, sometimes.
But this does not make it reasonable per se. If you have measures that validate your choice of this kind of model, then yes, there’s some reason around. Otherwise, please remind that not everything is approximable by a linear function (even in the real world) and explain what you mean by “reasonable”.
How to play any DVD on Ubuntu
I recently found myself in a situation where I couldn’t read a DVD I’d just bought here (in the US) because of the protections and region-lock on the disc. This got me pretty upset since every device on the chain and every piece of software involved were legal (my machine is a factory Sony Vaio Z running Ubuntu 11.04). So here is the summary of the additional software (legal as well) I had to install to get things working.