Skip to content

Instantly share code, notes, and snippets.

View danwaterfield's full-sized avatar
🏠
Working from home

Dan Waterfield danwaterfield

🏠
Working from home
View GitHub Profile
@danwaterfield
danwaterfield / csv_concat.py
Last active April 3, 2019 15:09
Merges n text files into a single csv, ignoring the headers in all but the first text file.
import glob
interesting_files = glob.glob("*.txt")
header_saved = False
with open('output.csv','w') as fout:
for filename in interesting_files:
with open(filename) as fin:
header = next(fin)
if not header_saved:
@danwaterfield
danwaterfield / possumchecker.py
Created March 28, 2019 19:44
checks who is screaming at what.
print('Welcome to possum scream,inc.\nLoading...')
bodypart = str(input('Which bodypart? '))
person = str(input('Who is talking? '))
def scream(bodypart, person):
result = str('Correct! He Screm at Own Ass.\nAAAAAAAAA')
if bodypart == "ass" and person == "me":