Skip to content

Instantly share code, notes, and snippets.

View damianavila's full-sized avatar

Damian Avila damianavila

View GitHub Profile
#!/usr/bin/env python
"""
git fuzzy-checkout
Same as `git checkout branch`, but with fuzzy matching if checkout fails.
Turns `git checkout barnch` into `git checkout branch`,
assuming `branch` is a branch.
"""
import difflib
#!/usr/bin/env python
"""
git fuzzy-checkout
Same as `git checkout branch`, but with fuzzy matching if checkout fails.
Turns `git checkout barnch` into `git checkout branch`,
assuming `branch` is a branch.
"""
import difflib
@damianavila
damianavila / using_local_reveal.ipynb
Last active December 19, 2015 14:38
Config the Reveal exporter to use a local reveal.js library instead of a CDN.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@damianavila
damianavila / reveal.js
Created June 16, 2013 19:36
Reveal extension for metadata editing.
//----------------------------------------------------------------------------
// Copyright (C) 2012 The IPython Development Team
//
// Distributed under the terms of the BSD License. The full license is in
// the file COPYING, distributed as part of this software.
//----------------------------------------------------------------------------
//============================================================================
//CellToolbar Example
//============================================================================

What

Roll your own iPython Notebook server with Amazon Web Services (EC2) using their Free Tier.

What are we using? What do you need?

  • An active AWS account. First time sign-ups are eligible for the free tier for a year
  • One Micro Tier EC2 Instance
  • With AWS we will use the stock Ubuntu Server AMI and customize it.
  • Anaconda for Python.
  • Coffee/Beer/Time
"""Simple utility script for semi-gracefully downgrading v3 notebooks to v2"""
import io
import os
import sys
from IPython.nbformat import current
def heading_to_md(cell):
"""turn heading cell into corresponding markdown"""
#!/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
"""
usage: python remove_output.py notebook.ipynb [ > without_output.ipynb ]
"""
import sys
import io
from IPython.nbformat import current
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/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