In [1]:
import cPickle as pickle
In [2]:
a = pickle.load(open("model.p","r"))
In [11]:
def count(a, val):
retVal = 0
for book in a:
for item in a[book]:
if item[0] >= val:
retVal += 1
return retVal
In [20]:
def getList(a, val):
li = []
for book in a:
for item in a[book]:
if item[0] >= val and item[0] != 1:
li.append(book)
break
return li
In [21]:
getList(a,0.5)[:5]
Out[21]:
In [23]:
a['0345384903']
Out[23]:
In [ ]: