Skip to content

Instantly share code, notes, and snippets.

🏏

Saul Shanabrook saulshanabrook

🏏
Block or report user

Report or block saulshanabrook

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View opentensors.dot
digraph{
node[shape=plaintext,color=none]
// splines=polyline
// concentrate=true
nodesep=0.3
// layout=dagre
edge[penwidth=1,arrowsize=0.6]
View compute.dot
digraph{
node[shape=plaintext]
compound=true;
keras->"tensorflow python"->"tensorflow graph"->"xla hlo"->"tpu ir"->tpu
"tensorflow eager" -> "tensorflow graph" -> tflite -> "tflite interpreter"->{cpu gpu}
keras->"plaid ml"->{cpu gpu}
"tensorflow graph"-> "tensorRT(nvidia)"->gpu
"tensorflow graph"-> "ngraph(intel)"->"plaid ml"
subgraph cluster_llvm {
llvm "xla runtime" "Glow Runtime" "ATen" "numpy capi" xnd
View middleware.ts
type Middleware<A, B, C, D> = Fn<A, [B, Fn<C, D>] | null>;
function applyMiddleware<A, B, C, D>(
middleware: Middleware<A, B, C, D>,
b_c: Fn<B, C>
): Fn<A, D | null> {
return a => {
const res = middleware(a);
if (!res) {
return null;
View tmp.ts
function handleNull<A, B, C, D>(middleware: Middleware<A, B, C, D>)
function applyMiddleware<A, B, C, D>(
middleware: Middleware<A, B, C, D>,
b_c: Fn<B, C>
): Fn<A, D | null> {
return a => {
const res = middleware(a);
View parser.ts
export const INVALID = Symbol("INVALID");
/**
* Is able to optionally parse from type T to U
* and then create U from T.
*
* The idea is that these functions are inverses of each other:
*
* parser.create(parser.parse(t)) == t
*
View tmp.vl.json
{
"config": {"view": {"width": 400, "height": 300}, "mark": {"tooltip": null}},
"data": {"name": "data-2ec47c823e6aebe675c9e913a8f3b032"},
"mark": "rect",
"encoding": {
"color": {"type": "quantitative", "aggregate": "count"},
"x": {
"type": "quantitative",
"bin": {"binned": true},
"field": "bin_x",
View example.vl.json
{
"config": {"view": {"width": 400, "height": 300}, "mark": {"tooltip": null}},
"data": {"name": "data-c8d131caa71f8e80b7117ed5b5fdc060"},
"mark": "rect",
"encoding": {
"color": {"type": "quantitative", "aggregate": "count"},
"x": {
"type": "quantitative",
"bin": {"binned": true},
"field": "bin_x",
View tmp.js
const addSubscriber = assign({
subscribers: (context, event) => context.subscribers + 1
});
const removeSubscriber = assign({
subscribers: (context, event) => context.subscribers - 1
});
View Untitled.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View output.json
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": "pad",
"padding": 5,
"height": 300,
"style": "cell",
"data": [
{
"name": "6132438473295640038",
"transform": [{"type": "queryibis", "name": "6132438473295640038"}]
You can’t perform that action at this time.