Skip to content

Instantly share code, notes, and snippets.

View gregglind's full-sized avatar

Gregg Lind gregglind

View GitHub Profile

Proposed Flow For Heartbeat Product V1 (As part of Firefox Self-Repair)

(To be implemented in Fx 36)

rev.1

Overview of Self-Repair

@gregglind
gregglind / gist:107f1097d7983c52322b
Last active August 29, 2015 14:11
numerals in english from zero to one hundred
one
two
three
four
five
six
seven
eight
nine
ten
"""
======================================================
Classification of text documents using sparse features
======================================================
This is an example showing how scikit-learn can be used to classify documents
by topics using a bag-of-words approach. This example uses a scipy.sparse
matrix to store the features and demonstrates various classifiers that can
efficiently handle sparse matrices.
@gregglind
gregglind / poisson_process_over_unkown_session_length.r
Last active August 29, 2015 14:11
poisson_process_over_unkown_session_length.r
# given a total T, have an algorithm that
# generates events over (0,t), t <=T with
# proportion t/T
#
require("triangle")
eventSim <- function (sampler_fn, n, events=1, reps=1000) {
x <- replicate(reps,(function(events){
r <- sampler_fn(n) # length
# r <- rexp(n,.01) # mean = var = 1/.01 = 100
@gregglind
gregglind / todo-v-skip.js
Last active August 29, 2015 14:13
Example of todo vs skip semantics re: https://github.com/mochajs/mocha/issues/1510
// license: Public Domain
//it.todo = it.skip;
it.todo = function (title, callback) {
return it.skip("TODO: " + title, callback)
}
describe("todo vs skip", function () {
it.skip("skipped test", function () {
var fs = require("fs"),
path = require("path");
module.exports = function(blanket){
var traceur = require("traceur");
var oldLoaderJS = require.extensions['.js'];
require.extensions['.js'] = function(localModule, filename) {
var pattern = blanket.options("filter");
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;
#!/usr/bin/env node
require('shelljs/global');
config.fatal = true;
var args = process.argv.slice(2);
var target = {};
var help = function () {
console.log("== Available targets == \n");
/******/ (function(modules) { // webpackBootstrap
/******/ // The module cache
/******/ var installedModules = {};
/******/
/******/ // The require function
/******/ function __webpack_require__(moduleId) {
/******/
/******/ // Check if module is in cache
/******/ if(installedModules[moduleId])
/******/ return installedModules[moduleId].exports;

Heartbeat (Self-Repair / Shield) Recipes v1.0pre

Protect. Improve. Extend.

We have the deployment. We have the channels. Time to actually DO THINGS.

Goals:

Today