<commit_before>#!/usr/bin/python
# -- Content-Encoding: utf-8 --
"""
Provides functions for reading and writing (writing is WIP currently) Java
objects serialized or will be deserialized by ObjectOutputStream. This form of
object representation is a standard data interchange format in Java world.

javaobj module exposes an API familiar to users of the standard library
marshal, pickle and json modules.

See:
http://download.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html

:authors: <NAME>, <NAME>
:license: Apache License 2.0
:version: 0.3.0
:status: Alpha

..

    Copyright 2019 <NAME>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

# Standard library
import collections
import logging
import os
import struct
import sys

from javaobj.modifiedutf8 import decode_modified_utf8
from javaobj.utils import (
    log_debug,
    log_error,
    read_to_str,
    to_bytes,
    to_str,
    to_unicode,
    UNICODE_TYPE,
)

try:
    # Python 2
    from StringIO import StringIO as BytesIO
except ImportError:
    # Python 3+
    from io import BytesIO

# ------------------------------------------------------------------------------

__all__ = (
    "__version_info__",
    "__version__",
    "DefaultObjectTransformer",
    "JavaArray",
    "JavaByteArray",
    "JavaClass",
    "JavaEnum",
    "JavaObject",
    "JavaObjectConstants",
    "JavaObjectMarshaller",
    "JavaObjectUnmarshaller",
    "JavaString",
    "OpCodeDebug",
    "decode_modified_utf8",
    "dumps",
    "load",
    "loads",
    "log_debug",
    "log_error",
    "read_to_str",
    "to_bytes",
    "to_str",
)

# Module version
__version_info__ = (0, 3, 0)
__version__ = ".".join(str(x) for x in __version_info__)<commit_msg>Added to_unicode to __all__<commit_after>#!/usr/bin/python
# -- Content-Encoding: utf-8 --
"""
Provides functions for reading and writing (writing is WIP currently) Java
objects serialized or will be deserialized by ObjectOutputStream. This form of
object representation is a standard data interchange format in Java world.

javaobj module exposes an API familiar to users of the standard library
marshal, pickle and json modules.

See:
http://download.oracle.com/javase/6/docs/platform/serialization/spec/protocol.html

:authors: <NAME>, <NAME>
:license: Apache License 2.0
:version: 0.3.0
:status: Alpha

..

    Copyright 2019 <NAME>

    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at

        http://www.apache.org/licenses/LICENSE-2.0

    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
"""

# Standard library
import collections
import logging
import os
import struct
import sys

from javaobj.modifiedutf8 import decode_modified_utf8
from javaobj.utils import (
    log_debug,
    log_error,
    read_to_str,
    to_bytes,
    to_str,
    to_unicode,
    UNICODE_TYPE,
)

try:
    # Python 2
    from StringIO import StringIO as BytesIO
except ImportError:
    # Python 3+
    from io import BytesIO

# ------------------------------------------------------------------------------

__all__ = (
    "__version_info__",
    "__version__",
    "DefaultObjectTransformer",
    "JavaArray",
    "JavaByteArray",
    "JavaClass",
    "JavaEnum",
    "JavaObject",
    "JavaObjectConstants",
    "JavaObjectMarshaller",
    "JavaObjectUnmarshaller",
    "JavaString",
    "OpCodeDebug",
    "decode_modified_utf8",
    "dumps",
    "load",
    "loads",
    "log_debug",
    "log_error",
    "read_to_str",
    "to_bytes",
    "to_str",
    "to_unicode",
)

# Module version
__version_info__ = (0, 3, 0)
__version__ = ".".join(str(x) for x in __version_info__)
{'fraction_non_alphanumeric': 0.11894175188972878, 'fraction_numerical': 0.010226767452200978, 'mean_word_length': 3.013380909901873, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '713961', 'n_tokens_mistral': 1333, 'n_tokens_neox': 1298, 'n_words': 453}