Skip to main content

Posts

Showing posts from 2012

Python Code to Calculate Gini index/coefficient, Robin Hood index, & Lorenz curve

Following Python code can be used to calculate Gini index, Gini coefficient, Robin Hood index, and points of Lorenz curve. Lorenz curve can be also plot if matplotlib is installed. It's based on the steps given by Peter Rosenmai . Download from git repo Other online tools: http://www.wessa.net/co.wasp http://www.poorcity.richcity.org/calculator.htm

Ginger - Content-aware Spelling & Grammar Checker

I have being using Ginger for the last 4 weeks & loving it. It's so good at finding minor mistakes (specially words that are spelled correctly but not the correct word to use) & many missing a's & the's. It walks you through the text pretty much line-by-line as a proofreader. While this is really good, it takes time so run Ginger only on the final version of your document. It doesn’t replace spell checker in Word but a really good addition. Moreover, its free & works with most of the programs we use day-to-day...

StumbleUpon Algorithm

count = 1 while True : //Keep Stumbling     click on "Stumble!" button     if happy with what you see:         break //Stop Stumbling & browse that page or website     if count == 4: //Click 4 times.         break //No point in trying again you'll be disappointed again. Go & do something else.     count += 1 //Keep trying This work for me most of the time. May be It'll work for you...

BitTorrent Search Engine/Site Survey

We are conducting an academic research study on use of BitTorrent search engines/sites. Please help us by:   * Completing the survey    * Sharing survey link with your friends on Facebook, Google+, Twitter, blogs, e-mails, etc. for wider participation Link - http://www.cnrl.colostate.edu/Projects/CP2P/BTSurvey/ Time - ~3 minutes This survey is conducted by the Computer Networking Research Laboratory (CNRL) of the Colorado State University, USA.

OverSim vs. Overlay Weaver

Quick comparison on OverSim & Overlay Weaver OverSim Overlay Weaver Simulator Emulator OMNet++ based Stand alone package C++ based. Some parts of the code is expected to be use for production Java based. Code is expected to be use for production GUI for demonstrations - more features GUI for demonstrations No documentation - High learning curve No documentation - High learning curve Statistics, visualizing tools, vectors (time series) Some statistics Many built in overlays - Chord, Pastry, Bamboo, Koorde, Broose, Kademlia, GIA, NICE, NTree, Quon, Vast, & Publish-Subscribe Built in overlays - Chord, Kademlia, Koorde, Pastry, Tapestry & FRT-Chord Built in routing modes - Recursive, iterative, semi-recursiv, exhaustive-iterativee Built in routing modes - Recursive, iterative Built in applications - DHT, i3, scribe, P2PNS, KBRTestApp, DHTTestApp, & SimpleGameClient DHT & multicast Relatively Fast - Up to 100,000 nodes Several thousand. Underlay - simple &a

Discrete Event Engine - Python

Following Python Discrete Event Engine (DES) can be use to build many discrete event simulators. It supports any data type or object and is capable of handling large event lists (use binary search to sort events). See source code for details. Download from git Repo Usage: from DES import DES events = DES() #Add set of events #event time, event type, node/customer/server ID, data events.addEvent(5.5, 'Type1', 1, 'Test data 1') events.addEvent(3.3, 'Type2', 2, [1, 2, 3, 4]) events.addEvent(1.5, 'Type3', 3, 567890) events.addEvent(9.9, 'Type4') events.addEvent(8.6, 'Type3', 1, 'Test data 5') #remove event #Provide at least event time & type events.removeEvent(3.3, 'Type2', 2) #Get remaining events in chronological order event = events.getNextEvent() print event.startTime, event.eventType event = events.getNextEvent() print event.startTime, event.eventType event = events.getNextEvent() print eve

Yes, I hail starting private universities. But! - A Lecturer's Perspective

We are proud and privileged to teach the cream of the crop. We cherish when those students succeed in their endeavors. Most of us continue to stay in public universities mainly because of the intellectual challenges that these students present even at the expense of many monitory benefits. We hail them not only for their academic success but also for their all round abilities. This is about to change and what can we do about it? I personally believe expansion of either public or private higher education is a must for any country. Anyone should be able to get the education they desire regardless of their performance in school, work, age differences, geographic location, economic, or ethnic background. Technological advancements are breaking these barriers and enabling everyone to learn at their own phase. Like it or not, it is the way forward. I see far more benefits in starting private universities in Sri Lanka. If a private institution can offer an undergraduate degree under Rs.