<commit_before>#!/usr/bin/python
# insertparameters.py
# <NAME>
# April 12, 2007
# This script takes a raw Fortran file (By raw, I mean not ready to compile,
# having token codes like '$lngx$' present instead of an actual value, like 6.)
# and translates each token to a value set in this file

import os, time, os.path

hin = open('batch.parameter','r')

short_tokens = []
tokens = []
list_values = []
n_values = []
m = 0
for line in hin.readlines():
  elements = line.split(',')
  elements[-1] = elements[-1].replace('\n','')
  short_tokens.append(elements[0])
  tokens.append(elements[1])<commit_msg>This works now; I changed the delimiter and told it to use a batch parameter file specified at the command line, not the default batch.parameter.<commit_after>#!/usr/bin/python
# insertparameters.py
# <NAME>
# April 12, 2007
# This script takes a raw Fortran file (By raw, I mean not ready to compile,
# having token codes like '$lngx$' present instead of an actual value, like 6.)
# and translates each token to a value set in this file

import os, time, os.path, sys

hin = open(sys.argv[-1],'r')

short_tokens = []
tokens = []
list_values = []
n_values = []
m = 0
for line in hin.readlines():
  elements = line.split(';')
  elements[-1] = elements[-1].replace('\n','')
  for i in range(len(elements)):
    elements[i] = elements[i].replace('\\n','\n     & ')
  short_tokens.append(elements[0])
  tokens.append(elements[1])
{'fraction_non_alphanumeric': 0.14565826330532214, 'fraction_numerical': 0.01750700280112045, 'mean_word_length': 4.2536764705882355, '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': '5123416', 'n_tokens_mistral': 477, 'n_tokens_neox': 458, 'n_words': 164}