<commit_before>import json
from time import time
from string_matching import *
import cPickle as pickle
import sys
'''
tt = time()
bands = json.load(open('../music-list/bands.json','r'))
band_names = bands.keys()
print 'loading bands took ' + str(time()-tt)

tt = time()
pickle.dump(band_names,open('defaultList.p','w'))
print 'dumping band names took ' + str(time()-tt)

tt = time()
band_hash = generateSearchableHashFromList(band_names)
print 'generating hash from bands took ' + str(time()-tt)

tt = time()
pickle.dump(band_hash,open('defaultHash.p','w'))
print 'dumping hash took ' + str(time()-tt)
'''

string = sys.argv[1]

print "trying with " + string

tt = time()
print searchThroughList(string)
print 'searching through list took ' + str(time()-tt)

tt = time()
try:
	if string in bands:
		print "found"
except:
	print "not found"
print 'trying dictionary took ' + str(time()-tt)

tt = time()
print searchThroughHash(string)
print 'searching through hash took ' + str(time()-tt)<commit_msg>Playing around with hard names<commit_after>import json
from time import time, sleep
from string_matching import *
import cPickle as pickle
import sys
'''
tt = time()
bands = json.load(open('../music-list/bands.json','r'))
band_names = bands.keys()
print 'loading bands took ' + str(time()-tt)

tt = time()
pickle.dump(band_names,open('defaultList.p','w'))
print 'dumping band names took ' + str(time()-tt)

tt = time()
band_hash = generateSearchableHashFromList(band_names)
print 'generating hash from bands took ' + str(time()-tt)

tt = time()
pickle.dump(band_hash,open('defaultHash.p','w'))
print 'dumping hash took ' + str(time()-tt)
'''

string = sys.argv[1]

print "trying with " + string

tt = time()
print searchThroughList(string)
print 'searching through list took ' + str(time()-tt)

tt = time()
try:
	if string in bands:
		print "found"
except:
	print "not found"
print 'trying dictionary took ' + str(time()-tt)

tt = time()
print searchThroughHash(string)
print 'searching through hash took ' + str(time()-tt)

{'fraction_non_alphanumeric': 0.15160493827160493, 'fraction_numerical': 0.0009876543209876543, 'mean_word_length': 5.233846153846154, 'pattern_counts': {'":': 0, '<': 3, '<?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': '6239437', 'n_tokens_mistral': 699, 'n_tokens_neox': 684, 'n_words': 200}