<commit_before>from __future__ import with_statement
from fabric.api import run, cd
from fabric.context_managers import prefix


def deploy():
    code_dir = '/home/b402/beta402'
    with cd(code_dir), prefix('source ve/bin/activate'):
        run('sudo supervisorctl stop b402-gunicorn')
        run("./save_db.sh")
        run("git pull")
        run("pip install -r requirements.txt --upgrade -q")
        run("make shower")
        run("./manage.py compress -v 0")
        run("./manage.py collectstatic --noinput -v 0")
        run("./manage.py migrate")
        run('sudo supervisorctl start b402-gunicorn')


def light_deploy():
    code_dir = '/home/b402/beta402'
    with cd(code_dir), prefix('source ve/bin/activate'):
        run('sudo supervisorctl stop b402-gunicorn')
        run("git pull")
        run('sudo supervisorctl start b402-gunicorn')


def restart_workers():
    run('sudo supervisorctl stop  b402-worker1')
    run('sudo supervisorctl stop  b402-worker2')
    run('sudo supervisorctl stop  b402-worker3')

    run('sudo supervisorctl start b402-worker3')
    run('sudo supervisorctl start b402-worker2')
    run('sudo supervisorctl start b402-worker1')


def stats():
    code_dir = '/home/b402/beta402'
    with cd(code_dir), prefix('source ve/bin/activate'):
        run('./manage.py stats')
<commit_msg>Update fabfile<commit_after>from __future__ import with_statement
from fabric.api import run, cd
from fabric.context_managers import prefix


def deploy():
    code_dir = '/home/b402/beta402'
    with cd(code_dir), prefix('source ve/bin/activate'):
        run('sudo supervisorctl stop b402-gunicorn')
        run("./save_db.sh")
        run("git pull")
        run("pip install -r requirements.txt --upgrade -q")
        run("./manage.py collectstatic --noinput -v 0")
        run("./manage.py migrate")
        run('sudo supervisorctl start b402-gunicorn')


def light_deploy():
    code_dir = '/home/b402/beta402'
    with cd(code_dir), prefix('source ve/bin/activate'):
        run('sudo supervisorctl stop b402-gunicorn')
        run("git pull")
        run('sudo supervisorctl start b402-gunicorn')


def restart_workers():
    run('sudo supervisorctl stop  b402-worker1')
    run('sudo supervisorctl stop  b402-worker2')
    run('sudo supervisorctl stop  b402-worker3')

    run('sudo supervisorctl start b402-worker3')
    run('sudo supervisorctl start b402-worker2')
    run('sudo supervisorctl start b402-worker1')


def stats():
    code_dir = '/home/b402/beta402'
    with cd(code_dir), prefix('source ve/bin/activate'):
        run('./manage.py stats')

{'fraction_non_alphanumeric': 0.13081954597922277, 'fraction_numerical': 0.042708734128510964, 'mean_word_length': 3.180064308681672, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, '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': '850895', 'n_tokens_mistral': 921, 'n_tokens_neox': 780, 'n_words': 205}