Skip to content

Instantly share code, notes, and snippets.

View mistycheney's full-sized avatar

Yuncong Chen mistycheney

View GitHub Profile
@mistycheney
mistycheney / ipython_notebook_config.py
Last active October 23, 2015 18:27
Sample iPython Notebook Config File
# Configuration file for ipython-notebook.
c = get_config()
#------------------------------------------------------------------------------
# NotebookApp configuration
#------------------------------------------------------------------------------
# NotebookApp will inherit config from: BaseIPythonApplication, Application
@mistycheney
mistycheney / colorbar_same_height.py
Created February 10, 2015 02:23
Set Matplotlib colorbar size to match graph
import matplotlib.pyplot as plt
from mpl_toolkits.axes_grid1 import make_axes_locatable
import numpy as np
plt.figure()
ax = plt.gca()
im = ax.imshow(np.arange(100).reshape((10,10)))
divider = make_axes_locatable(ax)
cax = divider.append_axes("right", size="5%", pad=0.05)
plt.colorbar(im, cax=cax)
@mistycheney
mistycheney / 0_reuse_code.js
Last active August 29, 2015 14:09
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console