# Quick Reference: Deleting Local and Remote Git Branches

Deleting a Local Git Branch:

$git branch -D <branch-name> Deleted branch <branch-name> (was <commit-hash>). Deleting a Remote Git Branch (available as of Git 1.7.0)$ git push origin --delete <branch-name>
To <git-remote-origin-url>
- [deleted]         <branch-name>

# Setting up a IPython Parallel Cluster on Amazon EC2 with StarCluster

StarCluster is an open source cluster-computing toolkit for Amazon’s Elastic Compute Cloud (EC2) that is designed to automate and simplify the process of building, configuring, and managing clusters of virtual machines on Amazon’s EC2 cloud. StarCluster makes it easy to create a cluster computing environment in the cloud for distributed and parallel computing applications.

# Visualizing and Animating Optimization Algorithms with Matplotlib

In this series of notebooks, we demonstrate some useful patterns and recipes for visualizing animating optimization algorithms using Matplotlib.

In [1]:
%matplotlib inline
In [2]:
import matplotlib.pyplot as plt

from mpl_toolkits.mplot3d import Axes3D
from matplotlib.colors import LogNorm
from matplotlib import animation
from IPython.display import HTML

from scipy.optimize import minimize
from collections import defaultdict
from itertools import zip_longest
from functools import partial

We shall restrict our attention to 3-dimensional problems for right now (i.e. optimizing over only 2 parameters), though what follows can be extended to higher dimensions by plotting all pairs of parameters against each other, effectively projecting the problem to 3-dimensions.

The Wikipedia article on Test functions for optimization has a few functions that are useful for evaluating optimization algorithms. In particular, we shall look at Beale's function:

$$f(x, y) = (1.5 - x + xy)^2 + (2.25 - x + xy^2)^2 + (2.625 - x + xy^3)^2$$
In [3]:
f  = lambda x, y: (1.5 - x + x*y)**2 + (2.25 - x + x*y**2)**2 + (2.625 - x + x*y**3)**2