What is a JSON feed? Learn more

JSON Feed Viewer

Browse through the showcased feeds, or enter a feed URL below.

Now supporting RSS and Atom feeds thanks to Andrew Chilton's feed2json.org service

CURRENT FEED

arnabocean

Arnab Gupta's personal website. Engineering Research Scientist; Photographer, Blogger, Tech Enthusiast.

A feed by Arnab Gupta

JSON


Multi-core parallel processing in Python with multiple arguments

Permalink - Posted on 2020-10-02 04:00

I recently had need for using parallel processing in Python. Parallel processing is very useful when:

  • you have a large set of data that you want to (or are able to) process as separate ‘chunks’.
  • you want to perform an identical process on each individual chunk (i.e. the basic code running on each chunk is the same). Of course, each chunk may have its own corresponding parameter requirements.
  • the order in which each chunk is processed is not important, i.e. the output result from one chunk does not affect the processing of a subsequent chunk.

Under these conditions, if you are working on a multi-core computer (which I think is true for virtually all of us), you can set up your code to run parallelly using several or all of your computer’s cores. Using multiple cores is of paramount importance in order to gain any improvement in computation time. If you attempt such parallel processing on a single core, the computer will simply switch between separate computational threads on that single core, and the total computation time will remain constant (in fact, more likely the total time will increase because of the incessant switching between threads).


Anyhow, there are several methods of achieving multi-core parallel processing in Python. In this post, I will describe what I think is the simplest method to implement. This is the method I chose, and with whose results I am quite happy.

Additionally, most examples online that go over implementing parallel processing never mention how to handle multiple input arguments separate from the iteration parameter. There are several methods of including that too, and I will also describe what I think is the simplest method to implement and maintain.

Say, you have the following code setup:

arg1 = val1
arg2 = [val2, val3]
arg3 = ['val4', 'val5']
fileslist = ['list', 'of', 'files', 'that', 'are', 'to', 'be', 'processed']

for file in fileslist:
    print('Start: {}'.format(file))
    # perform a task with arg1
    # perform a task with arg2
    # print something with arg3
    # save some data to disk
    print('Status Update based on {}'.format(file))

Now, for parallel processing, the target is to convert the for loop into a parallel process controller, which will ‘assign’ file values from fileslist to available cores.

To achieve this, there are two steps we need to perform. First, convert the contents of your for loop into a separate function that can be called. In case of parallel processing, this function is only allowed one argument. Set up your function accordingly, planning that this single argument will be a tuple of variables. One of these variables will be the iteration variable, in our case file, and the rest will be the remaining variables required.

def loopfunc(argstuple):
    file = argstuple[0]
    arg1 = argstuple[1]
    arg2 = argstuple[2]
    arg3 = argstuple[3]
    print('Start: {}'.format(file))
    # perform a task with arg1
    # perform a task with arg2
    # print something with arg3
    # save some data to disk
    return 'Status Update based on {}'.format(file)

Second, update the main code structure to enable multi-core processing. We will be using the module concurrent.futures. Let’s see the updated code first, before I explain what is happening.

import concurrent.futures

arg1 = val1
arg2 = [val2, val3]
arg3 = ['val4', 'val5']
fileslist = ['list', 'of', 'files', 'that', 'are', 'to', 'be', 'processed']

argslist = ((file, arg1, arg2, arg3) for file in fileslist)
with concurrent.futures.ProcessPoolExecutor() as executor:
    results = executor.map(loopfunc, argslist)

    for rs in results:
        print(rs)

OK, now let’s go over it. The with ... line invokes the parallel processing tool which creates the executor object. In the next line, executor.map() is used to provide two pieces of information: (a) what function is to be repeatedly executed, and (b) a tuple of arguments that need to be passed for each function execution. Notice that when calling executor.map(), we are providing loopfunc as an object, and are not attempting to execute the function itself via loopfunc().

Now, argslist is meant to be a tuple containing arguments for all iterations of loopfunc, i.e. len(argslist) = len(fileslist). However, in our case, only the fileslist variable is iterated over, while other arguments are provided ‘as-is’. The workaround for this is to use list-comprehension (err… I mean tuple-comprehension) to generate a new variable (in our case argslist) that contains all relevant arguments for each function iteration.

In this way, the first process is created with loopfunc( (fileslist[0], arg1, arg2, arg3) ), the second process is created with loopfunc( (fileslist[1], arg1, arg2, arg3) ), and so on. Of course, within loopfunc(), we have already converted the input single argument into multiple arguments as we need.

Values return-ed from loopfunc() are stored in the variable results, which is looped over to print out each value. The fun behavior here is that each rs item is executed as that value becomes available, i.e. when each process completes. For example, if you’re running on a 4-core machine, output from the code can look like the following, depending upon the speed of execution of each iteration:

Start: fileslist[0]
Start: fileslist[1]
Start: fileslist[2]
Start: fileslist[3]
Status Update based on fileslist[0]
Status Update based on fileslist[1] 
Start: fileslist[4]
Start: fileslist[5]
Status Update based on fileslist[2] 
Start: fileslist[6]
Status Update based on fileslist[3] 
Start: fileslist[7]
...

Without any arguments, ProcessPoolExecutor() creates as many processes as there are cores on your computer. This is great if you want to run your code and walk away for a few hours, letting your Python script take over your whole computational capability. However, if you only want to allow a specific number of processes, you can use ProcessPoolExecutor(max_workers=nproc), where nproc is the number of processes you want to simultaneously allow at most.

To-do

In my current implementation I have used the above method to work on ‘chunks’ of data and then saved the resultant output with appropriate markers to disk. However, another way to implement parallel processing would be to take the output from each iteration, and save it as an element in an array, at the correct array index.

This should not be hard to do, all I should need is to return both the output data and the correct marker for the array index. I just haven’t done it (nor needed to do it) yet. I actually prefer saving the output from each chunk to disk separately, if possible, so that even if something crashes (or the power goes out, or whatever) and the process is interrupted, I won’t lose all progress made until then.


The state of dysfunction in the Indian Congress Party

Permalink - Posted on 2020-09-10 04:00

A series of news items appeared recently in relation to the Congress party of India. While the news reporting went largely without comment (or with usual snark from their political opponents), to me, they brought to sharp focus the extent of dysfunction and rot within the party.

First, leading up to a Congress Working Committee (CWC) meeting, some senior party members wrote to the “interim” Congress President, Sonia Gandhi. (Remember, she became interim President after her son, Rahul Gandhi, resigned from the post. Before Rahul, the very same Sonia was President.) Here is the gist of the demands in the letter, including the following:

It calls for a “full time and effective leadership” which is both “visible” and “active” in the field; elections to the CWC; and the urgent establishment of an “institutional leadership mechanism” to “collectively” guide the party’s revival.

OK, so this is in effect a serious criticism, from senior members of the party, that some changes are required going forward. So, what happened next? Rahul Gandhi’s response was to criticize the timing of the letter, since this is a time of weakness for Congress and his mother was in hospital:

Early in the Congress Working Committee meeting that went on for seven hours, Rahul Gandhi questioned why the 23 top leaders had written a letter attacking the Congress when it was at its weakest, when it was battling crises in Madhya Pradesh and Rajasthan and when the Congress president (his mother Sonia Gandhi) was in hospital.

If you’re wondering about the seriousness of this critique, it was serious enough for the conversation to completely pivot:

The veteran leader [senior Congress member Ghulam Nabi Azad], a Rajya Sabha member, said he had called and checked with Sonia Gandhi’s private secretary twice before sending the letter. “I was told that she is in hospital for a routine check-up. Still, we waited till she was back home before sending the letter,” Mr Azad told NDTV.

Sonia Gandhi, who was admitted to hospital late last month, was discharged in the beginning of August.

He [Azad] said the Congress chief called a few days later and said she could not respond to the letter because of her poor health.

I told Soniaji, your health is paramount, all else can wait,” said Mr Azad. He claimed that Rahul Gandhi heard him out and was “satisfied” with the response.

Two things. First, is Rahul suggesting that Sonia is too ill to discharge her duties as President? Then why is she still holding the post?! This is a professional organization, where office-holders have duties and responsibilities… such as dealing with grievances of senior members of the organization! Second, if Sonia’s illness was a temporary matter, why is there not a chain of command in place?! It is perfectly natural for any single individual to occasionally be “off-duty”, so to say, due to either illness, or personal commitments, or vacations, or myriad other reasons. Any coherent organization should have a command structure where such absences are planned for! If Sonia is ill and unavailable, that should NOT mean that normal operations cease; it should only mean that someone else accepts the letter and follows an established protocol.

Next, at the CWC meeting itself, this was quoted to Sonia Gandhi regarding the ‘dissenters’:

Sonia Gandhi reportedly said in her closing remarks that she held “no ill-will” towards anyone in the party, a remark intended at the dissent-letter writers. “I am hurt but they are my colleagues, bygones are bygones, let us work together,” she said, ending the Congress Working Committee (CWC) meeting on a note of conciliation.

Does this seem to come from an organization of equals? Or does this seem to originate from a king/queen ruling over his/her subjects? How does it matter if Sonia Gandhi holds ill-will for the letter? Why does it matter? Again, this is a professional organization, where senior members are suggesting changes going forward for what they think is the benefit of the party. Why is Sonia Gandhi “hurt”? Because she was criticized? Does she consider herself above criticism? “Let us work together? Bygones are bygones?” YOU, Sonia Gandhi, and your son, are the ones throwing a tantrum! Your senior members were the reasonable adults coming to you with proposed changes going forward that might benefit the party!

