Skip to content

Instantly share code, notes, and snippets.

@rjbriody
rjbriody / Summit2016.groovy
Created September 6, 2016 20:22
C* Summit 2016 - Network Analysis Adventure
// Set DSE Graph to Development mode
schema.config().option('graph.schema_mode').set('Development')
// Remove myself (the ego vertex) for demonstration purposes since I am connected to everyone
g.V().has('screen_name', 'bobbriody').drop()
// Graph Size
long vertexCount = g.V().hasLabel('user').count().next()
long edgeCount = g.E().hasLabel('follows').count().next()
'Vertices: ' + vertexCount + '\nEdges: ' + edgeCount
@rjbriody
rjbriody / deleteEdgeFail.html
Last active October 16, 2015 19:46
vis.js Network delete edge label not working
<!doctype html>
<html>
<head>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.js"></script>
<link href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.css" rel="stylesheet" type="text/css"/>
</head>
<body>
<div id="mynetwork"></div>
<script type="text/javascript">
@rjbriody
rjbriody / index.html
Last active September 3, 2015 17:00 — forked from spmallette/index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Apache TinkerPop</title>
<meta name="description" content="A Graph Computing Framework">
<meta name="author" content="Apache TinkerPop">
@rjbriody
rjbriody / basic_with_resize_issue.html
Created September 25, 2014 16:09
reproduce sigma.js parent container resize issue. This is basic.html w/ minor mods.
<!-- START SIGMA IMPORTS -->
<script src="../src/sigma.core.js"></script>
<script src="../src/conrad.js"></script>
<script src="../src/utils/sigma.utils.js"></script>
<script src="../src/utils/sigma.polyfills.js"></script>
<script src="../src/sigma.settings.js"></script>
<script src="../src/classes/sigma.classes.dispatcher.js"></script>
<script src="../src/classes/sigma.classes.configurable.js"></script>
<script src="../src/classes/sigma.classes.graph.js"></script>
<script src="../src/classes/sigma.classes.camera.js"></script>
@rjbriody
rjbriody / sigma.plugins.community.js
Last active August 29, 2015 14:04
Hacked POC for sigma community plugin using https://github.com/upphiminn/jLouvain
var jLouvain = function () {
//Constants
var __PASS_MAX = -1
var __MIN = 0.0000001
//Local vars
var original_graph_nodes;
var original_graph_edges;
var original_graph = {};
var partition_init;
@rjbriody
rjbriody / elasticsearchMongoDBRiver.sh
Last active December 14, 2015 17:28
A one stop shop for how to get, configure, and run mongodb and elasticsearch with the mongodb-river from https://github.com/richardwilly98/elasticsearch-river-mongodb. I am by no means a bash expert and this script is pretty hacky even by my standards, but it is simply meant to illustrate the steps a developer would take to get a "hello world" u…
#!/bin/bash
# Definitely make sure you create a directory to run this in.
# Set this to match the mongodb link for your architecture
# http://www.mongodb.org/downloads
# arch="linux-i686"
# arch="osx-x86_64"
arch="linux-x86_64"