Latest Event Updates

Usability study on our refrigerator

Posted on Updated on

Fridge

Software is often accused of having bad usability. However, many household items with far less functionality may also suffer. Video tape recorders are usually pretty bad, but even refrigerators can be silly. There are only a few features in the standard human-refrigerator interaction: The door and its handle, the light, the fruit boxes, the shelves and the regulator. The door and adjustable shelves and the boxes are quite straightforward and the light that switches on when the door opens is a marvelous invention. It leaves the regulator. Our old refrigerator has a min-max regulation. But what is min? Temperature or effect? Well, probably temperature, but a more informative marking would say cold-hot or display blue-red markings.

Debian upgrade still a bit of a nerdish headache

Posted on

I upgraded Debian on an old desktop computer from oldstable (etch/Debian 4.0) to stable (lenny/Debian 5.0). Upgrading is still a bit of a headache. It runs ok with “aptitude dist-upgrade”. It takes quite a while, – while you are watching “Running udpmap-sys. This may take some time”: Yes, it indeed does! Then comes the reboot. It now sometimes can’t mount and stops in the middle of the booting. I wonder if the old computer suffers from SCSI hardware problems or if it is a new kernel issue. Then comes X. First it didn’t start. After the introduction of magic in /etc/X11/xorg.conf X would come, but now my GL capabilities have been lost somewhere between nvidia binary, nvidia legacy binary and nvidia standard driver. I could probably spend some time looking at this issue, but I would like to use my time better than for these nerdish problems. Hmmm…

A Nobel prize in imaging?

Posted on

Thomson Reuters has announced their prediction for the 2009 Nobel prize. Among them is Seiji Ogawa. He is indeed a good guess as the pioneer for functional magnetic resonance imaging, that is now much used in cognitive neuroscience. Ogawa was not the first how did functional neuroimaging. Niels A. Lassen and David Ingvar were quite earlier – almost too earlier for their technique to have impact on other laboratories. Much of initial functional imaging (some 10-15 years) was performed with positron emission tomography (PET). Whereas there have been Nobel Prizes for MRI and CT scanning, there haven’t – as far as I recall – been a Nobel Prize for PET – or SPECT for that matter. Another development that could deserve recognition is Fludeoxyglucose (FDG). Whereas fMRI is still a bit of a toy for scientists the combination of PET and FDG is dead serious forming the work horse for advanced cancer imaging. I am not too much into the history of FDG but Alfred P. Wolf and Louis Sokoloff seem to have been important contributors. For PET David Kuhl and Michael Phelps are often mentioned. Since PET predates fMRI and PET is used much in oncology – not just cognitive neuroscience – it might be that the Nobel goes to PET instead of fMRI, – if a Nobel Prize in Physiology or Medicine is awarded for imaging at all.

Generating pie chart with Python and Google Chart API

Posted on Updated on

Chart

I recently discovered Google Chart API. From URLs it is able to generate image files with plots of different sorts, e.g., line plots, pie charts or even QR codes. The pie chart here was generated with the following code:

du -sk /usr/* > stats.txt ; python -c "d = open('stats.txt').read().split();  s = sum(map(float, d[0::2]));  print('http://chart.apis.google.com/chart?cht=p&chd=t:' +  ','.join(map(lambda x : str(int(float(x)/s*100)),d[0::2])) +  '&chs=600x300&chl=' + '|'.join(d[1::2]));"

Copy and pasting the returned URL into a Web-browser will show the Google-generated pie chart as PNG. Alternatively one could let Python download the file by modifying the code to use ‘urllib.urlretrieve()’.

For the data in the ‘chd’ parameter it seems that one needs to indicate the percentage.

There is also a module called pycha, which I haven’t tried.

1000 total pages in the Brede Wiki

Posted on

The MediaWiki page counter for my Brede Wiki now tells me that it has passed the 1000 “total pages” mark. Pages include, e.g., comments with data on scientific articles, pages for brain regions and pages for “topics” such as neuroticism.The Brede Wiki is presently open for anonymous edits and wiki spammers are quite interested in the article on Hidehiko Takahashi. I wonder if they are communicating something via the cryptic comment fields. Disregarding the spammers the article on Richard S. J. Frackowiak seems to be the most popular article after posterior cingulate gyrus.

Getting comments from YouTube via Python’s gdata.youtube

Posted on

I would like to download comments from YouTube. This is possible via the gdata.youtube Python module. python-gdata is a Debian/Ubuntu module of GData but may not include the most recent additions, such as the youtube module, so it may be necessary to download the gdata-python-client package with something like:

wget http://gdata-python-client.googlecode.com/files/gdata-2.0.2.tar.gz
tar vfxz gdata-2.0.2.tar.gz
cd gdata-2.0.2
python setup.py install --home=~/python

With some help provided by the python code of Giles Bowkett it is now possible to download some of the comments to a video on YouTube with the following lines of Python code:

import gdata.youtube.service
yts = gdata.youtube.service.YouTubeService()
urlpattern = 'http://gdata.youtube.com/feeds/api/videos/' +
       'JE5kkyucts8/comments?start-index=%d&max-results=25'
index = 1
url = urlpattern % index
comments = []
while url:
  ytfeed = yts.GetYouTubeVideoCommentFeed(uri=url)
  comments.extend([ comment.content.text for comment in ytfeed.entry ])
  url = ytfeed.GetNextLink().href
  print url

It seems only to be possible to download 1000 comments, – see also Stephen Mesa’s comment. So the small script will error after 1000 comments have been downloaded…

Google real-time search

Posted on

The Omgili blog (Yoav Pridor) seems to be the ones who first described the real-time search facility presently somewhat hidden in the Google. By tweeking the search parameters it is possible to search for web-pages from the past two minutes:http://www.google.dk/search?tbo=1&tbs=qdr%3An2&q=denmarkIt is not clear to me what the “two minutes” mean: published? Or Google-crawled?I was alert to this real-time search via twitter mia out.