Global imports


In [3]:
import numpy as np

In [153]:
import scipy.stats as st

In [4]:
import shelve

In [274]:
import math

In [327]:
from itertools import ifilter

Database stuff


In [5]:
db = shelve.open("./db/movielens_100k.db")

In [6]:
# db.close()

Intersecting critic rated movies


In [275]:
def shared_items_original(db, person1, person2):
    return [item for item in db[person1] if item in db[person2]]

In [276]:
%time shared_items_original(db, "1", "2")


CPU times: user 9.75 ms, sys: 4.14 ms, total: 13.9 ms
Wall time: 13.5 ms
Out[276]:
['Birdcage, The (1996)',
 'Toy Story (1995)',
 'Postino, Il (1994)',
 'Good Will Hunting (1997)',
 'Richard III (1995)',
 'Star Wars (1977)',
 'Jerry Maguire (1996)',
 'Godfather, The (1972)',
 'Full Monty, The (1997)',
 'Shall We Dance? (1996)',
 'Kolya (1996)',
 'Contact (1997)',
 'Truth About Cats & Dogs, The (1996)',
 'Men in Black (1997)',
 'Mighty Aphrodite (1995)',
 "Antonia's Line (1995)",
 'Fargo (1996)',
 "My Best Friend's Wedding (1997)"]

In [277]:
def shared_items_optimized(db, person1, person2):
    return db[person1].viewkeys() & db[person2].viewkeys()

In [278]:
%time shared_items_optimized(db, "1", "2")


CPU times: user 1.53 ms, sys: 125 µs, total: 1.65 ms
Wall time: 1.22 ms
Out[278]:
{"Antonia's Line (1995)",
 'Birdcage, The (1996)',
 'Contact (1997)',
 'Fargo (1996)',
 'Full Monty, The (1997)',
 'Godfather, The (1972)',
 'Good Will Hunting (1997)',
 'Jerry Maguire (1996)',
 'Kolya (1996)',
 'Men in Black (1997)',
 'Mighty Aphrodite (1995)',
 "My Best Friend's Wedding (1997)",
 'Postino, Il (1994)',
 'Richard III (1995)',
 'Shall We Dance? (1996)',
 'Star Wars (1977)',
 'Toy Story (1995)',
 'Truth About Cats & Dogs, The (1996)'}

In [279]:
shared_items = shared_items_optimized

Vectorizing ratings


In [280]:
def critics_ratings_original(db, person1, person2):
    shared = shared_items(db, person1, person2)
    scores1 = [db[person1][item] for item in shared]
    scores2 = [db[person2][item] for item in shared]
    n = len(shared)
    return scores1, scores2, n

In [281]:
%timeit s1, s2, n = critics_ratings_original(db, "1", "2")


The slowest run took 4.12 times longer than the fastest. This could mean that an intermediate result is being cached 
100 loops, best of 3: 3.29 ms per loop

In [282]:
def critics_ratings_optimized(db, person1, person2):
    shared = shared_items(db, person1, person2)
    n = len(shared)
    scores1 = np.fromiter(map(lambda x: db[person1][x], shared), np.float_)
    scores2 = np.fromiter(map(lambda x: db[person2][x], shared), np.float_)
    return scores1, scores2, n

In [283]:
%timeit s1, s2, n = critics_ratings_optimized(db, "1", "2")


100 loops, best of 3: 3.26 ms per loop

In [284]:
critics_ratings = critics_ratings_optimized

Similarity metrics - Euclidean


In [285]:
def euclidean_similarity_original(db, person1, person2):
    s1, s2, n = critics_ratings(db, person1, person2)
    dist = math.sqrt(sum(map(lambda x, y: pow(x-y, 2), s1, s2)))
    return 1/(1+dist)

In [286]:
%time euclidean_similarity_original(db, "1", "2")


CPU times: user 7.37 ms, sys: 0 ns, total: 7.37 ms
Wall time: 7.29 ms
Out[286]:
0.15894454156034005

In [287]:
def euclidean_similarity_optimized(db, person1, person2):
    s1, s2, n = critics_ratings(db, person1, person2)
    return 1/(1+np.linalg.norm(s1-s2))

In [288]:
%time euclidean_similarity_optimized(db, "1", "2")


CPU times: user 4.18 ms, sys: 15 µs, total: 4.2 ms
Wall time: 3.96 ms
Out[288]:
0.15894454156034005

In [289]:
euclidean_similarity = euclidean_similarity_optimized

Similarity metrics - Pearson


In [290]:
def pearson_similarity_original(db, person1, person2):
    s1, s2, n = critics_ratings(db, person1, person2)
    if n == 0: return 0
    sum_s1 = sum(s1)
    sum_s2 = sum(s2)
    sum_s1_sq = sum(map(lambda x,y:x*y, s1, s1))
    sum_s2_sq = sum(map(lambda x,y:x*y, s2, s2))
    sum_s_pro = sum(map(lambda x,y:x*y, s1, s2))
    numerator = sum_s_pro - (sum_s1*sum_s2/float(n))
    denominator = sqrt((sum_s1_sq-pow(sum_s1, 2)/float(n))*
                       (sum_s2_sq-pow(sum_s2, 2)/float(n)))
    if denominator == 0: return 0
    return numerator/denominator

In [291]:
%time pearson_similarity_original(db, "900", "800")


CPU times: user 1.55 ms, sys: 125 µs, total: 1.68 ms
Wall time: 1.27 ms
Out[291]:
-0.55901699437494845

In [292]:
def pearson_similarity_optimized(db, person1, person2):
    s1, s2, n = critics_ratings(db, person1, person2)
    if n == 0: return 0
    return st.pearsonr(s1, s2)[0]

In [293]:
%time pearson_similarity_optimized(db, "900", "800")


CPU times: user 912 µs, sys: 75 µs, total: 987 µs
Wall time: 749 µs
Out[293]:
-0.55901699437494745

In [294]:
def pearson_similarity_optimized2(db, person1, person2):
    s1, s2, n = critics_ratings(db, person1, person2)
    sum_s1 = np.sum(s1)
    sum_s2 = np.sum(s2)
    sum_s1_sq = np.sum(s1*s1)
    sum_s2_sq = np.sum(s2*s2)
    sum_s_pro = np.sum(s1*s2)
    numerator = sum_s_pro - (sum_s1*sum_s2/float(n))
    denominator = np.sqrt((sum_s1_sq-(sum_s1*sum_s1)/float(n))*
                          (sum_s2_sq-(sum_s2*sum_s2)/float(n)))
    if denominator == 0: return 0
    return numerator/denominator

In [295]:
%time pearson_similarity_optimized2(db, "900", "800")


CPU times: user 916 µs, sys: 75 µs, total: 991 µs
Wall time: 1.05 ms
Out[295]:
-0.55901699437494845

In [296]:
pearson_similarity = pearson_similarity_optimized

Recommend critics based on all the db


In [304]:
def recommend_critics_original(db, person, similarity):
    lst = [(similarity(db, person, other), other)
           for other in db if other != person]
    cleaned = filter(lambda p: p[0]==p[0], lst)
    return sorted(cleaned)[::-1]

In [332]:
%time recommend_critics_original(db, "1", pearson_similarity)


