This file contains 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/ruby | |
# | |
# Ugly-as-heck script for comparing two CSV files whose rows have changed, and | |
# where rows were added to or removed from the second file. Traditional diff tools | |
# can't make the connection between these two types of changes, so show every line as having | |
# changed. | |
# | |
# Uses git and gitk. | |
require 'fileutils' |
This file contains 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
#!/bin/bash | |
# by Zachary Klippenstein | |
# | |
# Prints out a bunch of information about all files in the current | |
# directory and subdirectories, recursively. | |
# Info includes: | |
# - filename | |
# - file type (as given by 'file' command) | |
# - file contents (prefixed by filename and line number in file, and for binary files, result of 'strings') |
This file contains 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
public ResultPair solveNewton(double init, double epsilon) | |
{ | |
int numIt = 1; | |
double root; | |
double xn; | |
double xnPlusOne; | |
double xnMinusOne; | |
xn = init; | |
xnPlusOne = xn - eval(xn) / getDeriv().eval(xn); |
This file contains 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
#include <stdio.h> | |
#include <stdlib.h> | |
#include <ctype.h> | |
#include <string.h> | |
#define STACK_SIZE 1000 | |
#define MAX_OPERATORS 10 | |
#define MAX_LINE 300 | |
// Clear any exception |
This file contains 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
import java.io.*; | |
import java.util.Scanner; | |
import java.util.HashMap; | |
import java.util.Collection; | |
public class Contest09Problem4 | |
{ | |
enum State | |
{ | |
running, |
This file contains 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
from HTMLParser import HTMLParser | |
class LinkParser(HTMLParser): | |
def __init__(self): | |
HTMLParser.__init__(self) | |
self.links = [] | |
#end __init__() | |
def reset(self): | |
HTMLParser.reset(self) |
This file contains 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
#!/bin/bash | |
HELP=" | |
Created on: 20/01/2010 | |
By: Zachary Klippenstein | |
This script takes a local directory and a set of options | |
specifying how/where to connect to a remote Samba server, | |
and a newline-delimited list of paths on standard input. | |
The paths should be relative to the local directory and |
This file contains 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
#!/bin/bash | |
# | |
# usage: caseglob [--rename] path | |
# Prints the path, with the basename corrected to the actual case of the file, if | |
# a match can be made. | |
# | |
# If --rename is specified, if an unambiguous match is found, it will be renamed to | |
# path and returned in the original case. | |
# | |
# If there are 0 or more than 1 matches, the original basename is printed. |
This file contains 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
# Demonstrates how to use the SentenceParser class. | |
require 'sentenceparser' | |
parser = SentenceParser.new | |
# Add a string as a source | |
parser << "This is a string. It has multiple sentences." | |
parser << "These are" << "a few strings, splitting" << "sentences across them." |
This file contains 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
#!/bin/bash | |
# | |
# Run periodically by cron, and will unarchive data in the | |
# ~/auto_unarchive/drop_target directory. | |
# Where the action happens | |
unarchiveDir="~/auto_unarchive/drop_target" | |
# Time in seconds between checking for new archives | |
checkInterval=1.5 |
OlderNewer