Created
September 6, 2014 22:25
-
-
Save kikocorreoso/696a897280dbbf055517 to your computer and use it in GitHub Desktop.
Duckduckgo magic for he IPython notebook
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from IPython.display import IFrame | |
def ddg(self, arg): | |
phrase = arg.replace(' ', '+') | |
url = "https://duckduckgo.com/?&q={0}".format(phrase) | |
return IFrame(url, 600, 400) | |
ip = get_ipython() | |
ip.define_magic('ddg', ddg) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment