<commit_before>import h2o, h2o_cmd, h2o_jobs
import time, re, getpass
import os

# hdfs/maprfs/s3/s3n paths should be absolute from the bucket (top level)
# so only walk around for local
def find_folder_path_and_pattern(bucket, pathWithRegex):
    # strip the common mistake of leading "/" in path, if bucket is specified too
    if bucket is not None and re.match("/", pathWithRegex):
        h2o.verboseprint("You said bucket:", bucket, "so stripping incorrect leading '/' from", pathWithRegex)
        pathWithRegex = pathWithRegex.lstrip('/')

    if bucket is None:  # good for absolute path name
        bucketPath = ""<commit_msg>get rid of unnecessary package imports<commit_after>import h2o, re, os

# hdfs/maprfs/s3/s3n paths should be absolute from the bucket (top level)
# so only walk around for local
def find_folder_path_and_pattern(bucket, pathWithRegex):
    # strip the common mistake of leading "/" in path, if bucket is specified too
    if bucket is not None and re.match("/", pathWithRegex):
        h2o.verboseprint("You said bucket:", bucket, "so stripping incorrect leading '/' from", pathWithRegex)
        pathWithRegex = pathWithRegex.lstrip('/')

    if bucket is None:  # good for absolute path name
        bucketPath = ""
{'fraction_non_alphanumeric': 0.0893854748603352, 'fraction_numerical': 0.007980845969672785, 'mean_word_length': 3.86046511627907, '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': '1601718', 'n_tokens_mistral': 366, 'n_tokens_neox': 360, 'n_words': 143}