Skip to content

Instantly share code, notes, and snippets.

@smalljam
Created October 20, 2015 16:33
Show Gist options
  • Save smalljam/e942a5c9cf9332b98a90 to your computer and use it in GitHub Desktop.
Save smalljam/e942a5c9cf9332b98a90 to your computer and use it in GitHub Desktop.
leaderboard solution time for 1 solution
[ { language: 'csharp', key: 'hodysh', time: 455 },
{ language: 'javascript', key: 'iatsenko', time: 823 },
{ language: 'java', key: 'tverdokhlib', time: 875 },
{ language: 'java', key: 'cherkas', time: 1275 },
{ language: 'javascript', key: 'sikora', time: 6227 },
{ language: 'python', key: 'holubets', time: 6609 },
{ language: 'javascript', key: 'martynov', time: 6922 },
{ language: 'python', key: 'denys', time: 16226 },
{ language: 'javascript', key: 'blazhivsky', time: 16230 } ]
npm install lodash
node time.js > out
start_time end_time problem_name solution_author solution_language testcase_name testcase_score result_status result_description score solution_time overall_time details
1445353209577 1445353209649 discnt martynov javascript 01 1 C Correct Answer 1 72 72 None
1445353209649 1445353209719 discnt martynov javascript 02 1 C Correct Answer 1 70 70 None
1445353209719 1445353209788 discnt martynov javascript 03 1 C Correct Answer 1 69 69 None
1445353209788 1445353209861 discnt martynov javascript 04 1 C Correct Answer 1 72 73 None
1445353209861 1445353209934 discnt martynov javascript 05 1 C Correct Answer 1 73 73 None
1445353209934 1445353210005 discnt martynov javascript 06 1 C Correct Answer 1 71 71 None
1445353210005 1445353210075 discnt martynov javascript 07 1 C Correct Answer 1 70 70 None
1445353210075 1445353210664 discnt martynov javascript 08 1 C Correct Answer 1 588 589 None
1445353210664 1445353213623 discnt martynov javascript 09 1 C Correct Answer 1 2959 2959 None
1445353213624 1445353216502 discnt martynov javascript 10 1 C Correct Answer 1 2878 2878 None
1445353216502 1445353216568 discnt blazhivsky javascript 01 1 C Correct Answer 1 65 66 None
1445353216568 1445353216635 discnt blazhivsky javascript 02 1 C Correct Answer 1 67 67 None
1445353216635 1445353216701 discnt blazhivsky javascript 03 1 C Correct Answer 1 65 66 None
1445353216701 1445353216766 discnt blazhivsky javascript 04 1 C Correct Answer 1 64 65 None
1445353216766 1445353216834 discnt blazhivsky javascript 05 1 C Correct Answer 1 67 68 None
1445353216834 1445353216901 discnt blazhivsky javascript 06 1 C Correct Answer 1 66 67 None
1445353216901 1445353216966 discnt blazhivsky javascript 07 1 C Correct Answer 1 65 65 None
1445353216966 1445353222392 discnt blazhivsky javascript 08 1 C Correct Answer 1 5425 5426 None
1445353222392 1445353227631 discnt blazhivsky javascript 09 1 C Correct Answer 1 5238 5239 None
1445353227631 1445353232739 discnt blazhivsky javascript 10 1 C Correct Answer 1 5108 5108 None
1445353232739 1445353233300 discnt tverdokhlib java 01 1 C Correct Answer 1 62 561 None
1445353233300 1445353233362 discnt tverdokhlib java 02 1 C Correct Answer 1 61 62 None
1445353233362 1445353233423 discnt tverdokhlib java 03 1 C Correct Answer 1 61 61 None
1445353233423 1445353233484 discnt tverdokhlib java 04 1 C Correct Answer 1 60 61 None
1445353233484 1445353233544 discnt tverdokhlib java 05 1 C Correct Answer 1 60 60 None
1445353233544 1445353233603 discnt tverdokhlib java 06 1 C Correct Answer 1 58 59 None
1445353233603 1445353233663 discnt tverdokhlib java 07 1 C Correct Answer 1 60 60 None
1445353233664 1445353233806 discnt tverdokhlib java 08 1 C Correct Answer 1 142 142 None
1445353233806 1445353233969 discnt tverdokhlib java 09 1 C Correct Answer 1 162 163 None
1445353233969 1445353234118 discnt tverdokhlib java 10 1 C Correct Answer 1 149 149 None
1445353234119 1445353234827 discnt cherkas java 01 1 C Correct Answer 1 112 708 None
1445353234827 1445353234940 discnt cherkas java 02 1 C Correct Answer 1 113 113 None
1445353234940 1445353235054 discnt cherkas java 03 1 C Correct Answer 1 113 114 None
1445353235054 1445353235160 discnt cherkas java 04 1 C Correct Answer 1 106 106 None
1445353235160 1445353235272 discnt cherkas java 05 1 C Correct Answer 1 111 112 None
1445353235272 1445353235381 discnt cherkas java 06 1 C Correct Answer 1 107 109 None
1445353235381 1445353235491 discnt cherkas java 07 1 C Correct Answer 1 110 110 None
1445353235492 1445353235674 discnt cherkas java 08 1 C Correct Answer 1 182 182 None
1445353235674 1445353235851 discnt cherkas java 09 1 C Correct Answer 1 176 177 None
1445353235851 1445353235997 discnt cherkas java 10 1 C Correct Answer 1 145 146 None
1445353235997 1445353236123 discnt hodysh csharp 01 1 C Correct Answer 1 14 126 None
1445353236123 1445353236144 discnt hodysh csharp 02 1 C Correct Answer 1 21 21 None
1445353236144 1445353236161 discnt hodysh csharp 03 1 C Correct Answer 1 16 17 None
1445353236161 1445353236178 discnt hodysh csharp 04 1 C Correct Answer 1 16 17 None
1445353236178 1445353236195 discnt hodysh csharp 05 1 C Correct Answer 1 17 17 None
1445353236195 1445353236212 discnt hodysh csharp 06 1 C Correct Answer 1 16 17 None
1445353236212 1445353236229 discnt hodysh csharp 07 1 C Correct Answer 1 16 17 None
1445353236229 1445353236326 discnt hodysh csharp 08 1 C Correct Answer 1 95 97 None
1445353236326 1445353236448 discnt hodysh csharp 09 1 W Wrong Answer 0 122 122 Expected: ['3923675791737.54'], Actual: ['3959486225987.13']
1445353236448 1445353236571 discnt hodysh csharp 10 1 C Correct Answer 1 122 123 None
1445353236571 1445353236639 discnt sikora javascript 01 1 C Correct Answer 1 67 68 None
1445353236639 1445353236705 discnt sikora javascript 02 1 C Correct Answer 1 66 66 None
1445353236706 1445353236773 discnt sikora javascript 03 1 C Correct Answer 1 66 67 None
1445353236773 1445353236842 discnt sikora javascript 04 1 C Correct Answer 1 69 69 None
1445353236842 1445353236910 discnt sikora javascript 05 1 C Correct Answer 1 68 68 None
1445353236910 1445353236978 discnt sikora javascript 06 1 C Correct Answer 1 67 68 None
1445353236978 1445353237047 discnt sikora javascript 07 1 C Correct Answer 1 67 69 None
1445353237047 1445353237559 discnt sikora javascript 08 1 C Correct Answer 1 512 512 None
1445353237559 1445353240196 discnt sikora javascript 09 1 C Correct Answer 1 2636 2637 None
1445353240196 1445353242806 discnt sikora javascript 10 1 C Correct Answer 1 2609 2610 None
1445353242806 1445353242877 discnt iatsenko javascript 01 1 C Correct Answer 1 70 71 None
1445353242877 1445353242949 discnt iatsenko javascript 02 1 C Correct Answer 1 72 72 None
1445353242949 1445353243020 discnt iatsenko javascript 03 1 C Correct Answer 1 71 71 None
1445353243020 1445353243089 discnt iatsenko javascript 04 1 C Correct Answer 1 69 69 None
1445353243089 1445353243159 discnt iatsenko javascript 05 1 C Correct Answer 1 70 70 None
1445353243159 1445353243229 discnt iatsenko javascript 06 1 C Correct Answer 1 70 70 None
1445353243229 1445353243300 discnt iatsenko javascript 07 1 C Correct Answer 1 71 71 None
1445353243300 1445353243409 discnt iatsenko javascript 08 1 C Correct Answer 1 108 109 None
1445353243409 1445353243520 discnt iatsenko javascript 09 1 C Correct Answer 1 110 111 None
1445353243520 1445353243632 discnt iatsenko javascript 10 1 C Correct Answer 1 112 112 None
1445353243633 1445353243643 discnt holubets python 01 1 C Correct Answer 1 10 10 None
1445353243643 1445353243655 discnt holubets python 02 1 C Correct Answer 1 10 12 None
1445353243655 1445353243666 discnt holubets python 03 1 C Correct Answer 1 11 11 None
1445353243666 1445353243678 discnt holubets python 04 1 C Correct Answer 1 12 12 None
1445353243678 1445353243689 discnt holubets python 05 1 C Correct Answer 1 11 11 None
1445353243689 1445353243700 discnt holubets python 06 1 C Correct Answer 1 10 11 None
1445353243700 1445353243712 discnt holubets python 07 1 C Correct Answer 1 11 12 None
1445353243713 1445353245834 discnt holubets python 08 1 C Correct Answer 1 2121 2121 None
1445353245834 1445353248051 discnt holubets python 09 1 C Correct Answer 1 2215 2217 None
1445353248051 1445353250250 discnt holubets python 10 1 C Correct Answer 1 2198 2199 None
1445353250250 1445353250261 discnt denys python 01 1 C Correct Answer 1 11 11 None
1445353250262 1445353250273 discnt denys python 02 1 C Correct Answer 1 11 11 None
1445353250273 1445353250284 discnt denys python 03 1 C Correct Answer 1 11 11 None
1445353250284 1445353250296 discnt denys python 04 1 C Correct Answer 1 11 12 None
1445353250296 1445353250308 discnt denys python 05 1 C Correct Answer 1 12 12 None
1445353250308 1445353250320 discnt denys python 06 1 C Correct Answer 1 10 12 None
1445353250320 1445353250331 discnt denys python 07 1 C Correct Answer 1 11 11 None
1445353250331 1445353255869 discnt denys python 08 1 C Correct Answer 1 5538 5538 None
1445353255869 1445353261161 discnt denys python 09 1 C Correct Answer 1 5292 5292 None
1445353261162 1445353266482 discnt denys python 10 1 C Correct Answer 1 5319 5320 None
var fs = require('fs');
var _ = require('lodash');
var data = fs.readFileSync('testruns.csv','utf-8').split("\n");
data.pop();
data = _.chain(data).tail().map(function(item){
return item.split(',')
}).groupBy(function(item){
return item[3];
}).map(function(values, key){
return {
language: values[0][4],
key: key,
time: _.chain(values).map(function(item){
return item[10]*1;
}).reduce(function(total, n) {
return total + n;
}).value()
};
}).sortBy(function(item){
return item.time;
}).value();
console.log(data);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment