Skip to content

Instantly share code, notes, and snippets.

View npiro's full-sized avatar

Nicolas Piro npiro

View GitHub Profile
@npiro
npiro / Spark Dataframe Cheat Sheet.py
Created July 17, 2017 16:16 — forked from evenv/Spark Dataframe Cheat Sheet.py
Cheat sheet for Spark Dataframes (using Python)
# A simple cheat sheet of Spark Dataframe syntax
# Current for Spark 1.6.1
# import statements
from pyspark.sql import SQLContext
from pyspark.sql.types import *
from pyspark.sql.functions import *
#creating dataframes
df = sqlContext.createDataFrame([(1, 4), (2, 5), (3, 6)], ["A", "B"]) # from manual data
@npiro
npiro / ContextualPolicy.ipynb
Created April 26, 2017 20:07 — forked from awjuliani/ContextualPolicy.ipynb
A Policy-Gradient algorithm that solves Contextual Bandit problems.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.