This file contains hidden or 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
| abstract class A | |
| case class A1(in: String) extends A | |
| case class A2(num: Int) extends A | |
| val test1: A = A1("Hello") | |
| val test2: A = A2(1) | |
| def receive (inObj: A) = { |
This file contains hidden or 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
| Name: Kyle Holzinger | |
| BUID: U92663004 | |
| Date: 11.13.14 | |
| Problem 1 | |
| The first thing to do is to calculate the number of vertices and edges in graph G. Then, using the Floyd Warshall algorithm with a few minor changes, that is to say you still read from K=0 to K = N, given the following changes it now computes the number of different paths between each pair of vertices: | |
| 1. Make a list of counters for each pair of vertices | |
| 2. Run the original Floyd Warshall algorithm, however now you keep track of the start and end vertices. For each path discovered, add 1 to that counter. |
This file contains hidden or 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
| # Name: Kyle Holzinger | |
| # BUID: U92663004 | |
| # Date: 12.15.14 | |
| from math import floor | |
| from fractions import gcd | |
| from random import randint | |
| ''' | |
| Problem 1 |
This file contains hidden or 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 | |
| # echo "Hello, world!" | |
| sudo service ntp stop | |
| echo "Updating time..." | |
| sudo ntpdate -s time.nist.gov | |
| sudo service ntp start |
This file contains hidden or 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
| size = int(input().rstrip()) | |
| def neighbors(i,j): | |
| fin = [] | |
| for x in [-1,1]: | |
| if i + x > -1 and i + x < size: | |
| fin.append((i+x,j)) | |
| if j + x > -1 and j + x < size: | |
| fin.append((i,j+x)) | |
| return fin |
This file contains hidden or 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
| def min(l): | |
| cur = float('-inf') | |
| for el in l: | |
| if el < cur: | |
| cur = el | |
| return cur |
This file contains hidden or 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
| def subsetsum(array,num): | |
| if num == 0 or num < 1: | |
| return None | |
| elif len(array) == 0: | |
| return None | |
| else: | |
| if array[0] == num: | |
| return [array[0]] | |
| else: |
This file contains hidden or 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 keys = require('./keys'), | |
| yelp = require('yelp').createClient( keys ); | |
| var until = function(n, cb){ | |
| return function(){ (--n) || cb(); }; | |
| }; | |
| module.exports = function (search, zip, cb) { | |
| function search(offset, cb, arr){ |
This file contains hidden or 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
| ############################## | |
| # Name: Kyle Holzinger | |
| # Date: April 20th, 2015 | |
| # CS 558 Lab 4 | |
| ############################## | |
| import dpkt, sys, socket | |
| class Detector(object): |
This file contains hidden or 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
| package wordcount; | |
| import java.io.IOException; | |
| import java.util.StringTokenizer; | |
| import org.apache.hadoop.conf.Configuration; | |
| import org.apache.hadoop.fs.Path; | |
| import org.apache.hadoop.io.IntWritable; | |
| import org.apache.hadoop.io.Text; | |
| import org.apache.hadoop.mapreduce.Job; |
OlderNewer