subscribe to this blog

Logilab.org - en

News from Logilab and our Free Software projects, as well as on topics dear to our hearts (Python, Debian, Linux, the semantic web, scientific computing...)

show 204 results
  • simpled - Simple Desktop project started !

    2008/08/11 by Nicolas Chauvat

    I bought last week a new laptop computer that can drive a 24" LCD monitor, which means I do not need my desktop computer any more. In the process of setting up that new laptop, I did what I have been wanting to do for years without finding the time: spending time on my ion3 config to make it more generic and create a small python setup utility that can regenerate it from a template file and a keyboard layout.

    The simpled project was born!

    If you take a look at the list of pending tickets, you will guess that I am using a limited number of pieces of software during my work day and tried to configure them so that they share common action/shortcuts. This is what simpled is about: given a keyboard layout generate the config files for the common tools so that action/shortcuts are always on the same key.

    I use ion3, xterm+bash, emacs, mutt, firefox, gajim. Common actions are: open, save, close, move up/down/left/right, new frame or tab, close frame or tab, move to previous or next tab, etc.

    I will give news in this blog from time to time and announce it on mailing lists when version 0.1 will be out. If you want to give it a try, get the code from the mercurial repository.


  • Simile-Widgets

    2008/08/07 by Nicolas Chauvat
    http://simile.mit.edu/images/logo.png

    While working on knowledge management and semantic web technologies, I came across the Simile project at MIT a few years back. I even had a demo of the Exhibit widget fetching then displaying data from our semantic web application framework back in 2006 at the Web2 track of Solutions Linux in Paris.

    Now that we are using these widgets when implementing web apps for clients, I was happy to see that the projects got a life of their own outside of MIT and became full-fledged free-software projects hosted on Google Code. See Simile-Widgets for more details and expect us to provide a debian package soon unless someone does it first.

    Speaking of Debian, here is a nice demo a the Timeline widget presenting the Debian history.

    http://beta.thumbalizr.com/app/thumbs/?src=/thumbs/onl/source/d2/d280583f143793f040bdacf44a39b0d5.png&w=320&q=0&enc=

  • SciPy and TimeSeries

    2008/08/04 by Nicolas Chauvat
    http://www.enthought.com/img/scipy-sm.png

    We have been using many different tools for doing statistical analysis with Python, including R, SciPy, specific C++ code, etc. It looks like the growing audience of SciPy is now in movement to have dedicated modules in SciPy (lets call them SciKits). See this thread in SciPy-user mailing-list.


  • Google Custom Search Engine, for Python

    2008/07/31

    A Google custom search engine for Python has been made available by Gerard Flanagan, indexing:

    http://www.logilab.fr/images/python-logo.png

    Using refinements

    To refine the search to any of the individual sites, you can specify a refinement using the following labels: stdlib, wiki, pypi, thehazeltree

    So, to just search the python wiki, you would enter:

    somesearchterm more:wiki

    and similarly:

    somesearchterm more:stdlib somesearchterm more:pypi somesearchterm more:thehazeltree

    About http://thehazeltree.org

    The Hazel Tree is a collection of popular Python texts that I have converted to reStructuredText and put together using Sphinx. It's in a publishable state, but not as polished as I'd like, and since I'll be mostly offline for the next month it will have to remain as it is for the present. However, the search engine is ready now and the clock is ticking on its subscription (one year, renewal depending on success of site), so if it's useful to anyone, it's all yours (and if you use it on your own site a link back to http://thehazeltree.org would be appreciated).


  • Python for applied Mathematics

    2008/07/29 by Nicolas Chauvat
    http://www.ams.org/images/siam2008-brain.jpg

    The presentation of Python as a tool for applied mathematics got highlighted at the 2008 annual meeting of the american Society for Industrial and Applied Mathematics (SIAM). For more information, read this blogpost and the slides.


  • ion, dock and screen configuration

    2008/07/04 by David Douard

    I have a laptop I use at work (with a docking station), in the train and at home (with an external display), on which my environment is ion3.

    As I use suspend-to-RAM all the time, I have added some keybindings to automatically reconfigure my screen when I plug/unplug an external display (on the dock as well as direct VGA connection).

    The lua code to paste in your .ion3/cfg_ion.lua for the bindings looks like:

    function autoscreen_on()
            local f = io.popen('/home/david/bin/autoscreen -c', 'r')
          if not f then
              return
          end
          local s = f:read('*a')
          f:close()
        ioncore.restart()
    end
    
    function autoscreen_off()
            local f = io.popen('/home/david/bin/autoscreen -d', 'r')
          if not f then
              return
          end
          local s = f:read('*a')
          f:close()
        ioncore.restart()
    end
    
    defbindings("WMPlex.toplevel", {
        bdoc("Turn on any external display and tell ion to reconfigure itself"),
        kpress(META.."F10",
               "autoscreen_on()"),
    })
    
    defbindings("WMPlex.toplevel", {
        bdoc("Turn off any external display and tell ion to reconfigure itself"),
        kpress(META.."F11",
               "autoscreen_off()"),
    })
    

    It makes use of the following python script (named /home/david/bin/autoscreen in the lua code above):

    #!/usr/bin/env python
    
    import sys
    import os
    import re
    from subprocess import Popen, PIPE
    import optparse
    parser = optparse.OptionParser("A simple automatic screen configurator (using xrandr)")
    parser.add_option('-c', '--connect', action="store_true",
                      dest='connect',
                      default=False,
                      help="configure every connected screens")
    parser.add_option('-d', '--disconnect', action="store_true",
                      dest='disconnect',
                      default=False,
                      help="unconfigure every connected screens other than LVDS (laptop screen)")
    parser.add_option('', '--main-display',
                      dest='maindisplay',
                      default="LVDS",
                      help="main display identifier (typically, the laptop LCD screen; defaults to LVDS)")
    
    options, args = parser.parse_args()
    
    if int(options.connect) + int(options.disconnect) > 1:
        print "ERROR: only one option -c or -d at a time"
        parser.print_help()
        sys.exit(1)
    
    
    xrandr = Popen("xrandr", shell=True, bufsize=0, stdout=PIPE).stdout.read()
    
    connected = re.findall(r'([a-zA-Z0-9-]*) connected', xrandr)
    connected = [c for c in connected if c != options.maindisplay]
    
    cmd = "xrandr --output %s %s"
    
    if options.connect or options.disconnect:
        for c in connected:
            if options.connect:
                action = "--auto"
            elif options.disconnect:
                action = "--off"
    
            p = Popen(cmd % (c, action), shell=True)
            sts = os.waitpid(p.pid, 0)
    

  • We're going to Europython'08

    2008/07/02 by Arthur Lutz
    http://europython.org/euro/img/europython.png

    Hey,

    We've decided to go to Europython this year. We're obviously going to give a talk about the exciting things we're doing with LAX and GoogleAppEngine. We're on wednesday at midday in the alfa room, check out the schedule here. Since we think it's important that these events take place, we're also chipping in and sponsoring the event.

    We hope to see you there. Drop us a note if you want to meet up.


  • Munin Plugins for Zope

    2008/07/01 by Arthur Lutz
    http://munin-monitoring.org/site/munin.png

    Here at Logilab we find Munin pretty useful. We monitor a lots of machines and a lot of services with it, and it usually gives us pretty useful indicators over time that guide us through to optimizations.

    One of the reasons we adopted this technology is it's modular approach with the plugin architecture. And when we realized we could write plugins in python, we knew we'd like it. After years of using it, we're now actually writing plugins for it. Optimizing zope and zeo servers is not an easy task so we're developping plugins to be able to see the difference between before and after changing things.

    You check out the project here, and download it from the ftp.


  • apycot 0.12.1 released

    2008/06/24 by Arthur Lutz

    After one month of internship at logilab, I'm pleased to announce the 0.12.1 release of apycot.

    for more information read the apycot 0.12.1 release note

    You can also check the new sample configuration.

    Pierre-Yves David


  • Instrumentation of google appengine's datastore.

    2008/06/23 by Sylvain Thenault

    Here is a piece of code I've written which I thought may be useful to some other people...

    You'll find here a simple python module to use with the Google AppEngine SDK to monkey patch the datastore API in order to get an idea of the calls performed by your application.

    To instrument of the datastore, put at the top level of your handler file

    import instrdatastore
    

    Note that it's important to have this before any other import in your application or in the google package to avoid that some modules will use the unpatched version of datastore functions (and hence calls to those functions wouldn't be considered).

    Then add at the end of your handler function

    instrdatastore.print_info()
    

    The handler file should look like this:

    """my handler file with datastore instrumenting activated"""
    import instrdatastore
    
    # ... other initialization code
    
    # main function so this handler module is cached
    def main():
      from wsgiref.handlers import CGIHandler
      from ginco.wsgi.handler import ErudiWSGIApplication
      application = ErudiWSGIApplication(config, vreg=vreg)
      CGIHandler().run(application)
      instrdatastore.print_info()
    
    if __name__ == "__main__":
      main()
    

    Now you should see in your logs the number of Get/Put/Delete/Query which has been done during request processing

    2008-06-23 06:59:12 - (root) WARNING: datastore access information
    2008-06-23 06:59:12 - (root) WARNING: nb Get: 2
    2008-06-23 06:59:12 - (root) WARNING: arguments (args, kwargs):
    ((datastore_types.Key.from_path('EGroup', u'key_users', _app=u'winecellar'),), {})
    ((datastore_types.Key.from_path('EUser', u'key_test@example.com', _app=u'winecellar'),), {})
    2008-06-23 06:59:12 - (root) WARNING: nb Query: 1
    2008-06-23 06:59:12 - (root) WARNING: arguments (args, kwargs):
    (({'for_user =': None}, 'EProperty'), {})
    2008-06-23 06:59:58 - (root) WARNING: nb Put: 1
    2008-06-23 06:59:58 - (root) WARNING: arguments (args, kwargs):
    (({u'login': None, u'last_usage_time': 1214204398.2022741, u'data': ""},), {})
    

    I'll probably extend this as the time goes. Also notice you may encounter some problems with the automatic reloading feature of the dev app server when instrumentation is activated, in which case you should simply restart the web server.


show 204 results