<commit_before>from fabric.api import run, sudo
from fabric.api import prefix, warn, abort
from fabric.api import settings, task, env, shell_env
from fabric.context_managers import cd
from fabric.contrib.files import exists

from datetime import datetime
import json
import os
import shlex


env.hosts = ["web2.openprescribing.net"]
env.forward_agent = True
env.colorize_errors = True
env.user = "hello"

environments = {"production": "openprescribing", "staging": "openprescribing_staging"}


def sudo_script(script, www_user=False):
    """Run script under `deploy/fab_scripts/` as sudo.

    We don't use the `fabric` `sudo()` command, because instead we
    expect the user that is running fabric to have passwordless sudo
    access.  In this configuration, that is achieved by the user being
    a member of the `fabric` group (see `setup_sudo()`, below).<commit_msg>Use user ebmbot in fabfile<commit_after>from fabric.api import run, sudo
from fabric.api import prefix, warn, abort
from fabric.api import settings, task, env, shell_env
from fabric.context_managers import cd
from fabric.contrib.files import exists

from datetime import datetime
import json
import os
import shlex


env.hosts = ["web2.openprescribing.net"]
env.forward_agent = True
env.colorize_errors = True
env.user = "ebmbot"

environments = {"production": "openprescribing", "staging": "openprescribing_staging"}


def sudo_script(script, www_user=False):
    """Run script under `deploy/fab_scripts/` as sudo.

    We don't use the `fabric` `sudo()` command, because instead we
    expect the user that is running fabric to have passwordless sudo
    access.  In this configuration, that is achieved by the user being
    a member of the `fabric` group (see `setup_sudo()`, below).
{'fraction_non_alphanumeric': 0.08863636363636364, 'fraction_numerical': 0.0011363636363636363, 'mean_word_length': 4.850498338870432, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4345467', 'n_tokens_mistral': 538, 'n_tokens_neox': 495, 'n_words': 201}