Keybase proof
I hereby claim:
- I am mreid on github.
- I am mreid (https://keybase.io/mreid) on keybase.
- I have a public key whose fingerprint is 0290 8892 E023 A876 460B D320 2B84 F83F 283D 58D8
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
# Example implementation of simple arithmetic coding in Python (2.7+). | |
# | |
# USAGE | |
# | |
# python -i arithmetic.py | |
# >>> m = {'a': 1, 'b': 1, 'c': 1} | |
# >>> model = dirichlet(m) | |
# >>> encode(model, "aabbaacc") | |
# '00011110011110010' | |
# |
# One-liner to add files to a git changeset that have been already deleted from | |
# the filesystem. (Surely there must be an easier way?) | |
git status | ruby -ne '$_ =~ /deleted:\s+(.*)/; `git rm #{$1}` unless $1.nil?' |
#!/usr/bin/perl -w | |
# -*-perl-*- | |
# $Id: crossval,v 1.1.1.1 2003/04/02 02:06:05 mreid Exp $ | |
# | |
# NAME | |
# crossval - Run Aleph on a collection of cross validation sets. | |
# | |
# SYNOPSIS | |
# crossval [--aleph ALEPH] [--yap YAP] [--param ALEPH_SETTING] [--set ALEPH_SETTING] | |
# EXP_BASE BACKGROUND DATA_PATTERN |
package demo; | |
import java.io.BufferedReader; | |
import java.io.FileReader; | |
import java.io.IOException; | |
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.Comparator; | |
import java.util.HashMap; | |
import java.util.List; |
Running Snow Leopard 10.6.7 on a 2.66 GHz Intel Core 2 Duo iMac. | |
Installed XCode 4 from the App Store (previous had XCode 3 installed under 10.5). | |
---- | |
$ uname -a | |
Darwin iMac.local 10.7.0 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386 | |
$ gcc --version | |
i686-apple-darwin10-gcc-4.2.1 (GCC) 4.2.1 (Apple Inc. build 5666) (dot 3) |
# LZ78 Encoding | |
# | |
# Performs LZ78 encoding on the standard input and writes result to standard output | |
# using algorithm described in MacKay textbook. | |
# | |
# Note: | |
# - All input symbols are encoded using 7-bit ASCII. | |
# - Pointer index is encoded using logarithmically increasing number of bits | |
# | |
# USAGE: python lz78-encode.py |
# A command-line noisy channel | |
# | |
# USAGE: python channel.py BLOCK_SIZE FLIP_PROBABILITY | |
# | |
# EXAMPLE: | |
# $ echo "0000000" | python channel.py 7 0.8 | |
# 0000100 | |
# | |
# AUTHOR: Mark Reid <mark.reid@anu.edu.au> | |
# CREATED: 2013-10-21 |
101110000011111111001001101101001010101001110011010000110100010111100111000000010111110000110101011011100000110000000101101100000101111010001001111000000000111000000011 |
The INSTALL instructions that come with Vowpal Wabbit appear not to work on Mac OS X Lion. Here's what I did to get it to compile. You will need the developer tools that come with the XCode installation.
The only dependency VW has is the boost C++ library. So first, download and install Boost
To install Boost, do the following:
$ cp ~/Downloads/boost_1_48_0.tar.bz2 ./