Thursday, November 22, 2007
Climate changes and market forces
For example, Prof. Kemfert thinks that in 25 years rationing of fuel will be widespread throughout Europe, so that vital industries (the medical and plastics industry are mentioned) can use the oil. I think this underestimates the power of the market:
Energy prices will increase in the future, as the demand in the developing countries grows quickly. However, this will be followed by an increase in supply of fuels, because it becomes economic to use sources that are too expensive to exploit today. So this won't save the world.
However, willing governments can push the markets into a more environmentally friendly direction with a carbon tax that assigns an equal price for every unit of carbon dioxide. (Of course, one needs to make sure that a carbon tax in one country doesn't just shift the emissions across the border.) Such a tax only increases the cost for the consumer, but not the income of the supplier of fossil fuels, hence supply doesn't increase.
Thus follows the good thing for the climate: demand will decrease in response to a carbon tax! On one hand, conservation efforts and increases in efficiency have greater returns on investment. On the other hand, renewable energy sources such as solar and wind power are favored and will be adopted more quickly.
So, I predict that if gas prices increase eight-fold in the next twenty years, we'll quickly see plug-in hybrids and electric cars. People will still have fun with their cars, but the necessary power can come from renewable sources.
Where will this energy come from? There are plenty of possible sources.
Thursday, October 18, 2007
Max Planck Society cancels license agreement with Springer
The reason that the talks failed is that Springer wanted twice the amount the Max Planck Society considered as justifiable, although they say even the justifiable amount was higher than what other publishers charge.
The Max Planck Society is one of the main proponents of the Berlin Declaration on Open Access to Knowledge in the Sciences and Humanities. It is the first major research organization that I'm aware of that breaks free of the stranglehold of the publishing industry. The question is, of course: what will happen next? Do they stay firm and begin to cause a shift towards Open Access journals? Or will Springer go down with the price just enough that the contract will be renewed?
Update: heise.de now reports this story in English as well.
Update 2: Well, they have reached an agreement on January 29, 2008.
Thursday, October 11, 2007
Sending Growl notifications from Python scripts
#!/usr/bin/env python
from netgrowl import *
import sys
def growlNotify(title = "Script Finished", message = ""):
addr = ("10.1.104.26", GROWL_UDP_PORT)
s = socket(AF_INET,SOCK_DGRAM)
#
# p = GrowlRegistrationPacket(application="Network Demo", password="?")
# p.addNotification("Script Finished", enabled=True)
#
# s.sendto(p.payload(), addr)
if not message:
message = sys.argv[0]
p = GrowlNotificationPacket(application="Network Demo",
notification="Script Finished", title=title,
description=message, priority=1,
sticky=True, password="?")
s.sendto(p.payload(),addr)
s.close()
if __name__ == '__main__':
growlNotify()
The registration is hidden in a comment, you only need to do that the very first time. So, in my scripts, I just insert the following right before the end of the script (using a Textmate snippet to save typing).
import growlnotify
growlnotify.growlNotify()
Friday, October 5, 2007
Feed for NAR Database Issue papers
Wednesday, August 29, 2007
Use case for decorators
Intro
Decorators were introduced in Python 2.4 but remain a somewhat obscure feature of the language. A decorator essentially is a function that you apply to another function, replacing it with the return value of the decorator function:def d(f):
...
@d
def g():
...
This is equivalent to:def d(f):
...
def g():
...
g = d(g)
More background here.The use case
As part of my research project, I’m testing several ways to explain side effects of drugs. So I made a class that loads all the relevant data into memory and that contains methods to fit the data. (I thought about creating subclasses replacing the “fit” method of the base class. However, the data that’s being loaded into memory is the same for all instances of the subclasses, so I don’t want to reload it every time. Thus, I put multiple methods into the base class.)At first, I used introspection to identify the relevant functions by name (using
dir) and then calling them. This worked fine, but it doesn’t make it particularly easy to disable some of the functions. Enter decorators: I wrote a decorator that takes a function, puts it into a list (which is a global variable) and returns the function unchanged. To call every fitting function, I can just iterate over the list. If I want to disable a function, I just comment out one line. Yay!Another neat trick is that the docstring of each function is accessible as an attribute, so that each fit comes together with a description.
Tuesday, August 28, 2007
Running in circles
You know you're looking for an obscure topic when your own entry in CiteULike comes up on the second page or so of the Google results.
Luckily, I saw my name in the URL and so I didn't get frightened by a Woozle.
Sunday, May 29, 2005
EMBL selection process
Before going to EMBL, I somehow managed to find a post about the 2004 EMBL predoc selection, as I was curious how the EMBL selection week would work and what I could expect. In case someone is in the same position next year, here’s what I experienced at both EBI and EMBL:
At first, there are presentations by each group leader about their work. Most likely you’ll find that many of them aren’t a good match for you. You’ll also find out only then who is actually offering a position. Afterwards you see each group leader. The one-to-one interviews with the group leaders were mostly informal, and you have the chance to ask them questions. Some have prepared questions to you, many don’t. The questions asked on the panel interview varied a lot. I got away with four or five fairly easy questions, while others had to answer more and tougher questions. This might be because I’ve studied computer science, so they might expect more from a biologist…
The time in Cambridge and Heidelberg was fun. You have a lot of waiting, at EMBL more than at EBI. It depends how lucky you are with your schedule. I had one day off completely in Heidelberg, because I only applied to one program.
Also, the dress code is pretty informal. Don’t bring a suit. I did, but never used it.