"A meek endeavor to the triumph" by Sampath Jayarathna

Friday, September 28, 2012

SL2College.org Forum Question: Taking the GRE in India / Will the SUBJECT test be a plus?


If you know anyone who took GRE exam in India, please share your experience (comment here) or you can post an answer in the SL2College forum.  

Here's the link for the original post: 

Taking the GRE in India / Will the Subject Test be a plust?
by HansiniG » Sep 25th, '12, 03:05 
HI, 
I am planning to take the GRE at Chennai, India, because the next date in Lanka is too late. Has anyone done it like that before? I need some tips/ advice. Please help. 
well, my other question is, will doing the subject test add points to my application. I have a GPA of 3.7. If I can invest my time on the general test, I am sure I can get a good score for it too... I feel that I don't have enough time to prepare for the Subject Test. Please advice
Thank you

T20 Cricket World Cup - My Predictions for Semi and Finals

I'm looking at the live match of the T20 Cricket World Cup Group 2 between India and Australia. Seems to me, Australia is winning, at least they are somewhere in gettable 140 mark in after Indian innings. So far, Sri Lanka and West Indies are ahead in the Group 1 standings and probably Pakistan cricket team and Australia going to be on top of Group 2.

Time for me to do some predictions for the Semi Finals and Final match. I don't really go with the statistics of previous matches or current matches and rankings. I have never played Cricket for my school team nor I did play any professional cricket. I'm just another hearty cricket spectator (tennis ball) like anyone else, who gets up even mid night to watch a match (if only Sri Lanka is playing) even it is 5 day test (all day) or One Day International Cricket. I'm on the other side of the world, still I pretty much addicted to this  game like any other subcontinent spectator. I don't really an extreme cricket lover by the way, I don't fancy to buy an expensive ticket to go and watch live in the ground. I'm pretty much in my comfort zone, in front of TV or here in US, in front of my laptop (5am in the morning US Central time) watching the live streaming thanks to ESPN. I pretty much love the fact that I can see the replays and listen to the commentators than the loud and live experience in the cricket ground.

OK, enough rambling, time to go back to predictions :)

Group 1
Pakistan
Australia
India
South Africa

Group 2
West Indies
Sri Lanka
New Zealand
England

With the current standings and how each team play, I must say, the most possible scenario for the Semi Finals are,

Group1: Australia, Pakistan
Group2: West Indies, Sri Lanka

So, the Semi Finals

Sri Lanka Vs Australia
Pakistan Vs West Indies

Finals
Sri Lanka Vs West Indies

and yes I'm rooting for Sri Lanka for winning this T20 Cricket World Cup. Go Lions!

What do you think? No statistics, just by heart?

Thursday, September 27, 2012

Google Nexus HD $199? and iPad mini $250? I'm soo ready!

With the roaring 7-inch tablet market right now, I'm more inclined to buy one than the iPhone 5. I'm pretty much satisfied with my iPhone 3GS but something with bigger screen and better battery life (of course siri too) would be cool. But the price tag for the data is not the ideal for my pocket. Just $20 bucks for a data plan and another $60+ something would definitely going to put me above $100 monthly margin again. With my current monthly package, I'm already paying close to $100 bucks and almost 2 years. So, its time for me to move on (bye bye AT&T) from monthly packages (this November 2012 after my 2 year contract ends) and find may be $30 Tmobile prepaid package.  

Still with my home wifi and TAMU wifi, I can definitely spend some money for a tablet. Not the iPad, thats crazy with a $400 price tag, who wants to spend that much for a tablet? My ideal price tag is $200-$300 and even upper bound is not something I'm willing to pay for a device which is going to lose the shine after other competitors comesup with new specs. So, I'm looking right now for the rumored iPad mini, which is said to be in $250 price range (probably $300), and Google Nexus HD in $199 price range. If the rumors are correct, iPad mini is going to be revealed this October 2012 and Google Nexus in late November before X'mas season. 

So, what I expect? Here's my ideal hardware specs for a tablet device. If Google comes any closer to it with a $199 price tag, I'm sold in pulse. If not, iPad mini seems to be the way to go,

