<commit_before><?php

class phpXChatTools
{
  function RelativePath($p1, $p2)
  {
    $p1 = realpath($p1);
    $p2 = realpath($p2);
    $res = "";
    while( $p1 != "" && $p1 != "/" && strpos($p2, $p1) === FALSE)
    {
      $res .= "../";
      $p1 = dirname($p1);
    }
    $p2 = substr($p2, strlen($p1)+1, strlen($p2)-strlen($p1));
    $res .= $p2;
    return $res;
  }

  function RecursiveMkdir($path)
  {
    // This function creates the specified directory using mkdir().  Note
    // that the recursive feature on mkdir() is broken with PHP 5.0.4 for
    // Windows, so I have to do the recursion myself.
    if (!file_exists($path))
    {
      // The directory doesn't exist.  Recurse, passing in the parent
      // directory so that it gets created.
      RecursiveMkdir(dirname($path));
      mkdir($path, 0777);
    }
  }

}

?><commit_msg>buf fix: the RecursiveMkdir function was incorrect<commit_after><?php

class phpXChatTools
{
  function RelativePath($p1, $p2)
  {
    $p1 = realpath($p1);
    $p2 = realpath($p2);
    $res = "";
    while( $p1 != "" && $p1 != "/" && strpos($p2, $p1) === FALSE)
    {
      $res .= "../";
      $p1 = dirname($p1);
    }
    $p2 = substr($p2, strlen($p1)+1, strlen($p2)-strlen($p1));
    $res .= $p2;
    return $res;
  }

  function RecursiveMkdir($path)
  {
    // This function creates the specified directory using mkdir().  Note
    // that the recursive feature on mkdir() is broken with PHP 5.0.4 for
    // Windows, so I have to do the recursion myself.
    if (!file_exists($path))
    {
      // The directory doesn't exist.  Recurse, passing in the parent
      // directory so that it gets created.
      phpXChatTools::RecursiveMkdir(dirname($path));
      mkdir($path, 0777);
    }
  }

}

?>
{'fraction_non_alphanumeric': 0.16988636363636364, 'fraction_numerical': 0.029545454545454545, 'mean_word_length': 2.5009940357852884, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2200272', 'n_tokens_mistral': 651, 'n_tokens_neox': 629, 'n_words': 166}