<commit_before>import os
import subprocess

SPEC = "openstack-packstack.spec"  
SPEC = SPEC if os.path.isfile(SPEC) else "~/rpmbuild/SPECS/" + SPEC


#VERSION = ['2013', '2', '1']
proc = subprocess.Popen(["cat openstack-packstack.spec | grep Version | awk '{print $2}'"], stdout=subprocess.PIPE, shell=True)
#print('VERSION= ' + str(VERSION))
(out, err) = proc.communicate()
VERSION = out.split(".")
print("VERSION= " + str(out))
FINAL=False

def version_string():
    if FINAL:
        return '.'.join(filter(None, VERSION))
    else:
        return '.'.join(filter(None, VERSION))<commit_msg>get the correct dir for spec file<commit_after>import os
import subprocess

SPEC = "openstack-packstack.spec"
SPEC = SPEC if os.path.isfile(SPEC) else  "%s/rpmbuild/SPECS/%s" % (os.getenv("HOME"), SPEC)


#VERSION = ['2013', '2', '1']
proc = subprocess.Popen(["cat  '%s' | grep Version | awk '{print $2}'" % SPEC ], stdout=subprocess.PIPE, shell=True)

(out, err) = proc.communicate()
VERSION = out.split(".")
print("VERSION= " + str(out))
FINAL=False

def version_string():
    if FINAL:
        return '.'.join(filter(None, VERSION))
    else:
        return '.'.join(filter(None, VERSION))
{'fraction_non_alphanumeric': 0.18549747048903878, 'fraction_numerical': 0.011804384485666104, 'mean_word_length': 4.322869955156951, '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': '3907951', 'n_tokens_mistral': 442, 'n_tokens_neox': 428, 'n_words': 101}