<commit_before>from __future__ import unicode_literals

import re
from copy import deepcopy
from nameparser import HumanName

URL_REGEX = re.compile(ur'(https?://\S*\/\S*)')


def updated_schema(old, new):
    d = deepcopy(old)
    for key, value in new.items():
        if isinstance(value, dict) and old.get(key) and isinstance(old[key], dict):
            d[key] = updated_schema(old[key], new[key])
        else:
            d[key] = value
    return d

<commit_msg>Updated regex to include more urls<commit_after>from __future__ import unicode_literals

import re
from copy import deepcopy
from nameparser import HumanName

URL_REGEX = re.compile(ur'(https?://\S*\.\S*)')


def updated_schema(old, new):
    d = deepcopy(old)
    for key, value in new.items():
        if isinstance(value, dict) and old.get(key) and isinstance(old[key], dict):
            d[key] = updated_schema(old[key], new[key])
        else:
            d[key] = value
    return d


{'fraction_non_alphanumeric': 0.12278876170655567, 'fraction_numerical': 0.0, 'mean_word_length': 3.1826086956521737, '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': '6502337', 'n_tokens_mistral': 311, 'n_tokens_neox': 305, 'n_words': 89}