Skip to content

Instantly share code, notes, and snippets.

View eddienko's full-sized avatar
🕊️
Stand with Peace

Eduardo Gonzalez eddienko

🕊️
Stand with Peace
View GitHub Profile
@eddienko
eddienko / Spark_Jupyter_OS_X.md
Created January 27, 2018 18:15 — forked from frank-leap/Spark_Jupyter_OS_X.md
Steps to configure Jupyter (iPython Notebook) with Python (3.5.1) and Spark (1.6.0) kernel on Mac OS X (El Capitan)

Install Python3, Scala and Apache Spark via Brew (http://brew.sh/)

brew update
brew install python3
brew install scala
brew install apache-spark

Set environment variables

@eddienko
eddienko / parsel.sql
Created November 6, 2015 15:19
Parsel: A Simple Function for Parallel Query in Postgres using Dblink
-- DROP FUNCTION IF EXISTS public.parsel(db text, table_to_chunk text, pkey text, query text, output_table text, table_to_chunk_alias text, num_chunks integer);
CREATE OR REPLACE FUNCTION public.parsel(db text, table_to_chunk text, pkey text, query text, output_table text, table_to_chunk_alias text default '', num_chunks integer default 2)
RETURNS text AS
$BODY$
DECLARE
sql TEXT;
min_id integer;
max_id integer;
step_size integer;
lbnd integer;