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
import traceback | |
import time | |
import sys | |
import praw | |
from Login import Login | |
r = praw.Reddit('Respond to banned from in nerdcubed' | |
'by /u/echocage for /u/tokyorockz') | |
username = 'Example Username' |
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
import random | |
f = open("enable1.txt") | |
words = [x.strip().upper() for x in f.readlines()] | |
def CreateWords(difficulty=1): | |
"""Take the difficulty number and a list of words, return | |
a list of words accordingly""" | |
newwords = [] | |
i = 0 |
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
import time | |
import sys | |
import praw | |
# ========================================== | |
# ===============Configuration============== | |
user = 'dogetipbot' | |
# ========================================== |
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
import urllib | |
import urllib2 | |
from prettytable import PrettyTable | |
import BeautifulSoup | |
def get_stats(url): | |
soup = BeautifulSoup.BeautifulSoup(urllib2.urlopen(url)) |
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
import random | |
import time | |
import sys | |
import praw | |
# ========================================== | |
# ===============Configuration============== | |
user_to_reply_to = 'echocage' | |
messages = ['examplecomment1', "Example Comment 2"] | |
username = "" |
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
data = r"""File Name : File1.txt | |
Directory : Path\to\File1.txt | |
Created : 2012:04:15 10:15:32 | |
Accessed : 2012:04:18 13:28:18""" | |
items = [] | |
for line in data.split('\n'): | |
type = line.split(':')[0].strip() | |
rest = ':'.join(map(lambda x: x.strip(), line.split(':')[1:])) | |
if type == 'File Name': | |
items.append({type: rest}) |
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
whitelisted_users = map(lambda x: x.strip('\n'), list(open('users'))) | |
whitelisted_domains = map(lambda x: x.strip('\n'), list(open('domains'))) | |
import praw | |
import time | |
import traceback | |
# ========================================== | |
# ===============Configuration============== | |
username = "" |
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
import random | |
import urllib2 | |
stages = [["O"], ["O", "|"], [" O", "/|"], [" O", "/|\\"], [" O", " /|\\", " /"], [" O", "/|\\", "/ \\"]] | |
words = urllib2.urlopen('http://pastebin.com/raw.php?i=1nCnmv2y').readlines() | |
words = map(lambda x: x.strip(), words) | |
words.sort(key=lambda x: len(x)) | |
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
calchar = ("o", "i", "z", "e", "h", "s", "g", "l", "b", "g") | |
wordlist = [] | |
with open("dictionary.txt") as f: | |
with open("newdict.txt", 'w') as output_file: | |
for line in f: | |
if all(c in calchar for c in line): | |
output_file.write(line) |
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 find_next_prime(n): | |
while True: | |
n += 1 | |
prime = isPrime(n) | |
if prime: | |
return n | |
def isPrime(n): | |
for item in xrange(2, n): |
OlderNewer