<commit_before>import fileinput
import mido


def main(argv=None):
    try:
        output = mido.open_output('Ableton Push User Port')
    except IOError:
        output = mido.open_output('Ableton Push MIDI 2')

    for outline, line in enumerate(fileinput.input()):
        outline = outline % 4

        line = line.strip().ljust(68)
        line = (line[:66] + '..') if len(line) > 68 else line
        data = [71, 127, 21, 24+outline, 0, 69, 0] + map(ord, line)

        output.send(
            mido.Message('sysex', data=data)
        )<commit_msg>do not print empty lines on push<commit_after>import fileinput
import mido


def main(argv=None):
    try:
        output = mido.open_output('Ableton Push User Port')
    except IOError:
        output = mido.open_output('Ableton Push MIDI 2')

    for outline, line in enumerate(fileinput.input()):
        outline = outline % 4

        if len(line.strip()):
            line = line[:-1].ljust(68)
            line = (line[:66] + '..') if len(line) > 68 else line
            data = [71, 127, 21, 24+outline, 0, 69, 0] + map(ord, line)

            output.send(
                mido.Message('sysex', data=data)
            )
{'fraction_non_alphanumeric': 0.13282571912013535, 'fraction_numerical': 0.03637901861252115, 'mean_word_length': 2.23224043715847, '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': '6368045', 'n_tokens_mistral': 427, 'n_tokens_neox': 378, 'n_words': 106}