from IPython.display import YouTubeVideo, IFrame
YouTubeVideo('4SQGJmgnEI8', start=23)
Tools and techniques for sharing notebooks, borne out of personal experience
jupyter nbextension install https://rawgithub.com/minrk/ipython_extensions/master/nbextensions/gist.js
jupyter nbextension enable gist
from nbconvert.preprocessors import ExecutePreprocessor
exp = ExecutePreprocessor(timeout=60)
updated_nb, _ = exp.preprocess(nb, {})
c.JupyterHub.services = [
{
'name': 'nbviewer',
'url': 'http://127.0.0.1:9000',
'cwd': '/home',
'command': ['python', '-m', 'nbviewer', '--localfiles']
}
]
import nbformat
# Here's a simple, valid notebook in Python
simple = {
"nbformat": 4,
"nbformat_minor": 4,
"metadata": {
"kernelspec": {
"name": "python3",
"display_name": "Python 3"
}
},
"cells": []
}
nbformat.validate(simple, version=4)
%%html
<style>
.rise-enabled .reveal pre {
margin: 0 !important;
font-size: 0.7em !important;
}
</style>