<commit_before>var fs = require('fs');
var vm = require('vm');
var _ = require('lodash').runInContext();

var isAddOnRegEx = _.bindAll(/^_\..+/, 'test');
var context = vm.createContext({_:_});
var rightCurryVm = _.partialRight(vm.runInNewContext, context);
function simpleReadFile(filename) { return fs.readFileSync(filename); }
_(fs.readdirSync(__dirname)).filter(isAddOnRegEx.test).map(simpleReadFile).each(function (code) {
  rightCurryVm(code);
});

module.exports = _;<commit_msg>cwd is a bi**h<commit_after>var fs = require('fs');
var vm = require('vm');
var path = require('path');
var _ = require('lodash').runInContext();

var isAddOnRegEx = _.bindAll(/^_\..+/, 'test');
var context = vm.createContext({_: _});
var rightCurryVm = _.partialRight(vm.runInNewContext, context);
function simpleReadFile(filename) {
  return fs.readFileSync(path.join(__dirname, filename));
}
_(fs.readdirSync(__dirname)).filter(isAddOnRegEx.test).map(simpleReadFile).each(function (code) {
  rightCurryVm(code);
});

module.exports = _;
{'fraction_non_alphanumeric': 0.18359375, 'fraction_numerical': 0.0, 'mean_word_length': 6.706766917293233, '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': '543557', 'n_tokens_mistral': 351, 'n_tokens_neox': 346, 'n_words': 61}