Skip to content

Instantly share code, notes, and snippets.

View laurentperrinet's full-sized avatar
👁️‍🗨️
Busy coding...

Laurent Perrinet laurentperrinet

👁️‍🗨️
Busy coding...
View GitHub Profile
@laurentperrinet
laurentperrinet / flaskplotlib.py
Last active December 23, 2019 15:27 — forked from liuyxpp/flaskplotlib.py
Example of rendering a matplotlib image directly to Flask view
from flask import Flask, make_response, render_template
app = Flask(__name__)
@app.route("/")
def index():
render_template("index.html")
@app.route("/simple.png")
def simple():
import datetime
@laurentperrinet
laurentperrinet / run_notebooks.py
Created November 22, 2018 09:19 — forked from tpogden/run_notebooks.py
Run a Set of Jupyter Notebooks from the Command Line
# ! python
# coding: utf-8
import os
import argparse
import glob
import nbformat
from nbconvert.preprocessors import ExecutePreprocessor
from nbconvert.preprocessors.execute import CellExecutionError
@laurentperrinet
laurentperrinet / nb_remove_output.py
Last active March 26, 2017 07:27 — forked from decabyte/nb_remove_output.py
Remove output from Jupyter notebook from the command line
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""
Remove output from existing Jupyter Notebooks.
Modified from remove_output by Minrk, damianavila, gabraganca.
References:
[0]: https://github.com/jupyter/nbformat
[1]: http://nbformat.readthedocs.org/en/latest/index.html
[2]: http://blog.jupyter.org/2015/04/15/the-big-split/