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
pscale<-function(scale.var,part.var) { | |
if (length(scale.var) != length(part.var)) {warning("scale.var and part.var not the same length")} | |
counter<-1:length(scale.var) | |
levels<-unique(part.var) | |
temp.data<-data.frame(scale.var,part.var,counter) | |
new.data<-temp.data[temp.data$part.var==levels[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
#import urllib urlparse | |
import urllib | |
import requests | |
import csv | |
from bs4 import BeautifulSoup | |
from datetime import datetime | |
startTime = datetime.now() | |
#Initialise the csv |
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
from random import randint | |
board = [] | |
for x in range(5): | |
board.append(["O"] * 5) | |
def print_board(board): | |
for row in board: | |
print " ".join(row) |
NewerOlder