{ "metadata": { "name": "", "signature": "sha256:d5a2d566582a5fcb363b8194c175ea67ab7261f1e35aa5bc1d70ba1c9c742fb1" }, "nbformat": 3, "nbformat_minor": 0, "worksheets": [ { "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Get Lab Class\n", "\n", "### 1st November 2014 Neil D. Lawrence\n", "\n", "This assignment gets the latest version of the pods software and then uses it to obtain a specific lab class in the local directory. First we update with the latest version of pods." ] }, { "cell_type": "code", "collapsed": false, "input": [ "# download the software\n", "import urllib\n", "\n", "urllib.urlretrieve('https://github.com/sods/ods/archive/master.zip', 'master.zip')\n", "\n", "# unzip the software\n", "import zipfile\n", "zip = zipfile.ZipFile('./master.zip', 'r')\n", "for name in zip.namelist():\n", " zip.extract(name, '.')\n", "\n", "# add the module location to the python path. \n", "import sys\n", "sys.path.append(\"./ods-master/\") " ], "language": "python", "metadata": {}, "outputs": [], "prompt_number": 1 }, { "cell_type": "markdown", "metadata": {}, "source": [ "Now we download the latest lab class. First we specify the week we are downloading, then we ask pods to fetch it for us." ] }, { "cell_type": "code", "collapsed": false, "input": [ "week_no = 4\n", "import pods\n", "pods.lab.download(course='machine_learning', name='week' + str(week_no))" ], "language": "python", "metadata": {}, "outputs": [ { "output_type": "stream", "stream": "stdout", "text": [ "week4.ipynb\n", "Downloading https://raw.githubusercontent.com/SheffieldML/notebook/master/lab_classes/machine_learning/week4.ipynb -> ./machine_learning/week4.ipynb\n", "\r" ] }, { "output_type": "stream", "stream": "stdout", "text": [ "[=========== ] 0.008/0.021MB" ] }, { "output_type": "stream", "stream": "stdout", "text": [ " \r", "[====================== ] 0.016/0.021MB" ] }, { "output_type": "stream", "stream": "stdout", "text": [ " \r", "[==============================] 0.021/0.021MB" ] }, { "output_type": "stream", "stream": "stdout", "text": [ " \r", "[==============================] 0.021/0.021MB\n" ] } ], "prompt_number": 3 }, { "cell_type": "code", "collapsed": false, "input": [], "language": "python", "metadata": {}, "outputs": [] } ], "metadata": {} } ] }