Showing posts with label Google-Search. Show all posts
Showing posts with label Google-Search. Show all posts

Sunday, January 4, 2015

from pattern.web import Google; google.search()

By Vasudev Ram

Spacweb

$ pip install pattern
# test_pattern_google_search.py
from pattern.web import Google, plaintext

google = Google(language='en') 
for result in google.search('"python"', cached=False):
    try:
        print unicode(plaintext(result.text))
    except UnicodeEncodeError:
        print "UnicodeEncodeError, skipping this tweet"
    except Exception:
        print "Exceptions happen"
$ python test_pattern_google_search.py >t
$ less t # more coffee
The official home of the Python Programming Language.
Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows ...
The original implementation of Python, written in C.
Learn to program in Python, a powerful language used by sites like YouTube and Dropbox.
Python is an easy to learn, powerful programming language. It has efficient high-level data structures and a simple but effective approach to object-oriented ...
Welcome to the 3rd Edition of Learn Python the Hard Way. You can visit the companion site to the book at http://learnpythonthehardway.org/ where you can ...
Python 3.4.2 documentation. Welcome! This is the documentation for Python 3.4.2, last updated Jan 01, 2015. Parts of the documentation: ...
Try Python in your browser ... Best way to learn Python for Raspberry Pi? ... Are there any python package that can intelligently parse strings containing numbers
...
Python 2.7.9 documentation. Welcome! This is the documentation for Python 2.7.9, last updated Dec 28, 2014. Parts of the documentation: ...
You can get xkcd shirts, prints, and posters in the store! Python ... Image URL (for

- Vasudev Ram - Dancing Bison Enterprises

Signup to hear about new products from me.

Contact Page

Sunday, August 5, 2012

Wow, subtle Google search bug

charles could if he would, james would if he could - Google Search

Try to figure out what the bug is.

(I think it is a bug. Could be wrong.)

- Vasudev Ram
www.dancingbison.com

Thursday, July 26, 2012

Google adds 34-button scientific calculator with voice support to Google Search


Google added a large scientific calculator to their flagship Google Search.

Seen here on TechCrunch:

http://techcrunch.com/2012/07/25/google-gets-scientific-adds-a-voice-enabled-34-button-calculator-to-desktop-and-mobile-search/

I tried it out a little, not including the voice stuff. It worked some. Great work, guys!

My comment to Google:

How about just integrating Python into the Google Search box? You could still keep the GUI calculator as a separate option. Then even more complex calculations could be done easily.

Only partly kidding ...

They could use or write something like PythonAnywhere to achieve this.

Or even use the Unix bc command:

Hilary Mason already created a bc Twitter bot which does just that.

Dear Google, don't go all GUI on me ...

Inspired by nature.

- dancingbison.com | @vasudevram | jugad2.blogspot.com