Skip to content

Instantly share code, notes, and snippets.

@hainm
Last active June 27, 2016 21:07
Show Gist options
  • Save hainm/59b3b8da9ef96567edff656e2d6835e8 to your computer and use it in GitHub Desktop.
Save hainm/59b3b8da9ef96567edff656e2d6835e8 to your computer and use it in GitHub Desktop.
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