def min_kl(mn):
	mdic = get_mdic()
	res = {}
	res2 = {}
	for i in mdic.keys():
		res.update({i:KL.klcmp(mdic[str(mn)],mdic[i])})
	return res
	cur.close()
	conn.close()
	mr_dic = {}
	for i in mres:
		mr_dic.update({list(i)[0]:list(i)[1]})
	return mr_dic
		
	
def marco_comp(list1,list2):
	weigh = 0
<<<<<<< HEAD
	if abs(list1[0] - list2[0]) < 0.25:
		weigh += 0.1
	if abs(list1[-1] - list2[-1]) < 0.25:
		weigh += 0.2
	if KL.klcmp(list1,list2) >= 0.999:
		weigh += 0.3
=======
	if abs(list1[0] - list2[0]) < 0.1:
		weigh += 0.3
	if abs(list1[-1] - list2[-1]) < 0.1:
		weigh += 0.3
	#if KL.klcmp(list1,list2) <= 0.1:
	#	weigh += 0.4
>>>>>>> origin/master
	return weigh
	
def marco_cmpall(mn,mdic):	
	list1 = mdic[str(mn)]
	com_res = {}
	res = {}