You know what I think the problem was? Maybe Sonia and Rahul were not entirely convinced that ‘benefit of the party’ and ‘benefit of the power dynamics of the Nehru-Gandhi dynasty’ were well aligned. At the CWC, it was decided that elections for the next “full time” president would be held within six months. Remember that the last president, Rahul Gandhi, resigned after the last election where their political opponents basically humiliated them. Already, quotes like this:

The Congress” Assam unit on Monday said that it wants senior leader Rahul Gandhi as the party”s national president as soon as the interim chief Sonia Gandhi demits the office.

and this:

[I]t is imperative that the party should be led by Gandhi family. I humbly request you to continue as the President of All India Congress Committee, and if you feel that your health may not permit for full-fledged dedication, I urge you to convince Shri Rahul Gandhi to take up the position.

have started to appear. Would you take a bet on Rahul Gandhi not being the next Congress President, again? I wouldn’t.

What I wrote in my post on India’s Independence Day, in criticism of the current government of India, applies equally well to the party in government opposition. If, instead of performing their duty of providing strong, thoughtful rebuttal of the government’s policies, the main opposition is worried about controlling their internal power dynamics, and especially about keeping power within a dynastic family, then that bodes terribly for the country as a whole.

Where are the Congress’ ideas for India? For all that we criticize the Indian government, if an election were to be held today, who is providing an alternative narrative that citizens can latch on to and organize around? What does Congress think India should do in the next 10, or 20, or 50 years? Does it have any opinion as an organization? The current Indian government came to power on the heels of 10 years of Congress led government— after massive corruption and malfeasance, but also with BJP fanning the flames of criticism, and equally importantly, providing an alternative vision and path forward. (This was, of course, in 2014. The 2019 campaign was a different matter.)

It seems to me like Congress today is missing vision, missing organization— and perhaps even missing a pulse. It seems to me like the senior Congress members are very, very right.


India’s Independence Day

Permalink - Posted on 2020-08-15 04:00

Happy Independence Day, India. In addition to celebrating, maybe it’s time for some introspection too! Let’s not forget where we came from, but let’s focus on where we want to be going.

We are a relatively young democracy, still in our growing years. As such, let’s not allow the selfish, petulant adolescents amongst us to dictate our lives and our future. If we let the misguided and sinister make our decisions, we risk letting them destabilize a fine balance.

I am choosing to do X because some people I dislike did Y some time ago, and X will hurt those people” is middle school mentality, and should not be the basis for a government’s decision making. The answer to “why are we doing this?” has to be “this is how it helps us in the next 30 years”, not “this is what our opponents did in the last 30 years”. (Yes, people outside the government will engage in all manner of shenanigans. That’s the privilege of not being in power.)

It is petulant, selfish behavior to pursue short term gratification at the cost of harm to self and others, even more so in times of a pandemic. It cannot be acceptable for the leader of the central and a state government to ignore social distancing and in fact hold an event with people all around. If that’s the example they set, what message do they send to their constituents looking for leadership? This is callous and outrageous.

It is also outrageous for the head of a government to participate in any religious ceremony in their official capacity. Of course, if they want to take a day off, and pursue their religion as private citizens, that is agreeable, whatever religion they want to pursue. As official government representatives, they can and should attend all manner of ceremonies, from all communities, not just their own.

Patriotism Comic

Comic by @SanitaryPanels.

We are as yet a young democracy. It hasn’t been long enough for us as a country to forget what it took to gain independence. It hasn’t been long enough for us to forget, or worse—ignore, the principles and ideas on which India was founded. We are a unique, complex, multi-cultural, blended pool of humanity, requiring active effort to build and keep harmony. If we are to be united, we have to refrain from being communal, we have to resist our entrenched judgments of our neighbors, we have to rise up in support of those who cannot speak for themselves.

Usually, we are supposed to look to our government, as our representatives, to uphold these values, and hold us together as a nation. If — when — they fail to do so, it is up to us to unite, resist, and rise up against the government too.


☞ Human evolution and the role of our grandmothers

Permalink - Posted on 2020-08-03 04:00

From the archives, this article from NPR sheds fascinating light on the role of our grandmothers in human evolution. For example, Dr. Kristen Hawkes at the University of Utah follows modern hunter-gatherer tribes to understand how our ancestors might have lived.

Over many extended field visits, Hawkes and her colleagues kept track of how much food a wide sample of Hadza community members were bringing home. She says that when they tracked the success rates of individual men, “they almost always failed to get a big animal.” They found that the average hunter went out pretty much every day and was successful on exactly 3.4 percent of those excursions. That meant that, in this society at least, the hunting hypothesis seemed way off the mark. If people here were depending on wild meat to survive, they would starve.

So if dad wasn’t bringing home the bacon, who was? After spending a lot of time with the women on their daily foraging trips, the researchers were surprised to discover that the women, both young and old, were providing the majority of calories to their families and group-mates.

A Hazda woman digs for tubers with a digging stick.

A Hazda woman digs for tubers with a digging stick. (copyright NPR/Nigel Pavitt/Getty Images/AWL Images).

As we learn more, we are coming to realize that our strong relations with our grandparents is not just a weird (and lucky!) quirk of our evolution, but quite necessary to our anthropological journey to our present.

For starters, not all animals have ‘grandparents’, i.e. ‘elders’ living long past their reproductive age, in the first place. Humans (and other great apes), whales and elephants are a small minority of those with societal grandparents. Even among humans, having grandparents may be a more recent development than we think.

This NPR article provides a great perspective from several researchers. We were surely hunter gatherers in our evolutionary past, but it turns out that how our hunting and gathering occurred is way more complex than the men hunted and fed their families.

If you’re following Dr. Hawkes’ work, you might be interested in this podcast that she appeared on at The Insight.

|


☞ Pregnant elephant tortured to death in India: it was fed a pineapple stuffed with firecrackers.

Permalink - Posted on 2020-06-02 04:00

I am appalled to admit that the creatures who did this are of my same species:

An elephant that was pregnant died in Kerala, standing in water, last Wednesday, after she faced one of the most brutal forms of animal abuse. She ate a pineapple filled with firecracker, offered to her allegedly by some locals. The fruit exploded in her mouth, leading to the inevitable tragedy.

[…]

So powerful was the cracker explosion in her mouth that her tongue and mouth were badly injured. The elephant walked around in the village, in searing pain and in hunger. She was unable to eat anything because of her injuries.

I am more disturbed by this incident than I can put into words. Poor, poor elephant, expecting a minimum — the very minimum — of cross-species friendliness, and receiving not just death, not just agony, but excruciating, hours-long torture. The creatures that did this don’t deserve to share the Earth with anyone.

The elephant stands in the Velliyar River.

The elephant stood in the Velliyar river for hours, refusing help and in ‘searing pain’, until it died standing in the water. (via NDTV).

The news report was based on accounts from a forest officer on social media who went to respond to the situation, and has no mention of whether anyone has been arrested for this. The creatures that did this should face consequences at the very least according to the laws of their own species, surely. (That would be inadequate and the bare minimum, but the rest of us are, after all, bound by such things as codes of conduct, and laws, and morals.)

Anyway, this here is the relevant Indian Penal Code section:

[Section] 429. Mischief by killing or maiming cattle, etc., of any value or any animal of the value of fifty rupees.—Whoever commits mis­chief by killing, poisoning, maiming or rendering useless, any elephant, camel, horse, mule, buffalo, bull, cow or ox, whatever may be the value thereof, or any other animal of the value of fifty rupees or upwards, shall be punished with imprisonment of either description for a term which may extend to five years, or with fine, or with both.

Whoever did this needs to be behind bars. Anyone that could have spoken up and didn’t needs to be behind bars too. 5 years, the penal code says. I think that’s too few; there’s no mention of torture in the code, and ‘mischief’ is quite inadequate to capture the extent of this monstrosity. Put them all in jail, and slap fines large enough that they spend the rest of their lives just paying them off.

Poor, poor elephant.

|


☞ Wriddhiman Saha shines as India wicketkeeper

Permalink - Posted on 2019-10-14 04:00

This makes me so happy. :-)

India wicketkeeper Wriddhiman Saha was at the very top of his game during India’s second Test cricket match against South Africa. Usually, wicket keepers are invisible when they do their job well—they’re just there to catch or stump the batsman out thanks to the bowlers’ efforts. This time, though, Saha’s brilliance was plainly evident even on the highlight reel.

Saha dives!

Saha’s keeping is a thing of beauty (via cricketaddictor.com).

Saha has been India’s best pure wicketkeeper for a while now. For the majority of his career he was in the shadow of the great MS Dhoni; more recently, Saha’s injury has allowed the precocious but evidently still raw Rishabh Pant a sniff at the top job. It’s good to finally see Saha back in action. Saha may not be as exuberant as Pant, but he can certainly bat. After this latest Test and in comparison with Pant’s work in the past year, there should be no debate at all regarding Saha’s place as India’s first choice keeper.

Welcome back, Wriddhiman! Having him behind the stumps adds beauty to the game.

|


☞ Celebrating babies’ first laugh

Permalink - Posted on 2019-08-14 04:00

There are several references to this on the internet, but this is the reference that I first came across, so this is what I’m linking to. From Ingrid Fetell Lee:

