This file contains hidden or 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 | |
""" | |
""" | |
__author__ = 'Ernest' | |
def maximum(num1, num2): | |
""" |
This file contains hidden or 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 | |
""" | |
Description | |
""" | |
__author__ = 'Ernest' | |
__projectName__ = 'untitled' | |
__date__ = '27/02/15' | |
__time__ = '18:20' | |
#!/usr/bin/python |
This file contains hidden or 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 | |
""" | |
Description: reverse text | |
""" | |
# | |
# def reverse(text): | |
# word = [] | |
# rev_word = '' |
This file contains hidden or 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 | |
""" | |
""" | |
__author__ = 'Ernest' | |
import pandas as pd | |
import numpy | |
import matplotlib.pyplot as plt |
This file contains hidden or 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 | |
""" | |
script to plot mass over time. | |
""" | |
import pylab as pl | |
import numpy as np | |
# x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
# y = [87.6, 86.9, 86.7, 87.2, 86.4, 86.0, 85.6, 86.0, 85.8, 85.5] |
This file contains hidden or 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 | |
""" | |
script to plot mass over time. | |
""" | |
import pylab as pl | |
import numpy as np | |
x = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10] | |
y = [87.6, 86.9, 86.7, 87.2, 86.4, 86.0, 85.6, 86.0, 85.8, 85.5] |
This file contains hidden or 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 | |
""" | |
Description | |
""" | |
import urllib2 | |
from bs4 import BeautifulSoup | |
soup = BeautifulSoup(urllib2.urlopen('http://www.bcsfootball.org').read()) |
This file contains hidden or 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 | |
""" | |
""" | |
__author__ = 'Ernest' | |
def anti_vowel(text): |
This file contains hidden or 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
__author__ = 'Ernest' | |
import os | |
for textfiles in os.listdir("."): | |
if textfiles.startswith("P") and textfiles.endswith('.txt'): | |
os.rename(textfiles, textfiles.replace("P", "p", 1)) |
This file contains hidden or 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
__author__ = 'Ernest' | |
# Material from chapter 2 of Introduction to python | |
# to save a session from the console in ipython use the following | |
# command - %save my_session 1-20 | |
# where %save is teh save command, my_session is the file name | |
# and 1-20 are the lines that you want to save. | |
# this data has been added to github as a new repo | |
# and this line | |
letters = 'abcdefghijklmnopqrstuvwxyz' |