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
# Please note, this is not my work, but the work of a fellow redditer. | |
# I am simply placing it here for future use. | |
def MillerRabin(n,k=5): | |
''' | |
Performs the Miller-Rabin primality test on n to an error bound of 4^-k | |
(i.e. performs the test k times). True indicates a probable prime while a | |
false result indicates a definite composite number. | |
Inputs: | |
n - Number to be tested for primality |
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
<script type="text/javascript" src="jquery-1.6.1.min.js"></script> | |
<script type="text/javascript"> | |
$(document).ready(function() { | |
$('#range').change(function() { | |
$('#page_contents').attr('style', 'opacity:' + $('#range').attr('value')/100); | |
}); | |
}); | |
</script> | |
<input id="range" type="range" max='100' min='0' value='100' /> |
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
{ | |
"Christopher Troup": { | |
"1x": "Large Double-Double", | |
"1x": "24 Timbits" | |
} | |
} |
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
{ | |
"Christopher Troup": { | |
"1x": "Large Double-Double", | |
"1x": "24 Timbits" | |
}, | |
"Alex Hart": { | |
Drink: { | |
"type": "Coffee", | |
"size": "XL", |
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
INFILE="input.txt" | |
OUTFILE="output.txt" | |
key = "asdf" | |
fin = open(INFILE, "rb") | |
x = fin.read() | |
l = len(x) | |
key = key * (l/len(key)) | |
o = "" |
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
// Author: Alex Hart | |
// Compiling: g++ -o hello hello.cpp -lpthread --std=c++0x | |
#include<iostream> | |
#include<thread> | |
#include<cstdlib> | |
using namespace std; | |
mutex 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
filetype plugin on | |
filetype plugin indent on | |
syntax on | |
set t_Co=256 | |
set bg=dark | |
colorscheme solarized | |
set backspace=indent,eol,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
CC= | |
CFLAGS= | |
LDFLAGS= | |
SOURCE= | |
OBJECTS=$(SOURCE:.cpp=.o) | |
TARGET= | |
all: $(SOURCE) $(TARGET) | |
$(TARGET): $(OBJECTS) |
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 itself(): | |
return 4 |
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
<head> | |
<link rel="stylesheet" type="css" href="css/tab.css" /> | |
<script src="js/tab.js" type="text/javascript"></script> | |
</head> | |
<body> | |
<div class="tab-wrapper"> | |
<div class="tab-button-wrapper"> | |
<ul> | |
<li><a class="tab-button-first" | |
id="tab-button1" |
OlderNewer