<commit_before>
def register(nodenet, node=None, **params):
    for type, gate in node.gates.items():
        gate.gate_function(node.get_slot("gen").activation)

def sensor(nodenet, node=None, datasource=None, **params):
    node.gates["gen"].gate_function(nodenet.world.get_datasource(nodenet.uid, datasource))

def actor(nodenet, node=None, datatarget=None, **params):
    node.nodenet.world.set_datatarget(nodenet.uid, datatarget, node.get_slot("gen").activation)
    node.activation = node.get_slot("gen").activation

def concept(nodenet, node=None, **params):
    for type, gate in node.gates.items():
        gate.gate_function(node.get_slot("gen").activation)

def pipe(nodenet, node=None, **params):
    gen = 0.0
    por = 0.0
    ret = 0.0
    sub = 0.0
    sur = 0.0

    gen += node.get_slot("sur").voted_activation
    if gen < 0: gen = 0
    if gen > 1: gen = 1

    sub += node.get_slot("gen").activation
    sub += node.get_slot("sub").activation
    sub += node.get_slot("por").activation
    if sub == 0: sub = -1
    if sub > 1: sub = 1

    sur += node.get_slot("sur").voted_activation
    if sur < 0: sur = 0

    por += node.get_slot("sur").voted_activation * \
           node.get_slot("sub").activation
    por += node.get_slot("por").activation * \
           (1+node.get_slot("ret").activation)
    if por < 1: por = -1<commit_msg>forced sub inhibition not necessary.<commit_after>
def register(nodenet, node=None, **params):
    for type, gate in node.gates.items():
        gate.gate_function(node.get_slot("gen").activation)

def sensor(nodenet, node=None, datasource=None, **params):
    node.gates["gen"].gate_function(nodenet.world.get_datasource(nodenet.uid, datasource))

def actor(nodenet, node=None, datatarget=None, **params):
    node.nodenet.world.set_datatarget(nodenet.uid, datatarget, node.get_slot("gen").activation)
    node.activation = node.get_slot("gen").activation

def concept(nodenet, node=None, **params):
    for type, gate in node.gates.items():
        gate.gate_function(node.get_slot("gen").activation)

def pipe(nodenet, node=None, **params):
    gen = 0.0
    por = 0.0
    ret = 0.0
    sub = 0.0
    sur = 0.0

    gen += node.get_slot("sur").voted_activation
    if gen < 0: gen = 0
    if gen > 1: gen = 1

    sub += node.get_slot("gen").activation
    sub += node.get_slot("sub").activation
    sub += node.get_slot("por").activation
    #if sub == 0: sub = -1
    if sub > 1: sub = 1

    sur += node.get_slot("sur").voted_activation
    if sur < 0: sur = 0

    por += node.get_slot("sur").voted_activation * \
           node.get_slot("sub").activation
    por += node.get_slot("por").activation * \
           (1+node.get_slot("ret").activation)
    if por < 1: por = -1
{'fraction_non_alphanumeric': 0.16058394160583941, 'fraction_numerical': 0.016788321167883213, 'mean_word_length': 3.309748427672956, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '4137450', 'n_tokens_mistral': 1025, 'n_tokens_neox': 951, 'n_words': 199}