CPU times: user 9.23 s, sys: 690 ms, total: 9.92 s
Wall time: 9.94 s
Out[332]:
[(1.0, '866'),
 (1.0, '812'),
 (1.0, '811'),
 (1.0, '810'),
 (1.0, '531'),
 (1.0, '511'),
 (1.0, '39'),
 (1.0, '351'),
 (1.0, '273'),
 (1.0, '166'),
 (0.95257934441568026, '520'),
 (0.91653421378307787, '107'),
 (0.90453403373329089, '687'),
 (0.89104211121363053, '34'),
 (0.88229880338305944, '105'),
 (0.8703882797784892, '740'),
 (0.86602540378443871, '485'),
 (0.86602540378443849, '873'),
 (0.86602540378443849, '400'),
 (0.86258194917794284, '510'),
 (0.85280286542244166, '364'),
 (0.8496546792899824, '803'),
 (0.84548890303097124, '791'),
 (0.84366148773210736, '572'),
 (0.83874169727605896, '691'),
 (0.81649658092772615, '111'),
 (0.81409157841069435, '61'),
 (0.81064348337777759, '754'),
 (0.79494818839587555, '702'),
 (0.77777777777777779, '656'),
 (0.77777777777777779, '240'),
 (0.7745966692414834, '628'),
 (0.77174363314128969, '134'),
 (0.7660323462854266, '736'),
 (0.76187297467052739, '433'),
 (0.76058270804488615, '672'),
 (0.75234638921740205, '550'),
 (0.75, '920'),
 (0.75, '282'),
 (0.73477046786696476, '755'),
 (0.73333333333333328, '93'),
 (0.72875091178267182, '898'),
 (0.72760687510899902, '544'),
 (0.71704961909898546, '549'),
 (0.71574791789233527, '414'),
 (0.71490008966343122, '571'),
 (0.70512715241668933, '797'),
 (0.6998542122237652, '319'),
 (0.69208636607735918, '8'),
 (0.68599434057003539, '461'),
 (0.68449027061351886, '266'),
 (0.68377963006886322, '192'),
 (0.68262876312190002, '772'),
 (0.68000000000000005, '598'),
 (0.67845923856833545, '413'),
 (0.66666666666666663, '801'),
 (0.66513303991330475, '726'),
 (0.66332495807108005, '202'),
 (0.66101589440416353, '274'),
 (0.6559564653711033, '29'),
 (0.65121714476317949, '120'),
 (0.64659446427981104, '626'),
 (0.64517916708110479, '926'),
 (0.63960214906683133, '895'),
 (0.63639610306789274, '813'),
 (0.63524081680428401, '212'),
 (0.63510734882995579, '509'),
 (0.63373443107903848, '769'),
 (0.63245553203367588, '516'),
 (0.62877291889260245, '905'),
 (0.62678317052800869, '66'),
 (0.62572735488934839, '397'),
 (0.62541823939124253, '602'),
 (0.62360956446232352, '359'),
 (0.62325023884075159, '853'),
 (0.61631124729335096, '133'),
 (0.61627806193814494, '32'),
 (0.61218214032329854, '449'),
 (0.61010765004639778, '556'),
 (0.60983621314632785, '697'),
 (0.60276378111510298, '725'),
 (0.60238214510923238, '526'),
 (0.59317101400173944, '695'),
 (0.59249079806367744, '142'),
 (0.59161349685857023, '22'),
 (0.59137701676365806, '100'),
 (0.59041278864143232, '923'),
 (0.58976782461958865, '651'),
 (0.58966768575739814, '165'),
 (0.58734420704612511, '199'),
 (0.58490566037735858, '149'),
 (0.58160493447250017, '225'),
 (0.58095342453814691, '381'),
 (0.58072380988657202, '415'),
 (0.5788596842339373, '173'),
 (0.57864141607503072, '17'),
 (0.57735026918962584, '845'),
 (0.57569601426147765, '600'),
 (0.57442648034920984, '440'),
 (0.56518730174277076, '57'),
 (0.56461766129680702, '27'),
 (0.56011203361120399, '139'),
 (0.56011203361120387, '696'),
 (0.55941115849211676, '21'),
 (0.55555555555555558, '841'),
 (0.55182540553646942, '789'),
 (0.54772255750516607, '876'),
 (0.5449816614260754, '30'),
 (0.53931937163000609, '229'),
 (0.53895572901798439, '490'),
 (0.53873392629705863, '700'),
 (0.53863863484470587, '800'),
 (0.53726587317071928, '289'),
 (0.53466239286632999, '294'),
 (0.53452248382484879, '616'),
 (0.53452248382484879, '205'),
 (0.53439042144264159, '939'),
 (0.53420700101165797, '169'),
 (0.53008204930947511, '197'),
 (0.52989202922170509, '594'),
 (0.52894143767049184, '599'),
 (0.52849819756323313, '75'),
 (0.52338659874516447, '863'),
 (0.5222329678670935, '220'),
 (0.5222329678670935, '179'),
 (0.52159829114744527, '517'),
 (0.52081562883071519, '69'),
 (0.51915471919534639, '247'),
 (0.51839607571348056, '283'),
 (0.51743432250570853, '467'),
 (0.51525593084876564, '868'),
 (0.51238282758674292, '609'),
 (0.51082049548000896, '344'),
 (0.50898117223400252, '604'),
 (0.50833954555781602, '592'),
 (0.50798501994429412, '728'),
 (0.50460373326019414, '773'),
 (0.50449360440802704, '839'),
 (0.50213188684259824, '135'),
 (0.50060483945417467, '540'),
 (0.5, '820'),
 (0.5, '4'),
 (0.5, '260'),
 (0.5, '140'),
 (0.49892218025118684, '824'),
 (0.49872289251016583, '55'),
 (0.49801192055599736, '570'),
 (0.49700294259632, '117'),
 (0.495878699192628, '479'),
 (0.49507317131563494, '60'),
 (0.49301257198088028, '278'),
 (0.49292156515624458, '778'),
 (0.4844033254342634, '226'),
 (0.48325727477121078, '45'),
 (0.4812177395114533, '284'),
 (0.48041602183275145, '315'),
 (0.48014814485884899, '276'),
 (0.4797131283807749, '232'),
 (0.4796597599995584, '624'),
 (0.47866026300141234, '121'),
 (0.4773335240047637, '246'),
 (0.47488532628090763, '590'),
 (0.47205957654525221, '227'),
 (0.47140452079103173, '591'),
 (0.47029794974882472, '257'),
 (0.46996607699124154, '525'),
 (0.46975042247798215, '102'),
 (0.46877851383367108, '724'),
 (0.46089753804622591, '880'),
 (0.45970714331014434, '579'),
 (0.45958207794568068, '476'),
 (0.45399621485046732, '267'),
 (0.44945477470048317, '108'),
 (0.44604134290573533, '367'),
 (0.44538208330972645, '661'),
 (0.44417762925514426, '776'),
 (0.44332511923820539, '886'),
 (0.44207732436688768, '303'),
 (0.44160275752263145, '743'),
 (0.44119429554008549, '893'),
 (0.43951592784836407, '329'),
 (0.43794107961005341, '679'),
 (0.43122153515785933, '563'),
 (0.4273120328760282, '40'),
 (0.42660548821795269, '334'),
 (0.42608201988488975, '757'),
 (0.42257712736425829, '827'),
 (0.42257712736425829, '408'),
 (0.42197205281218697, '369'),
 (0.42056642968274227, '890'),
 (0.41967760778077473, '13'),
 (0.41954607798255011, '566'),
 (0.41931393468876726, '787'),
 (0.41928940957337912, '457'),
 (0.41635890185330249, '353'),
 (0.41625091713236861, '395'),
 (0.41529595485764642, '184'),
 (0.41490751865757391, '5'),
 (0.41486703808681002, '51'),
 (0.41464421443136462, '718'),
 (0.41313887573893388, '664'),
 (0.41092050602390101, '717'),
 (0.41077096096139259, '683'),
 (0.41052763029023337, '363'),
 (0.41013444482088507, '392'),
 (0.40919396764125066, '462'),
 (0.40907379161054591, '291'),
 (0.40835296256374826, '916'),
 (0.40824829046386285, '86'),
 (0.40727952844699838, '453'),
 (0.40559643104680948, '368'),
 (0.40518017441475351, '487'),
 (0.40500484282089438, '802'),
 (0.40451991747794525, '206'),
 (0.40310542256881288, '861'),
 (0.40222003227986847, '429'),
 (0.40195665056840407, '874'),
 (0.40181205568634337, '204'),
 (0.4014728735889751, '215'),
 (0.40124485149950273, '721'),
 (0.40009983687523432, '782'),
 (0.3986164921108124, '222'),
 (0.3973841836972099, '94'),
 (0.39689577268563758, '104'),
 (0.39562893832306151, '715'),
 (0.39402590424571388, '464'),
 (0.39302868179745759, '53'),
 (0.39246582403474445, '867'),
 (0.39202397720480836, '829'),
 (0.39199467431607365, '210'),
 (0.39190418182948472, '660'),
 (0.3910359202286805, '826'),
 (0.38832158167381176, '80'),
 (0.38803268106168431, '910'),
 (0.38662891665410887, '650'),
 (0.3861260986707204, '605'),
 (0.38499120468969977, '253'),
 (0.38443519403799675, '486'),
 (0.38428209863539292, '296'),
 (0.38375475749981697, '936'),
 (0.38357706825646548, '122'),
 (0.38332867863049391, '582'),
 (0.38284564907221891, '933'),
 (0.38206823214181551, '805'),
 (0.38036106972407163, '615'),
 (0.37956967370239947, '643'),
 (0.3784673741033327, '268'),
 (0.37713892166384289, '519'),
 (0.37647584913532972, '648'),
 (0.37597182533728024, '402'),
 (0.37441543222448842, '770'),
 (0.37315504683387363, '463'),
 (0.37205639426673609, '851'),
 (0.37115487031148842, '668'),
 (0.37076828471093148, '543'),
 (0.37009074000180059, '443'),
 (0.36930849609408195, '496'),
 (0.36868332945556265, '299'),
 (0.36813872362900008, '735'),
 (0.36746095934699385, '68'),
 (0.3674598783873414, '118'),
 (0.36713829578668478, '738'),
 (0.36655484454186454, '237'),
 (0.36558330242475856, '472'),
 (0.36542618701182616, '682'),
 (0.36532931369967608, '892'),
 (0.36475935778216523, '733'),
 (0.36391886058507084, '488'),
 (0.36386977863718106, '529'),
 (0.36361727710625152, '380'),
 (0.36270160350455788, '91'),
 (0.36193816477224661, '59'),
 (0.36097115534333835, '157'),
 (0.3596394065184072, '483'),
 (0.35851532890301213, '545'),
 (0.35812341458231312, '501'),
 (0.35759768762492056, '419'),
 (0.35545498513643381, '293'),
 (0.35494502503550585, '44'),
 (0.35431542783000591, '389'),
 (0.35412218988722882, '815'),
 (0.3529412910559081, '730'),
 (0.35136418446315326, '423'),
 (0.3506162720545602, '398'),
 (0.34871490092681434, '836'),
 (0.34795970853670394, '653'),
 (0.34794331166309322, '619'),
 (0.34789427874342566, '305'),
 (0.34762829547486418, '435'),
 (0.34616439336541033, '831'),
 (0.34506470569904668, '183'),
 (0.34478819448826814, '806'),
 (0.34391909212093258, '65'),
 (0.34249634416065028, '514'),
 (0.34243354206201154, '871'),
 (0.34242852686294917, '92'),
 (0.34192836784995051, '349'),
 (0.34084406873674389, '425'),
 (0.34082108029941227, '792'),
 (0.34045569753904248, '320'),
 (0.33997011874899324, '532'),
 (0.33988381110851806, '62'),
 (0.33870234004074223, '621'),
 (0.33836394755025095, '701'),
 (0.33794136430312099, '46'),
 (0.33754678780970299, '115'),
 (0.33662467908755683, '804'),
 (0.33643841250822815, '640'),
 (0.33641553903100413, '889'),
 (0.33630422420310624, '870'),
 (0.33609458169296436, '561'),
 (0.3336691377366966, '114'),
 (0.33339644603207336, '409'),
 (0.33339010502209038, '244'),
 (0.33333333333333331, '242'),
 (0.3329491778230908, '254'),
 (0.33288977580706719, '742'),
 (0.33202445622143928, '378'),
 (0.3317817458448441, '177'),
 (0.33067362749896251, '765'),
 (0.32943968458212708, '899'),
 (0.32878573503006708, '938'),
 (0.3279127215262943, '323'),
 (0.3273268353539886, '611'),
 (0.3273268353539886, '444'),
 (0.3272314465029601, '852'),
 (0.32503735248135407, '328'),
 (0.32443539759784473, '430'),
 (0.32416777409654995, '822'),
 (0.3232018909460983, '218'),
 (0.32213885519841673, '346'),
 (0.32153030259715309, '560'),
 (0.32038165626231324, '758'),
 (0.31991453380322898, '394'),
 (0.3198169378049619, '508'),
 (0.31973566061939679, '587'),
 (0.31967283666565816, '263'),
 (0.31967014362251078, '746'),
 (0.31847684079335031, '484'),
 (0.31828458677019655, '333'),
 (0.31822858171140167, '727'),
 (0.31806564522034109, '174'),
 (0.31751074553922787, '28'),
 (0.3161668515241664, '468'),
 (0.31570862967886831, '361'),
 (0.31327753743460435, '622'),
 (0.31288947489855973, '83'),
 (0.30957284991800904, '82'),
 (0.30922939381406356, '883'),
 (0.30839558069129769, '26'),
 (0.30739583399566633, '292'),
 (0.30735554897953132, '932'),
 (0.30725575666430627, '896'),
 (0.30694206967737542, '156'),
 (0.30618621784789729, '473'),
 (0.30533736987936827, '533'),
 (0.30271471539939832, '54'),
 (0.30220311499540492, '269'),
 (0.30165647640064608, '595'),
 (0.29939247542604791, '275'),
 (0.29898709502531284, '416'),
 (0.29864611456606499, '847'),
 (0.29777500019127912, '925'),
 (0.29767027889379361, '859'),
 (0.29612228014989478, '929'),
 (0.29541005709994145, '6'),
 (0.29523861710795962, '251'),
 (0.29503994428922298, '87'),
 (0.29483056930970242, '209'),
 (0.29460429968196605, '11'),
 (0.29315098498896425, '376'),
 (0.29241085302721048, '708'),
 (0.29140351901767381, '900'),
 (0.29131927528416529, '719'),
 (0.29071156796907377, '922'),
 (0.29054842555043547, '864'),
 (0.29017713717959864, '500'),
 (0.28958274433796527, '908'),
 (0.2893009506885677, '411'),
 (0.28916367674643845, '23'),
 (0.28888888888888886, '482'),
 (0.28867513459481292, '652'),
 (0.28867513459481292, '245'),
 (0.28779289105398193, '73'),
 (0.28734788556634538, '564'),
 (0.28712893292944569, '577'),
 (0.2868396272313174, '64'),
 (0.28621325973147815, '504'),
 (0.28443742889411699, '903'),
 (0.28374447307380085, '601'),
 (0.28358036520736124, '387'),
 (0.2831821645949924, '882'),
 (0.28227841435454287, '348'),
 (0.28126717497920134, '848'),
 (0.28067069969390579, '819'),
 (0.27955973292927361, '552'),
 (0.27922387203647187, '339'),
 (0.27878571213870729, '442'),
 (0.27800197519959435, '823'),
 (0.27735009811261446, '732'),
 (0.27685402763936823, '748'),
 (0.27557921741328512, '830'),
 (0.27528099422158769, '674'),
 (0.2752768588995565, '200'),
 (0.27296412113943558, '478'),
 (0.27279591677673853, '603'),
 (0.27271844728642564, '77'),
 (0.27242076081128908, '301'),
 (0.27076518053694115, '793'),
 (0.27066864107644262, '391'),
 (0.27058402678047117, '924'),
 (0.27039991231377358, '795'),
 (0.26994300465927301, '185'),
 (0.26967994498529685, '238'),
 (0.26923076923076927, '331'),
 (0.26922013123928129, '297'),
 (0.26836225220634108, '878'),
 (0.26748255012960698, '781'),
 (0.26691598132692923, '70'),
 (0.26656923220493078, '194'),
 (0.26651404997679468, '379'),
 (0.26620352994819169, '345'),
 (0.26609449259863277, '788'),
 (0.26604994460847092, '749'),
 (0.26576779009692852, '671'),
 (0.26498923834364085, '447'),
 (0.26488813067755257, '42'),
 (0.26449447415496929, '894'),
 (0.26328904330354602, '940'),
 (0.26197787928233102, '248'),
 (0.25939550881905077, '828'),
 (0.25921336627739522, '790'),
 (0.2580408110203895, '846'),
 (0.25801767932932046, '875'),
 (0.25715142542972574, '164'),
 (0.25655292260942192, '406'),
 (0.25651545145401983, '151'),
 (0.25643734216458325, '760'),
 (0.2558408479292405, '741'),
 (0.25390232268805563, '123'),
 (0.2534360039021607, '497'),
 (0.25334014822105339, '844'),
 (0.25296610752553073, '576'),
 (0.25275389922238339, '97'),
 (0.25088173330127472, '159'),
 (0.25083554359059057, '7'),
 (0.25074777237294738, '669'),
 (0.25054378579536418, '162'),
 (0.25, '842'),
 (0.24932751542153062, '647'),
 (0.24898429086916193, '158'),
 (0.2481514327576691, '350'),
 (0.24758959721871562, '554'),
 (0.24702443121810883, '249'),
 (0.24582739541962886, '881'),
 (0.24531199163995249, '877'),
 (0.24518168227112641, '313'),
 (0.24465782177787149, '495'),
 (0.24412273724650041, '311'),
 (0.24393468845452251, '428'),
 (0.24357519837018987, '290'),
 (0.24355264422367637, '460'),
 (0.24345065210577368, '224'),
 (0.24299614603574984, '48'),
 (0.24155076709652842, '145'),
 (0.24112141108520607, '412'),
 (0.24046387359899302, '455'),
 (0.24019223070763074, '596'),
 (0.24019223070763066, '662'),
 (0.23847695390781568, '689'),
 (0.23804775264343198, '325'),
 (0.2346600402347504, '95'),
 (0.23385693117468698, '573'),
 (0.23299710283649613, '907'),
 (0.23181336981073017, '343'),
 (0.23154282928907252, '885'),
 (0.23095569873572003, '694'),
 (0.23042272592816521, '450'),
 (0.2290189568419928, '198'),
 (0.2283760566483008, '99'),
 (0.22776696176921588, '458'),
 (0.22718473369882591, '597'),
 (0.22687920032466855, '794'),
 (0.22630130145333943, '307'),
 (0.22589938596060208, '332'),
 (0.22562801571375446, '865'),
 (0.22360679774997896, '581'),
 (0.22360679774997896, '171'),
 (0.22323335954029802, '178'),
 (0.22295798599344349, '569'),
 (0.22170291729335873, '189'),
 (0.21987114962886584, '709'),
 (0.21855594276908744, '407'),
 (0.21755772687832239, '493'),
 (0.21589388479418639, '491'),
 (0.21574806965041299, '862'),
 (0.21544930201298196, '130'),
 (0.21521999928873176, '421'),
 (0.21503739277489381, '627'),
 (0.21439547539696929, '308'),
 (0.21379711472780119, '774'),
 (0.21320071635561047, '404'),
 (0.21128751072371649, '711'),
 (0.21071853880396016, '271'),
 (0.21045423840304328, '168'),
 (0.21022071185860972, '270'),
 (0.2095850068248985, '762'),
 (0.20872896976677055, '234'),
 (0.20841410851538439, '160'),
 (0.20794922721188899, '606'),
 (0.20788046015507494, '136'),
 (0.20689207093638753, '634'),
 (0.20600825057278702, '452'),
 (0.20561572340611639, '941'),
 (0.20539061598575675, '492'),
 (0.20295669052869886, '537'),
 (0.2023083578870104, '119'),
 (0.20189871254031383, '503'),
 (0.20164731865208743, '144'),
 (0.20149672233049681, '854'),
 (0.20146701823369523, '913'),
 (0.19964423333823919, '528'),
 (0.1979371225354454, '785'),
 (0.19793586306722571, '707'),
 (0.19717522217683531, '255'),
 (0.19694182016634032, '843'),
 (0.19652097800084956, '148'),
 (0.19643825114905744, '58'),
 (0.19642857142857137, '657'),
 (0.19603788170613812, '857'),
 (0.19518001458970666, '817'),
 (0.19495536478768338, '56'),
 (0.19470857187164392, '25'),
 (0.19307757796612968, '201'),
 (0.19277879424982541, '256'),
 (0.19245008972987526, '362'),
 (0.19245008972987526, '355'),
 (0.19245008972987526, '33'),
 (0.19170764193890905, '279'),
 (0.19140326523985077, '437'),
 (0.19056386879158149, '489'),
 (0.18884294096235507, '203'),
 (0.18878134876749975, '250'),
 (0.1881805902599526, '370'),
 (0.18763883748662835, '477'),
 (0.18643692108114074, '919'),
 (0.18632102821336113, '784'),
 (0.18629798060119176, '655'),
 (0.18522453916856349, '373'),
 (0.18463723646899907, '304'),
 (0.1832192895445269, '377'),
 (0.18208867685735075, '360'),
 (0.18200339866662621, '506'),
 (0.18169272218944174, '663'),
 (0.18154317672621337, '703'),
 (0.18150066530199141, '901'),
 (0.18055296120420131, '181'),
 (0.17991628684379529, '637'),
 (0.17986923354612536, '137'),
 (0.17984349895232449, '216'),
 (0.17974315816415679, '699'),
 (0.17956827488766042, '645'),
 (0.17858744808359595, '125'),
 (0.17670106048134751, '456'),
 (0.17334381132038412, '814'),
 (0.17277368511627209, '441'),
 (0.17267995121147897, '710'),
 (0.1712832942499837, '116'),
 (0.17123287671232873, '287'),
 (0.1711017502447765, '338'),
 (0.17055960055182032, '690'),
 (0.17051636869323172, '921'),
 (0.17037481092399631, '644'),
 (0.16968711059062466, '629'),
 (0.16680594556377479, '109'),
 (0.16666666666666669, '750'),
 (0.16666666666666663, '612'),
 (0.16657415116319241, '448'),
 (0.1644076177175853, '466'),
 (0.16214761366475955, '759'),
 (0.16190895203870692, '860'),
 (0.15930359352880386, '747'),
 (0.15911959797304709, '43'),
 (0.15877683720748895, '172'),
 (0.15850573957717806, '583'),
 (0.15675071645899025, '37'),
 (0.15575579739146989, '780'),
 (0.15547681614558906, '756'),
 (0.15497230810193302, '659'),
 (0.15467767200980681, '911'),
 (0.15353355031998922, '638'),
 (0.15324622094308277, '768'),
 (0.15203028496707427, '2'),
 (0.15180229214421537, '521'),
 (0.15112361120838014, '76'),
 (0.14990697436440387, '633'),
 (0.14980770031964347, '264'),
 (0.14815600657644576, '72'),
 (0.14715673227582471, '642'),
 (0.14656445727474421, '15'),
 (0.14593871435350406, '474'),
 (0.14559602839603158, '221'),
 (0.14477023669268022, '417'),
 (0.14316473277595199, '542'),
 (0.14287547845726753, '16'),
 (0.14162538984948661, '438'),
 (0.14015850305872521, '796'),
 (0.13967487785855612, '786'),
 (0.13892864473887909, '763'),
 (0.1378673601522562, '85'),
 (0.13684513787599331, '375'),
 (0.13576884666042613, '50'),
 (0.13570253708545235, '340'),
 (0.13317542635135399, '49'),
 (0.13249909430812182, '213'),
 (0.13185370294885268, '426'),
 (0.13147124778907107, '138'),
 (0.12921593330692566, '686'),
 (0.12764262393882062, '141'),
 (0.12757703501362, '327'),
 (0.12459160141821911, '927'),
 (0.1240852553157244, '193'),
 (0.12262110315458577, '639'),
 (0.12170203882097515, '767'),
 (0.12124961916234914, '150'),
 (0.12094511679167302, '374'),
 (0.11926756083217398, '678'),
 (0.11918282365569906, '574'),
 (0.11785113019775793, '879'),
 (0.11762699249285613, '625'),
 (0.11742105371319957, '833'),
 (0.11722342126591087, '481'),
 (0.11623065213009559, '539'),
 (0.11592914710449397, '716'),
 (0.11434616510858275, '219'),
 (0.11308561591129782, '498'),
 (0.11308328323571265, '436'),
 (0.11278047951882526, '3'),
 (0.11236664374387367, '300'),
 (0.1106853303403157, '541'),
 (0.11022257148771403, '352'),
 (0.10996641893937592, '499'),
 (0.1083082576002941, '152'),
 (0.10627539433196855, '354'),
 (0.10584618070758108, '751'),
 (0.10569545263813657, '869'),
 (0.10551136575214054, '90'),
 (0.10538369172705943, '536'),
 (0.10415880473475868, '176'),
 (0.10029412091607928, '840'),
 (0.10026510943656272, '665'),
 (0.099230870055423845, '684'),
 (0.097175002817435144, '180'),
 (0.094199282346789592, '318'),
 (0.09418534610941387, '761'),
 (0.092572753164756175, '63'),
 (0.092057461789832387, '680'),
 (0.09187425628304112, '779'),
 (0.091430064176498876, '649'),
 (0.091337820050951452, '424'),
 (0.089700298887156305, '330'),
 (0.088905759091094896, '918'),
 (0.088865194662454627, '272'),
 (0.086710996952412009, '917'),
 (0.086384158123180385, '737'),
 (0.086326188907974291, '154'),
 (0.085924972518930748, '744'),
 (0.085688297844918798, '930'),
 (0.084996651431048148, '527'),
 (0.083693941386799142, '593'),
 (0.081013831849674603, '385'),
 (0.080845208345444328, '832'),
 (0.079872306383087177, '692'),
 (0.078851513380135824, '494'),
 (0.078702275391324489, '559'),
 (0.077552914139010332, '670'),
 (0.076938929820103419, '236'),
 (0.076022545958361512, '666'),
 (0.074848118856511978, '723'),
 (0.074639337086207569, '530'),
 (0.074243021483955327, '518'),
 (0.073716478474406613, '766'),
 (0.07347910808347255, '568'),
 (0.072340082305262302, '233'),
 (0.071619168899887425, '295'),
 (0.070995229280883088, '635'),
 (0.070633943773621949, '557'),
 (0.069334639030624437, '535'),
 (0.069109586647812776, '188'),
 (0.068340853350227215, '126'),
 (0.067549432100730528, '943'),
 (0.0663620999068536, '243'),
 (0.065756613870341984, '401'),
 (0.065427523519480793, '555'),
 (0.065027577165018641, '897'),
 (0.064401836394630985, '934'),
 (0.063799965824672844, '207'),
 (0.061101612741776473, '41'),
 (0.060697851399886288, '223'),
 (0.06012398324001713, '326'),
 (0.057974783692344524, '103'),
 (0.055908688460393541, '131'),
 (0.055646762565528196, '623'),
 (0.05184937661378846, '838'),
 (0.05060453993692577, '522'),
 (0.047619047619047603, '855'),
 (0.047275827281687062, '608'),
 (0.045927185948311931, '523'),
 (0.045894224411366223, '538'),
 (0.045834924851410587, '808'),
 (0.045039293133158118, '771'),
 (0.04326137840269647, '588'),
 (0.043142615433671615, '714'),
 (0.042871337796432284, '620'),
 (0.042714885034479115, '614'),
 (0.042191293276943882, '12'),
 (0.04218245406095978, '470'),
 (0.041792183514896226, '347'),
 (0.041788769268349804, '585'),
 (0.041031576331179313, '52'),
 (0.040321056270364163, '365'),
 (0.039971585860381478, '182'),
 (0.039397850088052674, '705'),
 (0.038298625570804316, '807'),
 (0.037131254915411326, '764'),
 (0.036123609738137531, '906'),
 (0.035264899803315007, '20'),
 (0.034309405758141405, '731'),
 (0.033022909334191324, '534'),
 (0.032626236686646069, '128'),
 (0.032284197236968647, '632'),
 (0.032282539310859788, '524'),
 (0.031265269974036107, '129'),
 (0.028999744034001167, '937'),
 (0.02761796061712295, '445'),
 (0.027087820832105477, '567'),
 (0.024734361389566882, '618'),
 (0.023667026113174852, '548'),
 (0.023617508386047367, '884'),
 (0.022066551038634433, '676'),
 (0.019994668799052335, '439'),
 (0.016661884774821015, '850'),
 (0.015330496552138688, '161'),
 (0.014979500433262034, '562'),
 (0.013838424869600307, '630'),
 (0.013702384729392562, '113'),
 (0.012471745259110514, '465'),
 (0.011065703148317767, '230'),
 (0.01084414849498733, '286'),
 (0.0097297106050102129, '887'),
 (0.0067559343166397369, '259'),
 (0.0058408996301275926, '745'),
 (0.0057639041770423532, '84'),
 (0.0057181855037568641, '280'),
 (0.0018935798144322539, '89'),
 (0.0016771480508772504, '698'),
 (5.5715132361442656e-17, '312'),
 (0, 'Eduardo'),
 (0.0, '834'),
 (0.0, '816'),
 (0.0, '675'),
 (0.0, '646'),
 (0.0, '386'),
 (0.0, '302'),
 (0.0, '261'),
 (-0.00081931371850539972, '393'),
 (-0.00083612040133782223, '480'),
 (-0.0013216811339207119, '551'),
 (-0.0024695649365424968, '81'),
 (-0.0054203925850658191, '722'),
 (-0.0061318050497156523, '825'),
 (-0.0062915127800497218, '110'),
 (-0.0080184959465941924, '396'),
 (-0.0082204019880037921, '217'),
 (-0.0085917216004501775, '405'),
 (-0.01152372536520942, '667'),
 (-0.013009523204182746, '14'),
 (-0.013243279152022537, '96'),
 (-0.016918446625115931, '693'),
 (-0.018636370929731479, '422'),
 (-0.021482695091129329, '835'),
 (-0.025545057535197906, '658'),
 (-0.026435733840270856, '821'),
 (-0.029464045610017097, '382'),
 (-0.030718379774003834, '654'),
 (-0.03126554253113379, '167'),
 (-0.031900455754433482, '469'),
 (-0.032850215990880213, '71'),
 (-0.034095942840826357, '610'),
 (-0.036896966523196198, '777'),
 (-0.037207558366961227, '214'),
 (-0.040726860826115707, '454'),
 (-0.040968143072429672, '902'),
 (-0.043236550275870103, '403'),
 (-0.045250771980226326, '262'),
 (-0.046410109424862837, '18'),
 (-0.046701446249430421, '613'),
 (-0.048238913755558083, '342'),
 (-0.049957424276150256, '399'),
 (-0.050401446608354827, '586'),
 (-0.050688419289395478, '239'),
 (-0.052642365831235091, '617'),
 (-0.057639041770423505, '888'),
 (-0.05830241336167942, '298'),
 (-0.059153558536536338, '336'),
 (-0.060440888485561305, '186'),
 (-0.064380348242971466, '277'),
 (-0.064820372355216538, '146'),
 (-0.065028154856498294, '106'),
 (-0.065311018918827179, '677'),
 (-0.067927742862156762, '195'),
 (-0.068752387277115828, '706'),
 (-0.070343927287029165, '208'),
 (-0.071767871414890438, '187'),
 (-0.072624447477400808, '196'),
 (-0.073558512535889811, '314'),
 (-0.077034789062666448, '74'),
 (-0.086464541168502676, '321'),
 (-0.090260128654309657, '24'),
 (-0.092213889195414678, '31'),
 (-0.09234396144846363, '10'),
 (-0.093910629171758644, '837'),
 (-0.096869441004663978, '285'),
 (-0.096925996664627728, '553'),
 (-0.098310469704951803, '67'),
 (-0.10206207261596573, '9'),
 (-0.10359079584873412, '124'),
 (-0.1051947907112005, '383'),
 (-0.10695208860918337, '704'),
 (-0.11165085542764537, '575'),
 (-0.11547005383792519, '310'),
 (-0.11602708332524606, '931'),
 (-0.11664236870396086, '515'),
 (-0.12355524564107227, '357'),
 (-0.12508275318510453, '798'),
 (-0.13048176405112738, '505'),
 (-0.1307959411946808, '337'),
 (-0.1314591805000592, '288'),
 (-0.13251101690470485, '432'),
 (-0.1336306209562122, '252'),
 (-0.13436715393281903, '420'),
 (-0.13721630913136923, '175'),
 (-0.13826657968874304, '513'),
 (-0.13931955314383823, '928'),
 (-0.14165764939496564, '316'),
 (-0.14396315014973896, '322'),
 (-0.14545454545454553, '580'),
 (-0.14596855203028553, '565'),
 (-0.15058497115908964, '38'),
 (-0.15877683720748895, '775'),
 (-0.16936353761598091, '459'),
 (-0.17407765595569785, '191'),
 (-0.17626105969569267, '502'),
 (-0.17817416127494959, '324'),
 (-0.18078374748072606, '942'),
 (-0.18767309095164098, '231'),
 (-0.18898223650461357, '809'),
 (-0.1889822365046136, '410'),
 (-0.1889822365046136, '384'),
 (-0.1895245108947258, '584'),
 (-0.1936491673103708, '132'),
 (-0.19450688877796157, '641'),
 (-0.19565026354391216, '753'),
 (-0.1962467660293343, '306'),
 (-0.20082935971859384, '451'),
 (-0.20229696102929787, '546'),
 (-0.20365326999063921, '909'),
 (-0.20795444194958762, '235'),
 (-0.21100433439317867, '712'),
 (-0.21474470475555713, '912'),
 (-0.23269496690831384, '372'),
 (-0.23489875447901234, '734'),
 (-0.23809523809523808, '390'),
 (-0.24848395479607643, '371'),
 (-0.25485095051420248, '607'),
 (-0.25668636453585431, '891'),
 (-0.26024171938480806, '935'),
 (-0.26388888888888884, '101'),
 (-0.27437926239387295, '211'),
 (-0.27735009811261457, '170'),
 (-0.29327468426080211, '434'),
 (-0.29536530585093246, '507'),
 (-0.29880715233359845, '783'),
 (-0.29957234475763905, '475'),
 (-0.31525922540806467, '388'),
 (-0.316227766016838, '720'),
 (-0.31662949529084566, '79'),
 (-0.31772827586148411, '752'),
 (-0.3273268353539886, '258'),
 (-0.33275626858414736, '265'),
 (-0.33333333333333331, '446'),
 (-0.34921514788478908, '512'),
 (-0.36144869800612445, '366'),
 (-0.37793440591084715, '127'),
 (-0.38152918122868701, '98'),
 (-0.3871895528375523, '190'),
 (-0.39606594705405657, '636'),
 (-0.39852669849304284, '163'),
 (-0.4099600308453939, '335'),
 (-0.42289279400031321, '471'),
 (-0.42695628191498336, '153'),
 (-0.42775741552143243, '739'),
 (-0.43226548355826661, '872'),
 (-0.43788026951985703, '558'),
 (-0.44172610429938625, '578'),
 (-0.48359501402498967, '358'),
 (-0.5, '713'),
 (-0.57646135369831375, '35'),
 (-0.57655666019705509, '281'),
 (-0.57735026918962573, '818'),
 (-0.57735026918962573, '19'),
 (-0.58607805958151038, '904'),
 (-0.60009919814897894, '427'),
 (-0.60048057676907685, '673'),
 (-0.60633906259083248, '914'),
 (-0.66212219197173072, '317'),
 (-0.66903056959114182, '589'),
 (-0.75207104699523364, '78'),
 (-0.7543365091413573, '112'),
 (-0.80757285308724835, '228'),
 (-0.86602540378443849, '856'),
 (-0.94491118252306783, '143'),
 (-0.94491118252306794, '36'),
 (-1.0, '681'),
 (-1.0, '47'),
 (-1.0, '431')]

In [328]:
def recommend_critics_optimized(db, person, similarity):
    lst = [(similarity(db, person, other), other)
           for other in db if other != person]
    cleaned = ifilter(lambda p: p[0]==p[0], lst)
    return sorted(cleaned)[::-1]

In [333]:
%time recommend_critics_optimized(db, "1", pearson_similarity)


CPU times: user 9.27 s, sys: 603 ms, total: 9.87 s
Wall time: 9.89 s
Out[333]:
[(1.0, '866'),
 (1.0, '812'),
 (1.0, '811'),
 (1.0, '810'),
 (1.0, '531'),
 (1.0, '511'),
 (1.0, '39'),
 (1.0, '351'),
 (1.0, '273'),
 (1.0, '166'),
 (0.95257934441568026, '520'),
 (0.91653421378307787, '107'),
 (0.90453403373329089, '687'),
 (0.89104211121363053, '34'),
 (0.88229880338305944, '105'),
 (0.8703882797784892, '740'),
 (0.86602540378443871, '485'),
 (0.86602540378443849, '873'),
 (0.86602540378443849, '400'),
 (0.86258194917794284, '510'),
 (0.85280286542244166, '364'),
 (0.8496546792899824, '803'),
 (0.84548890303097124, '791'),
 (0.84366148773210736, '572'),
 (0.83874169727605896, '691'),
 (0.81649658092772615, '111'),
 (0.81409157841069435, '61'),
 (0.81064348337777759, '754'),
 (0.79494818839587555, '702'),
 (0.77777777777777779, '656'),
 (0.77777777777777779, '240'),
 (0.7745966692414834, '628'),
 (0.77174363314128969, '134'),
 (0.7660323462854266, '736'),
 (0.76187297467052739, '433'),
 (0.76058270804488615, '672'),
 (0.75234638921740205, '550'),
 (0.75, '920'),
 (0.75, '282'),
 (0.73477046786696476, '755'),
 (0.73333333333333328, '93'),
 (0.72875091178267182, '898'),
 (0.72760687510899902, '544'),
 (0.71704961909898546, '549'),
 (0.71574791789233527, '414'),
 (0.71490008966343122, '571'),
 (0.70512715241668933, '797'),
 (0.6998542122237652, '319'),
 (0.69208636607735918, '8'),
 (0.68599434057003539, '461'),
 (0.68449027061351886, '266'),
 (0.68377963006886322, '192'),
 (0.68262876312190002, '772'),
 (0.68000000000000005, '598'),
 (0.67845923856833545, '413'),
 (0.66666666666666663, '801'),
 (0.66513303991330475, '726'),
 (0.66332495807108005, '202'),
 (0.66101589440416353, '274'),
 (0.6559564653711033, '29'),
 (0.65121714476317949, '120'),
 (0.64659446427981104, '626'),
 (0.64517916708110479, '926'),
 (0.63960214906683133, '895'),
 (0.63639610306789274, '813'),
 (0.63524081680428401, '212'),
 (0.63510734882995579, '509'),
 (0.63373443107903848, '769'),
 (0.63245553203367588, '516'),
 (0.62877291889260245, '905'),
 (0.62678317052800869, '66'),
 (0.62572735488934839, '397'),
 (0.62541823939124253, '602'),
 (0.62360956446232352, '359'),
 (0.62325023884075159, '853'),
 (0.61631124729335096, '133'),
 (0.61627806193814494, '32'),
 (0.61218214032329854, '449'),
 (0.61010765004639778, '556'),
 (0.60983621314632785, '697'),
 (0.60276378111510298, '725'),
 (0.60238214510923238, '526'),
 (0.59317101400173944, '695'),
 (0.59249079806367744, '142'),
 (0.59161349685857023, '22'),
 (0.59137701676365806, '100'),
 (0.59041278864143232, '923'),
 (0.58976782461958865, '651'),
 (0.58966768575739814, '165'),
 (0.58734420704612511, '199'),
 (0.58490566037735858, '149'),
 (0.58160493447250017, '225'),
 (0.58095342453814691, '381'),
 (0.58072380988657202, '415'),
 (0.5788596842339373, '173'),
 (0.57864141607503072, '17'),
 (0.57735026918962584, '845'),
 (0.57569601426147765, '600'),
 (0.57442648034920984, '440'),
 (0.56518730174277076, '57'),
 (0.56461766129680702, '27'),
 (0.56011203361120399, '139'),
 (0.56011203361120387, '696'),
 (0.55941115849211676, '21'),
 (0.55555555555555558, '841'),
 (0.55182540553646942, '789'),
 (0.54772255750516607, '876'),
 (0.5449816614260754, '30'),
 (0.53931937163000609, '229'),
 (0.53895572901798439, '490'),
 (0.53873392629705863, '700'),
 (0.53863863484470587, '800'),
 (0.53726587317071928, '289'),
 (0.53466239286632999, '294'),
 (0.53452248382484879, '616'),
 (0.53452248382484879, '205'),
 (0.53439042144264159, '939'),
 (0.53420700101165797, '169'),
 (0.53008204930947511, '197'),
 (0.52989202922170509, '594'),
 (0.52894143767049184, '599'),
 (0.52849819756323313, '75'),
 (0.52338659874516447, '863'),
 (0.5222329678670935, '220'),
 (0.5222329678670935, '179'),
 (0.52159829114744527, '517'),
 (0.52081562883071519, '69'),
 (0.51915471919534639, '247'),
 (0.51839607571348056, '283'),
 (0.51743432250570853, '467'),
 (0.51525593084876564, '868'),
 (0.51238282758674292, '609'),
 (0.51082049548000896, '344'),
 (0.50898117223400252, '604'),
 (0.50833954555781602, '592'),
 (0.50798501994429412, '728'),
 (0.50460373326019414, '773'),
 (0.50449360440802704, '839'),
 (0.50213188684259824, '135'),
 (0.50060483945417467, '540'),
 (0.5, '820'),
 (0.5, '4'),
 (0.5, '260'),
 (0.5, '140'),
 (0.49892218025118684, '824'),
 (0.49872289251016583, '55'),
 (0.49801192055599736, '570'),
 (0.49700294259632, '117'),
 (0.495878699192628, '479'),
 (0.49507317131563494, '60'),
 (0.49301257198088028, '278'),
 (0.49292156515624458, '778'),
 (0.4844033254342634, '226'),
 (0.48325727477121078, '45'),
 (0.4812177395114533, '284'),
 (0.48041602183275145, '315'),
 (0.48014814485884899, '276'),
 (0.4797131283807749, '232'),
 (0.4796597599995584, '624'),
 (0.47866026300141234, '121'),
 (0.4773335240047637, '246'),
 (0.47488532628090763, '590'),
 (0.47205957654525221, '227'),
 (0.47140452079103173, '591'),
 (0.47029794974882472, '257'),
 (0.46996607699124154, '525'),
 (0.46975042247798215, '102'),
 (0.46877851383367108, '724'),
 (0.46089753804622591, '880'),
 (0.45970714331014434, '579'),
 (0.45958207794568068, '476'),
 (0.45399621485046732, '267'),
 (0.44945477470048317, '108'),
 (0.44604134290573533, '367'),
 (0.44538208330972645, '661'),
 (0.44417762925514426, '776'),
 (0.44332511923820539, '886'),
 (0.44207732436688768, '303'),
 (0.44160275752263145, '743'),
 (0.44119429554008549, '893'),
 (0.43951592784836407, '329'),
 (0.43794107961005341, '679'),
 (0.43122153515785933, '563'),
 (0.4273120328760282, '40'),
 (0.42660548821795269, '334'),
 (0.42608201988488975, '757'),
 (0.42257712736425829, '827'),
 (0.42257712736425829, '408'),
 (0.42197205281218697, '369'),
 (0.42056642968274227, '890'),
 (0.41967760778077473, '13'),
 (0.41954607798255011, '566'),
 (0.41931393468876726, '787'),
 (0.41928940957337912, '457'),
 (0.41635890185330249, '353'),
 (0.41625091713236861, '395'),
 (0.41529595485764642, '184'),
 (0.41490751865757391, '5'),
 (0.41486703808681002, '51'),
 (0.41464421443136462, '718'),
 (0.41313887573893388, '664'),
 (0.41092050602390101, '717'),
 (0.41077096096139259, '683'),
 (0.41052763029023337, '363'),
 (0.41013444482088507, '392'),
 (0.40919396764125066, '462'),
 (0.40907379161054591, '291'),
 (0.40835296256374826, '916'),
 (0.40824829046386285, '86'),
 (0.40727952844699838, '453'),
 (0.40559643104680948, '368'),
 (0.40518017441475351, '487'),
 (0.40500484282089438, '802'),
 (0.40451991747794525, '206'),
 (0.40310542256881288, '861'),
 (0.40222003227986847, '429'),
 (0.40195665056840407, '874'),
 (0.40181205568634337, '204'),
 (0.4014728735889751, '215'),
 (0.40124485149950273, '721'),
 (0.40009983687523432, '782'),
 (0.3986164921108124, '222'),
 (0.3973841836972099, '94'),
 (0.39689577268563758, '104'),
 (0.39562893832306151, '715'),
 (0.39402590424571388, '464'),
 (0.39302868179745759, '53'),
 (0.39246582403474445, '867'),
 (0.39202397720480836, '829'),
 (0.39199467431607365, '210'),
 (0.39190418182948472, '660'),
 (0.3910359202286805, '826'),
 (0.38832158167381176, '80'),
 (0.38803268106168431, '910'),
 (0.38662891665410887, '650'),
 (0.3861260986707204, '605'),
 (0.38499120468969977, '253'),
 (0.38443519403799675, '486'),
 (0.38428209863539292, '296'),
 (0.38375475749981697, '936'),
 (0.38357706825646548, '122'),
 (0.38332867863049391, '582'),
 (0.38284564907221891, '933'),
 (0.38206823214181551, '805'),
 (0.38036106972407163, '615'),
 (0.37956967370239947, '643'),
 (0.3784673741033327, '268'),
 (0.37713892166384289, '519'),
 (0.37647584913532972, '648'),
 (0.37597182533728024, '402'),
 (0.37441543222448842, '770'),
 (0.37315504683387363, '463'),
 (0.37205639426673609, '851'),
 (0.37115487031148842, '668'),
 (0.37076828471093148, '543'),
 (0.37009074000180059, '443'),
 (0.36930849609408195, '496'),
 (0.36868332945556265, '299'),
 (0.36813872362900008, '735'),
 (0.36746095934699385, '68'),
 (0.3674598783873414, '118'),
 (0.36713829578668478, '738'),
 (0.36655484454186454, '237'),
 (0.36558330242475856, '472'),
 (0.36542618701182616, '682'),
 (0.36532931369967608, '892'),
 (0.36475935778216523, '733'),
 (0.36391886058507084, '488'),
 (0.36386977863718106, '529'),
 (0.36361727710625152, '380'),
 (0.36270160350455788, '91'),
 (0.36193816477224661, '59'),
 (0.36097115534333835, '157'),
 (0.3596394065184072, '483'),
 (0.35851532890301213, '545'),
 (0.35812341458231312, '501'),
 (0.35759768762492056, '419'),
 (0.35545498513643381, '293'),
 (0.35494502503550585, '44'),
 (0.35431542783000591, '389'),
 (0.35412218988722882, '815'),
 (0.3529412910559081, '730'),
 (0.35136418446315326, '423'),
 (0.3506162720545602, '398'),
 (0.34871490092681434, '836'),
 (0.34795970853670394, '653'),
 (0.34794331166309322, '619'),
 (0.34789427874342566, '305'),
 (0.34762829547486418, '435'),
 (0.34616439336541033, '831'),
 (0.34506470569904668, '183'),
 (0.34478819448826814, '806'),
 (0.34391909212093258, '65'),
 (0.34249634416065028, '514'),
 (0.34243354206201154, '871'),
 (0.34242852686294917, '92'),
 (0.34192836784995051, '349'),
 (0.34084406873674389, '425'),
 (0.34082108029941227, '792'),
 (0.34045569753904248, '320'),
 (0.33997011874899324, '532'),
 (0.33988381110851806, '62'),
 (0.33870234004074223, '621'),
 (0.33836394755025095, '701'),
 (0.33794136430312099, '46'),
 (0.33754678780970299, '115'),
 (0.33662467908755683, '804'),
 (0.33643841250822815, '640'),
 (0.33641553903100413, '889'),
 (0.33630422420310624, '870'),
 (0.33609458169296436, '561'),
 (0.3336691377366966, '114'),
 (0.33339644603207336, '409'),
 (0.33339010502209038, '244'),
 (0.33333333333333331, '242'),
 (0.3329491778230908, '254'),
 (0.33288977580706719, '742'),
 (0.33202445622143928, '378'),
 (0.3317817458448441, '177'),
 (0.33067362749896251, '765'),
 (0.32943968458212708, '899'),
 (0.32878573503006708, '938'),
 (0.3279127215262943, '323'),
 (0.3273268353539886, '611'),
 (0.3273268353539886, '444'),
 (0.3272314465029601, '852'),
 (0.32503735248135407, '328'),
 (0.32443539759784473, '430'),
 (0.32416777409654995, '822'),
 (0.3232018909460983, '218'),
 (0.32213885519841673, '346'),
 (0.32153030259715309, '560'),
 (0.32038165626231324, '758'),
 (0.31991453380322898, '394'),
 (0.3198169378049619, '508'),
 (0.31973566061939679, '587'),
 (0.31967283666565816, '263'),
 (0.31967014362251078, '746'),
 (0.31847684079335031, '484'),
 (0.31828458677019655, '333'),
 (0.31822858171140167, '727'),
 (0.31806564522034109, '174'),
 (0.31751074553922787, '28'),
 (0.3161668515241664, '468'),
 (0.31570862967886831, '361'),
 (0.31327753743460435, '622'),
 (0.31288947489855973, '83'),
 (0.30957284991800904, '82'),
 (0.30922939381406356, '883'),
 (0.30839558069129769, '26'),
 (0.30739583399566633, '292'),
 (0.30735554897953132, '932'),
 (0.30725575666430627, '896'),
 (0.30694206967737542, '156'),
 (0.30618621784789729, '473'),
 (0.30533736987936827, '533'),
 (0.30271471539939832, '54'),
 (0.30220311499540492, '269'),
 (0.30165647640064608, '595'),
 (0.29939247542604791, '275'),
 (0.29898709502531284, '416'),
 (0.29864611456606499, '847'),
 (0.29777500019127912, '925'),
 (0.29767027889379361, '859'),
 (0.29612228014989478, '929'),
 (0.29541005709994145, '6'),
 (0.29523861710795962, '251'),
 (0.29503994428922298, '87'),
 (0.29483056930970242, '209'),
 (0.29460429968196605, '11'),
 (0.29315098498896425, '376'),
 (0.29241085302721048, '708'),
 (0.29140351901767381, '900'),
 (0.29131927528416529, '719'),
 (0.29071156796907377, '922'),
 (0.29054842555043547, '864'),
 (0.29017713717959864, '500'),
 (0.28958274433796527, '908'),
 (0.2893009506885677, '411'),
 (0.28916367674643845, '23'),
 (0.28888888888888886, '482'),
 (0.28867513459481292, '652'),
 (0.28867513459481292, '245'),
 (0.28779289105398193, '73'),
 (0.28734788556634538, '564'),
 (0.28712893292944569, '577'),
 (0.2868396272313174, '64'),
 (0.28621325973147815, '504'),
 (0.28443742889411699, '903'),
 (0.28374447307380085, '601'),
 (0.28358036520736124, '387'),
 (0.2831821645949924, '882'),
 (0.28227841435454287, '348'),
 (0.28126717497920134, '848'),
 (0.28067069969390579, '819'),
 (0.27955973292927361, '552'),
 (0.27922387203647187, '339'),
 (0.27878571213870729, '442'),
 (0.27800197519959435, '823'),
 (0.27735009811261446, '732'),
 (0.27685402763936823, '748'),
 (0.27557921741328512, '830'),
 (0.27528099422158769, '674'),
 (0.2752768588995565, '200'),
 (0.27296412113943558, '478'),
 (0.27279591677673853, '603'),
 (0.27271844728642564, '77'),
 (0.27242076081128908, '301'),
 (0.27076518053694115, '793'),
 (0.27066864107644262, '391'),
 (0.27058402678047117, '924'),
 (0.27039991231377358, '795'),
 (0.26994300465927301, '185'),
 (0.26967994498529685, '238'),
 (0.26923076923076927, '331'),
 (0.26922013123928129, '297'),
 (0.26836225220634108, '878'),
 (0.26748255012960698, '781'),
 (0.26691598132692923, '70'),
 (0.26656923220493078, '194'),
 (0.26651404997679468, '379'),
 (0.26620352994819169, '345'),
 (0.26609449259863277, '788'),
 (0.26604994460847092, '749'),
 (0.26576779009692852, '671'),
 (0.26498923834364085, '447'),
 (0.26488813067755257, '42'),
 (0.26449447415496929, '894'),
 (0.26328904330354602, '940'),
 (0.26197787928233102, '248'),
 (0.25939550881905077, '828'),
 (0.25921336627739522, '790'),
 (0.2580408110203895, '846'),
 (0.25801767932932046, '875'),
 (0.25715142542972574, '164'),
 (0.25655292260942192, '406'),
 (0.25651545145401983, '151'),
 (0.25643734216458325, '760'),
 (0.2558408479292405, '741'),
 (0.25390232268805563, '123'),
 (0.2534360039021607, '497'),
 (0.25334014822105339, '844'),
 (0.25296610752553073, '576'),
 (0.25275389922238339, '97'),
 (0.25088173330127472, '159'),
 (0.25083554359059057, '7'),
 (0.25074777237294738, '669'),
 (0.25054378579536418, '162'),
 (0.25, '842'),
 (0.24932751542153062, '647'),
 (0.24898429086916193, '158'),
 (0.2481514327576691, '350'),
 (0.24758959721871562, '554'),
 (0.24702443121810883, '249'),
 (0.24582739541962886, '881'),
 (0.24531199163995249, '877'),
 (0.24518168227112641, '313'),
 (0.24465782177787149, '495'),
 (0.24412273724650041, '311'),
 (0.24393468845452251, '428'),
 (0.24357519837018987, '290'),
 (0.24355264422367637, '460'),
 (0.24345065210577368, '224'),
 (0.24299614603574984, '48'),
 (0.24155076709652842, '145'),
 (0.24112141108520607, '412'),
 (0.24046387359899302, '455'),
 (0.24019223070763074, '596'),
 (0.24019223070763066, '662'),
 (0.23847695390781568, '689'),
 (0.23804775264343198, '325'),
 (0.2346600402347504, '95'),
 (0.23385693117468698, '573'),
 (0.23299710283649613, '907'),
 (0.23181336981073017, '343'),
 (0.23154282928907252, '885'),
 (0.23095569873572003, '694'),
 (0.23042272592816521, '450'),
 (0.2290189568419928, '198'),
 (0.2283760566483008, '99'),
 (0.22776696176921588, '458'),
 (0.22718473369882591, '597'),
 (0.22687920032466855, '794'),
 (0.22630130145333943, '307'),
 (0.22589938596060208, '332'),
 (0.22562801571375446, '865'),
 (0.22360679774997896, '581'),
 (0.22360679774997896, '171'),
 (0.22323335954029802, '178'),
 (0.22295798599344349, '569'),
 (0.22170291729335873, '189'),
 (0.21987114962886584, '709'),
 (0.21855594276908744, '407'),
 (0.21755772687832239, '493'),
 (0.21589388479418639, '491'),
 (0.21574806965041299, '862'),
 (0.21544930201298196, '130'),
 (0.21521999928873176, '421'),
 (0.21503739277489381, '627'),
 (0.21439547539696929, '308'),
 (0.21379711472780119, '774'),
 (0.21320071635561047, '404'),
 (0.21128751072371649, '711'),
 (0.21071853880396016, '271'),
 (0.21045423840304328, '168'),
 (0.21022071185860972, '270'),
 (0.2095850068248985, '762'),
 (0.20872896976677055, '234'),
 (0.20841410851538439, '160'),
 (0.20794922721188899, '606'),
 (0.20788046015507494, '136'),
 (0.20689207093638753, '634'),
 (0.20600825057278702, '452'),
 (0.20561572340611639, '941'),
 (0.20539061598575675, '492'),
 (0.20295669052869886, '537'),
 (0.2023083578870104, '119'),
 (0.20189871254031383, '503'),
 (0.20164731865208743, '144'),
 (0.20149672233049681, '854'),
 (0.20146701823369523, '913'),
 (0.19964423333823919, '528'),
 (0.1979371225354454, '785'),
 (0.19793586306722571, '707'),
 (0.19717522217683531, '255'),
 (0.19694182016634032, '843'),
 (0.19652097800084956, '148'),
 (0.19643825114905744, '58'),
 (0.19642857142857137, '657'),
 (0.19603788170613812, '857'),
 (0.19518001458970666, '817'),
 (0.19495536478768338, '56'),
 (0.19470857187164392, '25'),
 (0.19307757796612968, '201'),
 (0.19277879424982541, '256'),
 (0.19245008972987526, '362'),
 (0.19245008972987526, '355'),
 (0.19245008972987526, '33'),
 (0.19170764193890905, '279'),
 (0.19140326523985077, '437'),
 (0.19056386879158149, '489'),
 (0.18884294096235507, '203'),
 (0.18878134876749975, '250'),
 (0.1881805902599526, '370'),
 (0.18763883748662835, '477'),
 (0.18643692108114074, '919'),
 (0.18632102821336113, '784'),
 (0.18629798060119176, '655'),
 (0.18522453916856349, '373'),
 (0.18463723646899907, '304'),
 (0.1832192895445269, '377'),
 (0.18208867685735075, '360'),
 (0.18200339866662621, '506'),
 (0.18169272218944174, '663'),
 (0.18154317672621337, '703'),
 (0.18150066530199141, '901'),
 (0.18055296120420131, '181'),
 (0.17991628684379529, '637'),
 (0.17986923354612536, '137'),
 (0.17984349895232449, '216'),
 (0.17974315816415679, '699'),
 (0.17956827488766042, '645'),
 (0.17858744808359595, '125'),
 (0.17670106048134751, '456'),
 (0.17334381132038412, '814'),
 (0.17277368511627209, '441'),
 (0.17267995121147897, '710'),
 (0.1712832942499837, '116'),
 (0.17123287671232873, '287'),
 (0.1711017502447765, '338'),
 (0.17055960055182032, '690'),
 (0.17051636869323172, '921'),
 (0.17037481092399631, '644'),
 (0.16968711059062466, '629'),
 (0.16680594556377479, '109'),
 (0.16666666666666669, '750'),
 (0.16666666666666663, '612'),
 (0.16657415116319241, '448'),
 (0.1644076177175853, '466'),
 (0.16214761366475955, '759'),
 (0.16190895203870692, '860'),
 (0.15930359352880386, '747'),
 (0.15911959797304709, '43'),
 (0.15877683720748895, '172'),
 (0.15850573957717806, '583'),
 (0.15675071645899025, '37'),
 (0.15575579739146989, '780'),
 (0.15547681614558906, '756'),
 (0.15497230810193302, '659'),
 (0.15467767200980681, '911'),
 (0.15353355031998922, '638'),
 (0.15324622094308277, '768'),
 (0.15203028496707427, '2'),
 (0.15180229214421537, '521'),
 (0.15112361120838014, '76'),
 (0.14990697436440387, '633'),
 (0.14980770031964347, '264'),
 (0.14815600657644576, '72'),
 (0.14715673227582471, '642'),
 (0.14656445727474421, '15'),
 (0.14593871435350406, '474'),
 (0.14559602839603158, '221'),
 (0.14477023669268022, '417'),
 (0.14316473277595199, '542'),
 (0.14287547845726753, '16'),
 (0.14162538984948661, '438'),
 (0.14015850305872521, '796'),
 (0.13967487785855612, '786'),
 (0.13892864473887909, '763'),
 (0.1378673601522562, '85'),
 (0.13684513787599331, '375'),
 (0.13576884666042613, '50'),
 (0.13570253708545235, '340'),
 (0.13317542635135399, '49'),
 (0.13249909430812182, '213'),
 (0.13185370294885268, '426'),
 (0.13147124778907107, '138'),
 (0.12921593330692566, '686'),
 (0.12764262393882062, '141'),
 (0.12757703501362, '327'),
 (0.12459160141821911, '927'),
 (0.1240852553157244, '193'),
 (0.12262110315458577, '639'),
 (0.12170203882097515, '767'),
 (0.12124961916234914, '150'),
 (0.12094511679167302, '374'),
 (0.11926756083217398, '678'),
 (0.11918282365569906, '574'),
 (0.11785113019775793, '879'),
 (0.11762699249285613, '625'),
 (0.11742105371319957, '833'),
 (0.11722342126591087, '481'),
 (0.11623065213009559, '539'),
 (0.11592914710449397, '716'),
 (0.11434616510858275, '219'),
 (0.11308561591129782, '498'),
 (0.11308328323571265, '436'),
 (0.11278047951882526, '3'),
 (0.11236664374387367, '300'),
 (0.1106853303403157, '541'),
 (0.11022257148771403, '352'),
 (0.10996641893937592, '499'),
 (0.1083082576002941, '152'),
 (0.10627539433196855, '354'),
 (0.10584618070758108, '751'),
 (0.10569545263813657, '869'),
 (0.10551136575214054, '90'),
 (0.10538369172705943, '536'),
 (0.10415880473475868, '176'),
 (0.10029412091607928, '840'),
 (0.10026510943656272, '665'),
 (0.099230870055423845, '684'),
 (0.097175002817435144, '180'),
 (0.094199282346789592, '318'),
 (0.09418534610941387, '761'),
 (0.092572753164756175, '63'),
 (0.092057461789832387, '680'),
 (0.09187425628304112, '779'),
 (0.091430064176498876, '649'),
 (0.091337820050951452, '424'),
 (0.089700298887156305, '330'),
 (0.088905759091094896, '918'),
 (0.088865194662454627, '272'),
 (0.086710996952412009, '917'),
 (0.086384158123180385, '737'),
 (0.086326188907974291, '154'),
 (0.085924972518930748, '744'),
 (0.085688297844918798, '930'),
 (0.084996651431048148, '527'),
 (0.083693941386799142, '593'),
 (0.081013831849674603, '385'),
 (0.080845208345444328, '832'),
 (0.079872306383087177, '692'),
 (0.078851513380135824, '494'),
 (0.078702275391324489, '559'),
 (0.077552914139010332, '670'),
 (0.076938929820103419, '236'),
 (0.076022545958361512, '666'),
 (0.074848118856511978, '723'),
 (0.074639337086207569, '530'),
 (0.074243021483955327, '518'),
 (0.073716478474406613, '766'),
 (0.07347910808347255, '568'),
 (0.072340082305262302, '233'),
 (0.071619168899887425, '295'),
 (0.070995229280883088, '635'),
 (0.070633943773621949, '557'),
 (0.069334639030624437, '535'),
 (0.069109586647812776, '188'),
 (0.068340853350227215, '126'),
 (0.067549432100730528, '943'),
 (0.0663620999068536, '243'),
 (0.065756613870341984, '401'),
 (0.065427523519480793, '555'),
 (0.065027577165018641, '897'),
 (0.064401836394630985, '934'),
 (0.063799965824672844, '207'),
 (0.061101612741776473, '41'),
 (0.060697851399886288, '223'),
 (0.06012398324001713, '326'),
 (0.057974783692344524, '103'),
 (0.055908688460393541, '131'),
 (0.055646762565528196, '623'),
 (0.05184937661378846, '838'),
 (0.05060453993692577, '522'),
 (0.047619047619047603, '855'),
 (0.047275827281687062, '608'),
 (0.045927185948311931, '523'),
 (0.045894224411366223, '538'),
 (0.045834924851410587, '808'),
 (0.045039293133158118, '771'),
 (0.04326137840269647, '588'),
 (0.043142615433671615, '714'),
 (0.042871337796432284, '620'),
 (0.042714885034479115, '614'),
 (0.042191293276943882, '12'),
 (0.04218245406095978, '470'),
 (0.041792183514896226, '347'),
 (0.041788769268349804, '585'),
 (0.041031576331179313, '52'),
 (0.040321056270364163, '365'),
 (0.039971585860381478, '182'),
 (0.039397850088052674, '705'),
 (0.038298625570804316, '807'),
 (0.037131254915411326, '764'),
 (0.036123609738137531, '906'),
 (0.035264899803315007, '20'),
 (0.034309405758141405, '731'),
 (0.033022909334191324, '534'),
 (0.032626236686646069, '128'),
 (0.032284197236968647, '632'),
 (0.032282539310859788, '524'),
 (0.031265269974036107, '129'),
 (0.028999744034001167, '937'),
 (0.02761796061712295, '445'),
 (0.027087820832105477, '567'),
 (0.024734361389566882, '618'),
 (0.023667026113174852, '548'),
 (0.023617508386047367, '884'),
 (0.022066551038634433, '676'),
 (0.019994668799052335, '439'),
 (0.016661884774821015, '850'),
 (0.015330496552138688, '161'),
 (0.014979500433262034, '562'),
 (0.013838424869600307, '630'),
 (0.013702384729392562, '113'),
 (0.012471745259110514, '465'),
 (0.011065703148317767, '230'),
 (0.01084414849498733, '286'),
 (0.0097297106050102129, '887'),
 (0.0067559343166397369, '259'),
 (0.0058408996301275926, '745'),
 (0.0057639041770423532, '84'),
 (0.0057181855037568641, '280'),
 (0.0018935798144322539, '89'),
 (0.0016771480508772504, '698'),
 (5.5715132361442656e-17, '312'),
 (0, 'Eduardo'),
 (0.0, '834'),
 (0.0, '816'),
 (0.0, '675'),
 (0.0, '646'),
 (0.0, '386'),
 (0.0, '302'),
 (0.0, '261'),
 (-0.00081931371850539972, '393'),
 (-0.00083612040133782223, '480'),
 (-0.0013216811339207119, '551'),
 (-0.0024695649365424968, '81'),
 (-0.0054203925850658191, '722'),
 (-0.0061318050497156523, '825'),
 (-0.0062915127800497218, '110'),
 (-0.0080184959465941924, '396'),
 (-0.0082204019880037921, '217'),
 (-0.0085917216004501775, '405'),
 (-0.01152372536520942, '667'),
 (-0.013009523204182746, '14'),
 (-0.013243279152022537, '96'),
 (-0.016918446625115931, '693'),
 (-0.018636370929731479, '422'),
 (-0.021482695091129329, '835'),
 (-0.025545057535197906, '658'),
 (-0.026435733840270856, '821'),
 (-0.029464045610017097, '382'),
 (-0.030718379774003834, '654'),
 (-0.03126554253113379, '167'),
 (-0.031900455754433482, '469'),
 (-0.032850215990880213, '71'),
 (-0.034095942840826357, '610'),
 (-0.036896966523196198, '777'),
 (-0.037207558366961227, '214'),
 (-0.040726860826115707, '454'),
 (-0.040968143072429672, '902'),
 (-0.043236550275870103, '403'),
 (-0.045250771980226326, '262'),
 (-0.046410109424862837, '18'),
 (-0.046701446249430421, '613'),
 (-0.048238913755558083, '342'),
 (-0.049957424276150256, '399'),
 (-0.050401446608354827, '586'),
 (-0.050688419289395478, '239'),
 (-0.052642365831235091, '617'),
 (-0.057639041770423505, '888'),
 (-0.05830241336167942, '298'),
 (-0.059153558536536338, '336'),
 (-0.060440888485561305, '186'),
 (-0.064380348242971466, '277'),
 (-0.064820372355216538, '146'),
 (-0.065028154856498294, '106'),
 (-0.065311018918827179, '677'),
 (-0.067927742862156762, '195'),
 (-0.068752387277115828, '706'),
 (-0.070343927287029165, '208'),
 (-0.071767871414890438, '187'),
 (-0.072624447477400808, '196'),
 (-0.073558512535889811, '314'),
 (-0.077034789062666448, '74'),
 (-0.086464541168502676, '321'),
 (-0.090260128654309657, '24'),
 (-0.092213889195414678, '31'),
 (-0.09234396144846363, '10'),
 (-0.093910629171758644, '837'),
 (-0.096869441004663978, '285'),
 (-0.096925996664627728, '553'),
 (-0.098310469704951803, '67'),
 (-0.10206207261596573, '9'),
 (-0.10359079584873412, '124'),
 (-0.1051947907112005, '383'),
 (-0.10695208860918337, '704'),
 (-0.11165085542764537, '575'),
 (-0.11547005383792519, '310'),
 (-0.11602708332524606, '931'),
 (-0.11664236870396086, '515'),
 (-0.12355524564107227, '357'),
 (-0.12508275318510453, '798'),
 (-0.13048176405112738, '505'),
 (-0.1307959411946808, '337'),
 (-0.1314591805000592, '288'),
 (-0.13251101690470485, '432'),
 (-0.1336306209562122, '252'),
 (-0.13436715393281903, '420'),
 (-0.13721630913136923, '175'),
 (-0.13826657968874304, '513'),
 (-0.13931955314383823, '928'),
 (-0.14165764939496564, '316'),
 (-0.14396315014973896, '322'),
 (-0.14545454545454553, '580'),
 (-0.14596855203028553, '565'),
 (-0.15058497115908964, '38'),
 (-0.15877683720748895, '775'),
 (-0.16936353761598091, '459'),
 (-0.17407765595569785, '191'),
 (-0.17626105969569267, '502'),
 (-0.17817416127494959, '324'),
 (-0.18078374748072606, '942'),
 (-0.18767309095164098, '231'),
 (-0.18898223650461357, '809'),
 (-0.1889822365046136, '410'),
 (-0.1889822365046136, '384'),
 (-0.1895245108947258, '584'),
 (-0.1936491673103708, '132'),
 (-0.19450688877796157, '641'),
 (-0.19565026354391216, '753'),
 (-0.1962467660293343, '306'),
 (-0.20082935971859384, '451'),
 (-0.20229696102929787, '546'),
 (-0.20365326999063921, '909'),
 (-0.20795444194958762, '235'),
 (-0.21100433439317867, '712'),
 (-0.21474470475555713, '912'),
 (-0.23269496690831384, '372'),
 (-0.23489875447901234, '734'),
 (-0.23809523809523808, '390'),
 (-0.24848395479607643, '371'),
 (-0.25485095051420248, '607'),
 (-0.25668636453585431, '891'),
 (-0.26024171938480806, '935'),
 (-0.26388888888888884, '101'),
 (-0.27437926239387295, '211'),
 (-0.27735009811261457, '170'),
 (-0.29327468426080211, '434'),
 (-0.29536530585093246, '507'),
 (-0.29880715233359845, '783'),
 (-0.29957234475763905, '475'),
 (-0.31525922540806467, '388'),
 (-0.316227766016838, '720'),
 (-0.31662949529084566, '79'),
 (-0.31772827586148411, '752'),
 (-0.3273268353539886, '258'),
 (-0.33275626858414736, '265'),
 (-0.33333333333333331, '446'),
 (-0.34921514788478908, '512'),
 (-0.36144869800612445, '366'),
 (-0.37793440591084715, '127'),
 (-0.38152918122868701, '98'),
 (-0.3871895528375523, '190'),
 (-0.39606594705405657, '636'),
 (-0.39852669849304284, '163'),
 (-0.4099600308453939, '335'),
 (-0.42289279400031321, '471'),
 (-0.42695628191498336, '153'),
 (-0.42775741552143243, '739'),
 (-0.43226548355826661, '872'),
 (-0.43788026951985703, '558'),
 (-0.44172610429938625, '578'),
 (-0.48359501402498967, '358'),
 (-0.5, '713'),
 (-0.57646135369831375, '35'),
 (-0.57655666019705509, '281'),
 (-0.57735026918962573, '818'),
 (-0.57735026918962573, '19'),
 (-0.58607805958151038, '904'),
 (-0.60009919814897894, '427'),
 (-0.60048057676907685, '673'),
 (-0.60633906259083248, '914'),
 (-0.66212219197173072, '317'),
 (-0.66903056959114182, '589'),
 (-0.75207104699523364, '78'),
 (-0.7543365091413573, '112'),
 (-0.80757285308724835, '228'),
 (-0.86602540378443849, '856'),
 (-0.94491118252306783, '143'),
 (-0.94491118252306794, '36'),
 (-1.0, '681'),
 (-1.0, '47'),
 (-1.0, '431')]

In [334]:
recommend_critics = recommend_critics_optimized

In [335]:
def top_critics(db, person, similarity, n=30):
    return recommend_critics(db, person, similarity)[:n]

In [336]:
%time top_critics(db, "1", pearson_similarity)


CPU times: user 9.87 s, sys: 595 ms, total: 10.5 s
Wall time: 10.5 s
Out[336]:
[(1.0, '866'),
 (1.0, '812'),
 (1.0, '811'),
 (1.0, '810'),
 (1.0, '531'),
 (1.0, '511'),
 (1.0, '39'),
 (1.0, '351'),
 (1.0, '273'),
 (1.0, '166'),
 (0.95257934441568026, '520'),
 (0.91653421378307787, '107'),
 (0.90453403373329089, '687'),
 (0.89104211121363053, '34'),
 (0.88229880338305944, '105'),
 (0.8703882797784892, '740'),
 (0.86602540378443871, '485'),
 (0.86602540378443849, '873'),
 (0.86602540378443849, '400'),
 (0.86258194917794284, '510'),
 (0.85280286542244166, '364'),
 (0.8496546792899824, '803'),
 (0.84548890303097124, '791'),
 (0.84366148773210736, '572'),
 (0.83874169727605896, '691'),
 (0.81649658092772615, '111'),
 (0.81409157841069435, '61'),
 (0.81064348337777759, '754'),
 (0.79494818839587555, '702'),
 (0.77777777777777779, '656')]

