<commit_before>#!/usr/bin/python3
import errno
import pathlib
import platform
import sys
import subprocess


def main():
    dist = platform.dist()
    if dist[0] != 'debian' and dist[0] != 'Ubuntu':
        print('This script can only be run on Debian GNU/Linux or Ubuntu.')
        sys.exit(errno.EPERM)

    workdir = pathlib.Path(__file__).resolve().parent.parent
    with (workdir / 'etc' / 'revision.txt').open('r') as revision_file:
        revision = (revision_file.readline().strip())
    venv_dir = pathlib.Path('/home/cliche/venv_{}'.format(revision))

    subprocess.check_call(
        [
            'sudo',
            'mv',
            '/tmp/cliche-deploy-{}.tar.gz'.format(revision),
            '/home/cliche',
        ]
    )

    subprocess.check_call(
        [
            'sudo',
            '-ucliche',
            'virtualenv',
            '-p',
            subprocess.check_output(
                'sudo',
                '-ucliche',
                'which',
                'python3.4',
            ).strip(),
            str(venv_dir),
        ]
    )

    subprocess.check_call(
        [
            'sudo',
            '-ucliche',<commit_msg>Fixed check_output<commit_after>#!/usr/bin/python3
import errno
import pathlib
import platform
import sys
import subprocess


def main():
    dist = platform.dist()
    if dist[0] != 'debian' and dist[0] != 'Ubuntu':
        print('This script can only be run on Debian GNU/Linux or Ubuntu.')
        sys.exit(errno.EPERM)

    workdir = pathlib.Path(__file__).resolve().parent.parent
    with (workdir / 'etc' / 'revision.txt').open('r') as revision_file:
        revision = (revision_file.readline().strip())
    venv_dir = pathlib.Path('/home/cliche/venv_{}'.format(revision))

    subprocess.check_call(
        [
            'sudo',
            'mv',
            '/tmp/cliche-deploy-{}.tar.gz'.format(revision),
            '/home/cliche',
        ]
    )

    subprocess.check_call(
        [
            'sudo',
            '-ucliche',
            'virtualenv',
            '-p',
            subprocess.check_output(
                [
                    'sudo',
                    '-ucliche',
                    'which',
                    'python3.4',
                ],
                universal_newlines=True
            ).strip(),
            str(venv_dir),
        ]
    )

    subprocess.check_call(
        [
            'sudo',
            '-ucliche',
{'fraction_non_alphanumeric': 0.13923013923013924, 'fraction_numerical': 0.004095004095004095, 'mean_word_length': 1.5159629248197735, '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': '5877956', 'n_tokens_mistral': 777, 'n_tokens_neox': 717, 'n_words': 131}