This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| P_D = np.array([0.6, 0.4]) | |
| P_I = np.array([0.7, 0.3]) | |
| P_G_ID = np.array([ | |
| [[0.3, 0.05], | |
| [0.9, 0.5]], | |
| [[0.4, 0.25], |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| _para1 = {'red': ((0.0, 0.019390722, 0.019390722), (0.125, 0.355334722, | |
| 0.355334722), (0.25, 0.565570631, 0.565570631), (0.375, | |
| 0.76583663, 0.76583663), (0.5, 0.966006412, 0.966006412), | |
| (0.625, 0.953403586, 0.953403586), (0.75, 0.906621393, | |
| 0.906621393), (0.875, 0.831556904, 0.831556904), (1.0, | |
| 0.732691891, 0.732691891)), | |
| 'green': ((0.0, 0.390501895, 0.390501895), (0.125, 0.524474908, | |
| 0.524474908), (0.25, 0.665714642, 0.665714642), (0.375, | |
| 0.813150205, 0.813150205), (0.5, 0.96603773, 0.96603773), |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from skimage import io, filter, morphology, segmentation, measure, img_as_float | |
| import os | |
| # Download the image | |
| if not os.path.exists('cell.png'): | |
| print "Downloading snowflakes image..." | |
| import urllib2 | |
| u = urllib2.urlopen('http://people.sc.fsu.edu/~jburkardt/data/tif/cell.png') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| *Vertddices 198 | |
| *Arcs | |
| *Edges | |
| 1 8 1 | |
| 1 24 1 | |
| 1 35 1 | |
| 1 42 1 | |
| 1 46 1 | |
| 1 60 1 | |
| 1 74 1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ git diff -w notebook.css | |
| diff --git a/IPython/frontend/html/notebook/static/css/notebook.css b/IPython/frontend | |
| index 9396bf7..55e3a64 100644 | |
| --- a/IPython/frontend/html/notebook/static/css/notebook.css | |
| +++ b/IPython/frontend/html/notebook/static/css/notebook.css | |
| @@ -311,6 +311,7 @@ div.text_cell_render { | |
| .CodeMirror { | |
| line-height: 1.231; /* Changed from 1em to our global default */ | |
| + font-family: Consolas; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def my_boxplot(ax, positions, values, width=None, color=None, label=None): | |
| """Custom box plot to work around some of matplotlib's quirks. | |
| Parameters | |
| ---------- | |
| ax : matplotlib axis | |
| Target axis. | |
| positions : (M,) ndarray of float | |
| Where to positions boxes on the x-axis. | |
| values : (M, N) ndarray of float |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.