From 6bc0a0bef5d364b59a3927492f025a6c3676656d Mon Sep 17 00:00:00 2001 From: Matt Davis Date: Sat, 16 Jun 2012 22:22:25 -0400 Subject: [PATCH] Added file reading section to Python and added animal data files. --- Python/MakeAnimals.ipynb | 133 ++++++++++++++++ Python/PresenterNotes.ipynb | 283 +++++++++++++++++++++++++++++------ Python/animals.txt | 5 + Python/big_animals.txt | 100 +++++++++++++ Python/dingwall_animals.txt | 100 +++++++++++++ Python/fergus_animals.txt | 100 +++++++++++++ Python/macguffin_animals.txt | 100 +++++++++++++ Python/merida_animals.txt | 100 +++++++++++++ 8 files changed, 877 insertions(+), 44 deletions(-) create mode 100644 Python/MakeAnimals.ipynb create mode 100644 Python/animals.txt create mode 100644 Python/big_animals.txt create mode 100644 Python/dingwall_animals.txt create mode 100644 Python/fergus_animals.txt create mode 100644 Python/macguffin_animals.txt create mode 100644 Python/merida_animals.txt diff --git a/Python/MakeAnimals.ipynb b/Python/MakeAnimals.ipynb new file mode 100644 index 0000000..143e083 --- /dev/null +++ b/Python/MakeAnimals.ipynb @@ -0,0 +1,133 @@ +{ + "metadata": { + "name": "MakeAnimals" + }, + "nbformat": 2, + "worksheets": [ + { + "cells": [ + { + "cell_type": "code", + "collapsed": true, + "input": [ + "animals = ('Moose', 'Elk', 'Fox', 'Owl', 'Wolf', 'Muskox', 'Ptarmigan', 'Grizzly', 'Wolverine')" + ], + "language": "python", + "outputs": [], + "prompt_number": 14 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "import datetime as dt", + "import random" + ], + "language": "python", + "outputs": [], + "prompt_number": 15 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "def make_animals(filename, lines=100):", + " date = dt.date(2011, 4, 22)", + " one_day = dt.timedelta(days=1)", + "", + " f = open(filename, 'w')", + "", + " for _ in xrange(lines):", + " animal = random.choice(animals)", + " hour = random.randint(0, 23)", + " minute = random.randint(0, 59)", + " number = random.randint(1, 42)", + " ", + " date_str = '{}-{:02d}-{:02d}'.format(date.year, date.month, date.day)", + " ", + " time_str = '{:02d}:{:02d}'.format(hour, minute)", + " ", + " line = '{} {} {} {}\\n'.format(date_str, time_str, animal, number)", + " ", + " f.write(line)", + " ", + " if random.choice((True, False)):", + " date = date + one_day", + " ", + " f.close()" + ], + "language": "python", + "outputs": [], + "prompt_number": 22 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "make_animals('animals.txt', 5)" + ], + "language": "python", + "outputs": [], + "prompt_number": 24 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "make_animals('big_animals.txt')" + ], + "language": "python", + "outputs": [], + "prompt_number": 23 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "make_animals('merida_animals.txt')" + ], + "language": "python", + "outputs": [], + "prompt_number": 25 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "make_animals('fergus_animals.txt')" + ], + "language": "python", + "outputs": [], + "prompt_number": 26 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "make_animals('macguffin_animals.txt')" + ], + "language": "python", + "outputs": [], + "prompt_number": 27 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "make_animals('dingwall_animals.txt')" + ], + "language": "python", + "outputs": [], + "prompt_number": 28 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [], + "language": "python", + "outputs": [] + } + ] + } + ] +} \ No newline at end of file diff --git a/Python/PresenterNotes.ipynb b/Python/PresenterNotes.ipynb index 2051fbb..0a22615 100644 --- a/Python/PresenterNotes.ipynb +++ b/Python/PresenterNotes.ipynb @@ -1,6 +1,6 @@ { "metadata": { - "name": "Presenter Notes" + "name": "PresenterNotes" }, "nbformat": 2, "worksheets": [ @@ -590,7 +590,7 @@ ] } ], - "prompt_number": 57 + "prompt_number": 2 }, { "cell_type": "code", @@ -609,7 +609,7 @@ ] } ], - "prompt_number": 60 + "prompt_number": 3 }, { "cell_type": "code", @@ -631,13 +631,13 @@ ] } ], - "prompt_number": 61 + "prompt_number": 4 }, { "cell_type": "code", "collapsed": false, "input": [ - "print d" + "print len(d), d" ], "language": "python", "outputs": [ @@ -645,11 +645,11 @@ "output_type": "stream", "stream": "stdout", "text": [ - "{3.14159: 'pi', 2: 'two', 'last': 'omega', 'two': 2, 'first': 'uno'}" + "5 {3.14159: 'pi', 2: 'two', 'last': 'omega', 'two': 2, 'first': 'uno'}" ] } ], - "prompt_number": 62 + "prompt_number": 6 }, { "cell_type": "markdown", @@ -661,7 +661,8 @@ { "cell_type": "markdown", "source": [ - "# If statements" + "# If statements", + "`< > <= >= == !=`" ] }, { @@ -760,6 +761,30 @@ "collapsed": false, "input": [ "fruits = ['apples', 'oranges', 'pears', 'bananas']", + "i = 0", + "while i < len(fruits):", + " print fruits[i]", + " i = i + 1" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "apples", + "oranges", + "pears", + "bananas" + ] + } + ], + "prompt_number": 7 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ "for fruit in fruits:", " print fruit" ], @@ -776,7 +801,7 @@ ] } ], - "prompt_number": 6 + "prompt_number": 8 }, { "cell_type": "code", @@ -857,34 +882,53 @@ "cell_type": "code", "collapsed": false, "input": [ - "values = [42.0, 0.01, -32.0, -16.0, 0.0]", - "values.sort()", + "# Calculating a sum", + "sum = 0", "for x in values:", - " if x > 0.0:", - " print \"First non-negative value is\", x", - " break" + " sum = sum + x", + "sum" ], "language": "python", "outputs": [ { - "output_type": "stream", - "stream": "stdout", + "output_type": "pyout", + "prompt_number": 15, "text": [ - "First non-negative value is 0.01" + "-5.990000000000002" ] } ], - "prompt_number": 9 + "prompt_number": 15 + }, + { + "cell_type": "markdown", + "source": [ + "# Exercises", + "1. Using a loop, calculate the factorial of 42 (the product of all integers up to and including 42)." + ] + }, + { + "cell_type": "markdown", + "source": [ + "# Functions" + ] }, { "cell_type": "code", "collapsed": false, "input": [ - "# Use continue to skip an iteration", - "for x in values:", - " if x <= 0.0:", - " continue", - " print math.log(x)" + "def square(x):", + " return x * x" + ], + "language": "python", + "outputs": [], + "prompt_number": 17 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print square(2), square(square(2))" ], "language": "python", "outputs": [ @@ -892,55 +936,86 @@ "output_type": "stream", "stream": "stdout", "text": [ - "-4.60517018599", - "3.73766961828" + "4 16" ] } ], - "prompt_number": 13 + "prompt_number": 32 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "def hello(time, name):", + " \"\"\"Print a nice message. Time and name should both be strings.", + " ", + " Example: hello('morning', 'Software Carpentry')", + " \"\"\"", + " print 'Good ' + time + ', ' + name + '!'" + ], + "language": "python", + "outputs": [], + "prompt_number": 22 }, { "cell_type": "code", "collapsed": false, "input": [ - "# Calculating a sum", - "sum = 0", - "for x in values:", - " sum = sum + x", - "sum" + "hello('afternoon', 'Software Carpentry')" ], "language": "python", "outputs": [ { - "output_type": "pyout", - "prompt_number": 15, + "output_type": "stream", + "stream": "stdout", "text": [ - "-5.990000000000002" + "Good afternoon, Software Carpentry!" ] } ], - "prompt_number": 15 + "prompt_number": 24 }, { "cell_type": "markdown", "source": [ "# Exercises", - "1. Using a loop, calculate the factorial of 42 (the product of all integers less than 42)." + "1. Create a function that returns the factorial of a given number" ] }, { "cell_type": "markdown", "source": [ - "# Functions" + "# Reading Files" ] }, { "cell_type": "code", "collapsed": false, "input": [ - "def square(x):", - " return x * x", - "print square(2)" + "f = open('animals.txt', 'r')" + ], + "language": "python", + "outputs": [], + "prompt_number": 26 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "# dir(f)", + "# help(f)" + ], + "language": "python", + "outputs": [], + "prompt_number": 31 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "f.seek(0)", + "for line in f:", + " print line" ], "language": "python", "outputs": [ @@ -948,17 +1023,137 @@ "output_type": "stream", "stream": "stdout", "text": [ - "4" + "2011-06-22 09:23 Moose 2", + "", + "2011-06-24 13:56 Wolf 9", + "", + "2011-07-01 16:33 Grizzly 1", + "", + "2011-07-02 08:10 Elk 32", + "", + "2011-07-02 12:22 Fox 1", + "" + ] + } + ], + "prompt_number": 41 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "'2011-06-22 09:23 Moose 2'.split() # numbers come out as strings" + ], + "language": "python", + "outputs": [ + { + "output_type": "pyout", + "prompt_number": 39, + "text": [ + "['2011-06-22', '09:23', 'Moose', '2']" + ] + } + ], + "prompt_number": 39 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "print int('2'), float('2'), float('3.14159')" + ], + "language": "python", + "outputs": [ + { + "output_type": "stream", + "stream": "stdout", + "text": [ + "2 2.0 3.14159" + ] + } + ], + "prompt_number": 46 + }, + { + "cell_type": "code", + "collapsed": true, + "input": [ + "f.seek(0)", + "date = []", + "time = []", + "animal = []", + "number = []", + "for line in f:", + " d, t, a, n = line.split()", + " date.append(d)", + " time.append(t)", + " animal.append(a)", + " number.append(int(n))" + ], + "language": "python", + "outputs": [], + "prompt_number": 42 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "date" + ], + "language": "python", + "outputs": [ + { + "output_type": "pyout", + "prompt_number": 43, + "text": [ + "['2011-06-22', '2011-06-24', '2011-07-01', '2011-07-02', '2011-07-02']" + ] + } + ], + "prompt_number": 43 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "time" + ], + "language": "python", + "outputs": [ + { + "output_type": "pyout", + "prompt_number": 44, + "text": [ + "['09:23', '13:56', '16:33', '08:10', '12:22']" + ] + } + ], + "prompt_number": 44 + }, + { + "cell_type": "code", + "collapsed": false, + "input": [ + "number" + ], + "language": "python", + "outputs": [ + { + "output_type": "pyout", + "prompt_number": 45, + "text": [ + "[2, 9, 1, 32, 1]" ] } ], - "prompt_number": 16 + "prompt_number": 45 }, { "cell_type": "markdown", "source": [ - "# Exercises", - "1. Create a function that returns the factorial of a given number" + "# Exercise", + "1. Read the file 'big_animals.txt' and print each line on which more than 10 moose were sighted.", + "2. Turn the code for #1 into a function and use it on the files 'merida_animals.txt' and 'fergus_animals.txt'." ] }, { diff --git a/Python/animals.txt b/Python/animals.txt new file mode 100644 index 0000000..1d8e153 --- /dev/null +++ b/Python/animals.txt @@ -0,0 +1,5 @@ +2011-04-22 21:06 Grizzly 36 +2011-04-23 14:12 Elk 25 +2011-04-23 10:24 Elk 26 +2011-04-23 20:08 Wolverine 31 +2011-04-23 18:46 Muskox 20 diff --git a/Python/big_animals.txt b/Python/big_animals.txt new file mode 100644 index 0000000..c9524bb --- /dev/null +++ b/Python/big_animals.txt @@ -0,0 +1,100 @@ +2011-04-22 10:30 Wolverine 10 +2011-04-22 15:30 Moose 37 +2011-04-23 12:16 Grizzly 25 +2011-04-23 12:32 Grizzly 2 +2011-04-24 22:19 Muskox 16 +2011-04-25 10:32 Muskox 11 +2011-04-25 19:53 Wolverine 1 +2011-04-25 08:10 Wolverine 14 +2011-04-25 13:38 Wolf 7 +2011-04-26 22:28 Elk 22 +2011-04-27 10:04 Moose 1 +2011-04-28 22:18 Muskox 22 +2011-04-28 14:15 Elk 39 +2011-04-28 02:23 Grizzly 27 +2011-04-29 11:23 Wolverine 1 +2011-04-30 12:51 Muskox 2 +2011-04-30 21:30 Fox 5 +2011-05-01 00:26 Elk 12 +2011-05-02 03:32 Moose 14 +2011-05-02 00:25 Wolf 39 +2011-05-03 10:05 Owl 10 +2011-05-04 23:16 Owl 10 +2011-05-04 22:20 Fox 10 +2011-05-05 07:00 Moose 20 +2011-05-05 14:49 Muskox 7 +2011-05-05 02:28 Wolverine 22 +2011-05-05 18:56 Grizzly 1 +2011-05-06 09:54 Wolf 42 +2011-05-06 23:02 Owl 9 +2011-05-06 19:40 Moose 31 +2011-05-06 22:15 Moose 9 +2011-05-06 12:25 Wolverine 8 +2011-05-07 13:10 Ptarmigan 40 +2011-05-07 02:45 Ptarmigan 29 +2011-05-07 02:01 Owl 40 +2011-05-08 04:15 Elk 4 +2011-05-08 01:36 Moose 19 +2011-05-08 21:41 Ptarmigan 32 +2011-05-08 08:11 Elk 31 +2011-05-08 09:39 Moose 35 +2011-05-08 19:39 Wolf 29 +2011-05-08 10:38 Moose 11 +2011-05-09 09:08 Elk 30 +2011-05-09 06:07 Grizzly 14 +2011-05-10 11:32 Wolf 5 +2011-05-10 11:03 Moose 15 +2011-05-10 00:11 Wolverine 21 +2011-05-10 11:30 Moose 5 +2011-05-11 01:45 Ptarmigan 9 +2011-05-12 04:18 Wolverine 3 +2011-05-12 20:54 Grizzly 22 +2011-05-12 10:16 Owl 10 +2011-05-12 21:54 Wolverine 6 +2011-05-12 11:10 Ptarmigan 36 +2011-05-13 20:07 Elk 41 +2011-05-14 15:41 Moose 12 +2011-05-14 12:22 Fox 42 +2011-05-14 15:47 Muskox 19 +2011-05-14 08:12 Ptarmigan 13 +2011-05-15 02:33 Wolf 39 +2011-05-15 18:33 Owl 15 +2011-05-15 20:30 Ptarmigan 27 +2011-05-16 18:08 Wolf 34 +2011-05-16 23:35 Wolf 12 +2011-05-17 06:30 Fox 42 +2011-05-17 11:48 Elk 36 +2011-05-17 05:18 Wolf 31 +2011-05-18 09:58 Wolf 23 +2011-05-19 00:45 Moose 6 +2011-05-19 21:29 Wolf 8 +2011-05-19 20:43 Fox 33 +2011-05-20 10:48 Fox 29 +2011-05-20 06:11 Ptarmigan 17 +2011-05-20 19:50 Fox 1 +2011-05-20 12:30 Ptarmigan 16 +2011-05-21 08:52 Muskox 24 +2011-05-21 06:30 Wolf 26 +2011-05-22 15:21 Wolf 41 +2011-05-22 14:07 Moose 30 +2011-05-22 10:36 Muskox 37 +2011-05-22 16:24 Grizzly 21 +2011-05-23 16:58 Grizzly 19 +2011-05-23 02:31 Grizzly 17 +2011-05-24 21:36 Wolf 1 +2011-05-24 13:36 Fox 26 +2011-05-24 11:03 Grizzly 12 +2011-05-25 09:07 Moose 10 +2011-05-26 19:59 Fox 16 +2011-05-27 01:20 Ptarmigan 29 +2011-05-28 19:23 Owl 22 +2011-05-28 16:52 Fox 5 +2011-05-28 18:15 Fox 22 +2011-05-29 04:15 Grizzly 15 +2011-05-30 12:15 Moose 11 +2011-05-30 16:27 Grizzly 34 +2011-05-30 19:20 Moose 25 +2011-05-31 06:21 Wolverine 31 +2011-05-31 10:19 Muskox 28 +2011-06-01 22:42 Elk 3 +2011-06-01 11:05 Grizzly 14 diff --git a/Python/dingwall_animals.txt b/Python/dingwall_animals.txt new file mode 100644 index 0000000..b2f4cd1 --- /dev/null +++ b/Python/dingwall_animals.txt @@ -0,0 +1,100 @@ +2011-04-22 08:17 Ptarmigan 21 +2011-04-22 10:41 Muskox 27 +2011-04-22 17:50 Muskox 24 +2011-04-23 09:10 Wolf 19 +2011-04-24 18:51 Wolverine 16 +2011-04-25 12:31 Grizzly 39 +2011-04-25 21:00 Ptarmigan 28 +2011-04-25 01:09 Ptarmigan 42 +2011-04-26 00:24 Muskox 3 +2011-04-27 16:11 Moose 36 +2011-04-28 16:25 Wolverine 18 +2011-04-29 22:06 Moose 22 +2011-04-29 05:10 Wolverine 8 +2011-04-29 02:09 Fox 38 +2011-04-29 01:41 Grizzly 36 +2011-04-30 21:01 Wolf 38 +2011-05-01 19:12 Elk 19 +2011-05-01 12:19 Wolverine 7 +2011-05-01 18:11 Wolverine 4 +2011-05-02 09:16 Owl 39 +2011-05-02 06:04 Owl 33 +2011-05-02 03:31 Wolf 36 +2011-05-03 04:27 Wolf 22 +2011-05-03 17:54 Fox 17 +2011-05-04 06:30 Fox 42 +2011-05-04 12:23 Wolf 10 +2011-05-05 12:00 Grizzly 37 +2011-05-06 15:30 Moose 12 +2011-05-07 19:18 Wolverine 22 +2011-05-08 10:24 Fox 27 +2011-05-08 05:16 Muskox 7 +2011-05-08 04:21 Muskox 4 +2011-05-08 03:47 Moose 24 +2011-05-08 07:20 Grizzly 22 +2011-05-08 05:35 Owl 9 +2011-05-08 11:50 Fox 16 +2011-05-09 06:11 Wolf 38 +2011-05-09 19:54 Elk 41 +2011-05-10 02:37 Moose 15 +2011-05-11 14:25 Fox 8 +2011-05-11 07:49 Elk 18 +2011-05-11 19:48 Owl 9 +2011-05-11 19:33 Grizzly 31 +2011-05-12 05:44 Moose 35 +2011-05-13 09:49 Grizzly 19 +2011-05-14 04:27 Elk 30 +2011-05-14 12:41 Ptarmigan 39 +2011-05-14 00:05 Wolverine 30 +2011-05-14 13:26 Elk 24 +2011-05-14 20:50 Owl 11 +2011-05-14 21:37 Muskox 22 +2011-05-14 03:26 Muskox 13 +2011-05-14 12:38 Moose 38 +2011-05-14 03:10 Wolf 1 +2011-05-14 20:20 Wolverine 3 +2011-05-14 05:19 Wolf 32 +2011-05-14 23:07 Moose 30 +2011-05-14 10:02 Fox 28 +2011-05-14 06:40 Wolverine 38 +2011-05-14 17:39 Elk 21 +2011-05-15 09:19 Moose 4 +2011-05-15 20:42 Wolverine 6 +2011-05-15 14:49 Moose 7 +2011-05-15 08:50 Owl 12 +2011-05-15 03:24 Wolf 13 +2011-05-15 14:44 Elk 5 +2011-05-16 01:02 Ptarmigan 20 +2011-05-17 16:45 Muskox 39 +2011-05-18 05:18 Owl 29 +2011-05-18 21:58 Owl 10 +2011-05-19 01:30 Grizzly 29 +2011-05-19 22:07 Muskox 34 +2011-05-20 22:08 Grizzly 19 +2011-05-21 04:25 Owl 29 +2011-05-21 04:02 Fox 40 +2011-05-21 03:21 Grizzly 9 +2011-05-22 16:58 Moose 34 +2011-05-23 04:21 Wolf 21 +2011-05-23 02:35 Moose 15 +2011-05-23 06:00 Owl 9 +2011-05-24 19:51 Elk 34 +2011-05-24 21:04 Wolf 33 +2011-05-25 12:25 Moose 30 +2011-05-25 01:18 Elk 29 +2011-05-25 05:48 Owl 35 +2011-05-26 15:05 Ptarmigan 28 +2011-05-26 19:49 Moose 17 +2011-05-27 02:33 Elk 31 +2011-05-27 00:22 Fox 19 +2011-05-28 06:43 Wolf 30 +2011-05-29 18:04 Wolverine 38 +2011-05-30 00:52 Owl 12 +2011-05-31 16:10 Ptarmigan 22 +2011-05-31 23:38 Wolf 16 +2011-06-01 17:53 Wolf 19 +2011-06-02 20:13 Moose 11 +2011-06-02 08:11 Wolf 27 +2011-06-03 15:32 Owl 14 +2011-06-03 00:33 Wolf 11 +2011-06-03 02:40 Owl 31 diff --git a/Python/fergus_animals.txt b/Python/fergus_animals.txt new file mode 100644 index 0000000..e40c146 --- /dev/null +++ b/Python/fergus_animals.txt @@ -0,0 +1,100 @@ +2011-04-22 00:26 Ptarmigan 17 +2011-04-23 09:14 Fox 11 +2011-04-23 08:00 Ptarmigan 3 +2011-04-24 18:06 Grizzly 39 +2011-04-25 09:21 Muskox 42 +2011-04-25 13:45 Grizzly 20 +2011-04-25 10:15 Wolverine 39 +2011-04-26 16:46 Elk 18 +2011-04-27 12:04 Wolverine 29 +2011-04-27 12:01 Wolf 4 +2011-04-27 12:44 Owl 15 +2011-04-27 12:57 Fox 42 +2011-04-27 02:47 Grizzly 27 +2011-04-27 10:58 Muskox 28 +2011-04-28 14:15 Grizzly 8 +2011-04-28 00:09 Elk 12 +2011-04-29 04:10 Owl 18 +2011-04-30 11:41 Wolverine 36 +2011-04-30 12:57 Muskox 23 +2011-04-30 07:55 Grizzly 5 +2011-05-01 01:45 Wolverine 28 +2011-05-02 09:02 Muskox 21 +2011-05-03 13:41 Owl 8 +2011-05-03 13:39 Moose 16 +2011-05-04 17:09 Fox 3 +2011-05-05 02:49 Wolverine 20 +2011-05-06 15:18 Moose 29 +2011-05-06 13:32 Moose 20 +2011-05-07 15:33 Wolverine 29 +2011-05-08 04:30 Muskox 8 +2011-05-09 09:50 Muskox 1 +2011-05-09 10:19 Owl 17 +2011-05-10 18:28 Moose 28 +2011-05-10 06:57 Elk 35 +2011-05-11 14:17 Wolf 10 +2011-05-11 15:30 Fox 5 +2011-05-11 21:52 Wolverine 6 +2011-05-12 12:30 Grizzly 27 +2011-05-12 05:24 Wolf 35 +2011-05-13 12:19 Elk 17 +2011-05-13 12:44 Elk 9 +2011-05-14 06:46 Elk 32 +2011-05-15 10:52 Elk 25 +2011-05-15 04:02 Fox 21 +2011-05-16 14:52 Elk 16 +2011-05-17 18:25 Wolverine 5 +2011-05-17 06:26 Fox 26 +2011-05-18 07:40 Wolverine 12 +2011-05-19 21:15 Grizzly 8 +2011-05-20 02:11 Ptarmigan 41 +2011-05-21 10:16 Moose 32 +2011-05-21 18:42 Owl 30 +2011-05-21 20:53 Elk 21 +2011-05-22 00:59 Moose 7 +2011-05-23 14:04 Owl 15 +2011-05-24 00:05 Elk 42 +2011-05-24 20:10 Elk 35 +2011-05-24 07:30 Grizzly 13 +2011-05-25 13:16 Owl 21 +2011-05-25 19:26 Owl 31 +2011-05-25 22:46 Moose 9 +2011-05-26 13:18 Wolverine 4 +2011-05-27 13:19 Wolverine 35 +2011-05-28 12:18 Fox 18 +2011-05-29 01:20 Moose 29 +2011-05-30 18:39 Fox 23 +2011-05-30 16:04 Fox 19 +2011-05-31 13:24 Owl 11 +2011-06-01 16:34 Ptarmigan 6 +2011-06-01 17:37 Ptarmigan 12 +2011-06-01 01:18 Fox 37 +2011-06-01 21:17 Moose 27 +2011-06-01 14:04 Moose 17 +2011-06-01 18:21 Grizzly 25 +2011-06-02 07:34 Wolf 36 +2011-06-02 12:03 Wolverine 37 +2011-06-03 14:57 Moose 33 +2011-06-04 06:47 Grizzly 18 +2011-06-04 17:48 Moose 11 +2011-06-04 23:31 Elk 4 +2011-06-05 12:06 Muskox 26 +2011-06-05 02:12 Muskox 39 +2011-06-05 19:23 Ptarmigan 31 +2011-06-06 09:57 Moose 12 +2011-06-07 10:28 Owl 1 +2011-06-07 06:24 Grizzly 14 +2011-06-07 09:33 Moose 40 +2011-06-08 21:27 Grizzly 41 +2011-06-09 03:13 Grizzly 28 +2011-06-10 05:57 Fox 29 +2011-06-11 16:31 Owl 19 +2011-06-12 03:03 Wolverine 32 +2011-06-13 03:00 Wolverine 13 +2011-06-13 12:36 Grizzly 26 +2011-06-14 15:39 Wolf 39 +2011-06-15 08:11 Moose 19 +2011-06-16 06:52 Owl 29 +2011-06-17 05:30 Moose 21 +2011-06-17 20:32 Ptarmigan 27 +2011-06-17 20:37 Moose 42 diff --git a/Python/macguffin_animals.txt b/Python/macguffin_animals.txt new file mode 100644 index 0000000..5e03d2d --- /dev/null +++ b/Python/macguffin_animals.txt @@ -0,0 +1,100 @@ +2011-04-22 12:49 Moose 4 +2011-04-22 10:59 Grizzly 20 +2011-04-23 20:41 Muskox 36 +2011-04-24 02:04 Fox 31 +2011-04-25 10:54 Grizzly 20 +2011-04-25 02:45 Muskox 15 +2011-04-26 09:38 Owl 25 +2011-04-26 09:42 Wolf 40 +2011-04-26 10:04 Elk 21 +2011-04-26 09:42 Owl 3 +2011-04-26 14:01 Owl 5 +2011-04-27 23:40 Owl 5 +2011-04-27 16:22 Ptarmigan 13 +2011-04-28 16:32 Muskox 1 +2011-04-28 01:05 Grizzly 27 +2011-04-28 13:44 Muskox 23 +2011-04-29 21:36 Wolverine 39 +2011-04-29 12:43 Wolverine 8 +2011-04-30 00:47 Wolverine 26 +2011-05-01 19:48 Elk 16 +2011-05-02 21:18 Elk 26 +2011-05-03 00:12 Wolf 16 +2011-05-04 12:56 Wolf 38 +2011-05-05 18:39 Muskox 31 +2011-05-05 10:22 Wolf 5 +2011-05-05 19:25 Wolverine 19 +2011-05-05 07:54 Muskox 38 +2011-05-06 01:39 Elk 10 +2011-05-07 04:42 Ptarmigan 37 +2011-05-07 07:24 Wolf 27 +2011-05-08 22:59 Moose 3 +2011-05-09 06:54 Wolverine 40 +2011-05-09 19:28 Muskox 20 +2011-05-09 08:30 Moose 32 +2011-05-09 02:29 Grizzly 34 +2011-05-10 01:49 Moose 33 +2011-05-10 21:38 Grizzly 5 +2011-05-10 07:13 Grizzly 28 +2011-05-10 01:42 Owl 19 +2011-05-11 15:10 Elk 20 +2011-05-11 09:45 Grizzly 32 +2011-05-12 20:17 Owl 9 +2011-05-12 13:46 Grizzly 20 +2011-05-12 03:02 Wolverine 32 +2011-05-12 20:51 Ptarmigan 1 +2011-05-13 04:59 Moose 41 +2011-05-14 21:57 Muskox 20 +2011-05-15 23:30 Fox 2 +2011-05-16 23:09 Grizzly 31 +2011-05-17 04:23 Moose 22 +2011-05-17 00:54 Ptarmigan 36 +2011-05-18 16:05 Wolf 17 +2011-05-18 09:06 Moose 42 +2011-05-18 05:32 Muskox 23 +2011-05-18 08:25 Fox 4 +2011-05-19 16:46 Grizzly 30 +2011-05-19 16:03 Moose 26 +2011-05-19 15:33 Ptarmigan 8 +2011-05-20 14:41 Owl 42 +2011-05-21 09:00 Wolverine 37 +2011-05-22 21:00 Elk 42 +2011-05-23 12:34 Elk 14 +2011-05-24 01:40 Grizzly 25 +2011-05-24 15:10 Ptarmigan 5 +2011-05-24 11:34 Ptarmigan 10 +2011-05-25 07:36 Moose 39 +2011-05-25 07:00 Owl 2 +2011-05-26 15:43 Wolf 38 +2011-05-26 23:15 Wolf 14 +2011-05-26 14:52 Elk 24 +2011-05-26 21:46 Wolf 23 +2011-05-27 03:39 Ptarmigan 24 +2011-05-27 20:25 Ptarmigan 24 +2011-05-28 16:10 Wolf 3 +2011-05-29 06:05 Owl 28 +2011-05-29 18:02 Wolf 25 +2011-05-30 21:17 Wolf 24 +2011-05-30 06:02 Muskox 42 +2011-05-31 05:28 Owl 8 +2011-05-31 03:11 Fox 11 +2011-05-31 09:40 Wolverine 19 +2011-06-01 19:40 Grizzly 3 +2011-06-02 22:12 Wolf 37 +2011-06-03 15:53 Grizzly 12 +2011-06-04 17:55 Fox 2 +2011-06-04 08:08 Wolf 32 +2011-06-04 01:18 Muskox 26 +2011-06-05 02:04 Moose 18 +2011-06-05 18:24 Fox 1 +2011-06-06 14:21 Grizzly 34 +2011-06-07 19:44 Wolf 38 +2011-06-08 06:09 Wolverine 20 +2011-06-09 11:38 Wolf 32 +2011-06-10 19:22 Wolverine 20 +2011-06-10 14:09 Fox 25 +2011-06-11 06:30 Wolf 19 +2011-06-12 05:52 Wolf 24 +2011-06-12 14:51 Fox 11 +2011-06-13 13:40 Muskox 36 +2011-06-13 22:11 Wolverine 20 diff --git a/Python/merida_animals.txt b/Python/merida_animals.txt new file mode 100644 index 0000000..fa9a9f0 --- /dev/null +++ b/Python/merida_animals.txt @@ -0,0 +1,100 @@ +2011-04-22 04:10 Ptarmigan 36 +2011-04-23 18:42 Wolf 15 +2011-04-23 11:33 Grizzly 24 +2011-04-23 06:23 Grizzly 24 +2011-04-23 20:17 Wolf 9 +2011-04-23 18:49 Elk 17 +2011-04-24 18:49 Wolf 37 +2011-04-24 03:48 Ptarmigan 4 +2011-04-24 02:13 Moose 36 +2011-04-24 23:18 Fox 5 +2011-04-24 12:23 Grizzly 40 +2011-04-25 21:16 Wolf 10 +2011-04-25 23:46 Wolverine 39 +2011-04-25 16:31 Owl 19 +2011-04-25 03:46 Wolf 30 +2011-04-26 19:54 Owl 16 +2011-04-26 11:07 Owl 22 +2011-04-27 08:33 Ptarmigan 40 +2011-04-28 05:07 Moose 8 +2011-04-28 11:57 Wolf 2 +2011-04-28 22:46 Owl 23 +2011-04-29 22:22 Fox 42 +2011-04-30 18:23 Wolf 25 +2011-05-01 16:34 Wolverine 2 +2011-05-01 17:44 Wolf 20 +2011-05-01 14:19 Wolf 26 +2011-05-01 13:10 Owl 29 +2011-05-01 17:46 Owl 40 +2011-05-01 15:35 Ptarmigan 40 +2011-05-01 08:05 Wolverine 19 +2011-05-01 06:58 Muskox 7 +2011-05-01 20:50 Grizzly 28 +2011-05-02 05:21 Moose 25 +2011-05-03 15:12 Wolverine 13 +2011-05-04 00:32 Fox 39 +2011-05-04 20:11 Moose 40 +2011-05-05 14:09 Ptarmigan 34 +2011-05-05 17:32 Fox 13 +2011-05-06 21:15 Wolverine 33 +2011-05-06 08:04 Wolf 6 +2011-05-07 01:55 Wolverine 19 +2011-05-08 20:20 Wolf 34 +2011-05-08 12:32 Ptarmigan 26 +2011-05-08 08:05 Muskox 5 +2011-05-09 15:58 Owl 30 +2011-05-10 01:33 Elk 9 +2011-05-11 13:03 Muskox 21 +2011-05-11 01:08 Ptarmigan 42 +2011-05-11 03:18 Ptarmigan 13 +2011-05-11 09:20 Muskox 33 +2011-05-12 04:04 Wolf 11 +2011-05-13 11:00 Grizzly 12 +2011-05-14 14:57 Fox 39 +2011-05-14 05:51 Wolverine 26 +2011-05-14 10:03 Muskox 15 +2011-05-14 16:41 Muskox 42 +2011-05-14 01:17 Moose 29 +2011-05-15 03:13 Moose 33 +2011-05-16 18:21 Wolverine 20 +2011-05-17 06:47 Wolverine 31 +2011-05-18 16:28 Ptarmigan 39 +2011-05-19 17:56 Ptarmigan 36 +2011-05-19 13:44 Wolverine 4 +2011-05-19 18:21 Moose 1 +2011-05-20 22:01 Moose 12 +2011-05-21 21:31 Moose 5 +2011-05-21 19:22 Wolf 37 +2011-05-21 11:22 Fox 32 +2011-05-22 08:18 Fox 7 +2011-05-23 06:49 Owl 16 +2011-05-23 11:51 Moose 20 +2011-05-24 12:06 Grizzly 38 +2011-05-25 11:23 Owl 31 +2011-05-26 14:27 Owl 20 +2011-05-26 15:07 Muskox 21 +2011-05-26 14:02 Wolverine 19 +2011-05-27 11:44 Elk 9 +2011-05-28 06:46 Grizzly 33 +2011-05-29 00:24 Ptarmigan 14 +2011-05-29 06:50 Ptarmigan 10 +2011-05-30 20:34 Owl 15 +2011-05-31 11:46 Wolf 33 +2011-05-31 00:37 Muskox 7 +2011-06-01 05:11 Owl 29 +2011-06-02 05:48 Grizzly 28 +2011-06-03 16:07 Owl 8 +2011-06-03 19:30 Moose 20 +2011-06-03 04:38 Elk 38 +2011-06-04 16:17 Grizzly 28 +2011-06-04 05:52 Moose 37 +2011-06-05 06:26 Moose 4 +2011-06-06 23:28 Elk 11 +2011-06-06 13:15 Wolverine 6 +2011-06-07 03:20 Wolf 40 +2011-06-08 04:39 Moose 24 +2011-06-08 00:26 Owl 39 +2011-06-08 21:56 Ptarmigan 41 +2011-06-09 00:26 Wolf 36 +2011-06-09 11:30 Wolverine 4 +2011-06-10 12:44 Wolf 20 -- 2.26.2