diff options
| author | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2020-08-03 21:18:21 +0100 |
|---|---|---|
| committer | Mohammad S Anwar <mohammad.anwar@yahoo.com> | 2020-08-03 21:18:21 +0100 |
| commit | 4d9baae6f0dca4a81fa56543a5cf27663045cc1f (patch) | |
| tree | d995b2afe1797d8cbc0231a37fea31dec22455a8 | |
| parent | 01ae634b3016a6a263b5318a37839ae938041586 (diff) | |
| download | perlweeklychallenge-club-4d9baae6f0dca4a81fa56543a5cf27663045cc1f.tar.gz perlweeklychallenge-club-4d9baae6f0dca4a81fa56543a5cf27663045cc1f.tar.bz2 perlweeklychallenge-club-4d9baae6f0dca4a81fa56543a5cf27663045cc1f.zip | |
- Added solutions by Yary Hluchan.
20 files changed, 1233 insertions, 1170 deletions
diff --git a/challenge-072/yary-h/README b/challenge-072/yary-h/README index 200fbce413..005cb0d2ab 100644 --- a/challenge-072/yary-h/README +++ b/challenge-072/yary-h/README @@ -1 +1 @@ -Solution by Yary H +Solution by Yary Hluchan. diff --git a/challenge-072/yary-h/range.pl b/challenge-072/yary-h/perl/ch-2.pl index 204bd2255c..204bd2255c 100644 --- a/challenge-072/yary-h/range.pl +++ b/challenge-072/yary-h/perl/ch-2.pl diff --git a/challenge-072/yary-h/input.txt b/challenge-072/yary-h/perl/input.txt index 756958ea91..756958ea91 100644 --- a/challenge-072/yary-h/input.txt +++ b/challenge-072/yary-h/perl/input.txt diff --git a/challenge-072/yary-h/perl/range.pl b/challenge-072/yary-h/perl/range.pl new file mode 100644 index 0000000000..204bd2255c --- /dev/null +++ b/challenge-072/yary-h/perl/range.pl @@ -0,0 +1,14 @@ +#!/usr/bin/env perl +# Run as: +# range.pl 4 10 < input.txt +# or +# range.pl 4 10 input.txt + +my ($begin_line, $end_line)=splice @ARGV,0,2; + +# Not using flip-flop .. want to simply exit on the end line +while (<>) { + next if $. < $begin_line; + print; + exit if $. >=$end_line; +} diff --git a/challenge-072/yary-h/range_ff.pl b/challenge-072/yary-h/perl/range_ff.pl index e7d83cec9d..e7d83cec9d 100644 --- a/challenge-072/yary-h/range_ff.pl +++ b/challenge-072/yary-h/perl/range_ff.pl diff --git a/challenge-072/yary-h/range.raku b/challenge-072/yary-h/raku/ch-2.raku index b2caf65398..b2caf65398 100644 --- a/challenge-072/yary-h/range.raku +++ b/challenge-072/yary-h/raku/ch-2.raku diff --git a/challenge-072/yary-h/raku/input.txt b/challenge-072/yary-h/raku/input.txt new file mode 100644 index 0000000000..756958ea91 --- /dev/null +++ b/challenge-072/yary-h/raku/input.txt @@ -0,0 +1,12 @@ +L1 +L2 +L3 +L4 +L5 +L6 +L7 +L8 +L9 +L10 +L11 +L12 diff --git a/challenge-072/yary-h/raku/range.raku b/challenge-072/yary-h/raku/range.raku new file mode 100644 index 0000000000..b2caf65398 --- /dev/null +++ b/challenge-072/yary-h/raku/range.raku @@ -0,0 +1,18 @@ +#!/usr/bin/env raku + +# Run as: +# range.pl 4 10 < input.txt +# or +# range.pl 4 10 input.txt + +# Playing with command-line validation. +# Lines are ints, end_line is greater than begin_line, +# all input files are readable- OK to skip that, CatHandle would complain. +sub MAIN(Int $line_to_start is copy, #= First line to print + Int $end_line where * >= $line_to_start, #= Last line to print + *@input_file where (*.all).IO.f #= File(s) to read from. Also reads STDIN. + ) { + .say if --$line_to_start < 1 + for IO::CatHandle.new(@input_file, $*IN).lines($end_line) + # Alternative would be to use .lines.kv to get line num with line +} diff --git a/members.json b/members.json index 642eaaf785..5257e27a26 100644 --- a/members.json +++ b/members.json @@ -172,7 +172,7 @@ "william-gilmore" : "William Gilmore", "x1mandi" : "Csaba Simandi", "xkr47" : "Jonas Berlin", - "yary-h" : "Yary H", + "yary-h" : "Yary Hluchan", "yet-ebreo" : "Yet Ebreo", "yozen-hernandez" : "Yozen Hernandez" } diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 8a045d67b6..5079ed6a06 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,20 +1,25 @@ { + "legend" : { + "enabled" : 0 + }, "title" : { "text" : "Perl Weekly Challenge - 072" }, + "subtitle" : { + "text" : "[Champions: 11] Last updated at 2020-08-03 20:17:23 GMT" + }, "series" : [ { - "colorByPoint" : 1, "data" : [ { "name" : "Duncan C. White", - "drilldown" : "Duncan C. White", - "y" : 2 + "y" : 2, + "drilldown" : "Duncan C. White" }, { - "name" : "Jason Messer", + "y" : 2, "drilldown" : "Jason Messer", - "y" : 2 + "name" : "Jason Messer" }, { "name" : "Javier Luque", @@ -28,18 +33,18 @@ }, { "name" : "Mark Anderson", - "drilldown" : "Mark Anderson", - "y" : 2 + "y" : 2, + "drilldown" : "Mark Anderson" }, { - "y" : 4, + "name" : "Mohammad S Anwar", "drilldown" : "Mohammad S Anwar", - "name" : "Mohammad S Anwar" + "y" : 4 }, { - "y" : 2, + "name" : "Niels van Dijke", "drilldown" : "Niels van Dijke", - "name" : "Niels van Dijke" + "y" : 2 }, { "name" : "Roger Bell_West", @@ -52,39 +57,43 @@ "y" : 2 }, { + "name" : "Simon Proctor", "drilldown" : "Simon Proctor", + "y" : 2 + }, + { + "drilldown" : "Yary Hluchan", "y" : 2, - "name" : "Simon Proctor" + "name" : "Yary Hluchan" } ], + "colorByPoint" : 1, "name" : "Perl Weekly Challenge - 072" } ], "drilldown" : { "series" : [ { + "id" : "Duncan C. White", + "name" : "Duncan C. White", "data" : [ [ "Perl", 2 ] - ], - "id" : "Duncan C. White", - "name" : "Duncan C. White" + ] }, { "id" : "Jason Messer", + "name" : "Jason Messer", "data" : [ [ "Raku", 2 ] - ], - "name" : "Jason Messer" + ] }, { - "name" : "Javier Luque", - "id" : "Javier Luque", "data" : [ [ "Perl", @@ -98,9 +107,13 @@ "Blog", 1 ] - ] + ], + "id" : "Javier Luque", + "name" : "Javier Luque" }, { + "name" : "Luca Ferrari", + "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -110,9 +123,7 @@ "Blog", 2 ] - ], - "id" : "Luca Ferrari", - "name" : "Luca Ferrari" + ] }, { "name" : "Mark Anderson", @@ -125,8 +136,6 @@ ] }, { - "name" : "Mohammad S Anwar", - "id" : "Mohammad S Anwar", "data" : [ [ "Perl", @@ -136,20 +145,23 @@ "Raku", 2 ] - ] + ], + "name" : "Mohammad S Anwar", + "id" : "Mohammad S Anwar" }, { "name" : "Niels van Dijke", + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke" + ] }, { "name" : "Roger Bell_West", + "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -159,31 +171,55 @@ "Raku", 2 ] - ], - "id" : "Roger Bell_West" + ] }, { - "name" : "Simon Miner", "data" : [ [ "Perl", 2 ] ], - "id" : "Simon Miner" + "id" : "Simon Miner", + "name" : "Simon Miner" }, { - "id" : "Simon Proctor", "data" : [ [ "Raku", 2 ] ], + "id" : "Simon Proctor", "name" : "Simon Proctor" + }, + { + "id" : "Yary Hluchan", + "name" : "Yary Hluchan", + "data" : [ + [ + "Perl", + 1 + ], + [ + "Raku", + 1 + ] + ] } ] }, + "chart" : { + "type" : "column" + }, + "yAxis" : { + "title" : { + "text" : "Total Solutions" + } + }, + "xAxis" : { + "type" : "category" + }, "plotOptions" : { "series" : { "borderWidth" : 0, @@ -193,26 +229,9 @@ } } }, - "xAxis" : { - "type" : "category" - }, - "legend" : { - "enabled" : 0 - }, - "chart" : { - "type" : "column" - }, - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, "tooltip" : { - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", "followPointer" : 1, - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" - }, - "subtitle" : { - "text" : "[Champions: 10] Last updated at 2020-08-03 20:08:32 GMT" + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>" } } diff --git a/stats/pwc-language-breakdown-summary.json b/stats/pwc-language-breakdown-summary.json index aa5052e0df..5102561410 100644 --- a/stats/pwc-language-breakdown-summary.json +++ b/stats/pwc-language-breakdown-summary.json @@ -1,34 +1,28 @@ { - "subtitle" : { - "text" : "Last updated at 2020-08-03 20:08:32 GMT" - }, - "yAxis" : { - "title" : { - "text" : null - }, - "min" : 0 - }, - "tooltip" : { - "pointFormat" : "<b>{point.y:.0f}</b>" - }, - "chart" : { - "type" : "column" - }, "legend" : { "enabled" : "false" }, - "xAxis" : { - "labels" : { - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - } - }, - "type" : "category" + "title" : { + "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" + }, + "subtitle" : { + "text" : "Last updated at 2020-08-03 20:17:23 GMT" }, "series" : [ { "name" : "Contributions", + "dataLabels" : { + "rotation" : -90, + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + }, + "align" : "right", + "format" : "{point.y:.0f}", + "color" : "#FFFFFF", + "enabled" : "true", + "y" : 10 + }, "data" : [ [ "Blog", @@ -36,28 +30,34 @@ ], [ "Perl", - 2948 + 2949 ], [ "Raku", - 1914 + 1915 ] - ], - "dataLabels" : { - "format" : "{point.y:.0f}", - "color" : "#FFFFFF", - "style" : { - "fontFamily" : "Verdana, sans-serif", - "fontSize" : "13px" - }, - "y" : 10, - "align" : "right", - "rotation" : -90, - "enabled" : "true" - } + ] } ], - "title" : { - "text" : "Perl Weekly Challenge Contributions [2019 - 2020]" + "chart" : { + "type" : "column" + }, + "yAxis" : { + "min" : 0, + "title" : { + "text" : null + } + }, + "xAxis" : { + "labels" : { + "style" : { + "fontFamily" : "Verdana, sans-serif", + "fontSize" : "13px" + } + }, + "type" : "category" + }, + "tooltip" : { + "pointFormat" : "<b>{point.y:.0f}</b>" } } diff --git a/stats/pwc-language-breakdown.json b/stats/pwc-language-breakdown.json index eae64c7681..5c5b983671 100644 --- a/stats/pwc-language-breakdown.json +++ b/stats/pwc-language-breakdown.json @@ -2,6 +2,380 @@ "title" : { "text" : "Perl Weekly Challenge Language" }, + "legend" : { + "enabled" : "false" + }, + "subtitle" : { + "text" : "Click the columns to drilldown the language breakdown. Last updated at 2020-08-03 20:17:23 GMT" + }, + "series" : [ + { + "colorByPoint" : "true", + "name" : "Perl Weekly Challenge Languages", + "data" : [ + { + "name" : "#001", + "y" : 142, + "drilldown" : "001" + }, + { + "name" : "#002", + "drilldown" : "002", + "y" : 109 + }, + { + "y" : 71, + "drilldown" : "003", + "name" : "#003" + }, + { + "y" : 91, + "drilldown" : "004", + "name" : "#004" + }, + { + "name" : "#005", + "y" : 72, + "drilldown" : "005" + }, + { + "name" : "#006", + "drilldown" : "006", + "y" : 52 + }, + { + "drilldown" : "007", + "y" : 59, + "name" : "#007" + }, + { + "drilldown" : "008", + "y" : 72, + "name" : "#008" + }, + { + "y" : 68, + "drilldown" : "009", + "name" : "#009" + }, + { + "drilldown" : "010", + "y" : 60, + "name" : "#010" + }, + { + "name" : "#011", + "drilldown" : "011", + "y" : 79 + }, + { + "drilldown" : "012", + "y" : 83, + "name" : "#012" + }, + { + "y" : 76, + "drilldown" : "013", + "name" : "#013" + }, + { + "drilldown" : "014", + "y" : 96, + "name" : "#014" + }, + { + "drilldown" : "015", + "y" : 93, + "name" : "#015" + }, + { + "name" : "#016", + "y" : 66, + "drilldown" : "016" + }, + { + "name" : "#017", + "y" : 79, + "drilldown" : "017" + }, + { + "drilldown" : "018", + "y" : 76, + "name" : "#018" + }, + { + "name" : "#019", + "drilldown" : "019", + "y" : 97 + }, + { + "drilldown" : "020", + "y" : 95, + "name" : "#020" + }, + { + "y" : 67, + "drilldown" : "021", + "name" : "#021" + }, + { + "name" : "#022", + "y" : 63, + "drilldown" : "022" + }, + { + "name" : "#023", + "y" : 91, + "drilldown" : "023" + }, + { + "drilldown" : "024", + "y" : 70, + "name" : "#024" + }, + { + "y" : 55, + "drilldown" : "025", + "name" : "#025" + }, + { + "drilldown" : "026", + "y" : 70, + "name" : "#026" + }, + { + "name" : "#027", + "y" : 58, + "drilldown" : "027" + }, + { + "name" : "#028", + "drilldown" : "028", + "y" : 78 + }, + { + "name" : "#029", + "drilldown" : "029", + "y" : 77 + }, + { + "drilldown" : "030", + "y" : 115, + "name" : "#030" + }, + { + "drilldown" : "031", + "y" : 87, + "name" : "#031" + }, + { + "name" : "#032", + "drilldown" : "032", + "y" : 92 + }, + { + "name" : "#033", + "y" : 108, + "drilldown" : "033" + }, + { + "drilldown" : "034", + "y" : 62, + "name" : "#034" + }, + { + "drilldown" : "035", + "y" : 62, + "name" : "#035" + }, + { + "drilldown" : "036", + "y" : 66, + "name" : "#036" + }, + { + "name" : "#037", + "drilldown" : "037", + "y" : 65 + }, + { + "y" : 65, + "drilldown" : "038", + "name" : "#038" + }, + { + "name" : "#039", + "y" : 60, + "drilldown" : "039" + }, + { + "name" : "#040", + "y" : 71, + "drilldown" : "040" + }, + { + "y" : 74, + "drilldown" : "041", + "name" : "#041" + }, + { + "drilldown" : "042", + "y" : 88, + "name" : "#042" + }, + { + "name" : "#043", + "drilldown" : "043", + "y" : 66 + }, + { + "name" : "#044", + "y" : 82, + "drilldown" : "044" + }, + { + "y" : 94, + "drilldown" : "045", + "name" : "#045" + }, + { + "y" : 85, + "drilldown" : "046", + "name" : "#046" + }, + { + "y" : 82, + "drilldown" : "047", + "name" : "#047" + }, + { + "name" : "#048", + "y" : 106, + "drilldown" : "048" + }, + { + "drilldown" : "049", + "y" : 85, + "name" : "#049" + }, + { + "name" : "#050", + "drilldown" : "050", + "y" : 96 + }, + { + "drilldown" : "051", + "y" : 87, + "name" : "#051" + }, + { + "name" : "#052", + "y" : 89, + "drilldown" : "052" + }, + { + "drilldown" : "053", + "y" : 99, + "name" : "#053" + }, + { + "name" : "#054", + "drilldown" : "054", + "y" : 101 + }, + { + "drilldown" : "055", + "y" : 86, + "name" : "#055" + }, + { + "name" : "#056", + "y" : 93, + "drilldown" : "056" + }, + { + "name" : "#057", + "drilldown" : "057", + "y" : 78 + }, + { + "drilldown" : "058", + "y" : 67, + "name" : "#058" + }, + { + "y" : 82, + "drilldown" : "059", + "name" : "#059" + }, + { + "name" : "#060", + "y" : 78, + "drilldown" : "060" + }, + { + "y" : 79, + "drilldown" : "061", + "name" : "#061" + }, + { + "y" : 54, + "drilldown" : "062", + "name" : "#062" + }, + { + "name" : "#063", + "drilldown" : "063", + "y" : 87 + }, + { + "name" : "#064", + "y" : 76, + "drilldown" : "064" + }, + { + "name" : "#065", + "y" : 71, + "drilldown" : "065" + }, + { + "drilldown" : "066", + "y" : 81, + "name" : "#066" + }, + { + "name" : "#067", + "y" : 87, + "drilldown" : "067" + }, + { + "drilldown" : "068", + "y" : 73, + "name" : "#068" + }, + { + "name" : "#069", + "y" : 80, + "drilldown" : "069" + }, + { + "name" : "#070", + "y" : 90, + "drilldown" : "070" + }, + { + "y" : 73, + "drilldown" : "071", + "name" : "#071" + }, + { + "name" : "#072", + "y" : 31, + "drilldown" : "072" + } + ] + } + ], "drilldown" : { "series" : [ { @@ -24,6 +398,7 @@ }, { "id" : "002", + "name" : "002", "data" : [ [ "Perl", @@ -37,11 +412,11 @@ "Blog", 10 ] - ], - "name" : "002" + ] }, { "id" : "003", + "name" : "003", "data" : [ [ "Perl", @@ -55,10 +430,11 @@ "Blog", 9 ] - ], - "name" : "003" + ] }, { + "id" : "004", + "name" : "004", "data" : [ [ "Perl", @@ -72,11 +448,10 @@ "Blog", 10 ] - ], - "id" : "004", - "name" : "004" + ] }, { + "id" : "005", "name" : "005", "data" : [ [ @@ -91,11 +466,11 @@ "Blog", 12 ] - ], - "id" : "005" + ] }, { "id" : "006", + "name" : "006", "data" : [ [ "Perl", @@ -109,12 +484,11 @@ "Blog", 7 ] - ], - "name" : "006" + ] }, { - "name" : "007", "id" : "007", + "name" : "007", "data" : [ [ "Perl", @@ -132,6 +506,7 @@ }, { "name" : "008", + "id" : "008", "data" : [ [ "Perl", @@ -145,11 +520,11 @@ "Blog", 12 ] - ], - "id" : "008" + ] }, { "id" : "009", + "name" : "009", "data" : [ [ "Perl", @@ -163,8 +538,7 @@ "Blog", 13 ] - ], - "name" : "009" + ] }, { "name" : "010", @@ -185,8 +559,6 @@ ] }, { - "name" : "011", - "id" : "011", "data" : [ [ "Perl", @@ -200,9 +572,13 @@ "Blog", 10 ] - ] + ], + "name" : "011", + "id" : "011" }, { + "id" : "012", + "name" : "012", "data" : [ [ "Perl", @@ -216,12 +592,9 @@ "Blog", 11 ] - ], - "id" : "012", - "name" : "012" + ] }, { - "id" : "013", "data" : [ [ "Perl", @@ -236,9 +609,12 @@ 13 ] ], + "id" : "013", "name" : "013" }, { + "name" : "014", + "id" : "014", "data" : [ [ |
