Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from IPython.display import display,Javascript
- Javascript('echo("sdfds");',lib='/home/student/Gl.js')
- function echo(a){
- alert(a);
- }
- from IPython.display import display, HTML
- js = "<script>alert('Hello World!');</script>"
- display(HTML(js))
- define(function(){
- var foo = function(){
- console.log('bar');
- }
- return {
- foo : foo
- }
- });
- $([IPython.events]).on('notebook_loaded.Notebook', function(){
- require(['custom/myScript'], function(custom){
- window.foo = custom.foo;
- } );
- });
- %%javascript
- foo();
- %%javascript
- require.config({
- paths: {
- d3: '//cdnjs.cloudflare.com/ajax/libs/d3/3.4.8/d3.min'
- }
- });
- %%javascript
- element.append("<div id='chart1'></div>");
- from IPython.display import Javascript
- #runs arbitrary javascript, client-side
- Javascript("""
- window.vizObj={};
- """.format(df.to_json()))
Add Comment
Please, Sign In to add comment