<commit_before>import collections


class Settings(object):
    def __init__(self):
        self._settings = collections.OrderedDict()

    def __setattr__(self, name, value):
        if name.startswith('_'):
            super(Settings, self).__setattr__(name, value)
        else:
            self._settings[name] = value

    def __str__(self):
        lines = []
        for name, value in self._settings.iteritems():<commit_msg>Insert customizable docstring at the beginning of settings file<commit_after>import collections
import datetime


class Settings(object):
    docstring = 'Settings built with Pirx on %(datetime)s'

    def __init__(self):
        self._settings = collections.OrderedDict()
        docstring = self.docstring % {
            'datetime': datetime.datetime.now()
            }
        self._set_raw_value('"""%s"""' % docstring)

    def __setattr__(self, name, value):
        if name.startswith('_'):
            super(Settings, self).__setattr__(name, value)
        else:
            self._settings[name] = value

    def __str__(self):
        lines = []
        for name, value in self._settings.iteritems():
{'fraction_non_alphanumeric': 0.11286089238845144, 'fraction_numerical': 0.0, 'mean_word_length': 2.6317460317460317, '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': '2072261', 'n_tokens_mistral': 319, 'n_tokens_neox': 312, 'n_words': 78}