trackler 2.0.8.18 → 2.0.8.19

Sign up to get free protection for your applications and to get access to all the features.
Files changed (165) hide show
  1. checksums.yaml +4 -4
  2. data/common/.gitignore +1 -0
  3. data/common/.travis.yml +5 -8
  4. data/common/README.md +18 -5
  5. data/common/exercises/grep/canonical-data.json +290 -269
  6. data/common/exercises/phone-number/canonical-data.json +2 -2
  7. data/common/exercises/pov/canonical-data.json +2 -5
  8. data/common/exercises/roman-numerals/canonical-data.json +112 -74
  9. data/common/exercises/tournament/canonical-data.json +86 -85
  10. data/common/exercises/two-bucket/canonical-data.json +55 -47
  11. data/common/package.json +16 -0
  12. data/common/yarn.lock +195 -0
  13. data/lib/trackler/version.rb +1 -1
  14. data/tracks/c/docs/LEARNING.md +1 -1
  15. data/tracks/c/exercises/space-age/src/example.c +15 -47
  16. data/tracks/c/exercises/space-age/src/example.h +12 -8
  17. data/tracks/c/exercises/space-age/test/test_space_age.c +8 -8
  18. data/tracks/ceylon/docs/TESTS.md +5 -2
  19. data/tracks/ceylon/exercises/TRACK_HINTS.md +5 -2
  20. data/tracks/csharp/.gitignore +0 -4
  21. data/tracks/csharp/.travis.yml +9 -20
  22. data/tracks/csharp/appveyor.yml +2 -4
  23. data/tracks/csharp/build.cake +95 -0
  24. data/tracks/csharp/build.ps1 +189 -0
  25. data/tracks/csharp/build.sh +99 -31
  26. data/tracks/csharp/circle.yml +3 -12
  27. data/tracks/delphi/config.json +8 -0
  28. data/tracks/delphi/exercises/minesweeper/MineSweeper.dpr +60 -0
  29. data/tracks/delphi/exercises/minesweeper/uMineSweeperExample.pas +70 -0
  30. data/tracks/delphi/exercises/minesweeper/uMineSweeperTest.pas +270 -0
  31. data/tracks/dlang/config.json +86 -31
  32. data/tracks/elixir/config.json +7 -0
  33. data/tracks/elixir/exercises/rotational-cipher/example.exs +35 -0
  34. data/tracks/elixir/exercises/rotational-cipher/rotational_cipher.exs +13 -0
  35. data/tracks/elixir/exercises/rotational-cipher/rotational_cipher_test.exs +80 -0
  36. data/tracks/go/exercises/raindrops/raindrops_test.go +4 -1
  37. data/tracks/go/exercises/react/react_test.go +6 -8
  38. data/tracks/go/exercises/rna-transcription/rna_transcription_test.go +4 -1
  39. data/tracks/go/exercises/robot-simulator/robot_simulator_test.go +5 -2
  40. data/tracks/haskell/exercises/allergies/src/Allergies.hs +2 -2
  41. data/tracks/haskell/exercises/atbash-cipher/src/Atbash.hs +2 -2
  42. data/tracks/haskell/exercises/bank-account/src/BankAccount.hs +3 -3
  43. data/tracks/haskell/exercises/binary-search-tree/src/BST.hs +7 -7
  44. data/tracks/haskell/exercises/bowling/src/Bowling.hs +1 -1
  45. data/tracks/haskell/exercises/clock/src/Clock.hs +4 -4
  46. data/tracks/haskell/exercises/connect/src/Connect.hs +1 -1
  47. data/tracks/haskell/exercises/crypto-square/src/CryptoSquare.hs +1 -1
  48. data/tracks/haskell/exercises/custom-set/src/CustomSet.hs +12 -12
  49. data/tracks/haskell/exercises/difference-of-squares/src/Squares.hs +3 -3
  50. data/tracks/haskell/exercises/etl/src/ETL.hs +1 -1
  51. data/tracks/haskell/exercises/forth/src/Forth.hs +2 -2
  52. data/tracks/haskell/exercises/go-counting/src/Counting.hs +2 -2
  53. data/tracks/haskell/exercises/kindergarten-garden/src/Garden.hs +3 -3
  54. data/tracks/haskell/exercises/largest-series-product/src/Series.hs +1 -1
  55. data/tracks/haskell/exercises/lens-person/src/Person.hs +4 -4
  56. data/tracks/julia/.travis.yml +3 -2
  57. data/tracks/ocaml/exercises/all-your-base/test.ml +2 -2
  58. data/tracks/ocaml/exercises/beer-song/test.ml +25 -24
  59. data/tracks/ocaml/exercises/phone-number/test.ml +22 -22
  60. data/tracks/ocaml/exercises/run-length-encoding/test.ml +5 -5
  61. data/tracks/ocaml/exercises/word-count/test.ml +1 -1
  62. data/tracks/ocaml/tools/test-generator/templates/beer-song/template.ml +20 -1
  63. data/tracks/purescript/config.json +7 -0
  64. data/tracks/purescript/exercises/word-count/bower.json +17 -0
  65. data/tracks/purescript/exercises/word-count/examples/src/WordCount.purs +31 -0
  66. data/tracks/purescript/exercises/word-count/src/WordCount.purs +3 -0
  67. data/tracks/purescript/exercises/word-count/test/Main.purs +89 -0
  68. data/tracks/python/exercises/accumulate/accumulate.py +2 -0
  69. data/tracks/python/exercises/acronym/acronym.py +2 -0
  70. data/tracks/python/exercises/allergies/allergies.py +3 -0
  71. data/tracks/python/exercises/allergies/example.py +1 -1
  72. data/tracks/python/exercises/anagram/anagram.py +2 -0
  73. data/tracks/python/exercises/atbash-cipher/atbash_cipher.py +6 -0
  74. data/tracks/python/exercises/beer-song/beer_song.py +6 -0
  75. data/tracks/python/exercises/binary-search/binary_search.py +2 -0
  76. data/tracks/python/exercises/binary/binary.py +2 -0
  77. data/tracks/python/exercises/bob/bob.py +2 -8
  78. data/tracks/python/exercises/bracket-push/bracket_push.py +2 -0
  79. data/tracks/python/exercises/circular-buffer/circular_buffer.py +11 -0
  80. data/tracks/python/exercises/clock/clock.py +3 -0
  81. data/tracks/python/exercises/clock/example.py +1 -1
  82. data/tracks/python/exercises/crypto-square/crypto_square.py +2 -0
  83. data/tracks/python/exercises/diamond/diamond.py +2 -0
  84. data/tracks/python/exercises/difference-of-squares/difference_of_squares.py +10 -0
  85. data/tracks/python/exercises/etl/etl.py +2 -0
  86. data/tracks/python/exercises/flatten-array/flatten_array.py +2 -0
  87. data/tracks/python/exercises/gigasecond/gigasecond.py +2 -0
  88. data/tracks/python/exercises/grade-school/grade_school.py +3 -0
  89. data/tracks/python/exercises/grains/grains.py +6 -0
  90. data/tracks/python/exercises/hamming/hamming.py +2 -0
  91. data/tracks/python/exercises/hello-world/hello_world.py +2 -7
  92. data/tracks/python/exercises/hexadecimal/hexadecimal.py +2 -0
  93. data/tracks/python/exercises/house/house.py +6 -0
  94. data/tracks/python/exercises/kindergarten-garden/kindergarten_garden.py +3 -0
  95. data/tracks/python/exercises/largest-series-product/largest_series_product.py +2 -0
  96. data/tracks/python/exercises/leap/leap.py +2 -0
  97. data/tracks/python/exercises/linked-list/linked_list.py +2 -8
  98. data/tracks/python/exercises/list-ops/list_ops.py +18 -22
  99. data/tracks/python/exercises/luhn/luhn.py +3 -0
  100. data/tracks/python/exercises/matrix/matrix.py +3 -0
  101. data/tracks/python/exercises/meetup/meetup.py +2 -0
  102. data/tracks/python/exercises/minesweeper/minesweeper.py +2 -0
  103. data/tracks/python/exercises/nth-prime/nth_prime.py +2 -0
  104. data/tracks/python/exercises/nucleotide-count/nucleotide_count.py +6 -0
  105. data/tracks/python/exercises/ocr-numbers/ocr_numbers.py +6 -0
  106. data/tracks/python/exercises/ocr-numbers/{ocr_test.py → ocr_numbers_test.py} +0 -0
  107. data/tracks/python/exercises/octal/octal.py +2 -0
  108. data/tracks/python/exercises/palindrome-products/palindrome_products.py +6 -0
  109. data/tracks/python/exercises/pangram/pangram.py +2 -0
  110. data/tracks/python/exercises/pascals-triangle/pascals_triangle.py +10 -0
  111. data/tracks/python/exercises/perfect-numbers/perfect_numbers.py +6 -0
  112. data/tracks/python/exercises/phone-number/phone_number.py +3 -0
  113. data/tracks/python/exercises/pig-latin/pig_latin.py +2 -0
  114. data/tracks/python/exercises/point-mutations/point_mutations.py +2 -0
  115. data/tracks/python/exercises/poker/poker.py +2 -0
  116. data/tracks/python/exercises/prime-factors/prime_factors.py +2 -0
  117. data/tracks/python/exercises/proverb/proverb.py +2 -0
  118. data/tracks/python/exercises/pythagorean-triplet/pythagorean_triplet.py +10 -0
  119. data/tracks/python/exercises/queen-attack/queen_attack.py +6 -0
  120. data/tracks/python/exercises/rail-fence-cipher/rail_fence_cipher.py +10 -0
  121. data/tracks/python/exercises/raindrops/raindrops.py +2 -0
  122. data/tracks/python/exercises/rectangles/example.py +1 -1
  123. data/tracks/python/exercises/rectangles/rectangles.py +2 -0
  124. data/tracks/python/exercises/rectangles/{rectangles_count_test.py → rectangles_test.py} +0 -0
  125. data/tracks/python/exercises/rna-transcription/rna_transcription.py +2 -0
  126. data/tracks/python/exercises/robot-name/robot_name.py +3 -0
  127. data/tracks/python/exercises/robot-simulator/robot_simulator.py +3 -0
  128. data/tracks/python/exercises/roman-numerals/roman_numerals.py +2 -0
  129. data/tracks/python/exercises/run-length-encoding/run_length_encoding.py +6 -0
  130. data/tracks/python/exercises/run-length-encoding/{run_length_test.py → run_length_encoding_test.py} +1 -1
  131. data/tracks/python/exercises/saddle-points/saddle_points.py +2 -0
  132. data/tracks/python/exercises/say/example.py +1 -1
  133. data/tracks/python/exercises/say/say.py +2 -0
  134. data/tracks/python/exercises/say/say_test.py +3 -0
  135. data/tracks/python/exercises/scrabble-score/scrabble_score.py +2 -0
  136. data/tracks/python/exercises/secret-handshake/secret_handshake.py +6 -0
  137. data/tracks/python/exercises/secret-handshake/{handshake_test.py → secret_handshake_test.py} +0 -0
  138. data/tracks/python/exercises/series/series.py +2 -0
  139. data/tracks/python/exercises/sieve/sieve.py +2 -0
  140. data/tracks/python/exercises/simple-cipher/example.py +1 -1
  141. data/tracks/python/exercises/simple-cipher/simple_cipher.py +8 -0
  142. data/tracks/python/exercises/space-age/space_age.py +3 -0
  143. data/tracks/python/exercises/strain/strain.py +6 -0
  144. data/tracks/python/exercises/sublist/sublist.py +2 -0
  145. data/tracks/python/exercises/sum-of-multiples/sum_of_multiples.py +2 -0
  146. data/tracks/python/exercises/triangle/triangle.py +7 -0
  147. data/tracks/python/exercises/trinary/trinary.py +2 -0
  148. data/tracks/python/exercises/twelve-days/twelve_days.py +10 -0
  149. data/tracks/python/exercises/word-count/word_count.py +2 -0
  150. data/tracks/python/exercises/wordy/wordy.py +2 -0
  151. data/tracks/python/exercises/zebra-puzzle/zebra_puzzle.py +2 -0
  152. data/tracks/ruby/exercises/beer-song/.meta/.version +1 -0
  153. data/tracks/ruby/exercises/beer-song/beer_song_test.rb +62 -36
  154. data/tracks/ruby/exercises/beer-song/example.rb +1 -5
  155. data/tracks/ruby/exercises/beer-song/example.tt +22 -0
  156. data/tracks/ruby/lib/beer_song_cases.rb +43 -0
  157. data/tracks/swift/exercises/matrix/Tests/MatrixTests/MatrixTests.swift +1 -1
  158. metadata +94 -13
  159. data/common/bin/jsonlint +0 -27
  160. data/tracks/csharp/.paket/paket.bootstrapper.exe +0 -0
  161. data/tracks/csharp/Zipper.cs +0 -137
  162. data/tracks/csharp/build.cmd +0 -14
  163. data/tracks/csharp/build.fsx +0 -78
  164. data/tracks/csharp/paket.dependencies +0 -2
  165. data/tracks/csharp/paket.lock +0 -3
