<commit_before># example inspired from http://tour.golang.org/#64

from offset import makechan, go, maintask, run

from offset.core.kernel import kernel
from offset.core import proc

def sum(a, c):
    s = 0
    for v in a:
        s += v
    c.send(s)

@maintask
def main():
    a = [7, 2, 8, -9, 4, 0]

    c = makechan()
    go(sum, a[:int(len(a)/2)], c)
    go(sum, a[int(len(a)/2):], c)
    x, y = c.recv(), c.recv()

    print(x, y, x+y)
<commit_msg>useless code<commit_after># example inspired from http://tour.golang.org/#64

from offset import makechan, go, maintask, run

def sum(a, c):
    s = 0
    for v in a:
        s += v
    c.send(s)

@maintask
def main():
    a = [7, 2, 8, -9, 4, 0]

    c = makechan()
    go(sum, a[:int(len(a)/2)], c)
    go(sum, a[int(len(a)/2):], c)
    x, y = c.recv(), c.recv()

    print(x, y, x+y)

{'fraction_non_alphanumeric': 0.19098457888493475, 'fraction_numerical': 0.02609727164887307, 'mean_word_length': 2.487603305785124, 'pattern_counts': {'":': 0, '<': 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': '1171390', 'n_tokens_mistral': 380, 'n_tokens_neox': 353, 'n_words': 107}