<commit_before>from auana import Fana
import os,time
current_directory = os.path.dirname(os.path.abspath(__file__)).replace('\\','/')

'''==================save_fingerprint======================'''
start = time.time()
Fana(current_directory+"/sample/ding.wav").save_fingerprint()
print time.time()-start
print " "

start = time.time()
Fana(current_directory+"/sample/source1.wav").save_fingerprint()
print time.time()-start
print " "

# start = time.clock()
# Fana(current_directory+"/sample/piano.wav").save_fingerprint()
# print time.clock()-start
# print " "

# start = time.clock()
# Fana(current_directory+"/sample/Come And Get Your Love.wav").save_fingerprint()
# print time.clock()-start
# print " "

# '''===================function example====================='''
# print Fana(current_directory+"/sample/piano.wav").stereo_start()
# print" "
# print Fana(current_directory+"/sample/piano.wav").mono_start(0)
# print" "


'''=========================test==========================='''
# search .wav file
dir_audio = current_directory+"/sample"
audio_list = []
file_num = 0
for parent, dirnames, filenames in os.walk(dir_audio):
	for filename in filenames:
		portion = os.path.splitext(filename)
		if portion[1] == '.wav'and (211 <= int(portion[0]) <= 215 or 111 <= int(portion[0]) <= 116 or 121 <= int(portion[0]) <= 126) :
			path = os.path.join(parent, filename)
			path = path.replace('\\','/')
			audio_list.append(path)
			file_num += 1
NUM = 0
failed=[]
#start to handle
for a in  xrange(len(audio_list)):#
	start = time.clock()
	print audio_list[a]
	res = Fana(audio_list[a]).stereo_start()
	print audio_list[a],res,time.clock()-start<commit_msg>update example<commit_after>from auana import Fana
import os,time
current_directory = os.path.dirname(os.path.abspath(__file__)).replace('\\','/')

'''==================save_fingerprint======================'''
start = time.time()
Fana(current_directory+"/sample/ding.wav").pre()
print time.time()-start
print " "

start = time.time()
Fana(current_directory+"/sample/source1.wav").pre()
print time.time()-start
print " "

# start = time.clock()
# Fana(current_directory+"/sample/piano.wav").save_fingerprint()
# print time.clock()-start
# print " "

start = time.clock()
Fana("E:/Come And Get Your Love.wav").pre()
print time.clock()-start
print " "

start = time.clock()
print Fana("E:/Come And Get Your Love.wav").stereo_start()
print time.clock()-start
print " "
# '''===================function example====================='''
# print Fana(current_directory+"/sample/piano.wav").stereo_start()
# print" "
# print Fana(current_directory+"/sample/piano.wav").mono_start(0)
# print" "


'''=========================test==========================='''
# search .wav file
dir_audio = current_directory+"/sample"
audio_list = []
file_num = 0
for parent, dirnames, filenames in os.walk(dir_audio):
	for filename in filenames:
		portion = os.path.splitext(filename)
		if portion[1] == '.wav' :
			path = os.path.join(parent, filename)
			path = path.replace('\\','/')
			audio_list.append(path)
			file_num += 1
NUM = 0
failed=[]
#start to handle
for a in  xrange(len(audio_list)):#
	start = time.clock()
	res = Fana(audio_list[a]).stereo_start()
	print audio_list[a],res,time.clock()-start
{'fraction_non_alphanumeric': 0.24861367837338263, 'fraction_numerical': 0.010166358595194085, 'mean_word_length': 5.722567287784679, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1715453', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1091, 'n_words': 210}