Recommend movies based on all the db


In [341]:
def recommend_movies_original(db, person, similarity, n=30, m=30):
    totals = {}
    similarity_sums = {}
    for simil, critic in top_critics(db, person, similarity, n):
        if simil <= 0: continue
        for movie in db[critic]:
            if movie not in db[person] or db[person][movie] == 0:
                totals.setdefault(movie, 0)
                totals[movie] += db[critic][movie]*simil
                similarity_sums.setdefault(movie, 0)
                similarity_sums[movie] += simil
    rankings = [(total/similarity_sums[movie], movie)
               for movie, total in totals.items()]
    return sorted(rankings)[::-1][:m]

In [353]:
%time recommend_movies_original(db, "1", pearson_similarity)


CPU times: user 9.49 s, sys: 623 ms, total: 10.1 s
Wall time: 10.1 s
Out[353]:
[(5.0000000000000009, 'Postman, The (1997)'),
 (5.0, 'Women, The (1939)'),
 (5.0, 'Winter Guest, The (1997)'),
 (5.0, "She's the One (1996)"),
 (5.0, 'Shadow Conspiracy (1997)'),
 (5.0, 'Seventh Seal, The (Sjunde inseglet, Det) (1957)'),
 (5.0, 'Sense and Sensibility (1995)'),
 (5.0, "Schindler's List (1993)"),
 (5.0, 'Rear Window (1954)'),
 (5.0, 'Philadelphia (1993)'),
 (5.0, 'Matilda (1996)'),
 (5.0, 'Love Jones (1997)'),
 (5.0, 'Leaving Las Vegas (1995)'),
 (5.0, 'Kids (1995)'),
 (5.0, "It's a Wonderful Life (1946)"),
 (5.0, 'It Happened One Night (1934)'),
 (5.0, 'Great Dictator, The (1940)'),
 (5.0, 'Big Lebowski, The (1998)'),
 (5.0, 'American President, The (1995)'),
 (4.5522898401481484, 'Thousand Acres, A (1997)'),
 (4.3717778769846021, 'Desperate Measures (1998)'),
 (4.2753227231893352, 'Titanic (1997)'),
 (4.2733948756213609, 'Rainmaker, The (1997)'),
 (4.2148784307905158, 'Anna Karenina (1997)'),
 (4.0598326384530221, 'L.A. Confidential (1997)'),
 (4.0275325817142607, 'Mrs. Dalloway (1997)'),
 (4.0207157535182798, 'Kiss the Girls (1997)'),
 (4.0090443890632832, "Eve's Bayou (1997)"),
 (4.0, 'Wedding Singer, The (1998)'),
 (4.0, 'Time to Kill, A (1996)')]

In [357]:
def recommend_movies_optimized(db, person, similarity, n=30, m=30):
    totals = {}
    similarity_sums = {}
    for simil, critic in iter(top_critics(db, person, similarity, n)):
        if simil <= 0: continue
        for movie in db[critic].iterkeys():
            if movie not in db[person]:
                totals.setdefault(movie, 0)
                totals[movie] += db[critic][movie]*simil
                similarity_sums.setdefault(movie, 0)
                similarity_sums[movie] += simil
    rankings = [(total/similarity_sums[movie], movie)
               for movie, total in totals.items()]
    return sorted(rankings)[::-1][:m]

In [358]:
%time recommend_movies_optimized(db, "1", pearson_similarity)


CPU times: user 9.33 s, sys: 563 ms, total: 9.89 s
Wall time: 9.91 s
Out[358]:
[(5.0000000000000009, 'Postman, The (1997)'),
 (5.0, 'Women, The (1939)'),
 (5.0, 'Winter Guest, The (1997)'),
 (5.0, "She's the One (1996)"),
 (5.0, 'Shadow Conspiracy (1997)'),
 (5.0, 'Seventh Seal, The (Sjunde inseglet, Det) (1957)'),
 (5.0, 'Sense and Sensibility (1995)'),
 (5.0, "Schindler's List (1993)"),
 (5.0, 'Rear Window (1954)'),
 (5.0, 'Philadelphia (1993)'),
 (5.0, 'Matilda (1996)'),
 (5.0, 'Love Jones (1997)'),
 (5.0, 'Leaving Las Vegas (1995)'),
 (5.0, 'Kids (1995)'),
 (5.0, "It's a Wonderful Life (1946)"),
 (5.0, 'It Happened One Night (1934)'),
 (5.0, 'Great Dictator, The (1940)'),
 (5.0, 'Big Lebowski, The (1998)'),
 (5.0, 'American President, The (1995)'),
 (4.5522898401481484, 'Thousand Acres, A (1997)'),
 (4.3717778769846021, 'Desperate Measures (1998)'),
 (4.2753227231893352, 'Titanic (1997)'),
 (4.2733948756213609, 'Rainmaker, The (1997)'),
 (4.2148784307905158, 'Anna Karenina (1997)'),
 (4.0598326384530221, 'L.A. Confidential (1997)'),
 (4.0275325817142607, 'Mrs. Dalloway (1997)'),
 (4.0207157535182798, 'Kiss the Girls (1997)'),
 (4.0090443890632832, "Eve's Bayou (1997)"),
 (4.0, 'Wedding Singer, The (1998)'),
 (4.0, 'Time to Kill, A (1996)')]

In [364]:
get_recommendations = recommend_movies_optimized

Comparison with current implementation


In [360]:
import recommendations as rec

In [366]:
%time rec.get_recommendations(db, "1")


