ano.malo.us pretty typical actually..

few from flickr piro2008-18piro2008-17piro2008-16piro2008-15piro2008-14piro2008-13piro2008-12piro2008-11

Me and other people

     

Me:

I was recently introduced to the world of QR codes thanks to my new Android phone. They’re 2D barcodes that can be used for more than just identifying products — they can contain URL, phone numbers, contact information and lots more.  I can scan a QR code (on the web, on paper, on the TV) with my phone and it’ll offer to add a contact to my phone, open a URL in the browser, let me call a number or add an event to my calendar depending on what’s in the code.  The QR code on the left is my contact card, the one on the right is a colored version that also works. Scan either one using an appropriate application on your phone and it’ll offer to add me as a contact with my name, email, url and phone number. Much easier than typing it and offers nicer aesthetics.

Others:

Turns out I’m not the only anomalous on the net, there’s also http://an.omalo.us/ and since he’s my lexical neighbor (his words), I’m giving him some PageRank props here.

105 Ghz for $8.40

I haven’t posted in months and noticed that my last post was just me bragging about having access to a 13 node XGrid… so, to restart the blog on the same theme, I can now boast about using a 105 Ghz cluster for only $8.40 an hour.

My bayesian network software, pebl, can use Amazon’s EC2 cloud computing platform to create ad-hoc clusters, run code on them and then terminate them once finished. I needed to do some bootstrap learning for a project but it would’ve taken hundreds of hours on my lab desktop and our XGrid was busy. Being prone to both procrastination and impatience, I decided to use Amazon and was able to run my code within a day for only $55. That’s peanuts compared to the amount spent to generate the data I’m analyzing (tens of thousands of dollars) or required to buy and maintain your own cluster (again, tens of thousands).

But the coolest part:
With the current results, I can calculate p-values with three significant digits but I can quote exactly how much it would cost to get additional significant digits!

I think cloud computing will become a big part of scientific computing in the near future, especially for small labs or students who want to test out a hunch without writing up a formal grant. I’ve created an open source project, anyCloud, to take some of this code from pebl and make it more generally applicable for any python code. It’s in a very early stage but if you’re interested in helping out, I’d appreciate it.

130 GHz!

I know it’s not a big deal and I use this grid all the time, but it never fails to amaze me how much computational power we have at our disposal sometimes.

Rainbow Lights

I’m having too much fun with this Radiohead stuff. Made another late-night attempt thanks to a certain Fat Weasel (you Trader Joe’s fans know what I’m talking about). YouTube’s compression deteriorates the quality quite a bit but the original is over 500MB. Anyway, here’s the Youtube video:

And here are some screencaps from the full, uncompressed video:



House of Shader

Using NodeBox to visualize the Radiohead House of Cards data was fun but NodeBox proved to be too slow on my laptop (I think CoreGraphics has moved onto Intel while I’m stuck at G4)… so I decided to download Processing and give it a whirl.

I tried creating a smooth shader-like look by using ellipses to render the data points and faking Gaussian smoothing by hackishly using multiple ellipses with varying Alpha levels. Looks decent but not too exciting.

The jerkiness and unnatural movement of the ear are due to the intentional noise added to the dataset by the creators and not an effect of the motion capture technology (as explained here).

Gotta admit, I do like Processing… even though it makes me use curly braces. It was easy to learn quickly (same concept as NodeBox and other procedural art environments) and the use of Java didn’t get in my way too much.

Radiohead + Google + Python

Radiohead (cool) collaborated with Google (cool) to create a music video using lasers (cool) and 3D scanning devices (cool) instead of cameras and then released some of the resulting data under a CC-license (cool) and put it up on Google Code (cool) to let the internets muck around with it (cool). With so much awesomeness, how could I possibly go to bed?

The Google Code site for the project includes data as CSV files with x,y,z and intensity per data point and some source code for the Processing environment. The data points are actually much denser than the Radiohead video’s style implies, making possible all kinds of visualization. I haven’t used Processing before but have experimented with NodeBox and since the data files are simple text files, I had no problems writing a quick script to render the data. Even a simple 2D grayscale scatterplot looks good without any interpolation or smoothing.

Keep in mind that no regular cameras were used in capturing this and the data is in 3D and just begging for being imported into a proper modeling application. I tried making an animation but the poor laptop can’t handle it and the xgrid is working on some data.. and it’s for lab work anyway, right? ;)

Backup Woes

Few years ago, my laptop was stolen from my bedroom in a house less than a block from the police station. Since then, I’ve been very good about backing up work-related stuff.. but have been more lax about music, pictures and other large files.

Fast forward to last week: I dropped off my laptop at the Apple store to have the LCD cable replaced. Due to way Apple’s flatrate servicing works, they not only replaced the cable but also the aging hardrive and returned my laptop with a fresh install of Leopard minus all my files. Even though I hadn’t had any problems with the drive and wasn’t expecting it to be replaced (my request was only for the LCD cable), I had asked our department sysadmin to backup my entire harddrive in case the laptop was lost or damaged during shipping.

