<commit_before>#!/bin/sh

# Deployment Script for deploying to Ubuntu 12.04 Server
read -p "Enter your github username > " username
read -p "Enter the github repository name [insightfl] > " project

# Default project name is 'insightfl'
project=${project:="insightfl"}
project_dir=$HOME/$project

if [[ username && project ]]; then
  # Installing git, git dependencies, pip, curl, nginx, MySQL, and MySQLdb
  sudo apt-get update
  sudo apt-get build-dep -y git-core
  sudo apt-get install -y git-core python-pip curl nginx mysql-server python-mysqldb
  sudo pip install pip --upgrade

  # Installing node and npm
  sudo apt-get install -y python-software-properties python g++ make
  sudo add-apt-repository -y ppa:chris-lea/node.js
  sudo apt-get update
  sudo apt-get install -y nodejs

  # Cloning the github repo
  git clone https://github.com/$username/$project.git

  # Installing project dependencies
  cd $project_dir
  npm install
  sudo pip install -r requirements.txt

  # Setting up nginx
  sudo touch /etc/nginx/sites-available/insightfl
  sudo bash -c 'cat > /etc/nginx/sites-available/insightfl <<- _EOF_
  server {
    listen 80;

    root '$project_dir';
    index index.html index.htm;

    server_name "";

    location / {
      proxy_pass http://127.0.0.1:5000;<commit_msg>need to remove the default nginx conf file in order for proxy_pass to work<commit_after>#!/bin/sh

# Deployment Script for deploying to Ubuntu 12.04 Server
read -p "Enter your github username > " username
read -p "Enter the github repository name [insightfl] > " project

# Default project name is 'insightfl'
project=${project:="insightfl"}
project_dir=$HOME/$project

if [[ username && project ]]; then
  # Installing git, git dependencies, pip, curl, nginx, MySQL, and MySQLdb
  sudo apt-get update
  sudo apt-get build-dep -y git-core
  sudo apt-get install -y git-core python-pip curl nginx mysql-server python-mysqldb
  sudo pip install pip --upgrade

  # Installing node and npm
  sudo apt-get install -y python-software-properties python g++ make
  sudo add-apt-repository -y ppa:chris-lea/node.js
  sudo apt-get update
  sudo apt-get install -y nodejs

  # Cloning the github repo
  git clone https://github.com/$username/$project.git

  # Installing project dependencies
  cd $project_dir
  npm install
  sudo pip install -r requirements.txt

  # Setting up nginx
  sudo rm /etc/nginx/sites-available/default
  sudo touch /etc/nginx/sites-available/insightfl

  sudo bash -c 'cat > /etc/nginx/sites-available/insightfl <<- _EOF_
  server {
    listen 80;

    root '$project_dir';
    index index.html index.htm;

    server_name "";

    location / {
      proxy_pass http://127.0.0.1:5000;
{'fraction_non_alphanumeric': 0.09907235621521336, 'fraction_numerical': 0.011873840445269016, 'mean_word_length': 3.441515650741351, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4696446', 'n_tokens_mistral': 932, 'n_tokens_neox': 826, 'n_words': 287}