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
| # Memory Puzzle | |
| import random, pygame, sys | |
| from pygame.locals import * | |
| FPS = 50 # frames per second, the general speed of the program | |
| WINDOWWIDTH = 640 # size of window's width in pixels | |
| WINDOWHEIGHT = 480 # size of windows' height in pixels | |
| REVEALSPEED = 5 # speed boxes' sliding reveals and covers |
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 pygame, sys | |
| from pygame.locals import * | |
| pygame.init() | |
| DISPLAYSURF = pygame.display.set_mode((400, 300)) | |
| pygame.display.set_caption('Hello World!') | |
| WHITE = (255, 255, 255) | |
| GREEN = (0, 255, 0) | |
| BLUE = (0, 0, 128) |
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 pygame, sys | |
| from pygame.locals import * | |
| pygame.init() | |
| FPS = 30 # frames per second setting | |
| fpsClock = pygame.time.Clock() | |
| # set up the window | |
| DISPLAYSURF = pygame.display.set_mode((1440, 783), 0, 32) |
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 pygame, sys | |
| from pygame.locals import * | |
| pygame.init() | |
| # set up the window | |
| DISPLAYSURF = pygame.display.set_mode((1440, 783), 0, 32) | |
| pygame.display.set_caption('Drawing') |
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 pygame, sys | |
| from pygame.locals import * | |
| pygame.init() | |
| DISPLAYSURF = pygame.display.set_mode((1440, 780)) | |
| pygame.display.set_caption('Hello Pygame World!') | |
| while True: # main game loop | |
| for event in pygame.event.get(): | |
| if event.type == QUIT: | |
| pygame.quit() |
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
| #! python3 | |
| # formFiller.py - Automatically fills in the form. | |
| import pyautogui, time | |
| # Set these to the correct coordinates for your particular computer. | |
| nameField = (1440, 783) | |
| submitButton = (651, 817) | |
| submitButtonColor = (75, 141, 249) | |
| submitAnotherLink = (760, 224) |
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
| #! python3 | |
| import pyautogui | |
| print('Press Ctrl-C to quit.') | |
| try: | |
| while True: | |
| # Get and print the mouse coordinates. | |
| x, y = pyautogui.position() | |
| positionStr = 'X: ' + str(x).rjust(4) + ' Y: ' + str(y).rjust(4) | |
| print(positionStr, end='') | |
| print('\b' * len(positionStr), end='', flush=True) |
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
| #! python3 | |
| # resizeAndAddLogo.py - Resizes all images in current working directory to fit | |
| # in a 300x300 square, and adds catlogo.png to the lower-right corner. | |
| import os | |
| from PIL import Image | |
| LOGO_FILENAME = 'catlogo.png' | |
| logoIm = Image.open(LOGO_FILENAME) | |
| os.makedirs('withLogo', exist_ok=True) |
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
| #! python3 | |
| # textMyself.py - Defines the textmyself() function that texts a message | |
| # passed to it as a string. | |
| # Preset values: | |
| accountSID = 'AC7be2bb9a4a1893dd2d53269aa59cea7a' | |
| authToken = '056bc332549513552f52c18b81324834' | |
| myNumber = '' # Phone Number Here | |
| twilioNumber = '+12172921169' |
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
| #! python3 | |
| # sendDuesReminders.py - Sends emails based on payment status in spreadsheet. | |
| import openpyxl, smtplib, sys | |
| # Open the spreadsheet and get the dues status. | |
| wb = openpyxl.load_workbook('duesRecords.xlsx') | |
| sheet = wb.get_sheet_by_name('Sheet1') | |
| lastCol = sheet.max_column |
NewerOlder