Skip to content

Instantly share code, notes, and snippets.

View jimod's full-sized avatar

James O' Donoghue jimod

View GitHub Profile
@jimod
jimod / ConfusionMatrixTheano.ipynb
Last active November 10, 2015 12:21
Working through the elements of creating a confusion matrix in theano
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
class TreeSet<T extends Comparable<T>> {
private static class Node<T> {
T item;
Node<T> left, right;
Node(T item0, Node<T> left0, Node<T> right0) {
item = item0; left = left0; right = right0;
}
}
@jimod
jimod / Queue.java
Created August 14, 2015 14:21
Implementation of a string queue in java for tutorial
public class Queue {
private Node head;
private Node tail;
private int size;
public Queue(){
head = null;
tail = null;
size = 0;
}
import java.util.*;
/**
* Implementation of a generic bag in Java using a HashMap
* where each item in the map (x, n) stores item x and the number of occurences n
**/
public class Bag<T>
{
//Initialise instantiate hashmap to implement bag