Skip to content

Commit 01d8ab5

Browse files
committed
initial commit
1 parent 6e40f54 commit 01d8ab5

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

Dockerfile

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Can be any image, including ones that depend on nvidia-docker
2+
FROM python:3.7-slim-stretch
3+
4+
ADD algorithm.py /algorithm.py
5+
6+
CMD ["python", "algorithm.py"]

algorithm.py

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import os
2+
import random
3+
4+
random.seed(90210)
5+
6+
diseases = ['MEL', 'NV', 'BCC', 'AKIEC', 'BKL', 'DF', 'VASC']
7+
8+
9+
def my_algorithm(image):
10+
return [random.random() for _ in range(len(diseases))]
11+
12+
13+
# print headers
14+
print(','.join(['image'] + diseases))
15+
16+
# print scores for each image
17+
for input_file in os.listdir('/images'):
18+
scores = my_algorithm(input_file)
19+
print(','.join([input_file] + [str(x) for x in scores]))

0 commit comments

Comments
 (0)