<commit_before>from requests.auth import HTTPDigestAuth
from os import makedirs
from os.path import expanduser, exists, join
import requests
import json
class BadRequest(Exception): pass
class Change(object):
    def __init__(self, json):
        self.fields = dict(json)

    def shorten_string(self, s, l=15, reverse=False):
        cut = "..."
        l = l - len(cut)
        if len(s) > l:
            if reverse:
                return cut + s[len(s) - l:]
            else:
                return s[:l] + cut
        else:
            return s

    def __getattr__(self, name):
        if name in self.fields:
            return self.fields[name]<commit_msg>URL can be 45 chars wide<commit_after>from requests.auth import HTTPDigestAuth
from os import makedirs
from os.path import expanduser, exists, join
import requests
import json
class BadRequest(Exception): pass
class Change(object):
    def __init__(self, json):
        self.fields = dict(json)

    def shorten_string(self, s, l=45, reverse=False):
        cut = "..."
        l = l - len(cut)
        if len(s) > l:
            if reverse:
                return cut + s[len(s) - l:]
            else:
                return s[:l] + cut
        else:
            return s

    def __getattr__(self, name):
        if name in self.fields:
            return self.fields[name]
{'fraction_non_alphanumeric': 0.09843400447427293, 'fraction_numerical': 0.0044742729306487695, 'mean_word_length': 1.9822222222222223, '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': '6588144', 'n_tokens_mistral': 402, 'n_tokens_neox': 388, 'n_words': 128}