<commit_before># GoProApp

Controls multiple GoPros from a web page.

This is a web app that provides a front end for the [GoProController](https://github.com/joshvillbrandt/GoProController) python class. The app itself is built off of [django-quick-start-app](http://github.com/joshvillbrandt/django-quick-start-app).

## How it works

The backbone of GoProApp is a program called GoProProxy that runs asynchronously to the server. This proxy periodically grabs the status of every camera in the database and sends commands to cameras when appropriate. GoProProxy utilizes GoProController to do the dirty work of actually communicating to the cameras.

The website portion of GoProApp grabs the latest status data from the database and serves it to the user. It also saves command requests back to the database when generated by the user.

## Setup

This app originally required one to first create a Django project, but the Django files are now integrated with the repo for easier deployment.

A bash script is also now included to perform the bulk of the required setup steps. This script is tested against Ubuntu 12.04. As a part of the setup procedure, an Apache config and Upstart config are installed into your system. If you do not want this, then take those steps out `setup.sh` before executing it.

```bash
sudo apt-get install git
cd ~/
git clone https://github.com/joshvillbrandt/GoProApp.git
cd ~/GoProApp
./setup.sh
```

Upon completion of `setup.sh`, You should now be able to navigate to `http://localhost:80/` and see the GoProApp. The `GoProApp/proxy.py` file is also now running which continuously polls the cameras for their statuses and sends commands to the cameras as they are queued up in the server.

## Development

To run GoProApp without Apache and Upstart, launch the site with the Django development server:

```bash
cd ~/GoProApp
python manage.py runserver 0.0.0.0:8000
```

In another terminal window, launch the proxy to communicate with the cameras:
<commit_msg>Use sudo command for setup with Ubuntu<commit_after># GoProApp

Controls multiple GoPros from a web page.

This is a web app that provides a front end for the [GoProController](https://github.com/joshvillbrandt/GoProController) python class. The app itself is built off of [django-quick-start-app](http://github.com/joshvillbrandt/django-quick-start-app).

## How it works

The backbone of GoProApp is a program called GoProProxy that runs asynchronously to the server. This proxy periodically grabs the status of every camera in the database and sends commands to cameras when appropriate. GoProProxy utilizes GoProController to do the dirty work of actually communicating to the cameras.

The website portion of GoProApp grabs the latest status data from the database and serves it to the user. It also saves command requests back to the database when generated by the user.

## Setup

This app originally required one to first create a Django project, but the Django files are now integrated with the repo for easier deployment.

A bash script is also now included to perform the bulk of the required setup steps. This script is tested against Ubuntu 12.04. As a part of the setup procedure, an Apache config and Upstart config are installed into your system. If you do not want this, then take those steps out `setup.sh` before executing it.

```bash
sudo apt-get install git
cd ~/
git clone https://github.com/joshvillbrandt/GoProApp.git
cd ~/GoProApp
sudo ./setup.sh
```

Upon completion of `setup.sh`, You should now be able to navigate to `http://localhost:80/` and see the GoProApp. The `GoProApp/proxy.py` file is also now running which continuously polls the cameras for their statuses and sends commands to the cameras as they are queued up in the server.

## Development

To run GoProApp without Apache and Upstart, launch the site with the Django development server:

```bash
cd ~/GoProApp
python manage.py runserver 0.0.0.0:8000
```

In another terminal window, launch the proxy to communicate with the cameras:

{'fraction_non_alphanumeric': 0.055168986083499, 'fraction_numerical': 0.006958250497017893, 'mean_word_length': 4.4391891891891895, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5668655', 'n_tokens_mistral': 1087, 'n_tokens_neox': 1009, 'n_words': 587}