Skip to content

Instantly share code, notes, and snippets.

@zeffii
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zeffii/3827e4715d05281a12d5 to your computer and use it in GitHub Desktop.
Save zeffii/3827e4715d05281a12d5 to your computer and use it in GitHub Desktop.
DAG Execution viz mono3

[ Launch: DAG Execution viz mono ] 3827e4715d05281a12d5 by zeffii
[ Launch: DirectedAcyclicGraph Execution viz mono ] 99f8c1106b72653aa18d by zeffii
[ Launch: DirectedAcyclicGraph Execution viz ] ca1867cd09d88b68db1a by zeffii
[ Launch: fundamental and harmonics IMG2 ] 031730d923702adfad71 by zeffii
[ Launch: fundamental and harmonics IMG1 ] 5112280 by zeffii
[ Launch: fundamental and harmonics ] 5112252 by zeffii
[ Launch: zeffii default ] 5100062 by zeffii
[ Launch: zeffii default ] 5033869 by zeffii

{"description":"DAG Execution viz mono3","endpoint":"","display":"svg","public":true,"require":[],"fileconfigs":{"inlet.js":{"default":true,"vim":false,"emacs":false,"fontSize":12},"style.css":{"default":true,"vim":false,"emacs":false,"fontSize":12},"_.md":{"default":true,"vim":false,"emacs":false,"fontSize":12},"config.json":{"default":true,"vim":false,"emacs":false,"fontSize":12},"terrible.json":{"default":true,"vim":false,"emacs":false,"fontSize":12}},"fullscreen":false,"play":false,"loop":false,"restart":false,"autoinit":true,"pause":true,"loop_type":"period","bv":false,"nclones":15,"clone_opacity":0.4,"duration":3000,"ease":"linear","dt":0.01,"thumbnail":"http://i.imgur.com/p3y5SkG.png","ajax-caching":false}
d3.select("body").style("background-color", d3.rgb(240,240,240))
var svg = d3.select("svg");
svg.attr({height: 900, width: 900})
var jank = d3.random.normal(245, 72);
function park_values(num_items){
var jk = [];
for (var i=0; i <= num_items; i+=1){
jk[i] = jank()/6;
}
return jk;
}
var data = park_values(12);
var time_position = 0;
var barheight = 15;
var tx = 48;
var group1 = svg.append("g")
.attr({transform: function(d){
return "translate(" + [tx, 77] + ")" }
})
var group2 = svg.append("g")
.attr({transform: function(d){
return "translate(" + [tx, -32] + ")" }
})
var group3 = svg.append("g")
.attr({transform: function(d){
return "translate(" + [tx, -11] + ")" }
})
//
var margin = {top: 20, right: 20, bottom: 30, left: 50},
width = 512 - margin.left - margin.right,
height = 128 - margin.top - margin.bottom;
var x = d3.scale.linear()
.domain([0,d3.sum(data)])
.range([0, d3.sum(data)]);
var x2 = d3.scale.linear()
.domain([0,d3.sum(data)])
.range([0, d3.sum(data)]);
var xAxis = d3.svg.axis()
.scale(x)
.orient("bottom");
var xAxis2 = d3.svg.axis()
.scale(x2)
.tickSize(350)
//.orient("bottom");
group2.append("g")
.attr("class", "x axis")
.attr("transform", "translate(" + [0, height] + ")")
.call(xAxis)
.append("text")
.attr("y", -2)
.attr("x", width + -459)
.attr("dy", ".71em")
.style("text-anchor", "end")
.text("Time");
group3.append("g")
.attr("class", "x axis")
.attr("transform", "translate(" + [0, height] + ")")
.call(xAxis2)
.attr("id", "chunk")
//.append("text")
//.attr("y", -2)
//.attr("x", width + -459)
//.attr("dy", ".71em")
//.style("text-anchor", "end")
var rect_groups = group1.selectAll("g").data(data);
var rect = rect_groups.enter()
.append("g")
.attr({transform: function(d,i){
time_position += d;
var x = time_position - d;
var y = barheight*i;
return "translate(" + [x, y] + ")";
}})
rect.append("rect")
.attr({
height: barheight,
width: function(d){ return d }
})
.style({fill: "#9ef"})
rect.append("text")
.text(function(d,i){return Math.round(d)})
.attr({
transform: "translate(4,11)"
})
.style({fill: "#434"})
/* EOF */
.cm-s-lesser-dark.CodeMirror { background: #1e2426; color: #696969; }
.cm-s-lesser-dark div.CodeMirror-selected {background: #064968 !important;} /* 33322B*/
.cm-s-lesser-dark span.cm-variable { color:#22EFFF; }
.cm-s-lesser-dark span.cm-variable-2 { color: #FFCCB4; }
.cm-s-lesser-dark span.cm-variable-3 { color: white; }
.cm-s-lesser-dark span.cm-string { color: Chartreuse; }
.cm-s-lesser-dark span.cm-string-2 {color: Chartreuse;}
.cm-s-lesser-dark span.cm-def {color: #FFCCB4; opacity: 1.0}
.cm-s-lesser-dark span.cm-bracket { color: #EBEFE7; }
.cm-s-lesser-dark pre { color:#FFF; }
.cm-s-lesser-dark span.cm-comment { color: #AFB4B4;}
.cm-s-lesser-dark span.cm-property {color: #FDA676;}
.cm-s-lesser-dark span.cm-number { color: #FF92EE;}
.cm-s-lesser-dark span.cm-keyword { color: #FFFF18; }
.cm-s-lesser-dark .CodeMirror-cursor { border-left: 1px solid white !important; }
body {
font: 11px sans-serif;
}
.axis path,
.axis line {
fill: none;
stroke: #000;
shape-rendering: crispEdges;
}
.x.axis path {
display: none;
}
#chunk line {
fill: none;
stroke: #bad2d3;
shape-rendering: crispEdges;
}
{
"0": {
"bl_idname": "IntegerNode",
"duration": 4.595556129061151e-05,
"name": "Integer",
"start": 1225.1706077169026
},
"1": {
"bl_idname": "IntegerNode",
"duration": 2.5422225462534698e-05,
"name": "Integer.001",
"start": 1225.170662961354
},
"2": {
"bl_idname": "ScalarMathNode",
"duration": 0.0001476444631407503,
"name": "function",
"start": 1225.1706943899294
},
"3": {
"bl_idname": "GenListRangeIntNode",
"duration": 0.00011747303074116644,
"name": "List Range Int",
"start": 1225.1708482502665
},
"4": {
"bl_idname": "ScalarMathNode",
"duration": 0.00018228573753731325,
"name": "function.001",
"start": 1225.170971659806
},
"5": {
"bl_idname": "IntegerNode",
"duration": 2.6260320737492293e-05,
"name": "Integer.002",
"start": 1225.1711609995125
},
"6": {
"bl_idname": "ScalarMathNode",
"duration": 0.00012780954011759604,
"name": "function.003",
"start": 1225.171193685231
},
"7": {
"bl_idname": "GenListRangeIntNode",
"duration": 6.69079449835408e-05,
"name": "List Range Int.001",
"start": 1225.1713280598512
},
"8": {
"bl_idname": "ShiftNode",
"duration": 0.00015022859042801429,
"name": "List Shift.002",
"start": 1225.1714025106544
},
"9": {
"bl_idname": "ScalarMathNode",
"duration": 0.00019380954859116173,
"name": "function.002",
"start": 1225.1715597932139
},
"10": {
"bl_idname": "GenVectorsNode",
"duration": 0.00016426668753410922,
"name": "Vectors in",
"start": 1225.1717598884775
},
"11": {
"bl_idname": "ShiftNode",
"duration": 9.051429719875159e-05,
"name": "List Shift.003",
"start": 1225.1719315583405
},
"12": {
"bl_idname": "ShiftNode",
"duration": 0.00013367620749704656,
"name": "List Shift.001",
"start": 1225.1720290567655
},
"13": {
"bl_idname": "ShiftNode",
"duration": 8.576509026170243e-05,
"name": "List Shift",
"start": 1225.172169507577
},
"14": {
"bl_idname": "ZipNode",
"duration": 0.0005208064153521264,
"name": "List Zip",
"start": 1225.172262186954
},
"15": {
"bl_idname": "ViewerNode2",
"duration": 0.0002841143218574871,
"name": "Viewer Draw2",
"start": 1225.1727886505128
},
"16": {
"bl_idname": "IndexViewerNode",
"duration": 0.00018312383258489717,
"name": "Index Viewer Draw",
"start": 1225.173079120391
},
"17": {
"bl_idname": "SvStethoscopeNode",
"duration": 0.001793593878574029,
"name": "Sv Stethoscope Node",
"start": 1225.1732704156534
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment