<commit_before>import collections
import ctypes
import weakref

from cupy.cuda import device
from cupy.cuda import driver
from cupy.cuda import runtime


class Memory(object):

    def __init__(self, size):
        if size > 0:
            self.ptr = runtime.malloc(size)
        else:
            self.ptr = ctypes.c_void_p()
        self.size = size

    def __del__(self):
        runtime.free(self.ptr)

    def __int__(self):
        return self.ptr.value


class MemoryPointer(object):<commit_msg>Fix memory<commit_after>import collections
import ctypes
import weakref

from cupy.cuda import device
from cupy.cuda import driver
from cupy.cuda import runtime


class Memory(object):

    def __init__(self, size):
        if size > 0:
            self.ptr = runtime.malloc(size)
        else:
            self.ptr = ctypes.c_void_p()
        self.size = size

    def __del__(self):
        runtime.free(self.ptr)

    def __int__(self):
        return self.ptr.value or 0


class MemoryPointer(object):
{'fraction_non_alphanumeric': 0.08531746031746032, 'fraction_numerical': 0.002976190476190476, 'mean_word_length': 2.527972027972028, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '6112069', 'n_tokens_mistral': 317, 'n_tokens_neox': 303, 'n_words': 86}