Skip to content

Instantly share code, notes, and snippets.

@bvarghese1
Last active April 13, 2019 20:09
Show Gist options
  • Save bvarghese1/bab189605cd33679ef8a388596ad5daa to your computer and use it in GitHub Desktop.
Save bvarghese1/bab189605cd33679ef8a388596ad5daa to your computer and use it in GitHub Desktop.
import os
from abc import abstractmethod
class Cluster(object):
def __init__(self, path):
self.path = path
if not os.path.exists(self.path):
os.makedirs(self.path, exist_ok=True)
@abstractmethod
def cluster(self, num_centroids):
raise NotImplementedError("Abstract method 'cluster' not implemented")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment