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 pygame | |
from random import randint | |
class Player(): | |
def __init__(self, player, it, x, y, width, height, sprite): | |
players.append(self) | |
self.player = player | |
self.it = it |
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 | |
from random import choice | |
from time import sleep | |
class Settings: | |
"""Configure the settings for the current game session""" | |
def __init__(self): | |
# operator = + - * / | |
self.operator = self.set_operator() |
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
var getTableData = function(originalTable) { | |
var tableData = []; | |
var tableCols = originalTable.rows[0].children.length | |
var tableRows = originalTable.rows.length | |
for (var i = 0; i < tableCols; i++) { | |
var tempRow = [] | |
for (var j = 0; j < tableRows; j++) { | |
tempRow.push(originalTable.rows[j].children[i].innerText); | |
} | |
tableData.push(tempRow) |
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
# To Do | |
# | |
# 1. Implement menu button | |
# a. A way to add players on the fly | |
# b. Player color picker | |
# i. Error checking on color entry | |
# 2. An 'X' to remove a player panel | |
# 3. Fix documentation and indentation | |
# 4. Fix frm_menu columnspan | |
# 5. Fix win label overlap when single digit health |
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 datetime | |
import getpass | |
import os | |
import shutil | |
import time | |
from selenium import webdriver | |
from selenium.common.exceptions import NoSuchElementException | |
from selenium.webdriver.common.keys import Keys | |
from selenium.webdriver.firefox.firefox_binary import FirefoxBinary |
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 urllib.request import urlretrieve | |
import praw | |
# ID for Reddit to monitor | |
user_agent = ("Wallpaper Downloader v1.0 by /u/80blite") | |
r = praw.Reddit(user_agent=user_agent) | |
# Subreddit objects | |
wall_top_ten = r.get_subreddit('wallpapers').get_hot(limit=10) |
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
#!usr/bin/env/python | |
from os import walk, remove | |
from os.path import normpath, join | |
from tkinter import * | |
from tkinter.filedialog import askdirectory | |
from shutil import copy2, rmtree, move, Error as ShutilError | |
def flatten(origin, destination, in_place, rmv_empty_dirs=False): | |
"""Flattens the origin directory into the destination directory or itself""" |