CPU times: user 1min 5s, sys: 5.06 s, total: 1min 10s
Wall time: 1min 10s
Out[366]:
[(5.0, 'They Made Me a Criminal (1939)'),
 (5.0, 'Star Kid (1997)'),
 (5.0, "Someone Else's America (1995)"),
 (5.0, 'Santa with Muscles (1996)'),
 (5.0, 'Saint of Fort Washington, The (1993)'),
 (5.0, 'Prefontaine (1997)'),
 (5.0, 'Marlene Dietrich: Shadow and Light (1996) '),
 (5.0, 'Little City (1998)'),
 (5.0, 'Aiqing wansui (1994)'),
 (4.999999999999999, 'Great Day in Harlem, A (1994)'),
 (4.768149552524299, 'Two or Three Things I Know About Her (1966)'),
 (4.682633172633338, 'Anna (1996)'),
 (4.623726612933918, 'Pather Panchali (1955)'),
 (4.521589387248104, 'Close Shave, A (1995)'),
 (4.515144270419964, "Some Mother's Son (1996)"),
 (4.514962379404503, 'Aparajito (1956)'),
 (4.502557827437198, 'Casablanca (1942)'),
 (4.501965635892865, 'Hearts and Minds (1996)'),
 (4.467929758957103, 'Everest (1998)'),
 (4.467775885199613, "Schindler's List (1993)"),
 (4.452311232743258, 'Rear Window (1954)'),
 (4.430827645329046, 'Leading Man, The (1996)'),
 (4.398314267646154, 'Third Man, The (1949)'),
 (4.3947974710963775, 'Some Folks Call It a Sling Blade (1993)'),
 (4.390203496843857, 'Secrets & Lies (1996)'),
 (4.34909291778014, 'Paths of Glory (1957)'),
 (4.345242465632432, 'Lawrence of Arabia (1962)'),
 (4.344443858820902, 'Nico Icon (1995)'),
 (4.3264677316042945, "One Flew Over the Cuckoo's Nest (1975)"),
 (4.314308361156362, 'Laura (1944)'),
 (4.314275801365875, 'North by Northwest (1959)'),
 (4.311326613800141,
  'Double vie de V\xe9ronique, La (Double Life of Veronique, The) (1991)'),
 (4.308016923974665, 'Sum of Us, The (1994)'),
 (4.29596052752967, 'Titanic (1997)'),
 (4.285639229065141, 'Kaspar Hauser (1993)'),
 (4.2797314479007875, 'Faust (1994)'),
 (4.27824205842774, 'Vertigo (1958)'),
 (4.2740929508288605, 'Affair to Remember, An (1957)'),
 (4.271558053893983, 'Raise the Red Lantern (1991)'),
 (4.269331556993012, 'To Kill a Mockingbird (1962)'),
 (4.253666772646136, 'Golden Earrings (1947)'),
 (4.253520726082724, 'High Noon (1952)'),
 (4.25221692505489, 'Manchurian Candidate, The (1962)'),
 (4.251117417656437, 'Ruling Class, The (1972)'),
 (4.247941277765001,
  'Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb (1963)'),
 (4.246388406588333, 'When We Were Kings (1996)'),
 (4.24352564199214, 'L.A. Confidential (1997)'),
 (4.237693643940662, 'Boys of St. Vincent, The (1993)'),
 (4.236767684766707, 'Bitter Sugar (Azucar Amargo) (1996)'),
 (4.234506534412614, 'Killing Fields, The (1984)'),
 (4.232212198734196, 'Wedding Gift, The (1994)'),
 (4.2227067528677855, 'Maltese Falcon, The (1941)'),
 (4.209832877464033, 'Crossfire (1947)'),
 (4.2094554091929135, 'Ran (1985)'),
 (4.209445517317285, 'Great Escape, The (1963)'),
 (4.196531137090107, 'Boot, Das (1981)'),
 (4.194113451667223, 'Thin Man, The (1934)'),
 (4.192378200415159, 'Chinatown (1974)'),
 (4.188269633393619, 'Before the Rain (Pred dozhdot) (1994)'),
 (4.183159394548041, 'Whole Wide World, The (1996)'),
 (4.178883464092049, 'Letter From Death Row, A (1998)'),
 (4.173915225266734, 'African Queen, The (1951)'),
 (4.172932353016253, 'M (1931)'),
 (4.167336256224223, 'Philadelphia Story, The (1940)'),
 (4.167115137370936, 'Braindead (1992)'),
 (4.163811023154938, 'Meet John Doe (1941)'),
 (4.1593134614044995, 'Treasure of the Sierra Madre, The (1948)'),
 (4.1542987115568755, 'Big Sleep, The (1946)'),
 (4.15343552503144, 'Roman Holiday (1953)'),
 (4.15290524471087, 'All About Eve (1950)'),
 (4.146186848497665, 'Persuasion (1995)'),
 (4.145617466958719, '39 Steps, The (1935)'),
 (4.143816043058301, 'Notorious (1946)'),
 (4.134737528967017, "Boy's Life 2 (1997)"),
 (4.1331086090158, 'Inspector General, The (1949)'),
 (4.132364896911864, 'Duck Soup (1933)'),
 (4.131853365952943, 'Love in the Afternoon (1957)'),
 (4.123271308122241, 'Waiting for Guffman (1996)'),
 (4.12311289213235, '8 1/2 (1963)'),
 (4.122801353763254, "It's a Wonderful Life (1946)"),
 (4.118953359048889, 'Sunset Blvd. (1950)'),
 (4.11845083390682, 'Top Hat (1935)'),
 (4.099448446367682, 'Hard Eight (1996)'),
 (4.099416861973534, 'Glory (1989)'),
 (4.094918835236782, 'Cool Hand Luke (1967)'),
 (4.09384141417567, 'Quiet Man, The (1952)'),
 (4.089229146783533, 'Die xue shuang xiong (Killer, The) (1989)'),
 (4.088959036537182, 'Once Were Warriors (1994)'),
 (4.08122935152445, 'My Man Godfrey (1936)'),
 (4.0793945031217245, 'Apt Pupil (1998)'),
 (4.077481660694603, 'Man Who Would Be King, The (1975)'),
 (4.073808218448152, 'Sense and Sensibility (1995)'),
 (4.071336941965591, 'Magic Hour, The (1998)'),
 (4.070106231810701, 'It Happened One Night (1934)'),
 (4.0643319468227785, 'Wings of Desire (1987)'),
 (4.062601948178812, 'Strictly Ballroom (1992)'),
 (4.062423958305295, 'Great Dictator, The (1940)'),
 (4.0622829426756075, 'Magnificent Seven, The (1954)'),
 (4.055511850233321, 'Some Like It Hot (1959)'),
 (4.051410521628911, 'Arsenic and Old Lace (1944)'),
 (4.049782163106971, 'Gandhi (1982)'),
 (4.047371216693525, 'My Life as a Dog (Mitt liv som hund) (1985)'),
 (4.0429104255369035,
  'Paradise Lost: The Child Murders at Robin Hood Hills (1996)'),
 (4.03716579470467, 'To Catch a Thief (1955)'),
 (4.0346488845998225, "Singin' in the Rain (1952)"),
 (4.034145597028222, 'Hamlet (1996)'),
 (4.029204750872573, 'As Good As It Gets (1997)'),
 (4.027653040394667, 'Charade (1963)'),
 (4.025400451187104, 'Gaslight (1944)'),
 (4.020867483955291, 'Local Hero (1983)'),
 (4.019332851168276, 'Butch Cassidy and the Sundance Kid (1969)'),
 (4.017624083553664, 'Fresh (1994)'),
 (4.005952749758068, 'Wild Bunch, The (1969)'),
 (4.005394445766769, 'Shine (1996)'),
 (4.002354379351474, 'Rebecca (1940)'),
 (4.0, 'Witness (1985)'),
 (4.0, 'Wings of Courage (1995)'),
 (4.0, 'Window to Paris (1994)'),
 (4.0, 'Tokyo Fist (1995)'),
 (4.0, 'The Innocent (1994)'),
 (4.0, 'Stonewall (1995)'),
 (4.0, 'Spirits of the Dead (Tre passi nel delirio) (1968)'),
 (4.0, 'Spanish Prisoner, The (1997)'),
 (4.0, 'Show, The (1995)'),
 (4.0, 'Scarlet Letter, The (1926)'),
 (4.0, 'Run of the Country, The (1995)'),
 (4.0, 'Object of My Affection, The (1998)'),
 (4.0, 'Mamma Roma (1962)'),
 (4.0, 'Lady of Burlesque (1943)'),
 (4.0, 'Killer: A Journal of Murder (1995)'),
 (4.0, "Jupiter's Wife (1994)"),
 (4.0, 'It Takes Two (1995)'),
 (4.0, 'Innocents, The (1961)'),
 (4.0, "I Don't Want to Talk About It (De eso no se habla) (1993)"),
 (4.0, 'He Walked by Night (1948)'),
 (4.0, 'Gate of Heavenly Peace, The (1995)'),
 (4.0, 'Farmer & Chase (1995)'),
 (4.0, 'Desert Winds (1995)'),
 (4.0, 'Death in Brunswick (1991)'),
 (4.0, 'Damsel in Distress, A (1937)'),
 (4.0, 'C\xe9r\xe9monie, La (1995)'),
 (4.0, 'Celestial Clockwork (1994)'),
 (4.0, 'Butcher Boy, The (1998)'),
 (4.0, 'Brothers in Trouble (1995)'),
 (4.0, 'Big Bang Theory, The (1994)'),
 (4.0, 'Beans of Egypt, Maine, The (1994)'),
 (4.0, 'American Dream (1990)'),
 (3.9926112294438956, 'Farewell My Concubine (1993)'),
 (3.992208914259682, "Sophie's Choice (1982)"),
 (3.991765036048694, 'To Live (Huozhe) (1994)'),
 (3.99141528871411, 'Lost Horizon (1937)'),
 (3.990640047368697, 'Little Princess, The (1939)'),
 (3.9893313595071827, 'For Whom the Bell Tolls (1943)'),
 (3.9872466285394235, 'Brassed Off (1996)'),
 (3.9853031430244417, 'City of Lost Children, The (1995)'),
 (3.9850986472943766, 'Double Happiness (1994)'),
 (3.984996136657843, 'In the Name of the Father (1993)'),
 (3.978405544803044, 'Night on Earth (1991)'),
 (3.974391819291983, 'Shallow Grave (1994)'),
 (3.970669514730922,
  'Return of Martin Guerre, The (Retour de Martin Guerre, Le) (1982)'),
 (3.9700632668818194, 'Shadowlands (1993)'),
 (3.9698462210182437, 'Trust (1990)'),
 (3.9683715788308684, 'East of Eden (1955)'),
 (3.9676179671460963, 'Touch of Evil (1958)'),
 (3.9667434732526594, 'Foreign Correspondent (1940)'),
 (3.9664826022992163, 'His Girl Friday (1940)'),
 (3.9651210432702326, 'Spellbound (1945)'),
 (3.96063689844747, 'Annie Hall (1977)'),
 (3.9595509678009937, 'Day the Earth Stood Still, The (1951)'),
 (3.956587233123225, 'Walkabout (1971)'),
 (3.952212402574117, 'Down by Law (1986)'),
 (3.947097994243276, 'Trainspotting (1996)'),
 (3.946799890882679, 'Thirty-Two Short Films About Glenn Gould (1993)'),
 (3.9452644125309004, 'Month by the Lake, A (1995)'),
 (3.9431867288248497, 'Being There (1979)'),
 (3.942429637524551, 'Beautiful Thing (1996)'),
 (3.9416795225208703, 'Dial M for Murder (1954)'),
 (3.9407682512667788, 'Quiet Room, The (1996)'),
 (3.9370371813324794, 'Once Upon a Time in the West (1969)'),
 (3.932565772088692, "C'est arriv\xe9 pr\xe8s de chez vous (1992)"),
 (3.9318308124523114, 'Harold and Maude (1971)'),
 (3.929888845176955, 'Rosencrantz and Guildenstern Are Dead (1990)'),
 (3.9282531601584285, 'Primary Colors (1998)'),
 (3.924625884955202, 'Flirt (1995)'),
 (3.9238429938244215, 'Farewell to Arms, A (1932)'),
 (3.9216673946448486, 'Thieves (Voleurs, Les) (1996)'),
 (3.918920758104656, 'Christmas Carol, A (1938)'),
 (3.9176935660662218, 'Mrs. Brown (Her Majesty, Mrs. Brown) (1997)'),
 (3.9152065794078537, 'Safe (1995)'),
 (3.907971965896906, 'Cosi (1996)'),
 (3.906715502413803, 'Philadelphia (1993)'),
 (3.9008569467058236, 'Crooklyn (1994)'),
 (3.8956234389611333, 'Forbidden Planet (1956)'),
 (3.8847845051414023, 'My Left Foot (1989)'),
 (3.8841255138144786, 'Big Lebowski, The (1998)'),
 (3.88411879930257,
  'Like Water For Chocolate (Como agua para chocolate) (1992)'),
 (3.8800082560884177, 'Living in Oblivion (1995)'),
 (3.8797106374164563, 'Ben-Hur (1959)'),
 (3.878172831153474, 'My Favorite Season (1993)'),
 (3.8743668227775143, 'Streetcar Named Desire, A (1951)'),
 (3.8732191298475573, 'Apartment, The (1960)'),
 (3.872588329424799, 'Gay Divorcee, The (1934)'),
 (3.8722956456473243, 'Mina Tannenbaum (1994)'),
 (3.871692603414692, 'Stand by Me (1986)'),
 (3.8704317557293013, 'In the Bleak Midwinter (1995)'),
 (3.8689880642370684, 'Celluloid Closet, The (1995)'),
 (3.865971773271836, 'Bringing Up Baby (1938)'),
 (3.8647870192195946, 'Adventures of Robin Hood, The (1938)'),
 (3.862790447229482, 'Donnie Brasco (1997)'),
 (3.858186686680705, 'Beat the Devil (1954)'),
 (3.858073026838916, 'A Chef in Love (1996)'),
 (3.852209842992686, 'Deer Hunter, The (1978)'),
 (3.8518994477354016, 'Amistad (1997)'),
 (3.8488327716692714, 'Bonnie and Clyde (1967)'),
 (3.8467119864181, 'Bob Roberts (1992)'),
 (3.8410551712161065, 'Sabrina (1954)'),
 (3.839977670556372, 'Birds, The (1963)'),
 (3.8390165155056355, 'E.T. the Extra-Terrestrial (1982)'),
 (3.837841734294195, 'Rebel Without a Cause (1955)'),
 (3.836566742308004, 'Burnt By the Sun (1994)'),
 (3.836480553599936, 'Shall We Dance? (1937)'),
 (3.8332219071528937, 'Incognito (1997)'),
 (3.8325885893950673, 'Short Cuts (1993)'),
 (3.8316050233883825, "Margaret's Museum (1995)"),
 (3.830010330616234, 'Leaving Las Vegas (1995)'),
 (3.8294222364314803, 'Stalker (1979)'),
 (3.826689307984213, 'Secret of Roan Inish, The (1994)'),
 (3.8162370464147863, 'So Dear to My Heart (1949)'),
 (3.81392747536216, 'Mediterraneo (1991)'),
 (3.813922496989481, 'Bronx Tale, A (1993)'),
 (3.8103421682136775, 'Diva (1981)'),
 (3.8082094729346627, 'Cat on a Hot Tin Roof (1958)'),
 (3.8076186605296773, 'Winnie the Pooh and the Blustery Day (1968)'),
 (3.806963241199463, 'Gabbeh (1996)'),
 (3.802687653993167, 'Stripes (1981)'),
 (3.8012779495713818, 'Underground (1995)'),
 (3.8002254487099436,
  'Wonderful, Horrible Life of Leni Riefenstahl, The (1993)'),
 (3.7961944345411966, 'Enchanted April (1991)'),
 (3.7939816780246285, 'Chungking Express (1994)'),
 (3.793803096135329, 'Paris Is Burning (1990)'),
 (3.7935276449273854, 'Anne Frank Remembered (1995)'),
 (3.7928446456566927, "Ulee's Gold (1997)"),
 (3.7870909905904413, 'Casino (1995)'),
 (3.785958772215435, 'Manhattan (1979)'),
 (3.784467291827927, 'Giant (1956)'),
 (3.7809110837664046, 'Bullets Over Broadway (1994)'),
 (3.778693716021738, 'Ninotchka (1939)'),
 (3.7712329113300593, 'Fille seule, La (A Single Girl) (1995)'),
 (3.770632491183878, 'Grosse Fatigue (1994)'),
 (3.7635063816486745, 'Face/Off (1997)'),
 (3.763322706007145, 'Swimming with Sharks (1995)'),
 (3.7594060028972556, 'Six Degrees of Separation (1993)'),
 (3.757498342238751, 'Thin Blue Line, The (1988)'),
 (3.754361616919439, 'Last Time I Saw Paris, The (1954)'),
 (3.7510690709019796, 'In the Line of Fire (1993)'),
 (3.7471047146431573, 'Wings of the Dove, The (1997)'),
 (3.742920008492407, 'Heathers (1989)'),
 (3.7423121059224878, 'My Family (1995)'),
 (3.740396600480007, 'Dead Man (1995)'),
 (3.7403083482073307, 'Tin Drum, The (Blechtrommel, Die) (1979)'),
 (3.74014177179484, 'Fantasia (1940)'),
 (3.7385870641770826, 'Little Princess, A (1995)'),
 (3.7325194038913403, "Miller's Crossing (1990)"),
 (3.7320469490804276, 'Perfect Candidate, A (1996)'),
 (3.730615069569311, 'Fried Green Tomatoes (1991)'),
 (3.7275494819061983, 'Pinocchio (1940)'),
 (3.725724837962816, 'Flirting With Disaster (1996)'),
 (3.7235816928663152, 'Blue Angel, The (Blaue Engel, Der) (1930)'),
 (3.722422975411309, 'Emma (1996)'),
 (3.719043708837082, 'Looking for Richard (1996)'),
 (3.7187026328300203, 'To Be or Not to Be (1942)'),
 (3.716708810035909, 'Jeffrey (1995)'),
 (3.716596216387581, 'Ice Storm, The (1997)'),
 (3.7151566647967944, 'People vs. Larry Flynt, The (1996)'),
 (3.7146926870554924, 'One Night Stand (1997)'),
 (3.7099068416771135, 'Ghost in the Shell (Kokaku kidotai) (1995)'),
 (3.7072523620167606, 'Four Days in September (1997)'),
 (3.707076409353137, 'Nelly & Monsieur Arnaud (1995)'),
 (3.7064642478050924, 'Manhattan Murder Mystery (1993)'),
 (3.7044336717083945, 'Bottle Rocket (1996)'),
 (3.702313263954396, 'Hear My Song (1991)'),
 (3.702086252356044, 'Vanya on 42nd Street (1994)'),
 (3.701889098909051, 'Beauty and the Beast (1991)'),
 (3.701563334961046, 'Set It Off (1996)'),
 (3.7008837139923805, 'Sweet Hereafter, The (1997)'),
 (3.698622025074928, 'My Own Private Idaho (1991)'),
 (3.698444285149658, 'Cure, The (1995)'),
 (3.6948665257858626, 'Smoke (1995)'),
 (3.6885664227942914, 'Mrs. Dalloway (1997)'),
 (3.684398562814382, 'World of Apu, The (Apur Sansar) (1959)'),
 (3.68288550835073, 'I Shot Andy Warhol (1996)'),
 (3.678678724059109, 'Perfect World, A (1993)'),
 (3.676474521987521, 'Mis\xe9rables, Les (1995)'),
 (3.6737756175198477, 'Heavenly Creatures (1994)'),
 (3.671565971130662, 'Bad Taste (1987)'),
 (3.6714184643350087, 'Bananas (1971)'),
 (3.668780764751007, 'English Patient, The (1996)'),
 (3.667943457760777, 'Circle of Friends (1995)'),
 (3.6669426835657526, "Nobody's Fool (1994)"),
 (3.6624711577367406, 'Othello (1995)'),
 (3.6547620467099513, "William Shakespeare's Romeo and Juliet (1996)"),
 (3.6534007003280506, 'Funny Face (1957)'),
 (3.651325094358346, 'Alice in Wonderland (1951)'),
 (3.6512404342907616, 'My Fair Lady (1964)'),
 (3.6504666228591547, 'Miracle on 34th Street (1994)'),
 (3.6504463835483305, 'Tombstone (1993)'),
 (3.6469059214168724, 'Hate (Haine, La) (1995)'),
 (3.646827572270467, 'Rainmaker, The (1997)'),
 (3.646707116014767, 'Real Genius (1985)'),
 (3.6461648674030664, 'American in Paris, An (1951)'),
 (3.6431260185868286, 'Candidate, The (1972)'),
 (3.6424498278769484, 'Rosewood (1997)'),
 (3.642289353252364, "Marvin's Room (1996)"),
 (3.639312446200438, 'Maybe, Maybe Not (Bewegte Mann, Der) (1994)'),
 (3.6368545089709405, 'Little Women (1994)'),
 (3.6348193752672278, 'Dave (1993)'),
 (3.6330394287646914, 'Some Kind of Wonderful (1987)'),
 (3.6329087941056835, 'Mrs. Parker and the Vicious Circle (1994)'),
 (3.632400938792567, 'Dangerous Beauty (1998)'),
 (3.628269422109967, 'Women, The (1939)'),
 (3.626543123525838, 'Last Supper, The (1995)'),
 (3.6252945024112275, 'Jerky Boys, The (1994)'),
 (3.625234936775902, 'Cry, the Beloved Country (1995)'),
 (3.6246491183186316, 'Mary Poppins (1964)'),
 (3.623767731002098, 'Koyaanisqatsi (1983)'),
 (3.6206343880661573, 'True Crime (1995)'),
 (3.6198602358699716, 'Kim (1950)'),
 (3.6183884698674187, 'Paris, Texas (1984)'),
 (3.6183026894324155,
  'Nosferatu (Nosferatu, eine Symphonie des Grauens) (1922)'),
 (3.617150799507001,
  'Garden of Finzi-Contini, The (Giardino dei Finzi-Contini, Il) (1970)'),
 (3.614861416764225, 'Air Force One (1997)'),
 (3.6129834916624444,
  'Umbrellas of Cherbourg, The (Parapluies de Cherbourg, Les) (1964)'),
 (3.6123318227654075, 'Private Parts (1997)'),
 (3.611478743052876, 'Mercury Rising (1998)'),
 (3.6098488532773803, 'Far From Home: The Adventures of Yellow Dog (1995)'),
 (3.6084096064155964, 'Menace II Society (1993)'),
 (3.6084003367638564, 'Crying Game, The (1992)'),
 (3.608249425638342, "What's Love Got to Do with It (1993)"),
 (3.6071419994368807, 'Colonel Chabert, Le (1994)'),
 (3.6065770398631707, 'Faithful (1996)'),
 (3.6038792076369113, 'Bride of Frankenstein (1935)'),
 (3.6037835993932754, 'American President, The (1995)'),
 (3.603016963628418, 'Story of Xinghua, The (1993)'),
 (3.602841679204589, 'Rob Roy (1995)'),
 (3.602646810058777, 'American Werewolf in London, An (1981)'),
 (3.602264988817144, 'Red Rock West (1992)'),
 (3.60164480283068,
  'Adventures of Priscilla, Queen of the Desert, The (1994)'),
 (3.600232602669966, 'Schizopolis (1996)'),
 (3.5997213543409283, 'Night Flier (1997)'),
 (3.5983025570713925, 'Speed (1994)'),
 (3.5944791677214027, "Widows' Peak (1994)"),
 (3.594268285877004, 'Time to Kill, A (1996)'),
 (3.5915558210101772, 'Horse Whisperer, The (1998)'),
 (3.5904585721663484, 'It Could Happen to You (1994)'),
 (3.5901064026545235, "Microcosmos: Le peuple de l'herbe (1996)"),
 (3.5892254538034023, 'Thousand Acres, A (1997)'),
 (3.5885344907804706, 'Withnail and I (1987)'),
 (3.5881372855227425, "Muriel's Wedding (1994)"),
 (3.5878306095713137, 'Desperate Measures (1998)'),
 (3.585403999573905, "Eve's Bayou (1997)"),
 (3.584661148160319, 'Strawberry and Chocolate (Fresa y chocolate) (1993)'),
 (3.583720828757304, 'Primal Fear (1996)'),
 (3.582004258479234, 'Men With Guns (1997)'),
 (3.5817330777893064, 'Hour of the Pig, The (1993)'),
 (3.579770481217393, 'Stalingrad (1993)'),
 (3.5784014653329836, 'Bewegte Mann, Der (1994)'),
 (3.57695001486469, 'Twelfth Night (1996)'),
 (3.575498712467901, 'Orlando (1993)'),
 (3.575391544841377, 'Grifters, The (1990)'),
 (3.574511710809267, 'Jackie Brown (1997)'),
 (3.571810970228647, 'Don Juan DeMarco (1995)'),
 (3.5668038433465874, 'Cement Garden, The (1993)'),
 (3.5660318081538, 'Seven Years in Tibet (1997)'),
 (3.565319127277478, 'Around the World in 80 Days (1956)'),
 (3.5652154968985283, 'Duoluo tianshi (1995)'),
 (3.561031415171911, 'Game, The (1997)'),
 (3.560772376780171, 'Secret Garden, The (1993)'),
 (3.559184180347554, 'Courage Under Fire (1996)'),
 (3.558780721308809, 'Fear of a Black Hat (1993)'),
 (3.557591629578552, 'Beautiful Girls (1996)'),
 (3.5559222793546286, 'Ransom (1996)'),
 (3.5547838713520323, 'Once Upon a Time in America (1984)'),
 (3.5543395750934095, 'Queen Margot (Reine Margot, La) (1994)'),
 (3.552923145253736, 'Wag the Dog (1997)'),
 (3.552734083728962, 'Devil in a Blue Dress (1995)'),
 (3.55015940160058, 'Shooter, The (1995)'),
 (3.549860006382095, 'Before Sunrise (1995)'),
 (3.548073269953997,
  'Englishman Who Went Up a Hill, But Came Down a Mountain, The (1995)'),
 (3.5470460355569626, 'Grateful Dead (1995)'),
 (3.54411758600219, 'Ghost and Mrs. Muir, The (1947)'),
 (3.5440907758227786, 'SubUrbia (1997)'),
 (3.5416845046809153, 'Old Man and the Sea, The (1958)'),
 (3.541442724859408, 'Seventh Seal, The (Sjunde inseglet, Det) (1957)'),
 (3.5391875731851012, 'Hotel de Love (1996)'),
 (3.5390542015619326, 'Slingshot, The (1993)'),
 (3.5388837028769227, 'Piano, The (1993)'),
 (3.536244184594212, 'Mark of Zorro, The (1940)'),
 (3.5354024447269667, 'Murder in the First (1995)'),
 (3.5347940738499397, 'When a Man Loves a Woman (1994)'),
 (3.532489736720064, 'Tom & Viv (1994)'),
 (3.532083649572937, 'My Favorite Year (1982)'),
 (3.531315549810419, 'Breakdown (1997)'),
 (3.528308166913269, 'Heat (1995)'),
 (3.5255534726397655, 'Immortal Beloved (1994)'),
 (3.525411872330838, 'Sex, Lies, and Videotape (1989)'),
 (3.521889160550587, 'King of the Hill (1993)'),
 (3.5200008901353486, 'Fly Away Home (1996)'),
 (3.5194101810182095, 'Father of the Bride (1950)'),
 (3.519065160446828, 'Dumbo (1941)'),
 (3.5085583847555655, 'Red Firecracker, Green Firecracker (1994)'),
 (3.4998817369525694, 'Picnic (1955)'),
 (3.498038958491478, 'Boogie Nights (1997)'),
 (3.4960047948591235, 'Murder, My Sweet (1944)'),
 (3.4941890280306978, 'Kundun (1997)'),
 (3.49402365514477, 'Clear and Present Danger (1994)'),
 (3.493487726277537, 'Get on the Bus (1996)'),
 (3.4908419442872125, 'Walking and Talking (1996)'),
 (3.4864001380388254, 'Grass Harp, The (1995)'),
 (3.485343865637531, 'Sleepers (1996)'),
 (3.4848872251107927, 'Blue Sky (1994)'),
 (3.483912449596152, 'True Lies (1994)'),
 (3.4821827462056993, 'Sabrina (1995)'),
 (3.4817646423166955, 'Benny & Joon (1993)'),
 (3.4810993284112337, 'Man Without a Face, The (1993)'),
 (3.4805480482549176, 'Daytrippers, The (1996)'),
 (3.4796323944798857, 'Kiss the Girls (1997)'),
 (3.4793265338139916, 'Night Falls on Manhattan (1997)'),
 (3.4788185343145197, 'That Thing You Do! (1996)'),
 (3.4778797351383535, 'Killer (Bulletproof Heart) (1994)'),
 (3.4770255063559636, 'Better Off Dead... (1985)'),
 (3.475498259393857, 'Highlander (1986)'),
 (3.4751588656571615, 'Cinderella (1950)'),
 (3.4739636597724117, 'Indian Summer (1996)'),
 (3.4738465994180916, 'Three Wishes (1995)'),
 (3.4724274320044652, 'Promesse, La (1996)'),
 (3.4720457268737235, 'Love! Valour! Compassion! (1997)'),
 (3.466050292316325, 'Stranger, The (1994)'),
 (3.465173183337319, 'Family Thing, A (1996)'),
 (3.462672774191813, 'Apostle, The (1997)'),
 (3.460817918063219, 'Backbeat (1993)'),
 (3.4604757521969987, 'Carried Away (1996)'),
 (3.460302368051965, 'Go Fish (1994)'),
 (3.45995106972404, 'Death and the Maiden (1994)'),
 (3.459595143956076, 'Jungle Book, The (1994)'),
 (3.4590403404332593, 'Replacement Killers, The (1998)'),
 (3.456307101959192, 'Cop Land (1997)'),
 (3.456297940468951, 'War, The (1994)'),
 (3.4546726714618075, 'Michael Collins (1996)'),
 (3.454575750755745, 'Meet Me in St. Louis (1944)'),
 (3.451471000007258, 'Winter Guest, The (1997)'),
 (3.449865385531032, 'Ballad of Narayama, The (Narayama Bushiko) (1958)'),
 (3.4477320066201185, 'Gigi (1958)'),
 (3.444746779482443, 'Last Dance (1996)'),
 (3.441946898326152, 'War Room, The (1993)'),
 (3.439325969257561, 'Batman (1989)'),
 (3.4372054738833477, 'Body Snatcher, The (1945)'),
 (3.4321635711124334, 'Cape Fear (1962)'),
 (3.4301009254701147, 'Basquiat (1996)'),
 (3.426086082193558, 'Telling Lies in America (1997)'),
 (3.4243768619438706, 'Scream (1996)'),
 (3.4242028969183957, 'Stealing Beauty (1996)'),
 (3.422931320976027, 'Infinity (1996)'),
 (3.418001967749302, 'Blue in the Face (1995)'),
 (3.417764775400634, 'Lamerica (1994)'),
 (3.417640095982122, 'Nell (1994)'),
 (3.4163113671649623, 'Tomorrow Never Dies (1997)'),
 (3.415480087335354, 'Clueless (1995)'),
 (3.4136737391478365, 'Mallrats (1995)'),
 (3.4130046824751745, 'Wedding Singer, The (1998)'),
 (3.4095558210037713, 'Germinal (1993)'),
 (3.4091612998929857, 'Hercules (1997)'),
 (3.408321647350748, 'N\xe9nette et Boni (1996)'),
 (3.405349493243322, 'Dazed and Confused (1993)'),
 (3.4050543799718263, 'Edge, The (1997)'),
 (3.404776793632434, 'G.I. Jane (1997)'),
 (3.4044281938607175, 'Late Bloomers (1996)'),
 (3.4030879798458122, 'Guantanamera (1994)'),
 (3.402284807000264, 'Man in the Iron Mask, The (1998)'),
 (3.4022143570904, 'Unstrung Heroes (1995)'),
 (3.4019029561912504, 'Carrie (1976)'),
 (3.399716671190951, "Star Maker, The (Uomo delle stelle, L') (1995)"),
 (3.397797112584972, 'Ayn Rand: A Sense of Life (1997)'),
 (3.397290100312965, "Enfer, L' (1994)"),
 (3.3971756502917683, 'To Die For (1995)'),
 (3.396612240633634, 'Carrington (1995)'),
 (3.3962983986187374, 'Nothing to Lose (1994)'),
 (3.3934672282619514, 'Freeway (1996)'),
 (3.3929438559857945, 'U Turn (1997)'),
 (3.3918981202040652, 'Jane Eyre (1996)'),
 (3.391607855556033, 'Restoration (1995)'),
 (3.3909563275199406, 'Boys (1996)'),
 (3.3890827307980764, '8 Seconds (1994)'),
 (3.389073179889685, 'Geronimo: An American Legend (1993)'),
 (3.388600077499484, 'Traveller (1997)'),
 (3.388486681070055, 'Wonderland (1997)'),
 (3.3869946689488426, 'French Kiss (1995)'),
 (3.383417634142438, 'Somewhere in Time (1980)'),
 (3.3813255120970265, 'Killing Zoe (1994)'),
 (3.3805304586783045, 'Alphaville (1965)'),
 (3.379055280043744, 'Con Air (1997)'),
 (3.376412422522032, "Young Poisoner's Handbook, The (1995)"),
 (3.3758361190352555, 'In Love and War (1996)'),
 (3.37563447710218, 'Up in Smoke (1978)'),
 (3.37457493208583, 'Night of the Living Dead (1968)'),
 (3.3738811645408746, 'Anastasia (1997)'),
 (3.37273222770709, 'Conspiracy Theory (1997)'),
 (3.3706076556866362, 'Picture Bride (1995)'),
 (3.3691230655155233, 'Tango Lesson, The (1997)'),
 (3.3642079213356926, 'Bread and Chocolate (Pane e cioccolata) (1973)'),
 (3.36331930992065, 'Age of Innocence, The (1993)'),
 (3.362546858833091, 'Love & Human Remains (1993)'),
 (3.3624594485644517, 'Swiss Family Robinson (1960)'),
 (3.3600646778761485, 'Crucible, The (1996)'),
 (3.3567251738549717, 'Kama Sutra: A Tale of Love (1996)'),
 (3.35643351777879, 'Tie Me Up! Tie Me Down! (1990)'),
 (3.3552741148561163, 'Little Buddha (1993)'),
 (3.35423373906253, 'Friday (1995)'),
 (3.354034099427532, 'Angel Baby (1995)'),
 (3.35241503727049, 'Bhaji on the Beach (1993)'),
 (3.3520469967275566, 'Davy Crockett, King of the Wild Frontier (1955)'),
 (3.3506974464696215, 'Pump Up the Volume (1990)'),
 (3.349054648809099, 'Ladybird Ladybird (1994)'),
 (3.346592124514548, 'Naked (1993)'),
 (3.3465881373618043, 'Washington Square (1997)'),
 (3.345500842284809, 'Twisted (1996)'),
 (3.343991131852188, "Jackie Chan's First Strike (1996)"),
 (3.3438400381149327, 'Basketball Diaries, The (1995)'),
 (3.343288190591185, 'Star Trek: Generations (1994)'),
 (3.3432412444389144, 'Old Yeller (1957)'),
 (3.342874296325189, 'Kids (1995)'),
 (3.337766813265277, 'Ghost (1990)'),
 (3.3368110774822446, 'Anna Karenina (1997)'),
 (3.33638696451049, 'Angel and the Badman (1947)'),
 (3.335674420744502, 'Underneath, The (1995)'),
 (3.334839100701113, 'Happy Gilmore (1996)'),
 (3.332948523643129, 'Great Expectations (1998)'),
 (3.331935715499211, 'Band Wagon, The (1953)'),
 (3.330258570389927, 'Postman, The (1997)'),
 (3.3290797339360303, 'Matilda (1996)'),
 (3.3282262006261454, '2 Days in the Valley (1996)'),
 (3.327597909447032, 'City of Angels (1998)'),
 (3.3246063618135553, 'How to Make an American Quilt (1995)'),
 (3.3235825021630125, 'Price Above Rubies, A (1998)'),
 (3.3198573084499485, 'Red Corner (1997)'),
 (3.31893930437381, 'Senseless (1998)'),
 (3.3174932088835143, 'Executive Decision (1996)'),
 (3.316554424033989, 'Joy Luck Club, The (1993)'),
 (3.3164496136030652, 'Gold Diggers: The Secret of Bear Mountain (1995)'),
 (3.3147201311071446, 'Mother Night (1996)'),
 (3.313234003293184, "Devil's Advocate, The (1997)"),
 (3.312646290858041, 'Ghosts of Mississippi (1996)'),
 (3.312589331297247, 'Mrs. Doubtfire (1993)'),
 (3.3125150586602636, 'Dream With the Fishes (1997)'),
 (3.3123340233761747,
  'Flower of My Secret, The (Flor de mi secreto, La) (1995)'),
 (3.3119742538873447, 'Rudy (1993)'),
 (3.3092171438168494, 'In & Out (1997)'),
 (3.3082271237996355, 'Soul Food (1997)'),
 (3.3060367856275175, 'Omen, The (1976)'),
 (3.3050125178562686, 'Losing Chase (1996)'),
 (3.3028304167729243, 'Big Blue, The (Grand bleu, Le) (1988)'),
 (3.302476428564893, 'Inkwell, The (1994)'),
 (3.2982818485935934, 'Man of the Year (1995)'),
 (3.2980426946304027, 'Trees Lounge (1996)'),
 (3.295886052471513, 'Cronos (1992)'),
 (3.295082198928891, 'Of Human Bondage (1934)'),
 (3.294735775005717, 'Life Less Ordinary, A (1997)'),
 (3.294644080416532, "It's My Party (1995)"),
 (3.292673747588208, 'Client, The (1994)'),
 (3.2909361111683433, 'Passion Fish (1992)'),
 (3.2810799474842476, 'Die Hard: With a Vengeance (1995)'),
 (3.280670057945884, 'Associate, The (1996)'),
 (3.277988773939414, 'Three Musketeers, The (1993)'),
 (3.2769700441910046, 'Sword in the Stone, The (1963)'),
 (3.2768642816742695, 'Afterglow (1997)'),
 (3.276082885206123, 'Ma vie en rose (My Life in Pink) (1997)'),
 (3.2736613398610697, 'Madame Butterfly (1995)'),
 (3.273500174412611, 'Lost in Space (1998)'),
 (3.2715018510415512, 'Midnight in the Garden of Good and Evil (1997)'),
 (3.2713104431143503, "Roseanna's Grave (For Roseanna) (1997)"),
 (3.268380605817913, 'Bitter Moon (1992)'),
 (3.2659090950054024, 'Lost Highway (1997)'),
 (3.2652903843443273, 'Grace of My Heart (1996)'),
 (3.2623490221623332, 'Now and Then (1995)'),
 (3.2537335638026903, 'Absolute Power (1997)'),
 (3.252086263998611, 'Deconstructing Harry (1997)'),
 (3.2505051610374913, 'Escape from New York (1981)'),
 (3.24637421084141, 'Scream 2 (1997)'),
 (3.245568382802205, 'Once Upon a Time... When We Were Colored (1995)'),
 (3.244780647721142, 'Tom and Huck (1995)'),
 (3.244245082895413, 'Inventing the Abbotts (1997)'),
 (3.2442009370941722, 'Assignment, The (1997)'),
 (3.242223201969958, 'Hunchback of Notre Dame, The (1996)'),
 (3.2419223754538624, 'Kalifornia (1993)'),
 (3.2418664965185244, 'Cook the Thief His Wife & Her Lover, The (1989)'),
 (3.241054524719338, 'Mission: Impossible (1996)'),
 (3.2403313354487, 'Switchblade Sisters (1975)'),
 (3.239573479523229, 'Barcelona (1994)'),
 (3.2337486357174954, 'Great Race, The (1965)'),
 (3.232734651436551, 'Everyone Says I Love You (1996)'),
 (3.2322577191507316, 'Caught (1996)'),
 (3.2319418473774766, 'Amateur (1994)'),
 (3.23159836756626, 'Penny Serenade (1941)'),
 (3.2292366172992497, 'Ponette (1996)'),
 (3.2286995481478153, 'Clean Slate (Coup de Torchon) (1981)'),
 (3.228067107068621, 'Kiss Me, Guido (1997)'),
 (3.2249964830559033, 'Peacemaker, The (1997)'),
 (3.2224675012476323, 'Firestorm (1998)'),
 (3.2218433793641674, 'Selena (1997)'),
 (3.221102020327147, 'Unzipped (1995)'),
 (3.21920997157359, 'White Squall (1996)'),
 (3.2189770120592702, 'Victor/Victoria (1982)'),
 (3.2167355142309426, 'Trigger Effect, The (1996)'),
 (3.215878242037602, 'Crossing Guard, The (1995)'),
 (3.2127256310407954, 'That Old Feeling (1997)'),
 (3.211588176142117, 'Simple Twist of Fate, A (1994)'),
 (3.211140975600135, "Things to Do in Denver when You're Dead (1995)"),
 (3.210268286884371, 'Fierce Creatures (1997)'),
 (3.2082254407092305, 'Pretty Woman (1990)'),
 (3.207396575311018, 'Fearless (1993)'),
 (3.2066705890272686, 'Jumanji (1995)'),
 (3.203275032437248, 'Walk in the Clouds, A (1995)'),
 (3.199442286418229, 'Career Girls (1997)'),
 (3.197521320636608, 'Ruby in Paradise (1993)'),
 (3.192817761868588, 'Man of No Importance, A (1994)'),
 (3.188396314066793, 'James and the Giant Peach (1996)'),
 (3.18694381403838, 'Tetsuo II: Body Hammer (1992)'),
 (3.18670475853433, 'Dark City (1998)'),
 (3.186103130587654, 'Higher Learning (1995)'),
 (3.1848581017704025, 'Nina Takes a Lover (1994)'),
 (3.1822773597492495, 'Three Caballeros, The (1945)'),
 (3.181518578886735, 'Little Lord Fauntleroy (1936)'),
 (3.180132151765051, 'Hugo Pool (1997)'),
 (3.1795070791275655, 'Secret Adventures of Tom Thumb, The (1993)'),
 (3.179307809901063, 'Steal Big, Steal Little (1995)'),
 (3.175490011034453, 'Liar Liar (1997)'),
 (3.172691254597915, 'Scarlet Letter, The (1995)'),
 (3.1717517037877117, 'Grease (1978)'),
 (3.168230374158889, "Ed's Next Move (1996)"),
 (3.165991515144775, 'FairyTale: A True Story (1997)'),
 (3.165545998970787, 'Tin Cup (1996)'),
 (3.1649440990429794, 'Bulletproof (1996)'),
 (3.16415147737744, 'Spanking the Monkey (1994)'),
 (3.1638910369782534, 'Secret Agent, The (1996)'),
 (3.1614262323242572, 'Contempt (M\xe9pris, Le) (1963)'),
 (3.1611101185181147, 'Quick and the Dead, The (1995)'),
 (3.16002786623232, 'Nick of Time (1995)'),
 (3.1581943164854147,
  'Last Klezmer: Leopold Kozlowski, His Life and Music, The (1995)'),
 (3.1563367739425603, 'Up Close and Personal (1996)'),
 (3.1506404352779507, 'Wyatt Earp (1994)'),
 (3.1493480907592732, 'One Fine Day (1996)'),
 (3.148546482243516, 'Fallen (1998)'),
 (3.1449998189852537, 'Blink (1994)'),
 (3.14472777817097,
  'Until the End of the World (Bis ans Ende der Welt) (1991)'),
 (3.1439194431041115, 'Mother (1996)'),
 (3.1385695442374826, 'Extreme Measures (1996)'),
 (3.138453939393395, 'MatchMaker, The (1997)'),
 (3.13397221682249, 'Unforgettable (1996)'),
 (3.1332936426788076, 'When Night Is Falling (1995)'),
 (3.132155325688454, 'Corrina, Corrina (1994)'),
 (3.130356656591383, 'Carpool (1996)'),
 (3.1286118421500886, 'Boys Life (1995)'),
 (3.127767050502004, 'Dangerous Minds (1995)'),
 (3.1250002426652235, 'River Wild, The (1994)'),
 (3.121170337445076, "She's the One (1996)"),
 (3.120708812544694, 'Addicted to Love (1997)'),
 (3.1125292224959797, 'M. Butterfly (1993)'),
 (3.112228750107674, 'Only You (1994)'),
 (3.1106563174685213, '8 Heads in a Duffel Bag (1997)'),
 (3.1105670813249153, 'Farinelli: il castrato (1994)'),
 (3.11041527954392, 'Michael (1996)'),
 (3.10828858152867, 'Robin Hood: Prince of Thieves (1991)'),
 (3.106841382706282, 'Roommates (1995)'),
 (3.106582643091786, 'Black Beauty (1994)'),
 (3.105997689797314, 'Harlem (1993)'),
 (3.101571289896098, 'Nixon (1995)'),
 (3.0965111067776347, 'Critical Care (1997)'),
 (3.0962438915218264, 'My Fellow Americans (1996)'),
 (3.0955900662550544, 'Boys on the Side (1995)'),
 (3.094156832706549, 'Wild Reeds (1994)'),
 (3.0937128345733553, 'Surviving Picasso (1996)'),
 (3.0925259548765256, 'Love and a .45 (1994)'),
 (3.0918395091702497, 'Interview with the Vampire (1994)'),
 (3.0882092183035863, 'Bed of Roses (1996)'),
 (3.0811773599576044, 'Denise Calls Up (1995)'),
 (3.0806498094587766, 'Malice (1993)'),
 (3.077472236322564, 'Bye Bye, Love (1995)'),
 (3.0773238451564633, 'Home for the Holidays (1995)'),
 (3.06752910966732, 'Paper, The (1994)'),
 (3.067155302783019, 'For Ever Mozart (1996)'),
 (3.0633915918218406, 'I Know What You Did Last Summer (1997)'),
 (3.063051346923495, 'My Crazy Life (Mi vida loca) (1993)'),
 (3.062216727308468, 'Chamber, The (1996)'),
 (3.058894669725715, 'Gang Related (1997)'),
 (3.0581587184378396, 'Sixth Man, The (1997)'),
 (3.0580745961465428, 'Across the Sea of Time (1995)'),
 (3.0577564788990745, 'Tin Men (1987)'),
 (3.0570844408597315, "Romy and Michele's High School Reunion (1997)"),
 (3.0553432961741365, 'Speechless (1994)'),
 (3.051460356429903, 'House of the Spirits, The (1993)'),
 (3.05118427948552, 'Georgia (1995)'),
 (3.051071214458306, 'Bridges of Madison County, The (1995)'),
 (3.0497338269651455, 'Kingpin (1996)'),
 (3.049404385739819, 'Paradise Road (1997)'),
 (3.048665573845621, 'Demolition Man (1993)'),
 (3.0485250147121072, 'Alien: Resurrection (1997)'),
 (3.0476284661291673, 'Cliffhanger (1993)'),
 (3.046508078809035, 'Bogus (1996)'),
 (3.046117845731884, 'Kicking and Screaming (1995)'),
 (3.04605389369778, 'Jackal, The (1997)'),
 (3.045434618967184, 'Forget Paris (1995)'),
 (3.045179367257389, 'Curdled (1996)'),
 (3.044696934085456, 'Legal Deceit (1997)'),
 (3.041647848805979, "Gridlock'd (1997)"),
 (3.040820101837667, 'Endless Summer 2, The (1994)'),
 (3.0385638113632334, 'City Hall (1996)'),
 (3.0375375874123205, 'Pompatus of Love, The (1996)'),
 (3.037512496097393, 'Evening Star, The (1996)'),
 (3.0373683655009844, "Wooden Man's Bride, The (Wu Kui) (1994)"),
 (3.0370239005296216, 'Feast of July (1995)'),
 (3.0369298578005277, 'Palmetto (1998)'),
 (3.030174078230926, "I Can't Sleep (J'ai pas sommeil) (1994)"),
 (3.027697861656879, 'Above the Rim (1994)'),
 (3.0275505923566426, 'Sirens (1994)'),
 (3.027142308218427, 'Powder (1995)'),
 (3.025591679873132, 'Live Nude Girls (1995)'),
 (3.022608422584282, 'Star Trek: The Motion Picture (1979)'),
 (3.0207348652678543, 'Body Snatchers (1993)'),
 (3.020134685190319, 'Before and After (1996)'),
 (3.02012723522079, 'Welcome To Sarajevo (1997)'),
 (3.019730608602559, 'Star Maps (1997)'),
 (3.016975918240503, 'Purple Noon (1960)'),
 (3.013856374953527, 'Saint, The (1997)'),
 (3.0131735277651788, 'Romeo Is Bleeding (1993)'),
 (3.012917892702783, "Jason's Lyric (1994)"),
 (3.012726334061273, 'Fear (1996)'),
 (3.0111859658723277, 'Eraser (1996)'),
 (3.01098560409229, 'Foxfire (1996)'),
 (3.0102309047693594, 'Clockers (1995)'),
 (3.0088912052690104, 'Fausto (1993)'),
 (3.0082870397626458, 'Fox and the Hound, The (1981)'),
 (3.007973393226643, 'Cool Runnings (1993)'),
 (3.007631392339762, 'Kissed (1996)'),
 (3.006963494450796, 'Fast, Cheap & Out of Control (1997)'),
 (3.004725822389383, 'Two Deaths (1995)'),
 (3.0046636174005257, 'Prophecy, The (1995)'),
 (3.0042846203471494, 'Jack (1996)'),
 (3.0024869114773436, 'Mondo (1996)'),
 (3.000043423640907, 'Mute Witness (1994)'),
 (3.0, '\xc1 k\xf6ldum klaka (Cold Fever) (1994)'),
 (3.0, 'You So Crazy (1994)'),
 (3.0, 'Wedding Bell Blues (1996)'),
 (3.0, 'Two Friends (1986) '),
 (3.0, 'To Have, or Not (1995)'),
 (3.0, 'Three Lives and Only One Death (1996)'),
 (3.0, 'Target (1995)'),
 (3.0, 'Tainted (1998)'),
 (3.0, 'Sweet Nothing (1995)'),
 (3.0, 'Sunchaser, The (1996)'),
 (3.0, 'Silence of the Palace, The (Saimt el Qusur) (1994)'),
 (3.0, 'Scream of Stone (Schrei aus Stein) (1991)'),
 (3.0, 'Salut cousin! (1996)'),
 (3.0, 'Reluctant Debutante, The (1958)'),
 (3.0, 'Paris Was a Woman (1995)'),
 (3.0, 'Other Voices, Other Rooms (1997)'),
 (3.0, 'Nosferatu a Venezia (1986)'),
 (3.0, 'Normal Life (1996)'),
 (3.0, 'Next Step, The (1995)'),
 (3.0, 'Mr. Wonderful (1993)'),
 (3.0, 'Mad Dog Time (1996)'),
 (3.0, 'Land and Freedom (Tierra y libertad) (1995)'),
 (3.0, 'Intimate Relations (1996)'),
 (3.0, 'I Like It Like That (1994)'),
 (3.0, 'Hana-bi (1997)'),
 (3.0, 'Glass Shield, The (1994)'),
 (3.0, 'Girls Town (1996)'),
 (3.0, 'Fire on the Mountain (1996)'),
 (3.0, 'Eighth Day, The (1996)'),
 (3.0, 'Destiny Turns on the Radio (1995)'),
 (3.0, 'Dadetown (1995)'),
 (3.0, 'Cyclo (1995)'),
 (3.0, 'Condition Red (1995)'),
 (3.0, 'Collectionneuse, La (1967)'),
 (3.0, 'Big One, The (1997)'),
 (3.0, 'B. Monkey (1998)'),
 (3.0, 'Angela (1995)'),
 (2.9999999999999996, 'Wife, The (1995)'),
 (2.9999999999999996, 'Sleepover (1995)'),
 (2.9999999999999996, 'Love Is All There Is (1996)'),
 (2.9999999999999996, 'Century (1993)'),
 (2.9999999999999996, 'All Things Fair (1996)'),
 (2.9999999999999996, 'All Over Me (1997)'),
 (2.997899028244737, 'Nine Months (1995)'),
 (2.996440432584481, 'Conan the Barbarian (1981)'),
 (2.996301455968926, "Dante's Peak (1997)"),
 (2.995552800245675, 'Dragonheart (1996)'),
 (2.9943846353119583, 'Midnight Dancers (Sibak) (1994)'),
 (2.9872322218446525, 'Species (1995)'),
 (2.9863229983658752, '187 (1997)'),
 (2.983012784615341, 'Mad City (1997)'),
 (2.980548603749526, 'Craft, The (1996)'),
 (2.9789506105237495, 'Howling, The (1981)'),
 (2.9768987957925908, 'Shadow Conspiracy (1997)'),
 (2.974971423798669, 'Forbidden Christ, The (Cristo proibito, Il) (1950)'),
 (2.9716327922559462, 'Just Cause (1995)'),
 (2.969328129921818, 'U.S. Marshalls (1998)'),
 (2.968721254970309, 'Rough Magic (1995)'),
 (2.9686798366210994, 'Parent Trap, The (1961)'),
 (2.9684095826713373, 'Broken Arrow (1996)'),
 (2.968299639997834, 'Shaggy Dog, The (1959)'),
 (2.968219732820868, 'Beyond Rangoon (1995)'),
 (2.9625181603114283, 'House of Yes, The (1997)'),
 (2.9602473019440207, 'Hurricane Streets (1998)'),
 (2.959638712316664, 'Children of the Revolution (1996)'),
 (2.9572914288446515, 'Sphere (1998)'),
 (2.9553946977376713, 'Evita (1996)'),
 (2.9552281376464244, 'Murder at 1600 (1997)'),
 (2.954788575475224, 'First Wives Club, The (1996)'),
 (2.95438467293511, 'Love and Other Catastrophes (1996)'),
 (2.9510209005750747, 'Timecop (1994)'),
 (2.950368780088764, 'Man Who Knew Too Little, The (1997)'),
 (2.9500811227091472, 'Palookaville (1996)'),
 (2.9465258722986545, 'Goofy Movie, A (1995)'),
 (2.946525029659183, 'Nightwatch (1997)'),
 (2.9464840705363313, 'Tommy Boy (1995)'),
 (2.942842515230017, 'Adventures of Pinocchio, The (1996)'),
 (2.9400357112642195, 'Shadow, The (1994)'),
 (2.9382748920294373, 'Dumb & Dumber (1994)'),
 (2.936437955841964, "Wes Craven's New Nightmare (1994)"),
 (2.9349851360616737, 'Reckless (1995)'),
 (2.934919523043932, 'Total Eclipse (1995)'),
 (2.9343886056260655, 'Picture Perfect (1997)'),
 (2.9341982153920405, 'Pollyanna (1960)'),
 (2.93333421124639, 'To Gillian on Her 37th Birthday (1996)'),
 (2.933123920855552, 'Love Jones (1997)'),
 (2.933014504762179, 'Best Men (1997)'),
 (2.9297570714511574, 'Princess Caraboo (1994)'),
 (2.928808993444951, 'Switchback (1997)'),
 (2.9248041434562198, 'American Buffalo (1996)'),
 (2.9233332214361742, 'Transformers: The Movie, The (1986)'),
 (2.9232265317353767, 'Prisoner of the Mountains (Kavkazsky Plennik) (1996)'),
 (2.9222462047267252, "National Lampoon's Senior Trip (1995)"),
 (2.9210121367440256, 'Serial Mom (1994)'),
 (2.9201777198073833, 'Clean Slate (1994)'),
 (2.91781280898437, 'Arrival, The (1996)'),
 (2.9141838382062435, "I'm Not Rappaport (1996)"),
 (2.9126671964274573, 'Search for One-eye Jimmy, The (1996)'),
 (2.9121469227843506, 'Cemetery Man (Dellamorte Dellamore) (1994)'),
 (2.9119961121927553, 'Faces (1968)'),
 (2.908531390459222, 'Manny & Lo (1996)'),
 (2.907683728793105, 'Line King: Al Hirschfeld, The (1996)'),
 (2.9065190182841705, 'Nutty Professor, The (1996)'),
 (2.9062632014361474, '1-900 (1994)'),
 (2.9046181800592454, 'Tank Girl (1995)'),
 (2.9008736741348864, 'Renaissance Man (1994)'),
 (2.8987443437538563, "Daniel Defoe's Robinson Crusoe (1996)"),
 (2.898444968425485, 'Grumpier Old Men (1995)'),
 (2.8976123226014536, 'Mulholland Falls (1996)'),
 (2.884376944760871, 'Kiss of Death (1995)'),
 (2.88422046101026, 'Fools Rush In (1997)'),
 (2.8830881716440766, 'Fan, The (1996)'),
 (2.88271473122383, 'Albino Alligator (1996)'),
 (2.88265100443641, "Mary Shelley's Frankenstein (1994)"),
 (2.8812555277901892, 'Gumby: The Movie (1995)'),
 (2.8796649416860625, 'Judgment Night (1993)'),
 (2.8769051115881514, 'Blues Brothers 2000 (1998)'),
 (2.876676597284978, 'Swept from the Sea (1997)'),
 (2.8758216617342036, 'Cat People (1982)'),
 (2.8740556663234975, 'With Honors (1994)'),
 (2.873343031892373, 'Truman Show, The (1998)'),
 (2.8726749069962376, "I'll Do Anything (1994)"),
 (2.8722432110304266, 'Kicked in the Head (1997)'),
 (2.869221261014388, 'Junior (1994)'),
 (2.868788489442898, 'Oscar & Lucinda (1997)'),
 (2.8682616414271656, 'Substance of Fire, The (1996)'),
 (2.8648131358731828, 'Party Girl (1995)'),
 (2.8620893410634927, 'Touch (1997)'),
 (2.855248061747479, 'Lightning Jack (1994)'),
 (2.8532972538778005, 'Casper (1995)'),
 (2.8523418164686976, 'Brady Bunch Movie, The (1995)'),
 (2.849083798485702, 'Andre (1994)'),
 (2.8458606670122473, 'Warriors of Virtue (1997)'),
 (2.8445275705468127, 'Blood & Wine (1997)'),
 (2.8407052926310117, 'Smile Like Yours, A (1997)'),
 (2.8402067616299247, 'Wild America (1997)'),
 (2.8396393113278626, 'Metro (1997)'),
 (2.839337618570004, 'Little Rascals, The (1994)'),
 (2.8351494738444925, 'Good Man in Africa, A (1994)'),
 (2.8350883625733863, 'Full Speed (1996)'),
 (2.834871640547853, 'Ciao, Professore! (1993)'),
 (2.8346433466928493, 'Tales From the Crypt Presents: Demon Knight (1995)'),
 (2.833634514966825, 'Cobb (1994)'),
 (2.8265110450277096, 'Girl 6 (1996)'),
 (2.8257393433220335, 'North (1994)'),
 (2.8254060799284915, 'Alien 3 (1992)'),
 (2.824530124319248, 'Mrs. Winterbourne (1996)'),
 (2.8218770381703755,
  'Rendezvous in Paris (Rendez-vous de Paris, Les) (1995)'),
 (2.8201251912812046, 'Scout, The (1994)'),
 (2.818521531872876, 'Radioland Murders (1994)'),
 (2.8171692948337568, 'Program, The (1993)'),
 (2.8158317559218777, 'Bent (1997)'),
 (2.81543631250446, 'Waterworld (1995)'),
 (2.813652855559035, 'Perez Family, The (1995)'),
 (2.8127872349868692, 'Escape to Witch Mountain (1975)'),
 (2.809625497172924, 'Head Above Water (1996)'),
 (2.8084351338189717, 'Reality Bites (1994)'),
 (2.806805662682671, 'Father of the Bride Part II (1995)'),
 (2.8041811487615997, 'Wild Things (1998)'),
 (2.8016725248931142, "Preacher's Wife, The (1996)"),
 (2.801284733097008, 'Hoodlum (1997)'),
 (2.797617558832981, 'Moonlight and Valentino (1995)'),
 (2.795289089580093, 'Browning Version, The (1994)'),
 (2.7925496933483065, 'Blob, The (1958)'),
 (2.786824657813896, 'Romper Stomper (1992)'),
 (2.7860554105339927, 'Mortal Kombat (1995)'),
 (2.785793294028292, 'For the Moment (1994)'),
 (2.784342629955011, 'Blown Away (1994)'),
 (2.7833661934322653, 'Caro Diario (Dear Diary) (1994)'),
 (2.783013728535651, 'Rent-a-Kid (1995)'),
 (2.78283402578697,
  "Don't Be a Menace to South Central While Drinking Your Juice in the Hood (1996)"),
 (2.7821167366311808, 'First Knight (1995)'),
 (2.7768334694461423, 'Doors, The (1991)'),
 (2.773770098878278, 'Portrait of a Lady, The (1996)'),
 (2.7711003924943576, 'Maximum Risk (1996)'),
 (2.7694779037703037, 'Angus (1995)'),
 (2.7685413954138123, 'Great White Hype, The (1996)'),
 (2.7636236059739634, 'Assassins (1995)'),
 (2.7635456521647774, 'Boomerang (1992)'),
 (2.761690096427949, 'Addams Family Values (1993)'),
 (2.761170775633411, 'Jimmy Hollywood (1994)'),
 (2.7606730972713995, 'Waiting to Exhale (1995)'),
 (2.7604267018184627, 'Multiplicity (1996)'),
 (2.7566779963139587, 'Naked Gun 33 1/3: The Final Insult (1994)'),
 (2.7559907256122402, 'What Happened Was... (1994)'),
 (2.754300570633321, 'Hard Rain (1998)'),
 (2.753841533795216, 'Relic, The (1997)'),
 (2.753296133169485, 'Poetic Justice (1993)'),
 (2.75202979192129, 'Fire Down Below (1997)'),
 (2.751979126228482, 'Drunks (1995)'),
 (2.751356793700804, 'Volcano (1997)'),
 (2.751322032115857, 'Deceiver (1997)'),
 (2.7507311434347175, 'Of Love and Shadows (1994)'),
 (2.7472990384988902, 'Eye for an Eye (1996)'),
 (2.7422782876746443, 'If Lucy Fell (1996)'),
 (2.741994827158719, 'Flesh and Bone (1993)'),
 (2.7419162582670142, 'Losing Isaiah (1995)'),
 (2.738818631019457, "Kid in King Arthur's Court, A (1995)"),
 (2.7328211689964896, 'Air Up There, The (1994)'),
 (2.7307150491747367, "Pyromaniac's Love Story, A (1995)"),
 (2.7302594402134135, 'Year of the Horse (1997)'),
 (2.7268350928913696, 'Judge Dredd (1995)'),
 (2.7234171479012925, 'In the Mouth of Madness (1995)'),
 (2.722021709822114, 'Exit to Eden (1994)'),
 (2.7208222285727452, 'Savage Nights (Nuits fauves, Les) (1992)'),
 (2.7206486294346535, 'Days of Thunder (1990)'),
 (2.718152869070707, 'Virtuosity (1995)'),
 (2.7172087478942024, 'Panther (1995)'),
 (2.715775190365841, 'Apple Dumpling Gang, The (1975)'),
 (2.7130664204748762, 'Mary Reilly (1996)'),
 (2.7126201462900905, 'Convent, The (Convento, O) (1995)'),
 (2.7085144538193786, 'Space Jam (1996)'),
 (2.7077220784497027, 'How to Be a Player (1997)'),
 (2.7077095573641787, 'Aladdin and the King of Thieves (1996)'),
 (2.704658169876142, 'Amos & Andrew (1993)'),
 (2.7042014755407453, 'Little Odessa (1994)'),
 (2.704120875234913, 'Shiloh (1997)'),
 (2.703363497192835, 'Bastard Out of Carolina (1996)'),
 (2.7023043965767006, 'Bean (1997)'),
 (2.6970461355355555, 'Oliver & Company (1988)'),
 (2.6952341176376855, 'Angels in the Outfield (1994)'),
 (2.6935559816928007, 'Indian in the Cupboard, The (1995)'),
 (2.689804272503769, 'Something to Talk About (1995)'),
 (2.687458046172078, 'Balto (1995)'),
 (2.687114302572168, 'Money Talks (1997)'),
 (2.6857575500249657, 'Prophecy II, The (1998)'),
 (2.6826836355420274, 'Rising Sun (1993)'),
 (2.6803517600212783, 'Walking Dead, The (1995)'),
 (2.6784384396076186, 'Johnny Mnemonic (1995)'),
 (2.676222402464585, 'Tough and Deadly (1995)'),
 (2.6751093231253926, 'Commandments (1997)'),
 (2.673362346777096, 'Lord of Illusions (1995)'),
 (2.671394349587349, 'Young Guns II (1990)'),
 (2.6689528088070875, 'Last Action Hero (1993)'),
 (2.664270313280024, 'Eddie (1996)'),
 (2.6634503754550565, 'Dead Presidents (1995)'),
 (2.662227828627834, 'Threesome (1994)'),
 (2.6618502130425292, 'Harriet the Spy (1996)'),
 (2.65824217363459, 'Hard Target (1993)'),
 (2.6577736198877218, 'Suture (1993)'),
 (2.6566748694153843, 'Fled (1996)'),
 (2.655484664476361,
  'Tales from the Crypt Presents: Bordello of Blood (1996)'),
 (2.653662387821917, 'Sudden Death (1995)'),
 (2.6494286572124324, "Pete's Dragon (1977)"),
 (2.648201984987497, 'Canadian Bacon (1994)'),
 (2.647452937045241, 'Wild Bill (1995)'),
 (2.646593118786973, 'Feeling Minnesota (1996)'),
 (2.645930844730843, 'Trial by Jury (1994)'),
 (2.643633690934804, "April Fool's Day (1986)"),
 (2.640460729967225, 'Love Serenade (1996)'),
 (2.639978944460105, 'Wolf (1994)'),
 (2.635743107298994, 'Last Time I Committed Suicide, The (1997)'),
 ...]

