Skip to content

Instantly share code, notes, and snippets.

View zygmuntz's full-sized avatar

Zygmunt Zając zygmuntz

View GitHub Profile
@stober
stober / softmax.py
Created March 1, 2012 03:05
Softmax in Python
#! /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
@afeinberg
afeinberg / friedman.clj
Created January 3, 2011 09:04
Thomas Friedman AI
(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")))