Skip to content

Instantly share code, notes, and snippets.

View ejmurray's full-sized avatar

Ernest Murray ejmurray

View GitHub Profile
@ejmurray
ejmurray / sportScrape.py
Created February 3, 2016 14:16
scrape the BBC sport website.
#!/usr/bin/env python
# encoding: utf-8
# author: Ernest
# created: 03/02/2016
# http://goo.gl/pXfFe1
"""
Description
Return the scores and table for a given league using BS4. Change the url to get the given league.
# encoding: utf-8
# author: Ernest
# created: 31/01/2016
#
"""
Description
Creation of a TicTacToe game based on the milestone project 1 from the
python bootcamp tutorial on Udemy
@ejmurray
ejmurray / TicTacToe.py
Created January 29, 2016 08:36
TicTacToe.py
# encoding: utf-8
# author: Ernest
# created: 25/01/2016
# https://gist.github.com/ejmurray/52c56468730a50414615
"""
Description
"""
@ejmurray
ejmurray / organize-photos.py
Created January 22, 2016 15:54 — forked from cliss/organize-photos.py
Photo management script. This script will copy photos from "~/Pictures/iPhone Incoming" into a tree the script creates, with folders representing month and years, and photo names timestamped. Completely based on the work of the amazing Dr. Drang; see here: http://www.leancrew.com/all-this/2013/10/photo-management-via-the-finder/ You can see more…
#!/usr/bin/python
import sys
import os, shutil
import subprocess
import os.path
from datetime import datetime
######################## Functions #########################
@ejmurray
ejmurray / count_words.py
Created January 19, 2016 13:42 — forked from bradmontgomery/count_words.py
playing with python's `collections.Counter`
"""
Use a Counter to find the most common words in "The Wonderful Wizard of Oz" by
L. Frank Baum.
Available in plain text at:
https://ia700500.us.archive.org/2/items/thewonderfulwiza00055gut/wizoz10.txt
short link: http://bit.ly/thewonderfulwizard
Note: This code also counts the words in the header, so it's not a *realistic*
#!/usr/bin/python
# encoding: utf-8
"""
Created: 12/09/15, 15:50
Description:
"""
from swampy.TurtleWorld import *
world = TurtleWorld()
#!/usr/bin/env python
"""
Prints a grid using functions.
Could add the spaces between the bars using " " * 4
"""
def line_tme():
bar = "+"+"-" * 4 + "+" + "-" * 4
print bar + bar + "+"
@ejmurray
ejmurray / convert2html.py
Created September 8, 2015 14:33
Convert the referece data to a html output
#!/usr/bin/env python
"""
__author__ = 'Ernest Murray'
__Created__: 08/09/2015
This script takes the content of a file, in this case a tab separated file and
converts it to an html table. The headers for html file are contained in the text file.
The output is given in the sys.out field.
# https://goo.gl/Hn1nzf
# https://goo.gl/ZY5JYJ
#!/usr/bin/env python
__author__ = 'Ernest'
COMPOUND_LIST = "compounds.txt"
wordlist = open(COMPOUND_LIST).readlines()
wordlist = [word.lower().strip() for word in wordlist]
@ejmurray
ejmurray / compund search.py
Created September 7, 2015 15:04
updtaed with helper.py
#!/usr/bin/env python
__author__ = 'Ernest'
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
import helper
import sys
reload(sys)
sys.setdefaultencoding('utf8')