I like setting up shortcuts to frequently used commands whether I used Windows or Linux. I use the terminal often and create shortcuts to frequently used commands using “alias” feature of BASH. This has saved me considerable time in the past. However, I recently felt that if I could have a helper tool to monitor [...]
Categories: linux,programming,python,text processing,Uncategorized,veveo
Tagged: bash, linux, productivity, python, script
- Published:
- August 28, 2009 – 8:05 am
- Author:
- By prashanthellina
Here is a simple utility created using Python for translating text from various languages into English. It uses the Google AJAX API to do this. Usage prashanth@prashanth-desktop:~$ translate bonjour hello prashanth@prashanth-desktop:~$ translate guten morgen Good morning
Categories: programming,python,web
Tagged: google, language, python, script, tool, translation
- Published:
- August 18, 2009 – 7:33 pm
- Author:
- By prashanthellina
Some time back I had done some work on extracting topics from an arbitrary piece of text using Wikipedia data. Recently I thought of a concept to put that algorithm to work. As a part of this project, I need to extract relevant text from an arbitrary HTML page. By relevant I mean the “meat” [...]
Categories: programming,python,text processing,web
- Published:
- July 27, 2009 – 4:46 pm
- Author:
- By prashanthellina
As a part of a project I am working on, I had to cluster urls on a page. After some light googling I found, python-cluster. You can find below a simple python script to illustrate the usage of python-cluster library.
Categories: programming,python,text processing
Tagged: clustering, python, script
- Published:
- July 25, 2009 – 9:24 am
- Author:
- By prashanthellina
I am trying to write a program to test my arithmetic skills. The program should pose arithmetic problems involving the four basic operations – addition, subtraction, multiplication and division. When the testing session starts, the program should issue problems of less difficulty and the difficulty should be ramped up gradually. A score should be computed [...]
Categories: math,programming,python
Tagged: arithmetic, arithmetic algorithms, borrow, carry, long division, math, problem difficulty, problem generator, python
- Published:
- July 27, 2008 – 10:09 pm
- Author:
- By prashanthellina
The first programming language I coded in is QuickBasic. I loved the simplicity and especially the IDE. It made things simple for a starter. Later I discovered Visual Basic which extended the same simplicity and added the “Visual” element with a splendid editor for GUI. In between I did some projects using Java, C#, C, [...]
Categories: programming,python,ubuntu,veveo
Tagged: C, coding, java, perl, programming, python, readability, VB, visual basic
- Published:
- July 11, 2008 – 8:34 am
- Author:
- By prashanthellina
What, why I’ve been reading up on TDD and it has struck me as particularly useful methodology to achieve “clean code that works”. TDD encourages writing unit tests to cover all the code (because by definition, you write a test before a line of code is written). Because all your code is covered you are [...]
Categories: linux,programming,python
Tagged: linux, nose, programming, python, tdd, testing, tools
- Published:
- May 22, 2008 – 8:20 pm
- Author:
- By prashanthellina
I’ve been working on Wordza.com for which I needed Ngram data from a sufficiently large corpus. Initially, I thought of using Wikipedia data which I already have on my disk, but decided on using Project Gutenberg data as it is more representative of the general usage of English language.
Categories: data mining,linux,programming,python,text processing
Tagged: gutenberg, ngrams, project gutenberg, python, text parsing
- Published:
- May 4, 2008 – 9:58 pm
- Author:
- By prashanthellina
What is Alexa rank? Alexa collects statistics about visits by internet users to websites through the Alexa Toolbar. Based on the collected data, Alexa computes site ranking. By examining the Alexa rank of a site, you can get a rough idea of how popular the site is. Many argue that Alexa rank is misleading but [...]
Categories: programming,python,web
Tagged: alexa, alexa rank, programmatically, python, script, xml
- Published:
- April 22, 2008 – 11:07 pm
- Author:
- By prashanthellina
I have come across more than one instance when I had to select a random record from a table in a MySQL database. Here is how to do it.
Categories: linux,programming,python
Tagged: database, mysql, query, random record, tip
- Published:
- April 8, 2008 – 9:30 pm
- Author:
- By prashanthellina
I recently came to know that NCERT was providing all the text books (class 1 – 12) for download. However, I found their interface hard to use for browsing through. So I wrote a crawler in python to get all the books to my webserver. Along with storing the books, I generated thumbnails for every [...]
Categories: books,python,web
Tagged: crawler, ncert, python, textbooks
- Published:
- February 6, 2008 – 9:01 pm
- Author:
- By prashanthellina
I have always been a fan of visualizations as I believe firmly that it is easier to crunch visual information than anything else. Visualizations are especially helpful for finding out patterns in data that are not expected and for patterns that are difficult to express textually in a concise manner. The beast A couple of [...]
Categories: python
Tagged: call graph, code, dot, graphviz, python, refactoring, visualization
- Published:
- November 14, 2007 – 8:23 am
- Author:
- By prashanthellina
I was digging through some old code of mine when I came across this script. To me, this script was a demonstration of the beauty and elegance of the python language. You might have come across a puzzle like this: AID + ICED = IDEA. What digits would you assign to the characters A,C,D,E,I so [...]
Categories: programming,python
Tagged: programming, puzzle, python, word arithmetic
- Published:
- August 26, 2007 – 6:39 pm
- Author:
- By prashanthellina
This is related to the previous post and is meant in part to demonstrate how great Linux is for doing “weird” stuff . This is what we are trying to do. The circles in the background have been drawn by the python script below. To get the script running you should have python and pygame [...]
Categories: linux,python
Tagged: desktop, gnome, graphics, linux, programming, python
- Published:
- August 24, 2007 – 8:13 am
- Author:
- By prashanthellina