<commit_before>var Clock = (function() {
    var display = document.getElementById('timedisplay'),
        hourDisplay = document.getElementById('hour'),
        minuteDisplay = document.getElementById('minute'),
        secondDisplay = document.getElementById('second'),
        initTime = new Date(),
        initHour = initTime.getHours(),
        initMinute = initTime.getMinutes(),
        alarmTriggered = false;
    var checkMinute = function(min) {
        if (initMinute < min) {
            console.log('hello new minute', min);
            responsiveVoice.speak('The time is now ' + initHour + ':' + min);
            initMinute = min;
        }
    };
    var checkAlarm = function(hr, min) {
        if (alarmTriggered) {
            if (min > 51) {
                checkMinute(min);
            }
            console.log('nope', alarmTriggered);
            console.log(hr, min);
        } else {
            console.log('yep', alarmTriggered);
            console.log(hr, min);
            if (hr === 21 && min === 51) {
                alarmTriggered = true;
                responsiveVoice.speak('Good morning. Time to wake up. The time is now ' + initHour + ':' + min);
                console.log('Good morning');
            }
        }<commit_msg>Add alarm variable.<commit_after>var Clock = (function() {
    var display = document.getElementById('timedisplay'),
        hourDisplay = document.getElementById('hour'),
        minuteDisplay = document.getElementById('minute'),
        secondDisplay = document.getElementById('second'),
        initTime = new Date(),
        initHour = initTime.getHours(),
        initMinute = initTime.getMinutes(),
        alarmTriggered = false,
        alarm = {
            hr: 20,
            min: 56
        };
    var checkMinute = function(min) {
        if (initMinute < min) {
            console.log('hello new minute', min);
            responsiveVoice.speak('The time is now ' + initHour + ':' + min);
            initMinute = min;
        }
    };
    var checkAlarm = function(hr, min) {
        if (alarmTriggered) {
            if (min > alarm.min) {
                checkMinute(min);
            }
            // console.log('nope', alarmTriggered);
            // console.log(hr, min);
        } else {
            console.log('yep', alarmTriggered);
            console.log(hr, min);
            if (hr === alarm.hr && min === alarm.min) {
                alarmTriggered = true;
                responsiveVoice.speak('Good morning. Time to wake up. The time is now ' + initHour + ':' + min);
                console.log('Good morning');
            }
        }
{'fraction_non_alphanumeric': 0.12779673871824043, 'fraction_numerical': 0.0037921880925293893, 'mean_word_length': 1.779768177028451, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1594857', 'n_tokens_mistral': 734, 'n_tokens_neox': 719, 'n_words': 165}