Did you know that the Navajo (Diné) people have a specific tradition around celebrating a baby’s first laugh? Around three months, they watch the baby closely for that first real giggle. The person who has the good fortune of eliciting that first laugh is then responsible for throwing a party, with the baby technically playing the role of host. Of course, a baby can’t host a party, so the relative or friend who coaxed out that first laugh hands out rock salt, candy, and gifts on the baby’s behalf.

I love this tradition, if for nothing else then for the cuteness factor alone. There are more reasons to celebrate this event, though: laughter is a baby’s first form of communication with its surroundings and with other humans. From this great Ted.com article referencing psychology researcher Caspar Addyman:

The need to communicate with laughter may have deep roots in our development as a species, speculates Addyman. Evolutionary biology suggests it’s a way for humans to share with other humans — and thus, to belong. While he is still teasing out why children needed to signal their enjoyment of the cartoon to whoever was there, he thinks it has to do with the idea, raised by Oxford University anthropologist and primatologist Robin Dunbar, that laughter could be a replacement for the earlier primate behavior of grooming. “Grooming was a one-on-one, unfakeable investment of time in somebody else,” explains Addyman, and it created trust among group members as well as a sense of community.

We have several different baby-event celebrations; this should be one of them!

|


☞ The climate change that helped the dinosaurs

Permalink - Posted on 2018-11-01 04:00

The Atlantic has an excellent piece on a drastic climate change event about 230 million years ago, when vast quantities of carbon dioxide gas erupted from undersea volcanoes. We’ve all heard the story of how the dinosaurs disappeared; well, this one is a different story.

But perhaps the most extraordinary aspect of the Carnian Pluvial Episode was not the crisis itself, but the world that came after. Until then, dinosaurs had been a puny and obscure lineage confined to the furthest southern reaches of Pangaea. But by the time the crisis was over, they had spread all over the world—perhaps using the oddly humid pulse to hopscotch across the previously arid wastelands of Pangaea—and rapidly diversified, using the extinction of their competitors to experiment with new lifestyles. The planet would never be the same.

Speaking of climate change, living in the US makes it pretty clear that some of us haven’t yet gotten our head around the whys, the hows, and really, the necessity, of caring about climate change. This is the part that we must keep reminding ourselves: it’s not that climate change destroys the Earth; far from it. The Earth was, is and will be fine. It’s just that the species that inhabit the Earth has and will change with drastic climate change.

If we, humankind, as a species are destined to have the same fate as the dinosaurs, well, so be it. But hey, if there’s one thing us humans have done better than any other species, that’s to change our environment to suit ourselves. Let’s use that to keep Earth’s climate as we like it! A huge chunk of our civilization is based on proximity to water, including oceans; a huge chunk of us are used to certain weather patterns. We won’t like it if either of those factors change. We won’t; the Earth won’t care.

(Hopefully we won’t end up like the dinosaurs. Hopefully, we will (a) keep Earth’s climate under control, and (b) inhabit other planets, at least, by the time the Sun makes Earth uninhabitable.)

Anyway, go read this great article. This kind of story about the paths of life and evolution on Earth is always fascinating to read.

|


☞ <span class="quo">&#8216;</span>Democracy brings discontent&#8217; in peaceful&nbsp;Bhutan

Permalink - Posted on 2018-10-30 04:00

From Joanna Slater at the Washington Post is this excellent piece about emerging democracy in Bhutan:

A small Himalayan nation wedged between India and China, Bhutan is famed for its isolated location, its stunning scenery and its devotion to the principle of “Gross National Happiness,” which seeks to balance economic growth with other forms of contentment.

Now Bhutan’s young democracy, only a decade old, just received a heady dose of the unhappiness that comes with electoral politics. In the months leading up to Thursday’s national elections, the first in five years, politicians traded insults and made extravagant promises. Social media networks lit up with unproved allegations and fearmongering about Bhutan’s role in the world.

It is enough to make some voters express a longing for the previous system — absolute monarchy under a beloved king. “I would love to go back,” said Karma Tenzin, 58, sitting in his apartment in the picturesque capital, Thimphu. “We would be more than happy.”

Interesting tidbit:

The way elections are structured here is atypical, too. Buddhist monks, nuns and other clergy are not allowed to vote, on the logic that they should remain outside politics. No campaigning is allowed after 6 p.m. And candidates found “defaming” their opponents or straying into certain sensitive topics — such as Bhutan’s oppressively close relationship with India — face fines or reprimands.

Fines have been levied for describing political opponents as “anti-national” and “all talk and no substance”. This is such a stark contrast in tone and expectations from election campaigns in both India and USA that it almost seems quaint and anachronistic. Here’s to Bhutan maintaining its peacefulness and innocence as its democracy matures.

Bhutan went to the polls for its third parliamentary elections on 18 October, the day that the Washington Post piece was published.

(Well, perhaps democracy can also broach the topic of the expulsion, deportation, ethnic cleansing of its Nepali-origin citizens. Can’t imagine that having a good bearing on the Gross National Happiness.)

|


☞ <span class="caps">FIFA</span> updates its ethics code&#8230; to fight defamation, not&nbsp;corruption

Permalink - Posted on 2018-08-16 04:00

From the AP:

FIFA has officially eradicated corruption. All it took was pressing the delete key.

Soccer officials and players who bother checking out the new code of ethics governing their conduct will find the word “corruption” missing. They also will discover how to avoid being banned for paying and receiving bribes.

It seems that the lesson that FIFA took from their massive corruption scandal is that they need to run a tighter ship in terms of information about the corruption getting out.

Related, they have also previously addressed racism in the sport by disbanding its anti-racism taskforce, declaring that it had “completely” fulfilled its mission. “Completely”; meanwhile, task force member Osasu Obayiuwana had this to say:

“I wish I could say that I am shocked by the decision, but unfortunately I am not. The problem of racism in football remains a burning, very serious and topical one, which need continuous attention.”

What would you bet that the next FIFA scandal won’t be too far away, however much they declare defamation of the body to be a punishable offense?

|


☞ The ugly scandal that cancelled the Nobel prize in&nbsp;literature

Permalink - Posted on 2018-07-18 04:00

From the Guardian:

In the eyes of its members, there is no more important cultural institution in the world than the Swedish Academy. The members, who call themselves The Eighteen (always in capitals), are elected for life by their peers, and meet for a ritual dinner every Thursday evening at a restaurant they own in the heart of the old town in Stockholm. And once a year, at a ceremony brilliant with jewels and formality, the permanent secretary of the academy hands out the Nobel prize in literature and all the world applauds.

But this year there will be no prize and no ceremony. In November 2017, it was revealed in the Swedish press that the husband of one of the academy members had been accused of serial sexual abuse, in assaults alleged to have taken place over more than 20 years. Jean-Claude Arnault, a French photographer and cultural entrepreneur, is married to the poet and academician Katarina Frostenson. In addition to assault accusations against him, the pair are accused of misusing academy funding. Arnault has denied all accusations, and Frostenson has refused to comment.

The academy is paralysed by the scandal, which was followed by a slew of resignations and expulsions. Six of The Eighteen have withdrawn from any part in its deliberations; another two were compelled to do so. The statutes say that 12 members must be present to elect any new ones, so with only 10, no important decisions can be taken and no new members elected.

What a mess this is. I’m tempted to say “you can’t make this stuff up”; would that be too ironical?

|


☞ Disposable America — A history of modern capitalism from the perspective of the straw.&nbsp;Seriously.

Permalink - Posted on 2018-07-11 04:00

By Alexis Madrigal for The Atlantic:

The invention of American industrialism, the creation of urban life, changing gender relations, public-health reform, suburbia and its hamburger-loving teens, better living through plastics, and the financialization of the economy: The straw was there for all these things—rolled out of extrusion machines, dispensed, pushed through lids, bent, dropped into the abyss.

You can learn a lot about this country, and the dilemmas of contemporary capitalism, by taking a straw-eyed view.

This is a very well researched article on the humble drinking straw, and its correlation with the evolving American societal outlook. The pervasiveness of the drinking straw in this society probably makes this a pretty good correlation to make.

Go read, this is quite an interesting, albeit long, read. (I did not know, for example, that the original straw was made from actual straw.)

|


☞ New free street library in&nbsp;Kolkata!

Permalink - Posted on 2018-07-02 04:00

The Indian Express reports:

If one gets down at Netaji Bhavan metro station and walks towards Rammohan Dutta road straight to Northern park one would stumble upon a rather curious sight. College-goers can be seen crowding the area and a familiar smell of books envelops it. Several books are exhibited in bookshelves on the footpath and it almost seems like a bookstore at first glance. This, however, is no bookstore, instead, it is an expansive library that houses books by authors ranging from popular Bengali comic books to Sidney Sheldon. The name of the place is Street Library.

This is such a lovely concept. Anyone who wants to read can pick up a book and return it once they are finished. People who have books that they don’t plan on keeping can donate and improve the collection. People with organization skills and some spare time can chip in and organize the collection every once in a while.

This is an excellent program that encourages reading, sharing and selflessness. It also depends on a community working together to keep a good thing going. I wish this all the best, and really hope that there is enough community interest and investment to overcome the occasional miscreant. Although Kolkata is home to the National Library of India, and hosts several other libraries, they are either not free or not easily accessible for many people. Street libraries are an excellent idea for people short on time and energy but an interest to read.

If you’re in Kolkata and have some books to spare, perhaps you can consider donating to this? Or better yet, perhaps you can see if something similar can be organized in your part of the city?

|


☞ Indian banks contemplate &#8216;face reading&#8217; to spot doubtful loan&nbsp;seekers

