aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaulo Custodio <pauloscustodio@gmail.com>2021-03-09 19:51:39 +0000
committerPaulo Custodio <pauloscustodio@gmail.com>2021-03-09 19:51:39 +0000
commitbfa8b8a3dda2ac37c22c7f4fc2867211f92f65e0 (patch)
tree8c8112d92ea9c83e020b7b081d4b4e12418924f8
parente64734f9b42c5838a7d3ade2d6c2e8ba14625cf0 (diff)
downloadperlweeklychallenge-club-bfa8b8a3dda2ac37c22c7f4fc2867211f92f65e0.tar.gz
perlweeklychallenge-club-bfa8b8a3dda2ac37c22c7f4fc2867211f92f65e0.tar.bz2
perlweeklychallenge-club-bfa8b8a3dda2ac37c22c7f4fc2867211f92f65e0.zip
Add Perl, Lua and Python solutions to challenge 103
-rw-r--r--challenge-103/paulo-custodio/lua/ch-1.lua33
-rw-r--r--challenge-103/paulo-custodio/lua/ch-2.lua97
-rw-r--r--challenge-103/paulo-custodio/perl/ch-1.pl36
-rw-r--r--challenge-103/paulo-custodio/perl/ch-2.pl95
-rw-r--r--challenge-103/paulo-custodio/playlist.csv7
-rw-r--r--challenge-103/paulo-custodio/python/ch-1.py35
-rw-r--r--challenge-103/paulo-custodio/python/ch-2.py96
-rw-r--r--challenge-103/paulo-custodio/t/test-1.yaml600
-rw-r--r--challenge-103/paulo-custodio/t/test-2.yaml308
-rw-r--r--challenge-103/paulo-custodio/test.pl7
10 files changed, 1314 insertions, 0 deletions
diff --git a/challenge-103/paulo-custodio/lua/ch-1.lua b/challenge-103/paulo-custodio/lua/ch-1.lua
new file mode 100644
index 0000000000..1a0143f85f
--- /dev/null
+++ b/challenge-103/paulo-custodio/lua/ch-1.lua
@@ -0,0 +1,33 @@
+#!/usr/bin/env lua
+
+--[[
+Challenge 103
+
+TASK #1 › Chinese Zodiac
+Submitted by: Mohammad S Anwar
+You are given a year $year.
+
+Write a script to determine the Chinese Zodiac for the given year $year.
+Please check out wikipage for more information about it.
+
+The animal cycle: Rat, Ox, Tiger, Rabbit, Dragon, Snake, Horse, Goat, Monkey,
+Rooster, Dog, Pig.
+The element cycle: Wood, Fire, Earth, Metal, Water.
+
+Example 1:
+ Input: 2017
+ Output: Fire Rooster
+Example 2:
+ Input: 1938
+ Output: Earth Tiger
+--]]
+
+animals = {'Rat', 'Ox', 'Tiger', 'Rabbit', 'Dragon', 'Snake', 'Horse', 'Goat', 'Monkey', 'Rooster', 'Dog', 'Pig'}
+elements = {'Wood', 'Wood', 'Fire', 'Fire', 'Earth', 'Earth', 'Metal', 'Metal', 'Water', 'Water'}
+
+year = tonumber(arg[1])
+num_years = year - 1924
+element = 1 + (num_years % #elements)
+animal = 1 + (num_years % #animals)
+
+io.write(elements[element]," ",animals[animal],"\n")
diff --git a/challenge-103/paulo-custodio/lua/ch-2.lua b/challenge-103/paulo-custodio/lua/ch-2.lua
new file mode 100644
index 0000000000..cb0a0f74a6
--- /dev/null
+++ b/challenge-103/paulo-custodio/lua/ch-2.lua
@@ -0,0 +1,97 @@
+#!/usr/bin/env lua
+
+--[[
+Challenge 103
+
+TASK #2 › What’s playing?
+Submitted by: Albert Croft
+Working from home, you decided that on occasion you wanted some background
+noise while working. You threw together a network streamer to continuously
+loop through the files and launched it in a tmux (or screen) session, giving
+it a directory tree of files to play. During the day, you connected an audio
+player to the stream, listening through the workday, closing it when done.
+
+For weeks you connect to the stream daily, slowly noticing a gradual drift of
+the media. After several weeks, you take vacation. When you return, you are
+pleasantly surprised to find the streamer still running. Before connecting,
+however, if you consider the puzzle of determining which track is playing.
+
+After looking at a few modules to read info regarding the media, a quick bit
+of coding gave you a file list. The file list is in a simple CSV format, each
+line containing two fields: the first the number of milliseconds in length,
+the latter the media’s title (this example is of several episodes available
+from the MercuryTheatre.info):
+
+ 1709363,"Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+ 1723781,"Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)"
+ 1723781,"Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)"
+ 1678356,"Les Miserables Episode 4: Cosette (broadcast date: 1937-08-13)"
+ 1646043,"Les Miserables Episode 5: The Grave (broadcast date: 1937-08-20)"
+ 1714640,"Les Miserables Episode 6: The Barricade (broadcast date: 1937-08-27)"
+ 1714640,"Les Miserables Episode 7: Conclusion (broadcast date: 1937-09-03)"
+For this script, you can assume to be provided the following information:
+
+ * the value of $^T ($BASETIME) of the streamer script,
+ * the value of time(), and
+ * a CSV file containing the media to play consisting of the length in
+milliseconds and an identifier for the media (title, filename, or other).
+Write a program to output which file is currently playing. For purposes of
+this script, you may assume gapless playback, and format the output as you
+see fit.
+
+Optional: Also display the current position in the media as a time-like value.
+
+Example:
+
+Input: 3 command line parameters: start time, current time, file name
+
+ # Streamer start time: Tue Nov 23 12:22:03 2020
+ 1606134123
+
+ # Current time: Mon Mar 1 09:34:36 2021
+ 1614591276
+
+ # filelist.csv
+
+Output:
+
+ "Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+ 00:17:33
+--]]
+
+start_secs = tonumber(arg[1])
+current_secs = tonumber(arg[2])
+playlist_file = arg[3]
+
+-- read playlist
+playlist = {}
+playlist_total_secs = 0
+for line in io.lines(playlist_file) do
+ local ms, title = line:match('%s*(.-),%s*"(.-)"')
+ local secs = math.floor(tonumber(ms)/1000+0.5)
+ table.insert(playlist, { secs, title })
+ playlist_total_secs = playlist_total_secs + secs
+end
+
+-- compute location
+total_secs = current_secs - start_secs
+playlist_secs = total_secs % playlist_total_secs
+
+-- find current track
+for k, v in pairs(playlist) do
+ local secs, title = v[1], v[2]
+ if playlist_secs < secs then -- playing this title
+ io.write(title, "\n")
+
+ local hh = math.floor(playlist_secs / 3600)
+ playlist_secs = playlist_secs % 3600
+ local mm = math.floor(playlist_secs / 60)
+ playlist_secs = playlist_secs % 60
+ local ss = playlist_secs
+
+ io.write(string.format("%02d:%02d:%02d", hh, mm, ss), "\n")
+ break
+ else
+ playlist_secs = playlist_secs - secs
+ end
+end
diff --git a/challenge-103/paulo-custodio/perl/ch-1.pl b/challenge-103/paulo-custodio/perl/ch-1.pl
new file mode 100644
index 0000000000..3587c47f0f
--- /dev/null
+++ b/challenge-103/paulo-custodio/perl/ch-1.pl
@@ -0,0 +1,36 @@
+#!/usr/bin/perl
+
+# Challenge 103
+#
+# TASK #1 › Chinese Zodiac
+# Submitted by: Mohammad S Anwar
+# You are given a year $year.
+#
+# Write a script to determine the Chinese Zodiac for the given year $year.
+# Please check out wikipage for more information about it.
+#
+# The animal cycle: Rat, Ox, Tiger, Rabbit, Dragon, Snake, Horse, Goat, Monkey,
+# Rooster, Dog, Pig.
+# The element cycle: Wood, Fire, Earth, Metal, Water.
+#
+# Example 1:
+# Input: 2017
+# Output: Fire Rooster
+# Example 2:
+# Input: 1938
+# Output: Earth Tiger
+
+use strict;
+use warnings;
+use 5.030;
+
+my @animals = qw(Rat Ox Tiger Rabbit Dragon Snake Horse Goat Monkey Rooster Dog Pig);
+my @elements = qw(Wood Wood Fire Fire Earth Earth Metal Metal Water Water);
+
+my($year) = @ARGV;
+defined $year or $year = 1900+ (localtime(time))[5];
+my $num_years = $year-1924;
+my $element = $num_years % scalar(@elements);
+my $animal = $num_years % scalar(@animals);
+
+say $elements[$element]," ",$animals[$animal];
diff --git a/challenge-103/paulo-custodio/perl/ch-2.pl b/challenge-103/paulo-custodio/perl/ch-2.pl
new file mode 100644
index 0000000000..0263997cb5
--- /dev/null
+++ b/challenge-103/paulo-custodio/perl/ch-2.pl
@@ -0,0 +1,95 @@
+#!/usr/bin/perl
+
+# Challenge 103
+#
+# TASK #2 › What’s playing?
+# Submitted by: Albert Croft
+# Working from home, you decided that on occasion you wanted some background
+# noise while working. You threw together a network streamer to continuously
+# loop through the files and launched it in a tmux (or screen) session, giving
+# it a directory tree of files to play. During the day, you connected an audio
+# player to the stream, listening through the workday, closing it when done.
+#
+# For weeks you connect to the stream daily, slowly noticing a gradual drift of
+# the media. After several weeks, you take vacation. When you return, you are
+# pleasantly surprised to find the streamer still running. Before connecting,
+# however, if you consider the puzzle of determining which track is playing.
+#
+# After looking at a few modules to read info regarding the media, a quick bit
+# of coding gave you a file list. The file list is in a simple CSV format, each
+# line containing two fields: the first the number of milliseconds in length,
+# the latter the media’s title (this example is of several episodes available
+# from the MercuryTheatre.info):
+#
+# 1709363,"Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+# 1723781,"Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)"
+# 1723781,"Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)"
+# 1678356,"Les Miserables Episode 4: Cosette (broadcast date: 1937-08-13)"
+# 1646043,"Les Miserables Episode 5: The Grave (broadcast date: 1937-08-20)"
+# 1714640,"Les Miserables Episode 6: The Barricade (broadcast date: 1937-08-27)"
+# 1714640,"Les Miserables Episode 7: Conclusion (broadcast date: 1937-09-03)"
+# For this script, you can assume to be provided the following information:
+#
+# * the value of $^T ($BASETIME) of the streamer script,
+# * the value of time(), and
+# * a CSV file containing the media to play consisting of the length in
+# milliseconds and an identifier for the media (title, filename, or other).
+# Write a program to output which file is currently playing. For purposes of
+# this script, you may assume gapless playback, and format the output as you
+# see fit.
+#
+# Optional: Also display the current position in the media as a time-like value.
+#
+# Example:
+#
+# Input: 3 command line parameters: start time, current time, file name
+#
+# # Streamer start time: Tue Nov 23 12:22:03 2020
+# 1606134123
+#
+# # Current time: Mon Mar 1 09:34:36 2021
+# 1614591276
+#
+# # filelist.csv
+#
+# Output:
+#
+# "Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+# 00:17:33
+
+use strict;
+use warnings;
+use 5.030;
+
+@ARGV==3 or die "Usage: ch-2.pl start_secs current_secs playlist.csv\n";
+my($start_secs, $current_secs, $playlist) = @ARGV;
+
+my @playlist;
+my $playlist_total_secs = 0;
+open(my $fh, "<", $playlist) or die "open file $playlist: $!\n";
+while (<$fh>) {
+ chomp;
+ my($ms, $title) = split(/,/, $_, 2);
+ my $secs = int($ms/1000+0.5);
+ $title =~ s/^\"(.*)\"$/$1/;
+ push @playlist, [$secs, $title];
+ $playlist_total_secs += $secs;
+}
+
+my $total_secs = $current_secs - $start_secs;
+my $playlist_secs = $total_secs % $playlist_total_secs;
+
+for (@playlist) {
+ my($secs, $title) = @$_;
+ if ($playlist_secs < $secs) { # playing this title
+ say $title;
+ my $hh = int($playlist_secs/3600); $playlist_secs %= 3600;
+ my $mm = int($playlist_secs/60); $playlist_secs %= 60;
+ my $ss = $playlist_secs;
+ say sprintf("%02d:%02d:%02d", $hh, $mm, $ss);
+ last;
+ }
+ else {
+ $playlist_secs -= $secs;
+ }
+}
diff --git a/challenge-103/paulo-custodio/playlist.csv b/challenge-103/paulo-custodio/playlist.csv
new file mode 100644
index 0000000000..9428b93004
--- /dev/null
+++ b/challenge-103/paulo-custodio/playlist.csv
@@ -0,0 +1,7 @@
+1709363,"Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+1723781,"Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)"
+1723781,"Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)"
+1678356,"Les Miserables Episode 4: Cosette (broadcast date: 1937-08-13)"
+1646043,"Les Miserables Episode 5: The Grave (broadcast date: 1937-08-20)"
+1714640,"Les Miserables Episode 6: The Barricade (broadcast date: 1937-08-27)"
+1714640,"Les Miserables Episode 7: Conclusion (broadcast date: 1937-09-03)"
diff --git a/challenge-103/paulo-custodio/python/ch-1.py b/challenge-103/paulo-custodio/python/ch-1.py
new file mode 100644
index 0000000000..4231b5f109
--- /dev/null
+++ b/challenge-103/paulo-custodio/python/ch-1.py
@@ -0,0 +1,35 @@
+#!/usr/bin/env python
+
+# Challenge 103
+#
+# TASK #1 > Chinese Zodiac
+# Submitted by: Mohammad S Anwar
+# You are given a year $year.
+#
+# Write a script to determine the Chinese Zodiac for the given year $year.
+# Please check out wikipage for more information about it.
+#
+# The animal cycle: Rat, Ox, Tiger, Rabbit, Dragon, Snake, Horse, Goat, Monkey,
+# Rooster, Dog, Pig.
+# The element cycle: Wood, Fire, Earth, Metal, Water.
+#
+# Example 1:
+# Input: 2017
+# Output: Fire Rooster
+# Example 2:
+# Input: 1938
+# Output: Earth Tiger
+
+import sys;
+
+animals = ['Rat','Ox','Tiger','Rabbit','Dragon','Snake','Horse','Goat',
+ 'Monkey','Rooster','Dog','Pig']
+elements = ['Wood','Wood','Fire','Fire','Earth','Earth','Metal','Metal',
+ 'Water','Water'];
+
+year = int(sys.argv[1])
+num_years = year-1924;
+element = num_years % len(elements);
+animal = num_years % len(animals);
+
+print(elements[element]," ",animals[animal]);
diff --git a/challenge-103/paulo-custodio/python/ch-2.py b/challenge-103/paulo-custodio/python/ch-2.py
new file mode 100644
index 0000000000..abfa505427
--- /dev/null
+++ b/challenge-103/paulo-custodio/python/ch-2.py
@@ -0,0 +1,96 @@
+#!/usr/bin/env python
+
+# Challenge 103
+#
+# TASK #2 > What's playing?
+# Submitted by: Albert Croft
+# Working from home, you decided that on occasion you wanted some background
+# noise while working. You threw together a network streamer to continuously
+# loop through the files and launched it in a tmux (or screen) session, giving
+# it a directory tree of files to play. During the day, you connected an audio
+# player to the stream, listening through the workday, closing it when done.
+#
+# For weeks you connect to the stream daily, slowly noticing a gradual drift of
+# the media. After several weeks, you take vacation. When you return, you are
+# pleasantly surprised to find the streamer still running. Before connecting,
+# however, if you consider the puzzle of determining which track is playing.
+#
+# After looking at a few modules to read info regarding the media, a quick bit
+# of coding gave you a file list. The file list is in a simple CSV format, each
+# line containing two fields: the first the number of milliseconds in length,
+# the latter the media's title (this example is of several episodes available
+# from the MercuryTheatre.info):
+#
+# 1709363,"Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+# 1723781,"Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)"
+# 1723781,"Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)"
+# 1678356,"Les Miserables Episode 4: Cosette (broadcast date: 1937-08-13)"
+# 1646043,"Les Miserables Episode 5: The Grave (broadcast date: 1937-08-20)"
+# 1714640,"Les Miserables Episode 6: The Barricade (broadcast date: 1937-08-27)"
+# 1714640,"Les Miserables Episode 7: Conclusion (broadcast date: 1937-09-03)"
+# For this script, you can assume to be provided the following information:
+#
+# * the value of $^T ($BASETIME) of the streamer script,
+# * the value of time(), and
+# * a CSV file containing the media to play consisting of the length in
+# milliseconds and an identifier for the media (title, filename, or other).
+# Write a program to output which file is currently playing. For purposes of
+# this script, you may assume gapless playback, and format the output as you
+# see fit.
+#
+# Optional: Also display the current position in the media as a time-like value.
+#
+# Example:
+#
+# Input: 3 command line parameters: start time, current time, file name
+#
+# # Streamer start time: Tue Nov 23 12:22:03 2020
+# 1606134123
+#
+# # Current time: Mon Mar 1 09:34:36 2021
+# 1614591276
+#
+# # filelist.csv
+#
+# Output:
+#
+# "Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)"
+# 00:17:33
+
+import csv
+import sys
+
+def read_playlist(filename):
+ playlist = []
+ with open(filename) as csv_file:
+ csv_reader = csv.reader(csv_file, delimiter=',')
+ for row in csv_reader:
+ playlist.append([int(int(row[0])/1000+0.5), row[1]])
+ return playlist
+
+def total_time(playlist):
+ sum = 0
+ for x in playlist:
+ sum += x[0]
+ return sum
+
+def show_title(start_secs, current_secs, playlist_file):
+ playlist = read_playlist('playlist.csv')
+ total_secs = current_secs - start_secs
+ playlist_total_secs = total_time(playlist)
+ playlist_secs = total_secs % playlist_total_secs
+
+ for item in playlist:
+ if playlist_secs < item[0]:
+ print(item[1])
+ hh = int(playlist_secs/3600)
+ playlist_secs %= 3600
+ mm = int(playlist_secs/60)
+ playlist_secs %= 60
+ ss = playlist_secs;
+ print("{:02}:{:02}:{:02}".format(hh, mm, ss))
+ break
+ else:
+ playlist_secs -= item[0]
+
+show_title(int(sys.argv[1]), int(sys.argv[2]), sys.argv[3])
diff --git a/challenge-103/paulo-custodio/t/test-1.yaml b/challenge-103/paulo-custodio/t/test-1.yaml
new file mode 100644
index 0000000000..456326b454
--- /dev/null
+++ b/challenge-103/paulo-custodio/t/test-1.yaml
@@ -0,0 +1,600 @@
+- setup:
+ cleanup:
+ args: 1924
+ input:
+ output: Wood Rat
+- setup:
+ cleanup:
+ args: 1925
+ input:
+ output: Wood Ox
+- setup:
+ cleanup:
+ args: 1926
+ input:
+ output: Fire Tiger
+- setup:
+ cleanup:
+ args: 1927
+ input:
+ output: Fire Rabbit
+- setup:
+ cleanup:
+ args: 1928
+ input:
+ output: Earth Dragon
+- setup:
+ cleanup:
+ args: 1929
+ input:
+ output: Earth Snake
+- setup:
+ cleanup:
+ args: 1930
+ input:
+ output: Metal Horse
+- setup:
+ cleanup:
+ args: 1931
+ input:
+ output: Metal Goat
+- setup:
+ cleanup:
+ args: 1932
+ input:
+ output: Water Monkey
+- setup:
+ cleanup:
+ args: 1933
+ input:
+ output: Water Rooster
+- setup:
+ cleanup:
+ args: 1934
+ input:
+ output: Wood Dog
+- setup:
+ cleanup:
+ args: 1935
+ input:
+ output: Wood Pig
+- setup:
+ cleanup:
+ args: 1936
+ input:
+ output: Fire Rat
+- setup:
+ cleanup:
+ args: 1937
+ input:
+ output: Fire Ox
+- setup:
+ cleanup:
+ args: 1938
+ input:
+ output: Earth Tiger
+- setup:
+ cleanup:
+ args: 1939
+ input:
+ output: Earth Rabbit
+- setup:
+ cleanup:
+ args: 1940
+ input:
+ output: Metal Dragon
+- setup:
+ cleanup:
+ args: 1941
+ input:
+ output: Metal Snake
+- setup:
+ cleanup:
+ args: 1942
+ input:
+ output: Water Horse
+- setup:
+ cleanup:
+ args: 1943
+ input:
+ output: Water Goat
+- setup:
+ cleanup:
+ args: 1944
+ input:
+ output: Wood Monkey
+- setup:
+ cleanup:
+ args: 1945
+ input:
+ output: Wood Rooster
+- setup:
+ cleanup:
+ args: 1946
+ input:
+ output: Fire Dog
+- setup:
+ cleanup:
+ args: 1947
+ input:
+ output: Fire Pig
+- setup:
+ cleanup:
+ args: 1948
+ input:
+ output: Earth Rat
+- setup:
+ cleanup:
+ args: 1949
+ input:
+ output: Earth Ox
+- setup:
+ cleanup:
+ args: 1950
+ input:
+ output: Metal Tiger
+- setup:
+ cleanup:
+ args: 1951
+ input:
+ output: Metal Rabbit
+- setup:
+ cleanup:
+ args: 1952
+ input:
+ output: Water Dragon
+- setup:
+ cleanup:
+ args: 1953
+ input:
+ output: Water Snake
+- setup:
+ cleanup:
+ args: 1954
+ input:
+ output: Wood Horse
+- setup:
+ cleanup:
+ args: 1955
+ input:
+ output: Wood Goat
+- setup:
+ cleanup:
+ args: 1956
+ input:
+ output: Fire Monkey
+- setup:
+ cleanup:
+ args: 1957
+ input:
+ output: Fire Rooster
+- setup:
+ cleanup:
+ args: 1958
+ input:
+ output: Earth Dog
+- setup:
+ cleanup:
+ args: 1959
+ input:
+ output: Earth Pig
+- setup:
+ cleanup:
+ args: 1960
+ input:
+ output: Metal Rat
+- setup:
+ cleanup:
+ args: 1961
+ input:
+ output: Metal Ox
+- setup:
+ cleanup:
+ args: 1962
+ input:
+ output: Water Tiger
+- setup:
+ cleanup:
+ args: 1963
+ input:
+ output: Water Rabbit
+- setup:
+ cleanup:
+ args: 1964
+ input:
+ output: Wood Dragon
+- setup:
+ cleanup:
+ args: 1965
+ input:
+ output: Wood Snake
+- setup:
+ cleanup:
+ args: 1966
+ input:
+ output: Fire Horse
+- setup:
+ cleanup:
+ args: 1967
+ input:
+ output: Fire Goat
+- setup:
+ cleanup:
+ args: 1968
+ input:
+ output: Earth Monkey
+- setup:
+ cleanup:
+ args: 1969
+ input:
+ output: Earth Rooster
+- setup:
+ cleanup:
+ args: 1970
+ input:
+ output: Metal Dog
+- setup:
+ cleanup:
+ args: 1971
+ input:
+ output: Metal Pig
+- setup:
+ cleanup:
+ args: 1972
+ input:
+ output: Water Rat
+- setup:
+ cleanup:
+ args: 1973
+ input:
+ output: Water Ox
+- setup:
+ cleanup:
+ args: 1974
+ input:
+ output: Wood Tiger
+- setup:
+ cleanup:
+ args: 1975
+ input:
+ output: Wood Rabbit
+- setup:
+ cleanup:
+ args: 1976
+ input:
+ output: Fire Dragon
+- setup:
+ cleanup:
+ args: 1977
+ input:
+ output: Fire Snake
+- setup:
+ cleanup:
+ args: 1978
+ input:
+ output: Earth Horse
+- setup:
+ cleanup:
+ args: 1979
+ input:
+ output: Earth Goat
+- setup:
+ cleanup:
+ args: 1980
+ input:
+ output: Metal Monkey
+- setup:
+ cleanup:
+ args: 1981
+ input:
+ output: Metal Rooster
+- setup:
+ cleanup:
+ args: 1982
+ input:
+ output: Water Dog
+- setup:
+ cleanup:
+ args: 1983
+ input:
+ output: Water Pig
+- setup:
+ cleanup:
+ args: 1984
+ input:
+ output: Wood Rat
+- setup:
+ cleanup:
+ args: 1985
+ input:
+ output: Wood Ox
+- setup:
+ cleanup:
+ args: 1986
+ input:
+ output: Fire Tiger
+- setup:
+ cleanup:
+ args: 1987
+ input:
+ output: Fire Rabbit
+- setup:
+ cleanup:
+ args: 1988
+ input:
+ output: Earth Dragon
+- setup:
+ cleanup:
+ args: 1989
+ input:
+ output: Earth Snake
+- setup:
+ cleanup:
+ args: 1990
+ input:
+ output: Metal Horse
+- setup:
+ cleanup:
+ args: 1991
+ input:
+ output: Metal Goat
+- setup:
+ cleanup:
+ args: 1992
+ input:
+ output: Water Monkey
+- setup:
+ cleanup:
+ args: 1993
+ input:
+ output: Water Rooster
+- setup:
+ cleanup:
+ args: 1994
+ input:
+ output: Wood Dog
+- setup:
+ cleanup:
+ args: 1995
+ input:
+ output: Wood Pig
+- setup:
+ cleanup:
+ args: 1996
+ input:
+ output: Fire Rat
+- setup:
+ cleanup:
+ args: 1997
+ input:
+ output: Fire Ox
+- setup:
+ cleanup:
+ args: 1998
+ input:
+ output: Earth Tiger
+- setup:
+ cleanup:
+ args: 1999
+ input:
+ output: Earth Rabbit
+- setup:
+ cleanup:
+ args: 2000
+ input:
+ output: Metal Dragon
+- setup:
+ cleanup:
+ args: 2001
+ input:
+ output: Metal Snake
+- setup:
+ cleanup:
+ args: 2002
+ input:
+ output: Water Horse
+- setup:
+ cleanup:
+ args: 2003
+ input:
+ output: Water Goat
+- setup:
+ cleanup:
+ args: 2004
+ input:
+ output: Wood Monkey
+- setup:
+ cleanup:
+ args: 2005
+ input:
+ output: Wood Rooster
+- setup:
+ cleanup:
+ args: 2006
+ input:
+ output: Fire Dog
+- setup:
+ cleanup:
+ args: 2007
+ input:
+ output: Fire Pig
+- setup:
+ cleanup:
+ args: 2008
+ input:
+ output: Earth Rat
+- setup:
+ cleanup:
+ args: 2009
+ input:
+ output: Earth Ox
+- setup:
+ cleanup:
+ args: 2010
+ input:
+ output: Metal Tiger
+- setup:
+ cleanup:
+ args: 2011
+ input:
+ output: Metal Rabbit
+- setup:
+ cleanup:
+ args: 2012
+ input:
+ output: Water Dragon
+- setup:
+ cleanup:
+ args: 2013
+ input:
+ output: Water Snake
+- setup:
+ cleanup:
+ args: 2014
+ input:
+ output: Wood Horse
+- setup:
+ cleanup:
+ args: 2015
+ input:
+ output: Wood Goat
+- setup:
+ cleanup:
+ args: 2016
+ input:
+ output: Fire Monkey
+- setup:
+ cleanup:
+ args: 2017
+ input:
+ output: Fire Rooster
+- setup:
+ cleanup:
+ args: 2018
+ input:
+ output: Earth Dog
+- setup:
+ cleanup:
+ args: 2019
+ input:
+ output: Earth Pig
+- setup:
+ cleanup:
+ args: 2020
+ input:
+ output: Metal Rat
+- setup:
+ cleanup:
+ args: 2021
+ input:
+ output: Metal Ox
+- setup:
+ cleanup:
+ args: 2022
+ input:
+ output: Water Tiger
+- setup:
+ cleanup:
+ args: 2023
+ input:
+ output: Water Rabbit
+- setup:
+ cleanup:
+ args: 2024
+ input:
+ output: Wood Dragon
+- setup:
+ cleanup:
+ args: 2025
+ input:
+ output: Wood Snake
+- setup:
+ cleanup:
+ args: 2026
+ input:
+ output: Fire Horse
+- setup:
+ cleanup:
+ args: 2027
+ input:
+ output: Fire Goat
+- setup:
+ cleanup:
+ args: 2028
+ input:
+ output: Earth Monkey
+- setup:
+ cleanup:
+ args: 2029
+ input:
+ output: Earth Rooster
+- setup:
+ cleanup:
+ args: 2030
+ input:
+ output: Metal Dog
+- setup:
+ cleanup:
+ args: 2031
+ input:
+ output: Metal Pig
+- setup:
+ cleanup:
+ args: 2032
+ input:
+ output: Water Rat
+- setup:
+ cleanup:
+ args: 2033
+ input:
+ output: Water Ox
+- setup:
+ cleanup:
+ args: 2034
+ input:
+ output: Wood Tiger
+- setup:
+ cleanup:
+ args: 2035
+ input:
+ output: Wood Rabbit
+- setup:
+ cleanup:
+ args: 2036
+ input:
+ output: Fire Dragon
+- setup:
+ cleanup:
+ args: 2037
+ input:
+ output: Fire Snake
+- setup:
+ cleanup:
+ args: 2038
+ input:
+ output: Earth Horse
+- setup:
+ cleanup:
+ args: 2039
+ input:
+ output: Earth Goat
+- setup:
+ cleanup:
+ args: 2040
+ input:
+ output: Metal Monkey
+- setup:
+ cleanup:
+ args: 2041
+ input:
+ output: Metal Rooster
+- setup:
+ cleanup:
+ args: 2042
+ input:
+ output: Water Dog
+- setup:
+ cleanup:
+ args: 2043
+ input:
+ output: Water Pig
diff --git a/challenge-103/paulo-custodio/t/test-2.yaml b/challenge-103/paulo-custodio/t/test-2.yaml
new file mode 100644
index 0000000000..720f55f501
--- /dev/null
+++ b/challenge-103/paulo-custodio/t/test-2.yaml
@@ -0,0 +1,308 @@
+- setup:
+ cleanup:
+ args: 1606134123 1606134123 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)
+ 00:00:00
+- setup:
+ cleanup:
+ args: 1606134123 1606134423 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)
+ 00:05:00
+- setup:
+ cleanup:
+ args: 1606134123 1606134723 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)
+ 00:10:00
+- setup:
+ cleanup:
+ args: 1606134123 1606135023 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)
+ 00:15:00
+- setup:
+ cleanup:
+ args: 1606134123 1606135323 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)
+ 00:20:00
+- setup:
+ cleanup:
+ args: 1606134123 1606135623 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 1: The Bishop (broadcast date: 1937-07-23)
+ 00:25:00
+- setup:
+ cleanup:
+ args: 1606134123 1606135923 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)
+ 00:01:31
+- setup:
+ cleanup:
+ args: 1606134123 1606136223 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)
+ 00:06:31
+- setup:
+ cleanup:
+ args: 1606134123 1606136523 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)
+ 00:11:31
+- setup:
+ cleanup:
+ args: 1606134123 1606136823 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)
+ 00:16:31
+- setup:
+ cleanup:
+ args: 1606134123 1606137123 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)
+ 00:21:31
+- setup:
+ cleanup:
+ args: 1606134123 1606137423 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 2: Javert (broadcast date: 1937-07-30)
+ 00:26:31
+- setup:
+ cleanup:
+ args: 1606134123 1606137723 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)
+ 00:02:47
+- setup:
+ cleanup:
+ args: 1606134123 1606138023 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)
+ 00:07:47
+- setup:
+ cleanup:
+ args: 1606134123 1606138323 playlist.csv
+ input:
+ output: |
+ Les Miserables Episode 3: The Trial (broadcast date: 1937-08-06)
+ 00:12:47
<