My ideal hardware specs (September 27, 2012)
Cameras: Front and Rear Facing Dual cameras
Screen: 7+ inch
Processor: 1.3Gz, Quad-core
RAM: 1GB, ideal 2GB
Expandable Storage: upto 64GB
Speakers: Dual stereo with Dolby
Resolution: Retina or something 1280x800 , 216 ppi
Connectivity: wifi only (3G ideal but I don't think in $200 price range)
HDMI-out: Yes definitely
USB: Yes definitely with capability to plug in external hard drives or thumb drives
Storage: 16GB

With that, look at the current specs of the best 7 inch tablets in the market. Seems to me Kindle HD is the best but hopefully Nexus HD and iPad mini will trump the specs within couple of months. 

No matter any hardware specs, such a Nexus HD tablet would certainly be a sweet surprise for the holidays, I'm just not holding my breath.


Wednesday, September 26, 2012

Best Sri Lankan Books (Political Joke)

One of the best piece of Sinhala Joke I read for a while.....lol
Author unknown, but I must say, its a pretty good and unbiased. Made me chuckle while reading... :)



Saturday, September 22, 2012

Best of "The Voice" Season 3 - My Favorites

The Voice Season 3 has started with the blind audition and I'm already rooting for several of the singers. My votes so far for,

Melanie Martinez's - "Toxic",
Bryan Keith's - "It will Rain"
Benji's  "Knockin' on Heaven's Door"

 
 
 



Friday, September 21, 2012

Reading and displaying tf vector content of Apache Mahout SequenceFile

This java code segment reads through the Apache Mahout SequenceFile (generated by the Mahout seq2sparse tool), to display the tokens and their tf values. The code uses the dictionary file to map the token index to token in the dictionary.

You can read the Mahout Wiki on creating vectors from Text Documents. I have created tf vectors from a directory of documents and followed the process explained in the wiki.  You basically need to run Mahout seqdirectory tool to create intermediate SequenceFile and then seq2sparse tool to create the tf vectors and dictionary file. Then you can use my code to examine the content of the SequenceFile and identify which terms in a document get higher term frequency and do further research.

In first few lines, the code reads and populate a HashMap of the dictionary file created by the Mahout seq2sparse tool and next the reader reads the tf-vectors of the SequenceFile and each of the token of the tf vectors are mapped from the dictionary map.  You may need to import some of the followings,

import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.SequenceFile;
import org.apache.hadoop.io.Text;
import org.apache.mahout.math.NamedVector;
import org.apache.mahout.math.SequentialAccessSparseVector;
import org.apache.mahout.math.Vector;
import org.apache.mahout.math.VectorWritable;
import org.apache.mahout.math.Vector.Element;

public static void readMahoutSequenceFile()
{
 Configuration conf = new Configuration();
 FileSystem fs;
 SequenceFile.Reader read;
 try {
  fs = FileSystem.get(conf);
  read = new SequenceFile.Reader(fs, new Path("/Sparsedir/dictionary.file-0"), conf);
  IntWritable dicKey = new IntWritable();
  Text text = new Text();
  HashMap dictionaryMap = new HashMap();
  try {
      while (read.next(text, dicKey)) {
         dictionaryMap.put(Integer.parseInt(dicKey.toString()), text.toString());
      }
   } catch (NumberFormatException e) {
       e.printStackTrace();
   } catch (IOException e) {
       e.printStackTrace();
   }
   read.close();
         
   read = new SequenceFile.Reader(fs, new Path("/Sparsedir/tf-vectors/part-r-00000"), conf);
   Text key = new Text();
   VectorWritable value = new VectorWritable();
   SequentialAccessSparseVector vect;
   while (read.next(key, value)) {
        NamedVector namedVector = (NamedVector)value.get();
        vect= (SequentialAccessSparseVector)namedVector.getDelegate();
        for( Element  e : vect ){
           System.out.println("Token: "+dictionaryMap.get(e.index())+", TF-IDF weight: "+e.get()) ;
          }
         }
         read.close();        
  } catch (IOException e) {
   // TODO Auto-generated catch block
  e.printStackTrace();
 }
}