This guide is many years old is most likely outdated. I'll keep it here for reference; use at your own risk.
Tested on Mac OSX 10.6.7 with LLVM and CLANG version 2.9 Eclipse Helios Service Release 1 (Build 20100917-0705)
(ns type-level-tagger | |
{:doc "Implements State-of-the-art Unsupervised Part-of-speech Tagger | |
from \"Simple Type-Level Unsuperivsed POS Tagging\" | |
by Yoong-Keok Lee, Aria Haghighi and Regina Barzilay | |
(http://www.cs.berkeley.edu/~aria42/pubs/typetagging.pdf) | |
blog post: http://wp.me/pcW6S-x" | |
:author "Aria Haghighi ([email protected])"} | |
(:use [clojure.java.io :only [reader]] | |
[clojure.contrib.duck-streams :only [with-out-writer]] | |
[clojure.contrib.seq-utils :only [indexed]] |
(use '[clojure.core.match :only [match]]) | |
(defn evaluate [env [sym x y]] | |
(match [sym] | |
['Number] x | |
['Add] (+ (evaluate env x) (evaluate env y)) | |
['Multiply] (* (evaluate env x) (evaluate env y)) | |
['Variable] (env x))) | |
(def environment {"a" 3, "b" 4, "c" 5}) |
## PyLogis | |
import numpy as np | |
import scipy as sp | |
import matplotlib.pyplot as plt | |
# Param orders: r, K | |
def logis(x, y, p): | |
est = [] |
[ec2-user@ip-10-33-4-246 grub]$ lspci | |
00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02) | |
00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II] | |
00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II] | |
00:01.3 Bridge: Intel Corporation 82371AB/EB/MB PIIX4 ACPI (rev 01) | |
00:02.0 VGA compatible controller: Cirrus Logic GD 5446 | |
00:03.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3) | |
00:04.0 3D controller: nVidia Corporation GF100 [Tesla S2050] (rev a3) | |
00:05.0 Unassigned class [ff80]: XenSource, Inc. Xen Platform Device (rev 01) |
# use glob syntax | |
syntax: glob | |
*.obj | |
*.pdb | |
*.user | |
*.aps | |
*.pch | |
*.vspscc | |
*.vssscc |
# Functions to generate networks ("graphs") for spatial ecology. | |
# | |
# Stores the graph in a rather inefficient (but easy-to-use) adjacency matrix | |
# of boolean values. | |
# | |
# Key functions: | |
# - geograph returns a random geometric graph. | |
# - cgeograph returns a connected random geometric graph. | |
# - geotree returns a random geometric tree. | |
# |
// This F# dojo is directly inspired by the | |
// Digit Recognizer competition from Kaggle.com: | |
// http://www.kaggle.com/c/digit-recognizer | |
// The datasets below are simply shorter versions of | |
// the training dataset from Kaggle. | |
// The goal of the dojo will be to | |
// create a classifier that uses training data | |
// to recognize hand-written digits, and | |
// evaluate the quality of our classifier |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> | |
<meta charset="utf-8"> | |
<title>Scriptoria -- a database of scientific documents written with distributed revision control systems.</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content=""> | |
<meta name="author" content=""> |
/** | |
* Computes the measure of an English word as defined for the Porter algorithm. | |
* The definition of the measure can be found here: | |
* http://snowball.tartarus.org/algorithms/porter/stemmer.html | |
* | |
* ...but it's overtly complicated. Here's my definition: | |
* | |
* The *measure* of a word is the number of vowels followed by a consonant. | |
* | |
* Examples: |