In [367]:
%time get_recommendations(db, "1", pearson_similarity)


CPU times: user 9.79 s, sys: 599 ms, total: 10.4 s
Wall time: 10.4 s
Out[367]:
[(5.0000000000000009, 'Postman, The (1997)'),
 (5.0, 'Women, The (1939)'),
 (5.0, 'Winter Guest, The (1997)'),
 (5.0, "She's the One (1996)"),
 (5.0, 'Shadow Conspiracy (1997)'),
 (5.0, 'Seventh Seal, The (Sjunde inseglet, Det) (1957)'),
 (5.0, 'Sense and Sensibility (1995)'),
 (5.0, "Schindler's List (1993)"),
 (5.0, 'Rear Window (1954)'),
 (5.0, 'Philadelphia (1993)'),
 (5.0, 'Matilda (1996)'),
 (5.0, 'Love Jones (1997)'),
 (5.0, 'Leaving Las Vegas (1995)'),
 (5.0, 'Kids (1995)'),
 (5.0, "It's a Wonderful Life (1946)"),
 (5.0, 'It Happened One Night (1934)'),
 (5.0, 'Great Dictator, The (1940)'),
 (5.0, 'Big Lebowski, The (1998)'),
 (5.0, 'American President, The (1995)'),
 (4.5522898401481484, 'Thousand Acres, A (1997)'),
 (4.3717778769846021, 'Desperate Measures (1998)'),
 (4.2753227231893352, 'Titanic (1997)'),
 (4.2733948756213609, 'Rainmaker, The (1997)'),
 (4.2148784307905158, 'Anna Karenina (1997)'),
 (4.0598326384530221, 'L.A. Confidential (1997)'),
 (4.0275325817142607, 'Mrs. Dalloway (1997)'),
 (4.0207157535182798, 'Kiss the Girls (1997)'),
 (4.0090443890632832, "Eve's Bayou (1997)"),
 (4.0, 'Wedding Singer, The (1998)'),
 (4.0, 'Time to Kill, A (1996)')]

