-
-
Save jolij/edb65047fe3eaa5e4e00 to your computer and use it in GitHub Desktop.
Duckduckgo magic for he IPython notebook
This file contains 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