Last active
June 27, 2016 21:07
-
-
Save hainm/59b3b8da9ef96567edff656e2d6835e8 to your computer and use it in GitHub Desktop.
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
define([ | |
'jquery', | |
'base/js/namespace', | |
'base/js/events' | |
], function ( | |
$, | |
IPython, | |
events | |
) { | |
var run_all_cells = function(){ | |
var cells = IPython.notebook.get_cells(); | |
for (var i=0; i < cells.length; i++) { | |
var cell = cells[i]; | |
cell.execute(); | |
} | |
}; | |
var load_ipython_extension = function() { | |
events.on('kernel_ready.Kernel', run_all_cells); | |
}; | |
return { | |
load_ipython_extension : load_ipython_extension | |
}; | |
}); | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment