<commit_before># This file is part of the GOsa framework.
#
#  http://gosa-project.org
#
# Copyright:
#  (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.

import json


def dumps(obj, encoding='utf-8'):
    return json.dumps(obj, encoding=encoding, cls=PObjectEncoder)


def loads(json_string, encoding='utf-8'):
    return json.loads(json_string, encoding=encoding, object_hook=PObjectDecoder)


from gosa.common.components.jsonrpc_utils import PObjectEncoder, PObjectDecoder<commit_msg>python 3 compability<commit_after># This file is part of the GOsa framework.
#
#  http://gosa-project.org
#
# Copyright:
#  (C) 2016 GONICUS GmbH, Germany, http://www.gonicus.de
#
# See the LICENSE file in the project's top-level directory for details.

import json


def dumps(obj):
    return json.dumps(obj, cls=PObjectEncoder)


def loads(json_string):
    return json.loads(json_string, object_hook=PObjectDecoder)


from gosa.common.components.jsonrpc_utils import PObjectEncoder, PObjectDecoder
{'fraction_non_alphanumeric': 0.10664172123479888, 'fraction_numerical': 0.01028999064546305, 'mean_word_length': 5.045197740112994, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '4915094', 'n_tokens_mistral': 363, 'n_tokens_neox': 345, 'n_words': 95}