Permalink - Posted on 2018-06-29 04:00

From the Times of India:

Private banks in the western coastal state [Gujarat] have approached the Gujarat Forensics Science University to prepare a facial micro-expressions manual, to train its employees in recognising doubtful high net-worth customers like fugitive liquor baron Vijay Mallya demanding loans.

This is straight out of the American TV series Lie to Me (IMDB Link):

In the show, Dr. Cal Lightman (Tim Roth) and his colleagues in The Lightman Group accept assignments from third parties (commonly local and federal law enforcement), and assist in investigations, reaching the truth through applied psychology: interpreting microexpressions, through the Facial Action Coding System, and body language.

Have the Indian bankers in question seriously been watching too much TV reruns? In the show, the protagonists use micro expressions to evaluate suspects and their testimony to solve crimes. That’s slightly different from the real world case of deciding whether to give out large loans, no? (For context, India has had a slew of recent large loan frauds.)

I am completely bewildered by this. If there have been some large loan frauds, shouldn’t the most important step be a complete overhaul and re-evaluation of how credit-worthiness of prospective clients is determined? In a financial sense? In a risk assessment and cost-benefit analysis sense? In an available collateral sense? Especially given that investigations have been called for on bank employees, it has been alleged that a bank CEO “failed to initiate steps” to prevent the fraud after there were red-flags, and bank officials have been charged?

Do the bankers really believe that there is nothing to improve on their financial evaluations side and in their employee honesty side? Or is this a case of putting their head in the sand and going ‘la-la-la’? Are the bankers too entrenched in their current practices and workflows, don’t want to go through the trouble — and the expense — of actually re-evaluating their own businesses, and are looking for guises to exculpate themselves?

I mean, seriously, if the banks want to go for next generation methods, artificial intelligence and machine learning would be an actual avenue to explore. Examples to be found here and here. There are even courses and available computer code(here and here) to get people started!

Come now, bankers in question: get real and find real solutions to your real problems, and stop with the hand waving TV-show inspirations.

|


☞ Indian Railways decides to enforce baggage&nbsp;limits

Permalink - Posted on 2018-06-06 04:00

The Times of India reports:

As a result of numerous complaints regarding excess baggage being towed into train compartments, the Indian Railways has decided to strictly enforce its over-three-decades-old baggage allowance rules, which will see passengers paying up to six times the stipulated amount as penalty, if caught travelling with overweight luggage, an official said today.

I never even knew that these baggage rules existed. All these years, I’ve simply assumed that there were no formal baggage limits; that space constraints and being reasonable to fellow passengers is all that stops people from carrying waaay too much stuff with them on to trains. Unfortunately, people often do carry too much stuff with them, and to the level of straining and breaking limits of reason.

Which is why the rule enforcement itself, to me, is entirely justified. Even in the little travel that I have done via Indian Railways in the recent past, people carrying way too much luggage, both in quantity and physical size, is way too common for comfort.

The important question, though, is how much luggage is allowed? After all, the railways is used in a vast majority by people for whom expense is a major factor.

According to the prescribed norms, a sleeper class and a second class passenger can carry luggage weighing 40 kg and 35 kg respectively without paying any extra money and a maximum of 80 kg and 70 kg respectively by paying for the excess luggage at the parcel office. The excess luggage would have to be put in the luggage van.

[…]

For example, if a passenger is travelling 500 km with luggage weighing 80 kg in the sleeper class, he can book his excess baggage of 40 kg for Rs 109 in the luggage van.

[…]

Similarly, an AC first class passenger can carry 70 kg of luggage for free and a maximum of 150 kg, after paying a fee for the excess 80 kg.

An AC two-tier passenger can carry 50 kg of luggage for free and a maximum of 100 kg by paying a fee for the excess 50 kg.

Only 35-40kg for the second class passenger? That seems a little on the lower side. Barely a couple of suitcases, perhaps? In our international travel to and from the USA we’re allowed 46kg in two checked in suitcases, along with additional cabin baggage; surely a railway compartment should be able to accommodate more per passenger? The limits for the AC classes seem a little more reasonable, but still low considering that fewer passengers occupy the same compartment area.

The cost for extra baggage doesn’t seem too bad either. About Rs. 100 for essentially doubling the baggage allowance is hopefully okay, considering prices of other commodities, although I hope the baggage charges increase with the class of tickets. The cheapest tickets should really also have the cheapest excess baggage charges, considering the budget conscious traveler.

I’m most concerned, though, with two things. One, the excess luggage is to be placed in a separate luggage van. (Come to think of it, I’ve always known these luggage vans exist on trains. I always assumed they were for freight or oversized luggage. Huh.) I’m guessing the luggage van is perfectly safe with no fear of theft, but I’m also certain many, many passengers will take a long time to be comfortable with the idea of their bags not being right next to them. (Although, side benefit: if the bags aren’t just lying around in the compartment, they’re safer from theft.)

Two, they say they will “enforce” the law by random checks. This is bad, especially in India, where: (a) this situation is ripe with bribing opportunities, and (b) random checking introduces the concept of fairness between travelers who got caught and who didn’t. I really hope they figure out a more robust way of executing this.

In concept, the baggage allowance idea seems reasonable, but I hope they do a good job of the current idea, and I really hope they revisit the current ideas and update them based on feedback and usage data. The Indian Railways is a lifeline in India, and things like this can have a major effect either way.

|


☞ How the smallest programming bugs can be&nbsp;catastrophic

Permalink - Posted on 2017-12-15 05:00

From way back in 1996:

It took the European Space Agency 10 years and $7 billion to produce Ariane 5, a giant rocket capable of hurling a pair of three-ton satellites into orbit with each launch and intended to give Europe overwhelming supremacy in the commercial space business.

All it took to explode that rocket less than a minute into its maiden voyage last June, scattering fiery rubble across the mangrove swamps of French Guiana, was a small computer program trying to stuff a 64-bit number into a 16-bit space.

One bug, one crash. Of all the careless lines of code recorded in the annals of computer science, this one may stand as the most devastatingly efficient.

More links here, and the report of the inquiry into the incident is archived here.

A fascinating, and from a programmer’s perspective chilling, read. This is the stuff of nightmares — an apparently innocuous line of code causing an exception that leads to disaster!

|


Adios&nbsp;Cassini

Permalink - Posted on 2017-12-12 05:00

A couple of months ago, 15 September to be precise, marked the end of an era in the human exploration of our solar system. The Cassini spacecraft was programmed to crash into Saturn’s upper atmosphere and burn up, thus ending an almost two-decade journey and exploration of Saturn and its moons. I was in middle school when this mission launched in 1997, and at that point, even reaching Saturn in 2004 seemed eons away. Twenty years later, perhaps it’s time to look back at some of the amazing insights we’ve gained.

Cassini is actually a shortened name for the Cassini-Huygens mission, and comprises the main spacecraft — Cassini — designed to travel as a satellite in the Saturn planetary system, and a small lander — Huygens — designed to actually land on Titan, Saturn’s largest moon.

Giovanni Cassini was an Italian mathematician and astronomer, and discovered four of Saturn’s moons — Iapetus, Rhea, Tethys and Dione. The Cassini spacecraft was the first to observe all four of these moons. Christiaan Huygens was, of course, a famous Dutch astronomer and scientist, and discovered — but of course — Titan, then the first known moon of Saturn. (He also invented the pendulum clock, was mentor to Gottfried Leibniz, studied optics and the wave nature of light, and derived the modern formula for centripetal force.)

Saturn by Cassini

Saturn by Cassini (via Wikipedia).

Of the many discoveries made by Cassini, I’ll focus on just two stories: those of Saturn’s largest moon Titan, and Saturn’s hexagon. Both of these fascinate me to no end, and I think reflect the best of Cassini’s contributions.

Saturn's Polar Hexagon

Jupiter is famous for its Great Red Spot; Saturn has its own atmospheric phenomenon that’s equally fascinating. Saturn’s Hexagon was first discovered by the Voyager missions, but now Cassini has had the chance to see it from up close.

Technically, the Hexagon is a persisting cloud pattern formed by jet streams around Saturn’s north pole, but its sheer size and perfect symmetry make it unique. Each side of the hexagon is about 13800km long (to compare, Earth’s diameter is about 12700km), and its winds travel at around 300km/h. It’s been there since the Voyager missions in the 1980s, so we know its long-lived.

Saturn - North polar hexagon and vortex as well as rings (April 2, 2014)

Saturn - North polar hexagon and vortex as well as rings (April 2, 2014) (via Wikipedia).

On Earth, our jet streams are forced to bend and move in response to Earth’s surface features such as mountains. Saturn is much larger than Earth (Saturn diameter is about 116000km) but has a rocky core that’s similar in size to Earth, and so its jet streams have no such problems, and can keep flowing in their own orderly and symmetrical fashion.

The hexagon is essentially a quirk of fluid mechanics. Here on Earth, scientists have been able to create (here, and here) such regular shapes by rotating a circular tank of liquid at different speeds at its center and outer edge. Due to the difference in speeds, a turbulent region is created where such regular shapes can be observed. The regular shape is not always a hexagon (shapes with three to eight sides, i.e. from a triangle to an octagon, are produced) but a hexagon is the most commonly occurring. However, the phenomenon only occurs when the speed differential and fluid properties fall under certain small margins, and therefore the hexagon phenomenon is not observed everywhere where its possible (such as Jupiter, or even the south pole of Saturn).

