<commit_before>"""librados Python ctypes wrapper
@author: <NAME> <<EMAIL>>
"""
from ctypes import CDLL, c_char_p, c_size_t, c_void_p, create_string_buffer, byref

class RadosError(Exception):
    pass

class ObjectNotFound(Exception):
    pass

class WriteError(Exception):
    pass

class IncompleteWriteError(Exception):
    pass
def object_deleted(method):
    def wrapper(self, *args, **kwargs):
        try:
            if self.deleted == False:
                return method(self, *args, **kwargs)
            else:
                raise ObjectNotFound("Object %s has been deleted" % self.oid)
        except:
            raise
    wrapper.__doc__ = method.__doc__
    wrapper.__name__ = method.__name__
    return wrapper

class Rados(object):
    """librados python wrapper"""
    def __init__(self, librados_path = '/usr/lib/librados.so.1.0.0'):
        self.librados = CDLL(librados_path)
        self.librados.rados_initialize(None)

    def de_initialize(self):
        self.librados.rados_deinitialize()

    def create_pool(self, pool_name):<commit_msg>Don't bother printing name of the object.<commit_after>"""librados Python ctypes wrapper
@author: <NAME> <<EMAIL>>
"""
from ctypes import CDLL, c_char_p, c_size_t, c_void_p, create_string_buffer, byref

class RadosError(Exception):
    pass

class ObjectNotFound(Exception):
    pass

class WriteError(Exception):
    pass

class IncompleteWriteError(Exception):
    pass

def object_deleted(method):
    def wrapper(self, *args, **kwargs):
        try:
            if self.deleted == False:
                return method(self, *args, **kwargs)
            else:
                raise ObjectNotFound("Object has been deleted")
        except:
            raise
    wrapper.__doc__ = method.__doc__
    wrapper.__name__ = method.__name__
    return wrapper

class Rados(object):
    """librados python wrapper"""
    def __init__(self, librados_path = '/usr/lib/librados.so.1.0.0'):
        self.librados = CDLL(librados_path)
        self.librados.rados_initialize(None)

    def de_initialize(self):
        self.librados.rados_deinitialize()

    def create_pool(self, pool_name):
{'fraction_non_alphanumeric': 0.10563052582596556, 'fraction_numerical': 0.002791996277338297, 'mean_word_length': 3.048964218455744, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '7609197', 'n_tokens_mistral': 667, 'n_tokens_neox': 659, 'n_words': 155}