<commit_before>import errno
import os
import subprocess

def mkdir_p(path):
  """Convenience routine to recursive create a hierarchy of directories."""
  try:
    os.makedirs(path)
  except OSError as exc: # Python >2.5
    if exc.errno == errno.EEXIST:
      pass
    else:
      raise

def warn(msg):
  """Simple warning routine."""
  print("W: " + msg)

def error(msg):
  """Simple error routine."""
  print("E: " + msg)

def log(msg):
  """This isn't really useful."""
  print(msg)

def pipe_cmd(cmd, env=None, cwd=None):
  return subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, env=env, cwd=cwd)
<commit_msg>Fix error/warning subroutine.<commit_after>import errno
import os
import subprocess

def mkdir_p(path):
  """Convenience routine to recursive create a hierarchy of directories."""
  try:
    os.makedirs(path)
  except OSError as exc: # Python >2.5
    if exc.errno == errno.EEXIST:
      pass
    else:
      raise

def warn(msg):
  """Simple warning routine."""
  print("W: " + str(msg))

def error(msg):
  """Simple error routine."""
  print("E: " + str(msg))

def log(msg):
  """This isn't really useful."""
  print(str(msg))

def pipe_cmd(cmd, env=None, cwd=None):
  return subprocess.Popen(cmd, shell=True, stdout=subprocess.PIPE, env=env, cwd=cwd)

{'fraction_non_alphanumeric': 0.14878621769772904, 'fraction_numerical': 0.0031323414252153485, 'mean_word_length': 3.9343629343629343, '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': '5964267', 'n_tokens_mistral': 459, 'n_tokens_neox': 446, 'n_words': 126}