At the center of the Hexagon, right at the north pole, is a humongous storm, with a definite and easily observed eye wall. The south pole has such a storm as well, although it doesn’t display a Hexagon. In each case, the eye of the storm is about 50 times wider than a hurricane would be on Earth.

As much as the Hexagon is an atmospheric and scientific phenomenon, explained and replicated under lab conditions, it’s one of our solar system’s most beautiful sights, and something I’ll keep looking for in photos of Saturn, now that I know it’s there.

False color image of storms at Saturn's north pole

False color image of storms at Saturn’s north pole (via JPL/NASA).

Titan

Titan is Saturn’s largest moon, and of special interest to us: Titan is the only known moon with an atmosphere, and the only one other than Earth whose atmosphere is majority nitrogen. Moreover, its atmosphere is denser and more massive than ours, and is opaque at many wavelengths of light. This means that, like Venus, we had no idea of what the surface of Titan looks like until we had a probe that could land on the surface of Titan. Thanks to Cassini and Huygens, we know a lot more today about Titan than we did in 2004.

Titan, we know now, has an active weather system, including wind and liquid rain, just like on Earth. Of course, the liquid that rains is different from Earth: it rains liquid methane on Titan. Nevertheless, its nitrogen atmosphere and presence of liquids means that Titan’s methane cycle is analogous to Earth’s water cycle. Titan’s upper atmosphere is also affected by ultraviolet light from the Sun, whereby atmospheric methane is broken down and reconstituted into a diverse mix of complex hydrocarbons.

We’re not done yet with the comparisons with Earth! Titan has lakes and oceans, comprised of methane, ethane, and dissolved nitrogen; this makes Titan only the second object in the Solar System (after Earth) to have stable liquids present at ambient temperatures. It most likely also has volcanoes, and is affected by tidal effects from Saturn’s massive gravity. Titan’s surface, specifically where Huygens landed, looks uncannily like Earth, with ‘globules’ about 10-15cm in size, made probably of water ice.

Huygens' view of Titan's surface

Huygens’ view of Titan’s surface (via Wikipedia).

It’s almost as if Titan is an analogue of Earth— only much colder. In fact, in very specific ways it’s not even colder by much thanks to Titan’s greenhouse effect and tidal heating from Saturn. Cassini has performed numerous gravity measurements of Titan, which reveal that there is a hidden, internal, ocean of liquid water and ammonia beneath Titan’s surface.

So, to summarize, Titan has: an active weather system, large quantities of complex hydrocarbons (Titan is much, much richer in hydrocarbons than Earth), tidal effects from Saturn, and interaction of its atmospheric methane with ultraviolet radiation from the Sun, and even and underground ocean of liquid water and ammonia. A question is begging to be asked at this point: what are the chances of life (past, present or future) on Titan?

Scientists think Titan definitely has the potential to contain habitable environments. Similar to Earth in its infancy, Titan today has the pieces needed for new life to possibly form. Whether it already has, or the extent of future possibility, can only be understood with even better exploration. Indeed, quite a few ideas for future missions dedicated to Titan have been proposed, but none have really gotten off the ground (pun intended) yet.

The most promising of them all is a design to send a submarine to Titan that can explore the seas of Titan, but even this idea is in relatively early stages.

So Much More...

I’ve really just scratched the surface here of how much the Cassini mission gleaned from the Saturn system. There’s so much more: Saturn’s rings and their composition; the moon Enceladus and its jets of icy particles and subsurface ocean of salty water; the moon Iapetus and its equatorial ridge; the moon Mimas and its crater that gives it the Death Star look… trust me, if you don’t take an interest yet, you will once you start reading.

The Cassini-Huygens mission really gave us glimpses into a planetary system that provides great opportunities for scientific discovery, amazing new and diverse worlds, and even — dare we dream? — possibilities of places that can harbor life.

It’s time to say adios to Cassini, but of course, we humans have a long way to go before we can say we know our own solar system.

Saturn's moon Mimas, with the crater Herschel visible prominently

Saturn’s moon Mimas, with the crater Herschel visible prominently (via Wikipedia).

(This piece first appeared in the 2017 edition of Sharod Sombhar, an annual magazine from the Bengali Students’ Association at Virginia Tech.)


Of India&#8217;s high-speed rail ambitions, and lazy Indian&nbsp;journalism

Permalink - Posted on 2017-09-18 04:00

India’s plans about building a high speed rail route connecting Mumbai and Ahmedabad have been in the news lately. The project is funded by a low-interest loan from Japan (covering 80% of the cost of the project), and will make use of Japanese high-speed rail technology used for the Shinkansen.

Of course, along with the project being in the news, it is also subject to critique in news articles, as any expensive government venture is bound to (and should!) be. In many of the articles, though, I found one common piece of information mentioned over and over:

According to a study conducted by IIM Ahmedabad, Ahmedabad-Mumbai bullet train will need to make 100 trips daily and carry 88,000-118,000 passengers per day to be financially viable. This figure could well be way above the total number of passengers travelling between the two cities on any given day.

In fact, searching the internet with the name of the article in question (Dedicated High Speed Railway (HSR) Networks in India: Issues in Development) provides a result that looks like this:

Google Search Result

Google Search Result. (Source)

They all mention the same report, and all mention the exact same language about “requiring 100 trips a day”. None, however, actually provide links for the curious reader, nor provide any context or analysis. Well, I was curious, so I tried to find and read the actual report.

This is the the report I found online. It’s co-authored by Prof. G. Raghuram as mentioned in all the newspaper reports, and calls itself “an abridged version of an IIMA working paper with the same title.” Unfortunately, the IIMA working paper link is broken, and the Wayback Machine doesn’t have it archived either. (P.S.: Between the time that I found and read the report, and I finished writing this piece, the webpage hosting the report seems to have gone dead. No matter, the Wayback Machine has it cached. Go read!)

Anyhow, the report is a great read. After reading it, though, I was reminded of how poor India’s average journalism has come to be. What every news article printed is actually in the report being cited, and yet — and yet! — what they printed is a complete misrepresentation of the entire point and view of the report.

Let’s start with the conclusions of the report. The following are direct quotes from the Conclusions section:

  • Given that India is a developing country, the primary concern is whether the funds for such a project could be better utilised in other domains, including in upgrading conventional rail. However, the Japanese funding to the tune of 80% of the project cost may not be available for other uses.
  • there are many positive benefits and externalities of the HSR which would be useful in India’s overall aspirational development. These externalities include technology percolation into other domains, economic development, game-changing sense of connectivity, and national pride due to cutting-edge infrastructure. In such a context, it is a good idea to begin and learn.
  • The Mumbai-Ahmedabad route is a good choice for the first route, since it connects India’s first and seventh most populous cities, with significant economic development in the 500 km corridor between them.
  • The low cost Japanese financing has been a great catalyst. Though it is a tied funding with significant mandatory procurement from Japan, it cannot do much harm since Japan is at the cutting edge of HSR technology with over 50 years of experience.

Evidently, the overarching view of the article is not that “100 trips will be needed per day…”. Let’s talk about that part next, then. Here’s the crucial paragraph from the article:

Assuming that 20% (apart from the 80% Japanese funding at concessional rates) of the total cost of the Mumbai-Ahmedabad route would be funded by the Government of India (GoI) with an expected 8% annual return during the operational phase, the estimated daily financing costs for the route would be INR 106 million from when the repayment of the loan kicks in. We take this to be the 16th year (till when the Japanese loan has a moratorium), by when the ramp-up of traffic should have occurred. The project cost includes the ‘interest during construction’ for seven years. Over the remaining eight ramp-up years, we assume that there would be enough operating surplus to cover the interest payments. Subsequent to this, the GoI portion is treated as an equity with only interest due, but no principal repayment. Taking an average fare of INR 5.00 per km for the route with intermediate stops and for a scenario of 0.4 operating ratio, we arrive at a daily required ridership of 118,000 passengers (which translates to 43 million passengers annually). At an average of 1000 passengers per train, over 100 services per day (50 per direction) would be required.

What this means is that if the financing for the rail route is to be paid from the revenue from the rail route only, then about 118000 passengers, at an average of 1000 per train, over 100 services daily, would need to travel on the route. The newspaper articles only mention the raw number, with a vague notion that this is impractical or impossible to achieve. Two points should be considered, though. First, perhaps it isn’t necessary that revenue from the rail route matches the required financing. Perhaps the government can pay for the financing in the short term, and accrue revenue from the rail route to replenish its coffers in the longer term. Second, what is the context for the “1000 per train, 100 services daily” figure? How does it compare to other high speed rail systems in other countries?

Considering the second point first, here is literally the very next paragraph in the report:

The feasibility report estimates for 2033 with a train configuration of 10/16 cars (750/1200 seats) require 52 trains per day per direction. As of 2016, some of the high-traffic HSR routes like Paris-Lyon (409 km), Shanghai-Nanjing (311 km) and Tokyo-Shin Osaka (552 km), though being parts of bigger networks themselves, have more than 85, 300 and 330 trains respectively running every day.

Well, then! In context, the “100 trains per day” number doesn’t look so bad, does it? Considering this information, perhaps the first point above regarding financing isn’t that big a concern, either? It would seem so from the report, since it makes no further comment regarding this matter, including in its conclusions.

There are other points that the news articles mention, such as the 500km distance of the route, as being detrimental to the success of the project (“Flights only take one hour!”). Even those points are considered and answered in the report. The report really is worth the read.