In [368]:
%time get_recommendations(db, "1", euclidean_similarity)


CPU times: user 9.51 s, sys: 659 ms, total: 10.2 s
Wall time: 10.2 s
Out[368]:
[(5.0, 'True Lies (1994)'),
 (5.0, 'To Kill a Mockingbird (1962)'),
 (5.0, 'Tango Lesson, The (1997)'),
 (5.0, 'Spice World (1997)'),
 (5.0, 'Shadow Conspiracy (1997)'),
 (5.0, 'Sense and Sensibility (1995)'),
 (5.0, "Schindler's List (1993)"),
 (5.0, 'Roman Holiday (1953)'),
 (5.0, 'Postman, The (1997)'),
 (5.0, 'Piano, The (1993)'),
 (5.0, 'Lawrence of Arabia (1962)'),
 (5.0, 'It Happened One Night (1934)'),
 (5.0, 'Great Escape, The (1963)'),
 (5.0, 'Fried Green Tomatoes (1991)'),
 (5.0, 'Fire Down Below (1997)'),
 (5.0, 'Face/Off (1997)'),
 (5.0,
  'Dr. Strangelove or: How I Learned to Stop Worrying and Love the Bomb (1963)'),
 (5.0, 'Desperate Measures (1998)'),
 (5.0, 'Dark City (1998)'),
 (5.0, 'Casablanca (1942)'),
 (5.0, 'Career Girls (1997)'),
 (5.0, 'Bridges of Madison County, The (1995)'),
 (5.0, 'Big Lebowski, The (1998)'),
 (5.0, 'Bent (1997)'),
 (4.5278640450004204, 'Winter Guest, The (1997)'),
 (4.4285714285714288, 'Washington Square (1997)'),
 (4.4087536869004067, 'Wedding Singer, The (1998)'),
 (4.4012734754589342, 'Cool Hand Luke (1967)'),
 (4.2360679774997898, 'Midnight in the Garden of Good and Evil (1997)'),
 (4.2000000000000002, 'Money Talks (1997)')]

In [ ]: