<commit_before>import os
from fabric.api import run, cd, env, put, prefix, sudo
from fabric.contrib import files

env.deploy_dir = '/home/ubuntu/ateoto.com'
env.default_deploy_ref = 'origin/master'
env.virtualenv = 'ateoto.com'

def deploy():
    update_code()
    install_requirements()
    collect_static()
    apache('reload')    

def update_code(ref = None):
    ref = ref or env.default_deploy_ref

    with cd(env.deploy_dir):
        run('git pull')
        put('ateoto/settings/secrets.json', 'ateoto/settings/secrets.json')
    
def install_requirements():
    with cd(env.deploy_dir):
        with prefix('workon %s' % (env.virtualenv)):
            run('pip install -r requirements.txt')
            run('python manage.py migrate --settings=ateoto.settings')
            run('python manage.py syncdb --settings=ateoto.settings')

def collect_static(clear = False):
    clear_cmd = ''
    if clear: clear_cmd = '-c'
    with cd(env.deploy_dir):
        with prefix('workon %s' % (env.virtualenv)):
            run('python manage.py collectstatic %s --settings=ateoto.settings' % (clear_cmd))

def apache(cmd):
    sudo('invoke-rc.d apache2 %s' % cmd)

<commit_msg>collectstatic needs to be less verbose.<commit_after>import os
from fabric.api import run, cd, env, put, prefix, sudo
from fabric.contrib import files

env.deploy_dir = '/home/ubuntu/ateoto.com'
env.default_deploy_ref = 'origin/master'
env.virtualenv = 'ateoto.com'

def deploy():
    update_code()
    install_requirements()
    collect_static()
    apache('reload')    

def update_code(ref = None):
    ref = ref or env.default_deploy_ref

    with cd(env.deploy_dir):
        run('git pull')
        put('ateoto/settings/secrets.json', 'ateoto/settings/secrets.json')
    
def install_requirements():
    with cd(env.deploy_dir):
        with prefix('workon %s' % (env.virtualenv)):
            run('pip install -r requirements.txt')
            run('python manage.py migrate --settings=ateoto.settings')
            run('python manage.py syncdb --settings=ateoto.settings')

def collect_static(clear = False):
    clear_cmd = ''
    if clear: clear_cmd = '--clear'
    with cd(env.deploy_dir):
        with prefix('workon %s' % (env.virtualenv)):
            run('python manage.py collectstatic --noinput %s --settings=ateoto.settings' % (clear_cmd))

def apache(cmd):
    sudo('invoke-rc.d apache2 %s' % cmd)


{'fraction_non_alphanumeric': 0.13467168548724384, 'fraction_numerical': 0.000836470096194061, 'mean_word_length': 3.203866432337434, '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': '4454941', 'n_tokens_mistral': 788, 'n_tokens_neox': 751, 'n_words': 178}