<commit_before><html>

<head>

<style>

.annotation_table {
color: #000000;
font-family: monospace;
margin: 5px;
}

.object_tag {
color: #cc3300;
font-weight: bold;
}

.lifted_tag {
color: #0033cc;
font-weight: bold;
}

.llvm_code {
color: grey;
font-style: italic;
}

.metadata {
border-bottom: medium solid black;
display: inline-block;
padding: 5px;
}

.annotations {
padding: 5px;
}

.hidden {
display: none;
}

.buttons {
padding: 10px;
cursor: pointer;
}

</style>

<script type="text/javascript">

window.onload = function() {

%for func_id, func_key in enumerate(func_data):

document.getElementById('func{{func_id}}_toggle_llvm').onclick = function() {
    if (this.innerHTML == 'show llvm') {
        var llvm_lines = document.getElementsByClassName('func{{func_id}}_llvm');
        for (var i = 0; i < llvm_lines.length; i++) {
            llvm_lines[i].setAttribute('class', 'llvm_code func{{func_id}}_llvm');
        }
        this.innerHTML = 'hide llvm'
    }
    else {
        var llvm_lines = document.getElementsByClassName('func{{func_id}}_llvm');
        for (var i = 0; i < llvm_lines.length; i++) {
            llvm_lines[i].setAttribute('class', 'llvm_code func{{func_id}}_llvm hidden');
        }
        this.innerHTML = 'show llvm'
    }
}

%endfor

}
</script>

</head>

<body>

    %for func_id, func_key in enumerate(func_data):

        <div class="metadata">
        Function name: {{func_data[func_key]['funcname']}}<br />
        in file: {{func_data[func_key]['filename']}}<br />
        called from: {{func_key[0]}}<br />
        with signature: {{func_key[1]}}
        </div>

        <div class="annotations">

        <span id="func{{func_id}}_toggle_llvm" class="buttons">show llvm</span>

        <table class="annotation_table">

            %for num, line in func_data[func_key]['python_lines'].items():
                <tr>
                
                    <td class="{{func_data[func_key]['python_object'][num]}}">
                    {{num}}:
                    </td>

                    <td class="{{func_data[func_key]['python_object'][num]}}">
                    {{func_data[func_key]['python_indent'][num]}}{{line}}
                    </td>
                
                </tr>

                %for i, llvm_line in enumerate(func_data[func_key]['llvm_lines'][num]):

                    <tr class="llvm_code func{{func_id}}_llvm hidden">

                        <td>&nbsp;</td>

                        <td>
                        {{func_data[func_key]['python_indent'][num]}}
                        {{func_data[func_key]['llvm_indent'][num][i]}}{{llvm_line}}
                        </td>

                    </tr>

                %endfor

            %endfor

        </table>

        </div>

        <br /><br /><br />

    %endfor

</body>

</html>
<commit_msg>Fix annotation html template errors<commit_after><html>

<head>

<style>

.annotation_table {
color: #000000;
font-family: monospace;
margin: 5px;
}

.object_tag {
color: #cc3300;
font-weight: bold;
}

.lifted_tag {
color: #0033cc;
font-weight: bold;
}

.llvm_code {
color: grey;
font-style: italic;
}

.metadata {
border-bottom: medium solid black;
display: inline-block;
padding: 5px;
}

.annotations {
padding: 5px;
}

.hidden {
display: none;
}

.buttons {
padding: 10px;
cursor: pointer;
}

</style>

<script type="text/javascript">

window.onload = function() {

%for func_id, func_key in enumerate(func_data):

    <%func_id_str = str(func_id)%>
    document.getElementById('func{{func_id_str}}_toggle_llvm').onclick = function() {
        if (this.innerHTML == 'show llvm') {
            var llvm_lines = document.getElementsByClassName('func{{func_id_str}}_llvm');
            for (var i = 0; i < llvm_lines.length; i++) {
                llvm_lines[i].setAttribute('class', 'llvm_code func{{func_id_str}}_llvm');
            }
            this.innerHTML = 'hide llvm'
        }
        else {
            var llvm_lines = document.getElementsByClassName('func{{func_id_str}}_llvm');
            for (var i = 0; i < llvm_lines.length; i++) {
                llvm_lines[i].setAttribute('class', 'llvm_code func{{func_id_str}}_llvm hidden');
            }
            this.innerHTML = 'show llvm'
        }
    }

    %endfor

}
</script>

</head>

<body>

    %for func_id, func_key in enumerate(func_data):

        <%func_id_str = str(func_id)%>
        <div class="metadata">
        Function name: {{func_data[func_key]['funcname']}}<br />
        in file: {{func_data[func_key]['filename']}}<br />
        called from: {{func_key[0]}}<br />
        with signature: {{func_key[1]}}
        </div>

        <div class="annotations">

        <span id="func{{func_id_str}}_toggle_llvm" class="buttons">show llvm</span>

        <table class="annotation_table">

            %for num, line in func_data[func_key]['python_lines'].items():
                <tr>
                
                    <%num_str = str(num)%>
                    <td class="{{func_data[func_key]['python_object'][num]}}">
                    {{num_str}}:
                    </td>

                    <td class="{{func_data[func_key]['python_object'][num]}}">
                    {{func_data[func_key]['python_indent'][num]}}{{line}}
                    </td>
                
                </tr>

                %for i, llvm_line in enumerate(func_data[func_key]['llvm_lines'][num]):

                    <tr class="llvm_code func{{func_id_str}}_llvm hidden">

                        <td>&nbsp;</td>

                        <td>
                        {{func_data[func_key]['python_indent'][num]}}
                        {{func_data[func_key]['llvm_indent'][num][i]}}{{llvm_line}}
                        </td>

                    </tr>

                %endfor

            %endfor

        </table>

        </div>

        <br /><br /><br />

    %endfor

</body>

</html>

{'fraction_non_alphanumeric': 0.1604269015754701, 'fraction_numerical': 0.007792647806200237, 'mean_word_length': 2.0590673575129532, 'pattern_counts': {'":': 0, '<': 82, '<?xml version=': 0, '>': 78, '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': '3287060', 'n_tokens_mistral': 1956, 'n_tokens_neox': 1860, 'n_words': 344}