Coder Social home page Coder Social logo

spark's Introduction

Spark

Setup

This project uses a number of python packages, so to run the system, do the following:

pip install jupyter pyspark matplotlib pandas numpy

# Assuming in project path
export PYTHONPATH=$PYTHONPATH:`pwd`

jupyter notebook  # Start notebook server to load the notebook files

The data and models are stored on an NFS share on the school network (ls99-kf39-cs5052), but the models have been included in this repo too. If you want to load some test data and the models on local machine, then in the sentiment notebook, change the load location for data and models:

df = funcs.load_dataframe(sess, '../data/test.json', funcs.schema)  # Load local test data
df2 = funcs.parse_timestamp(df)

# Load local model

sentiment_model = SentimentAnalyser()
sentiment_model.load("../models")

Spark Setup

If you want to use a spark cluster, start a Spark Master process and get the spark master URL (e.g. spark://pc5-035-l.cs.st-andrews.ac.uk:7077) then pass this to the spark connector bash script (you need to be in the comp sci lab for this to work).

./connect.sh spark://pc5-035-l.cs.st-andrews.ac.uk

If you don't want to run a cluster, the notebooks are set to use local machine by default anyway.

spark's People

Contributors

keananf avatar

Watchers

 avatar Louis  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.