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 time | |
from selenium import webdriver | |
from selenium.webdriver.common.keys import Keys | |
import selenium.webdriver.support.ui as ui | |
from selenium.webdriver.common.by import By | |
from selenium.webdriver.support import expected_conditions as EC | |
credentials = { | |
# login credentials for google group | |
'username': '<username>', |
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 itertools, random, csv | |
suits = ["Spades", "Diamonds", "Hearts", "Clubs"] | |
values = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"] | |
class InfiDeck: | |
def __init__(self): | |
self.deck = self.new_deck() | |
self.new_decks = 0 | |
self.cards = 0 |
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
# Name: Alex Beals | |
# Description: Turn an array of contact data into a single vCard for easy import | |
# Returns a string created from a first and last name, and an optional phone number and email address | |
def createContact(firstname, lastname, phone="", email=""): | |
contact = "BEGIN:VCARD\r\n" | |
contact += "VERSION:2.1\r\n" | |
contact += "N;LANGUAGE=en-us:" + str(lastname) + ";" + str(firstname) + "\r\n" | |
contact += "FN:" + str(firstname) + " " + str(lastname) + "\r\n" | |
if (phone != ""): |
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
#!/bin/bash | |
recepients=( | |
"recipient@website.com" | |
) | |
sender="sender@website.com" | |
senderName="Sender Name" | |
# error handling |
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
__author__ = "Alex Beals" | |
import sqlite3, markovify, codecs, warnings, os | |
# Handle errors from running on Python 2.7 (emoji support) | |
warnings.simplefilter("ignore") | |
print("Connecting to chat database...") | |
# Extract all of my texts from the 'db' file |
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, requests, re, urllib | |
from StringIO import StringIO | |
from PIL import Image | |
import pytesseract | |
from cgi import escape | |
import json | |
base_url = "http://www.gocomics.com/pearlsbeforeswine/" | |
start_date = datetime.datetime(2002, 1, 7) | |
headers = {"User-Agent":"Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36"} |
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 ebooklib import epub | |
import io | |
from PIL import Image | |
from bs4 import BeautifulSoup | |
# Open the EPUB file | |
book = epub.read_epub('frugal.epub') | |
image_alts = {} | |
raw_images = {} |
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
__author__ = "Alex Beals" | |
import sqlite3, markovify, codecs, warnings, os | |
# Handle errors from running on Python 2.7 (emoji support) | |
warnings.simplefilter("ignore") | |
print("Connecting to chat database...") | |
# Extract all of my texts from the 'db' file |