<commit_before>#!/bin/bash
#git clone https://github.com/johnlscott/cr.git /home/ubuntu/cr
apt-get update
apt-get install -y gunicorn nginx python-dev libxml2 libxslt1-dev git-core python-pip
cd /home/ubuntu/cr
pip install -r requirements.txt
pip install futures
chown -R www-data:www-data /home/ubuntu/cr

cat > /etc/systemd/system/gunicorn.service <<EOL
[Unit]
Description=Gunicorn application server running Django app
After=network.target
After=syslog.target

[Service]
User=www-data
Group=www-data
Environment=PATH=/home/ubuntu/cr/censusreporter/bin
Environment=PYTHONPATH=/home/ubuntu/cr/censusreporter:/home/ubuntu/cr/censusreporter/apps
Environment=DJANGO_SETTINGS_MODULE=config.dev.settings
RuntimeDirectoryMode=755
ExecStart=/usr/bin/gunicorn --chdir /home/ubuntu/cr --threads 3 --bind unix:/home/ubuntu/cr/censusreporter.sock -m 007 config.dev.wsgi
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target
EOL

systemctl enable gunicorn.service
systemctl daemon-reload
systemctl start gunicorn.service
systemctl status gunicorn.service

cat > /etc/nginx/sites-available/censusreporter <<EOL
server {
    listen 80;
    server_name census.jlscloud.net;

    location / {
        include proxy_params;
        proxy_pass http://unix:/home/ubuntu/cr/censusreporter.sock;
    }

    location /static {
        alias /home/ubuntu/cr/censusreporter/apps/census/static;
    }
<commit_msg>corrected domain name<commit_after>#!/bin/bash
#git clone https://github.com/johnlscott/cr.git /home/ubuntu/cr
apt-get update
apt-get install -y gunicorn nginx python-dev libxml2 libxslt1-dev git-core python-pip
cd /home/ubuntu/cr
pip install -r requirements.txt
pip install futures
chown -R www-data:www-data /home/ubuntu/cr

cat > /etc/systemd/system/gunicorn.service <<EOL
[Unit]
Description=Gunicorn application server running Django app
After=network.target
After=syslog.target

[Service]
User=www-data
Group=www-data
Environment=PATH=/home/ubuntu/cr/censusreporter/bin
Environment=PYTHONPATH=/home/ubuntu/cr/censusreporter:/home/ubuntu/cr/censusreporter/apps
Environment=DJANGO_SETTINGS_MODULE=config.dev.settings
RuntimeDirectoryMode=755
ExecStart=/usr/bin/gunicorn --chdir /home/ubuntu/cr --threads 3 --bind unix:/home/ubuntu/cr/censusreporter.sock -m 007 config.dev.wsgi
Restart=on-failure
RestartSec=3

[Install]
WantedBy=multi-user.target
EOL

systemctl enable gunicorn.service
systemctl daemon-reload
systemctl start gunicorn.service
systemctl status gunicorn.service

cat > /etc/nginx/sites-available/censusreporter <<EOL
server {
    listen 80;
    server_name censusreporter.jlscloud.net;

    location / {
        include proxy_params;
        proxy_pass http://unix:/home/ubuntu/cr/censusreporter.sock;
    }

    location /static {
        alias /home/ubuntu/cr/censusreporter/apps/census/static;
    }

{'fraction_non_alphanumeric': 0.10898796886058032, 'fraction_numerical': 0.008492569002123142, 'mean_word_length': 4.426103646833013, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 8, 'xml': 2}, 'pii_count': 0, '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': '2835077', 'n_tokens_mistral': 1051, 'n_tokens_neox': 940, 'n_words': 186}