<commit_before><!DOCTYPE html>
<html>
<head>

<meta charset="utf-8">
<title>Perseus</title>

<link rel="stylesheet" type="text/css" href="ke/css/khan-site.css" />
<link rel="stylesheet" type="text/css" href="ke/css/khan-exercise.css" />
<link rel="stylesheet" type="text/css" href="lib/katex/katex.css" />
<link rel="stylesheet" type="text/css" href="lib/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="lib/mathquill/mathquill.css" />

<link rel="stylesheet/less" type="text/css" href="stylesheets/exercise-content-package/perseus.less" />
<link rel="stylesheet/less" type="text/css" href="stylesheets/perseus-admin-package/editor.less" />
<script>less = {env: 'development', logLevel: 1};</script>
<script src="lib/less.js"></script>

</head>
<body>

<div id="extras">
    <button id="serialize">serialize</button>
    <button id="scorePreview">Score</button>
    <button id="permalink">permalink</button>
    <span>Seed:</span><span id="problemNum"></span>
    <span>Features:</span><span id="enabledFeatures"></span>
</div>

<!-- Begin Perseus HTML -->
<div id="perseus-container">
</div>
<!-- End Perseus HTML -->

<!-- put an empty div here so the margin on the perseus editor has something
to "push against" (without the div, the padding goes off the page, and the
add hint button ends up touching the bottom of the page). -->
<div class="clear"></div>

<script src="lib/jquery.js"></script>
<script src="lib/underscore.js"></script>
<script src="lib/react-with-addons.js"></script>
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full&amp;delayStartupUntil=configured"></script>
<script src="lib/katex/katex.js"></script>
<script src="lib/mathquill/mathquill-basic.js"></script>
<script src="lib/kas.js"></script>

<script>
    var icu = {
        getDecimalFormatSymbols: function() {
            return {
                decimal_separator: ".",
                grouping_separator: ",",
                minus: "-"
            };
        }
    };
    var KhanUtil = {
        debugLog: function() {},
        localeToFixed: function(num, precision) {
            return num.toFixed(precision);
        }
    };
    var Khan = {
        Util: KhanUtil,
        error: function() {},
        query: {debug: ""},
        imageBase: "/ke/images/",
        scratchpad: {
            enable: function() {},
            disable: function() {}
        }
    };
    React.initializeTouchEvents(true);
</script>

<script src="ke/local-only/jed.js"></script>
<script src="ke/local-only/i18n.js"></script>
<script src="ke/local-only/jquery.qtip.js"></script>
<script src="ke/exercises-stub.js"></script>
<script src="ke/local-only/require.js"></script>

