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.math.BigInteger; | |
class Factors { | |
public static void main (String [] args) | |
{ | |
// 157 bit n = pq with p ~= 78 bits | |
BigInteger n = new BigInteger("273966616513101251352941655302036077733021013991"); | |
// Set i to be p - 10e6 | |
BigInteger i = new BigInteger("496968652506233112158689"); |
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 flask | |
app = flask.Flask(__name__) | |
template = """ | |
<form method="POST"> | |
<textarea name="text"></textarea> | |
<input type="submit" value="Submit"> | |
</form> | |
""" |
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
#!/bin/bash | |
# If you'd like, you can actually run this file | |
# It likely makes more sense to read it, understand it, and run the instructions yourself | |
# Create the virtual environment | |
virtualenv env | |
# Enter into the virtual environment | |
source ./env/bin/activate |
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
require(compiler) | |
enableJIT(3) | |
fib = function(x) { | |
if (x < 2) { | |
return(x) | |
} | |
return(fib(x - 1) + fib(x - 2)) | |
} |
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
smerity@pegasus:~/cs207$ make viewer | |
/usr/bin/g++ -std=gnu++0x -fopenmp -funroll-loops -O3 -W -Wall -Wextra -Wfatal-errors -I. -MD -MF .deps/viewer.d -c -o viewer.o viewer.cpp | |
viewer.cpp:70:1: error: expected ‘}’ at end of input | |
compilation terminated due to -Wfatal-errors. | |
make: *** [viewer.o] Error 1 |
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
# How many of these lines actually do something? | |
if (U < A): | |
x[i] = x_star | |
i = i + 1 | |
x_prev = x_star | |
else: | |
x[i] = x_prev | |
x_prev = x[i] | |
i = i + 1 | |
i=i-1 |
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
def mvslice(pdf, x0, widths, sampleSize=1000, dims=2, burnin=0, thin=0): | |
""" | |
:param pdf: function we're trying to sample | |
:param x0: inital point | |
:param widths: prior for widths of our hyperrectangle | |
:param sampleSize: number of samples to generate | |
:param dims: dimension of our multivariate space | |
:param burnin: number of samples to get rid of at beginning | |
:param thin: number of samples to keep | |
""" |
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
Marking temp/nate_checker.csv against temp/final.csv | |
Error for match Albany NY vs Mt St Mary's (S_507_686) = -2.88785816957 | |
Error for match American Univ vs Arizona (S_509_511) = -0.0204754420265 | |
Error for match Arizona vs Wisconsin (S_511_849) = -2.46652362788 | |
Error for match Arizona St vs Colorado (S_512_556) = -1.80260502788 | |
Error for match Arizona St vs Gonzaga (S_512_607) = -4.27299389895 | |
Error for match Arizona St vs Massachusetts (S_512_663) = -1.46103546276 | |
Error for match Arizona St vs Michigan (S_512_670) = -3.99960393573 | |
Error for match Arizona St vs St Louis (S_512_780) = -2.09220210929 | |
Error for match Arizona St vs Texas (S_512_793) = -3.61348661457 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
OlderNewer