This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Par défaut, seul le KS-1 est surveillé. Pour les autres références, inspectez | |
# le tableau sur la page kimsufi.com et cherchez les attributs "data-ref". | |
# | |
# Pour l'exécution, vous avez le choix : en boucle dans un terminal (dans un | |
# intervalle raisonnable !), en tâche cron si vous lisez vos mails système, | |
# ou en notification graphique : | |
# while true; do r=`./kimsufi.py`; if [ "$r" != "" ]; then notify-send Kimsufi -t 30000 $r; fi; sleep 60; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Conclusion de l'exercice : on peut aussi écrire des trucs crades en AWK. | |
# Fonctions | |
## Affiche la liste des albums de l'artiste depuis la variable globale 'artist_albums' | |
function print_artist_albums(){ | |
for (album in artist_albums){ | |
print " <album name=\""artist_albums[album]["name"]"\">" | |
for (support in artist_albums[album]["supports"]){ | |
print " <support id=\""artist_albums[album]["supports"][support]["id"]\ | |
"\" type=\""artist_albums[album]["supports"][support]["type"]\ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff -x '*.pyc' -ur a/sonata/artwork.py b/sonata/artwork.py | |
--- a/sonata/artwork.py 2009-09-21 23:02:16.000000000 +0200 | |
+++ b/sonata/artwork.py 2012-10-06 02:57:02.019888727 +0200 | |
@@ -44,10 +44,7 @@ | |
self.albumimage = ui.image() | |
self.albumimage.set_from_file(self.sonatacd) | |
- self.trayalbumimage1 = ui.image(w=51, h=77, x=1) | |
- self.trayalbumeventbox = ui.eventbox(w=59, h=90, add=self.trayalbumimage1, state=gtk.STATE_SELECTED, visible=True) | |
- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Se pourrir la vie entre collègues, niveau M2 * | |
* | |
* En DUT, on avait l'habitude de se pourrir le terminal à coup de | |
* $ cat /dev/urandom | write olivier | |
* | |
* Tout ça est bien loin... Un étudiant de M2 se doit d'apprendre à utiliser | |
* des méthodes plus évoluées. Aujourd'hui, node.js + XMPP. | |
*/ | |
var xmpp = require('node-xmpp'); |