<commit_before>(function(){var component={name:"voting",version:[1,0,0],ccm:{url:"https://akless.github.io/ccm/version/ccm-10.0.0.min.js",integrity:"sha384-AND32Wbfnmb3f2vRMHkXSJpi81oFmy3eO1FbMHb5i2XOzwg0z+T1de180FUH1Tjt",crossorigin:"anonymous"},config:{templates:{main:{tag:"div",id:"main",inner:[{tag:"div",id:"likes",class:"%likes%",onclick:"%up_vote%"},{tag:"div",id:"total"},{tag:"div",id:"dislikes",class:"%dislikes%",onclick:"%down_vote%"}]}},icon_dislikes:"fa fa-lg fa-chevron-circle-down",icon_likes:"fa fa-lg fa-chevron-circle-up",data:{store:["ccm.store"],key:"demo"},libs:["ccm.load",{url:"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css",context:"head"},"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css",{context:"head",url:"https://tkless.github.io/ccm-components/lib/bootstrap/css/font-face.css"},"https://tkless.github.io/ccm-components/lib/bootstrap/css/bootstrap.css","https://tkless.github.io/ccm-components/voting/resources/default.css"]},Instance:function(){var self=this;var total=0;this.init=function(callback){self.data.store.onChange=function(){self.start()};callback()};this.ready=function(callback){if(self.user)self.user.addObserver(self.index,function(){self.start()});callback()};this.start=function(callback){self.ccm.helper.dataset(self.data.store,self.data.key,function(dataset){if(!dataset.likes)dataset.likes={};if(!dataset.dislikes)dataset.dislikes={};total=Object.keys(dataset.likes).length-Object.keys(dataset.dislikes).length;self.ccm.helper.setContent(self.element,self.ccm.helper.html(self.templates.main,{likes:self.icon_likes,up_vote:function(){doVoting("likes")},dislikes:self.icon_dislikes,down_vote:function(){doVoting("dislikes")}}));setIconAvailability();self.element.querySelector("#total").innerHTML=total;function setIconAvailability(){if(!self.user||!self.user.isLoggedIn())return;var user=self.user.data().name;if(dataset.likes[user])self.element.querySelector("#likes").classList.add("disabled");if(dataset.dislikes[user])self.element.querySelector("#dislikes").classList.add("disabled")}if(!self.user){var likes_elem=self.element.querySelector("#likes");likes_elem.parentNode.removeChild(likes_elem);var dislikes_elem=self.element.querySelector("#dislikes");dislikes_elem.parentNode.removeChild(dislikes_elem)}function doVoting(vote){if(!self.user)return;self.user.login(function(){var user=self.user.data().name;var not_vote;if(self.onvote&&!self.onvote({user:user}))return;if(vote==="likes")not_vote="dislikes";else not_vote="likes";if(dataset[vote][user]){delete dataset[vote][user]}else{dataset[vote][user]=true;delete dataset[not_vote][user]}self.data.store.set(dataset,function(){self.start()})})}if(callback)callback()})};this.getValue=function(){return total}}};function p(){window.ccm[v].component(component)}var f="ccm."+component.name+(component.version?"-"+component.version.join("."):"")+".js";if(window.ccm&&null===window.ccm.files[f])window.ccm.files[f]=component;else{var n=window.ccm&&window.ccm.components[component.name];n&&n.ccm&&(component.ccm=n.ccm),"string"==typeof component.ccm&&(component.ccm={url:component.ccm});var v=component.ccm.url.split("/").pop().split("-");if(v.length>1?(v=v[1].split("."),v.pop(),"min"===v[v.length-1]&&v.pop(),v=v.join(".")):v="latest",window.ccm&&window.ccm[v])p();else{var e=document.createElement("script");document.head.appendChild(e),component.ccm.integrity&&e.setAttribute("integrity",component.ccm.integrity),component.ccm.crossorigin&&e.setAttribute("crossorigin",component.ccm.crossorigin),e.onload=function(){p(),document.head.removeChild(e)},e.src=component.ccm.url}}})();<commit_msg>stable ccm version<commit_after>(function(){var component={name:"voting",version:[1,0,0],ccm:{url:"https://akless.github.io/ccm/version/ccm-14.3.0.min.js",integrity:"<KEY>",crossorigin:"anonymous"},config:{templates:{main:{tag:"div",id:"main",inner:[{tag:"div",id:"likes",class:"%likes%",onclick:"%up_vote%"},{tag:"div",id:"total"},{tag:"div",id:"dislikes",class:"%dislikes%",onclick:"%down_vote%"}]}},icon_dislikes:"fa fa-lg fa-chevron-circle-down",icon_likes:"fa fa-lg fa-chevron-circle-up",data:{store:["ccm.store"],key:"demo"},libs:["ccm.load",{url:"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css",context:"head"},"https://maxcdn.bootstrapcdn.com/font-awesome/4.5.0/css/font-awesome.min.css",{context:"head",url:"https://tkless.github.io/ccm-components/lib/bootstrap/css/font-face.css"},"https://tkless.github.io/ccm-components/lib/bootstrap/css/bootstrap.css","https://tkless.github.io/ccm-components/voting/resources/default.css"]},Instance:function(){var self=this;var total=0;this.init=function(callback){self.data.store.onChange=function(){self.start()};callback()};this.ready=function(callback){if(self.user)self.user.addObserver(self.index,function(){self.start()});callback()};this.start=function(callback){self.ccm.helper.dataset(self.data.store,self.data.key,function(dataset){if(!dataset.likes)dataset.likes={};if(!dataset.dislikes)dataset.dislikes={};total=Object.keys(dataset.likes).length-Object.keys(dataset.dislikes).length;self.ccm.helper.setContent(self.element,self.ccm.helper.html(self.templates.main,{likes:self.icon_likes,up_vote:function(){doVoting("likes")},dislikes:self.icon_dislikes,down_vote:function(){doVoting("dislikes")}}));setIconAvailability();self.element.querySelector("#total").innerHTML=total;function setIconAvailability(){if(!self.user||!self.user.isLoggedIn())return;var user=self.user.data().name;if(dataset.likes[user])self.element.querySelector("#likes").classList.add("disabled");if(dataset.dislikes[user])self.element.querySelector("#dislikes").classList.add("disabled")}if(!self.user){var likes_elem=self.element.querySelector("#likes");likes_elem.parentNode.removeChild(likes_elem);var dislikes_elem=self.element.querySelector("#dislikes");dislikes_elem.parentNode.removeChild(dislikes_elem)}function doVoting(vote){if(!self.user)return;self.user.login(function(){var user=self.user.data().name;var not_vote;if(self.onvote&&!self.onvote({user:user}))return;if(vote==="likes")not_vote="dislikes";else not_vote="likes";if(dataset[vote][user]){delete dataset[vote][user]}else{dataset[vote][user]=true;delete dataset[not_vote][user]}self.data.store.set(dataset,function(){self.start()})})}if(callback)callback()})};this.getValue=function(){return total}}};function p(){window.ccm[v].component(component)}var f="ccm."+component.name+(component.version?"-"+component.version.join("."):"")+".js";if(window.ccm&&null===window.ccm.files[f])window.ccm.files[f]=component;else{var n=window.ccm&&window.ccm.components[component.name];n&&n.ccm&&(component.ccm=n.ccm),"string"==typeof component.ccm&&(component.ccm={url:component.ccm});var v=component.ccm.url.split("/").pop().split("-");if(v.length>1?(v=v[1].split("."),v.pop(),"min"===v[v.length-1]&&v.pop(),v=v.join(".")):v="latest",window.ccm&&window.ccm[v])p();else{var e=document.createElement("script");document.head.appendChild(e),component.ccm.integrity&&e.setAttribute("integrity",component.ccm.integrity),component.ccm.crossorigin&&e.setAttribute("crossorigin",component.ccm.crossorigin),e.onload=function(){p(),document.head.removeChild(e)},e.src=component.ccm.url}}})();
{'fraction_non_alphanumeric': 0.23440297479685993, 'fraction_numerical': 0.0072992700729927005, 'mean_word_length': 13.351778656126482, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 12, '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': '2964883', 'n_tokens_mistral': 2578, 'n_tokens_neox': 2563, 'n_words': 51}