Skip to content

Instantly share code, notes, and snippets.

View mreid's full-sized avatar

Mark Reid mreid

View GitHub Profile
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)
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;
@mreid
mreid / crossval.sh
Created July 21, 2009 04:51
Bash script for doing cross validation
#!/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
# 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?'