Skip to content

Instantly share code, notes, and snippets.

View show_matrix.py
import PIL.Image
from matplotlib.pyplot import imshow
def show(*Ms):
fig, axs = plt.subplots(ncols=len(Ms))
for M, ax in zip(Ms, (axs if type(axs) == list else [axs])):
M = np.atleast_2d(M)
ax.imshow(PIL.Image.fromarray((M - M.min()) * 255 / M.max()))
ax.set_xticks([0, M.shape[1]])
ax.set_yticks([0, M.shape[0]])
for side in ["right","top","bottom","left"]:
View HW3_ROC
{
"cells": [
{
"cell_type": "code",
"execution_count": 36,
"metadata": {},
"outputs": [],
"source": [
"import pandas as pd\n",
"import numpy as np\n",
View Canonicity_Update.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View explore_psychencode_grn.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View NetReg3.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View Is_Anything_Real.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View SPAMS.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View NetReg2.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View NetReg.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View d3-dataframe.js
matrix = {
values: [[1, 2], [3, 4]], // sorted row-wise by default
rows_iter: function () { return this.values },
columns_iter: function () { return iterator_over_the_transpose_of(this.values) },
flat_rows_iter: function () { return iterator_over_flattened(this.values) },
flat_columns_iter: function () { return iterator_over_the_flattened_transpose_of(this.values) },