Spread your wings

April 24, 2014

The very first time a baby bird tumbles of its nest it has one of two options. It can give in to the fear, forget what it was designed for, and plummet to the earth. Or it can spread its wings, draw forth all its courage, and leap into that great big sky with the intention of soaring across it. You are now faced with a similar choice. You are no baby bird, but you are just as sensitive and at times as vulnerable. But if you make up your mind, there is noting you cant do. Spread your wings.

Advertisements

How do you find the current url of a document in phantomjs ?

February 24, 2014

If you simply do the following in PhantomJS:

1
console.log( "- current url is " + document.URL );

then you will see the javascript filename you are running with PhantomJS.

If you want to see the URL of the currently loaded page, however, then you have to do it within the loaded page’s sandbox:

1
2
3
4
5
6
7
var url = page.evaluate(
    function () {
        return document.URL;
    }
);
 
console.log( "- current url is " + url );
 

Difference between text based, headless and normal browser

February 24, 2014

http://www.zenmeo.com/wordpress/what-is-headless-browser-the-list-of-headless-browser/


How to find the memory consumption of a particular process in linux for every 5 seconds

December 19, 2013

top -p PID


Methods of Data Collection and Biases

September 30, 2013

Methods :

  1. Simple Random Sampling
  2. Stratified Sampling – divide the population into non-overlapping subgroups called strata and choose SRS within each subgroup. Thus the variance within each subgroup is less than the overall population variance.
  3. Cluster Sampling
  4. Systematic Sampling – select the kth item – hidden patterns
  5. Convenience or Volunteer Sampling : select the first n points
  6. Convenience or Volunteer Sampling

 

Bias : 

  1. Selection Bias – predicting polls from twitter data.
  2. Measurement or Response Bias – the type of questions such that the people who answer it differ from the people who are not answering it. 
  3. Non-response Bias – if the individuals responding differ systematically from the people who are not responding. For example : a mandatory survey in canada which was sent to 1/5th of the people was changed to optional and was sent to 1/3rd of the people. Since, the response was voluntary and not mandatory, new immigrants were much less likely to respond to this survey.

MoneyBall review

September 25, 2013

Michael Lewis has a gripping writing style. He talks about different industries. Two years back, I had read Lewis Poker, before I joined investment banking. At that point of time, I had only some idea that I had gathered from variable sources on the internet about banking. What I found in Lewis Poker was that Michael Lewis made me feel a part of the industry. Two years later, now that I am reading Moneyball, I am going through the same feeling again. He talks about terms like “a soft tosser” which means not worth my time which the scouts used, .. which makes me feel that I am a part of the industry. His way of engaging the reader is emphatic.

Michael Lewis builds his character in front of the reader and then names the character. The reader goes through the process of transformation of the character quickly and this relates easily. He introduces the character David Beck and gives illustrations of how his hand might twist and turn in different directions. The reader can almost see that in front of him and then he names the David Beck as “The Creature”. Its as if, the reader sees his arms movement and then hears his name and agrees to the fact that he should be called “The Creature”.

WIP


Quotes from the Moneyball

September 25, 2013
  1. The human mind played tricks on itself when it relied exclusively on what it saw, and every trick it played was a financial opportunity for someone who saw through the illusion to the reality.

  2. sd
  3. sd
  4. sd

WIP