The pros and cons of a large, time-consuming, and expensive government project should be debated — ernestly. However, the debate is derailed (forgive the pun) right at the beginning if the information being circulated is incomplete, or worse, plain wrong. Please, by all means, have the debate. Would everyone at least read the report that everyone is attempting to cite?

P.S.: Between the time that I found and read the report, and I finished writing this piece, the webpage hosting the report seems to have gone dead. No matter, the Wayback Machine has it cached. Go read!


☞ Radiolab Podcast: Using flickering lights to treat Alzheimer&#8217;s&nbsp;Disease

Permalink - Posted on 2017-06-14 04:00

Today, a startling new discovery: prodding the brain with light, a group of scientists got an unexpected surprise – they were able to turn back on a part of the brain that had been shut down by Alzheimer’s disease. This new science is not a cure, and is far from a treatment, but it’s a finding so … simple, you won’t be able to shake it. Come join us for a lab visit, where we’ll meet some mice, stare at some light, and come face-to-face with the mystery of memory. We can promise you: by the end, you’ll never think the same way about Christmas lights again.

I’ve been meaning to post about this particular episode ever since I listened to it. This is the Nature paper about this study. They found that simply flashing light of a certain frequency at a certain interval helps with some of the brain waves that are diminished in mice with Alzheimer’s. It’s absolutely fascinating.

(I’m not going into too much technical jargon here; go listen to the episode!)

If you don’t listen to Radiolab in general, you definitely should; it’s one of the best podcasts there are.

|


☞ <span class="caps">UK</span> Election: Interesting logistics of the Queen&#8217;s&nbsp;speech

Permalink - Posted on 2017-06-13 04:00

In light of the recent election in the UK, the Queen, of course, is supposed to make a speech regarding forming the government by the party that has won majority. Now, however, after the interesting results of the election, the Queen’s speech is delayed, and the reason for it is very interesting.

The Telegraph UK reports:

The Queen’s Speech is going to be delayed because it has to be written on goatskin paper and the ink takes days to dry.

Apparently, the British monarchy are more concerned than others would be about the archival qualities of the paper that they use.

[…] goatskin paper is not actually made from goatskin.

The material is in fact high-quality archival paper which is guaranteed to last for at least 500 years.

Well, okay, but still, why the delay?

Well, ink on this special paper takes a few days to dry. And the monarchy had “ready to go” versions of the speech for (a) a Conservative party majority, and (b) a Labour party majority. But the results of the election, that resulted in a hung parliament, has put all pre-made plans into disarray. Since the political parties themselves don’t know yet how the government will be formed, the Queen’s speech isn’t finalized yet either.

Once the details are set in stone they can be committed to the goatskin paper and sent away for binding before being presented to the Queen.

I love how even the most apparently mundane things become fascinating just by being associated with the British monarchy.

|


☞ Everyday bat vocalizations are rich and&nbsp;complex

Permalink - Posted on 2017-05-29 04:00

In this study, we continuously monitored Egyptian fruit bats for months, recording audio and video around-the-clock. We analyzed almost 15,000 vocalizations, which accompanied the everyday interactions of the bats, and were all directed toward specific individuals, rather than broadcast. We found that bat vocalizations carry ample information about the identity of the emitter, the context of the call, the behavioral response to the call, and even the call’s addressee. Our results underline the importance of studying the mundane, pairwise, directed, vocal interactions of animals.

This is brilliant. They were able to correlate their data analysis of the bats’ vocalizations with the behavior and responses that they observed… so now we know more about how bats communicate! Simply by listening to the vocalization, the context, addressee, and even “the outcome of the interaction can be predicted above chance level”. Fascinating.

From the discussion:

It is important to note that we used one set of acoustic features for classification. However, many other multi-dimensional spectro-temporal representations can be tested. The bat’s brain could thus be using some other representation that encapsulates much more information regarding different social aspects. The bat may be able to classify the context of an interaction with higher confidence, based on some acoustic feature which it evolved to use and is yet to be determined. Our analysis is thus probably only a lower bound on what a bat is capable of extracting from aggressive social vocalizations. For example, we did not include any temporal information in our analysis.

In any acoustic signal, and especially where communication is involved, the time parameter is usually crucial and will add rich layers of information. For example, just imagine taking a piece of human speech, and (a) only looking at the overal speech parameters, versus (b) observing how the speech parameters change during the speech. Case (b) will provide far more information than case (a). I think we will discover over time that bats have a pretty well-evolved communication scheme.

This is fascinating stuff.

|


☞ How Bayesian inference&nbsp;works

Permalink - Posted on 2017-05-28 04:00

Bayesian inference is a way to get sharper predictions from your data. It’s particularly useful when you don’t have as much data as you would like and want to juice every last bit of predictive strength from it.

Although it is sometimes described with reverence, Bayesian inference isn’t magic or mystical. And even though the math under the hood can get dense, the concepts behind it are completely accessible. In brief, Bayesian inference lets you draw stronger conclusions from your data by folding in what you already know about the answer.

An excellent, simple introduction to Bayesian inference. This uses practical examples and an abundance of visual guides: especially useful if you don’t have an extensive math background.

|


Music: lyrics for Daniken, from Rupam Islam&#8217;s Notun&nbsp;Niyom

Permalink - Posted on 2017-04-25 04:00

Rupam Islam is out with a new solo album, Notun Niyom. Continuing with tradition, here are the lyrics to Daniken from this album. (Notun Niyom is available to listen on Spotify!)

Song: Daniken
Album: Notun Niyom

gobeshona-tona tomake manaye
amar agroho sotto janaye

gobeshona-tona tomake manaye
amar agroho sotto janaye
gobeshona tumi koro e-niye
phola-phol pele diyo janiye

chola-chol kori kolpona te
abhijan tai na-hanyate
maddhom mon ar lekhoni
lupto danar shonjiboni

icche-ra shob kobita paray
bhabchi-bhabbo gondho choray
tomar icche bhobisshoter
sondhan dey notun pother

bole cholo jai se-pothe haati
eta mohakash-jaaner maati
control-e thak khoka-o-khuku
shokti utsho surjo-tuku

promaner tumi upashok tai
amar shopne tomakei chai
juktir jaale amar hridoy
obohele kore nile tumi joy

tumi ki nijeke byartho bhabo?
tomake ami e-gaan shonabo
aaloker goti amar gaane
chhutbe notun surjo-taane

tumi ki nijeke byartho bhabo?
tomake ami e-gaan shonabo
aaloker goti amar gaane
chhutbe notun surjo-taane

he-prachin, he-probin
he-aadim mohakash
lukiye rekhecho
bhule jawa itihaash

smriti-te tobu kaar
protiddhoni shunte pai
probashi aakashi
se ki kono… debota-i?

tomar totto bhaota hole
chok-choke kono rangta hole
chaota-ke ami beshechi bhalo
rangta amar rong pheralo

bhaota gaiche prithibir gaan
rangta ghochalo rashtro-nishan
aami prothagoto dhormo-bihin
aami gaai Lennon-er Imagine

moha purushera tader juuge
chole-asha rewaj-er hujuge
bhondo akkha peyei thaaken
Jesus Christ-o krush-e jhulechen

ekdin tumi patta pabe
tomar totto proman hobe
shopno sophol hobe amar-o
tokhon amay khujte paro

ekdin tumi patta pabe
tomar totto proman hobe
shopno sophol hobe amar-o
tokhon amay khujte paro

he-prachin, he-probin
he-aadim mohakash
lukiye rekhecho
bhule jawa itihaash

smriti-te tobu kaar
protiddhoni shunte pai
probashi aakashi
se ki kono… debota-i?

debota-i?


Music: lyrics for Haowaay Pa, from Rupam Islam&#8217;s Notun&nbsp;Niyom

Permalink - Posted on 2017-04-25 04:00

From Rupam Islam’s new solo album Notun Niyom, here are the lyrics to Haowaay Pa. (Notun Niyom is available to listen on Spotify!)

(P.S.: I really don’t like the spelling ‘haowaay’, so: here’s ‘Hawaye Pa’ by Rupam Islam.)

Song: Hawaye Pa
Album: Notun Niyom

phirbo na, ami phirbo na
shunechi je daak nishachori-r

phirbo na, ami phirbo na
shunechi je daak nishachori-r
karnish bohu-tol, halka chokher jol
tar cheye halka sarir

jibon amar kache ekhono lukiye achhe
jibon ki somoyer daash
hawaye pa, amar hawaye pa
ar batashe amar biswas

jibon amar kache ekhono lukiye achhe
jibon ki somoyer daash
hawaye pa, amar hawaye pa
ar batashe amar…

arekbar, hya arekbar
ghum ar tondrar shima-rekhaye
dekhi nishachori tumi eshe dakcho jemon kore
megh brishti ke deke jaye

arekbar, hya arekbar
ghum ar tondrar shima-rekhaye
dekhi nishachori tumi eshe dakcho jemon kore
megh brishti ke phire chaye

nishachori tumi eto akorshoniyo
je shudhu tomar prorochonaye
hawaye pa, amar hawaye pa
dilam hawaye pa nirdidhaye

jibon amar kache ekhono lukiye achhe
jibon ki somoyer daash
hawaye pa, amar hawaye pa
ar batashe amar biswas

jibon amar kache ekhono lukiye achhe
jibon ki somoyer… daash
hawaye pa, amar hawaye pa
ar batashe amar…


☞ Duck Tales 2017, first&nbsp;look

Permalink - Posted on 2017-03-03 05:00

