Sunday, March 19, 2017

Dog And A Mighty And Great Elephant And Bhagvad Gita

A friend sent me this video.





After watching the video I thought... Its only when you are a pregnant dog and you see an elephant who was pregnant at the same time as you and that elephant has already delivered a baby elephant and you are still waiting... you start wondering... did you have a miscarriage and you never knew it? Were you never pregnant in the first place?... Did the elephant steal your puppy and paint it black and stretched its nose beeeeeg...Or did God make you a special dog which has to remain in confinement for 5 years....or do you have a unique baby who will live all his life inside and never come out....

Strange dark thoughts come at times. and you don't know which to believe. 
May be it's better for you to follow Bhagvad Gita's dictum. Do your job.. (get pregnant) and don't worry about the results (child birth). Your time will come. And if it doesn't come there was a good reason for it. 

Saturday, March 18, 2017

Gayatri Mantra And Geeta Chanting

Muslims reciting Hindu Shlokas.

https://yourstory.com/2017/03/meet-5-year-old-firdaus-bhagwad-gita/

See also this video that a friend sent me. (the girl has a lovely voice. and see the person in the podium)




I am reminded of the song Hari Om Man Tadpat - Raag Malkauns - from the 1952 movie Baiju Bawra. The beautiful "Hindu" song was written by Shakeel Badayuni, set to tune by Naushad and sung by Rafi. Now what do you say about that? 

Movie songs in the Raag Malkauns based on its Wiki: 
Man Tarpat Hari Darshan Ko Aaj' (film Baiju Bawra, performed by Mohammad Rafi), 'Aadha Hai Chandrama Raat Aadhi' (film Navrang, performed by Mahendar Kapoor and Asha Bhosle), 'Chham Chham Ghunghroo Bole' (film Kaajal, performed by Asha Bhosle), 'Ankhiyan Sang Ankhiyaan Laagi Aaj (film Bada Aadmi)', 'Balma Maane Na' (film Opera House),  'Gori tera gaon bada pyara' (film Chitchor, performed by K.J. Yesudas). It is rather surprising that I can't seem to identify that all these songs have a common raga and even stranger is the fact that I love most of these songs. The Opera House song and the Kaajal song do seem to have the same tune. Both are dance songs.

Friday, March 10, 2017

Vlookup in Microsoft Excel

Vlookup behavior is a little strange in MS excel,

Here is a sample excel (as a google spreadsheet): Click on the vlookup tab. (Forget the other tabs)

An array with 2 columns is shown in $A2:$B7, Here I want to pick the value from column B when column A = Y. Simple?

Now look at cells E4 and E5, Both use vlookup to get the data from 2nd column when 1st column is Y.

E4 uses an approximate match and E5 uses the exact match (note the change in the last parameter in the two vlookup formula). 

Now I always assume that approximate match is used only when there is NO exact match. But then that is not the case. We find even when there is an exact match, the approximate algorithm overrides. And of course the approximate match expects the first column to be sorted which it isn't - column A isn't sorted.

Now I copy the same values into columns H and I and then sort column H. And now the cells L4, L5 both show the correct value.

The learning:
When you are ONLY looking for an exact match SET the 4th parameter to 0 without fail.

Incidentally, if you go to the "Filtered data" tab, you will see red filled cells F4:I6 showing the use of standard functions such as sum, max, stdev using filtered data. 

And red filled cell C11 shows the use of sumproduct having filters on rows AND columns. The data array is in italics. This is a complex condition which cannot be solved using  SUMIF. SUMIF can sum with filters on either rows OR columns but not both.
Let's go through the formula in cell C11.


=SUMPRODUCT((C4:D6)*(G4:H6)*(A4:A6>=2)*(B4:B6>=4)*(C3:D3="C")) 
The brackets that have equality or inequality act as filters. What we are trying to find out is:  
SUMPRODUCT((C4:D6)*(G4:H6)) subject to the three filters.  
The last filter (C3:D3="C") results in only column C being true, since D3 is blank. 
Now the SUMPRODUCT reduces to:
SUMPRODUCT((C4:C6)*(G4:G6))  
Now
(A4:A6>=2)*(B4:B6>=4) results in only the 6th row being true. The filter on column A eliminates the 4th row. The additional filter on column B removes the 5th row. Each of the filter acts as an AND.

