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
#!/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. |
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
# 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 |
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
# encoding: utf-8 | |
# author: Ernest | |
# created: 25/01/2016 | |
# https://gist.github.com/ejmurray/52c56468730a50414615 | |
""" | |
Description | |
""" |
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
#!/usr/bin/python | |
import sys | |
import os, shutil | |
import subprocess | |
import os.path | |
from datetime import datetime | |
######################## Functions ######################### |
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
""" | |
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* |
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
#!/usr/bin/python | |
# encoding: utf-8 | |
""" | |
Created: 12/09/15, 15:50 | |
Description: | |
""" | |
from swampy.TurtleWorld import * | |
world = TurtleWorld() |
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
#!/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 + "+" |
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
#!/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 |
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
#!/usr/bin/env python | |
__author__ = 'Ernest' | |
COMPOUND_LIST = "compounds.txt" | |
wordlist = open(COMPOUND_LIST).readlines() | |
wordlist = [word.lower().strip() for word in wordlist] |
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
#!/usr/bin/env python | |
__author__ = 'Ernest' | |
from fuzzywuzzy import fuzz | |
from fuzzywuzzy import process | |
import helper | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf8') |