mirror of
https://github.com/KevinMidboe/knowit_julekalender-2018.git
synced 2025-10-29 17:50:19 +00:00
New year, new round of knowit julekalender. Starting this year off a bit late, but lets see how many I can complete 🎉🎅
This commit is contained in:
@@ -1,6 +1,5 @@
|
|||||||
language: python
|
language: python
|
||||||
python:
|
python: 3.6
|
||||||
- 3.6
|
|
||||||
before_install:
|
before_install:
|
||||||
- gem install zsteg
|
- gem install zsteg
|
||||||
install:
|
install:
|
||||||
@@ -8,5 +7,4 @@ install:
|
|||||||
script:
|
script:
|
||||||
- pytest --junitxml=result.xml
|
- pytest --junitxml=result.xml
|
||||||
- python badge.py
|
- python badge.py
|
||||||
after_success:
|
after_success: coveralls
|
||||||
- coveralls
|
|
||||||
|
|||||||
2
badge.py
2
badge.py
@@ -49,7 +49,7 @@ def getColor(value):
|
|||||||
|
|
||||||
def uploadToDropbox(path):
|
def uploadToDropbox(path):
|
||||||
dbx = dropbox.Dropbox(os.environ.get('DROPBOX_ACCESS_TOKEN'))
|
dbx = dropbox.Dropbox(os.environ.get('DROPBOX_ACCESS_TOKEN'))
|
||||||
response = dbx.files_upload(getPicture(path), '/knowit/' + path, mode=WriteMode('overwrite', None))
|
response = dbx.files_upload(getPicture(path), '/knowit-18/' + path, mode=WriteMode('overwrite', None))
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
failures, total = get_xml_test_results()
|
failures, total = get_xml_test_results()
|
||||||
|
|||||||
@@ -1,69 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# @Author: KevinMidboe
|
|
||||||
# @Date: 2017-12-04 16:40:56
|
|
||||||
# @Last Modified by: KevinMidboe
|
|
||||||
# @Last Modified time: 2017-12-16 14:33:56
|
|
||||||
|
|
||||||
import re, os
|
|
||||||
from itertools import permutations
|
|
||||||
|
|
||||||
def get_wordlist():
|
|
||||||
with open(os.path.dirname(__file__) + '/wordlist.txt', 'r') as wordlist:
|
|
||||||
read_data = wordlist.read().splitlines()
|
|
||||||
wordlist.close()
|
|
||||||
return read_data
|
|
||||||
|
|
||||||
def get_letter_instances(word):
|
|
||||||
letter_instances = {}
|
|
||||||
for char in list(word):
|
|
||||||
try:
|
|
||||||
letter_instances[char] = letter_instances[char] + 1
|
|
||||||
except KeyError:
|
|
||||||
letter_instances.update({char: 1})
|
|
||||||
|
|
||||||
return letter_instances
|
|
||||||
|
|
||||||
def bigram(word, n=2):
|
|
||||||
gram = ''
|
|
||||||
for i in range(len(word)):
|
|
||||||
gram += word[i:i+n]
|
|
||||||
if (len(word[i:i+n]) < n):
|
|
||||||
gram = gram[:-len(word[i:i+n])]
|
|
||||||
return ''.join(gram)
|
|
||||||
|
|
||||||
def has_number(string):
|
|
||||||
return bool(re.search(r'\d', string))
|
|
||||||
|
|
||||||
def main():
|
|
||||||
anagramed_gram = 'aeteesasrsssstaesersrrsse'
|
|
||||||
inst = get_letter_instances(anagramed_gram)
|
|
||||||
keys = set(inst.keys())
|
|
||||||
values = set(inst.values())
|
|
||||||
wordlist = get_wordlist()
|
|
||||||
answer = []
|
|
||||||
|
|
||||||
for word in wordlist:
|
|
||||||
if (has_number(word)): continue
|
|
||||||
word = word.lower()
|
|
||||||
# print('Working on word:', word)
|
|
||||||
n = 1
|
|
||||||
if set(get_letter_instances(word).keys()) == keys:
|
|
||||||
while True:
|
|
||||||
b = bigram(word, n)
|
|
||||||
# print(b)
|
|
||||||
|
|
||||||
if set(get_letter_instances(b).values()) == values:
|
|
||||||
answer.append(str(n) + '-' + word)
|
|
||||||
# exit(0)
|
|
||||||
break
|
|
||||||
|
|
||||||
if (n > len(anagramed_gram) or len(b) > len(anagramed_gram)):
|
|
||||||
break
|
|
||||||
n+=1
|
|
||||||
|
|
||||||
print(answer)
|
|
||||||
return answer
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
466544
luke_01/wordlist.txt
466544
luke_01/wordlist.txt
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
Before Width: | Height: | Size: 1.6 MiB |
@@ -1,12 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
import subprocess, os
|
|
||||||
|
|
||||||
def main():
|
|
||||||
path = os.path.dirname(os.path.realpath(__file__)) + '/bilde.png'
|
|
||||||
result = subprocess.run(['zsteg', path], stdout=subprocess.PIPE)
|
|
||||||
decode = result.stdout.decode('utf-8')
|
|
||||||
|
|
||||||
return decode
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,50 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# @Author: KevinMidboe
|
|
||||||
# @Date: 2017-12-04 16:40:56
|
|
||||||
# @Last Modified by: KevinMidboe
|
|
||||||
# @Last Modified time: 2017-12-16 14:09:31
|
|
||||||
import os
|
|
||||||
|
|
||||||
def get_wordlist():
|
|
||||||
with open(os.path.dirname(__file__) + '/ordliste.txt', 'r') as wordlist:
|
|
||||||
read_data = wordlist.read().splitlines()
|
|
||||||
wordlist.close()
|
|
||||||
return read_data
|
|
||||||
|
|
||||||
def get_letter_instances(word):
|
|
||||||
letter_instances = {}
|
|
||||||
for char in list(word):
|
|
||||||
try:
|
|
||||||
letter_instances[char] = letter_instances[char] + 1
|
|
||||||
except KeyError:
|
|
||||||
letter_instances.update({char: 1})
|
|
||||||
|
|
||||||
return letter_instances
|
|
||||||
|
|
||||||
def can_be_palindrom(word):
|
|
||||||
instance = get_letter_instances(word)
|
|
||||||
values = list(instance.values())
|
|
||||||
odd = 0
|
|
||||||
for value in values:
|
|
||||||
if (value & 1):
|
|
||||||
odd += 1
|
|
||||||
|
|
||||||
return (odd <= 1)
|
|
||||||
|
|
||||||
def is_palindrom(string):
|
|
||||||
return string == string[::-1]
|
|
||||||
|
|
||||||
def main():
|
|
||||||
matches = []
|
|
||||||
wordlist = get_wordlist()
|
|
||||||
|
|
||||||
for word in wordlist:
|
|
||||||
if (not is_palindrom(word) and can_be_palindrom(word)):
|
|
||||||
matches.append(word)
|
|
||||||
|
|
||||||
print(matches, len(matches))
|
|
||||||
return len(matches)
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
rdet “regninger” er et palindrom, det leses likt fremlengs og baklengs. Ordet “tartar” er ikke et palindrom, men anagrammet “rattar” er det. Hvor mange ord fra denne ordlisten er ikke et palindrom, men har ett eller flere anagram som er det?
|
|
||||||
|
|
||||||
22282
luke_04/ordliste.txt
22282
luke_04/ordliste.txt
File diff suppressed because it is too large
Load Diff
@@ -1,29 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
# @Author: KevinMidboe
|
|
||||||
# @Date: 2017-12-04 16:40:56
|
|
||||||
# @Last Modified by: KevinMidboe
|
|
||||||
# @Last Modified time: 2017-12-05 11:13:52
|
|
||||||
|
|
||||||
def gold():
|
|
||||||
gold_row = [1]
|
|
||||||
number = 1
|
|
||||||
while True:
|
|
||||||
countdown = gold_row[number-1]
|
|
||||||
while countdown > 0:
|
|
||||||
gold_row.append(number)
|
|
||||||
countdown -=1
|
|
||||||
if len(gold_row) >= 1000000:
|
|
||||||
return gold_row
|
|
||||||
number +=1
|
|
||||||
|
|
||||||
def main():
|
|
||||||
row = gold()
|
|
||||||
|
|
||||||
print('Finished with million iterations')
|
|
||||||
answer = sum(row)+1
|
|
||||||
print(answer)
|
|
||||||
return answer
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,23 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
import os
|
|
||||||
from pprint import pprint
|
|
||||||
|
|
||||||
def readFile():
|
|
||||||
with open(os.path.dirname(__file__) + '/verda.txt', 'r') as f:
|
|
||||||
read_data = f.read().splitlines()
|
|
||||||
f.close()
|
|
||||||
return read_data
|
|
||||||
|
|
||||||
def main():
|
|
||||||
data = readFile()
|
|
||||||
for line in data[1:]:
|
|
||||||
listview = line.split('\t')
|
|
||||||
city = listview[3]
|
|
||||||
country = listview[10]
|
|
||||||
cord = [listview[12], listview[13]]
|
|
||||||
# print('place: {}', city, 'in', country)
|
|
||||||
# print('cord:', cord)
|
|
||||||
|
|
||||||
if __name__=='__main__':
|
|
||||||
main()
|
|
||||||
16371
luke_06/verda.txt
16371
luke_06/verda.txt
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
def main():
|
|
||||||
participants = list(range(1, 1501))
|
|
||||||
while len(participants) > 1:
|
|
||||||
for pers in participants:
|
|
||||||
try:
|
|
||||||
participants.pop(participants.index(pers) + 1)
|
|
||||||
except IndexError:
|
|
||||||
participants.pop(0)
|
|
||||||
|
|
||||||
|
|
||||||
return participants.pop()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,26 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
def palindrome(num):
|
|
||||||
return int(str(num)[::-1])
|
|
||||||
|
|
||||||
def isPrime(num):
|
|
||||||
state = True
|
|
||||||
for n in range(2, num):
|
|
||||||
if num % n == 0:
|
|
||||||
state = False
|
|
||||||
return state
|
|
||||||
|
|
||||||
def main():
|
|
||||||
primes = []
|
|
||||||
mirptall = 0
|
|
||||||
for n in range(1000):
|
|
||||||
if isPrime(n) and n != palindrome(n):
|
|
||||||
primes.append(n)
|
|
||||||
|
|
||||||
if (palindrome(n) in primes):
|
|
||||||
mirptall += 2
|
|
||||||
|
|
||||||
return mirptall
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,22 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
def main():
|
|
||||||
trees = [23, 74, 26, 23, 92, 92, 44, 13, 34, 23, 69, 4, 19, 94, 94, 38, 14, 9, 51, 98, 72, 46, 17, 25, 21, 87, 99, 50, 59, 53, 82, 24, 93, 16, 88, 52, 14, 38, 27, 7, 18, 81, 13, 75, 80, 11, 29, 39, 37, 78, 55, 17, 78, 12, 77, 84, 63, 29, 68, 32, 17, 55, 31, 30, 3, 17, 99, 6, 45, 81, 75, 31, 50, 93, 66, 98, 94, 59, 68, 30, 98, 57, 83, 75, 68, 85, 98, 76, 91, 23, 53, 42, 72, 77]
|
|
||||||
trees_cut = []
|
|
||||||
while True:
|
|
||||||
try:
|
|
||||||
cut_length = min(x for x in trees if x > 0)
|
|
||||||
except ValueError:
|
|
||||||
break
|
|
||||||
|
|
||||||
counter = 0
|
|
||||||
for i, tree in enumerate(trees):
|
|
||||||
if (trees[i] > 0):
|
|
||||||
trees[i] = tree - cut_length
|
|
||||||
counter += 1
|
|
||||||
trees_cut.append(counter)
|
|
||||||
|
|
||||||
return trees_cut
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,35 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
import os
|
|
||||||
|
|
||||||
def readFile():
|
|
||||||
with open(os.path.dirname(__file__) + '/hjelpere.txt', 'r') as hjelpere:
|
|
||||||
read_data = hjelpere.read().splitlines()
|
|
||||||
hjelpere.close()
|
|
||||||
return read_data
|
|
||||||
|
|
||||||
def main():
|
|
||||||
entry_list = readFile()
|
|
||||||
highest_value = []
|
|
||||||
|
|
||||||
light_state = False
|
|
||||||
memory = [False for i in range(100)]
|
|
||||||
counter = 0
|
|
||||||
for i, entry in enumerate(entry_list):
|
|
||||||
entry = int(entry)-1
|
|
||||||
if entry == 0:
|
|
||||||
if light_state:
|
|
||||||
counter += 1
|
|
||||||
light_state = False
|
|
||||||
if (counter >= 99):
|
|
||||||
highest_value.append(i)
|
|
||||||
else:
|
|
||||||
if memory[entry] == False and light_state == False:
|
|
||||||
memory[entry] = True
|
|
||||||
light_state = True
|
|
||||||
|
|
||||||
answer = min(highest_value)+1
|
|
||||||
print(answer)
|
|
||||||
return answer
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
14367
luke_16/hjelpere.txt
14367
luke_16/hjelpere.txt
File diff suppressed because it is too large
Load Diff
@@ -1,16 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
def main():
|
|
||||||
n = 0
|
|
||||||
while True:
|
|
||||||
if (str(n)[-1] == '6'):
|
|
||||||
numList = list(str(n))
|
|
||||||
numList.insert(0, numList[-1])
|
|
||||||
six_prefixed = int(''.join(map(str, numList[:-1])))
|
|
||||||
if (six_prefixed/4 == n):
|
|
||||||
print('SOLVED:', n)
|
|
||||||
return n
|
|
||||||
n += 1
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
@@ -1,41 +0,0 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
import os
|
|
||||||
from PIL import Image, ImageDraw
|
|
||||||
|
|
||||||
def readFile():
|
|
||||||
with open(os.path.dirname(__file__) + '/path.txt', 'r') as f:
|
|
||||||
return [line.split(", ") for line in f.read().splitlines()]
|
|
||||||
|
|
||||||
def plotRectangle(i, j, board, fill='red'):
|
|
||||||
board.rectangle(((100+(10*j), 200+(10*i)), 100+(10*j+10), 200+(10*i+10)), fill=fill, outline="black")
|
|
||||||
return board
|
|
||||||
|
|
||||||
def main():
|
|
||||||
path = readFile()
|
|
||||||
boardImg = Image.new('RGB', (400, 300), (255,255,255))
|
|
||||||
board = ImageDraw.Draw(boardImg)
|
|
||||||
x, y = [0,0]
|
|
||||||
|
|
||||||
for step, direction in path:
|
|
||||||
if (direction == 'north'):
|
|
||||||
for n in range(int(step)):
|
|
||||||
x -= 1
|
|
||||||
board = plotRectangle(x, y, board)
|
|
||||||
elif (direction == 'east'):
|
|
||||||
for n in range(int(step)):
|
|
||||||
y += 1
|
|
||||||
board = plotRectangle(x, y, board)
|
|
||||||
elif (direction == 'south'):
|
|
||||||
for n in range(int(step)):
|
|
||||||
x += 1
|
|
||||||
board = plotRectangle(x, y, board)
|
|
||||||
elif (direction == 'west'):
|
|
||||||
for n in range(int(step)):
|
|
||||||
y -= 1
|
|
||||||
board = plotRectangle(x, y, board)
|
|
||||||
|
|
||||||
return 'batman'
|
|
||||||
boardImg.show()
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
|
||||||
main()
|
|
||||||
148
luke_19/path.txt
148
luke_19/path.txt
@@ -1,148 +0,0 @@
|
|||||||
10, east
|
|
||||||
1, west
|
|
||||||
1, north
|
|
||||||
4, east
|
|
||||||
1, north
|
|
||||||
2, east
|
|
||||||
1, north
|
|
||||||
2, east
|
|
||||||
1, north
|
|
||||||
1, east
|
|
||||||
1, north
|
|
||||||
1, east
|
|
||||||
2, north
|
|
||||||
1, east
|
|
||||||
6, north
|
|
||||||
1, west
|
|
||||||
2, north
|
|
||||||
1, west
|
|
||||||
1, north
|
|
||||||
1, west
|
|
||||||
1, north
|
|
||||||
2, west
|
|
||||||
1, north
|
|
||||||
2, west
|
|
||||||
1, north
|
|
||||||
3, west
|
|
||||||
1, north
|
|
||||||
10, west
|
|
||||||
1, south
|
|
||||||
3, west
|
|
||||||
1, south
|
|
||||||
2, west
|
|
||||||
1, south
|
|
||||||
2, west
|
|
||||||
1, south
|
|
||||||
1, west
|
|
||||||
1, south
|
|
||||||
1, west
|
|
||||||
2, south
|
|
||||||
1, west
|
|
||||||
6, south
|
|
||||||
1, east
|
|
||||||
2, south
|
|
||||||
1, east
|
|
||||||
1, south
|
|
||||||
1, east
|
|
||||||
1, south
|
|
||||||
2, east
|
|
||||||
1, south
|
|
||||||
2, east
|
|
||||||
1, south
|
|
||||||
4, east
|
|
||||||
4, west
|
|
||||||
1, north
|
|
||||||
2, west
|
|
||||||
2, north
|
|
||||||
1, east
|
|
||||||
1, west
|
|
||||||
2, north
|
|
||||||
2, west
|
|
||||||
1, north
|
|
||||||
3, east
|
|
||||||
1, north
|
|
||||||
4, west
|
|
||||||
19, east
|
|
||||||
1, south
|
|
||||||
12, west
|
|
||||||
1, east
|
|
||||||
2, south
|
|
||||||
2, north
|
|
||||||
10, east
|
|
||||||
2, south
|
|
||||||
2, north
|
|
||||||
3, west
|
|
||||||
1, south
|
|
||||||
4, west
|
|
||||||
1, east
|
|
||||||
1, south
|
|
||||||
2, east
|
|
||||||
1, west
|
|
||||||
2, south
|
|
||||||
5, north
|
|
||||||
13, east
|
|
||||||
1, west
|
|
||||||
1, south
|
|
||||||
3, west
|
|
||||||
1, east
|
|
||||||
1, south
|
|
||||||
2, east
|
|
||||||
2, west
|
|
||||||
2, south
|
|
||||||
1, west
|
|
||||||
1, east
|
|
||||||
5, north
|
|
||||||
3, east
|
|
||||||
26, west
|
|
||||||
1, north
|
|
||||||
26, east
|
|
||||||
1, north
|
|
||||||
26, west
|
|
||||||
1, north
|
|
||||||
26, east
|
|
||||||
1, west
|
|
||||||
1, north
|
|
||||||
6, west
|
|
||||||
1, east
|
|
||||||
1, north
|
|
||||||
5, east
|
|
||||||
2, west
|
|
||||||
1, north
|
|
||||||
3, west
|
|
||||||
1, north
|
|
||||||
1, east
|
|
||||||
1, west
|
|
||||||
1, north
|
|
||||||
1, west
|
|
||||||
1, east
|
|
||||||
5, south
|
|
||||||
4, west
|
|
||||||
1, north
|
|
||||||
6, west
|
|
||||||
1, east
|
|
||||||
1, north
|
|
||||||
4, east
|
|
||||||
1, north
|
|
||||||
4, west
|
|
||||||
1, north
|
|
||||||
4, east
|
|
||||||
1, north
|
|
||||||
4, west
|
|
||||||
1, north
|
|
||||||
1, south
|
|
||||||
4, east
|
|
||||||
1, north
|
|
||||||
6, south
|
|
||||||
8, west
|
|
||||||
1, north
|
|
||||||
6, west
|
|
||||||
1, north
|
|
||||||
5, east
|
|
||||||
1, north
|
|
||||||
3, west
|
|
||||||
3, east
|
|
||||||
1, north
|
|
||||||
1, west
|
|
||||||
1, east
|
|
||||||
1, north
|
|
||||||
1, east
|
|
||||||
97
result.xml
Normal file
97
result.xml
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?><testsuite errors="0" failures="24" name="pytest" skips="0" tests="24" time="0.514"><testcase classname="tests.test_luke01" file="tests/test_luke01.py" line="0" name="test_answer" time="0.00144219398499"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke01.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke02" file="tests/test_luke02.py" line="0" name="test_answer" time="0.00109601020813"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke02.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke03" file="tests/test_luke03.py" line="0" name="test_answer" time="0.00102782249451"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke03.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke04" file="tests/test_luke04.py" line="0" name="test_answer" time="0.00121712684631"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke04.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke05" file="tests/test_luke05.py" line="0" name="test_answer" time="0.00104904174805"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke05.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke06" file="tests/test_luke06.py" line="0" name="test_answer" time="0.000803232192993"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke06.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke07" file="tests/test_luke07.py" line="0" name="test_answer" time="0.000859022140503"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke07.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke08" file="tests/test_luke08.py" line="0" name="test_answer" time="0.000931978225708"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke08.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke09" file="tests/test_luke09.py" line="0" name="test_answer" time="0.000925064086914"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke09.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke10" file="tests/test_luke10.py" line="0" name="test_answer" time="0.00153303146362"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke10.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke11" file="tests/test_luke11.py" line="0" name="test_answer" time="0.00113201141357"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke11.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke12" file="tests/test_luke12.py" line="0" name="test_answer" time="0.000910997390747"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke12.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke13" file="tests/test_luke13.py" line="0" name="test_answer" time="0.000856876373291"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke13.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke14" file="tests/test_luke14.py" line="0" name="test_answer" time="0.000885248184204"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke14.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke15" file="tests/test_luke15.py" line="0" name="test_answer" time="0.00135970115662"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke15.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke16" file="tests/test_luke16.py" line="0" name="test_answer" time="0.000919103622437"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke16.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke17" file="tests/test_luke17.py" line="0" name="test_answer" time="0.000977993011475"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke17.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke18" file="tests/test_luke18.py" line="0" name="test_answer" time="0.00114750862122"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke18.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke19" file="tests/test_luke19.py" line="0" name="test_answer" time="0.00104975700378"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke19.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke20" file="tests/test_luke20.py" line="0" name="test_answer" time="0.00127768516541"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke20.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke21" file="tests/test_luke21.py" line="0" name="test_answer" time="0.00162792205811"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke21.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke22" file="tests/test_luke22.py" line="0" name="test_answer" time="0.00125622749329"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke22.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke23" file="tests/test_luke23.py" line="0" name="test_answer" time="0.00110816955566"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke23.py:2: AssertionError</failure></testcase><testcase classname="tests.test_luke24" file="tests/test_luke24.py" line="0" name="test_answer" time="0.00100684165955"><failure message="assert False">def test_answer():
|
||||||
|
> assert False
|
||||||
|
E assert False
|
||||||
|
|
||||||
|
tests/test_luke24.py:2: AssertionError</failure></testcase></testsuite>
|
||||||
@@ -1 +0,0 @@
|
|||||||
|
|
||||||
|
|||||||
BIN
tests/__init__.pyc
Normal file
BIN
tests/__init__.pyc
Normal file
Binary file not shown.
@@ -1,6 +1,2 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
from luke_01.bigram_trigram import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert '5-reasserts' in main()
|
assert False
|
||||||
|
|||||||
@@ -1,11 +1,2 @@
|
|||||||
from luke_03.steganography import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
answer = 'Steganography is awesome and you Knowit!'
|
|
||||||
output = main()
|
|
||||||
print(output)
|
|
||||||
print(answer in output)
|
|
||||||
if answer in output:
|
|
||||||
assert True
|
|
||||||
else:
|
|
||||||
assert False
|
assert False
|
||||||
|
|||||||
@@ -1,6 +1,2 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
from luke_04.not_pal_but_an import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 111
|
assert False
|
||||||
|
|||||||
@@ -1,6 +1,2 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
from luke_05.gullrekka import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 3792638403
|
assert False
|
||||||
|
|||||||
@@ -1,5 +1,2 @@
|
|||||||
from luke_06.lightning_mc_queen import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
# assert main() == 53
|
assert False
|
||||||
assert True
|
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
from luke_10.julebord import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 953
|
assert False
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
from luke_11.mirptall import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 36
|
assert False
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
from luke_15.trekutting import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == [94, 93, 92, 91, 90, 89, 88, 87, 85, 83, 82, 78, 77, 76, 75, 71, 70, 69, 68, 67, 65, 63, 61, 60, 59, 58, 56, 55, 54, 53, 52, 51, 49, 48, 47, 45, 43, 42, 40, 39, 38, 35, 34, 32, 31, 28, 27, 25, 23, 22, 20, 19, 18, 17, 16, 15, 14, 13, 11, 9, 6, 2]
|
assert False
|
||||||
|
|||||||
@@ -1,6 +1,2 @@
|
|||||||
#!/usr/bin/env python3.6
|
|
||||||
|
|
||||||
from luke_16.grinchen import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 10553
|
assert False
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
from luke_17.seksertriksing import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 153846
|
assert False
|
||||||
|
|||||||
@@ -1,4 +1,2 @@
|
|||||||
from luke_19.engler import main
|
|
||||||
|
|
||||||
def test_answer():
|
def test_answer():
|
||||||
assert main() == 'batman'
|
assert False
|
||||||
|
|||||||
Reference in New Issue
Block a user