<commit_before><!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Is it Beer O'clock?</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css">
        <script src="js/vendor/modernizr-2.6.1.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
        <![endif]-->

        <!-- Add your site or application content here -->

        <div class="content">
            <div class="rules">
                <p>The rules are simple.</p>
                <ul>
                    <li>If its a weekday, Beer O'clock is after 5pm.</li>
                    <li>If its a weekend, Beer O'clock is after 12pm.</li>
                </ul>
            </div>
            <div id="togo">
            </div>
            <div class="share">

            </div>
        </div>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
        <script src="js/plugins.js"></script>
        <script src="js/main.js"></script>

        <!-- Google Analytics: change UA-XXXXX-X to be your site's ID. -->
        <script>
            var _gaq=[['_setAccount','UA-XXXXX-X'],['_trackPageview']];
            (function(d,t){var g=d.createElement(t),s=d.getElementsByTagName(t)[0];
            g.src=('https:'==location.protocol?'//ssl':'//www')+'.google-analytics.com/ga.js';
            s.parentNode.insertBefore(g,s)}(document,'script'));
        </script>

        <script>

            $(document).ready(function() {

            function roundVal(val, dec){
                var result = Math.round(val*Math.pow(10,dec))/Math.pow(10,dec);
                return result;
            }

            function getMinsToGo(togo) {
                val = roundVal(roundVal(togo-Math.floor(togo), 2)*60, 0);
                if (val == 0) {
                    return false;
                }
                return val;
            }

            function getHoursToGo(togo) {
                return Math.floor(togo*Math.pow(10,0))/Math.pow(10,0);
            }

            function updateTime() {

                var d = new Date();

                var day = d.getDay();
                var hour = d.getHours();

                var one_hour = 1000*60*60

                var weekday = false;
                // Is it a weekday?
                if (day > 0 && day < 6) {
                    weekday = true;
                }

                var message = '';

                // Clone Date and set some defaults.
                var targetDate = new Date(d);

                targetDate.setMinutes(00);
                targetDate.setSeconds(00);

                // If its a weekend, check its after 12.
                if (!weekday) {

                    targetDate.setHours(12);

                    togo = roundVal(parseFloat((targetDate.getTime()-d.getTime())/(one_hour)), 2);

                    mins_togo = getMinsToGo(togo);
                    hours_togo = getHoursToGo(togo);

                    hours_msg = '';
                    if (hours_togo) {
                        hours_msg = hours_togo + ' hrs ';
                        if (mins_togo) {
                            hours_msg += 'and ';
                        }
                    }

                    mins_msg = '';
                    if (mins_togo) {
                        mins_msg = mins_togo + 'mins';
                    }

                    if (hour > 11) {
                        message = 'It is after 12 and its a weekend. Its Already Beer\ O\'Clock!';
                        message2 = 'YES! Its Beer\ O\'Clock!';
                    }
                    else {
                        message = 'Its a weekend, but not after 12 yet. You only have ' + hours_msg + mins_msg + ' to wait.';
                        message2 = 'Only ' + hours_msg + mins_msg + ' until Beer\ O\'Clock!!';
                    }
                }
                else {

                    targetDate.setHours(17);
                    togo = roundVal(parseFloat((targetDate.getTime()-d.getTime())/(one_hour)), 2);

                    mins_togo = getMinsToGo(togo);
                    hours_togo = getHoursToGo(togo);

                    hours_msg = '';
                    if (hours_togo) {
                        hours_msg = hours_togo + ' hrs ';
                        if (mins_togo) {
                            hours_msg += 'and ';
                        }
                    }

                    mins_msg = '';
                    if (mins_togo) {
                        mins_msg = mins_togo + 'mins';
                    }

                    if (hour > 16) {
                        message = 'It is after 5PM. Its Already Beer\ O\'Clock!';
                        message2 = 'YES! Its Beer\ O\'Clock!';
                    }
                    else {
                        message = 'Not long to go. You only have ' + hours_msg + mins_msg + ' to wait.';
                        message2 = 'Only ' + hours_msg + mins_msg + ' until Beer\ O\'Clock!!';
                    }
                }

                $('#togo').text();
                $('#togo').text(message);

                $('.share').empty();
                $('.share').prepend('<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://christianbiggins.com/beeroclock" data-text="' +message2+ '" data-via="cbiggins" data-size="large">Tweet</a>');
                $.getScript("http://platform.twitter.com/widgets.js");

                $('.share').append('<a href="https://twitter.com/cbiggins" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @cbiggins</a>');

                window.setInterval(updateTime, 60000);
            }

            updateTime();
        });

        </script>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    </body>
