Added kmeans template

This commit is contained in:
2018-05-26 18:43:40 +02:00
parent b8d994bf21
commit 62799adcb4
2 changed files with 16 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
#!/usr/bin/env python
#title: kmeansMkI.py
#description: Our personal Python K-Means implementation
#author: Tillmann Brendel, Conrad Großer
#date: 26.05.2018
#version: 0.1
#usage: python pyscript.py
#notes:
#known_issues:
#python_version: 3.x
#==============================================================================
def startup():
print("Hello World")

View File

@@ -14,11 +14,13 @@ def generate09():
for i in range(0,3): for i in range(0,3):
plz = plz + str(randint(0,9)) plz = plz + str(randint(0,9))
return plz return plz
def generatePLZ(): def generatePLZ():
plz = "" plz = ""
for i in range(0,5): for i in range(0,5):
plz = plz + str(randint(0,9)) plz = plz + str(randint(0,9))
return plz return plz
# randomI function which creates each file # randomI function which creates each file
def randomI(units, rows, rowLength, partstart, cluster): def randomI(units, rows, rowLength, partstart, cluster):
for setcounter in range(0, units): for setcounter in range(0, units):