<commit_before>{{ partial "header.html" . }}

{{ partial "top_menu.html" . }}

<script type="text/javascript">
    var checkField = function(field){
        var url = window.location.href;
        if(url.indexOf(field) != -1)
            return true;
        return false
    };

{{ range $qIndex, $q := (first 1 .Params.quarterlies) }}
    {{ $p := $.Site.GetPage "section" (print $q.path) }}

    var lessons = [
    {{ range $lIndex, $l := $p.Params.lessons }}
    {
        "start_date": '{{ $l.start_date}}',
        "end_date": '{{ $l.end_date}}',
        "path": '{{$l.path}}'
    },
    {{ end }}
{{ end }}

    ];

    if (!checkField("archive")){
        for(var i = 0; i < lessons.length; i++){

            var start_date = moment(lessons[i].start_date, "YYYY-MM-DD"),
                end_date = moment(lessons[i].end_date, "YYYY-MM-DD");

            if (moment().isBetween(start_date, end_date)){
                document.location = "{{.Site.BaseURL}}" + lessons[i].path + "/0" + moment().format("E");
            }
        }
    }
</script>

<main role="main">
    <div>
        <div class="container">
            <div class="py-5">
                <a href="javascript:history.back()">← {{ $.Param (print (substr $.Dir 0 2) ".back") }}</a>
            </div>
            <div class="row">
                {{ range $index, $element := .Params.quarterlies }}
                <div class="col-lg-4 col-md-5 col-sm-6 mb-md-5 col-xl-3">
                    <div class="m-auto ss-quarterlies-wrapper"><commit_msg>Fixing issue with determining today's lesson<commit_after>{{ partial "header.html" . }}

{{ partial "top_menu.html" . }}

<script type="text/javascript">
    var dow_mapping = {
        "1": "3",
        "2": "4",
        "3": "5",
        "4": "6",
        "5": "7",
        "6": "1",
        "7": "2"
    };
    var checkField = function(field){
        var url = window.location.href;
        if(url.indexOf(field) != -1)
            return true;
        return false
    };

{{ range $qIndex, $q := (first 1 .Params.quarterlies) }}
    {{ $p := $.Site.GetPage "section" (print $q.path) }}

    var lessons = [
    {{ range $lIndex, $l := $p.Params.lessons }}
    {
        "start_date": '{{ $l.start_date}}',
        "end_date": '{{ $l.end_date}}',
        "path": '{{$l.path}}'
    },
    {{ end }}
{{ end }}

    ];

    if (!checkField("archive")){
        for(var i = 0; i < lessons.length; i++){

            var start_date = moment(lessons[i].start_date, "YYYY-MM-DD"),
                end_date = moment(lessons[i].end_date, "YYYY-MM-DD");

            if (moment().isBetween(start_date, end_date, "hour", "[]")){
                document.location = "{{.Site.BaseURL}}" + lessons[i].path + "/0" + dow_mapping[moment().format("E")];
            }
        }
    }
</script>

<main role="main">
    <div>
        <div class="container">
            <div class="py-5">
                <a href="javascript:history.back()">← {{ $.Param (print (substr $.Dir 0 2) ".back") }}</a>
            </div>
            <div class="row">
                {{ range $index, $element := .Params.quarterlies }}
                <div class="col-lg-4 col-md-5 col-sm-6 mb-md-5 col-xl-3">
                    <div class="m-auto ss-quarterlies-wrapper">
{'fraction_non_alphanumeric': 0.2056476365868631, 'fraction_numerical': 0.011663597298956415, 'mean_word_length': 1.9176365264100268, 'pattern_counts': {'":': 13, '<': 29, '<?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': '2113493', 'n_tokens_mistral': 1133, 'n_tokens_neox': 1083, 'n_words': 223}