Skip to content

Instantly share code, notes, and snippets.

View joemarchese's full-sized avatar

Joseph Marchese joemarchese

  • Williamsport, PA
View GitHub Profile
@joemarchese
joemarchese / freecodecamp-build-a-tribute-page.markdown
Created August 30, 2017 19:12
freeCodeCamp : Build a Tribute Page
@joemarchese
joemarchese / screenshot.py
Created June 12, 2017 14:34
Selenium-PhantomJS Screenshooter
import os
import requests
from time import sleep
from selenium import webdriver
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
dcap = dict(DesiredCapabilities.PHANTOMJS)
driver = webdriver.PhantomJS(os.path.join(os.getcwd() + '\phantomjs.exe'), desired_capabilities=dcap)
sleep(2)
@joemarchese
joemarchese / minesweeper.py
Created April 8, 2017 14:43
Command Line Minesweeper
import random as r
def print_grid(input_grid):
for row in input_grid:
print(row)
print()
def nearby_mines(x, y):
"""
Name shuffler. To take the first part and second part of names
and mix them up in various ways. Co-Authored by Joe and Francesca.
"""
from random import choice
def nameshuffler(first, last):
"""Combines a first and last name. Checks authenticity."""
completed = False
__author__ = 'joe.marchese'
import random
def gen_hand_size(input_size, mulligan):
if mulligan == True:
input_size -= 1
return input_size
def draw_hand(deck, hand_size):
import random
def groupsolo():
grouporsolo = None
while grouporsolo != "1" or grouporsolo != "2":
print "Are you an indie group or an indie solo act?"
print "1. Indie Group"
print "2. Indie Solo Act"
grouporsolo = raw_input("Type 1 or 2: ")
@joemarchese
joemarchese / memeslack.py
Created March 3, 2017 23:38
A script to take an image from the internet, make a meme of it, and post it to Slack.
# A script to take an image from the internet, make a meme of it, and post
# it to Slack.
import urllib.request
from PIL import Image
from random import choice
from slacker import Slacker
# Instantiate a Slack Session
@joemarchese
joemarchese / Therefore.py
Last active October 1, 2015 13:40
Four Sticks
def therefore():
'''prints four for each fore in fours if each foure in fours is == 4 four times.'''
for four in fore:
for foure in fore:
print(4, end=' ')
print()
four = 4
fours = [four] * 4
fore = [foure for foure in fours if foure == 4]
@joemarchese
joemarchese / dirtywords.py
Created September 22, 2015 16:01
A small program for working a good amount of tasteless dirty language into a text.
import random as r
dirty_words = []
with open('dirtywords.txt', encoding='utf-8') as dw:
for phrase in dw:
dirty_words.append(phrase.strip())
output = open('output.txt', 'w')