<commit_before>from __future__ import absolute_import, division, print_function, unicode_literals

from smarkets.streaming_api import seto
from smarkets.string import camel_case_to_underscores

__all__ = ('int_to_uuid128', 'set_payload_message',)


def set_payload_message(payload, message):
    underscore_form = camel_case_to_underscores(type(message).__name__)
    payload_type = getattr(seto, 'PAYLOAD_' + underscore_form.upper())
    payload.type = payload_type
    getattr(payload, underscore_form).CopyFrom(message)


def int_to_uuid128(value):
    return seto.Uuid128(low=value)<commit_msg>Deprecate int_to_uuid128<commit_after>from __future__ import absolute_import, division, print_function, unicode_literals

from smarkets.functools import deprecated_with_message
from smarkets.streaming_api import seto
from smarkets.string import camel_case_to_underscores

__all__ = ('int_to_uuid128', 'set_payload_message',)


def set_payload_message(payload, message):
    underscore_form = camel_case_to_underscores(type(message).__name__)
    payload_type = getattr(seto, 'PAYLOAD_' + underscore_form.upper())
    payload.type = payload_type
    getattr(payload, underscore_form).CopyFrom(message)


@deprecated_with_message('Using SETO UUID128 fields is deprecated now')
def int_to_uuid128(value):
    return seto.Uuid128(low=value)
{'fraction_non_alphanumeric': 0.08245877061469266, 'fraction_numerical': 0.017991004497751123, 'mean_word_length': 7.449367088607595, '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': '6415404', 'n_tokens_mistral': 465, 'n_tokens_neox': 428, 'n_words': 81}