Skip to content

Instantly share code, notes, and snippets.

View jeremy9959's full-sized avatar
🏠
Working from home

Jeremy Teitelbaum jeremy9959

🏠
Working from home
View GitHub Profile
---
title: Chapter 1 Section 1
---
\newcommand{\Z}{\mathbb{Z}}
\newcommand{\N}{\mathbb{N}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\Q}{\mathbb{Q}}
div = {
var div = html``
var doc = new Bokeh.Document() ;
doc.add_root(P) ;
await Bokeh.embed.add_document_standalone(doc, div)
return div ;
}
P = {
var p = Bokeh.Plotting.figure({x_range: new Bokeh.FactorRange({factors: x, range_padding: 0.1}),
plot_height: 300, plot_width:800, toolbar_location: null, title: "Fruit Counts By Year"})
p.vbar({x, top: counts, width:0.9}) ;
p.xaxis.map((axis) => axis.major_label_orientation = 1) ;
p.xgrid.map((grid) => grid.grid_line_color = null) ;
p.y_range_start = 0 ;
return p ;
}
@jeremy9959
jeremy9959 / Bokehjs_observable_load.js
Last active May 18, 2020 17:20
Observable cell to load Bokeh library
viewof Bokeh =
{
const ver = '2.0.2';
const message = html`Loaded Bokeh Version ${ver}...` ;
if (!document.getElementById('bokehjs-css'))
document.head.appendChild(
html`<link id='bokehjs-css'
href='https://cdn.pydata.org/bokeh/release/bokeh-${ver}.min.css'
rel=stylesheet>`);
# withdrawn pending further study!
@jeremy9959
jeremy9959 / BA.json
Last active August 27, 2019 19:19
GraphData
This file has been truncated, but you can view the full file.
{"directed": false, "multigraph": false, "graph": {}, "nodes": [{"bipartite": 1, "name": "Razaaq Adoti", "id": 1040389}, {"bipartite": 1, "name": "Tom Fisher", "id": 1024010}, {"bipartite": 1, "name": "Ronald Guttman", "id": 1007630}, {"bipartite": 1, "name": "Beverly D'Angelo", "id": 1040399}, {"bipartite": 1, "name": "H\u00e9ctor Elizondo", "id": 1024017}, {"bipartite": 1, "name": "Richard Bright", "id": 1015826}, {"bipartite": 1, "name": "Andre B. Blake", "id": 1007635}, {"bipartite": 1, "name": "George Buck Flower", "id": 1024020}, {"bipartite": 1, "name": "Chevy Chase", "id": 1007640}, {"bipartite": 1, "name": "Gary Oldman", "id": 1007642}, {"bipartite": 1, "name": "Matthew Cornwell", "id": 1032224}, {"bipartite": 1, "name": "Eileen Ryan", "id": 1040417}, {"bipartite": 1, "name": "Mia Farrow", "id": 1007648}, {"bipartite": 1, "name": "Donnie Wahlberg", "id": 1024033}, {"bipartite": 1, "name": "Richard Kiel", "id": 1024036}, {"bipartite": 1, "name": "Muse Watson", "id": 1007652}, {"bipartite": 1, "name":
@jeremy9959
jeremy9959 / vptree.py
Last active August 21, 2019 15:59
Vantage Point Tree
import numpy as np
class _nqueue(list):
"""A simple fixed length priority queue of tuples used by the vptree class to track
the closest points found so far. Contains pairs (dist, node) where node refers to the
vptree structure and dist is the distance from the given point to the corresponding node.
Only the smallest max_size examples are kept.
Does a simple append followed by sort, so is intended for short lists.
@jeremy9959
jeremy9959 / data.csv
Created July 12, 2019 20:08
ExperimentalData
A B C D E F G H
28 55 43 91 81 53 19 87
@jeremy9959
jeremy9959 / BarChartExperiment
Last active July 12, 2019 20:10
Vega Bl.ocks example
license: bsd-3-clause
@jeremy9959
jeremy9959 / GraphicsExample.md
Last active June 16, 2019 17:22
Graphics Example from Data Visualization with Python and Javascript by Kyran Dale

This is an example from "Data Visualization with Python and Javascript" by Kyran Dale, O'Reilly, 2016. The goal was just to see how blocks work.