<commit_before><!doctype html>
<title>Slide Viewer</title>

<style type="text/css">
html {
    overflow: hidden;
}
body {
    margin: 5px;
}
h1 {
    font-size: 1.2em;
}
.notice {
    font-style: italic;
}
div#images {
    position: absolute;
    width: 15%;
}
div#images h2 {
    font-size: 1em;
    margin: 0;
}
.associated-images {
    margin-left: 1.5em;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
}
div#images li {
    list-style-type: none;
}
.current-slide {
    background-color: #ccf;
}
div#view {
    position: absolute;
    left: 16%;
    width: 58%;
    height: 98%;
    background-color: black;
    border: 1px solid #000;
    color: white;
}
div#properties {
    position: absolute;
    left: 75%;
    width: 24.5%;
    height: 98%;
    overflow: auto;
}
div#properties-inner {
    display: inline-block;
}
div#properties dl {
    font-size: small;
    margin: 0;
}
div#properties dt {
    font-weight: bold;
    border-top: 1px solid #000;
    background-color: #eee;
}
div#properties dd {
    margin-left: 0;
}
</style>

<div id="images">
    <h1>View</h1>
    <div class="current-slide">
        <a class="load-slide" href="#" data-url="{{ slide_url }}">Slide</a>
    </div>
    <h2>Associated images</h2>
    {% if associated %}
        <ul class="associated-images">
            {% for name in associated|sort %}
                <li><a class="load-slide" href="#"
                        data-url="{{ associated[name] }}">
                    {{ name }}
                </a>
            {% endfor %}
        </ul>
    {% else %}
        <span class="associated-images notice">None</span>
    {% endif %}
</div>
<div id="view"></div>
<div id="properties">
    <h1>Slide properties</h1>
    {% if properties %}
        <div id="properties-inner">
            <dl>
            {% for name in properties %}
                <dt>{{ name }}
                <dd>{{ properties[name] }}
            {% endfor %}
            </dl>
        </div>
    {% else %}
        <span class="notice">None</span>
    {% endif %}
</div>

<script type="text/javascript" src="static/jquery.js"></script>
<script type="text/javascript" src="static/openseadragon.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    var dzi_data = {{ dzi_data|default('{}')|safe }};
    var viewer = new OpenSeadragon({
        id: "view",
        prefixUrl: "static/images/",
        showNavigator: false,
        animationTime: 0.5,
        blendTime: 0.1,
        constrainDuringPan: true,
        minZoomLevel: 1,
        visibilityRatio: 1,
        zoomPerScroll: 2,
    });

    function open_slide(url) {
        var tile_source;
        if (dzi_data[url]) {
            // DZI XML provided as template argument (deepzoom_tile.py)
            tile_source = new OpenSeadragon.DziTileSource(
                    OpenSeadragon.DziTileSource.prototype.configure(
                    OpenSeadragon.parseXml(dzi_data[url]), url));
        } else {
            // DZI XML fetched from server (deepzoom_server.py)
            tile_source = url;
        }
        viewer.open(tile_source);
    }

    open_slide("{{ slide_url }}");
    $(".load-slide").click(function(ev) {
        $(".current-slide").removeClass("current-slide");
        $(this).parent().addClass("current-slide");
        open_slide($(this).attr('data-url'));
        ev.preventDefault();
    });
});
</script>
<commit_msg>Change tile fetch timeout from 5 seconds to 2 minutes<commit_after><!doctype html>
<title>Slide Viewer</title>

<style type="text/css">
html {
    overflow: hidden;
}
body {
    margin: 5px;
}
h1 {
    font-size: 1.2em;
}
.notice {
    font-style: italic;
}
div#images {
    position: absolute;
    width: 15%;
}
div#images h2 {
    font-size: 1em;
    margin: 0;
}
.associated-images {
    margin-left: 1.5em;
    margin-top: 0;
    margin-bottom: 0;
    padding-left: 0;
}
div#images li {
    list-style-type: none;
}
.current-slide {
    background-color: #ccf;
}
div#view {
    position: absolute;
    left: 16%;
    width: 58%;
    height: 98%;
    background-color: black;
    border: 1px solid #000;
    color: white;
}
div#properties {
    position: absolute;
    left: 75%;
    width: 24.5%;
    height: 98%;
    overflow: auto;
}
div#properties-inner {
    display: inline-block;
}
div#properties dl {
    font-size: small;
    margin: 0;
}
div#properties dt {
    font-weight: bold;
    border-top: 1px solid #000;
    background-color: #eee;
}
div#properties dd {
    margin-left: 0;
}
</style>

<div id="images">
    <h1>View</h1>
    <div class="current-slide">
        <a class="load-slide" href="#" data-url="{{ slide_url }}">Slide</a>
    </div>
    <h2>Associated images</h2>
    {% if associated %}
        <ul class="associated-images">
            {% for name in associated|sort %}
                <li><a class="load-slide" href="#"
                        data-url="{{ associated[name] }}">
                    {{ name }}
                </a>
            {% endfor %}
        </ul>
    {% else %}
        <span class="associated-images notice">None</span>
    {% endif %}
</div>
<div id="view"></div>
<div id="properties">
    <h1>Slide properties</h1>
    {% if properties %}
        <div id="properties-inner">
            <dl>
            {% for name in properties %}
                <dt>{{ name }}
                <dd>{{ properties[name] }}
            {% endfor %}
            </dl>
        </div>
    {% else %}
        <span class="notice">None</span>
    {% endif %}
</div>

<script type="text/javascript" src="static/jquery.js"></script>
<script type="text/javascript" src="static/openseadragon.js"></script>
<script type="text/javascript">
$(document).ready(function() {
    var dzi_data = {{ dzi_data|default('{}')|safe }};
    var viewer = new OpenSeadragon({
        id: "view",
        prefixUrl: "static/images/",
        timeout: 120000,
        showNavigator: false,
        animationTime: 0.5,
        blendTime: 0.1,
        constrainDuringPan: true,
        minZoomLevel: 1,
        visibilityRatio: 1,
        zoomPerScroll: 2,
    });

    function open_slide(url) {
        var tile_source;
        if (dzi_data[url]) {
            // DZI XML provided as template argument (deepzoom_tile.py)
            tile_source = new OpenSeadragon.DziTileSource(
                    OpenSeadragon.DziTileSource.prototype.configure(
                    OpenSeadragon.parseXml(dzi_data[url]), url));
        } else {
            // DZI XML fetched from server (deepzoom_server.py)
            tile_source = url;
        }
        viewer.open(tile_source);
    }

    open_slide("{{ slide_url }}");
    $(".load-slide").click(function(ev) {
        $(".current-slide").removeClass("current-slide");
        $(this).parent().addClass("current-slide");
        open_slide($(this).attr('data-url'));
        ev.preventDefault();
    });
});
</script>

{'fraction_non_alphanumeric': 0.16311130460020315, 'fraction_numerical': 0.01567261645624728, 'mean_word_length': 2.164370982552801, 'pattern_counts': {'":': 0, '<': 87, '<?xml version=': 0, '>': 87, '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': '807316', 'n_tokens_mistral': 2388, 'n_tokens_neox': 2234, 'n_words': 475}