<commit_before>// auto-generated by caster.py : https://github.com/vivekpathak/casters
// do not edit. consider improving the script on github instead

// define globals to be accessed by test cases 
var keys = [] ;
var values = [] ;
var map = null ; 
var reduce = null ;

// define functions that map the functions defined 
// in couchdb execution context to something meaningful for 
// the test case 

function emit(k, v) {
   keys.push(k)  ;
   values.push(v) ;
}


function sum(values) { 
   var total = 0;
   for( var i = 0; i < values.length; i++ ){
     total += values[i] ;
   }
   return total ; 
}


function require(name) {
   // we are currently in test dir, i.e. ../ is view; ../../ is views; and ../../../ is design doc root
   print( "loading requires code from \"../../../" + name + "\"" ) ; 
   evalcx( "var exports = {}; eval(read(\"../../../" + name + "\"));" , this ) ; 
}


function log(mesg) { <commit_msg>got identical behavior on commandline run and run through couchdb view while using the common js modules through requires<commit_after>// auto-generated by caster.py : https://github.com/vivekpathak/casters
// do not edit. consider improving the script on github instead

// define globals to be accessed by test cases 
var keys = [] ;
var values = [] ;
var map = null ; 
var reduce = null ;

// define functions that map the functions defined 
// in couchdb execution context to something meaningful for 
// the test case 

function emit(k, v) {
   keys.push(k)  ;
   values.push(v) ;
}


function sum(values) { 
   var total = 0;
   for( var i = 0; i < values.length; i++ ){
     total += values[i] ;
   }
   return total ; 
}


function require(name) {
   // we are currently in test dir, i.e. ../ is view; ../../ is views; and ../../../ is design doc root
   print( "loading requires code from \"../../../" + name + "\"" ) ; 
   eval( "var exports = {}; eval(read(\"../../../" + name + "\"));" ) ; 
   return exports ; 
}


function log(mesg) { 
{'fraction_non_alphanumeric': 0.16076845298281092, 'fraction_numerical': 0.0020222446916076846, 'mean_word_length': 2.4719298245614034, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, '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': '6858559', 'n_tokens_mistral': 635, 'n_tokens_neox': 605, 'n_words': 227}