<commit_before>import os
import shlex
from subprocess import check_output
from telegram.ext import CommandHandler, Filters, MessageHandler

from classes import User, Chat
from main import database, username, VERSION


REPOSITORY_NAME = "Doktor/soup-dumpling"
REPOSITORY_URL = "https://github.com/Doktor/soup-dumpling"

COMMIT_HASH = check_output(['git', 'rev-parse', 'HEAD'],
    encoding='utf8').rstrip('\n')
COMMIT_URL = REPOSITORY_URL + '/commit/' + COMMIT_HASH

DATE_ARGS = ['git', 'log', COMMIT_HASH,
    '-1', '--date=iso', r'--pretty=format:%cd']
COMMIT_DATE = check_output(DATE_ARGS, encoding='utf8')[:19]

# Commits that don't exist on the remote branch
ORIGIN_DIFF = check_output(
    shlex.split("git log origin/master..master --pretty=oneline"),
    encoding='utf8')

PUSHED = COMMIT_HASH not in ORIGIN_DIFF

DEBUG = os.path.isfile('debug')

# The relative date is used for the 'about' command
DATE_ARGS[4] = '--date=relative'
<commit_msg>Use absolute path for git<commit_after>import os
import shlex
from subprocess import check_output
from telegram.ext import CommandHandler, Filters, MessageHandler

from classes import User, Chat
from main import database, username, VERSION


REPOSITORY_NAME = "Doktor/soup-dumpling"
REPOSITORY_URL = "https://github.com/Doktor/soup-dumpling"

COMMIT_HASH = check_output(['/usr/bin/git', 'rev-parse', 'HEAD'],
    encoding='utf8').rstrip('\n')
COMMIT_URL = REPOSITORY_URL + '/commit/' + COMMIT_HASH

DATE_ARGS = ['/usr/bin/git', 'log', COMMIT_HASH,
    '-1', '--date=iso', r'--pretty=format:%cd']
COMMIT_DATE = check_output(DATE_ARGS, encoding='utf8')[:19]

# Commits that don't exist on the remote branch
ORIGIN_DIFF = check_output(
    shlex.split("/usr/bin/git log origin/master..master --pretty=oneline"),
    encoding='utf8')

PUSHED = COMMIT_HASH not in ORIGIN_DIFF

DEBUG = os.path.isfile('debug')

# The relative date is used for the 'about' command
DATE_ARGS[4] = '--date=relative'

{'fraction_non_alphanumeric': 0.1396187532199897, 'fraction_numerical': 0.0072127769191138585, 'mean_word_length': 5.2243589743589745, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '1950578', 'n_tokens_mistral': 691, 'n_tokens_neox': 684, 'n_words': 166}