<commit_before>#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <setjmp.h>
#include "Animation.h"
#include "SlimArray.h"

#include "BlinkAnimation.h"
#include "AlternateAnimation.h"

unsigned int TOTAL_LEDS = 14;
SlimArray<Animation*> animations;

void setup() {                
    for (int led = 0 ; led < TOTAL_LEDS ; led++) {
        pinMode(led, OUTPUT);     
    }
    animations.insert((new BlinkAnimation())->setTotalLeds(TOTAL_LEDS)->setRepetitions(2));
    animations.insert((new AlternateAnimation())->setTotalLeds(TOTAL_LEDS)->setRepetitions(4));
}

void loop() {
    for (int i = 0 ; i < animations.getSize() ; i++) {
        animations.get(i)->animate();
    }
}<commit_msg>Cleanup leds before each animation<commit_after>#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <setjmp.h>
#include "Animation.h"
#include "SlimArray.h"

#include "BlinkAnimation.h"
#include "AlternateAnimation.h"

unsigned int TOTAL_LEDS = 14;
SlimArray<Animation*> animations;

void setup() {                
    for (int led = 0 ; led < TOTAL_LEDS ; led++) {
        pinMode(led, OUTPUT);     
    }
    animations.insert((new BlinkAnimation())->setTotalLeds(TOTAL_LEDS)->setRepetitions(2));
    animations.insert((new AlternateAnimation())->setTotalLeds(TOTAL_LEDS)->setRepetitions(4));
}

void cleanup() {
    for (int led = 0 ; led < TOTAL_LEDS ; led++) {
        digitalWrite(led, LOW);
    }
}

void loop() {
    for (int i = 0 ; i < animations.getSize() ; i++) {
        cleanup();
        animations.get(i)->animate();
    }
}
{'fraction_non_alphanumeric': 0.1635258358662614, 'fraction_numerical': 0.007902735562310031, 'mean_word_length': 3.6761363636363638, 'pattern_counts': {'":': 0, '<': 22, '<?xml version=': 0, '>': 27, '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': '5744369', 'n_tokens_mistral': 618, 'n_tokens_neox': 586, 'n_words': 118}