Hence our final SUMPRODUCT reduces to:SUMPRODUCT((C6:C6)*(G6:G6)) = c6*G6= 23*3 = 69.


See how the filters eliminated rows and columns from the calculations. This is a very useful too and should be taught in intermediate or advanced classes of Excel. 

Thursday, March 9, 2017

Indian Rail Guide

I downloaded this app and I was going through its features. Quite a cute little app. 

The menu options (there are few more if you scroll below in the app. They didn't fit into the screen): 




What I didn't like about the app:
  • It would not install on the SD card.
  • I could not find the list of trains between two places.. Every menu option assumes you have the train number. This is inconvenient. I use another app to find the train number and then use it here. I hope I got it wrong. 
  • I couldn't make sense of some of the menu options.
    • "My Favorite Trains (PRS)" shows timetable (TT) only from among those trains in which user has reservations. "My Favorite Trains (All)" potentially shows timetable (TT) of all trains. Why does someone need the former (PRS)?
    • Similarly there is a "Trains Between Stations (PRS)" and "Trains Between Stations (All)". I wonder what the difference between the two is.
    • Unfortunately there is no option to show where the various compartments are in a train rake - meaning where S12, for example, is between the engine and guard compartments.

What I loved about it:

  • Doesn't seem to consume too much internet data -  remember you will not be on broadband when you are traveling. I still am kinda doubtful about the app behavior when the data connection is not good as in 2G/3G mobile data.
  • It has a feature "Current seat availability" you specify a station - the app shows you all the trains departing in the next 4 hours and ticket available by class and train number. I selected the station RJY (Rajahmundry) it showed about 6 trains in which tickets were not available in any class (and I guess to any intermediate station or final  destination in each of the trains). Only one 1st AC ticket was available on the Garib Rath to Hyderabad. See picture to the right.. I chose Rajahmundry because I wanted to see how the feature works on a station that is not a terminus. I checked availability of 3AC ticket in IRCTC.co.in and found that no tickets were available. I checked back on the app. True enough, all trains now showed red. The lone Garib Rath ticket must have been booked in the meanwhile. Of course I have not checked this feature exhaustively. This feature is very useful for people like me who tend to plan a trip on the fly based largely on tickets that are available. It might also be useful for couples that plan to elope. For example, Kareena and Shahid could have used this feature in Jab We Met. See right.
  • The menu item "My Train Tickets" allows you to enter your PNR numbers and then all the train, seat etc details are displayed for each of your PNR. And the PNR details are listed one below the other sorted by date of travel which is very nice. You can then click on a train, you are taken to train schedule.
  • Arrival/Departures Live: You choose a station (I chose Chennai Central). The tool shows you expected departures and arrivals for the next few hours sorted on time. I would have like departures and arrivals to be color coded differently. What is available is still nice. See below.
  • There are couple more interesting menu items. "Special Trains" and "Rescheduled/Canceled/Diverted Trains" See below.

  • The "Coach Layout/Seat Map" option shows where the seats are in a compartment. It is dependent on the train number but depends only on the class of the compartment (such as CC, 3A, SL etc). See below.


  • I checked "Automatic PNR tracking". Whenever PNR status got updated I got notified. I have not yet checked "Automatic Train Tracking". These options are very nice.. But I wonder what the impact will be on battery and data usage. 
Additional reading:

Sunday, March 5, 2017

Check Your English Grammar

90% of the questions are of fill-in-the-blanks type that check you for grammar. Couple of questions ask you to identify the preposition or adverb in a sentence. I thought that was not called for. But anyway...

Popular Posts

Featured Post

Trump's Election Interference

I can think anything that may not be true. And I can say untruths because I have a right to freedom of speech. Based on that thought and wor...