Skip to content

Instantly share code, notes, and snippets.

@kikocorreoso
Created September 6, 2014 22:25
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kikocorreoso/696a897280dbbf055517 to your computer and use it in GitHub Desktop.
Save kikocorreoso/696a897280dbbf055517 to your computer and use it in GitHub Desktop.
Duckduckgo magic for he IPython notebook
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