<commit_before>import random

#!START local
from program import *
#!END local

def newComment(prog, x, y):
    # TODO make sure it's unique
    name = ''.join([random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(12)])
    c = Comment("Hello, world")
    c._pos = (x, y)
    prog.objects[name] = c

def newCount(prog, x, y):
    name = ''.join([random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(12)])
    b = Block("Count", 1, 1)
    b._pos = (x, y)
    prog.objects[name] = b 

class BlockTool:
    def __init__(self, name, i, o):
        self.name = name
        self.ins = i
        self.outs = o

    def __call__(self, prog, x, y):
        name = ''.join([random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(12)])
        b = Block(self.name, self.ins, self.outs)
        b._pos = (x, y)
        prog.objects[name] = b

tools = {
    "Cancel": None,
    "Comment": newComment,
}

def addBlockTool(name, i, o):
    tools[name] = BlockTool(name, i, o)

def addBlockTools(toolInfo):
    for info in toolInfo:
        addBlockTool(info[0], info[1], info[2])

addBlockTools([
    ("Count", 1, 1),
    ("Jets", 1, 1),
    ("Select", 2, 1),
    ("Test", 3, 3),
])<commit_msg>Removing 'test' tool<commit_after>import random

#!START local
from program import *
#!END local

def newComment(prog, x, y):
    # TODO make sure it's unique
    name = ''.join([random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(12)])
    c = Comment("Hello, world")
    c._pos = (x, y)
    prog.objects[name] = c

def newCount(prog, x, y):
    name = ''.join([random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(12)])
    b = Block("Count", 1, 1)
    b._pos = (x, y)
    prog.objects[name] = b 

class BlockTool:
    def __init__(self, name, i, o):
        self.name = name
        self.ins = i
        self.outs = o

    def __call__(self, prog, x, y):
        name = ''.join([random.choice('abcdefghijklmnopqrstuvwxyz') for i in range(12)])
        b = Block(self.name, self.ins, self.outs)
        b._pos = (x, y)
        prog.objects[name] = b

tools = {
    "Cancel": None,
    "Comment": newComment,
}

def addBlockTool(name, i, o):
    tools[name] = BlockTool(name, i, o)

def addBlockTools(toolInfo):
    for info in toolInfo:
        addBlockTool(info[0], info[1], info[2])

addBlockTools([
    ("Count", 1, 1),
    ("Jets", 1, 1),
    ("Select", 2, 1),
])
{'fraction_non_alphanumeric': 0.16701724863273032, 'fraction_numerical': 0.015145140933950358, 'mean_word_length': 2.8856209150326797, 'pattern_counts': {'":': 4, '<': 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': '447247', 'n_tokens_mistral': 947, 'n_tokens_neox': 892, 'n_words': 237}