Skip to content

Instantly share code, notes, and snippets.

@brazilbean
brazilbean / preprocessors.py
Created March 29, 2017 17:41
Custom Jupyter Notebook Pre-processors
'''Specialized Preprocessors'''
import nbconvert, nbformat, re, sys
from nbconvert.preprocessors import ExecutePreprocessor, Preprocessor
from traitlets import Dict, Unicode
from textwrap import dedent
from warnings import warn
def warn_deprecated(msg):
'''Raise a DeprecationWarning'''
@brazilbean
brazilbean / Gist - Creating reports using Jupyter Notebooks - Output.ipynb
Created July 22, 2016 17:04
Gist - Creating reports using Jupyter Notebooks - Output
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brazilbean
brazilbean / Gist - Creating reports using Jupyter Notebooks.ipynb
Last active July 20, 2022 09:12
Create a report using a Jupyter Notebook
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brazilbean
brazilbean / ModuleMagic Demo
Created April 2, 2015 21:11
Cell magic for IPython/Jupyter notebooks - %%module
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# The ModuleMagic cell magic\n",
"Gordon Bean, April 2015"
]
},
@brazilbean
brazilbean / declaring_variables_in_anonymity.m
Last active December 20, 2015 21:19
Functional Programming in Matlab - Declaring variables in anonymous functions
% Consider the scenario where you want to declare
% an anonymous function to do some task, but it
% requires multiple uses of a result that is
% expensive to compute.
% For example, consider the following series of statements:
a = rand(1000);
b = rand(1000);
c = a * b;
[a./c b./c]
@brazilbean
brazilbean / Scripture Crawler - GraphML.ipynb
Created May 6, 2013 22:05
IPython Notebook for crawling the LDS Scriptures footnote network (scriptures.lds.org). It uses BeautifulSoup (http://www.crummy.com/software/BeautifulSoup/).
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.