Instance | Branch |
---|
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
import matplotlib.pyplot as plt | |
from keras.models import Sequential | |
from keras.layers import Dense | |
from keras.optimizers import Adam | |
model = Sequential() | |
model.add(Dense(10, input_dim=X_train.shape[1], activation='sigmoid')) | |
model.add(Dense(1, activation='sigmoid')) | |
model.compile(optimizer=Adam(lr=0.01), | |
loss='binary_crossentropy', |
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 Pusher = require('pusher'), | |
os = require('os'), | |
express = require('express'), | |
app = express(), | |
ch = 'stats'; | |
var pusher = new Pusher({ | |
appId: process.env.PUSHER_APP_ID, | |
key: process.env.PUSHER_KEY, | |
secret: process.env.PUSHER_SECRET |
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
local application = require "hs.application" | |
local tiling = require "hs.tiling" | |
local hotkey = require "hs.hotkey" | |
local Spotify = require "hs.spotify" | |
-- TODO: Move more stuff into these | |
-- custom scripts | |
require "sizeup" | |
require "triggers" |
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
describe('e2e: main', function() { | |
var ptor; | |
beforeEach(function() { | |
browser.get('/'); | |
ptor = protractor.getInstance(); | |
}); | |
it('should load the home page', function() { |
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
function LinkedListNode(v) { | |
this.val = v; | |
this.next = null | |
} | |
LinkedListNode.prototype.print = function() { | |
let node = this; | |
while (node) { | |
process.stdout.write(`${node.val} -> `) | |
node = node.next |
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
/** | |
* @param {number} x | |
* @return {number} | |
*/ | |
var reverse = function(x) { | |
let y = 0; | |
let num = Math.abs(x); | |
const intMax = Math.pow(2, 31) + 1; | |
while(num != 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
const gulp = require('gulp'); | |
const plumber = require('gulp-plumber'); | |
// css | |
const postcss = require('gulp-postcss'); | |
// HACK | |
const concat = require('gulp-concat') | |
const inject = require('gulp-inject-string') |
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
angular.module('d3', []) | |
.factory('d3Service', ['$document', '$window', '$q', '$rootScope', | |
function($document, $window, $q, $rootScope) { | |
var d = $q.defer(), | |
d3service = { | |
d3: function() { return d.promise; } | |
}; | |
function onScriptLoad() { | |
// Load client in the browser | |
$rootScope.$apply(function() { d.resolve($window.d3); }); |
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
// Not the fastest thing in the world | |
export default class Middleware { | |
constructor (methods) { | |
this.methods = methods; | |
this.methodsStack = {}; | |
this.originalMethod = {}; | |
methods.forEach (method => { | |
this.methodsStack[method] = []; | |
this.originalMethod[method] = this[method]; |