> For the complete documentation index, see [llms.txt](https://unstructured-playgroud.gitbook.io/unstructuredplayground/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://unstructured-playgroud.gitbook.io/unstructuredplayground/release-1.0/enviornment/autograder.md).

# Autograder

How to use the autograder

## Introduction

This course uses an autograder for grading your assignments.  This exercise demonstrates how to

1. Download your assignment to your VM
2. Answer the exercises
3. Upload your answers to the autograder

## Exercise

### Open a terminal on your native machine and start Vagrant

```
cd msbx5420vagrant
vagrant halt
vagrant up
```

### Download the exercise from GitHub

```
cd
cd work
rm -rf autograder
rm -rf MSBX5420-001-FunctionalProgramming
git clone https://github.com/marilynwaldman/autograder.git
```

### Stop remove all containers - you will see errors if you have no containers running

```
docker kill $(docker ps -q)
docker rm $(docker ps -a -q)
```

### Start your Spark Notebook

```
docker run -d --name spark  -p 8888:8888  \
    -v $HOME/work:/home/jovyan/work:rw  \
     jupyter/all-spark-notebook \
     start-notebook.sh --NotebookApp.token='' 
```

### Open your browser and go to:

```
http://localhost:8888
```

### Pull up the exercise in the "autograder" folder

![](https://3266175528-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTtjxZz0mQ2dLXJi93S%2F-LXFkhNn4Hvg-pWmMcsW%2F-LXFlLJta5DVGL3UlLhO%2FScreen%20Shot%202019-01-27%20at%2012.20.33%20PM.png?alt=media\&token=6ef3ac7c-8771-40af-9eb9-44d07bea4cdc)

### Answer the question at the end of the notebook

Note that you must comment out the "raise NotImplementedError() and insert your answer

![](https://3266175528-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTtjxZz0mQ2dLXJi93S%2F-LXFkhNn4Hvg-pWmMcsW%2F-LXFm3Zf0fSDhHCNLmI3%2FScreen%20Shot%202019-01-27%20at%2012.26.17%20PM.png?alt=media\&token=6347c684-40d8-4423-8e7a-f25e836d9c1d)

### Download the notebook and submit to Canvas

Note:

* The notebook Downloads to you virtual machine.&#x20;
* The name of the file to be submitted to the autograder must be "stock\_kurtosis.ipynb", exactly the name when downloaded from GitHub.
* The cells are graded per the "assert" section.  Use care when modifying graded cells

&#x20;

![](https://3266175528-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LTtjxZz0mQ2dLXJi93S%2F-LXFkhNn4Hvg-pWmMcsW%2F-LXFmd80oCyfEpwIAhG4%2FScreen%20Shot%202019-01-27%20at%2012.29.09%20PM.png?alt=media\&token=3b1c1c1d-f606-4f08-91a6-3836deb9d1da)

### Stop all docker containers on the VM

```
docker stop spark
docker rm spark
```

### Shut down the VM - from the native machine

```
vagrant halt
```
