Skip to content

Instantly share code, notes, and snippets.

function rot13(message) {
return message.replace(/[A-Za-z]/g, function(input){
var charCode = input.charCodeAt(0);
var start = charCode <= 'Z' ? 65 : 97;
charCode = (charCode - start + 13) % 26 + start;
return String.fromCharCode(charCode);
});
}
#!/bin/python
import urllib.request, csv
from bs4 import BeautifulSoup
week = input('Which week? ')
download=1
positionIDs = [1, 2, 3, 4, 10, 8, 7]
freedom = [[] for i in range(7)]
#!/bin/python
import csv
files = ['qb.csv', 'rb.csv', 'wr.csv', 'te.csv', 'flex.csv', 'dst.csv', 'k.csv']
for fileName in files:
with open(fileName, 'r+') as file:
rows = [row[8:len(row)] for row in file]
if fileName == 'dst.csv':
for i in range(len(rows)):
row = str(rows[i])
#!/bin/python
import urllib.request, csv
from bs4 import BeautifulSoup
freedom = [[] for i in range(7)]
categoryIDs=[0,2,4,6,23,16,17]
get_url_base="http://games.espn.go.com/ffl/playertable/prebuilt/freeagency?leagueId=935815&slotCategoryId="
for categoryID in range(7):
import urllib.parse, urllib.request, json, http.cookiejar, re, sys, time
user = ''
passwd = ''
target = ''
def main():
# login
jar = http.cookiejar.CookieJar()
opener = urllib.request.build_opener(urllib.request.HTTPCookieProcessor(jar))