Author Archives

Did wordpress upgrade destroy all your unicode posts ?

I upgraded wordpress software for this blog to version 2.5.2. After that none of the posts that had devanagari (unicode) text looked okay. After comparing the configuration files, I discovered that the troubling variable is DB_CHARSET. The default config setting is ‘utf8′. But if you have been updating the software versions, your database table is [...]

Google jumps into custom hosted application bandwagon!

Google has launched appengine which provides developers with a platform SDK (python based!) and hosting with access to own Google BigTable database! This competes with Amazon.com’s SQS , S3 (storage) and EC2 (hosting) services which are used by many startups… The applications will get google’s massively scalable infrastructure, failover. Apps would also be able [...]

Book updates

Finished the following books:
Great book on investing! Very easy to read and short too! Joel Greenblatt describes a “magic formula” to rank stocks (based on two criteria: Return on Assets and Earnings yield (reverse of P/E!), rank stocks with higher numbers for both. Add the two ranks and rerank based on sum of the [...]

Books: Two Travelogues

One fictional:

The other factual:

Seminar: Morgan Dene Oliver - CEO OliverMcMillan

Today’s speaker was Morgan Dene Oliver who is a CEO of OliverMcMillan, a real estate development and management firm. While his projector was getting fixed, he started by doing some show-of-hands about who in the audience:
1. believes “Art and Design” are essential for their future success ? (Many hands went up)
2. believes they are left [...]

Seminar: Leo Spiegel - Mission Ventures

This was the first professional seminar. Leo Spiegel is a managing partner with Mission Ventures, a hi-tech venture capital firm. Leo has been a president of Digital Island, CEO of Sandpiper Networks. He is also a member of Dean’s advisory Council of Rady School of Management, UCSD.
This was an interesting and engaging presentation about [...]

Seminar: John Mutch - MV Advisors

John Mutch has been a CEO of HNC software and was appointed the CEO of Peregrine Systems by Federal Bankruptcy court. He took Peregrine Systems from bankruptcy condition to the price tag of $425 millions (HP was the buyer). Since then he started a MV Advisors, an “Activist hedge fund”.
What is an Activist Hedge Fund [...]

Quick tip - how to extract audio from youtube videos

Here is a quick tip for extracting audio from youtube videos. I assume you have a reasonably recent linux distribution. (Things might work on other operating systems as well as all the applications that I mention below are ported to other operating systems)
Step 1: Download the flash video file from youtube. Either use greasemonkey script [...]

Some excel functions

I keep forgetting some of the functions in excel and it is embarrassing to search for the same things every time.
PERMUT(n, r) = nPr = n! / (n - r)!
COMBIN(n, r) = nCr = n!/((n-r)!r!)
FACT(n) = n! = 1*2*3*…*n
BINOMDIST(s, n, p, cumul) Probability that there will be exactly s successes in n trials, each [...]

श्री गणपती आरती

ध्वनी मुद्रित
सुखकर्ता दुखहर्ता वार्ता विघ्नांची
नुरवी पुरवी प्रेम कृपा जयाची |
सर्वांगी सुंदर उटी शेंदुराची,
कंठी झळके माळ मुक्ताफळांची॥१॥
जय देव जय देव जय मंगलमूर्ती|
दर्शनमात्रे मनकामना पुरती ॥धृ॥
रत्नखचित फरा तुज गौरीकुमरा|
चंदनाची उटी कुमकुम केशरा|
हिरेजडित मुकुट शोभतो बरा |
रुणझुणती नूपुरे चरणी घागरिया|
जय देव जय देव जय मंगलमूर्ती ॥२॥
लंबोदर पीतांबर फणिवरबंधना |
सरळ सोंड वक्रतुंड त्रिनयना|
दास रामाचा वाट पाहे सदना|
संकटी [...]

django unicode integration: fix for venus djando template

I just upgraded django tree which recently merged in the unicode support. This immediately broke django templates for venus. Here is what you need to change in planet/shell/dj.py to account for new django changes:
43c43,46
< f.write(t.render(context))
---
> ss = t.render(context)
> if [...]

आसमाँ के पार (Aasamaan ke paar - Rockford)

A beautiful song composed by Shankar-Ehsaan-Loy and sung by Shankar Mahadevan.
Lyrics by Gulzar
सन सना ता रा रे रारा सन सना
आसमाँ के पार शायद और कोई और आसमाँ होगा
बादलों के परबतों पर कोई बारिश का मकाँ होगा
ओ… मैं हवा के परों पे कहाँ जा रहा हूँ कहाँ
कभी उडता हुवा कभी मुडता हुवा मेरा रास्ता चला
ओ हो [...]

django queryset weirdness

I needed to reset the django admin password and found this page which tells us how to do this. It did not work for me, however I tried to get the user object explicitly, reset the password and save it and it worked!
Here is a session describing the behavior:

> python manage.py shell
In [1]: from django.contrib.auth.models [...]

Using Ruby for integer format conversions

Here are some recipes for interpreting stream of bytes as different C types. I will keep adding more to this as I go…
Convert a byte stream (embedded in a string) into 1 byte signed integers:
“\xfc\xfd\xfe\xff”.unpack(”c*”)
=> [-4, -3, -2, -1]
Convert a byte stream (embedded in a string) into 1 byte unsigned integers:
“\xfc\xfd\xfe\xff”.unpack(”C*”)
=> [252, 253, 254, 255]

Rescuing hosed server

This post describes the steps that I took to restore an old server which had died some months back.
I had a linux server running debian pretty reliably. It had failed because of a hardware problems (broken power supply). I replaced the power supply and proceeded to make it current with security fixes. But as it [...]