Skip to content

Instantly share code, notes, and snippets.

@jhamrick
jhamrick / make_feedback_notebook.py
Created February 9, 2016 16:29
An example of how to programmatically generate a feedback notebook for nbgrader
import os
import pandas as pd
from nbgrader.api import Gradebook
from nbformat import write as write_nb
from nbformat.v4 import new_notebook, new_markdown_cell
def gradebook():
if os.environ.get('NBGRADER_DB_URL', ''):
gb = Gradebook(os.environ['NBGRADER_DB_URL'])
@jhamrick
jhamrick / reconstruct_3d.py
Created April 5, 2016 04:01
CS280 Python version of reconstruct_3d.m
import os
import numpy as np
import scipy.misc
import scipy.io
import matplotlib.pyplot as plt
def reconstruct_3d(name, plot=True):
"""
Homework 2: 3D reconstruction from two Views