<commit_before>import subprocess
import re
import os
import shlex
import datetime

def rpm_check(packagename):
    """
    Uses "rpm -q <packagename>" to check if a package is installed.
    It does not check the version. Returns True if it is installed, and 
    False if it is not.
    """
    rpm_regex = re.compile("(%s)(.)+(\.)(.)+" % packagename)
    result = False
    try:
        proc = subprocess.Popen(shlex.split("rpm -q %s" % packagename), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        lines = ""
        while(monitor):
            return_code = proc.poll()
            line = proc.stdout.readline()
            lines = lines + line
            if return_code != None:
                break
        output = lines.split("\n")
        rpm_q = output[0]
        if rpm_regex.match(rpm_q):
            result = True
        else:<commit_msg>install/dependency/dependency_redhat.py: Removed reference to removed variable "monitor."<commit_after>import subprocess
import re
import os
import shlex
import datetime

def rpm_check(packagename):
    """
    Uses "rpm -q <packagename>" to check if a package is installed.
    It does not check the version. Returns True if it is installed, and 
    False if it is not.
    """
    rpm_regex = re.compile("(%s)(.)+(\.)(.)+" % packagename)
    result = False
    try:
        proc = subprocess.Popen(shlex.split("rpm -q %s" % packagename), stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
        lines = ""
        while(True):
            return_code = proc.poll()
            line = proc.stdout.readline()
            lines = lines + line
            if return_code != None:
                break
        output = lines.split("\n")
        rpm_q = output[0]
        if rpm_regex.match(rpm_q):
            result = True
        else:
{'fraction_non_alphanumeric': 0.11382565241532482, 'fraction_numerical': 0.001110494169905608, 'mean_word_length': 2.178130511463845, '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': '7472873', 'n_tokens_mistral': 558, 'n_tokens_neox': 535, 'n_words': 157}