They’re remaking Duck Tales! Woo-hoo-ooo! (And now it’s stuck in your head, right? 😃)

(Featuring David Tennant as Scrooge McDuck!)

Looks great!

|


☞ Recent <span class="caps">ISRO</span> satellite launch carried special imaging&nbsp;constellation

Permalink - Posted on 2017-02-27 05:00

From the website of the company ‘Planet’, published the same day the ISRO satellites were launched:

Today Planet successfully launched 88 Dove satellites to orbit — the largest satellite constellation ever to reach orbit. This is not just a launch (or a world record, for that matter!); for our team this is a major milestone. With these satellites in orbit, Planet will reach its Mission 1: the ability to image all of Earth’s landmass every day.

This constellation therefore formed the majority (88 of 104 satellites launched) of the payload carried by the last ISRO launch. As of this launch, Planet is operating 149 satellites in Earth orbit — this is no mean feat.

Also, an interesting side note: ISRO’s previous largest payload that I referred to in my last post — 20 satellites launched in June 2016 — also seems to be for this same company:

This is our 15th launch of Dove satellites and second aboard India’s PSLV. The launch of Flock 3p comes off the successful launch of Flock 2p on the PSLV in June 2016

|


☞ Indian Space Research Organization launches satellites, breaks&nbsp;record

Permalink - Posted on 2017-02-15 05:00

Indian Space Research Organisation (ISRO) scripted history today by successfully launching a record 104 satellites, including India’s earth [sic] observation satellite, on a single rocket from the spaceport in Sriharikota. This is the highest number of satellites ever launched in a single mission.

The previous record was held by Russia, with 37 satellites launched at one go. The 104 satellites include 3 of India’s own and 101 of ISRO’s international customers, including 96 from USA. (The article states ISRO’s previous record as 23 satellites launched together in June 2015, but I can’t find a record for that. The closest I could find was this: 20 satellites launched in June 2016.)

As much as this is making news, and as much as ISRO should be proud, this should come as no surprise for space enthusiasts— ISRO has been quite a force in space technology, especially using its PSLV launch system, for quite some time now.

The four stage Polar Satellite Launch Vehicle (PSLV), used for this launch, was developed by ISRO in the 1990s to launch satellites into Sun-synchronous orbits for its own remote sensing satellites. (Other than ISRO, only Russia commercially launches satellites into Sun-synchronous orbits.) PSLV was also used by ISRO for Chandrayaan 1, its lunar probe, and Mangalyaan, its Mars orbiter, becoming only the fourth space agency to reach Mars orbit.

As an aside, the Sun-synchronous orbit is a very interesting concept: it is an orbit where the satellite passes over any given point on Earth’s surface at the same local solar time. This allows the satellite to be in constant sunlight as it passes over particular regions— which is great for imaging, remote sensing, spying and weather applications. The technicalities of such an orbit are very involved and very interesting: look up the Wikipedia page I’ve linked to above.

Fun fact: due to the mechanics of the orbit, a sun-synchronous orbit is stable without external thrust only on oblate spheroid planets. This means that such orbits work on Earth and will work on Mars, but on almost spherical planets such as Venus, it will require external thrust to maintain its orbit.

|


☞ Hoshino — Star Wars fan&nbsp;film

Permalink - Posted on 2016-11-03 22:41

Must watch. Worth every second of the 7 minutes you will invest.

|


☞ Hydrogen map of the sky to show the Sun&#8217;s motion in the&nbsp;galaxy

Permalink - Posted on 2016-11-02 21:18

I know this can be hard to picture in your head, but the beauty of it is that once you do, this map sings. You can instantly see what’s what: the motion of the gas, where it’s more dense than other locations, how it’s distributed. It also shows our location in the galaxy! All those changing velocities depend on the Sun’s velocity, the velocity of the gas, but also the direction of the Sun’s motion and its position in the Milky Way’s disk. That’s a stunning amount of information.

This is fascinating.

|


Of Alien&nbsp;Megastructures

Permalink - Posted on 2016-10-28 21:34

They call it Tabby’s star. It is a main sequence star quite similar to our Sun, and is about 1500 light years away from us, in the region of the constellation Cygnus. And it’s a particularly odd one. It was studied using the Kepler Space Observatory, which is the space telescope used for identifying planets orbiting distant stars. All of the exoplanet discoveries in the news over the past few years is due to Kepler.

To understand what’s odd about Tabby’s star, we need to know how Kepler operates. What it does is measure — very accurately — the apparent brightness of stars over time. If the apparent brightness of a star changes, that data is used to find patterns in how much and when the brightness changes occur.

Consider what happens with a planet revolving around a star. The apparent brightness of the star dips every time the planet passes in front — i.e. to observers here on Earth — of the star, and the amount and duration of the dip correlates with the size and velocity of the planet. This process works well, and has helped in the discovery of many, many exoplanets revolving around numerous star systems.

Now that we know the basics, here’s why Tabby’s star is so intriguing. Tabby’s star shows small dips in brightness that are both frequent and non-periodic. It has also shown two large recorded dips separated by two years time. How large are the large dips? Where a Jupiter sized planet would have obstructed the star by about 1%, the large dips obscure the star by as much as 15% to 22%. Whatever is blocking the star light during the major dips is not a planet — it is obscuring almost half the width of the star.

That’s not all. It turns out, even without the obscuring, the light output from Tabby’s star seems to be diminishing over time. It turns out, we have observational data about this star since 1890 (via numerous photographs that contain this star in the image), and it seems to have faded by 20% from 1890 to 1989! Even if such old and long-term data is deemed inaccurate, Tabby’s star has definitely diminished in the recent past, in the era of modern measurements. It seems to dim at a slow steady rate, with one short period of a more dramatic fading.

What could be causing such behavior? A number of hypotheses have been proposed, but none of them fully explain the observations. Could it be a young star with coalescing planetary material floating around it? Nope; no such evidence found. Could there be debris from planets that have collided and created clouds of debris and dust? Nope; this is not supported by observations. Could it be a huge number of disintegrating comets orbiting the star? Nope: they wouldn’t obscure the star’s luminosity by as much as 22%.

Well, could it be aliens?

We on Earth are starting to realize how important it is to harness the Sun’s energy as much as we can. We as a civilization have already fantasized about the creation of a huge structure that captures solar energy from every direction, not just from Earth, and using that energy as our planetary energy needs soar. Such a structure is a sphere that “covers” the Sun, and is called a Dyson Sphere, after the scientist who wrote a paper about it in 1960.

Dyson speculated that such a structure would become inevitable as a civilization advances and its energy needs escalate. Realistically, of course, the “sphere” wouldn’t be an actual sphere (imagine how big the sphere would have to be, and how it would revolve around the Sun!), but a “swarm” of smaller objects revolving around the Sun, like satellites. Collectively, they would serve a similar purpose.

What if the observations of Tabby’s star are the tell-tale signs of an alien civilization building a Dyson Swarm? It would explain the long-term fading, and also the sharp dips in its brightness. It would not be a planet; it’d be an artificial mega-structure being slowly constructed. Such construction projects could very easily — by design — obscure 22% of the star’s luminosity.

It’s an idea, and it’s a pretty fantasy for earthlings in the infancy of space-flight, but this idea does have its caveat. An advanced civilization would most likely have a lot of radio signal emissions (we do too — our TV and radio signals are propagating into space at the speed of light) that we should be able to detect. The SETI (Search for Extra-Terrestrial Intelligence) project spent two weeks studying the star system in October 2015, but did not find any technology-related radio signals in multiple frequency spectra.

If you can’t contain your excitement about the possibility of alien life, you still have hope. Whatever the caveat, and however slim the chances, scientists have not been able to rule out this possibility. More studies are planned that will devote resources — including that of SETI — towards studying Tabby’s star and its surroundings, and we will know more in 2017. If they’re really an advanced alien civilization, for all we know, they might have decided (and have the capability) to stop their radio signals from propagating into deep space!

If you’re apprehensive about finding aliens capable of — and in need of! — harnessing all of its star’s energy, you still have hope. What are the chances? For all the advancements we have made in astronomy and the study of the heavens, we really do yet have a lot to learn. When we observe anomalous behavior through our telescopes, the anomaly is due to limitations in our technology or understanding. What are the chances that this is the one case where our knowledge is perfect and the observations are unnatural?

Either way, this is one star we are certain to keep in our sights. The next few years will tell us more — about how little we know about the stars, or about how we’re not alone in the universe.

Updates:

  • This recent paper confirms that Tabby’s Star has faded throughout the duration of it being observed by Kepler. Other stars were also observed at the same time, and none of them fade at such a drastic rate. (doi:10.3847/2041-8205/830/2/L39)
  • The “Breakthrough Listen” project, backed by Prof. Stephen Fleming Hawking (oops, bad typo!) and funded by $100 million, will be used to observe Tabby’s star.

(This piece first appeared in the 2016 edition of Sharod Sombhar, an annual magazine from the Bengali Students’ Association at Virginia Tech.)


☞ Penn and Teller — fooled by a card&nbsp;trick

Permalink - Posted on 2016-09-02 03:12

If you like card tricks, you’ll love this.

|


☞ A hermit crab changes home; brings house guests&nbsp;along

Permalink - Posted on 2016-09-02 02:55

I’m always fascinated by documentaries about marine life, and I found this quite brilliant.

How the crab invites its house guests to come along to its new house is particularly interesting.

(I won’t say any more; go watch.)

|


☞ Britain has voted to leave the European&nbsp;Union

