Skip to content

Instantly share code, notes, and snippets.

View sararob's full-sized avatar

Sara Robinson sararob

  • Firebase
  • San Francisco, CA
View GitHub Profile
@karpathy
karpathy / min-char-rnn.py
Last active April 25, 2024 06:24
Minimal character-level language model with a Vanilla Recurrent Neural Network, in Python/numpy
"""
Minimal character-level Vanilla RNN model. Written by Andrej Karpathy (@karpathy)
BSD License
"""
import numpy as np
# data I/O
data = open('input.txt', 'r').read() # should be simple plain text file
chars = list(set(data))
data_size, vocab_size = len(data), len(chars)
@mhartington
mhartington / canDrag.js
Created April 22, 2015 00:20
Dynamically allow ion-items dragging
angular.module('canDragDirective', [ionic])
.directive('isPurchased', function($timeout, $ionicListDelegate) {
return {
restrict: 'A',
link: function($scope, $element) {
$timeout(function() {
var elm = $element[0];
ionic.on('touch', function() {
// Simple way to check if the item is already purchased
@mbbertino
mbbertino / 1intro.md
Last active August 29, 2015 14:06
Ember, Ember ClI, Emberfire, Firbase, Simple Login Example

#Hello!

##I wanted to throw out an example of using Ember, Ember CLI, Emberfire, Firebase, Firebase Simple Login to set up authenticiation, and redirecting.

A couple of setup tasks:

  1. Assuming you already have Ember CLI and have basic knowledge of Ember and Firebase
  2. npm install --save emberfire
  3. bower install --save emberfire
  4. bower install --save-dev firebase-simple-login
    And add "app.import('vendor/firebase-simple-login/firebase-simple-login.js'); " to your Brocfile.js
@nkpart
nkpart / merge_sort.rb
Created October 14, 2011 04:04 — forked from kimhunter/merge_sort.rb
Merge sort ruby
#!/usr/bin/env ruby
# 2011-10-10 20:57:53 +1000
def merge_sort(a)
return a if a.size <= 1
l, r = split_array(a)
result = combine(merge_sort(l), merge_sort(r))
end