diff options
| -rwxr-xr-x | challenge-278/eric-cheung/python/ch-1.py | 10 | ||||
| -rwxr-xr-x | challenge-278/eric-cheung/python/ch-2.py | 18 | ||||
| -rw-r--r-- | challenge-278/laurent-rosenfeld/blog.txt | 1 | ||||
| -rw-r--r-- | challenge-278/laurent-rosenfeld/perl/ch-1.pl | 22 | ||||
| -rw-r--r-- | challenge-278/laurent-rosenfeld/raku/ch-1.raku | 17 | ||||
| -rw-r--r-- | stats/pwc-challenge-121.json | 310 | ||||
| -rw-r--r-- | stats/pwc-current.json | 647 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown-summary.json | 56 | ||||
| -rw-r--r-- | stats/pwc-language-breakdown.json | 2011 | ||||
| -rw-r--r-- | stats/pwc-leaders.json | 480 | ||||
| -rw-r--r-- | stats/pwc-summary-1-30.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary-121-150.json | 36 | ||||
| -rw-r--r-- | stats/pwc-summary-151-180.json | 50 | ||||
| -rw-r--r-- | stats/pwc-summary-181-210.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary-211-240.json | 42 | ||||
| -rw-r--r-- | stats/pwc-summary-241-270.json | 34 | ||||
| -rw-r--r-- | stats/pwc-summary-271-300.json | 96 | ||||
| -rw-r--r-- | stats/pwc-summary-301-330.json | 76 | ||||
| -rw-r--r-- | stats/pwc-summary-31-60.json | 40 | ||||
| -rw-r--r-- | stats/pwc-summary-61-90.json | 110 | ||||
| -rw-r--r-- | stats/pwc-summary-91-120.json | 38 | ||||
| -rw-r--r-- | stats/pwc-summary.json | 80 |
22 files changed, 1967 insertions, 2285 deletions
diff --git a/challenge-278/eric-cheung/python/ch-1.py b/challenge-278/eric-cheung/python/ch-1.py new file mode 100755 index 0000000000..5fd86d7d26 --- /dev/null +++ b/challenge-278/eric-cheung/python/ch-1.py @@ -0,0 +1,10 @@ +
+## strShuffle = "and2 Raku3 cousins5 Perl1 are4" ## Example 1
+## strShuffle = "guest6 Python1 most4 the3 popular5 is2 language7" ## Example 2
+strShuffle = "Challenge3 The1 Weekly2" ## Example 3
+
+arrSplit = sorted([[int(strLoop[-1]), strLoop[:-1]] for strLoop in strShuffle.split()])
+
+arrOrder = [strSortLoop for nSort, strSortLoop in arrSplit]
+
+print (" ".join(arrOrder))
diff --git a/challenge-278/eric-cheung/python/ch-2.py b/challenge-278/eric-cheung/python/ch-2.py new file mode 100755 index 0000000000..e173d974d8 --- /dev/null +++ b/challenge-278/eric-cheung/python/ch-2.py @@ -0,0 +1,18 @@ +
+## Example 1
+## strInput = "challenge"
+## charInput = "e"
+
+## Example 2
+## strInput = "programming"
+## charInput = "a"
+
+## Example 3
+strInput = "champion"
+charInput = "b"
+
+if charInput in strInput:
+ nPos = strInput.find(charInput)
+ print ("".join(sorted(strInput[:nPos + 1])) + strInput[nPos + 1:])
+else:
+ print (strInput)
diff --git a/challenge-278/laurent-rosenfeld/blog.txt b/challenge-278/laurent-rosenfeld/blog.txt new file mode 100644 index 0000000000..5a40c6ca06 --- /dev/null +++ b/challenge-278/laurent-rosenfeld/blog.txt @@ -0,0 +1 @@ +https://blogs.perl.org/users/laurent_r/2024/07/perl-weekly-challenge-278-sort-string.html diff --git a/challenge-278/laurent-rosenfeld/perl/ch-1.pl b/challenge-278/laurent-rosenfeld/perl/ch-1.pl new file mode 100644 index 0000000000..6953ad0a53 --- /dev/null +++ b/challenge-278/laurent-rosenfeld/perl/ch-1.pl @@ -0,0 +1,22 @@ +use strict; +use warnings; +use feature 'say'; + +sub sort_string { + my @positions; + my @words = split /\s+/, shift; + for my $word (@words) { + my ($letters, $digits) = ($word =~ m/(\D+)(\d+)/); + $positions[$digits] = $letters; + + } + return "@positions[1..$#positions]"; +} +my @tests = ("and2 Raku3 cousins5 Perl1 are4", + "guest6 Python1 most4 the3 popular5 is2 language7", + "Challenge3 The1 Weekly2"); +for my $test (@tests) { + say $test; + say sort_string $test; + say ""; +} diff --git a/challenge-278/laurent-rosenfeld/raku/ch-1.raku b/challenge-278/laurent-rosenfeld/raku/ch-1.raku new file mode 100644 index 0000000000..b7bcaf9500 --- /dev/null +++ b/challenge-278/laurent-rosenfeld/raku/ch-1.raku @@ -0,0 +1,17 @@ +sub sort-string ($in) { + my @positions; + for $in.words -> $word { + $word ~~ m/(\D+)(\d+)/; + @positions[$/[1]] = ~$/[0]; + + } + return "@positions[1..@positions.end]"; +} +my @tests = "and2 Raku3 cousins5 Perl1 are4", + "guest6 Python1 most4 the3 popular5 is2 language7", + "Challenge3 The1 Weekly2"; +for @tests -> $test { + say $test; + say sort-string $test; + say ""; +} diff --git a/stats/pwc-challenge-121.json b/stats/pwc-challenge-121.json index 7e14d310da..9ce742a63d 100644 --- a/stats/pwc-challenge-121.json +++ b/stats/pwc-challenge-121.json @@ -1,81 +1,87 @@ { + "xAxis" : { + "type" : "category" + }, + "subtitle" : { + "text" : "[Champions: 36] Last updated at 2024-07-16 10:52:48 GMT" + }, "series" : [ { "data" : [ { - "y" : 4, "name" : "Abigail", + "y" : 4, "drilldown" : "Abigail" }, { - "drilldown" : "Adam Russell", "name" : "Adam Russell", + "drilldown" : "Adam Russell", "y" : 4 }, { - "drilldown" : "Arne Sommer", "name" : "Arne Sommer", - "y" : 5 + "y" : 5, + "drilldown" : "Arne Sommer" }, { + "name" : "Athanasius", "y" : 2, - "drilldown" : "Athanasius", - "name" : "Athanasius" + "drilldown" : "Athanasius" }, { - "y" : 4, "drilldown" : "Bruce Gray", + "y" : 4, "name" : "Bruce Gray" }, { - "drilldown" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", - "y" : 2 + "y" : 2, + "drilldown" : "Cheok-Yin Fung" }, { - "name" : "Colin Crain", "drilldown" : "Colin Crain", - "y" : 5 + "y" : 5, + "name" : "Colin Crain" }, { "drilldown" : "Cristina Heredia", - "name" : "Cristina Heredia", - "y" : 1 + "y" : 1, + "name" : "Cristina Heredia" }, { "y" : 3, - "name" : "Dave Jacoby", - "drilldown" : "Dave Jacoby" + "drilldown" : "Dave Jacoby", + "name" : "Dave Jacoby" }, { "y" : 1, - "name" : "Duncan C. White", - "drilldown" : "Duncan C. White" + "drilldown" : "Duncan C. White", + "name" : "Duncan C. White" }, { - "name" : "E. Choroba", "drilldown" : "E. Choroba", - "y" : 2 + "y" : 2, + "name" : "E. Choroba" }, { - "drilldown" : "Feng Chang", "name" : "Feng Chang", + "drilldown" : "Feng Chang", "y" : 2 }, { - "drilldown" : "Flavio Poletti", "name" : "Flavio Poletti", - "y" : 6 + "y" : 6, + "drilldown" : "Flavio Poletti" }, { - "y" : 3, - "name" : "Jaldhar H. Vyas", - "drilldown" : "Jaldhar H. Vyas" + "y" : 5, + "drilldown" : "Jaldhar H. Vyas", + "name" : "Jaldhar H. Vyas" }, { - "y" : 3, "name" : "James Smith", - "drilldown" : "James Smith" + "drilldown" : "James Smith", + "y" : 3 }, { "y" : 2, @@ -83,44 +89,44 @@ "name" : "Jan Krnavek" }, { - "name" : "Jared Martin", "drilldown" : "Jared Martin", - "y" : 1 + "y" : 1, + "name" : "Jared Martin" }, { - "y" : 1, "name" : "jdos22", - "drilldown" : "jdos22" + "drilldown" : "jdos22", + "y" : 1 }, { "y" : 2, - "name" : "Jorg Sommrey", - "drilldown" : "Jorg Sommrey" + "drilldown" : "Jorg Sommrey", + "name" : "Jorg Sommrey" }, { - "y" : 2, "name" : "Lance Wicks", - "drilldown" : "Lance Wicks" + "drilldown" : "Lance Wicks", + "y" : 2 }, { "y" : 3, - "name" : "Laurent Rosenfeld", - "drilldown" : "Laurent Rosenfeld" + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld" }, { - "y" : 1, "name" : "Lubos Kolouch", + "y" : 1, "drilldown" : "Lubos Kolouch" }, { - "y" : 4, "name" : "Luca Ferrari", - "drilldown" : "Luca Ferrari" + "drilldown" : "Luca Ferrari", + "y" : 4 }, { + "drilldown" : "Lucas Ransan", "y" : 2, - "name" : "Lucas Ransan", - "drilldown" : "Lucas Ransan" + "name" : "Lucas Ransan" }, { "y" : 2, @@ -129,13 +135,13 @@ }, { "y" : 2, - "name" : "Matthew Neleigh", - "drilldown" : "Matthew Neleigh" + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh" }, { + "name" : "Mohammad Sajid Anwar", "y" : 2, - "name" : "Mohammad S Anwar", - "drilldown" : "Mohammad S Anwar" + "drilldown" : "Mohammad Sajid Anwar" }, { "name" : "Niels van Dijke", @@ -143,63 +149,58 @@ "y" : 2 }, { - "name" : "Paulo Custodio", + "y" : 2, "drilldown" : "Paulo Custodio", - "y" : 2 + "name" : "Paulo Custodio" }, { + "y" : 2, "drilldown" : "Pete Houston", - "name" : "Pete Houston", - "y" : 2 + "name" : "Pete Houston" }, { + "y" : 4, "drilldown" : "Roger Bell_West", - "name" : "Roger Bell_West", - "y" : 4 + "name" : "Roger Bell_West" }, { + "y" : 1, "drilldown" : "Simon Green", - "name" : "Simon Green", - "y" : 1 + "name" : "Simon Green" }, { - "drilldown" : "Simon Proctor", "name" : "Simon Proctor", + "drilldown" : "Simon Proctor", "y" : 1 }, { "y" : 4, - "name" : "Stuart Little", - "drilldown" : "Stuart Little" + "drilldown" : "Stuart Little", + "name" : "Stuart Little" }, { - "drilldown" : "Ulrich Rieke", "name" : "Ulrich Rieke", + "drilldown" : "Ulrich Rieke", "y" : 2 }, { - "name" : "W. Luis Mochan", "drilldown" : "W. Luis Mochan", - "y" : 3 + "y" : 3, + "name" : "W. Luis Mochan" } ], "colorByPoint" : 1, "name" : "The Weekly Challenge - 121" } ], - "plotOptions" : { - "series" : { - "borderWidth" : 0, - "dataLabels" : { - "enabled" : 1, - "format" : "{point.y}" - } - } + "chart" : { + "type" : "column" }, "drilldown" : { "series" : [ { "name" : "Abigail", + "id" : "Abigail", "data" : [ [ "Perl", @@ -209,12 +210,9 @@ "Blog", 2 ] - ], - "id" : "Abigail" + ] }, { - "name" : "Adam Russell", - "id" : "Adam Russell", "data" : [ [ "Perl", @@ -224,7 +222,9 @@ "Blog", 2 ] - ] + ], + "name" : "Adam Russell", + "id" : "Adam Russell" }, { "name" : "Arne Sommer", @@ -246,6 +246,7 @@ }, { "name" : "Athanasius", + "id" : "Athanasius", "data" : [ [ "Perl", @@ -255,12 +256,9 @@ "Raku", 1 ] - ], - "id" : "Athanasius" + ] }, { - "name" : "Bruce Gray", - "id" : "Bruce Gray", "data" : [ [ "Perl", @@ -270,19 +268,22 @@ "Raku", 2 ] - ] + ], + "name" : "Bruce Gray", + "id" : "Bruce Gray" }, { + "id" : "Cheok-Yin Fung", "name" : "Cheok-Yin Fung", "data" : [ [ "Perl", 2 ] - ], - "id" : "Cheok-Yin Fung" + ] }, { + "id" : "Colin Crain", "name" : "Colin Crain", "data" : [ [ @@ -297,12 +298,11 @@ "Blog", 1 ] - ], - "id" : "Colin Crain" + ] }, { - "name" : "Cristina Heredia", "id" : "Cristina Heredia", + "name" : "Cristina Heredia", "data" : [ [ "Perl", @@ -311,6 +311,7 @@ ] }, { + "name" : "Dave Jacoby", "id" : "Dave Jacoby", "data" : [ [ @@ -321,18 +322,17 @@ "Blog", 1 ] - ], - "name" : "Dave Jacoby" + ] }, { + "id" : "Duncan C. White", "name" : "Duncan C. White", "data" : [ [ "Perl", 1 ] - ], - "id" : "Duncan C. White" + ] }, { "name" : "E. Choroba", @@ -345,17 +345,18 @@ ] }, { - "name" : "Feng Chang", "data" : [ [ "Raku", 2 ] ], - "id" : "Feng Chang" + "id" : "Feng Chang", + "name" : "Feng Chang" }, { "id" : "Flavio Poletti", + "name" : "Flavio Poletti", "data" : [ [ "Perl", @@ -369,29 +370,27 @@ "Blog", 2 ] - ], - "name" : "Flavio Poletti" + ] }, { - "name" : "Jaldhar H. Vyas", "data" : [ [ "Perl", - 1 + 2 ], [ "Raku", - 1 + 2 ], [ "Blog", 1 ] ], + "name" : "Jaldhar H. Vyas", "id" : "Jaldhar H. Vyas" }, { - "id" : "James Smith", "data" : [ [ "Perl", @@ -402,26 +401,27 @@ 1 ] ], - "name" : "James Smith" + "name" : "James Smith", + "id" : "James Smith" }, { - "id" : "Jan Krnavek", "data" : [ [ "Raku", 2 ] ], + "id" : "Jan Krnavek", "name" : "Jan Krnavek" }, { - "name" : "Jared Martin", "data" : [ [ "Perl", 1 ] ], + "name" : "Jared Martin", "id" : "Jared Martin" }, { @@ -431,30 +431,31 @@ 1 ] ], - "id" : "jdos22", - "name" : "jdos22" + "name" : "jdos22", + "id" : "jdos22" }, { - "name" : "Jorg Sommrey", - "id" : "Jorg Sommrey", "data" : [ [ "Perl", 2 ] - ] + ], + "id" : "Jorg Sommrey", + "name" : "Jorg Sommrey" }, { - "name" : "Lance Wicks", - "id" : "Lance Wicks", "data" : [ [ "Perl", 2 ] - ] + ], + "name" : "Lance Wicks", + "id" : "Lance Wicks" }, { + "id" : "Laurent Rosenfeld", "name" : "Laurent Rosenfeld", "data" : [ [ @@ -469,22 +470,19 @@ "Blog", 1 ] - ], - "id" : "Laurent Rosenfeld" + ] }, { + "name" : "Lubos Kolouch", "id" : "Lubos Kolouch", "data" : [ [ "Perl", 1 ] - ], - "name" : "Lubos Kolouch" + ] }, { - "name" : "Luca Ferrari", - "id" : "Luca Ferrari", "data" : [ [ "Raku", @@ -494,40 +492,43 @@ "Blog", 2 ] - ] + ], + "id" : "Luca Ferrari", + "name" : "Luca Ferrari" }, { + "id" : "Lucas Ransan", + "name" : "Lucas Ransan", "data" : [ [ "Raku", 2 ] - ], - "id" : "Lucas Ransan", - "name" : "Lucas Ransan" + ] }, { + "name" : "Mark Anderson", "id" : "Mark Anderson", "data" : [ [ "Raku", 2 ] - ], - "name" : "Mark Anderson" + ] }, { - "name" : "Matthew Neleigh", "data" : [ [ "Perl", 2 ] ], - "id" : "Matthew Neleigh" + "id" : "Matthew Neleigh", + "name" : "Matthew Neleigh" }, { - "name" : "Mohammad S Anwar", + "id" : "Mohammad Sajid Anwar", + "name" : "Mohammad Sajid Anwar", "data" : [ [ "Perl", @@ -537,42 +538,39 @@ "Blog", 1 ] - ], - "id" : "Mohammad S Anwar" + ] }, { "name" : "Niels van Dijke", + "id" : "Niels van Dijke", "data" : [ [ "Perl", 2 ] - ], - "id" : "Niels van Dijke" + ] }, { + "id" : "Paulo Custodio", + "name" : "Paulo Custodio", "data" : [ [ "Perl", 2 ] - ], - "id" : "Paulo Custodio", - "name" : "Paulo Custodio" + ] }, { "name" : "Pete Houston", + "id" : "Pete Houston", "data" : [ [ "Perl", 2 ] - ], - "id" : "Pete Houston" + ] }, { - "name" : "Roger Bell_West", - "id" : "Roger Bell_West", "data" : [ [ "Perl", @@ -586,7 +584,9 @@ "Blog", 1 ] - ] + ], + "name" : "Roger Bell_West", + "id" : "Roger Bell_West" }, { "data" : [ @@ -595,8 +595,8 @@ 1 ] ], - "id" : "Simon Green", - "name" : "Simon Green" + "name" : "Simon Green", + "id" : "Simon Green" }, { "data" : [ @@ -605,11 +605,10 @@ 1 ] ], - "id" : "Simon Proctor", - "name" : "Simon Proctor" + "name" : "Simon Proctor", + "id" : "Simon Proctor" }, { - "name" : "Stuart Little", "data" : [ [ "Perl", @@ -620,21 +619,20 @@ 2 ] ], + "name" : "Stuart Little", "id" : "Stuart Little" }, { - "name" : "Ulrich Rieke", "data" : [ [ "Perl", 2 ] ], + "name" : "Ulrich Rieke", "id" : "Ulrich Rieke" }, { - "name" : "W. Luis Mochan", - "id" : "W. Luis Mochan", "data" : [ [ "Perl", @@ -644,27 +642,24 @@ "Blog", 1 ] - ] + ], + "name" : "W. Luis Mochan", + "id" : "W. Luis Mochan" } ] }, - "xAxis" : { - "type" : "category" + "plotOptions" : { + "series" : { + "dataLabels" : { + "enabled" : 1, + "format" : "{point.y}" + }, + "borderWidth" : 0 + } }, "title" : { "text" : "The Weekly Challenge - 121" }, - "subtitle" : { - "text" : "[Champions: 36] Last updated at 2021-11-24 01:14:58 GMT" - }, - "tooltip" : { - "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", - "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>", - "followPointer" : 1 - }, - "chart" : { - "type" : "column" - }, "legend" : { "enabled" : 0 }, @@ -672,5 +667,10 @@ "title" : { "text" : "Total Solutions" } + }, + "tooltip" : { + "followPointer" : 1, + "pointFormat" : "<span style='color:{point.color}'>{point.name}</span>: <b>{point.y:f}</b><br/>", + "headerFormat" : "<span style='font-size:11px'>{series.name}</span><br/>" } } diff --git a/stats/pwc-current.json b/stats/pwc-current.json index 0de7d0e587..4860e7620c 100644 --- a/stats/pwc-current.json +++ b/stats/pwc-current.json @@ -1,102 +1,101 @@ { - "yAxis" : { - "title" : { - "text" : "Total Solutions" - } - }, "tooltip" : { "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/>", "followPointer" : 1 }, - "xAxis" : { - "type" : "category" + "chart" : { + "type" : "column" + }, + "subtitle" : { + "text" : "[Champions: 14] Last updated at 2024-07-16 10:53:07 GMT" + }, + "series" : [ + { + "data" : [ + { + "y" : 2, + "drilldown" : "Alexander Karelas", + "name" : "Alexander Karelas" + }, + { + "drilldown" : "Athanasius", + "y" : 4, + "name" : "Athanasius" + }, + { + "drilldown" : "David Ferrone", + "name" : "David Ferrone", + "y" : 2 + }, + { + "drilldown" : "E. Choroba", + "name" : "E. Choroba", + "y" : 2 + }, + { + "drilldown" : "Feng Chang", + "name" : "Feng Chang", + "y" : 2 + }, + { + "drilldown" : "Laurent Rosenfeld", + "name" : "Laurent Rosenfeld", + "y" : 3 + }, + { + "drilldown" : "Luca Ferrari", + "y" : 11, + "name" : "Luca Ferrari" + }, + { + "name" : "Mark Anderson", + "drilldown" : "Mark Anderson", + "y" : 2 + }, + { + "drilldown" : "Matthew Neleigh", + "name" : "Matthew Neleigh", + "y" : 2 + }, + { + "y" : 3, + "drilldown" : "Peter Campbell Smith", + "name" : "Peter Campbell Smith" + }, + { + "name" : "Peter Meszaros", + "drilldown" : "Peter Meszaros", + "y" : 2 + }, + { + "drilldown" : "Robbie Hatley", + "y" : 3, + "name" : "Robbie Hatley" + }, + { + "y" : 4, + "drilldown" : "Thomas Kohler", + "name" : "Thomas Kohler" + }, + { + "drilldown" : "W. Luis Mochan", + "name" : "W. Luis Mochan", + "y" : 3 + } + ], + "colorByPoint" : 1, + "name" : "The Weekly Challenge - 278" + } + ], + "title" : { + "text" : "The Weekly Challenge - 278" }, "drilldown" : { "series" : [ { - "data" : [ - [ - "Perl", - 2 - ] - ], + "name" : "Alexander Karelas", "id" : "Alexander Karelas", - "name" : "Alexander Karelas" - }, - { - "id" : "Ali Moradi", - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "name" : "Ali Moradi" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Andrew Schneider", - "name" : "Andrew Schneider" - }, - { - "data" : [ - [ - "Raku", - 2 - ], - [ - "Blog", - 1 - ] - ], - "id" : "Arne Sommer", - "name" : "Arne Sommer" - }, - { - "data" : [ - [ - "Perl", - 2 - ], - [ - "Raku", - 2 - ] - ], - "id" : "Athanasius", - "name" : "Athanasius" - }, - { - "name" : "BarrOff", - "id" : "BarrOff", |
