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/perl | |
use strict; | |
use warnings; | |
my @carpet; | |
my $total; | |
carpet(2); | |
foreach my $row(@carpet){ |
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/perl | |
use strict; | |
use warnings; | |
use Getopt::Long; | |
use File::Find::Rule; | |
#Perl script for combining sub directories of text files | |
GetOptions('recursive' => \my $isRecursive, |
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/env python | |
from json import load | |
from urllib2 import urlopen, URLError | |
from argparse import ArgumentParser | |
def printError(e): | |
print "Error connecting to API: " | |
print "\t", e | |
def getLinks(): |
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
################################################ | |
# Simple Graph | |
# Author: Samuel Jackson | |
# Created: 28/1/13 | |
################################################ | |
class Node: | |
def __init__(self, data): | |
self.adjacents = [] | |
self.set_data(data) |
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/env python | |
##################################################### | |
#Fuzzy logic implementation of simple tipping system | |
#Author: Samuel Jackson ([email protected]) | |
#Date: 10/2/13 | |
##################################################### | |
################################# | |
# Functions for calculating # |
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 the required packages. | |
\usepackage{float} | |
\usepackage{graphicx} | |
% insert a single centred image into a LaTeX document. | |
\begin{figure}[H] | |
\centering | |
\includegraphics[width=0.7\textwidth]{<path-to-file>} | |
\caption{<image-caption>} | |
\label{fig:<image label>} |
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
var ar = { | |
"Hello": { | |
score: 12, | |
run: function() | |
{ | |
return "hi"; | |
} | |
} | |
}; | |
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
timeval t1, t2; | |
double elapsedTime; | |
//start timer | |
gettimeofday(&t1, NULL); | |
//do stuff... | |
//stop timer | |
gettimeofday(&t2, NULL); |
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.util.ArrayList; | |
public class Main { | |
public static void main(String[] args) { | |
new Main().calcSlot(7); | |
} | |
public int calcSlot(int priority) { | |
//list of jobs |
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
\documentclass{acm_proc_article-sp} | |
\usepackage{graphicx} | |
\usepackage{epstopdf} | |
\begin{document} | |
\title{A Comparison of Scheduling Algorithms} | |
\numberofauthors{1} | |
\author{ | |
\alignauthor |
OlderNewer