<commit_before>require 'mkfifo'
require 'tempfile'

@mytemppaths = Array.new

def mytemppath(basename, tmpdir = Dir::tmpdir)
  fp = Tempfile.open(basename, tmpdir)
  path = fp.path
  @mytemppaths.push(path)
  fp.close!
  path
end

END { @mytemppaths.each { |path| File.unlink(path) if File.exist?(path) } }

def mymkfifo(basename, tmpdir = Dir::tmpdir)
  path = mytemppath(basename, tmpdir)
  File.mkfifo(path)
  path
end
<commit_msg>bug fix in mytemppath epilogue<commit_after>require 'mkfifo'
require 'tempfile'

@mytemppaths = Array.new

def mytemppath(basename, tmpdir = Dir::tmpdir)
  fp = Tempfile.open(basename, tmpdir)
  path = fp.path
  @mytemppaths.push(path)
  fp.close!
  path
end

END { @mytemppaths.each { |path| sh "rm -rf #{path}" if File.exist?(path) } }

def mymkfifo(basename, tmpdir = Dir::tmpdir)
  path = mytemppath(basename, tmpdir)
  File.mkfifo(path)
  path
end

{'fraction_non_alphanumeric': 0.1319052987598647, 'fraction_numerical': 0.0, 'mean_word_length': 4.6923076923076925, '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': '7213297', 'n_tokens_mistral': 369, 'n_tokens_neox': 370, 'n_words': 77}