<commit_before>#!/usr/bin/env python
import os
import subprocess
import math

def runsqls(mybin, db, mapsql, reducesql):
    os.putenv('LD_LIBRARY_PATH','../build')
    return subprocess.check_output([mybin, "-d", db, "-m", mapsql, "-r", reducesql],env=os.environ)

def test(mybin, db, mapsql, reducesql, expected, tol):
    print "Test:"
    print "  bin            "+mybin
    print "  db        (-d) "+db
    print "  mapsql    (-m) "+mapsql
    print "  reducesql (-r) "+reducesql
    got = runsqls(mybin,db,mapsql,reducesql).rstrip()
    print "  expect         "+str(expected)+" +/- "+str(tol)
    print "  got            "+got
    gotr = float(got)<commit_msg>Fix LD_LIBRARY_PATH export in ./test1.py<commit_after>#!/usr/bin/env python
import os
import subprocess
import math

os.putenv('LD_LIBRARY_PATH','../build')

def runsqls(mybin, db, mapsql, reducesql):
    return subprocess.check_output([mybin, "-d", db, "-m", mapsql, "-r", reducesql])

def test(mybin, db, mapsql, reducesql, expected, tol):
    print "Test:"
    print "  bin            "+mybin
    print "  db        (-d) "+db
    print "  mapsql    (-m) "+mapsql
    print "  reducesql (-r) "+reducesql
    got = runsqls(mybin,db,mapsql,reducesql).rstrip()
    print "  expect         "+str(expected)+" +/- "+str(tol)
    print "  got            "+got
    gotr = float(got)
{'fraction_non_alphanumeric': 0.16232315711094564, 'fraction_numerical': 0.0007446016381236039, 'mean_word_length': 2.7966101694915255, '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': '3165924', 'n_tokens_mistral': 486, 'n_tokens_neox': 483, 'n_words': 117}