Skip to content

Instantly share code, notes, and snippets.

View djbarnwal's full-sized avatar

Dhiraj Barnwal djbarnwal

View GitHub Profile
@djbarnwal
djbarnwal / vl-bug.json
Created April 4, 2024 11:24
Vega-Lite selection bug
{
"$schema": "https://vega.github.io/schema/vega-lite/v5.json",
"description": "A stacked area chart.",
"width": 1000,
"height": 400,
"data": {
"values": [
{
"dimension": "Department of Transportation",
"ts": "2020-12-20T18:30:00.000Z",
@djbarnwal
djbarnwal / budgetvl.json
Last active June 24, 2019 16:51
Budget VL
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"background": "#edf1f7",
"description": "Google's stock price over time.",
"data": {
"url": "data/budgets.json"
},
"width": 700,
"height": 400,
"layer": [
{
"$schema": "https://vega.github.io/schema/vega-lite/v3.json",
"description": "Drag the sliders to highlight points.",
"data": {"url": "data/cars.json"},
"selection": {"CylYr": {"type": "multi"}},
"mark": "circle",
"encoding": {
"x": {"field": "Horsepower", "type": "quantitative"},
"y": {"field": "Miles_per_Gallon", "type": "quantitative"},
"color": {
@djbarnwal
djbarnwal / vega_compare_spec.json
Created May 20, 2019 18:41
Sample Vega Spec for Comparison Operator
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": "pad",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
"data": [
{"name": "sel1_store"},
{"name": "sel2_store"},
@djbarnwal
djbarnwal / vegaClamping.json
Created May 7, 2019 18:49
Clamp with making zoom:1
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"autosize": "pad",
"padding": 5,
"width": 200,
"height": 200,
"style": "cell",
"data": [
{"name": "grid_store"},
{
@djbarnwal
djbarnwal / vl.json
Created May 1, 2019 21:50
Prototype for New Grammar
{
"$schema": "https://vega.github.io/schema/vega/v5.json",
"width": 500,
"height": 200,
"padding": 5,
"data": [
{
"name": "table",
"values": [
@djbarnwal
djbarnwal / list.js
Created January 9, 2019 17:26
Screenplays
[
"https://stephenfollows.com/resource-docs/scripts/eternal_sunshine_of_the_spotless_mind.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2015/05/Good-Will-Hunting.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2015/05/Jerry-Maguire.pdf",
"http://www.dailyscript.com/scripts/Little_Children-script.pdf",
"http://www.dailyscript.com/scripts/lost_in_translation.pdf",
"http://www.universalpicturesawards.com/site-content/uploads/2015/08/Straight-Outta-Compton-Screenplay.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2018/03/Truman-Show-The-min-3.pdf",
"http://www.screenplaydb.com/film/scripts/up_in_the_air.pdf",
"https://www.scriptreaderpro.com/wp-content/uploads/2017/10/Visitor-The.compressed-ilovepdf-compressed.pdf",
@djbarnwal
djbarnwal / gsoc-report-iodide.md
Last active October 13, 2018 06:13
GSoC Report for Iodide 2018

GSoC Final Report for Iodide, 2018

While looking for GSoC projects in early February 2018, I found Iodide. Iodide was a project which perfectly aligned with my interests. I was so eager to look into it that I emailed the mentor for this project Brendan Colloran for making the repository public.

I have been contributing to Iodide since the day the repository became public.

What is Iodide?

The official website states - Iodide is a modern, literate, and interactive programming environment that uses the strengths of the browser to let scientists work flexibly and collaboratively with minimal friction. With Iodide you can tell the story of your findings exactly how you want, leveraging the power of HTML+CSS to display your results in whatever way communicates them most effectively -- but still keeping the live, editable code only one click away. Because Iodide runs in the browser you already have, you can extend and modify the code without having to install any software, enabling you

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>new notebook - iodide</title>
<link rel="stylesheet" type="text/css" href="undefined/iodide.dev.css">
</head>
<body>
<script id="jsmd" type="text/jsmd">
@djbarnwal
djbarnwal / iodide-proposed-architecture.html
Created August 13, 2018 20:52
Iodide proposed architecture
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Iodide proposed architecture - iodide</title>
<link rel="stylesheet" type="text/css" href="iodide.iodide-server.css">
</head>
<body>
<script id="jsmd" type="text/jsmd">
%% meta