<commit_before>'use strict'

fs = require 'fs-extra'
crypto = require 'crypto'
pathUtils = require 'path'
coffee = require 'coffee-script'

{log} = Neft

CACHE_DIRECTORY = __dirname + '/.tmp'
fs.ensureDirSync CACHE_DIRECTORY

{stringify} = JSON

IS_COFFEE_RE = ///\.(coffee|litcoffee|coffee.md)$///
IS_LITERATE_COFFEE_RE = ///\.(litcoffee|coffee.md)$///
STRING_FILES =
	'.pegjs': true
	'.txt': true

replaceStr = (str, oldStr, newStr) ->
	i = str.indexOf oldStr
	unless ~i then return str

	r = str.slice 0, i
	r += newStr
	r += str.slice i + oldStr.length

	r<commit_msg>bundle-builder tmp now uses os.tmpdir<commit_after>'use strict'

fs = require 'fs-extra'
crypto = require 'crypto'
pathUtils = require 'path'
coffee = require 'coffee-script'
os = require 'os'

{log} = Neft

CACHE_DIRECTORY = os.tmpdir()

{stringify} = JSON

IS_COFFEE_RE = ///\.(coffee|litcoffee|coffee.md)$///
IS_LITERATE_COFFEE_RE = ///\.(litcoffee|coffee.md)$///
STRING_FILES =
	'.pegjs': true
	'.txt': true

replaceStr = (str, oldStr, newStr) ->
	i = str.indexOf oldStr
	unless ~i then return str

	r = str.slice 0, i
	r += newStr
	r += str.slice i + oldStr.length

	r
{'fraction_non_alphanumeric': 0.1589519650655022, 'fraction_numerical': 0.0017467248908296944, 'mean_word_length': 3.7551867219917012, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1535022', 'n_tokens_mistral': 470, 'n_tokens_neox': 445, 'n_words': 113}