<commit_before>var Gesture = (function() {
    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
    var videoElementId = "video_cameraDisplay",
        eventName = "gest",
        functionToBeFiredOnGest,
        createDomElement = (function() {
            var video = document.createElement("video");
            video.setAttribute("src", "");
            video.setAttribute("style", "display:none;width:400px; height:400px;");
            video.setAttribute("id", videoElementId);
            document.body.appendChild(video);

        }),
        capture = (function(video) {
            var w = video.videoWidth * 0.2,
                h = video.videoHeight * 0.2,
                canvas = document.createElement('canvas'),
                ctx, imageData = {};
            canvas.width = w;
            canvas.height = h;
            ctx = canvas.getContext('2d');
            ctx.drawImage(video, 0, 0, w, h);
            if (canvas.width) {
                imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
            }
            return (typeof imageData.data != "undefined") ? imageData.data : {};
        }),
        shoot = (function() {
            var video = document.getElementById(videoElementId);
            var imageData = capture(video),
                imageArray = [],
                imageDataLength;
            if (JSON.stringify(imageData) != "{}" && imageData.length != 0) {
                imageDataLength = imageData.length;
                var x = 0,
                    y = 0;
                for (var index = 0; index < imageDataLength; index++) {
                    if (y < 640) {
                        if (typeof imageArray[x] == "undefined") {
                            imageArray[x] = [];
                        }
                        imageArray[x][y] = imageData[index];
                        y += 1;
                    } else {
                        x += 1;
                        y = 0;
                        if (typeof imageArray[x] == "undefined") {
                            imageArray[x] = [];
                        }
                        imageArray[x][y] = imageData[index];
                    }
                }
            }
            return imageArray;
        }),
        compareWithBasicAndFireEvent = (function(screenShot1, screenShot2) {
            if (typeof screenShot1[0] != "undefined") {
                var changeCounter = 0,
                    arrayLength = screenShot1.length,
                    flag = 0;
                for (var index = 0; index < arrayLength; index++) {
                    if (screenShot1[index][74] != screenShot2[index][74]) {
                        changeCounter += 1;
                        if (changeCounter > ((arrayLength * 0.7))) {<commit_msg>changes<commit_after>var Gesture = (function() {
    navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia;
    var videoElementId = "video_cameraDisplay",
        eventName = "gest",
        functionToBeFiredOnGest,
        createDomElement = (function() {
            var video = document.createElement("video");
            video.setAttribute("src", "");
            video.setAttribute("style", "display:none;width:400px; height:400px;");
            video.setAttribute("id", videoElementId);
            document.body.appendChild(video);

        }),
        capture = (function(video) {
            var w = video.videoWidth * 0.2,
                h = video.videoHeight * 0.2,
                canvas = document.createElement('canvas'),
                ctx, imageData = {};
            canvas.width = w;
            canvas.height = h;
            ctx = canvas.getContext('2d');
            ctx.drawImage(video, 0, 0, w, h);
            if (canvas.width) {
                imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
            }
            return (typeof imageData.data != "undefined") ? imageData.data : {};
        }),
        shoot = (function() {
            var video = document.getElementById(videoElementId);
            var imageData = capture(video),
                imageArray = [],
                imageDataLength;
            if (JSON.stringify(imageData) != "{}" && imageData.length != 0) {
                imageDataLength = imageData.length;
                var x = 0,
                    y = 0;
                for (var index = 0; index < imageDataLength; index++) {
                    if (y < 640) {
                        if (typeof imageArray[x] == "undefined") {
                            imageArray[x] = [];
                        }
                        imageArray[x][y] = imageData[index];
                        y += 1;
                    } else {
                        x += 1;
                        y = 0;
                        if (typeof imageArray[x] == "undefined") {
                            imageArray[x] = [];
                        }
                        imageArray[x][y] = imageData[index];
                    }
                }
            }
            return imageArray;
        }),
        compareWithBasicAndFireEvent = (function(screenShot1, screenShot2) {
            if (typeof screenShot1[0] != "undefined") {
                var changeCounter = 0,
                    arrayLength = screenShot1.length,
                    flag = 0;
                for (var index = 0; index < arrayLength; index++) {
                    if (screenShot1[index][74] != screenShot2[index][74]) {
                        changeCounter += 1;
                        if (changeCounter > ((arrayLength * 0.65))) {
{'fraction_non_alphanumeric': 0.11791383219954649, 'fraction_numerical': 0.01482644339787197, 'mean_word_length': 1.3356415478615071, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 5, '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': '2786409', 'n_tokens_mistral': 1516, 'n_tokens_neox': 1404, 'n_words': 292}