Skip to content

Instantly share code, notes, and snippets.

View justinvdm's full-sized avatar

Justin van der Merwe justinvdm

View GitHub Profile
@justinvdm
justinvdm / README.md
Created July 29, 2012 11:14
Force directed graph with collapsible hierarchical clustering

Force directed graph with collapsible hierarchical clustering

fch.(coffee/js)

D3 powers the view class (ForceClusterHierarchy) found that extends from the Backbone View class. This module might be able to be used standalone for visualising pretty much anything, as long as a compatible Model Collection is plugged into it (see network-status.(coffee/js))

network-status.(coffee/js)

render: function() {
this.$el.html("<input name='' class='check' type='checkbox'/>");
var title=this.model.get("title");
var shortTitle=title;
if (title.length>20){
shortTitle=title.substring(0,20)+"...";
}
var stitle=slugify(title);
this.$el.append("<span id='" + stitle + "'class='title' value='"+title+"'>" + shortTitle + "</span>");
if (this.model.get("selected")) {
@justinvdm
justinvdm / index.html
Created September 8, 2012 16:28
Balloon Tree Layout
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
}
.link {
fill: none;
stroke: #cc3333;
@justinvdm
justinvdm / index.html
Created September 19, 2012 20:57
Animated Balloon Layout
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
}
.link {
fill: none;
stroke: #cc3333;
@justinvdm
justinvdm / index.html
Created September 20, 2012 12:47
Interpolation with Balloon Layout
<!DOCTYPE html>
<meta charset="utf-8">
<style>
body {
margin: 0;
}
.node {
fill-opacity: 0.3;
}
diff --git a/diamondash/dashboard.py b/diamondash/dashboard.py
index 13d7283..5337a63 100644
--- a/diamondash/dashboard.py
+++ b/diamondash/dashboard.py
@@ -83,7 +83,10 @@ def format_metric_target(target, bucket_size):
agg_method = 'max'
elif metric_fn in ('max', 'min', 'sum'):
agg_method = metric_fn
- return 'summarize(%s, "%s", "%s")' % (target, bucket_size, agg_method)
+
.
├── diamondash
│   ├── public
│   │   ├── css
│   │   │   ├── dashboard.css
│   │   │   ├── index.css
│   │   │   └── style.css
│   │   ├── js
│   │   │   ├── main.js
│   │   │   ├── widget-model.js
class Widget(object):
@classmethod
def from_config(cls, config):
widget = cls()
# configure general widget stuff here
widget.name = slugify(config['name'])
return widget
$ npm install express@2.x
$ mv node_modules/express node_modules/express2
$ npm install express@3.x
$ mv node_modules/express node_modules/express3
@justinvdm
justinvdm / 1-results.txt
Last active December 12, 2015 00:09
Translations and Detranslations
Abnormal: interesting
Aboard: or
Abode: house
Abolish:
Abomb: people
Abominable: I am not afraid of hard jestszkzeg ó line.
Aboriginal: But colon.
Abort: Pregnancy and childbirth.
Abortive: For more information.
Abound: But jevelke.