Weather yesterday turned to a very Mancunian-style rain, so our days in Kanazawa feel a bit sad.
I love tatami rooms, I want one in my next house.
(oh, and the japanese keyboard is hell.)
Weather yesterday turned to a very Mancunian-style rain, so our days in Kanazawa feel a bit sad.
I love tatami rooms, I want one in my next house.
(oh, and the japanese keyboard is hell.)
Konban-wa!
We've been in Japan for just five days but it feels like we've packed in a lot, mainly thanks to my wife's perfect organization, I mainly stroll around carrying bags and saying "Oishi-ne", "lovely food"!
We spent the first few days in Tokyo, breathing in modern Japan, with skyscraping malls "bolted on" the immense train stations. People in every directions, but everything flows so smoothly, and it's so incredibly clean everywhere, I have no idea how they do it. It's "organized delirium" to a level Europeans cannot really comprehend, I think.
We are now in Kyoto, the "old capital", ready for a smorgasbord of "classical Japanese style" (temples, castles, Zen gardens etc), then we'll hit the road to see some rural areas in the northern mountains before going back to Tokyo for the final souvenir-shopping experience.
"Unfortunately", the food here is so good that I won't be able to lose any weight during this trip. Well, too bad, eh ;)
I recently started dabbling in shares (yeah, I know, I like swimming against the flow), and so I looked around for good stock-price trackers for KDE3. To my surprise, I couldn't find anything apart from the usual KMyMoney (which I like and use, but it's not really something you can keep open all day on your desktop). I had already put my stock info on Google Finance, and lo, the service has a GData API, so I decided to write a small script in Python to retrieve my portfolio and the daily variations.
The good thing about GData APIs is that they are all the same at a basic level, so even when client libraries don't explicitly expose new features (like in this case, as Finance is quite a new service), you can still use the APIs to get easy authentication and feed-parsing. So I went and downloaded the official (and excellent) gdata-python-client package, which is dead-easy to use:
from gdata.service import GDataService client = GDataService() client.email = 'your_email@gmail.com' client.password = 'your_password' client.service = 'finance' client.ProgrammaticLogin() baseURL = "http://finance.google.com/finance/feeds/%(email)s/" % {'email':client.email} # to get all data in one go: # bigFeed = client.GetFeed(baseURL + "portfolios?positions=true&returns=true") # and then positionsFeed is included in each Entry # positionsFeed = gdata.GDataFeedFromString(bigfeed.entry[0].FindExtensions('feedLink')[0].children[0].ToString()) # ... but I really just want the first portfolio positionsFeed = client.GetFeed(baseURL + "portfolios/1/positions?returns=true") for entry in positionsFeed.entry: details = entry.FindExtensions('symbol')[0] symbol = details.attributes['symbol'] name = details.attributes['fullName'] data = entry.FindExtensions('positionData')[0] totalReturn = round(float(data.attributes['returnOverall']) * 100,2) gainPerc = round(float(data.attributes['gainPercentage']) * 100,2) print name + " (" + symbol + ") Return: " + str(totalReturn) + "% - Gain: " + str(gainPerc) + "%"
One should really make an applet or something for KDE, but I'm leaving for Japan in about six hours so I can't be bothered...
I wanted to try out the newly-released 2.6 version of our beloved Python, but unfortunately Debian didn't have a package for it yet (and it still doesn't). I wasn't too afraid of screwing up my laptop, as it's probably going to be formatted very soon anyway, and I didn't want to mess around with deb build scripts, so this is what I've done:
First impressions: 2.6 seems fast as hell. I don't know if this is due to the custom compilation though, rather than improvements in the runtime.
A man travels the world over in search of what he needs and returns home to find it. -- George Moore
Apologies for not posting much recently. It so happens that I was posted to Egypt for a few weeks (what a crazy place), and in a few days I'll be on a plane to Tokyo (purely for pleasure, this time). Despite the lovely Egyptian hospitality, I came back from Cairo with a tonsillitis (ouch), let's hope Japan will be less troublesome.