<commit_before>/*! Fomagical - v1.3.1 - 2015-03-05
* http://www.codeorelse.nl
* Copyright (c) 2015 <NAME>; Licensed MIT */(function(){jQuery(function(){return $.formagical=function(a,b){var c;return c="",this.settings={},this.$element=$(a),this.mostRecentFocusedElement=null,this.lastInteractionTime=0,this.startTime=0,this.submitted=!1,this.setState=function(a){return c=a},this.getState=function(){return c},this.getLastInteractionTime=function(){return lastInteractionTime},this.setLastInteractionTime=function(a){a=a},this.getMostRecentFocusedElement=function(){return mostRecentFocusedElement},this.setMostRecentFocusedElement=function(a){if("undefined"==typeof mostRecentFocusedElement){var b=this,c=new Date,d=c.getTime();this.settings.track.call(b,$(b.$element).attr("name"),"User started using form",d-b.startTime)}mostRecentFocusedElement=a},this.getSetting=function(a){return this.settings[a]},this.trackInAnalytics=function(a,b,c){("undefined"==typeof c||0/0==c)&&(c=0),ga("send","event","formagical",b,a,parseFloat((c/1024).toFixed(2)))},this.callSettingFunction=function(a,b){return null==b&&(b=[]),this.settings[a].apply(this,b)},this.init=function(){this.settings=$.extend({},this.defaults,b);var a=this,c=new Date,d=c.getTime();if(this.startTime=d,this.elementName=$(a.$element).attr("name"),a.settings.track.call(a,$(a.$element).attr("name"),"Form ready for stats"),"undefined"==typeof ga)throw new Error("Add GA to your page.");return this.$element.find("input, textarea").not("[type=checkbox],[type=submit]").each(function(){var b=$(this).attr("name");$(this).keydown(function(c){if(9!==c.keyCode&&27!=c.keyCode){{var d=new Date,e=d.getTime();$(this).val(),$(this).data("valueBeforeTyping")}if(!$(this).data("userStartedTypingInThisBox")){var f="Started typing";a.settings.track.call(a,b,f,e-$(this).data("userStartedFocusingAt"))}{var g=this,h=a.settings.howManyMilliSecsAreAPause;$(g).val()}a.settings.trackPauses&&e-$(g).data("lastTimeTypingInThisBox")>h&&$(this).data("userStartedTypingInThisBox")&&a.settings.track.call(a,b,"paused and continued ",e-$(this).data("lastTimeTypingInThisBox")),$(g).data("lastTimeTypingInThisBox",e),$(this).data("valueBeforeTyping",$(this).val()),$(this).data("userStartedTypingInThisBox",!0)}})}),this.$element.find("input, textarea, select").not("[type=checkbox],[type=submit]").each(function(){var b=$(this).attr("name");if("undefined"==typeof b||""==b)throw new Error("Every form element should have a name");$(this).blur(function(){var c=new Date,d=c.getTime(),e=$(this).val(),f=$(this).data("valueBeforeFocus"),g="from "+(""==f?"nothing":f)+" to "+e,h=e==f?" nothing":g;$(this).data("valueBeforeFocus",e),a.settings.track.call(a,b,"focusOut",d-$(this).data("startFocus"),h)}),$(this).focus(function(){var c=new Date,d=c.getTime();$(this).data("userStartedTypingInThisBox",!1),$(this).data("userStartedFocusingAt",d),$(this).data("lastTimeTypingInThisBox",d),a.setMostRecentFocusedElement(b),$(this).data("startFocus",d),$(this).data("valueBeforeFocus",$(this).val()),a.settings.track.call(a,b,"focus")})}),this.$element.bind("submit",function(){var b=($(this).attr("name"),new Date),c=b.getTime();return a.submitted=!0,a.settings.track.call(a,"form","submitted",c-a.startTime),!1}),this.$element.find("input[type=checkbox]").each(function(){var b=$(this).attr("name");$(this).bind("change",function(){var c=new Date,d=(c.getTime(),$(this).prop("checked")),e=!d,f="from "+(""===e?"nothing":e)+" to "+d,g=d==e?" has not changed":f;a.settings.track.call(a,b,"changed",void 0,g),$(this).data("valueBeforeFocus",$(this).prop("checked")),a.setMostRecentFocusedElement(b)})}),this.$element.find("select").each(function(){$(this).bind("change",function(){var b=$(this).attr("name"),c=new Date,d=c.getTime();if($(this).data("lastTimeSelectionTime"))var e=$(this).data("lastTimeSelectionTime")?d-$(this).data("lastTimeSelectionTime"):0;else var e=$(this).data("startFocus")?d-$(this).data("startFocus"):0;var f=$(this).val(),g=$(this).data("valueBeforeFocus"),h="from "+(""===g?"nothing":g)+" to "+f,i=f==g?" has not changed":h;a.settings.track.call(a,b,"changed",e,i),$(this).data("valueBeforeFocus",$(this).val()),$(this).data("lastTimeSelectionTime",d),a.setMostRecentFocusedElement(b)})}),this.setState("ready")},this.init(),this},$.formagical.prototype.defaults={howManyMilliSecsAreAPause:1500,trackPauses:!0,track:function(a,b,c,d){return this.trackInAnalytics(a,b,c,d)}},$.fn.formagical=function(a){return this.each(function(){var b;return void 0===$(this).data("formagical")?(b=new $.formagical(this,a),$(this).data("formagical",b)):void 0})}})}).call(this);<commit_msg>build<commit_after>/*! Fomagical - v1.3.2 - 2015-04-23
* http://www.codeorelse.nl
* Copyright (c) 2015 <NAME>; Licensed MIT */(function(){jQuery(function(){return $.formagical=function(a,b){var c;return c="",this.settings={},this.$element=$(a),this.mostRecentFocusedElement=null,this.lastInteractionTime=0,this.startTime=0,this.submitted=!1,this.setState=function(a){return c=a},this.getState=function(){return c},this.getLastInteractionTime=function(){return lastInteractionTime},this.setLastInteractionTime=function(a){a=a},this.getMostRecentFocusedElement=function(){return mostRecentFocusedElement},this.setMostRecentFocusedElement=function(a){if("undefined"==typeof mostRecentFocusedElement){var b=this,c=new Date,d=c.getTime();this.settings.track.call(b,$(b.$element).attr("name"),"User started using form",d-b.startTime)}mostRecentFocusedElement=a},this.getSetting=function(a){return this.settings[a]},this.trackInAnalytics=function(a,b,c,d){("undefined"==typeof c||c==0/0)&&(c=0),ga("send","event","formagical",b,a,parseFloat((c/1024).toFixed(2)))},this.callSettingFunction=function(a,b){return null==b&&(b=[]),this.settings[a].apply(this,b)},this.init=function(){this.settings=$.extend({},this.defaults,b);var a=this,c=new Date,d=c.getTime();if(this.startTime=d,this.elementName=$(a.$element).attr("name"),a.settings.track.call(a,$(a.$element).attr("name"),"Form ready for stats"),"undefined"==typeof ga)throw new Error("Add GA to your page.");return this.$element.find("input, textarea").not("[type=checkbox],[type=submit]").each(function(){var b=$(this).attr("name");$(this).keydown(function(c){if(9!==c.keyCode&&27!=c.keyCode){{var d=new Date,e=d.getTime();$(this).val(),$(this).data("valueBeforeTyping")}if(!$(this).data("userStartedTypingInThisBox")){var f="Started typing";a.settings.track.call(a,b,f,e-$(this).data("userStartedFocusingAt"))}{var g=this,h=a.settings.howManyMilliSecsAreAPause;$(g).val()}a.settings.trackPauses&&e-$(g).data("lastTimeTypingInThisBox")>h&&$(this).data("userStartedTypingInThisBox")&&a.settings.track.call(a,b,"paused and continued ",e-$(this).data("lastTimeTypingInThisBox")),$(g).data("lastTimeTypingInThisBox",e),$(this).data("valueBeforeTyping",$(this).val()),$(this).data("userStartedTypingInThisBox",!0)}})}),this.$element.find("input, textarea, select").not("[type=checkbox],[type=submit]").each(function(){var b=$(this).attr("name");if("undefined"==typeof b||""==b)throw new Error("Every form element should have a name");$(this).blur(function(){var c=new Date,d=c.getTime(),e=$(this).val(),f=$(this).data("valueBeforeFocus"),g="from "+(""==f?"nothing":f)+" to "+e,h=e==f?" nothing":g;$(this).data("valueBeforeFocus",e),a.settings.track.call(a,b,"focusOut",d-$(this).data("startFocus"),h)}),$(this).focus(function(){var c=new Date,d=c.getTime();$(this).data("userStartedTypingInThisBox",!1),$(this).data("userStartedFocusingAt",d),$(this).data("lastTimeTypingInThisBox",d),a.setMostRecentFocusedElement(b),$(this).data("startFocus",d),$(this).data("valueBeforeFocus",$(this).val()),a.settings.track.call(a,b,"focus")})}),this.$element.bind("submit",function(){var b=($(this).attr("name"),new Date),c=b.getTime();return a.submitted=!0,a.settings.track.call(a,"form","submitted",c-a.startTime),!0}),this.$element.find("input[type=checkbox]").each(function(){var b=$(this).attr("name");$(this).bind("change",function(){var c=new Date,d=(c.getTime(),$(this).prop("checked")),e=!d,f="from "+(""===e?"nothing":e)+" to "+d,g=d==e?" has not changed":f;a.settings.track.call(a,b,"changed",void 0,g),$(this).data("valueBeforeFocus",$(this).prop("checked")),a.setMostRecentFocusedElement(b)})}),this.$element.find("select").each(function(){$(this).bind("change",function(){var b=$(this).attr("name"),c=new Date,d=c.getTime();if($(this).data("lastTimeSelectionTime"))var e=$(this).data("lastTimeSelectionTime")?d-$(this).data("lastTimeSelectionTime"):0;else var e=$(this).data("startFocus")?d-$(this).data("startFocus"):0;var f=$(this).val(),g=$(this).data("valueBeforeFocus"),h="from "+(""===g?"nothing":g)+" to "+f,i=f==g?" has not changed":h;a.settings.track.call(a,b,"changed",e,i),$(this).data("valueBeforeFocus",$(this).val()),$(this).data("lastTimeSelectionTime",d),a.setMostRecentFocusedElement(b)})}),this.setState("ready")},this.init(),this},$.formagical.prototype.defaults={howManyMilliSecsAreAPause:1500,trackPauses:!0,track:function(a,b,c,d){return this.trackInAnalytics(a,b,c,d)}},$.fn.formagical=function(a){return this.each(function(){var b;return void 0===$(this).data("formagical")?(b=new $.formagical(this,a),$(this).data("formagical",b)):void 0})}})}).call(this);
{'fraction_non_alphanumeric': 0.2626972120164253, 'fraction_numerical': 0.009293278582234709, 'mean_word_length': 15.380530973451327, 'pattern_counts': {'":': 12, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '7423459', 'n_tokens_mistral': 3311, 'n_tokens_neox': 3248, 'n_words': 205}