Posts Tagged ‘google’
Posted on April 21, 2009 - by Sarath
Summer of Code 2009

Voila. For the second time, I got selected for Google Summer of Code (2009). This time I am going to work with the mentoring organisation Pardus.
I will be working to develop a Web based Custom distro creater tool for Pardus Project.
Project url : http://socghop.appspot.com/org/home/google/gsoc2009/pardus
Posted on October 28, 2008 - by Sarath
define – A lovely utility
I frequently use Google for finding several definitions. It feels always painful to run browser every time to grab some definitions. Being a terminal lover, I always wanted to do it on commandline. I wrote a few lines of python code, and its done.
I love this utility.
Cheers !
import urllib2,re,sys
def usage():
if sys.argv.__len__() is not 2:
print "usage: define < word >\n"
else:
txt = define(sys.argv[1])
if txt is not None:
print '\n\033[31mDefinition of ' + sys.argv[1].upper() + ':\033[0m\n'+ txt+ '\033[0m\n'
else:
print "\nNo definition found\n"
def define(str):
opener = urllib2.build_opener()
opener.addheaders = [('User-agent', 'define grabber by t3rm1n4l')]
try:
txt=opener.open('http://www.google.com/search?q=define:'+ str)
txt=txt.read()
regex = re.compile("<li>[a-zA-Z,. ]*\.\.\.")
obj = regex.findall(txt)
return obj[0][4:]
except:
pass
usage()
UPDATE: toolz suggested me that it would be nice to print all the definitions avaliable.
So I have updated the script with more options
get it here
Google is playing more with User-agent strings. You won’t find same search results for different User-agent strings
. That’s fun.
$ define keyword -4 # For printing 4 definitions
$ define keyword # prints 1 definiton

Posted on July 30, 2008 - by Sarath
Summer of coders at Google R & D, India
I have been on a trip to Bangalore since last three days. We had a google summer of coders meetup at Google R & D, Bangalore. Anyway it was a splendid experience. Awesome ! Nothing more to describe.
The meet was scheduled for 24th of July 11 am – 3 pm. I reached google R & D little bit late around 15 mins. It was not my mistake, the Bangalore traffic jams are fun than (more…)



Solve real-world shell scripting problems with over 110 simple but incredibly effective recipes.