So when I got my laptop without all my files, I was frustrated with Apple for neither copying over my files nor contacting me before erasing them, but I wasn’t worried. I patted myself on the back for having a good automated backup strategy for work files and for being proactive enough to backup the entire drive before sending in the laptop. At worst, I thought, it would cost me an extra day without my laptop. Earlier today, I learned that the external drive used by our department sysadmin had failed. I had lost all music and photos. I don’t care much about the music but I had many photos I cared about. I panicked and rummaged through all my CDs and DVDs and looked through all the old folders on the external drive.

Luckily, last month, I was playing with Adobe Lightroom and had imported all of my iPhoto pics to it and tested its backup feature with my external drive.. so I was able to recover all photos more than a month old. I have no mp3s but there’s a box full of old CDs under my desk that I could reacquaint myself with (late nineties, here I come!).

So, remember kids, backup your files.. and backup your backups.

ps. I fully expect to make a post in a couple of months about how I’m glad I survived the fire/tornado/whatever but really wished that I had used some off-site backups.

New Camera: Olympus E-510

I finally succumbed to the DSLR craze and bought myself an Olympus E-510 dual-lens kit. I bought it when I saw a great deal ($475 for body plus two lenses) and then spent the next couple weeks researching (justifying?) the purchase. It’s not a Canon or Nikon and it has a smaller sensor but makes up for it in loads of features and quite-decent kit lenses. Other than the low-light performance, I’m very pleased with it.. although as a noob, I would’ve been pleased with any of the existing entry-level DSLRs.

I’m going to try to focus on taking pictures rather than talking shop about camera equipment… and so, here are three pics taken in the first couple weeks of owning the camera. The colors look different in Firefox and Safari and after playing with colorspaces for an hour, I’m giving up.. so, they’ll look best in Safari and a little washed-out in Firefox.

Spring Gallup Park Bruce: hear him roar!

India, Baby!

For the next three weeks, I will have to adjust from living in

weather-aa.png

to

weather-mumbai.png

Directory Bookmarks

After typing cd /Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages/ for the hundredth time, I decided there had to be a better way. Even with tab completion, it’s a pain to access deeply-nested directories. I know about cdargs but it’s not very flexible and doesn’t work with regular bash commands like cd, cp, mv, etc..

I wrote up a couple of bash functions that save directory bookmarks to a file and make them available as environment variables. To install, download dirmarks.sh and source it from .bashrc or .bash_profile.

Once installed, use mark bookmark_name to save a bookmark for the current directory and use lsmarks search_term to see/grep the list of saved bookmarks. You can then use the bookmark like any other environment variable: cd $bookmark or cat $bookmark/file.txt. The bookmarks are saved in ~/.dirmarks.

The following example usage should clarify what my words have confused:

# lsmarks with any arguments
$ lsmarks
bubble  "/Users/shahad/projects/tg_apps/bubble"
docs    "/Users/shahad/projects/docs"
pebl    "/Users/shahad/projects/pebl"
py      "/Library/Frameworks/Python.framework/Versions/Current"
pybin   "/Library/Frameworks/Python.framework/Versions/Current/bin"
pylibs  "/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages"
 
# lsmarks with search term
$ lsmarks py
py      "/Library/Frameworks/Python.framework/Versions/Current"
pybin   "/Library/Frameworks/Python.framework/Versions/Current/bin"
pylibs  "/Library/Frameworks/Python.framework/Versions/Current/lib/python2.5/site-packages"
 
# using a directory bookmark
$ cd $bubble
$ pwd
/Users/shahad/projects/tg_apps/bubble
 
# adding a directory bookmark
$ cd bubble/static/images
$ mark bubble_img
Adding bookmark bubble_img --> "/Users/shahad/projects/tg_apps/bubble/bubble/static/images"
 
# look ma, the new bookmark has been added!
$ lsmarks bubble
bubble      "/Users/shahad/projects/tg_apps/bubble"
bubble_img  "/Users/shahad/projects/tg_apps/bubble/bubble/static/images"
 
# directories with spaces in the name
$ cd /Users/shahad/Library/Application\ Support/
$ mark appsu
Adding bookmark appsu --> "/Users/shahad/Library/Application Support"
 
# trying to use bookmark as normal.. fails :(
$ cd ~
$ cd $appsu
-bash: cd: /Users/shahad/Library/Application: Not a directory
 
# we have to enclose the dir bookmark in quotes.
$ cd "$appsu"
$ pwd 
/Users/shahad/Library/Application Support

Note that if a directory has spaces in its name, you have to enclose the bookmark name in quotes. I can’t find a way around this requirement that works on my mac. If anyone has suggestions, I would appreciate them.

← Before