Skip to content

Instantly share code, notes, and snippets.

View declann's full-sized avatar
👋

Declan Naughton declann

👋
View GitHub Profile
@declann
declann / spec.json
Created March 22, 2024 23:21
Vega spec from Fri Mar 22 2024
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 400,
"height": 400,
"signals": [
{
"name": "increase",
"on": [{"events": "rect:click", "force": true, "update": "datum"}]
}
],
@declann
declann / spec.json
Created March 11, 2024 00:13
Vega-Lite spec from Mon Mar 11 2024
{
"facet": {"column": {"field": "duration", "type": "nominal"}},
"spec": {
"encoding": {"x": {"field": "bin_i", "type": "ordinal"}},
"layer": [
{
"mark": {"type": "bar", "size": 2},
"encoding": {
"y": {"field": "min", "type": "quantitative"},
"y2": {"field": "max"}
// this is https://github.com/declann/calculang-miscellaneous-models/blob/main/models/pi/nilakantha-series_esm/cul_scope_0.mjs
// but with changes described
// so that it runs on numcalc.com (QuickJS)
// with arbirary \digits settings (e.g. \digits 100)
// Ensure in numeric (not algebraic mode)
// CHANGES:
// replaced res = 0 with res=0.0 and 4 by 4.0
//pi_approximation({terms_in:2000000})-PI
@declann
declann / spec.json
Created October 22, 2023 23:19
Vega spec from Mon Oct 23 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},
@declann
declann / spec.json
Created October 22, 2023 22:31
Vega spec from Sun Oct 22 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},
@declann
declann / spec.json
Created October 22, 2023 22:31
Vega spec from Sun Oct 22 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},
@declann
declann / spec.json
Created October 22, 2023 21:31
Vega spec from Sun Oct 22 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},
@declann
declann / spec.json
Created October 22, 2023 11:21
Vega spec from Sun Oct 22 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},
@declann
declann / spec.json
Created October 22, 2023 11:13
Vega spec from Sun Oct 22 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},
@declann
declann / spec.json
Created October 22, 2023 11:08
Vega spec from Sun Oct 22 2023
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 700,
"height": 400,
"padding": 5,
"data": [
{
"name": "table",
"values": [
{"category": 1960, "amount": 4},