<commit_before># coding: utf-8

from ._cffi import C, ffi, new_uint64_pointer, \
                           new_int64_pointer, \
                           new_int_pointer, \
                           new_binary_data, \
                           value_uint64_pointer, \
                           value_int64_pointer, \
                           value_int_pointer, \
                           value_binary_data, \
                           zmq_major_version, \
                           IPC_PATH_MAX_LEN, \
                           strerror

from .message import Frame
from .constants import *

import zmq
from zmq.error import ZMQError

import random
import codecs

import errno as errno_mod

def new_pointer_from_opt(option, length=0):
    if option in uint64_opts:
        return new_uint64_pointer()
    elif option in int64_opts:
        return new_int64_pointer()
    elif option in int_opts:
        return new_int_pointer()
    elif option in binary_opts:
        return new_binary_data(length)
    else:
        raise ValueError('Invalid option')

def value_from_opt_pointer(option, opt_pointer, length=0):
    if option in uint64_opts:
        return int(opt_pointer[0])
    elif option in int64_opts:
        return int(opt_pointer[0])
    elif option in int_opts:
        return int(opt_pointer[0])
    elif option in binary_opts:
        return ffi.buffer(opt_pointer, length)[:]
    else:
        raise ValueError('Invalid option')

def initialize_opt_pointer(option, value, length=0):
    if option in uint64_opts:
        return value_uint64_pointer(value)
    elif option in int64_opts:
        return value_int64_pointer(value)
    elif option in int_opts:
        return value_int_pointer(value)
    elif option in binary_opts:
        return value_binary_data(value, length)
    else:
        raise ValueError('Invalid option')


class Socket(object):
    context = None
    socket_type = None
    zmq_socket = None
    _closed = None
    n = None
    rcvmore = None

    def __init__(self, context, sock_type):<commit_msg>import constants groups from zmq.sugar<commit_after># coding: utf-8

from ._cffi import C, ffi, new_uint64_pointer, \
                           new_int64_pointer, \
                           new_int_pointer, \
                           new_binary_data, \
                           value_uint64_pointer, \
                           value_int64_pointer, \
                           value_int_pointer, \
                           value_binary_data, \
                           zmq_major_version, \
                           IPC_PATH_MAX_LEN, \
                           strerror


from .message import Frame
from .constants import *

import zmq
from zmq.error import ZMQError

import random
import codecs

import errno as errno_mod


def new_pointer_from_opt(option, length=0):
    from zmq.sugar.constants import int_sockopts,   \
                                    int64_sockopts, \
                                    bytes_sockopts
    if option in int64_sockopts:
        return new_int64_pointer()
    elif option in int_sockopts:
        return new_int_pointer()
    elif option in bytes_sockopts:
        return new_binary_data(length)
    else:
        raise ValueError('Invalid option')

def value_from_opt_pointer(option, opt_pointer, length=0):
    from zmq.sugar.constants import int_sockopts,   \
                                    int64_sockopts, \
                                    bytes_sockopts
    if option in int64_sockopts:
        return int(opt_pointer[0])
    elif option in int_sockopts:
        return int(opt_pointer[0])
    elif option in bytes_sockopts:
        return ffi.buffer(opt_pointer, length)[:]
    else:
        raise ValueError('Invalid option')

def initialize_opt_pointer(option, value, length=0):
    from zmq.sugar.constants import int_sockopts,   \
                                    int64_sockopts, \
                                    bytes_sockopts
    if option in int64_sockopts:
        return value_int64_pointer(value)
    elif option in int_sockopts:
        return value_int_pointer(value)
    elif option in bytes_sockopts:
        return value_binary_data(value, length)
    else:
        raise ValueError('Invalid option')


class Socket(object):
    context = None
    socket_type = None
    zmq_socket = None
    _closed = None
    n = None
    rcvmore = None

    def __init__(self, context, sock_type):
{'fraction_non_alphanumeric': 0.059155565590426736, 'fraction_numerical': 0.014675999096861594, 'mean_word_length': 1.8109137055837563, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3065832', 'n_tokens_mistral': 1272, 'n_tokens_neox': 1236, 'n_words': 313}