<commit_before>var Participants=function(){var g={},n={},f={},k={inks:0,highlighters:0,texts:{},images:0,quizResponses:0,submissions:0,following:!0},p=function(c){return _.reduce(c.words,function(a,d,b){return a+d.text.length},0)},q=d3.scaleLinear().range([6,30]),l,u=function(c){l||(l=d3.select("#lang").style("margin-left","1em"));q.domain(d3.extent(_.map(c,"value")));c=l.selectAll(".word").data(c,function(a){return a.key});c.enter().append("div").attr("class","word").style("margin-right","1em").style("display",
"inline-block").style("vertical-align","middle").text(function(a){return a.key}).style("font-size",function(a){return q(a.value)+"px"}).merge(c).sort(function(a,d){return d3.ascending(d.value,a.value)})},h=function(){g.jsGrid("loadData");var c=g.jsGrid("getSorting");"field"in c&&g.jsGrid("sort",c);Analytics.word.reset();var a={};_.each(boardContent.themes,function(d){_.each(d.text.split(" "),function(b){b=b.toLowerCase();var m=d.origin;Analytics.word.incorporate(b);b in a||(a[b]={});m in a[b]||(a[b][m]=
0);a[b][m]++})});u(Analytics.word.cloudData())},v=function(){showBackstage("participants");updateActiveMenu(this);h()},r=function(){Conversations.shouldModifyConversation()?($("#menuParticipants").off().on("click",v),$("#menuParticipants").show()):($("#menuParticipants").unbind("click"),$("#menuParticipants").hide())},t=function(){r()};$(function(){r();g=$("#participantsDatagrid");n=g.find(".followControls").clone();g.empty();var c=function(a){jsGrid.Field.call(this,a)};c.prototype=new jsGrid.Field({sorter:function(a,
d){return new Date(a)-new Date(d)},itemTemplate:function(a){return(new Date(a)).toLocaleString()},insertTemplate:function(a){return""},editTemplate:function(a){return""},insertValue:function(){return""},editValue:function(){return""}});jsGrid.fields.dateField=c;g.jsGrid({width:"100%",height:"auto",inserting:!1,editing:!1,sorting:!0,paging:!0,noDataContent:"No participants",controller:{loadData:function(a){var d=_.map(_.keys(f),function(b){var a=f[b];return{name:b,following:a.following,attendances:_.size(a.attendances),
images:a.images,inks:a.inks,texts:_.reduce(a.texts,function(a,b){return a+b},0),quizResponses:a.quizResponses,submissions:a.submissions,highlighters:a.highlighters}});"sortField"in a&&(d=_.sortBy(d,function(b){return b[a.sortField]}),"sortOrder"in a&&"desc"==a.sortOrder&&(d=_.reverse(d)));return d}},pageLoading:!1,fields:[{name:"name",type:"text",title:"Follow",readOnly:!0,sorting:!0,itemTemplate:function(a,d){var b=n.clone(),c=sprintf("participant_%s",d.name);b.find(".followValue").attr("id",c).prop("checked",
d.following).on("change",function(){f[d.name].following=$(this).is(":checked");blit();h()});b.find(".followLabel").attr("for",c).text(d.name);return b}},{name:"attendances",type:"number",title:"Attendances",readOnly:!0},{name:"images",type:"number",title:"Images",readOnly:!0},{name:"inks",type:"number",title:"Inks",readOnly:!0},{name:"highlighters",type:"number",title:"Highlighters",readOnly:!0},{name:"texts",type:"number",title:"Texts",readOnly:!0},{name:"quizResponses",type:"number",title:"Poll responses",
readOnly:!0},{name:"submissions",type:"number",title:"Submissions",readOnly:!0}]});g.jsGrid("sort",{field:"name",order:"desc"});h()});Progress.stanzaReceived.participants=function(c){var a=!1;if("type"in c&&"author"in c){var d=c.author;if(!(d in f)){var b=_.clone(k);b.name=d;f[d]=b}b=f[d];switch(c.type){case "ink":b.inks+=1;a=!0;break;case "image":b.images+=1;a=!0;break;case "highlighter":b.highlighters+=1;a=!0;break;case "multiWordText":b.texts[c.identity]=p(c);a=!0;break;case "submission":b.submissions+=
1;a=!0;break;case "quizResponse":b.quizResponses+=1,a=!0}f[d]=b}a&&h()};Progress.themeReceived.participants=h;Progress.historyReceived.participants=function(c){var a={};Analytics.word.reset();var d=function(b){return a[b]||_.cloneDeep(k)};_.each(_.groupBy(c.attendances,"author"),function(b){var c=b[0].author,e=d(k);e.name=c;e.attendances=b;a[c]=e});_.each(_.groupBy(c.inks,"author"),function(b,c){var e=d(c);e.inks+=_.size(b);a[c]=e});_.each(_.groupBy(c.highlighters,"author"),function(b,c){var e=d(c);
e.highlighters+=_.size(b);a[c]=e});_.each(_.groupBy(c.images,"author"),function(b,c){var e=d(c);e.images+=_.size(b);a[c]=e});_.each(_.groupBy(c.multiWordTexts,"author"),function(b,c){d(c);_.each(b,function(b){var d=p(b);a[c].texts[b.identity]=d})});_.each(_.groupBy(c.quizResponses,"author"),function(b,c){var e=d(c);e.quizResponses+=_.size(b);a[c]=e});f=a;h()};Progress.conversationDetailsReceived.participants=t;Progress.newConversationDetailsReceived.participants=t;return{getParticipants:function(){return Conversations.shouldModifyConversation()?
f:{}},reRender:function(){h()},code:function(c){return _.keys(f).indexOf(c)}}}();
<commit_msg>Reminified.<commit_after>var Participants=function(){var g={},n={},f={},k={inks:0,highlighters:0,texts:{},images:0,quizResponses:0,submissions:0,following:!0},p=function(c){return _.reduce(c.words,function(a,d,b){return a+d.text.length},0)},q=d3.scaleLinear().range([6,30]),l,u=function(c){l||(l=d3.select("#lang").style("margin-left","1em"));q.domain(d3.extent(_.map(c,"value")));c=l.selectAll(".word").data(c,function(a){return a.key});c.enter().append("div").attr("class","word").style("margin-right","1em").style("display",
"inline-block").style("vertical-align","middle").text(function(a){return a.key}).style("font-size",function(a){return q(a.value)+"px"}).merge(c).sort(function(a,d){return d3.ascending(d.value,a.value)})},h=function(){g.jsGrid("loadData");var c=g.jsGrid("getSorting");"field"in c&&g.jsGrid("sort",c);Analytics.word.reset();var a={};_.each(boardContent.themes,function(d){_.each(d.text.split(" "),function(b){b=b.toLowerCase();var m=d.origin;Analytics.word.incorporate(b);b in a||(a[b]={});m in a[b]||(a[b][m]=
0);a[b][m]++})});u(Analytics.word.cloudData())},v=function(){showBackstage("participants");updateActiveMenu(this);h()},r=function(){Conversations.shouldModifyConversation()?($("#menuParticipants").off().on("click",v),$("#menuParticipants").show()):($("#menuParticipants").unbind("click"),$("#menuParticipants").hide())},t=function(){r()};$(function(){r();g=$("#participantsDatagrid");n=g.find(".followControls").clone();g.empty();var c=function(a){jsGrid.Field.call(this,a)};c.prototype=new jsGrid.Field({sorter:function(a,
d){return new Date(a)-new Date(d)},itemTemplate:function(a){return(new Date(a)).toLocaleString()},insertTemplate:function(a){return""},editTemplate:function(a){return""},insertValue:function(){return""},editValue:function(){return""}});jsGrid.fields.dateField=c;g.jsGrid({width:"100%",height:"auto",inserting:!1,editing:!1,sorting:!0,paging:!0,noDataContent:"No participants",controller:{loadData:function(a){var d=_.map(_.keys(f),function(b){var a=f[b];return{name:b,following:a.following,attendances:_.size(a.attendances),
images:a.images,inks:a.inks,texts:_.reduce(a.texts,function(a,b){return a+b},0),quizResponses:a.quizResponses,submissions:a.submissions,highlighters:a.highlighters}});"sortField"in a&&(d=_.sortBy(d,function(b){return b[a.sortField]}),"sortOrder"in a&&"desc"==a.sortOrder&&(d=_.reverse(d)));return d}},pageLoading:!1,fields:[{name:"name",type:"text",title:"Follow",readOnly:!0,sorting:!0,itemTemplate:function(a,d){var b=n.clone(),c=sprintf("participant_%s",d.name);b.find(".followValue").attr("id",c).prop("checked",
d.following).on("change",function(){f[d.name].following=$(this).is(":checked");blit();h()});b.find(".followLabel").attr("for",c).text(d.name);return b}},{name:"attendances",type:"number",title:"Attendances",readOnly:!0},{name:"images",type:"number",title:"Images",readOnly:!0},{name:"inks",type:"number",title:"Inks",readOnly:!0},{name:"highlighters",type:"number",title:"Highlighters",readOnly:!0},{name:"texts",type:"number",title:"Texts",readOnly:!0},{name:"quizResponses",type:"number",title:"Poll responses",
readOnly:!0},{name:"submissions",type:"number",title:"Submissions",readOnly:!0}]});g.jsGrid("sort",{field:"name",order:"desc"});h()});Progress.stanzaReceived.participants=function(c){var a=!1;if("type"in c&&"author"in c){var d=c.author;if(!(d in f)){var b=_.clone(k);b.name=d;f[d]=b}b=f[d];switch(c.type){case "ink":b.inks+=1;a=!0;break;case "image":b.images+=1;a=!0;break;case "highlighter":b.highlighters+=1;a=!0;break;case "multiWordText":b.texts[c.identity]=p(c);a=!0;break;case "submission":b.submissions+=
1;a=!0;break;case "quizResponse":b.quizResponses+=1,a=!0}f[d]=b}a&&h()};Progress.themeReceived.participants=function(){"participants"==window.currentBackstage&&h()};Progress.historyReceived.participants=function(c){var a={};Analytics.word.reset();var d=function(b){return a[b]||_.cloneDeep(k)};_.each(_.groupBy(c.attendances,"author"),function(b){var c=b[0].author,e=d(k);e.name=c;e.attendances=b;a[c]=e});_.each(_.groupBy(c.inks,"author"),function(b,c){var e=d(c);e.inks+=_.size(b);a[c]=e});_.each(_.groupBy(c.highlighters,
"author"),function(b,c){var e=d(c);e.highlighters+=_.size(b);a[c]=e});_.each(_.groupBy(c.images,"author"),function(b,c){var e=d(c);e.images+=_.size(b);a[c]=e});_.each(_.groupBy(c.multiWordTexts,"author"),function(b,c){d(c);_.each(b,function(b){var d=p(b);a[c].texts[b.identity]=d})});_.each(_.groupBy(c.quizResponses,"author"),function(b,c){var e=d(c);e.quizResponses+=_.size(b);a[c]=e});f=a;h()};Progress.conversationDetailsReceived.participants=t;Progress.newConversationDetailsReceived.participants=
t;return{getParticipants:function(){return Conversations.shouldModifyConversation()?f:{}},reRender:function(){h()},code:function(c){return _.keys(f).indexOf(c)}}}();

{'fraction_non_alphanumeric': 0.2754091525070364, 'fraction_numerical': 0.010007296987386637, 'mean_word_length': 19.721382289416848, 'pattern_counts': {'":': 14, '<': 3, '<?xml version=': 0, '>': 3, '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': '5098918', 'n_tokens_mistral': 3719, 'n_tokens_neox': 3647, 'n_words': 136}