<commit_before>import __orange__
__pool = {}

class Text():
    
    id = None
    x = None
    y = None
    z = None
    tcolor = None
    ocolor = None
    size = None
    
    _ehandlers = {}
    
    def __init__(self, id, text, x, y, z, tcolor = 0xFFFFFFFF, ocolor = 0xFFFFFFFF, size = 20):
        self.id = id
        self.x = x
        self.y = y
        self.z = z
        self.tcolor = tcolor
        self.ocolor = ocolor
        self.size = size
    
    def delete(self):
        __orange__.Delete3DText(self.id)
        del __pool[self.id]
        
    def getID(self):
        return self.id
    
    def getPosition(self):
        return (self.x, self.y, self.z)
    
    def getColors(self):
        return (self.tcolor, self.ocolor)
    
    def getSize(self):
        return self.size
    
    def getText(self):
        return self.text
    
def create(text, x, y, z, tcolor = 0xFFFFFFFF, ocolor = 0xFFFFFFFF, size = 20):
    global __pool
    
    text = Text(__orange__.Create3DTextForAll(text, x, y, z, tcolor, ocolor, size), text, x, y, z, tcolor, ocolor, size)
    __pool[text.id] = text
    return text
    
def getByID(id):
    global __pool
    
    if isinstance(id, int):
        if id in __pool.keys():
            return __pool[id]
        return False
    else:
        raise TypeError('3DText ID must be an integer')

def getAll():
    return __pool<commit_msg>text lib: fixed deletion & added deleteByID function<commit_after>import __orange__
__pool = {}

class Text():
    
    id = None
    x = None
    y = None
    z = None
    tcolor = None
    ocolor = None
    size = None
    
    _ehandlers = {}
    
    def __init__(self, id, text, x, y, z, tcolor = 0xFFFFFFFF, ocolor = 0xFFFFFFFF, size = 20):
        self.id = id
        self.x = x
        self.y = y
        self.z = z
        self.tcolor = tcolor
        self.ocolor = ocolor
        self.size = size
    
    def delete(self):
        deleteByID(self.id)
        
    def getID(self):
        return self.id
    
    def getPosition(self):
        return (self.x, self.y, self.z)
    
    def getColors(self):
        return (self.tcolor, self.ocolor)
    
    def getSize(self):
        return self.size
    
    def getText(self):
        return self.text
    
def create(text, x, y, z, tcolor = 0xFFFFFFFF, ocolor = 0xFFFFFFFF, size = 20):
    global __pool
    
    text = Text(__orange__.Create3DTextForAll(text, x, y, z, tcolor, ocolor, size), text, x, y, z, tcolor, ocolor, size)
    __pool[text.id] = text
    return text

def deleteByID(id):
    global __pool
    
    if isinstance(id, int):
        if id in __pool.keys():
            del __pool[id]
            return __orange__.Delete3DText(id)
        else:
            return False
    else:
        raise TypeError('3DText ID must be an integer')
        
def getByID(id):
    global __pool
    
    if isinstance(id, int):
        if id in __pool.keys():
            return __pool[id]
        return False
    else:
        raise TypeError('3DText ID must be an integer')

def getAll():
    return __pool
{'fraction_non_alphanumeric': 0.09957696062479661, 'fraction_numerical': 0.007484542792059876, 'mean_word_length': 1.8253676470588236, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 8, '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': '6896450', 'n_tokens_mistral': 1055, 'n_tokens_neox': 1025, 'n_words': 297}