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; | |
import java.util.Random; | |
/** | |
* Contains a heuristic to check board favorability. | |
*/ | |
public class MyPlayer extends Player { | |
Random rand; |
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
/* | |
* Implements AVL Tree data structure that stores integer values. If AVL Tree becomes unbalanced, | |
* Tree will rebalance itself using single or double rotations depending on where the violation occurs. | |
* | |
*/ | |
public class AVLTreeNode { | |
private AVLTreeNode left; | |
private AVLTreeNode right; |
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
/* | |
* Java program used to solve a Sudoku puzzle. It is able to target empty squares, search for all possible answers | |
* and apply an algorithm to determine the correct solution to complete the puzzle. | |
*/ | |
import java.util.*; | |
import java.io.*; | |
public class Sudoku { | |
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 <stdlib.h> | |
#include <string.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/types.h> | |
#include <sys/wait.h> | |
#include "parse_args.h" | |
#include "history_queue.h" | |
/* |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <getopt.h> | |
#include <unistd.h> | |
#include <math.h> // used to help calculate set and block | |
#include "cachelab.h" | |
/* | |
* Simulates a cache logic with a write-back and LRU (least recently used) policy. | |
* Handles direct-mapped, set-associative and full-associative caches. |
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 <stdlib.h> | |
#include <stdio.h> | |
#include <unistd.h> | |
#include <sys/time.h> | |
#include <string.h> | |
/* | |
* An example of discrete event simulation, where a world of entities live, die, or are born based on their surrounding neighbors. | |
* Each time step simulates another round of living or dying. This cellular automation can take any initial configuration and | |
* be observed as it evolves through its life creating unique patterns. |
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 os, re # re imports regular expressions | |
# creates a file called job_list and dumps data. | |
os.system('lynx -nolist -dump http://www.careercast.com/jobs-rated/jobs-rated-2014-ranking-200-jobs-best-worst > job_list.txt') | |
os.system('lynx -nolist -dump http://www.careercast.com/content/top-200-jobs-2014-21-40 >> job_list.txt') | |
os.system('lynx -nolist -dump http://www.careercast.com/content/top-200-jobs-2014-41-60 >> job_list.txt') | |
os.system('lynx -nolist -dump http://www.careercast.com/content/top-200-jobs-2014-61-80 >> job_list.txt') | |
os.system('lynx -nolist -dump http://www.careercast.com/content/top-200-jobs-2014-81-100 >> job_list.txt') | |
os.system('lynx -nolist -dump http://www.careercast.com/content/top-200-jobs-2014-101-120 >> job_list.txt') | |
os.system('lynx -nolist -dump http://www.careercast.com/content/top-200-jobs-2014-121-140 >> job_list.txt') |
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
object MyTranslator { | |
def main(args: Array[String]): Unit = { | |
// Spanish to English database | |
// Translator's stock study list | |
val db = Map( | |
// first set | |
("hola" -> "hello"), | |
("adios" -> "bye"), |