Protect. Improve. Extend.
We have the deployment. We have the channels. Time to actually DO THINGS.
// | |
var notificationbox = function (w, which){ // w is a chromeWindow | |
//w = w || getMostRecentBrowserWindow(); | |
switch (which) { | |
case "bottom-global": | |
//w = w || getMostRecentBrowserWindow(); | |
let nb = w.gDataNotificationInfoBar._notificationBox; | |
//console.log(nb); | |
return nb; |
// require() some stuff from npm (like you were using browserify) | |
// and then hit Run Code to run it on the right | |
var p = document.createElement("pre"); | |
document.body.appendChild(p); | |
p.textContent="LOG"; | |
var log = function () { | |
p.textContent += "\n" + Array.prototype.slice.call(arguments).join(" ") | |
} |
/******/ (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; |
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"); |
// 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 () { |
# 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 |
""" | |
====================================================== | |
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. |