Skip to content

Instantly share code, notes, and snippets.

@vitillo
vitillo / Makefile
Last active April 24, 2018 05:56
Eigen vs IPP, 4x4 Matrix Multiplication
CC=g++
CXXFLAGS=-O2 -fopenmp -g -mavx -march=native -I/opt/intel/composerxe/ipp/include -Iinclude/eigen3
LDFLAGS = -lgomp -lipps -lippm
all: main.o testAVX.o testAVX.h
$(CC) $(LDFLAGS) main.o -o kernel
main.o: main.cpp testAVX.h
$(CC) $(CXXFLAGS) -c main.cpp
// Ported from Stefan Gustavson's java implementation
// http://staffwww.itn.liu.se/~stegu/simplexnoise/simplexnoise.pdf
// Read Stefan's excellent paper for details on how this code works.
//
// Sean McCullough banksean@gmail.com
/**
* You can pass in a random number generator object if you like.
* It is assumed to have a random() method.
*/
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