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
#Rock Paper Scissors | |
import random | |
repeat = True | |
continue_game = True | |
while(repeat): | |
total_rounds = input("What is the maximum number of rounds that you wish to play? ") | |
curr_round = 1 | |
wins = 0 | |
losses = 0 | |
draws = 0 |
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
text = open('gettysburg.txt','r').read() | |
for x in reversed(range(len(text))): | |
print "Now on length " + str(x) | |
done = False | |
substring = text[0:x] | |
for i in range((len(text) + 1) - x): | |
print "Now on position " + str(i) | |
if x+i <= len(text): | |
substring = text[0+i:x+i] | |
if substring == substring[::-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 isPrime(n): | |
if n < 2: return False | |
elif n == 2: return True | |
else: | |
for x in range(2, int(n**0.5)+1): | |
if n % x == 0: | |
return False | |
return True | |
def factor(n): |
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 csv | |
import itertools | |
def findsubsets(S,m): | |
return list(itertools.combinations(S, m)) | |
#numlist = (1, 2, 3, 4, 6) | |
csvreader = csv.reader(open('numbers.csv','rb'), skipinitialspace=True) | |
numlist = [int(x) for x in csvreader.next()] | |
answer = 0 | |
possibles = [] |
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
Section "ServerLayout" | |
Identifier "amdcccle Layout" | |
Screen 0 "amdcccle-Screen[1]-0" 0 0 | |
EndSection | |
Section "InputDevice" | |
# generated from default | |
Identifier "Mouse0" | |
Driver "mouse" |
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
Section "ServerLayout" | |
Identifier "DefaultLayout" | |
Screen 0 "LeftScreen" 0 0 | |
# Screen "RightScreen" RightOf "LeftScreen" | |
EndSection | |
Section "InputDevice" | |
Identifier "Mouse0" | |
Driver "mouse" | |
Option "Protocol" "auto" |
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
Section "ServerLayout" | |
Identifier "aticonfig Layout" | |
Screen 0 "aticonfig-Screen[0]-0" 0 0 | |
Screen "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0" | |
Screen "aticonfig-Screen[1]-0" RightOf "aticonfig-Screen[0]-1" | |
EndSection | |
Section "Module" | |
EndSection |
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
Section "ServerLayout" | |
Identifier "aticonfig Layout" | |
Screen 0 "aticonfig-Screen[0]-0" 0 0 | |
Screen "aticonfig-Screen[0]-1" RightOf "aticonfig-Screen[0]-0" | |
Screen "aticonfig-Screen[1]-0" RightOf "aticonfig-Screen[0]-1" | |
Screen "aticonfig-Screen[1]-1" RightOf "aticonfig-Screen[1]-0" | |
EndSection | |
Section "Module" | |
EndSection |
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 <stdio.h> | |
#include <string.h> | |
#define MAX_KEY 50 | |
#define MAX_HASH 10 | |
typedef struct node { | |
char key[MAX_KEY]; | |
int value; | |
struct node *next; |
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
# .zshrc mashup of davesdots and robbseaton | |
# "compile slow, run fast." - family motto | |
export CFLAGS="-O3 -funsafe-loop-optimizations -ffast-math -march=native -pipe" | |
export CXXFLAGS=${CFLAGS} | |
# export LDFLAGS=${CFLAGS} | |
# I think I speak for everyone when I say "fuck gcc" | |
alias cc="clang -Wall -Wextra -Werror" |
OlderNewer