Skip to content

Instantly share code, notes, and snippets.

View auser's full-sized avatar

Ari auser

View GitHub Profile
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',
@auser
auser / gist:c25f0fb8e6e632d9d69a1a93601204c5
Created March 24, 2020 15:47 — forked from digitaljhelms/gist:4287848
Git/GitHub branching standards & conventions

Branching

Quick Legend

Description, Instructions, Notes
Instance Branch
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
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"
@auser
auser / main.spec.js
Created January 14, 2014 08:44
Gist that sits alongside the protractor post at http://www.ng-newsletter.com/posts/practical-protractor.html
describe('e2e: main', function() {
var ptor;
beforeEach(function() {
browser.get('/');
ptor = protractor.getInstance();
});
it('should load the home page', function() {
@auser
auser / LinkedListNode.js
Created December 11, 2018 06:03
Just saving this for myself... creating a linked list from a list of nodes.
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
/**
* @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) {
@auser
auser / Gulpfile.js
Created January 28, 2017 01:44
The hack of the hackity hack
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')
@auser
auser / d3.js
Last active August 23, 2018 12:31
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); });
// 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];