Giter VIP home page Giter VIP logo

htl-lab1's Introduction

HtL Lab 1

This is a Flask server that implements a minimal web-based interface to the Olin College 2016-2017 course catalog.

Requirements

Python 3 is required to run this program. You can test whether Python 3 is installed on your laptop by running python3 --version in the bash (shell) command line:

$ python --version
Python 2.7.6

Setup

$ pip3 install flask
$ pip3 install pandas

Usage

  1. Run $ python3 server.py
  2. Browse to http://127.0.0.1:5000/. (The python3 server.py command also prints this URL.)

Alternative setup and Usage

If you're having trouble installing Python, Flask, or Pandas on your development machine, use the following instead.

The second step takes a long time the first time you run it, but is much faster after that.

  1. Install Docker. This works on macOS, Windows, and Ubuntu (as well as many other Linux distributions). This is only necessary once.

  2. Run docker-compose up in the command line

  3. Browse to http://127.0.0.1:5000/

Directory Structure

server.py is a web application, written using the Flask web framework. See here for information on using Flask. The application uses pandas to read the (CSV) data file, and to filter the list of courses down to specific areas.

templates/*.html are the HTML templates that are served in response to HTTP requests to the server. See the Flask documentation for more information about how this works. These are Jinja templates; read here for information about Jinja.

data/ contains data files. This is currently limited to:

data/olin-courses-16-17.csv is CSV file that lists the courses. See the first line of the file itself for a description of its columns.

scripts/scrape_course_catalog.py scrapes the http://www.olin.edu web site to create the data file. This script makes heavy use of pandas. Ask IT first before you run this script – it could look look like an attack on the web site. As with all web scraping, this script is fragile – a minor change to the olin.edu web design or URL format could break it with no warning.

Contributors

Written by Oliver Steele [email protected].

License

This code is made available under the MIT License.

htl-lab1's People

Contributors

osteele avatar

Watchers

 avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.