Skip to content

Instantly share code, notes, and snippets.

View hcientist's full-sized avatar

Michael Stewart hcientist

View GitHub Profile
@hcientist
hcientist / README.md
Created August 19, 2021 04:45 — forked from mayblue9/README.md
Dependency Tree

About

This is a simple demonstration of the use of a constraint-based force layout to represent the dependency hierarchy. Subgraphs are not repeated as they are in the console rendering. As a result, we don't have to make any special provision for dependency cycles.

The Floyd-Warshall algorithm is used to display relative path distances. Floyd-Warshall has been extended with path reconstruction as well to show the shortest path solutions between nodes.

It is possible the display could be improved further through hierarchical grouping to highlight the commonly repeated subgraphs (e.g. the subgraph including the path L->I->O->P->Q).

How to use

@hcientist
hcientist / submission.hmtl
Created March 26, 2019 04:32
html quiz response
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Hello World</title>
<script type="text/javascript">
setTimeout(function() { console.log("hello world") }, 2000);
</script>
</head>
<body>
@hcientist
hcientist / loadAllYT.js
Created April 24, 2017 17:43
tries to click all elements on a page with the class 'load-more-button' (useful to fully "hydrate" a youtube page)
javascript:(function(){var noMoreCt = 0; var loadMoreInterval = window.setInterval(function () {var btns = document.getElementsByClassName('load-more-button'); if (btns.length > 0) {Array.prototype.forEach.call(btns,function (btn){btn.click();console.log('clicked');});} else {if(noMoreCt >=4) {window.clearInterval(loadMoreInterval);} else {noMoreCt++;}}}, 250);})();
@hcientist
hcientist / .block
Created April 15, 2017 19:22 — forked from mbostock/.block
Force-Directed Tree
license: gpl-3.0
height: 960
@hcientist
hcientist / .block
Last active April 11, 2017 20:26 — forked from mbostock/.block
Force-Directed Tree
license: gpl-3.0
@hcientist
hcientist / .block
Created April 11, 2017 18:32 — forked from mbostock/.block
Radial Tidy Tree
license: gpl-3.0
border: no
height: 1060
@hcientist
hcientist / .gitignore
Created April 3, 2017 22:53 — forked from GerHobbelt/.gitignore
d3.js: using layout.force to plot tree graphs (where nodes may have multiple parents) - Part 1: pure tree
# Editor backup files
*.bak
*~
@hcientist
hcientist / .block
Last active April 3, 2017 18:41 — forked from mbostock/.block
Modifying a Force Layout
license: gpl-3.0
@hcientist
hcientist / .block
Last active April 2, 2017 14:13 — forked from mbostock/.block
Force-Directed Graph
license: gpl-3.0
height: 600
@hcientist
hcientist / .block
Last active April 1, 2017 19:56 — forked from mbostock/.block
Collapsible Force Layout
license: gpl-3.0