<commit_before>import requests as req
from datetime import datetime as dt
from time import strftime, strptime
import sys
from re import match

def validate_time(t):
    regex = r'^([0-9]{1,2}:?[0-9]{2}|[0-9]{1,2})$'
    if not match(regex, t):
        return False

    time_data = t.split(':')
    hrs = time_data[0]
    mins = '0' if len(time_data) < 2 else time_data[1]

    # api will error if minute value is single digit
    return hrs, mins.zfill(2)


<commit_msg>Fix wm script<commit_after>import requests as req
from datetime import datetime as dt
from time import strftime, strptime
import sys
from re import match

def validate_time(t):
    regex = r'^([0-9]{1,2}:?[0-9]{2}|[0-9]{1,2})$'
    if not match(regex, t):
        return False

    time_data = t.split(':')
    hrs = time_data[0]
    mins = '0' if len(time_data) < 2 else time_data[1]

    if ':' in t:
        return t.split(':')
    else:
        if len(t) in (1, 2):
            hrs, mins = t, 0
        elif len(t) == 3:
            hrs, mins = t[0], t[1:]
        else:
            hrs, mins = t[:2], t[2:]

    # api will error if minute value is single digit
    return hrs, mins.zfill(2)



{'fraction_non_alphanumeric': 0.14114627887082976, 'fraction_numerical': 0.03421727972626176, 'mean_word_length': 2.6, 'pattern_counts': {'":': 0, '<': 5, '<?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': '387922', 'n_tokens_mistral': 449, 'n_tokens_neox': 422, 'n_words': 137}