Permalink - Posted on 2016-06-24 03:57

Britain has voted to leave the European Union, a historic decision sure to reshape the nation’s place in the world, rattle the Continent and rock political establishments throughout the West.

With 309 of 382 of the country’s cities and towns reporting early on Friday, the Leave campaign held a 52 percent to 48 percent lead. The BBC called the race for the Leave campaign shortly before 4:45 a.m., with 13.1 million votes having been counted in favor of leaving and 12.2 million in favor of remaining.

The value of the British pound plummeted as financial markets absorbed the news.

This is historic. Only time will tell whether the net effects will be good or bad — for Britain and for the European Union. (I haven’t followed the intricate details of the pros and cons, but I understand that the full effects and implications are hard to predict if only because the interactions and agreements between countries are so intertwined.)

P.S. The following are required viewing:

|


Gallons per 100 Miles — The Calibration&nbsp;Chart

Permalink - Posted on 2016-06-09 15:45

In the US, automobile fuel economy is usually measured in miles per gallon, mpg. This works, but there is a better metric, especially for comparison between values. Gallons per 100 miles is the way to go!

This is very well known, and even I’ve talked about this before. There are numerous online tools to do the conversion from mpg to gallons per 100 miles… but there don’t appear to be any simple conversion or calibration charts for it.

Well, here you are — an easy to use chart to convert between mpg and gallons per 100 miles (or, equivalently, from km/l to liters per 100km).

What’s wrong with using miles per gallon, though? Well, there’s nothing wrong with using it, of course (we all use it, after all!). It’s that it’s just not a good metric when it comes to comparisons.

This is because the mpg metric is not linear. This means that even a consistent difference in mpg, say a “10 mpg difference”, means different things based on where the difference is calculated from. This makes it very hard to calculate and compare the benefits of better fuel efficiency!

Let’s take a couple of examples and use the chart below. Let’s say you’re planning to shift from owning a 15mpg vehicle to owning a 25mpg vehicle. What are your fuel savings? On the other hand, say you’re shifting from a 25mpg vehicle to a 35mpg vehicle. What about now?

Gallons per 100 miles Conversion

Gallons per 100 miles Conversion (Download full size here)

Let’s look at the chart. The horizontal axis shows miles per gallon, as indicated. The vertical axis shows gallons per 100 miles, also as indicated. Let’s find approximate numbers for our cases above:

  • 15mpg → ≈ 6.7 gallons per 100 miles
  • 25mpg → 4 gallons per 100 miles
  • 35mpg → ≈ 2.8 gallons per 100 miles

For every 100 miles you drive, a “10mpg improvement” from 15mpg saves you 2.5 gallons (≈ 40%) of fuel. On the other hand, over the same 100 miles and the same “10mpg improvement”, but from 25mpg, you save only 1.2 gallons (≈ 30%) of fuel. See how these numbers are different, even though the mpg metric difference between the two cases remains constant?

The mpg metric would have worked, if our baseline was different. But does anyone ever say: “Hey, I have 3 gallons of fuel; how far can I go with it?” Instead, our question is always: “I need to drive 500miles; how much fuel would I need?”

Go ahead and download the full size chart and keep with you. If you’re in the market for cars, this will come in handy! You know how much you drive; this chart gives you an easy way to measure your particular fuel requirements (or savings).

P.S.: The above chart works with any ratio of units; just keep the units the same between the horizontal and vertical axes. So, for example, the same chart applies for km/l vs. liters per 100km.


☞ Muhammad Ali is no&nbsp;more

Permalink - Posted on 2016-06-04 15:12

A great fighter—“The greatest ever”—but he was so much more than that.

[…] as a young heavyweight champion he converted to Islam and refused to serve in the Vietnam War, and became an emblem of strength, eloquence, conscience and courage. Ali was an anti-establishment showman who transcended borders and barriers, race and religion. His fights against other men became spectacles, but he embodied much greater battles.

Also, these are must watch, if you haven’t seem them already:

Rest in peace, sir.

|


☞ King Tut&#8217;s dagger was made from a&nbsp;meteorite

Permalink - Posted on 2016-06-01 20:50

An analysis of the dagger’s blade led by Daniela Comelli, a professor of materials science at the Polytechnic University of Milan in Italy, showed that it contains 10 per cent nickel and 0.6 per cent cobalt, the researchers report in the journal Meteoritics and Planetary Science.

(Also, I really love it when a news article references the actual journal article prominently. Nothing better for the interested reader!)

|


☞ Mumbai Police go after comedian for &#8220;mocking&#8221;&nbsp;celebrities

Permalink - Posted on 2016-05-31 02:38

An Indian comedian, known for “edgy”, “controversial” material, apparently created something that pokes fun at Indian mega-stars and national heroes Lata Mangeshkar and Sachin Tendulkar.

And of course, this being India, some people found reason to be outraged. And of course, since these people have political affiliations linked to the government, the police are now “looking into the matter”.

Mumbai police has begun an inquiry into complaint against comedian Tanmay Bhat’s video of a mock conversation with Lata Mangeshkar and Sachin Tendulkar that prompted the Shiv Sena, Bhratiya [sic] Janata Party and MNS to call for action against Bhat and AIB.

The inquiry is based on the complaint by Raj Thackeray’s Maharashtra Navnirman Sena.

Bollywood has also reacted sharply to the comedian’s portrayal of the music and cricket icons, saying it is in poor taste.

Making videos in poor taste is not against the law, people. I have not seen the video; I will go ahead and concede nevertheless that the video is not worth its time on Youtube. OK, then don’t watch it! If no one watches it, guess what happens: they stop making such videos!

I find stuff like this maddening. “Freedom of speech” should be simple to understand, no? I can speak my mind; you can speak yours. Unless you’re putting words in my mouth, or are preventing me from living my life fully, I have no right to stop you making your speech, however offended or outraged I feel. Yes, if I feel your speech is “wrong” or “bad”, I might encourage my friends and family to boycott you. But only my sense of offense should have no effect on the legality of your speech!

The only people with say in the matter are the celebrities in question. Did Sachin Tendulkar complain? No. Did Lata? No! As long as everyone understands that the video was made by someone else and not the celebrities in question, how in the world does legality come into the picture?

Please, let the police do their thing and go after actual crime and actual criminals. “Distasteful” and “offensive” mean very different things than “illegal”.

|


☞ Minimalist Travel — The World in One&nbsp;Backpack

Permalink - Posted on 2016-05-30 16:08

If you’re looking to travel the world, this is a great list to have around when planning for it. Just enough things to carry, but not too much.

Bookmarked!

|


☞ Star Wars Episode 4 in one&nbsp;graphic

Permalink - Posted on 2016-05-29 16:00

This is brilliant. Must see, if you’re a Star Wars fan. :-)

|


Octopress — adding category tags to the blog <span class="caps">RSS</span>&nbsp;feed

Permalink - Posted on 2016-05-29 03:00

Right from the beginning, I’ve assigned broad categories to every post I’ve written here. (For example, this is my—very lacking—Health Monitoring series of posts.) However, Octopress does not include these category tags by default into the RSS feed. So if a reader is using an RSS feed-reader app or website, they cannot make use of the assigned categories even if the app or website was capable of doing so.

I’ve now added some code necessary to add the categories to the RSS feed, and this is what I did.

cellArray = {'Alpha','Beta','Gamma','Delta','GammaSquared'};
refString = 'Gamma';

At the outset, here is the code that I added:

{% for post in site.posts limit: 20 %}
<entry>
<!-- Other items that are included in the feed -->

{% capture catnum %}{{ post.categories | category_links | size }}{% endcapture %}
{% unless catnum == '0' %}
    <categories>
    {% for cct in post.categories %}
        {% assign idx=forloop.index0 %}<category>{{ post.categories[idx] }}</category>
    {% endfor %}
    </categories>
{% endunless %}

<!-- Other items that are included in the feed -->
<content type="html"><![CDATA[{{ post.content | expand_urls: site.url | cdata_escape }}]]></content>
</entry>

{% endfor %}

This code works great, but allow me to confess that I am not sure that this is the optimum implementation. To me this seems inelegant, but until I have a better solution, this performs the function appropriately and perfectly adequately.

I’ve only included the relevant portion and the context in which it must be inserted. (See the comment tags <!-- Other items that are included in the feed -->.)

The meat of the algorithm is from lines 7 through 11.

  • A <categories> tag is defined, and a for loop is executed over post.categories, which contains the list of categories for the post.
  • Within the for loop, each post category is enclosed in a <category></category> tag.

Now I had initially thought that the loop variable (cct here) would inherit sequentially the value of each category in post.categories, but apparently that does not work properly. Therefore, the workaround is to

  • identify the loop index (assign idx=forloop.index0) and
  • use individual values of the categories (post.categories[idx]).

We must use forloop.index0 and NOT forloop.index (both are valid commands; the index key starts numbering from 1) because the array numbering starts from 0, not 1.

OK, now that the meat of the algorithm is done, we must put in some code to handle the “unusual” cases—what happens if a post does not have any categories assigned? Such a scenario is handled by the capture command (line 5) and the unless segment that encloses our actual algorithm. The capture command simply captures a value, in our case the number of categories that exist. We only want to include the categories when they exist, therefore our algorithm is run only unless catnum=='0' i.e. when the number of categories is not 0.

Well, that’s it! I have added the code segment before the actual content of each post, but I don’t think it makes any difference if the segment appears after the <content> tag. It should work fine anywhere within the <entry> environment.