Posted: May 24th, 2009 | Author: Anuradha Uduwage | Filed under: Life in Sri Lanka | Tags: Sri Lanka, Travel | No Comments »
After 24 hours of flying finally I am home and this time its special for the first time there is no war in Sri Lanka. Coward Prabakaran is dead, Sri Lankan Army Crushed them. From the time I landed in Colombo Airport, I saw in everyone’s face that there is hope. Hope that this country will be peaceful place and a develop country without no LTTE.
Also for the first time i was able to surprise my parents. They had no idea about my trip and I wanted to do this for their wedding anniversary. So far I am on track, they were so surprise that when I rang our door bell my mom thought I was a thief.
Posted: May 21st, 2009 | Author: Anuradha Uduwage | Filed under: Life in Sri Lanka, Music and Me | Tags: Lyrics, SL Army | No Comments »
War without casualties is an impossible task. Even though we don’t know how many of our soldiers sacrifice their lives to end this war, its not hard to do an educated guess on that number. When I think about it, I feel so guilty that I am here in United States working on my graduate degree while my fellow brothers and sisters are on the battle field to save my life. But at the same time everyone cant go to the war. Each individual can contribute in many ways.
But, I wrote this song to show my gratitude to our armed forces. And I wanted to show the world that a Soldier is another human and he also has a softer side, who has feelings like everyone else in the world. I do my job for pen and pencil and it happened to be that soldier needs a gun to do his job.

Mobitel hands over the song to Mr Gotabaya Rajapaksha
Posted: May 20th, 2009 | Author: Anuradha Uduwage | Filed under: Life in Sri Lanka | Tags: Add new tag, SL Army, Sri Lanka | No Comments »
As usual US can never mind their own business. Don’t you guys have enough problems? If you have forgotten, I just like to remind, Economy, war in Afganistan, war in Iraq. So for a change why dont you go take care of those issues.
Sri Lanka doesn’t need some big brother to tell what to do. We have politicians that get elected from people’s vote, they will do that Sri Lankan’s ask them to do, and US, You don’t have to worry about us. Where were these Senators when US were shelling Iraq and killing thousands of innocent civilians while hunting down Sadham Hussain? A country that can’t finish a single war they started but try to advise entire world on how to do things, and if that country fails to listen what does US do? US hold on to giving away the funds, which I called chump change. At the end of the day, those funding goes back to US via all these NGO.
Biggest thing US can’t figure out is that “How the hell an Army from a developing country destroy worlds NO:1 Terrorist organization”? Bin Laden and gang is nothing comparing to LTTE, what does Al qaeda do, they hide in mountains and send rockets. LTTE, had the power from Land, Air and Sea, but we all saw how SL Army crushed them to death. So, as usual US can’t take it that developing country has a better military tactics than US. Both Obama and Hillary play the political game at their best. We all saw that, how did the LTTE based funding that Hilary got during her campaign started to make its headway.
Posted: May 18th, 2009 | Author: Anuradha Uduwage | Filed under: Life in Sri Lanka | Tags: SL Army, Sri Lanka | 1 Comment »
For the first time in my life time, Sri Lanka is a free country from war. Every day I watch news and I see our brothers are fighting against LTTE Terrorists and my eyes get filled with tears. Simply because the sacrifice our Sri Lankan Army is making to save our country from these LTTEs. But today is a proud moment for every single soldier who fought this war. Because no more Prabakran and not more LTTE. Sri Lankan Army crushed the LTTE dream.
Posted: May 1st, 2009 | Author: Anuradha Uduwage | Filed under: Facebook, Java Ruled | Tags: Data Mining, Facebook | No Comments »
So far the Our Data Mining Implementation for Facebook Data is going really good, I am currently working on an algorithm to identify 1 and n items sets out of our raw data set using the extraction I build earlier. But I just finished writing a sweet little code to pivot 3 million user records.
Our implementation has a DB.java file that handles all our DB call and direct sql stuff, I know what you thinking we could have use some fancy hibernate but this is fast paced development so we dont have time to work with hibernate stuff.
1 2 3 4 5 6
| // connect to the database, any database connection changes should take
// place in DB.java
DB db = new DB();
DB db2 = new DB();
db.init();
db2.init(); |
Call a DB.java to get disntinct type sub type facebook groups, and dump them in Java String Vector.
1 2 3 4 5 6 7 8 9 10 11 12 13
| // get the type and sub type
Vector<Vector<String>> grpTypeSubType = new Vector<Vector<String>>(
db.getTypeSubType());
// printing all the type sub type pairs as column headers
//System.out.print("UserId, ");
ps1.print("UserId, ");
for (Object object : grpTypeSubType) {
if(!object.toString().equals(null)) {
System.out.print(object.toString() + ",");
ps1.print(object.toString() + ",");
}
} |
Here we go fun begins, this loop ran 38 hours and finished the pivoting for 3m records.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
| // get user id vector and find type and subtype for each userid.
Vector<Long> users = new Vector<Long>(db.getDistinctUID());
ResultSet fbUsers = db.getUsers();
System.out.println();
ps1.println();
System.out.println("Start Pivot..");
while (fbUsers.next()) {
Long userId = fbUsers.getLong(1);
//System.out.print(userId + ",");
ps1.print(userId + ",");
String groupType = null;
String typeSubtype = null;
int count = 0;
for (Vector<String> vs : grpTypeSubType) {
groupType = vs.get(0);
typeSubtype = vs.get(1);
if(groupType != null && typeSubtype != null) {
count = db2.getTypeSubTypeCount(userId, groupType, typeSubtype);
if (count > 0) {
//System.out.print("Y, ");
ps1.print("Y, ");
} else {
//System.out.print("N, ");
ps1.print("N, ");
}
}
}
//System.out.println();
ps1.println();
}
fbUsers.close();
ps1.close();
System.out.println("Done pivot, check the file");
} |
You can get more information on our Data Extraction and FB Data Mining implementation at Google Code under GNU General Public License v3. Also you are more than welcome to use multiple Preprocessed data sets that I formatted to fit in applications like Weka etc.
Recent Comments