<script>
(function() {

requirejs.config({
    waitSeconds: 120
});

// Load khan-exercises modules, then perseus
require(["ke-deps.js"], function() {
    // pre built
    require(["build/perseus-2.js"], initPerseus);

    // pre built with source maps
    // require(["build/perseus.debug.js"], initPerseus);

    // built on demand
    // require(["src/perseus.js"], initPerseus);
});

function initPerseus(Perseus) {

window.Perseus = Perseus;

var defaultQuestion = {
    "question": {
        "content": "[[☃ example-graphie-widget 1]]",
        "widgets": {
            "example-graphie-widget 1": {
                "type": "example-graphie-widget",
                "graded": true,
                "options": {
                    "correct": [
                        -1,
                        -3
                    ],
                    "graph": {
                        "box": [
                            340,
                            340
                        ],
                        "labels": [
                            "x",
                            "y"
                        ],
                        "range": [
                            [
                                -10,
                                10
                            ],
                            [
                                -10,
                                10
                            ]
                        ],
                        "step": [
                            1,
                            1
                        ],
                        "gridStep": [
                            1,
                            1
                        ],
                        "valid": true,
                        "backgroundImage": null,
                        "markings": "grid",
                        "showProtractor": false
                    }
                }
            }
        }
    },
    "answerArea": {
        "type": "multiple",
        "options": {
            "content": "",
            "widgets": {}
        },
        "calculator": false
    },
    "hints": []
};

var editor;
var problemNum = _.random(1, 99);
var enabledFeatures = {
    highlight: true,
    toolTipFormats: true,
    useMathQuill: true
};

$('#serialize').on('click', function() {
    console.log(JSON.stringify(editor.serialize(), null, 4));
});
$('#scorePreview').on('click', function() {
    console.log(editor.scorePreview());
});
$('#permalink').on('click', function(e) {
    window.location.hash = "content=" +
        encodeURIComponent(JSON.stringify(editor));
    e.preventDefault();
});
$('#problemNum').text(problemNum);
$('#enabledFeatures').html(_.map(enabledFeatures, function(enabled, feature) {
    return '<span style="margin-left: 5px; background: ' +
            (enabled ? "#aaffaa" : "#ffcccc") + ';">' + feature + '</span>';
}).join(''));

var query = Perseus.Util.parseQueryString(window.location.hash.substring(1));
var question = query.content ? JSON.parse(query.content) : defaultQuestion;

Perseus.init({skipMathJax: false}).then(function() {

    var editorProps = _.extend(question, {
        problemNum: problemNum,
        enabledFeatures: enabledFeatures,
        developerMode: true,
        imageUploader: function(image, callback) {<commit_msg>Update index.html for github pages<commit_after><!DOCTYPE html>
<html>
<head>

<meta charset="utf-8">
<title>Perseus</title>

<link rel="stylesheet" type="text/css" href="ke/css/khan-site.css" />
<link rel="stylesheet" type="text/css" href="ke/css/khan-exercise.css" />
<link rel="stylesheet" type="text/css" href="lib/katex/katex.css" />
<link rel="stylesheet" type="text/css" href="lib/font-awesome.min.css">
<link rel="stylesheet" type="text/css" href="lib/mathquill/mathquill.css" />

<link rel="stylesheet/less" type="text/css" href="stylesheets/exercise-content-package/perseus.less" />
<link rel="stylesheet/less" type="text/css" href="stylesheets/perseus-admin-package/editor.less" />
<script>less = {env: 'development', logLevel: 1};</script>
<script src="lib/less.js"></script>

</head>
<body>

<div id="extras">
    <button id="serialize">serialize</button>
    <button id="scorePreview">Score</button>
    <button id="permalink">permalink</button>
    <span>Seed:</span><span id="problemNum"></span>
    <span>Features:</span><span id="enabledFeatures"></span>
</div>

<!-- Begin Perseus HTML -->
<div id="perseus-container">
</div>
<!-- End Perseus HTML -->

<!-- put an empty div here so the margin on the perseus editor has something
to "push against" (without the div, the padding goes off the page, and the
add hint button ends up touching the bottom of the page). -->
<div class="clear"></div>

<script src="lib/jquery.js"></script>
<script src="lib/underscore.js"></script>
<script src="lib/react-with-addons.js"></script>
<script src="//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS_HTML-full&amp;delayStartupUntil=configured"></script>
<script src="lib/katex/katex.js"></script>
<script src="lib/mathquill/mathquill-basic.js"></script>
<script src="lib/kas.js"></script>

<script>
    var icu = {
        getDecimalFormatSymbols: function() {
            return {
                decimal_separator: ".",
                grouping_separator: ",",
                minus: "-"
            };
        }
    };
    var KhanUtil = {
        debugLog: function() {},
        localeToFixed: function(num, precision) {
            return num.toFixed(precision);
        }
    };
    var Khan = {
        Util: KhanUtil,
        error: function() {},
        query: {debug: ""},
        imageBase: "/ke/images/",
        scratchpad: {
            enable: function() {},
            disable: function() {}
        }
    };
    React.initializeTouchEvents(true);
</script>

<script src="ke/local-only/jed.js"></script>
<script src="ke/local-only/i18n.js"></script>
<script src="ke/local-only/jquery.qtip.js"></script>
<script src="ke/exercises-stub.js"></script>
<script src="ke/local-only/require.js"></script>

<script>
(function() {

requirejs.config({
    waitSeconds: 120
});

// Load khan-exercises modules, then perseus
require(["ke-deps.js"], function() {
    // pre built
    require(["build/perseus-3.js"], initPerseus);

    // pre built with source maps
    // require(["build/perseus.debug.js"], initPerseus);

    // built on demand
    // require(["src/perseus.js"], initPerseus);
});

function initPerseus(Perseus) {

window.Perseus = Perseus;

var defaultQuestion = {
    "question": {
        "content": "[[☃ example-graphie-widget 1]]",
        "widgets": {
            "example-graphie-widget 1": {
                "type": "example-graphie-widget",
                "graded": true,
                "options": {
                    "correct": [
                        -1,
                        -3
                    ],
                    "graph": {
                        "box": [
                            340,
                            340
                        ],
                        "labels": [
                            "x",
                            "y"
                        ],
                        "range": [
                            [
                                -10,
                                10
                            ],
                            [
                                -10,
                                10
                            ]
                        ],
                        "step": [
                            1,
                            1
                        ],
                        "gridStep": [
                            1,
                            1
                        ],
                        "valid": true,
                        "backgroundImage": null,
                        "markings": "grid",
                        "showProtractor": false
                    }
                }
            }
        }
    },
    "answerArea": {
        "type": "multiple",
        "options": {
            "content": "",
            "widgets": {}
        },
        "calculator": false
    },
    "hints": []
};

var editor;
var problemNum = _.random(1, 99);
var enabledFeatures = {
    highlight: true,
    toolTipFormats: true,
    useMathQuill: true
};

$('#serialize').on('click', function() {
    console.log(JSON.stringify(editor.serialize(), null, 4));
});
$('#scorePreview').on('click', function() {
    console.log(editor.scorePreview());
});
$('#permalink').on('click', function(e) {
    window.location.hash = "content=" +
        encodeURIComponent(JSON.stringify(editor.serialize()));
    e.preventDefault();
});
$('#problemNum').text(problemNum);
$('#enabledFeatures').html(_.map(enabledFeatures, function(enabled, feature) {
    return '<span style="margin-left: 5px; background: ' +
            (enabled ? "#aaffaa" : "#ffcccc") + ';">' + feature + '</span>';
}).join(''));

var query = Perseus.Util.parseQueryString(window.location.hash.substring(1));
var question = query.content ? JSON.parse(query.content) : defaultQuestion;

Perseus.init({skipMathJax: false}).then(function() {

    var editorProps = _.extend(question, {
        problemNum: problemNum,
        enabledFeatures: enabledFeatures,
        developerMode: true,
        imageUploader: function(image, callback) {
{'fraction_non_alphanumeric': 0.16336017265709304, 'fraction_numerical': 0.005976591682576575, 'mean_word_length': 1.816927753097966, 'pattern_counts': {'":': 50, '<': 145, '<?xml version=': 0, '>': 145, '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': '7673527', 'n_tokens_mistral': 3588, 'n_tokens_neox': 3450, 'n_words': 636}