Skip to content

Instantly share code, notes, and snippets.

View maruthiprithivi's full-sized avatar
👨‍💻
Builder @typeless

Maruthi Prithivirajan maruthiprithivi

👨‍💻
Builder @typeless
View GitHub Profile
@maruthiprithivi
maruthiprithivi / Spark+ipython_on_MacOS.md
Created December 6, 2015 22:05 — forked from ololobus/Spark+ipython_on_MacOS.md
Apache Spark installation + ipython notebook integration guide for Mac OS X

Apache Spark installation + ipython notebook integration guide for Mac OS X

Tested with Apache Spark 1.3.1, Python 2.7.9 and Java 1.8.0_45 + workaround for Spark 1.4.x from @enahwe.

Install Java Development Kit

Download and install it from oracle.com

@maruthiprithivi
maruthiprithivi / install_spark.md
Created December 6, 2015 22:04 — forked from hkhamm/install_spark.md
Install, Setup, and Test Spark and Cassandra on Mac OS X

Install, Setup, and Test Spark and Cassandra on Mac OS X

This Gist assumes you already followed the instructions to install Cassandra, created a keyspace and table, and added some data.

Install Apache Spark

brew install apache-spark
@maruthiprithivi
maruthiprithivi / README.md
Last active August 29, 2015 14:13 — forked from mbostock/.block

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

Compare to this Cartesian layout.

@maruthiprithivi
maruthiprithivi / README.md
Last active August 29, 2015 14:13 — forked from mbostock/.block

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

Compare to this Cartesian layout.

@maruthiprithivi
maruthiprithivi / README.md
Last active August 29, 2015 14:13 — forked from mbostock/.block

The tree layout implements the Reingold-Tilford algorithm for efficient, tidy arrangement of layered nodes. The depth of nodes is computed by distance from the root, leading to a ragged appearance. Cartesian orientations are also supported. Implementation based on work by Jeff Heer and Jason Davies using Buchheim et al.'s linear-time variant of the Reingold-Tilford algorithm. Data shows the Flare class hierarchy, also courtesy Jeff Heer.

Compare to this Cartesian layout.

@maruthiprithivi
maruthiprithivi / index.html
Last active August 29, 2015 14:12 — forked from mbostock/.block
<!DOCTYPE html>
<meta charset="utf-8">
<title>Force-Directed Graph</title>
<style>
.node {
cursor: pointer;
stroke: #3182bd;
stroke-width: 1.5px;
}
doInstall <- TRUE
toInstall <- c("sna", "igraph")
if(doInstall){install.packages(toInstall, repos = "http://cran.us.r-project.org")}
lapply(toInstall, library, character.only = TRUE)
adjacencyList <- read.csv("https://dl.dropbox.com/s/8wabcrtqxysp03u/Twitter_network.R.csv?dl=1")
head(adjacencyList)
adjacencyMatrix <- table(adjacencyList)
as.matrix(sort(rowSums(adjacencyMatrix))) # Out-degree