<commit_before>import subprocess

def get_governor():
    """ Get the current governor for cpu0, assuming all CPUs use the same one. """
    with open('/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor') as fp:
        return fp.readlines()[0].strip()

def get_memory():
    """ Get memory """
    return subprocess.getoutput("LANG=C /usr/bin/free -m | awk 'NR==2{print $7}'")

def get_battery():
    """ Get battery """
    bat = int(subprocess.getoutput("cat /proc/apm | awk '{print $7}' | rev | cut -c 2- | rev"))
    cha = int(subprocess.getoutput("cat /proc/apm | awk '{print $4}' | cut -c 3-"))
    col = '#00FF00'
    sts = '\N{WHITE CIRCLE}'
    if bat < 60: col = '#FFFF00'
    if bat < 40: col = '#FF0000'
    if cha == 1: sts = '\N{BLACK CIRCLE}'
    return bat, sts, col

def get_volume():
    """ Get volume """
    return subprocess.getoutput("amixer get Master | egrep -o '[0-9]+%' | egrep -o '[0-9]*'")

def get_frequency():
    try:
        freq = int(subprocess.getoutput("cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq"))
        return round(freq / float(1000000), 1)
    except:
        return "meme"<commit_msg>fix sysinfo volume for multiple master channels<commit_after>import subprocess

def get_governor():
    """ Get the current governor for cpu0, assuming all CPUs use the same one. """
    with open('/sys/devices/system/cpu/cpu0/cpufreq/scaling_governor') as fp:
        return fp.readlines()[0].strip()

def get_memory():
    """ Get memory """
    return subprocess.getoutput("LANG=C /usr/bin/free -m | awk 'NR==2{print $7}'")

def get_battery():
    """ Get battery """
    bat = int(subprocess.getoutput("cat /proc/apm | awk '{print $7}' | rev | cut -c 2- | rev"))
    cha = int(subprocess.getoutput("cat /proc/apm | awk '{print $4}' | cut -c 3-"))
    col = '#00FF00'
    sts = '\N{WHITE CIRCLE}'
    if bat < 60: col = '#FFFF00'
    if bat < 40: col = '#FF0000'
    if cha == 1: sts = '\N{BLACK CIRCLE}'
    return bat, sts, col

def get_volume():
    """ Get volume """
    return subprocess.getoutput("amixer get Master | egrep -o '[0-9]+%' | egrep -o '[0-9]*' | head -1")

def get_frequency():
    try:
        freq = int(subprocess.getoutput("cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq"))
        return round(freq / float(1000000), 1)
    except:
        return "meme"
{'fraction_non_alphanumeric': 0.1735042735042735, 'fraction_numerical': 0.03205128205128205, 'mean_word_length': 3.0431778929188256, 'pattern_counts': {'":': 0, '<': 7, '<?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': '4702167', 'n_tokens_mistral': 866, 'n_tokens_neox': 819, 'n_words': 227}