Skip to content

Instantly share code, notes, and snippets.

diff --git a/xpcom/threads/nsTimerImpl.cpp b/xpcom/threads/nsTimerImpl.cpp
--- a/xpcom/threads/nsTimerImpl.cpp
+++ b/xpcom/threads/nsTimerImpl.cpp
@@ -9,16 +9,19 @@
#include "nsAutoPtr.h"
#include "nsThreadManager.h"
#include "nsThreadUtils.h"
#include "plarena.h"
#include "pratom.h"
#include "GeckoProfiler.h"
@vitillo
vitillo / predictor.py
Last active August 29, 2015 13:56
Ensemble predictor based on Mann-Whitney's U test of the last N daily distributions
import matplotlib as mp
import matplotlib.pylab
import numpy
import sys
import simplejson as json
from scipy import stats
from urllib.request import urlopen
sample_unit = None
@vitillo
vitillo / mainthreadio.R
Last active August 29, 2015 13:56
Exploratory analysis hackjob for Mainthread-IO data
# Exploratory analysis hackjob for Mainthread-IO data
library(data.table)
library(ggplot2)
library(doMC)
registerDoMC(8)
############################################################
# High frequency files analysis
############################################################
@vitillo
vitillo / forecast.R
Created April 3, 2014 20:21
Time series forecast
library(forecast)
library(ggplot2)
library(dplyr)
predictions = as.factor(read.csv('results.csv')$Prediction)
levels(predictions) <- c("ok", "drop")
submissions <- read.csv('submissions.csv')$Submissions
submissions <- msts(submissions, seasonal.periods=c(24, 7*24), ts.frequency=24)
@vitillo
vitillo / gist:b7ff051a1a122330288d
Created May 16, 2014 15:02
Use Bayesian inference to reconstruct a corrupted signal
{
"metadata": {
"name": ""
},
"nbformat": 3,
"nbformat_minor": 0,
"worksheets": [
{
"cells": [
{
@vitillo
vitillo / addons.py
Last active August 29, 2015 14:01
Quick and dirty Telemetry analysis of slow-shutdown.
import json
def map(k, d, v, cx):
j = json.loads(v)
try:
addons = j['info']['addons']
except:
return
@vitillo
vitillo / filter.json
Created July 3, 2014 16:01
GPU Analaysis
{
"version": 1,
"dimensions": [
{
"field_name": "reason",
"allowed_values": ["saved-session"]
},
{
"field_name": "appName",
"allowed_values": "Firefox"
# HG changeset patch
# Parent a4dcfbebcb588b9893900152eb512c3810880d68
# User Roberto A. Vitillo <rvitillo@mozilla.com>
Bug 559505 - localstore.rdf kills ponies; r=enn
diff --git a/b2g/installer/package-manifest.in b/b2g/installer/package-manifest.in
--- a/b2g/installer/package-manifest.in
+++ b/b2g/installer/package-manifest.in
@@ -290,16 +290,17 @@
@BINPATH@/components/shellservice.xpt
@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": [