This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const delay = ms => { | |
return new Promise(fulfill => { | |
setTimeout(fulfill, ms); | |
}); | |
}; | |
const callWithRetry = async (fn, {validate, retries=3, delay: delayMs=2000, logger}={}) => { | |
let res = null; | |
let err = null; | |
for (let i = 0; i < retries; i++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": ["camo", "stage-0"] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var brain = require('brain'); | |
var fs = require('fs'); | |
var getMnistData = function(content) { | |
var lines = content.toString().split('\n'); | |
var data = []; | |
for (var i = 0; i < lines.length; i++) { | |
var input = lines[i].split(',').map(Number); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
var Document = require('camo').Document; | |
class Source extends Document { | |
constructor() { | |
super(); | |
// BUG: Type 'this.a' below to recreate: https://github.com/SublimeLinter/SublimeLinter-jshint/issues/70 | |
// Setup: jshint v2.5.11, sublimelinter-jshint v1.2.1, io.js 2.2.1 |