# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# + language="javascript"
#
# // Code to dynamically generate table of contents at the top of the HTML file
# var tocEntries = ['<ul>'];
# var anchors = $('a.anchor-link');
# var headingTypes = $(anchors).parent().map(function() { return $(this).prop('tagName')});
# var headingTexts = $(anchors).parent().map(function() { return $(this).text()});
# var subList = false;
#
# $.each(anchors, function(i, anch) {
#     var hType = headingTypes[i];
#     var hText = headingTexts[i];
#     hText = hText.substr(0, hText.length - 1);
#     if (hType == 'H2') {
#         if (subList) {
#             tocEntries.push('</ul>')
#             subList = false;
#         }
#         tocEntries.push('<li><a href="' + anch + '"</a>' + hText + '</li>')
#     }
#     else if (hType == 'H3') {
#         if (!subList) {
#             subList = true;
#             tocEntries.push('<ul>')
#         }
#         tocEntries.push('<li><a href="' + anch + '"</a>' + hText + '</li>')
#     }
# });
# tocEntries.push('</ul>')
# $('#toc').html(tocEntries.join(' '))

StarcoderdataJupyterScriptsDedupFiltered