Skip to content

Instantly share code, notes, and snippets.

View yubrshen's full-sized avatar

Yu Shen yubrshen

View GitHub Profile
@yubrshen
yubrshen / time-series.json
Last active December 17, 2021 20:49
multiple-time-series
{
"mark": "line",
"height": 80,
"width": 300,
"encoding": {
"x": {"field": "estimating-date-time", "type": "temporal"},
"y": {"field": "ETA-variance", "type": "quantitative"},
"row": {"field": "PLATFORM"}
},
"data": {"values":
@yubrshen
yubrshen / variances.json
Last active December 18, 2021 20:00
Sample data for vega-lite spec discussion
[
{
"ETA-variance": 56,
"arrival-time": "2021-07-31 07:13:39",
"estimating-date-time": "2021-07-31 07:09:42",
"PLATFORM": "L20-2"
},
{
"ETA-variance": 87,
"arrival-time": "2021-07-31 07:13:39",
@yubrshen
yubrshen / to_different_scripts.ipynb
Created June 27, 2018 18:02
A notebook with code cells to be tangled to different files
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.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by GNU Octave configure 4.2.0, which was
generated by GNU Autoconf 2.69. Invocation command line was
$ ./configure LD_LIBRARY_PATH=/opt/OpenBLAS/lib CPPFLAGS=-I/opt/OpenBLAS/include LDFLAGS=-L/opt/OpenBLAS/lib --enable-64
## --------- ##
## Platform. ##
@yubrshen
yubrshen / gist:63ffda973aff27d39868
Created October 15, 2014 08:17
finding the closest match of words in two phases independent of order
(ns dw-pos-study.pairwise-match
(:use incanter.stats)
(:use utils-yushen.util)
(:use clojure.test))
;; This package tries to find the most likely match between words independent of order in two phrases.
;; Care is taken to be efficient in order to support plausible approximate match of names between users' text nad a database.
(defn switch [[x y]]
[y x])