Skip to content

Instantly share code, notes, and snippets.

View bvarghese1's full-sized avatar

Bonnie Varghese bvarghese1

View GitHub Profile
from sklearn.cluster import KmeansClustering
from cluster_template import ClusterTemplate
class KmeansCluster(ClusterTemplate):
def __init__(self, path):
super(KmeansCluster, self).__init__(path)
# Implementation of abstract method
import os
import time
import numpy as np
from abc import abstractmethod
class ClusterTemplate(object):
def __init__(self, path):
import os
import numpy as np
from sklearn.cluster import Kmeans
from cluster import Cluster
class KmeansCluster(Cluster):
def __init__(self, path):
super(KmeansCluster, self).__init__(path)
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)
@bvarghese1
bvarghese1 / navigation_and_config.json
Created June 30, 2017 01:29
navigation and config API response
GET https://10.43.7.112/api/configuration/getNavigationAndConfig/logs
{
"data": {
"data_sources": {
"fields": [
{
"enumValues": [
{
"internalValue": "new_source",
"visibleValue": "New Source"