<commit_before><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/lollypop.css') }}" />

    <script src="{{ url_for('static', filename='js/lib/jquery-2.1.3.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/lib/underscore-min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/lib/backbone-min.js') }}"></script>
</head>
<body>
    <div id="RegistrationPage">
        <h1>Lollypop Farm Cat Cam</h1>

        <h2>Live Video</h2>
        <div style="margin: 10px" align="center">
            <img id="CameraImage" alt="Live Video Feed" src=""/>
        </div>

        <h2>Register to control cat toys</h2>
        <form action="{{ url_for('register') }}" method="post">
            <div style="margin: 10px">
                <h3>Enter your first name and verify that you are not a robot to control the cat toys.</h3>
                <div style="margin-bottom: 10px" align="center">
                    <label for="NameInput">Name:</label>
                    <input id="NameInput" type="text" name="name"/>
                </div>

                <div style="margin-bottom: 10px" align="center">
                    {{ recaptcha }}
                </div>

                <div style="margin-bottom: 10px" align="center">
                    <input id="SubmitName" type="submit" value="Submit"/>
                </div>
            </div>

        </form>
    </div>

    <script type="application/javascript">
        var CameraApp = function() {};

		CameraApp.prototype = {
			delay: 50, // in milliseconds

			setup: function() {
				this.image = document.getElementById('CameraImage');
				this.imageSource = 'http://172.16.58.3:49709/dcnvr/video/live/image/2?w=320&h=240';
				this.loadImage();
			},

			loadImage: function() {
				this.image.src = this.imageSource + '&random=' + Math.random();
			}
    	};

        var cameraApp = null;
        $(function() {
    		cameraApp = new CameraApp();

            $('#CameraImage').load(function() {
                setTimeout(function() { cameraApp.loadImage(); }, cameraApp.delay);
            });

    		cameraApp.setup();
        });
    </script>
</body>
</html><commit_msg>Switch live video feed rate to frames per second.<commit_after><!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>

    <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/lollypop.css') }}" />

    <script src="{{ url_for('static', filename='js/lib/jquery-2.1.3.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/lib/underscore-min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/lib/backbone-min.js') }}"></script>
</head>
<body>
    <div id="RegistrationPage">
        <h1>Lollypop Farm Cat Cam</h1>

        <h2>Live Video</h2>
        <div style="margin: 10px" align="center">
            <img id="CameraImage" alt="Live Video Feed" src=""/>
        </div>

        <h2>Register to control cat toys</h2>
        <form action="{{ url_for('register') }}" method="post">
            <div style="margin: 10px">
                <h3>Enter your first name and verify that you are not a robot to control the cat toys.</h3>
                <div style="margin-bottom: 10px" align="center">
                    <label for="NameInput">Name:</label>
                    <input id="NameInput" type="text" name="name"/>
                </div>

                <div style="margin-bottom: 10px" align="center">
                    {{ recaptcha }}
                </div>

                <div style="margin-bottom: 10px" align="center">
                    <input id="SubmitName" type="submit" value="Submit"/>
                </div>
            </div>

        </form>
    </div>

    <script type="application/javascript">
        var CameraApp = function() {};

		CameraApp.prototype = {
            framesPerSecond: 15,

			setup: function() {
				this.image = document.getElementById('CameraImage');
				this.imageSource = 'http://172.16.58.3:49709/dcnvr/video/live/image/2?w=320&h=240';
				this.loadImage();
			},

			loadImage: function() {
                var calculatedDelay = 1000 / this.framesPerSecond;
                var currentTime = new Date().getTime();
                if (this.lastLoadTime != undefined){
                    calculatedDelay = this.delay - (currentTime - this.lastLoadTime);
                }

                this.lastLoadTime = currentTime;

                if (calculatedDelay <= 0) {
                    this.image.src = this.imageSource + '&random=' + Math.random();
                } else {
                    var cameraApp = this;
                    this.Timer =    setTimeout(function() {
                        cameraApp.image.src = cameraApp.imageSource + '&random=' + Math.random();
                    }, calculatedDelay);
                }
			}
    	};

        var cameraApp = null;
        $(function() {
    		cameraApp = new CameraApp();

            $('#CameraImage').load(function() {
                cameraApp.loadImage();
            });

    		cameraApp.setup();
        });
    </script>
</body>
</html>
{'fraction_non_alphanumeric': 0.17034640274076893, 'fraction_numerical': 0.017700799390940235, 'mean_word_length': 2.0201149425287355, 'pattern_counts': {'":': 0, '<': 96, '<?xml version=': 0, '>': 95, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '2715590', 'n_tokens_mistral': 1674, 'n_tokens_neox': 1504, 'n_words': 326}