</html>
<commit_msg>Adding analytics<commit_after><!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
    <head>
        <meta charset="utf-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <title>Is it Beer O'clock?</title>
        <meta name="description" content="">
        <meta name="viewport" content="width=device-width">

        <!-- Place favicon.ico and apple-touch-icon.png in the root directory -->

        <link rel="stylesheet" href="css/normalize.css">
        <link rel="stylesheet" href="css/main.css">
        <script src="js/vendor/modernizr-2.6.1.min.js"></script>
    </head>
    <body>
        <!--[if lt IE 7]>
            <p class="chromeframe">You are using an outdated browser. <a href="http://browsehappy.com/">Upgrade your browser today</a> or <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</a> to better experience this site.</p>
        <![endif]-->

        <!-- Add your site or application content here -->

        <div class="content">
            <div class="rules">
                <p>The rules are simple.</p>
                <ul>
                    <li>If its a weekday, Beer O'clock is after 5pm.</li>
                    <li>If its a weekend, Beer O'clock is after 12pm.</li>
                </ul>
            </div>
            <div id="togo">
            </div>
            <div class="share">

            </div>
        </div>

        <script src="//ajax.googleapis.com/ajax/libs/jquery/1.8.0/jquery.min.js"></script>
        <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.8.0.min.js"><\/script>')</script>
        <script src="js/plugins.js"></script>
        <script src="js/main.js"></script>

        <script type="text/javascript">
          var _gaq = _gaq || [];
          _gaq.push(['_setAccount', 'UA-2740110-14']);
          _gaq.push(['_trackPageview']);

          (function() {
            var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
            ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
            var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
          })();
       </script>

        <script>

            $(document).ready(function() {

            function roundVal(val, dec){
                var result = Math.round(val*Math.pow(10,dec))/Math.pow(10,dec);
                return result;
            }

            function getMinsToGo(togo) {
                val = roundVal(roundVal(togo-Math.floor(togo), 2)*60, 0);
                if (val == 0) {
                    return false;
                }
                return val;
            }

            function getHoursToGo(togo) {
                return Math.floor(togo*Math.pow(10,0))/Math.pow(10,0);
            }

            function updateTime() {

                var d = new Date();

                var day = d.getDay();
                var hour = d.getHours();

                var one_hour = 1000*60*60

                var weekday = false;
                // Is it a weekday?
                if (day > 0 && day < 6) {
                    weekday = true;
                }

                var message = '';

                // Clone Date and set some defaults.
                var targetDate = new Date(d);

                targetDate.setMinutes(00);
                targetDate.setSeconds(00);

                // If its a weekend, check its after 12.
                if (!weekday) {

                    targetDate.setHours(12);

                    togo = roundVal(parseFloat((targetDate.getTime()-d.getTime())/(one_hour)), 2);

                    mins_togo = getMinsToGo(togo);
                    hours_togo = getHoursToGo(togo);

                    hours_msg = '';
                    if (hours_togo) {
                        hours_msg = hours_togo + ' hrs ';
                        if (mins_togo) {
                            hours_msg += 'and ';
                        }
                    }

                    mins_msg = '';
                    if (mins_togo) {
                        mins_msg = mins_togo + 'mins';
                    }

                    if (hour > 11) {
                        message = 'It is after 12 and its a weekend. Its Already Beer\ O\'Clock!';
                        message2 = 'YES! Its Beer\ O\'Clock!';
                    }
                    else {
                        message = 'Its a weekend, but not after 12 yet. You only have ' + hours_msg + mins_msg + ' to wait.';
                        message2 = 'Only ' + hours_msg + mins_msg + ' until Beer\ O\'Clock!!';
                    }
                }
                else {

                    targetDate.setHours(17);
                    togo = roundVal(parseFloat((targetDate.getTime()-d.getTime())/(one_hour)), 2);

                    mins_togo = getMinsToGo(togo);
                    hours_togo = getHoursToGo(togo);

                    hours_msg = '';
                    if (hours_togo) {
                        hours_msg = hours_togo + ' hrs ';
                        if (mins_togo) {
                            hours_msg += 'and ';
                        }
                    }

                    mins_msg = '';
                    if (mins_togo) {
                        mins_msg = mins_togo + 'mins';
                    }

                    if (hour > 16) {
                        message = 'It is after 5PM. Its Already Beer\ O\'Clock!';
                        message2 = 'YES! Its Beer\ O\'Clock!';
                    }
                    else {
                        message = 'Not long to go. You only have ' + hours_msg + mins_msg + ' to wait.';
                        message2 = 'Only ' + hours_msg + mins_msg + ' until Beer\ O\'Clock!!';
                    }
                }

                $('#togo').text();
                $('#togo').text(message);

                $('.share').empty();
                $('.share').prepend('<a href="https://twitter.com/share" class="twitter-share-button" data-url="http://christianbiggins.com/beeroclock" data-text="' +message2+ '" data-via="cbiggins" data-size="large">Tweet</a>');
                $.getScript("http://platform.twitter.com/widgets.js");

                $('.share').append('<a href="https://twitter.com/cbiggins" class="twitter-follow-button" data-show-count="false" data-size="large">Follow @cbiggins</a>');

                window.setInterval(updateTime, 60000);
            }

            updateTime();
        });

        </script>
        <script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0];if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src="//platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
    </body>
</html>

{'fraction_non_alphanumeric': 0.15345449402446787, 'fraction_numerical': 0.012375362421328053, 'mean_word_length': 1.3748110831234257, 'pattern_counts': {'":': 0, '<': 158, '<?xml version=': 0, '>': 160, 'https://': 5, 'lorem ipsum': 0, 'www.': 4, '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': '281915', 'n_tokens_mistral': 4414, 'n_tokens_neox': 3965, 'n_words': 816}