<commit_before>#Package configuration information

import json
import os.path
import sys

import QGL.config_location

# Load the configuration from the json file
# and populate the global configuration dictionary

QGLCfgFile = QGL.config_location.get_config_path()
print('Note: using QGLCfgFile [%s]' % QGLCfgFile)

if not os.path.isfile(QGLCfgFile):
    rootFolder = os.path.dirname(os.path.abspath(__file__))
    rootFolder = rootFolder.replace('\\', '/')  # use unix-like convention

    # build a config file from the template
    templateFile = os.path.join(rootFolder, 'config.example.json')
    ifid = open(templateFile, 'r')
    ofid = open(QGLCfgFile, 'w')
    for line in ifid:
        ofid.write(line.replace('/my/path/to', rootFolder))
    ifid.close()
    ofid.close()
<commit_msg>move QGL.config_location to qgl_config_loc<commit_after>#Package configuration information

import json
import os.path
import sys

import qgl_config_loc

# Load the configuration from the json file
# and populate the global configuration dictionary

QGLCfgFile = qgl_config_loc.get_config_path()
print('Note: using QGLCfgFile [%s]' % QGLCfgFile)

if not os.path.isfile(QGLCfgFile):
    rootFolder = os.path.dirname(os.path.abspath(__file__))
    rootFolder = rootFolder.replace('\\', '/')  # use unix-like convention

    # build a config file from the template
    templateFile = os.path.join(rootFolder, 'config.example.json')
    ifid = open(templateFile, 'r')
    ofid = open(QGLCfgFile, 'w')
    for line in ifid:
        ofid.write(line.replace('/my/path/to', rootFolder))
    ifid.close()
    ofid.close()

{'fraction_non_alphanumeric': 0.11387678904791537, 'fraction_numerical': 0.0, 'mean_word_length': 4.170418006430868, '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': '450256', 'n_tokens_mistral': 526, 'n_tokens_neox': 519, 'n_words': 133}