[64faee]: / ndv / utils / run_notebook.py

Download this file

10 lines (7 with data), 306 Bytes

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#!/usr/bin/env python
import nbformat, fire
from nbconvert.preprocessors import ExecutePreprocessor
def run_notebook(path):
nb = nbformat.read(open(path), as_version=nbformat.NO_CONVERT)
ExecutePreprocessor(timeout=600).preprocessor(nb, {})
if __name__ == '__main__': fire.Fire(run_notebook)