Contact
CoCalc Logo Icon
StoreFeaturesDocsShareSupport News AboutSign UpSign In
| Download

All published worksheets from http://sagenb.org

Views: 168742
Image: ubuntu2004
def embed(url): id = sage.server.notebook.interact.SAGE_CELL_ID html('''<script> id = %d elem = document.getElementById('iframe_' + id); if (elem) { document.getElementById('cell_div_output_' + id).removeChild(elem); } if (!elem) { elem = document.createElement('div'); elem.setAttribute('id','iframe_' + id); } elem.innerHTML = '<iframe id="iframedata" src="%s" style="height: 30em; width: 50em;">Hello!</iframe>' document.getElementById('cell_div_output_' + id).appendChild(elem); </script>''' % (id, url))
engine_dict = { 'arxiv' : 'http://arxiv.org/search', 'front' : 'http://front.math.ucdavis.edu/search?q=', 'google' : 'http://www.google.com/search?q=', 'python' : 'http://www.google.com/search?as_q=site%3Adocs.python.org&q=', 'sage_groups' : 'http://www.google.com/custom?as_q=more:group&hl=en&client=google-coop-np&cof=FORID%3A13%3BAH%3Aleft%3BCX%3ASage%2520Infobase%3BL%3Ahttp%3A//www.google.com/coop/intl/en/images/custom_search_sm.gif%3BLH%3A65%3BLP%3A1%3BVLC%3A%23551a8b%3BGFNT%3A%23666666%3BDIV%3A%23cccccc%3B&adkw=AELymgWTTzvpoYsc_s7Np4sJ8KRz2KQrfROd8irzvyy31imt9iGiffg4X-EFUIs2XJZpUyorgWisnUJQNU_yVoluiTn9eqQbT5OYBgw-JOnxrLqxKNvyGWIUDFq5CWR5T_bJpppvtLm9W8PWu6iduoCcVGK_tuYPB0ll2KiOBi-hKPdKxnqfSxr53lQn92MFVHOQvkZomGI5rzMUIRxbmqQysqwTeXZWfg&boostcse=0&cx=017384562579735769466%3As27byrlaffu&q=', 'sage_trac' : 'http://trac.sagemath.org/sage_trac/search?noquickjump=0&q=', 'sage_ticket' : 'http://trac.sagemath.org/sage_trac/search?noquickjump=0&q=%23', 'wiki' : 'http://www.wikipedia.org/search-redirect.php?language=en&search=', 'youtube' : 'http://youtube.com/results?search_query=' }
def search(phrase, engine='google'): embed(engine_dict[engine.lower()] + phrase.replace(' ', '%20'))
embed('http://www.sagemath.org/doc/tutorial/tour_rings.html')
search('metric space', 'wiki')
search('5822','sage_ticket')