Skip to content

Instantly share code, notes, and snippets.

@vitillo
vitillo / addon-startup.R
Last active August 29, 2015 14:07
Add-on startup analysis.
library(dplyr)
library(reshape)
library(doMC)
library(caret)
trim.leading <- function (x) sub("^\\s+", "", x)
trim.trailing <- function (x) sub("\\s+$", "", x)
trim <- function (x) gsub("^\\s+|\\s+$", "", x)
registerDoMC(8)
@vitillo
vitillo / Bayes101.py
Created November 8, 2014 16:28
Bayes 101
This file has been truncated, but you can view the full file.
{
"metadata": {
"name": "",
"signature": "sha256:081b9937ad2575f1768d01c339462ad704226fa0c6551d14934aad2abf212241"
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
@vitillo
vitillo / BHR.R
Last active August 29, 2015 14:10
BHR hangs distribution and uptime correlation
# BHR hangs distribution and uptime correlation
library(ggplot2)
library(dplyr)
session <- read.csv("session.csv") %.% filter(uptime >= 0)
ggplot(aes(x=hangs), data=session) +
geom_histogram(aes(y=..density..), binwidth=1, colour="black", fill="blue") +
scale_x_continuous(limits=c(0, 50)) + #~ 90th quantile for sessions
@vitillo
vitillo / tutorial.scala
Last active December 18, 2020 17:33
Spark Tutorial @ Mozlandia 2014
//==========================================================================
// A gentle tutorial to Spark and Telemetry
//==========================================================================
// Let's import some Spark classes
import org.apache.spark.SparkContext
import org.apache.spark.SparkContext._
import org.apache.spark.SparkConf
// ... and some json parsing utilities
@vitillo
vitillo / batch.sh
Last active August 29, 2015 14:11
Telemetry setup scripts for Spark on EMR
HOME=/home/hadoop
source $HOME/.bashrc
# Error message
error_msg ()
{
echo 1>&2 "Error: $1"
}
# Parse arguments
@vitillo
vitillo / Telemetry Hello World.ipynb
Last active August 29, 2015 14:11
Telemetry Hello World
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vitillo
vitillo / ClientID Analysis.ipynb
Created December 15, 2014 14:43
ClienID analysis
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vitillo
vitillo / ClientID Mode EDA.ipynb
Created December 16, 2014 12:09
ClientID Mode EDA
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vitillo
vitillo / Bug 1111730.ipynb
Last active August 29, 2015 14:11
Bug 1111730
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@vitillo
vitillo / Bug 1111791.ipynb
Last active August 29, 2015 14:11
Bug 1111791
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.