Skip to content

Instantly share code, notes, and snippets.

View ejmurray's full-sized avatar

Ernest Murray ejmurray

View GitHub Profile
@ejmurray
ejmurray / bo.py
Last active April 30, 2022 08:28
ncbo
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# import needed libraries
import glob
import json
import os
import pickle
import random
import requests
#!/usr/bin/env python
# encoding: utf-8
# author: Ernest
# created: 21/09/2016
"""
Description
"""
@ejmurray
ejmurray / Bbcsport.py
Created April 16, 2016 18:21
Bbcsport.py
# coding: utf-8
#!/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.
@ejmurray
ejmurray / Diceware.py
Created April 16, 2016 18:21
Diceware.py
# coding: utf-8
#!/usr/bin/env python
"""Diceware passphrase generator
Diceware passphrase generator generates passphrases by reading random
data from the operating system random number generator and using it to
index the Diceware word list, supplied by user or automatically
downloaded from the Diceware web page. For more information on
Diceware, see the Diceware web page:
@ejmurray
ejmurray / Gist.py
Created April 16, 2016 18:21
Gist.py
# coding: utf-8
# This script downloads and opens a Gist from a URL in the clipboard.
# It's meant to be put in the editor's actions menu.
#
# It works with "raw" and "web" gist URLs, but not with gists that
# contain multiple files or non-Python files.
#
# If a file already exists, a dialog is shown that asks whether the
# new file should be renamed or replaced.
@ejmurray
ejmurray / ListNumbers.py
Created April 16, 2016 18:21
ListNumbers.py
import sqlite3
conn = sqlite3.connect('test.sqlite')
c = conn.cursor()
c.execute('''CREATE TABLE tree (cat VARCHAR(20) PRIMARY KEY, count INT, damages FLOAT)''')
c.close()
conn.close()
@ejmurray
ejmurray / New from Gist.py
Created April 16, 2016 18:20
New from Gist.py
# coding: utf-8
# This script downloads and opens a Gist from a URL in the clipboard.
# It's meant to be put in the editor's actions menu.
#
# It works with "raw" and "web" gist URLs, but not with gists that
# contain multiple files or non-Python files.
#
# If a file already exists, a dialog is shown that asks whether the
# new file should be renamed or replaced.
@ejmurray
ejmurray / Scores.py
Created April 16, 2016 18:20
Scores.py
# coding: utf-8
'''
Created on Jan 17, 2016
@author: timbo
'''
import requests
from urllib.request import urlopen
from bs4 import BeautifulSoup #Needed to parse the html
import time
@ejmurray
ejmurray / TicTacToe.py
Created April 16, 2016 18:20
TicTacToe.py
# encoding: utf-8
# author: Ernest
# created: 25/01/2016
# https://gist.github.com/ejmurray/52c56468730a50414615
"""
Description
"""
@ejmurray
ejmurray / TicTacToe2.py
Created April 16, 2016 18:19
TicTacToe2.py
# 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