git clone git@github.com:YOUR-USERNAME/YOUR-FORKED-REPO.git
cd into/cloned/fork-repo
git remote add upstream git://github.com/ORIGINAL-DEV-USERNAME/REPO-YOU-FORKED-FROM.git
git fetch upstream
| # -*- coding: utf-8 -*- | |
| """A code snippet creator. Convert code files to cropped PDFs. | |
| Copy this file to the folder containing your code-snippets. | |
| A "pdf" folder will be created containing the rendered snippets. | |
| Will convert "*.py" and "*.txt" files by default. | |
| Needs pdflatex and minted installed. | |
| """ | |
| from pathlib import Path |
| import matplotlib.pyplot as plt | |
| def move_axes(ax, fig, subplot_spec=111): | |
| """Move an Axes object from a figure to a new pyplot managed Figure in | |
| the specified subplot.""" | |
| # get a reference to the old figure context so we can release it | |
| old_fig = ax.figure | |
| # remove the Axes from it's original Figure context |
| import shutil | |
| import tempfile | |
| class TemporaryDirectory(object): | |
| """ | |
| Context manager for tempfile.mkdtemp(). | |
| This class is available in python +v3.2. |