This file contains hidden or 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
#! /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 |
This file contains hidden or 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
(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"))) |
NewerOlder