<commit_before># coding: utf8
from logging import getLogger
from uuid import uuid4


log = getLogger("pygrim.session.session_storage")


class SessionStorage(object):

    def __init__(self, config):
        self._config = config
        self._cookie = {
            str(k): getattr(self._config, "get" + t)(
                "session:cookie:" + k, default
            )
            for k, default, t
            in (
                ("name", "SESS_ID", ""),
                ("lifetime", 3600 * 24 * 7, "int"),
                ("domain", "", ""),
                ("path", "/", ""),
                ("http_only", False, "bool"),
                ("secure", False, "bool"),
                ("same_site", "Lax", "")
            )<commit_msg>Default session lifetime is 3months<commit_after># coding: utf8
from logging import getLogger
from uuid import uuid4


log = getLogger("pygrim.session.session_storage")


class SessionStorage(object):

    def __init__(self, config):
        self._config = config
        self._cookie = {
            str(k): getattr(self._config, "get" + t)(
                "session:cookie:" + k, default
            )
            for k, default, t
            in (
                ("name", "SESS_ID", ""),
                ("lifetime", 3600 * 24 * 92, "int"),  # 92 = 3 měsíce
                ("domain", "", ""),
                ("path", "/", ""),
                ("http_only", False, "bool"),
                ("secure", False, "bool"),
                ("same_site", "Lax", "")
            )
{'fraction_non_alphanumeric': 0.15873015873015872, 'fraction_numerical': 0.01521164021164021, 'mean_word_length': 1.604130808950086, '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': '2484401', 'n_tokens_mistral': 459, 'n_tokens_neox': 422, 'n_words': 107}