Skip to content

Instantly share code, notes, and snippets.

View declann's full-sized avatar
👋

Declan Naughton declann

👋
View GitHub Profile
@declann
declann / rec.js
Last active December 12, 2021 22:46
saas model
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function() {
@declann
declann / game-of-life.js
Last active December 10, 2021 23:00
calculangs conways game of life
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function() {
(function webpackUniversalModuleDefinition(root, factory) {
if(typeof exports === 'object' && typeof module === 'object')
module.exports = factory();
else if(typeof define === 'function' && define.amd)
define([], factory);
else {
var a = factory();
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
}
})(this, function() {
@declann
declann / spec.json
Last active December 11, 2021 17:07
waterfall overlay dev
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": {
"values": [
{
"detail": 0,
"type": "Waterfall",
"function": "subs",
"year": -1,
"value": 100
@declann
declann / a) readme update?
Last active December 14, 2021 22:30
calculang - update
calculang is a language for calculations.
(Note: I say modelling and calculation language interchangably.)
Why?
- separation of concerns
We can calculate in any programming language: and this is part of the problem calculang considers to address.
e.g. we can't follow calculation logic across arbitrary systems and languages, and we're limited wrt modelling-specific tooling and reasoning we can apply.
@declann
declann / hot data from bounce.cul.js dev
Created December 17, 2021 18:11
hot 1 dampener add = 4, hot 2 = 3 [not consistent updates!]
[{"t_in":0,"dx_in":3,"function":"x","value":103,"hot":1},{"t_in":1,"dx_in":3,"function":"x","value":106,"hot":1},{"t_in":2,"dx_in":3,"function":"x","value":109,"hot":1},{"t_in":3,"dx_in":3,"function":"x","value":112,"hot":1},{"t_in":4,"dx_in":3,"function":"x","value":115,"hot":1},{"t_in":5,"dx_in":3,"function":"x","value":118,"hot":1},{"t_in":6,"dx_in":3,"function":"x","value":121,"hot":1},{"t_in":7,"dx_in":3,"function":"x","value":124,"hot":1},{"t_in":8,"dx_in":3,"function":"x","value":127,"hot":1},{"t_in":9,"dx_in":3,"function":"x","value":130,"hot":1},{"t_in":10,"dx_in":3,"function":"x","value":133,"hot":1},{"t_in":11,"dx_in":3,"function":"x","value":136,"hot":1},{"t_in":12,"dx_in":3,"function":"x","value":139,"hot":1},{"t_in":13,"dx_in":3,"function":"x","value":142,"hot":1},{"t_in":14,"dx_in":3,"function":"x","value":145,"hot":1},{"t_in":15,"dx_in":3,"function":"x","value":148,"hot":1},{"t_in":16,"dx_in":3,"function":"x","value":151,"hot":1},{"t_in":17,"dx_in":3,"function":"x","value":154,"hot":1},{"t_in"
@declann
declann / row encoding height exhibit A.json
Created December 17, 2021 18:17
Vega-Lite spec from Fri Dec 17 2021
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"data": { "url": "https://gist.githubusercontent.com/declann/b3136000e4458e7e8cc0241a218ab1b4/raw/cd6333148d9d67425cc7323b50b1b21c4a5c32bd/hot%2520data%2520from%2520bounce.cul.js%2520dev" },
"width": 700,
"height": 80,
"mark": "text",
"encoding": {
"row": { "field": "hot" },
"x": { "field": "t_in", "type": "quantitative" },
"y": { "field": "function" },
@declann
declann / flare.json
Last active December 18, 2021 16:41
flare.json with some rearrangements
[
{
"id": 2,
"name": "analytics",
"parent": 1
},
{
"id": 1,
"name": "flare"
},
@declann
declann / spec.json
Created December 18, 2021 22:26
test output of config
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"description": "A nested bar chart example, with bars grouped by category.",
"width": 300,
"padding": 5,
"autosize": "pad",
"signals": [
{
"name": "rangeStep", "value": 20,
@declann
declann / spec.json
Last active December 19, 2021 12:41
waterfall overlay
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"width": "container",
"layer": [
{
"mark": {"type": "line", "point": false},
"transform": [{"filter": "datum.type != 'Waterfall'"}],
"encoding": {
"x": {"field": "year", "type": "ordinal"},
"y": {