Skip to content

Instantly share code, notes, and snippets.

View akollegger's full-sized avatar

Andreas Kollegger akollegger

View GitHub Profile

Keybase proof

I hereby claim:

  • I am akollegger on github.
  • I am akollegger (https://keybase.io/akollegger) on keybase.
  • I have a public key ASC53fC53aY-oGsLrY2h1laxSvqhXXffEodhyCA3uVDRCAo

To claim this, I am signing this object:

from dataclasses import dataclass, field
import csv
import json
import os
import pathlib
import sys
import typing
from icecream import ic
from tqdm import tqdm
class GraphElementEncoder(json.JSONEncoder):
def default(self,obj):
if isinstance(obj, graph.Node):
return {
"element_id": obj.element_id,
"labels": list(obj.labels),
"properties": {k:v for k,v in obj.items()}
}
elif isinstance(obj, graph.Relationship):
return {
@akollegger
akollegger / graph-exchange-format.gram
Last active August 30, 2019 12:27
Gram - a lightweight graph exchange format
// gram is a lightweight graph exchange format.
//
// gram is a series of path updates.
//
// identified path elements may be introduced and referenced in a later update
// node shapes
() // anonymous node
(a) // identified node
(1) // numerically identified node
node {
diameter: 50px;
color: #A5ABB6;
border-color: #9AA1AC;
border-width: 2px;
text-color-internal: #FFFFFF;
font-size: 10px;
}
relationship {
color: #A5ABB6;
@akollegger
akollegger / index.html
Created November 30, 2018 16:03 — forked from Keith-Morris/index.html
three.js css3d - periodic table. info.
<div id="container"></div>
<div id="menu">
<button id="table">TABLE</button>
<button id="sphere">SPHERE</button>
<button id="helix">HELIX</button>
<button id="grid">GRID</button>
</div>
@akollegger
akollegger / .block
Last active January 22, 2018 10:54
Radial Force Layout
license: gpl-3.0
height: 600
@akollegger
akollegger / .block
Created January 22, 2018 10:37
Single Axis Force Layout
license: gpl-3.0
height: 600
@akollegger
akollegger / .block
Last active January 22, 2018 08:48
Single Axis Force Layout
license: gpl-3.0
height: 600
@akollegger
akollegger / .block
Created January 10, 2018 07:43
Zoomable Circle Packing
license: gpl-3.0
height: 960