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
| /* | |
| * CSci 1913 Lab 6 | |
| * Ryan Sjostrand and Benjamin Pankow | |
| * | |
| * To compile: javac BinaryVsLinear.java | |
| * To run: java BinaryVsLinear | |
| */ | |
| class BinaryVsLinear | |
| { |
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
| 1 1.0 2.0 | |
| 2 1.5 3.0 | |
| 3 2.0 3.0 | |
| 4 2.5 3.75 | |
| 5 3.0 4.0 | |
| 6 3.5 4.166666666666667 | |
| 7 4.0 4.142857142857143 | |
| 8 4.5 4.625 | |
| 9 5.0 4.888888888888889 | |
| 10 5.5 5.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
| /* | |
| * CSci 1913 Lab 5 | |
| * Ryan Sjostrand and Benjamin Pankow | |
| * | |
| * To compile: javac Lab5.java | |
| * To run: java Lab5 | |
| */ | |
| class Polygon | |
| { |
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
| /** | |
| * CSci 1913 Lab 4 | |
| * Ryan Sjostrand and Benjamin Pankow | |
| * | |
| * To compile: javac Lab4.javac | |
| * To run: java Lab4 | |
| */ | |
| class Sieve | |
| { |
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
| class Sieve | |
| { | |
| private boolean[] numbers; | |
| public Sieve(int max) | |
| { | |
| if (max < 0) | |
| { | |
| throw new IllegalArgumentException("max cannot be negative"); | |
| } |
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
| import nltk | |
| from BTrees.OOBTree import OOBTree | |
| from ZODB import FileStorage, DB | |
| from persistent import Persistent | |
| import transaction | |
| import string | |
| from collections import Counter | |
| import math | |
| storage = FileStorage.FileStorage("temp-storage.fs") |
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
| # CSci 1913 Lab Section 06 | |
| # Lab 2 | |
| # Ryan Sjostrand and Benjamin Pankow | |
| class Zillion: | |
| def __init__(self, digits): | |
| self.data = [] |
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
| # CSci 1913 Lab Section 06 | |
| # Lab 1 | |
| # Ryan Sjostrand and Benjamin Pankow | |
| def left(e): | |
| return e[0] | |
| def op(e): |
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
| # CSci 1913 Lab Section 06 | |
| # Lab 1 | |
| # Ryan Sjostrand and Benjamin Pankow | |
| def left(e): | |
| return e[0] | |
| def op(e): |
NewerOlder