schurger.org

  • À propos
  • JEAN SCHURGER
  • Archive
  • Tags
  • Search
  • Home
  • Tags
  • Python
  • IBM X201 Fan control 'disangager'

    I'm the lucky owner of a Thinkpad X201 since several years.

    For some reason, (buggy firmware, dust, buddy drivers), the fan managment is very debious, especialy when your CPU reach high temperatures.

    It's really disapointing to get the 'critical temperature reached(100 C),shutting down' message and see the system …

    15 novembre 2013
     · Jean Schurger
  • Prevent multiple heads when pushing to a Mercurial repository

    Mercurial heads and push -f

    Mercurial is a fascinating tool but when several people work on the same project, dealing with 'heads' can quickly become a nightmare.

    You know, you want to push your last super-fantastic commits to give them to the world, and Mercurial barks:

    "push creates new remote …

    16 mai 2013
     · Jean Schurger
  • Aide mémoire à l'utilisation des 'entry points' de setuptools

    • Créer un module dans un répertoire dédié.
    mkdir tarte
    $EDITOR tarte/*__init__.py*
    
    Y écrire votre morceau de code préféré.
    
    def aux():
        print "Pommes !"
    
    • Créer un fichier setup.py contenant des informations à propos de votre paquetage et les points d'entrée:
    from setuptools import setup
    
    setup (
        name='TarteAuxPommes',
        version="1 …
    16 octobre 2012
     · Jean Schurger
  • Montréal-Python

    I made a 20 minutes presentation at Montréal-Python.

    It was demonstrating off-line map generation using Openstreetmap tools, a Posgresql database, Leaflet,…

    [[https://pyvideo.org/montreal-python/openstreetmap-geocaching.html][]

    7 octobre 2011
     · Jean Schurger
  • Couleurs de la G9x

    Je suis l'heureux propriétaire d'une souris G9x. Ce petit jouet est équipé de boutons programmables et de lumières colorées. Le petit bout de code suivant permet de changer ces couleurs.

    #!/usr/bin/env python
    
    import usb
    G9_VENDOR_ID = 0x046d
    G9_PRODUCT_IDS = [0xc048, 0xc066]
    
    
    def get_g9_handle():
        for bus in usb.busses():
            for device …
    22 décembre 2010
     · Jean Schurger
  • Django translations

    J'ai participé à la traduction en Français de la documentation de Django. Effort organisé sous forme de Sprint par Montréal-Python.

    https://code.djangoproject.com/wiki/Sprint201002Montreal

    https://www.mtlpy.org/fr/2010/01/django-sprint-follow-up/

    15 février 2010
     · Jean Schurger
  • Unit tests with Pylons and its XMLRPCController

    Now that you have implemented a nice XMLRPCController in your Pylons application, it's time to write unit tests covering it. The problem is that the xmlrpclib tries to make a real HTTP connection to an address, but the TestApp used in your TestController is not a real server, and doesn't …

    9 décembre 2009
     · 1 min read
     · Jean Schurger
© 2004–2026 • Powered by Pelican &  Papyrus