This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.cg.demo; | |
| import java.util.ArrayList; | |
| import java.util.Comparator; | |
| import java.util.Iterator; | |
| import java.util.List; | |
| //import java.util.function.Predicate; | |
| //import java.util.TreeSet; | |
| public class EmployeeService { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import defaultdict | |
| def list_duplicates(seq): | |
| tally = defaultdict(list) | |
| for i,item in enumerate(seq): | |
| tally[item].append(i) | |
| return ((key,locs) for key,locs in tally.items() if len(locs)>1) | |
| def return_mask(wts, labels,thr): | |
| modsource = labels.copy() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import warnings | |
| import numpy as np | |
| import scipy.sparse as sp | |
| from joblib import Parallel, delayed | |
| from sklearn.cluster import KMeans | |
| from sklearn.cluster import _k_means_fast as _k_means | |
| from sklearn.cluster.k_means_ import ( |