<commit_before>from ConfigParser import ConfigParser
import os, sys

def get(stanza, option):
  '''
  Open the configuration file and pull the value fromt he stanza and option
  specified.  Optionally the option type can be overriden with opt_type to
  return any of the following types: string, bool, float, and int.
  '''
  config = ConfigParser.ConfigParser()
  config.read(os.path.join(sys.path[0],'config.ini'))
  if opt_type == 'string':
    return config.get(stanza, option)
  if opt_type == 'int':
    return config.getint(stanza, option)<commit_msg>Added opt_type specification<commit_after>from ConfigParser import ConfigParser
import os, sys

def get(stanza, option, opt_type='string'):
  '''
  Open the configuration file and pull the value fromt he stanza and option
  specified.  Optionally the option type can be overriden with opt_type to
  return any of the following types: string, bool, float, and int.
  '''
  config = ConfigParser.ConfigParser()
  config.read(os.path.join(sys.path[0],'config.ini'))
  if opt_type == 'string':
    return config.get(stanza, option)
  if opt_type == 'int':
    return config.getint(stanza, option)
{'fraction_non_alphanumeric': 0.10086956521739131, 'fraction_numerical': 0.0017391304347826088, 'mean_word_length': 4.533653846153846, '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': '1497179', 'n_tokens_mistral': 348, 'n_tokens_neox': 345, 'n_words': 122}