Friday, August 26, 2011

Why Anna's Fast is Famous and Sharmila's Fast Still Finding the Grounds



The recent fast by Anna Hazare in Delhi at Ramlila Maidan has found the massive support. Also called second freedom struggle, August Kranti and other names by various media; the movement has gathered unprecedented momentum.

All over the country people are organizing processions, human chains and protests in whatever way they can. The so called middle class or salaried class which is considered politically dormant has come up openly to support the movement.

Any fast would be compared to the ten year plus fast by Irom Chanu Sharmila of Manipur. She is fasting for the repeal of AFSPA from North-eastern (NE) states of India. Critics have drawn flak over negligible support for Sharmila in other parts of India. Her demands are graver and her fast so long that it has passed any standard benchmarks of fasting. The debate will continue, however the reasons for little support for Sharmila's cause and massive support for Anna's need to be pondered:

Communication With Masses: She is being kept in judicial custody. This has cut her from the public contact and the media. While Anna is in continuous communication with media. Team Anna even appeared on reality and competitive shows on TV which are watched by masses.


Specific Cause: Her demand for repeal of ASFPA which is applicable NE states goes unnoticed as it hasn't affected the masses in India. Its sad but true that masses do not connect to Sharmila's cause.

Lack of Proposed Solution: Anna proposes a solution to corruption as Jan Lokpal. Repeal of AFSPA is a very legitimate demand. However Sharmila's demand doesn't put a solution about how the insurgency and extortion happening in NE states should be tackled.

AFSPA: This is a vicious circle. People cannot come out in support of Sharmila like they have come out for Anna. Forces can simply disrupt any protest without the need of a reason.

Team Anna: Anna is surrounded by able and experienced people who are capable of handling various aspects of mass protest. Kiran Bedi, Arvind Kejriwal, Prashant Bhusan, Shanti Bhushan, Santosh Hegde etc. have managed the various aspects of the movement like [see this]. Their insight and knowledge about working of government, police, media and law kept the authorities at bay . The protest went like clockwork as if all steps were already well planned and considered heavily. Remember how  protest by Baba Ramdev went haywire.


Friday, July 22, 2011

Found the distant tower at last

You can see the tower in the red circle below, visible from IIT Guwahati:


 And here I found it:



And it tool me these broken stairs to reach to it:


Similarities between IIT Guwahati and Hogwarts

1. Both have lakes, hills and variety of flora and fauna, making the walks in the campus pleasurable.

2. The headmaster in Hogwarts and the director in IIT are revered by many and also hated by many. Both are kind to students.

3. The ministry in the magical world and MHRD in India both interfere in the respective institutes a lot, sometimes with comments in newspapers and sometimes with policy changes.

4. Students in Hogwarts searched for secrets passages to get out of the castle. Students at IIT fish for loopholes in computer network to download movies and do other stuff.

5. Hogwarts has houses. IIT has hostels  much to similar effect. Competition in high during annual festivals in both.

6. The best one -- while the outside world thinks that students are doing magic or making up cool stuff, they are just scrapping through the syllabus to get the grades.

Wednesday, May 18, 2011

the Boy With the Lamp




 Once a wise man wandering in the jungle saw a boy carrying a lamp. The wise man stopped the boy and asked, "Do you know where the light is coming from?"

The boy blew away the lamp and asked the wise man, "Do you know where the light has gone?"

Monday, March 14, 2011

Flattening abitrarily nested lists in Python

Lists are one of the three most important data structures in Python, other being dict and str, (tuple is the younger cousin  of list). The lists can be arbitrarily nested with any kind of data inside them, e.g.

['a', [1, 2], (3, 4, 5, [7, 8, ['gnu', 'linux']]), ['a', 'b', 'c'], [['d', 'e', 'f'], 12, [13, [14, [15,]]]]]


The objective is flatten nested lists of this kind to a single list. It can be simply stated as to remove all square brackets (and parenthesis) and retain only square brackets at the end, while maintaining the order of the items as they appear in the nested list. One of the simple solution can be:

def flatten(l):
    '''Flatten a arbitrarily nested lists and return the result as a single list.
    '''
    ret = []
    for i in l:
        if isinstance(i, list) or isinstance(i, tuple):
            ret.extend(flatten(i))
        else:
            ret.append(i)
    return ret


Run this on the example and you get:

['a', 1, 2, 3, 4, 5, 7, 8, 'gnu', 'linux', 'a', 'b', 'c', 'd', 'e', 'f', 12, 13, 14, 15]


Can this be made more Pythonic and efficient. Any ides?

Tuesday, December 14, 2010

mplayer: volume trick

When you want to view a movie or listen to a song which has a squeaky audio the easy option is to use VLC player to set the volume to the max of 400%.

MPlayer by default gives no option for the volume boost. However you can simply make the volume go to any level you want. You just need to set the following options in the ~/.mplayer/config file or the config file in the mplayer install directory on Windows:

softvol=yes
softvol-max=400

Here 400 signifies that maximum volume can be 400%. You can specify any value for this so have custom control over maximum value of the volume.