Skip to content

Instantly share code, notes, and snippets.

@CoreyMSchafer
CoreyMSchafer / tutorial.py
Created August 15, 2024 17:48
Python Tkinter Tutorial - Part 2
import tkinter as tk
from tkinter import ttk
def main():
app = Application()
app.mainloop()
class Application(tk.Tk):
@CoreyMSchafer
CoreyMSchafer / tutorial.py
Created July 27, 2024 16:47
Python Tkinter Tutorial - Part 1
import tkinter as tk
from tkinter import ttk
root = tk.Tk()
root.title("Simple App")
def add_to_list(event=None):
text = entry.get()
if text:
@CoreyMSchafer
CoreyMSchafer / autopay.py
Created May 31, 2024 22:37
Using Selenium to Automate Bill Payments
import io
import logging
import os
import smtplib
from email.message import EmailMessage
from pathlib import Path
from dotenv import load_dotenv
from selenium import webdriver
from selenium.common.exceptions import TimeoutException, WebDriverException
@CoreyMSchafer
CoreyMSchafer / YouTube-OAuth-Snippets
Created September 10, 2020 02:06
YouTube-OAuth-Snippets
# token.pickle stores the user's credentials from previously successful logins
if os.path.exists('token.pickle'):
print('Loading Credentials From File...')
with open('token.pickle', 'rb') as token:
credentials = pickle.load(token)
# Google's Request
from google.auth.transport.requests import Request