@@ -0,0 +1,6 @@
1
+ def verse():
2
+ pass
3
+
4
+
5
+ def song():
6
+ pass
@@ -0,0 +1,2 @@
1
+ def binary_search():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def parse_binary():
2
+ pass
@@ -1,8 +1,2 @@
1
- #
2
- # Skeleton file for the Python "Bob" exercise.
3
- #
4
-
5
-
6
- def hey(what):
7
-
8
- return
1
+ def hey():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def check_brackets():
2
+ pass
@@ -0,0 +1,11 @@
1
+ class BufferFullException(Exception):
2
+ pass
3
+
4
+
5
+ class BufferEmptyException(Exception):
6
+ pass
7
+
8
+
9
+ class CircularBuffer(object):
10
+ def __init__(self):
11
+ pass
@@ -0,0 +1,3 @@
1
+ class Clock(object):
2
+ def __init__(self):
3
+ pass
@@ -1,5 +1,5 @@
1
1
 
2
- class Clock:
2
+ class Clock(object):
3
3
  'Clock that displays 24 hour clock that rollsover properly'
4
4
 
5
5
  def __init__(self, hour, minute):
@@ -0,0 +1,2 @@
1
+ def encode():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def make_diamond():
2
+ pass
@@ -0,0 +1,10 @@
1
+ def square_of_sum():
2
+ pass
3
+
4
+
5
+ def sum_of_squares():
6
+ pass
7
+
8
+
9
+ def difference():
10
+ pass
@@ -0,0 +1,2 @@
1
+ def transform():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def flatten():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def add_gigasecond():
2
+ pass
@@ -0,0 +1,3 @@
1
+ class School(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,6 @@
1
+ def on_square():
2
+ pass
3
+
4
+
5
+ def total_after():
6
+ pass
@@ -0,0 +1,2 @@
1
+ def distance():
2
+ pass
@@ -1,7 +1,2 @@
1
- #
2
- # Skeleton file for the Python "Hello World" exercise.
3
- #
4
-
5
-
6
- def hello(name=''):
7
- return
1
+ def hello():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def hexa():
2
+ pass
@@ -0,0 +1,6 @@
1
+ def verse():
2
+ pass
3
+
4
+
5
+ def rhyme():
6
+ pass
@@ -0,0 +1,3 @@
1
+ class Garden(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,2 @@
1
+ def largest_product():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def is_leap_year():
2
+ pass
@@ -1,12 +1,6 @@
1
- # Skeleton file for the Python "linked-list" exercise.
2
- # Implement the LinkedList class
3
-
4
-
5
1
  class Node(object):
6
- def __init__(self, value, next=None, prev=None):
7
- self.value = value
8
- self.next = next
9
- self.prev = prev
2
+ def __init__(self):
3
+ pass
10
4
 
11
5
 
12
6
  class LinkedList(object):
@@ -1,38 +1,34 @@
1
- # Please, do not use the built-in python functions like map, reduce, len, etc.
2
- # that solve the same problems and try to solve it yourself instead.
1
+ def map_clone():
2
+ pass
3
3
 
4
4
 
5
- def map_clone(function, xs):
6
- return xs
5
+ def length():
6
+ pass
7
7
 
8
8
 
9
- def length(xs):
10
- return xs
9
+ def filter_clone():
10
+ pass
11
11
 
12
12
 
13
- def filter_clone(function, xs):
14
- return xs
13
+ def reverse():
14
+ pass
15
15
 
16
16
 
17
- def reverse(xs):
18
- return xs
17
+ def append():
18
+ pass
19
19
 
20
20
 
21
- def append(xs, y):
22
- return xs
21
+ def foldl():
22
+ pass
23
23
 
24
24
 
25
- def foldl(function, xs, acc):
26
- return xs
25
+ def foldr():
26
+ pass
27
27
 
28
28
 
29
- def foldr(function, xs, acc):
30
- return xs
29
+ def flat():
30
+ pass
31
31
 
32
32
 
33
- def flat(xs):
34
- return xs
35
-
36
-
37
- def concat(xs, ys):
38
- return xs
33
+ def concat():
34
+ pass
@@ -0,0 +1,3 @@
1
+ class Luhn(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,3 @@
1
+ class Matrix(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,2 @@
1
+ def meetup_day():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def board():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def nth_prime():
2
+ pass
@@ -0,0 +1,6 @@
1
+ def count():
2
+ pass
3
+
4
+
5
+ def nucleotide_counts():
6
+ pass
@@ -0,0 +1,6 @@
1
+ def number():
2
+ pass
3
+
4
+
5
+ def grid():
6
+ pass
@@ -0,0 +1,2 @@
1
+ def parse_octal():
2
+ pass
@@ -0,0 +1,6 @@
1
+ def largest_palindrome():
2
+ pass
3
+
4
+
5
+ def smallest_palindrome():
6
+ pass
@@ -0,0 +1,2 @@
1
+ def is_pangram():
2
+ pass
@@ -0,0 +1,10 @@
1
+ def triangle():
2
+ pass
3
+
4
+
5
+ def is_triangle():
6
+ pass
7
+
8
+
9
+ def row():
10
+ pass
@@ -0,0 +1,6 @@
1
+ def divisor_generator():
2
+ pass
3
+
4
+
5
+ def is_perfect():
6
+ pass
@@ -0,0 +1,3 @@
1
+ class Phone(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,2 @@
1
+ def translate():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def hamming_distance():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def poker():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def prime_factors():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def proverb():
2
+ pass
@@ -0,0 +1,10 @@
1
+ def primitive_triplets():
2
+ pass
3
+
4
+
5
+ def triplets_in_range():
6
+ pass
7
+
8
+
9
+ def is_triplet():
10
+ pass
@@ -0,0 +1,6 @@
1
+ def board():
2
+ pass
3
+
4
+
5
+ def can_attack():
6
+ pass
@@ -0,0 +1,10 @@
1
+ def fence_pattern():
2
+ pass
3
+
4
+
5
+ def encode():
6
+ pass
7
+
8
+
9
+ def decode():
10
+ pass
@@ -0,0 +1,2 @@
1
+ def raindrops():
2
+ pass
@@ -1,7 +1,7 @@
1
1
  import itertools
2
2
 
3
3
 
4
- class corners():
4
+ class corners(object):
5
5
  def __init__(self, i, j):
6
6
  # i, j are position of corner
7
7
  self.i = i
@@ -0,0 +1,2 @@
1
+ def count():
2
+ pass
@@ -0,0 +1,2 @@
1
+ def to_rna():
2
+ pass
@@ -0,0 +1,3 @@
1
+ class Robot(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,3 @@
1
+ class Robot(object):
2
+ def __init__(self):
3
+ pass
@@ -0,0 +1,2 @@
1
+ def numeral():
2
+ pass
@@ -0,0 +1,6 @@
1
+ def decode():
2
+ pass
3
+
4
+
5
+ def encode():
6
+ pass
@@ -3,7 +3,7 @@ from __future__ import unicode_literals
3
3
 
4
4
  import unittest
5
5
 
6
- from run_length import encode, decode
6
+ from run_length_encoding import encode, decode
7
7
 
8
8
 
9
9
  class WordCountTests(unittest.TestCase):
@@ -0,0 +1,2 @@
1
+ def saddle_points():
2
+ pass
@@ -25,7 +25,7 @@ def say(number, recursive=False):
25
25
  if number < k:
26
26
  if number % 100 == 0:
27
27
  return small[number // 100] + ' hundred'
28
- return small[number // 100] + ' hundred and ' + say(number % 100, True)
28
+ return small[number // 100] + ' hundred and ' + say(number % 100)
29
29
 
30
30
  if number < m:
31
31
  if number % k == 0:
@@ -0,0 +1,2 @@
1
+ def say():
2
+ pass
@@ -33,6 +33,9 @@ class SayTest(unittest.TestCase):
33
33
  self.assertEqual("one thousand two hundred and thirty-four",
34
34
  say(1234))
35
35
 
36
+ def test_eight_hundred_and_ten_thousand(self):
37
+ self.assertEqual("eight hundred and ten thousand", say(810000))
38
+
36
39
  def test_one_million(self):
37
40
  self.assertEqual("one million", say(1e6))
38
41