Skip to content

Instantly share code, notes, and snippets.

View mreid's full-sized avatar

Mark Reid mreid

View GitHub Profile
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?'