(C-x means ctrl+x, M-x means alt+x)
The default prefix is C-b. If you (or your muscle memory) prefer C-a, you need to add this to ~/.tmux.conf
:
(ns friedman) | |
;; Inspired by ``A Grammar for a Subset of English'', PAIP by Norvig pp. 35-36 | |
(defn one-of [lst] | |
(nth lst (rand-int (count lst)))) | |
(defn common-occupation [] | |
(one-of '("barber" "cab driver" "teacher" "fisherman" "doctor"))) |
#! /usr/bin/env python | |
""" | |
Author: Jeremy M. Stober | |
Program: SOFTMAX.PY | |
Date: Wednesday, February 29 2012 | |
Description: Simple softmax function. | |
""" | |
import numpy as np | |
npa = np.array |
import sqlite3 | |
# open connection and get a cursor | |
conn = sqlite3.connect(':memory:') | |
c = conn.cursor() | |
# create schema for a new table | |
c.execute('CREATE TABLE IF NOT EXISTS sometable (name, age INTEGER)') | |
conn.commit() |
import urllib2 | |
import re | |
import sys | |
from collections import defaultdict | |
from random import random | |
""" | |
PLEASE DO NOT RUN THIS QUOTED CODE FOR THE SAKE OF daemonology's SERVER, IT IS | |
NOT MY SERVER AND I FEEL BAD FOR ABUSING IT. JUST GET THE RESULTS OF THE | |
CRAWL HERE: http://pastebin.com/raw.php?i=nqpsnTtW AND SAVE THEM TO "archive.txt" |
""" Non-negative matrix factorization for I divergence | |
This code was implements Lee and Seung's multiplicative updates algorithm | |
for NMF with I divergence cost. | |
Lee D. D., Seung H. S., Learning the parts of objects by non-negative | |
matrix factorization. Nature, 1999 | |
""" | |
# Author: Olivier Mangin <[email protected]> |
# (C) Kyle Kastner, June 2014 | |
# License: BSD 3 clause | |
from sklearn.base import BaseEstimator, TransformerMixin | |
from sklearn.utils import gen_batches | |
from scipy.linalg import eigh | |
from scipy.linalg import svd | |
import numpy as np | |
# From sklearn master |
-- Currying in Haskell | |
add :: Int -> Int -> Int -> Int -> Int | |
add a b c d = a + b + c + d | |
-- use `add 3 7 9 11` | |
// Currying in Swift | |
func add(a: Int) -> (Int -> Int) { | |
func add1(b: Int) -> (Int -> Int) { | |
func add2(c: Int) -> (Int -> Int) { | |
func add3(d: Int) -> Int { |
There used to be a tutorial here for using Torch7 on EC2, but it's now outdated. It is best to use an EC2 image that already has Torch7 and CUDA stuff preinstalled.
""" | |
The MIT License (MIT) | |
Copyright (c) 2015 Alec Radford | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
copies of the Software, and to permit persons to whom the Software is |