<commit_before>from fabric.api import *
from fabric.contrib.console import confirm

env.hosts = ['<EMAIL>']
production = '/srv/tomo/'
staging = '/srv/dev/tomo/'

fixtures = [
    # 'auth.User',
    'course.Course',
    'course.ProblemSet',
    'problem.Language',
    'problem.Problem',
    'problem.Part',
    # 'problem.Submission',
    # 'problem.Attempt',
]

def stage():
    update(staging)

def update(destination):
    lock(destination)
    with cd('/srv/dev/tomo'):
        sudo('hg pull')
        sudo('hg up')
    migrate_database(destination)
    unlock(destination)

def deploy():
    update(production)

def manage(destination, command, options=""):
    settings = 'settings.production' if destination == production else 'settings.dev'
    with cd(destination):
        with prefix('source virtualenv/bin/activate'):
            sudo('./manage.py {1} --settings={0} {2}'.format(settings, command, options))
<commit_msg>Fixed fetching on remote servers.<commit_after>from fabric.api import *
from fabric.contrib.console import confirm

env.hosts = ['<EMAIL>']
production = '/srv/tomo/'
staging = '/srv/dev/tomo/'

fixtures = [
    # 'auth.User',
    'course.Course',
    'course.ProblemSet',
    'problem.Language',
    'problem.Problem',
    'problem.Part',
    # 'problem.Submission',
    # 'problem.Attempt',
]

def stage():
    update(staging)

def update(destination):
    lock(destination)
    with cd(destination):
        sudo('hg fetch')
    migrate_database(destination)
    unlock(destination)

def deploy():
    update(production)

def manage(destination, command, options=""):
    settings = 'settings.production' if destination == production else 'settings.dev'
    with cd(destination):
        with prefix('source virtualenv/bin/activate'):
            sudo('./manage.py {1} --settings={0} {2}'.format(settings, command, options))

{'fraction_non_alphanumeric': 0.15599784830554062, 'fraction_numerical': 0.0032275416890801506, 'mean_word_length': 3.4819277108433737, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '554886', 'n_tokens_mistral': 591, 'n_tokens_neox': 562, 'n_words': 124}