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
@davidrapin
davidrapin / !random-dates.cypher
Last active May 5, 2022 03:21
Create random dates (Neo4j Cypher)
// amount: number of random dates to create
// startYear: year range start
// startYear: year range end
WITH 1000 as amount, 2017 as startYear, 2021 as endYear
WITH range(1, amount) as xx, startYear, (endYear - startYear) as yearRange
UNWIND xx as x
WITH date({
year:toInteger(1+startYear+floor(rand()*yearRange)),
month:toInteger(1+floor(rand()*12)),
@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 / 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;
}