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
"""A one-line description. | |
A longer description that spans multiple lines. Explain the purpose of the | |
file and provide a short list of the key classes/functions it contains. This | |
is the docstring shown when some does 'import foo;foo?' in IPython, so it | |
should be reasonably useful and informative. | |
""" | |
#----------------------------------------------------------------------------- | |
# Copyright (c) 2012 - 2014, Continuum Analytics, Inc. All rights reserved. | |
# |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
# -*- coding: utf-8 -*- | |
#---------------------------------------------------------------------------- | |
# Copyright (c) 2013 - Damián Avila | |
# | |
# Distributed under the terms of the Modified BSD License. | |
# | |
# A little snippet to fix @media print issue printing slides from IPython | |
#----------------------------------------------------------------------------- |
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
{%- macro mathjax() -%} | |
<!-- Load mathjax --> | |
<script src="https://cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML"></script> | |
<!-- MathJax configuration --> | |
<script type="text/x-mathjax-config"> | |
MathJax.Hub.Config({ | |
tex2jax: { | |
inlineMath: [ ['$','$'], ["\\(","\\)"] ], | |
displayMath: [ ['$$','$$'], ["\\[","\\]"] ], | |
processEscapes: true, |
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
ipython nbconvert test_slides.ipynb --to slides --post serve --reveal-prefix "http://cdn.jsdelivr.net/reveal.js/2.6.2" |
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
from flask import Flask, send_file, send_from_directory | |
from watchdog.observers import Observer | |
from watchdog.events import FileSystemEventHandler | |
import os | |
NBCONVERT_PATH = '../nbconvert/nbconvert.py' | |
TARGET_IPYNB = 'presentation.ipynb' | |
TARGET_HTML = 'presentation_slides.html' | |
def nbconvert(): |
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
#!/usr/bin/env python | |
""" | |
simple example script for running notebooks and reporting exceptions. | |
Usage: `checkipnb.py foo.ipynb [bar.ipynb [...]]` | |
Each cell is submitted to the kernel, and checked for errors. | |
""" | |
import os,sys,time |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
""" | |
usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ] | |
""" | |
import sys | |
import io | |
from IPython.nbformat import current | |
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
#!/usr/bin/env python | |
""" | |
simple example script for running and testing notebooks. | |
Usage: `ipnbdoctest.py foo.ipynb [bar.ipynb [...]]` | |
Each cell is submitted to the kernel, and the outputs are compared with those stored in the notebook. | |
""" | |
import os,sys,time |
OlderNewer