Skip to content

Instantly share code, notes, and snippets.

@rcompton
rcompton / gist:67bb614b86297c970451
Last active April 29, 2016 18:20
Bokeh confusion matrix plot bug
#cf https://groups.google.com/a/continuum.io/forum/#!msg/bokeh/rvFcJV5_WQ8/Pf5hsF9mCAAJ
from collections import OrderedDict
import numpy as np
from bokeh.plotting import figure, show, output_file
from bokeh.models import HoverTool, ColumnDataSource
N = 20
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
anonymous
anonymous / Untitled (7).ipynb
Created November 3, 2015 16:14
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
{
"cells": [
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"collapsed": false
},
"outputs": [
{
@mrocklin
mrocklin / NYCTaxi.ipynb
Last active August 29, 2015 14:26
NYCTaxi and dask.dataframe
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rgbkrk
rgbkrk / jupyter-in-the-javascript-universe.md
Last active December 7, 2015 13:08
Jupyter in the JavaScript Universe

The Jupyter and IPython projects have been around more than 10 years and a lot has changed over the years in terms of frontend development: V8, Node, npm, transpilers, JS Compilers, competing module loading systems, auto-updating browsers, new frameworks, and many other bits. They've all come and made front end development much better. At the same time, they've bred complexity in choice and decisions. Some of the biggest warts have been the document API for the DOM, how we work on it, the tendency to get addicted to the ease of jQuery, and the resulting jQuery soup that gets created. Large projects have to make a choice on how they're going to package and ship components of their overall application.

There was a time at which I was comfortable in CoffeeScript. Now that I've read JavaScript the Good Parts, Node.js the Right Way, read and written [more](https://github.com/nteract/jupyter-sideca

@tnearey
tnearey / Minimal R Ipython3 Notebook
Created July 13, 2015 17:17
Minimal IPython 3 notebook (Anaconda) runing R code
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# A minimal notebook for running %%R (rmagic) in IPython 3 notebook (Anaconda)\n",
"\n",
"Here's some environment info from Jupyter's Help:About pull down\n",
">About IPython Notebook\n",
anonymous
anonymous / Beaker Share
Created July 12, 2015 21:01
Beaker Share
This file has been truncated, but you can view the full file.
{"beaker":"2","evaluators":[{"name":"Html","plugin":"Html","view":{"cm":{"mode":"htmlmixed"}},"shellID":null},{"name":"Latex","plugin":"Latex","view":{"cm":{"mode":"stex"}},"shellID":null},{"name":"JavaScript","plugin":"JavaScript","jsSetting2":"","jsSetting1":"","view":{"cm":{"mode":"javascript","background":"#FFE0F0"}},"shellID":null},{"name":"Python3","plugin":"Python3","imports":"","supplementalClassPath":"","setup":"%matplotlib inline\nimport numpy\nimport matplotlib\nfrom matplotlib import pylab, mlab, pyplot\nnp = numpy\nplt = pyplot\nfrom IPython.display import display\nfrom IPython.core.pylabtools import figsize, getfigs\nfrom pylab import *\nfrom numpy import *\n","view":{"cm":{"mode":"python"}},"shellID":"0C7DE263A92D4ABD85F9C1B4AD5717D9"}],"cells":[{"id":"sectionC6ReWS","type":"section","title":"Bokeh working with Beaker","level":1,"evaluatorReader":false,"collapsed":false},{"id":"markdownRxrBrK","type":"markdown","body":"[Bokeh](http://bokeh.pydata.org/en/latest/) is an interactive web visualizat
@mrocklin
mrocklin / dask-svd-profile.html
Created June 26, 2015 19:51
Bokeh plot showing dask svd performance
This file has been truncated, but you can view the full file.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Bokeh Plot</title>
<style>
/* BEGIN /Users/jcrist/anaconda/envs/dask/lib/python2.7/site-packages/bokeh/server/static/css/bokeh.min.css */
.bk-bs-container,.bk-bs-container-fluid{margin-left:auto;padding-left:15px;padding-right:15px;margin-right:auto}.bk-bs-btn,.bk-toolbar-button{-ms-user-select:none;user-select:none;-webkit-user-select:none;-moz-user-select:none}.bk-bs-btn,.bk-bs-btn-danger.bk-bs-active,.bk-bs-btn-danger:active,.bk-bs-btn-default.bk-bs-active,.bk-bs-btn-default:active,.bk-bs-btn-info.bk-bs-active,.bk-bs-btn-info:active,.bk-bs-btn-success.bk-bs-active,.bk-bs-btn-success:active,.bk-bs-btn-warning.bk-bs-active,.bk-bs-btn-warning:active,.bk-bs-btn.bk-bs-active,.bk-bs-btn:active,.bk-bs-dropdown-menu>.bk-bs-disabled>a:focus,.bk-bs-dropdown-menu>.bk-bs-disabled>a:hover,.bk-bs-form-control,.bk-bs-open .bk-bs-dropdown-toggle.bk-bs-btn-danger,.bk-bs-open .bk-bs-dropdown
@cowlicks
cowlicks / upload.py
Last active January 30, 2017 14:44
Get data from githubarchive.com, then upload all files in the current directory to an S3 bucket.
"""
Script for uploading all the files in a directory to an S3 bucket.
If this does not work check your permissions to the bucket and that you have your ~/.boto file with access keys.
A few comments are include for generalizing this script.
"""
import os