draft
bool
1 class
date
stringlengths
19
20
title
stringlengths
9
214
tag
sequence
category
sequence
body
stringlengths
575
57.5k
description
stringlengths
40
192
image
stringlengths
28
59
embeddings_base_en
sequence
embeddings_small_en
sequence
embeddings_mini_lm
sequence
slug
stringlengths
8
191
url
stringlengths
49
232
false
2023-07-07 04:44:37
Python: Re-import module
[ "python", "til" ]
[ "TIL" ]
:icons: font I often write little Python scripts that import code from other local modules and a common problem I have when using the Python REPL is that I update the code in the other modules and then can't use the new functionality without restarting the REPL and re-importing everything. At least so I thought! It turns out there is a way to refresh those modules and that's what we'll be exploring in this blog post. Let's say that we have the file `person.py` that contains the code shown below: .person.py [source, python] ---- class Person: def __init__(self, name): self.name = name def say_hello(self): print(f"Hello {self.name}") ---- Launch the Python REPL by typing `python` and then import the class and run the `say_hello` function: [source, python] ---- from person import Person Person(name="Mark").say_hello() ---- .Output [source, text] ---- Hello Mark ---- Now let's say that we add a `say_goodbye` function to the class so that it now looks like this: .person.py [source, python] ---- class Person: def __init__(self, name): self.name = name def say_hello(self): print(f"Hello {self.name}") def say_goodbye(self): print(f"Good Bye {self.name}") ---- If we try to use that function, it's not available: [source, python] ---- from person import Person Person(name="Mark").say_goodbye() ---- .Output [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Person' object has no attribute 'say_goodbye' ---- Even running `from person import Person` again doesn't help. Help does come, however, from the https://docs.python.org/3/library/importlib.html[importlib^] library, which we can use to re-import the module. I initially tried doing this: [source, python] ---- import importlib importlib.reload(person) ---- And then I ran the `say_goodbye` function again, to no avail: .Output [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'person' is not defined. Did you mean: 'Person'? ---- To solve that problem, I had to first import `person` and then reload: [source, python] ---- import person importlib.reload(person) ---- I ran the goodbye command again, but still got the same error: [source, python] ---- Person(name="Mark").say_goodbye() ---- .Output [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'Person' object has no attribute 'say_goodbye' ---- It turns out that we need to re-run the import of the `Person` class again, after the reload of `person`, meaning that the full re-importing code looks like this: [source, python] ---- import person importlib.reload(person) from person import Person ---- And now let's call goodbye: [source, python] ---- Person(name="Mark").say_goodbye() ---- .Output [source, text] ---- Good Bye Mark ----
In this post, we're going to learn how to re-import a local Python module
uploads/2023/07/python-reimport-module.png
[ 0.020273741334676743, 0.010923432186245918, -0.017862100154161453, 0.005673430860042572, 0.068608857691288, 0.021901428699493408, 0.014340460300445557, 0.03255059942603111, -0.02520221471786499, -0.00885455310344696, -0.012903948314487934, 0.01804898865520954, -0.11324745416641235, 0.015161010436713696, -0.014021097682416439, 0.06059568002820015, 0.10478523373603821, 0.0015892735682427883, 0.0083944546058774, 0.025315657258033752, 0.005975812673568726, 0.09919477254152298, -0.04592474177479744, 0.04805883392691612, -0.010909905657172203, -0.004797785077244043, 0.00769165949895978, -0.01106276735663414, -0.0852847769856453, 0.002025436842814088, 0.0046594650484621525, -0.0033884113654494286, 0.02213011123239994, 0.00935227982699871, 0.017684318125247955, -0.007275512907654047, 0.005850189831107855, 0.011747296899557114, -0.0007828176603652537, 0.05089816078543663, -0.03223026171326637, 0.00883344653993845, -0.030943240970373154, -0.007686392404139042, -0.062312185764312744, 0.013566110283136368, -0.035331111401319504, 0.03713563084602356, 0.005287338979542255, -0.012204702012240887, -0.05589047446846962, 0.019757278263568878, -0.002520001260563731, -0.05261342599987984, -0.010072991251945496, 0.04344860091805458, 0.029852448031306267, -0.11439040303230286, 0.012005862779915333, -0.03264566510915756, -0.000996636226773262, 0.019918642938137054, 0.031117044389247894, 0.07309237867593765, 0.006857802625745535, -0.0007616009097546339, 0.015110566280782223, 0.027681294828653336, -0.06530512869358063, -0.02135375514626503, -0.011824789457023144, 0.0009136032313108444, -0.08212844282388687, -0.00425304239615798, 0.014124185778200626, -0.006664680782705545, -0.04835980385541916, 0.04460681974887848, -0.001451613730750978, 0.060091856867074966, 0.017533782869577408, -0.0003975968575105071, 0.02069229818880558, 0.01664934866130352, 0.02282693237066269, -0.03134537115693092, -0.04686423018574715, 0.004629276692867279, -0.03904672712087631, 0.028771527111530304, 0.008249271661043167, -0.06283918023109436, 0.0441049262881279, 0.011129320599138737, 0.041686106473207474, -0.022825444117188454, -0.029607174918055534, -0.022420767694711685, -0.011227831244468689, 0.0034979507327079773, -0.06618764996528625, -0.03911452367901802, -0.003872866043820977, -0.0019643830601125956, -0.07811818271875381, -0.003312563057988882, -0.02979855425655842, -0.026368506252765656, -0.01858139969408512, 0.003970991354435682, -0.03673161566257477, -0.019769256934523582, -0.047717317938804626, -0.029340459033846855, -0.08206198364496231, 0.06422960013151169, -0.0048095728270709515, -0.020884765312075615, -0.033516425639390945, 0.002453740919008851, 0.03480447083711624, 0.04182353988289833, -0.010297631844878197, 0.092518150806427, 0.0354897640645504, 0.031329769641160965, -0.022374197840690613, 0.057589441537857056, -0.026943165808916092, -0.04098391905426979, 0.00037276092916727066, 0.05951019749045372, -0.016951629891991615, 0.018015056848526, 0.016116531565785408, -0.013598354533314705, -0.014125346206128597, -0.0030593688134104013, 0.07084087282419205, 0.013786659575998783, 0.0007376751746051013, 0.010473430156707764, -0.02258673496544361, 0.04993279278278351, 0.02625940926373005, 0.0076924837194383144, 0.0038762656040489674, -0.04697825387120247, -0.008482999168336391, 0.0027632967103272676, 0.0018424419686198235, 0.035334110260009766, 0.067929707467556, -0.024876387789845467, 0.0032716684509068727, 0.09879248589277267, 0.038863327354192734, 0.021894177421927452, -0.048397138714790344, 0.013281791470944881, 0.016002444550395012, 0.033459778875112534, -0.007200651802122593, 0.04512576386332512, 0.015124168246984482, -0.00841322261840105, -0.035263556987047195, 0.030886514112353325, -0.0025095336604863405, -0.036049194633960724, -0.04419177770614624, -0.0591689869761467, 0.06506764143705368, -0.03305838257074356, -0.006493233609944582, 0.025688253343105316, 0.09737969189882278, -0.006329425144940615, 0.01380514819175005, 0.00981107633560896, -0.08054404705762863, 0.03348410874605179, -0.05498739331960678, -0.014435411430895329, 0.023549184203147888, -0.013013220392167568, 0.08114317804574966, -0.003475358709692955, -0.008138781413435936, 0.012273697182536125, -0.05136672407388687, -0.030886774882674217, -0.016997825354337692, 0.011475207284092903, 0.0845765471458435, -0.05320066958665848, -0.049594681710004807, 0.08119402825832367, 0.022016817703843117, 0.045133814215660095, 0.010013248771429062, -0.012711566872894764, -0.032884079962968826, -0.025580931454896927, -0.0540771484375, 0.017929617315530777, 0.030969498679041862, 0.0001240529236383736, 0.000020386780306580476, 0.02079131081700325, -0.020314622670412064, 0.013705775141716003, 0.03366274759173393, -0.0033396396320313215, 0.030247865244746208, 0.02883335016667843, 0.010171199217438698, -0.04927744343876839, 0.02692236565053463, -0.05592513456940651, -0.013986731879413128, 0.022192608565092087, -0.008351563476026058, -0.05086696520447731, -0.001492309384047985, 0.10977519303560257, 0.07403070479631424, -0.022953948006033897, -0.05742599070072174, 0.018757296726107597, 0.006386815570294857, -0.052339281886816025, -0.01793942041695118, -0.006165859755128622, -0.04545588791370392, 0.024295389652252197, -0.011931025423109531, -0.023429132997989655, -6.859559675831406e-7, -0.03560817614197731, -0.002091814763844013, 0.07197123765945435, -0.034794002771377563, 0.017138777300715446, 0.02041614055633545, -0.020178966224193573, 0.004756556358188391, -0.01010173000395298, -0.04505585506558418, 0.0014794563176110387, 0.03862781450152397, -0.02608245611190796, 0.05646216496825218, -0.022850682958960533, -0.048467718064785004, -0.04588707163929939, -0.03449176624417305, 0.025328265503048897, 0.025022298097610474, 0.055887289345264435, -0.019719189032912254, 0.015438011847436428, -0.010740784928202629, -0.010122023522853851, -0.055914245545864105, -0.042388591915369034, -0.039831649512052536, 0.0023884684778749943, 0.025370296090841293, 0.02650505304336548, 0.0029020507354289293, 0.04121013358235359, -0.019658241420984268, -0.006128339096903801, -0.0067754280753433704, 0.032032206654548645, 0.03158446028828621, -0.028695931658148766, -0.00604029418900609, -0.04943569749593735, -0.03024456463754177, 0.042410995811223984, -0.06790652126073837, -0.06556719541549683, -0.01580699346959591, -0.04673592373728752, -0.009595440700650215, -0.060945022851228714, -0.030274908989667892, -0.025592144578695297, 0.021455340087413788, 0.016718801110982895, -0.02359956130385399, 0.03231557086110115, 0.03652852401137352, 0.009101304225623608, 0.005828449502587318, 0.013589903712272644, 0.004154607653617859, 0.03839843347668648, 0.040767692029476166, 0.010225709527730942, -0.0059186252765357494, -0.004837744869291782, -0.0168874841183424, -0.02671966142952442, 0.0038000280037522316, -0.01977941393852234, -0.25871846079826355, 0.028593290597200394, 0.02193816378712654, -0.01565958373248577, 0.03136510029435158, -0.012364782392978668, 0.030642369762063026, -0.03193177282810211, -0.031439874321222305, 0.04722459614276886, -0.033607494086027145, -0.049907855689525604, -0.01984984427690506, 0.08143648505210876, -0.025019586086273193, 0.036754678934812546, -0.0007769436342641711, -0.023413389921188354, 0.028372373431921005, 0.05188322439789772, -0.006501475814729929, -0.0421244315803051, 0.005694979801774025, 0.046211834996938705, -0.015226858668029308, 0.025037867948412895, -0.07218339294195175, 0.05545647069811821, -0.05009946599602699, -0.04441951587796211, -0.02175845205783844, -0.004361310042440891, -0.007701452821493149, -0.012338465079665184, 0.001695428160019219, -0.035243988037109375, 0.021803582087159157, -0.009175307117402554, -0.01136767864227295, -0.0007617429364472628, -0.05690889060497284, -0.016682351008057594, -0.008605170994997025, -0.020292039960622787, 0.08175274729728699, 0.006570255849510431, -0.06280390173196793, -0.034847673028707504, -0.05851675570011139, 0.07677046209573746, -0.05257768556475639, -0.038975849747657776, -0.00898641999810934, 0.03503876551985741, 0.010873165912926197, 0.0052911872044205666, -0.02746139094233513, 0.00022874848218634725, -0.03489863872528076, -0.05518406257033348, -0.015487861819565296, -0.011718623340129852, -0.02627870999276638, -0.010851872153580189, 0.013770435005426407, -0.04635808616876602, -0.027986958622932434, -0.036797624081373215, 0.03679747134447098, 0.04888881370425224, -0.0817057192325592, -0.009570885449647903, -0.03881550580263138, -0.09444060921669006, 0.012513335794210434, -0.059100810438394547, -0.025566739961504936, -0.012555806897580624, -0.021249230951070786, 0.025316018611192703, -0.04663616418838501, -0.029481826350092888, 0.02434713765978813, -0.0002751227584667504, -0.007838767021894455, 0.013655724003911018, 0.02235903963446617, -0.00020399459754116833, -0.030329043045639992, -0.029163053259253502, 0.0590713806450367, -0.031780071556568146, -0.0036634784191846848, -0.010307167656719685, -0.01529821939766407, -0.008747469633817673, 0.0761425718665123, -0.016202827915549278, 0.032468508929014206, 0.007618481758981943, 0.02318248338997364, -0.058013688772916794, -0.0034314142540097237, -0.0003866623737849295, 0.01445601787418127, -0.0001943678653333336, -0.05513109639286995, 0.017844827845692635, 0.004511011764407158, 0.022459562867879868, 0.0017938322853296995, -0.027162989601492882, -0.007284322753548622, -0.04876082390546799, -0.018533924594521523, -0.020555386319756508, 0.03210841491818428, 0.020671531558036804, 0.020853254944086075, -0.002495975000783801, -0.0680348351597786, 0.03270311653614044, 0.011651408858597279, 0.03325430676341057, -0.043208278715610504, -0.044435251504182816, 0.027961157262325287, -0.005768199916929007, 0.018739916384220123, -0.011652047745883465, -0.02404627948999405, 0.028763342648744583, 0.03539536893367767, -0.032513733953237534, 0.04688410833477974, -0.035213083028793335, -0.027425546199083328, 0.0007453308789990842, -0.008202435448765755, -0.027170363813638687, 0.01277104951441288, 0.005628040060400963, -0.0036979762371629477, 0.00887076836079359, 0.06050574406981468, -0.005087748169898987, 0.04244562238454819, 0.011397742666304111, -0.013539638370275497, 0.01217751856893301, 0.026816265657544136, -0.03554936498403549, -0.01358342356979847, -0.03340815007686615, -0.02515770122408867, -0.004044120665639639, 0.022945644333958626, -0.0017183292657136917, 0.007989920675754547, 0.019377857446670532, 0.016940942034125328, -0.026537885889410973, 0.017669903114438057, -0.007744033355265856, -0.030451422557234764, 0.041669100522994995, 0.014780052937567234, -0.004902288783341646, -0.0009281021193601191, -0.0061905281618237495, 0.00798723567277193, 0.03525044396519661, -0.04782497510313988, 0.0047821118496358395, 0.01433960348367691, -0.015374969691038132, 0.02369791269302368, 0.03716503828763962, 0.000782730639912188, 0.002501376438885927, 0.024412723258137703, 0.004833881743252277, 0.010503613390028477, -0.0009676416520960629, 0.021403076127171516, -0.00851545762270689, 0.008472953923046589, -0.03473757952451706, -0.015018834732472897, -0.04898221418261528, -0.0369827076792717, 0.003600975265726447, -0.0064620268531143665, 0.012302054092288017, -0.019212638959288597, -0.07130580395460129, -0.016470398753881454, 0.03860773891210556, 0.03410520404577255, 0.030639121308922768, -0.04788278043270111, 0.008507288061082363, -0.024142397567629814, 0.016921058297157288, 0.043403010815382004, -0.04026492312550545, 0.007461307570338249, -0.025373026728630066, 0.013247331604361534, 0.0031575870234519243, 0.028598353266716003, -0.047799259424209595, -0.03106551617383957, -0.007846628315746784, -0.023194530978798866, 0.0021883926820009947, -0.04500987380743027, -0.03344416618347168, 0.008961525745689869, -0.017574993893504143, 0.0003541496116667986, -0.011065831407904625, 0.03333815932273865, -0.010419045574963093, -0.016760356724262238, 0.021507374942302704, 0.017429977655410767, 0.021012604236602783, 0.025587668642401695, 0.02538079209625721, 0.05501500517129898, -0.01812957599759102, 0.053616076707839966, 0.01986061781644821, 0.00406937999650836, -0.02797885797917843, -0.04385897517204285, 0.0011454728664830327, 0.0045113759115338326, 0.015123410150408745, 0.020506184548139572, 0.02992190048098564, -0.027898572385311127, -0.0398426279425621, -0.019220886752009392, 0.006472807377576828, -0.03925379738211632, -0.01661790907382965, -0.003655944485217333, 0.08857505768537521, -0.0035589421167969704, 0.036403972655534744, -0.004881034605205059, -0.03884650394320488, 0.04806896671652794, -0.06954045593738556, -0.06995037198066711, 0.020127911120653152, -0.04720275104045868, 0.041398242115974426, 0.032474081963300705, 0.059115324169397354, -0.10485853999853134, 0.022839486598968506, 0.03817770257592201, 0.03267974406480789, 0.06534223258495331, 0.0018086303025484085, 0.043524932116270065, -0.027895409613847733, -0.0006265834672376513, -0.09481358528137207, 0.022527094930410385, 0.045047931373119354, 0.010306024923920631, -0.044712357223033905, -0.01872178539633751, -0.02170965075492859, 0.048895835876464844, -0.05054138973355293, 0.00946246087551117, 0.04768108204007149, 0.05098392814397812, 0.02884700894355774, 0.03525164723396301, -0.03850426524877548, 0.0438384972512722, 0.030139463022351265, -0.019475851207971573, 0.004808458033949137, -0.014073800295591354, 0.047772590070962906, 0.02121313288807869, 0.03794188052415848, -0.008491489104926586, 0.029648512601852417, 0.04973197728395462, 0.027515480294823647, -0.009590359404683113, 0.03847558796405792, -0.012420348823070526, 0.0571180135011673, 0.02960204891860485, 0.0021275801118463278, -0.008312464691698551, 0.052378494292497635, 0.009942700155079365, -0.04096028581261635, 0.033259738236665726, 0.02461669035255909, -0.01985112950205803, -0.04722895100712776, 0.03536463528871536, 0.02130194567143917, -0.0211886465549469, -0.016000980511307716, 0.0029602416325360537, -0.07602182775735855, 0.0022494785953313112, -0.021808849647641182, -0.04619088023900986, -0.05283895879983902, 0.04443925991654396, 0.004648055415600538, -0.017704416066408157, 0.03844618797302246, -0.019549647346138954, 0.012705124914646149, -0.022038176655769348, 0.07026621699333191, 0.0746513083577156, 0.038998525589704514, 0.034436166286468506, 0.04214603826403618, 0.013208570890128613, -0.040983159095048904, 0.03271671012043953, -0.021381309255957603, 0.00627373531460762, -0.013717672787606716, 0.006901657208800316, 0.044583890587091446, 0.00129870162345469, 0.059841226786375046, -0.02420531027019024, 0.006384630221873522, -0.050990357995033264, 0.011728517711162567, 0.03395690396428108, 0.07572651654481888, 0.024156620725989342, 0.05871380493044853, -0.0259308572858572, -0.0383370965719223, 0.0326964408159256, -0.024929890409111977, 0.007756138686090708, 0.014712193049490452, 0.0001485164975747466, 0.010197455994784832, 0.04188905283808708, 0.024865657091140747, 0.0835798904299736, -0.026179958134889603, -0.03503158316016197, 0.024741068482398987, 0.0534641370177269, 0.014847176149487495, 0.014694584533572197, 0.005866928491741419, 0.006201152224093676, 0.041277267038822174, -0.015226959250867367, -0.014764185063540936, -0.01822657883167267, -0.013404380530118942, 0.057662639766931534, -0.015023929066956043, -0.036418236792087555, 0.03991568833589554, 0.015806669369339943, -0.022590896114706993, -0.03439866751432419, -0.08295781165361404, -0.04523581266403198, -0.04901919141411781, -0.012888426892459393, 0.02140987291932106, -0.025080332532525063, -0.037658676505088806, -0.043566055595874786, -0.00726164598017931, -0.012026016600430012, -0.012616760097444057, -0.03433167561888695, -0.023379992693662643, 0.025599589571356773, 0.01839682087302208, 0.007274596486240625, -0.006434397306293249, 0.03852830454707146, -0.01525859721004963, -0.04203882813453674, -0.027485501021146774, 0.02554968371987343, 0.0389975979924202, 0.0026123581919819117, -0.006490547675639391, -0.08466701954603195, 0.030772950500249863, 0.0456043966114521, 0.015981024131178856, -0.06803183257579803, 0.0393812395632267, 0.025322815403342247, 0.01634693704545498, 0.03509041294455528, -0.004252636805176735, -0.001735282246954739, -0.01759212464094162, -0.0016188954468816519, -0.012041541747748852, 0.048170220106840134, 0.053297024220228195, -0.008012299425899982, 0.07267813384532928, 0.004119569435715675, 0.0065053412690758705, -0.030722318217158318, -0.009381354786455631, -0.009817170910537243, -0.012583808042109013, -0.06475990265607834, -0.004245277959853411, -0.026810508221387863, -0.024829668924212456, -0.045650944113731384, 0.009888160042464733, 0.0016174634220078588, -0.02339239977300167, 0.013059339486062527, 0.011069495230913162, -0.021600279957056046, 0.0568709671497345, -0.060419704765081406, 0.006108596455305815, -0.014819982461631298, -0.016014546155929565, 0.005578834563493729, 0.0018074032850563526, 0.01757851056754589, 0.02065955102443695, 0.03417782858014107, -0.011973798274993896, -0.008210874162614346, -0.032907236367464066, 0.021618677303195, 0.052855078130960464, -0.008941632695496082, 0.01252075657248497 ]
[ -0.1055203229188919, -0.022692957893013954, -0.00900400523096323, -0.04064885526895523, 0.0030245925299823284, -0.09546130895614624, 0.0030365046113729477, 0.005915097892284393, 0.006376158446073532, -0.024800166487693787, 0.024735603481531143, -0.04481954127550125, 0.020804358646273613, -0.055315934121608734, 0.07058986276388168, -0.017444517463445663, 0.004525633528828621, -0.029381893575191498, -0.0504831038415432, -0.04709821566939354, -0.010312079451978207, -0.005248818546533585, 0.00154252874199301, -0.01982998661696911, -0.008107071742415428, 0.07548872381448746, 0.012134804390370846, -0.007533661089837551, -0.007093443069607019, -0.2093353271484375, 0.012665849179029465, -0.006271176505833864, -0.026714475825428963, 0.0023940540850162506, 0.0341000035405159, 0.07677485793828964, 0.004426274448633194, -0.010999934747815132, 0.02360357902944088, 0.055000536143779755, 0.036648042500019073, 0.021388432011008263, -0.05333275347948074, -0.009248009882867336, 0.03602477163076401, -0.02811678685247898, -0.005323879420757294, -0.03483567014336586, 0.012685025110840797, -0.005799972452223301, -0.003803075524047017, -0.01051160879433155, -0.04162125289440155, -0.013008964248001575, -0.019794678315520287, 0.016951724886894226, 0.07590273767709732, 0.06643551588058472, 0.04912253096699715, -0.020882096141576767, 0.0025564120151102543, -0.01775837317109108, -0.11566992849111557, 0.12309466302394867, 0.006545252166688442, 0.03478376567363739, -0.0374278724193573, 0.004861300345510244, -0.008987371809780598, 0.06623568385839462, -0.03066720999777317, -0.016643580049276352, -0.050925444811582565, 0.04547041654586792, -0.004599412903189659, -0.08287809044122696, 0.018345091491937637, 0.017506912350654602, 0.0827847570180893, -0.0174886304885149, -0.04067407175898552, -0.032027970999479294, -0.013259190134704113, -0.025253597646951675, 0.010196433402597904, 0.0006888986681587994, -0.003518204903230071, 0.04464832693338394, 0.02313452772796154, -0.00739697739481926, 0.023225806653499603, -0.05024018883705139, 0.05966555327177048, 0.05029470473527908, -0.07986092567443848, -0.007909897714853287, 0.023608354851603508, 0.027262656018137932, -0.043670445680618286, 0.4140891134738922, -0.06468548625707626, 0.015990111976861954, 0.025074075907468796, 0.04018227756023407, 0.004463236313313246, -0.01007689069956541, -0.01016615703701973, -0.004459202755242586, -0.0031509832479059696, -0.03733305260539055, 0.0026825570967048407, -0.019628534093499184, 0.04801838845014572, -0.03570178523659706, 0.029227430000901222, 0.03342484310269356, -0.015137682668864727, -0.013665467500686646, -0.016929054632782936, 0.03829507902264595, -0.006037500221282244, -0.028061233460903168, 0.048265550285577774, 0.01924099773168564, -0.006483529694378376, 0.05309329926967621, 0.031934138387441635, 0.060367152094841, 0.017539024353027344, 0.03265250846743584, 0.0317080020904541, -0.02323954738676548, -0.06886447221040726, 0.008416205644607544, -0.018259631469845772, 0.024735119193792343, -0.010758227668702602, -0.024213196709752083, 0.01406359113752842, -0.02010645531117916, 0.026131846010684967, -0.051972974091768265, 0.02379634976387024, 0.029049888253211975, -0.03380199149250984, 0.0838441401720047, -0.036068663001060486, 0.02182861417531967, -0.0379047654569149, -0.03143547475337982, -0.012118974700570107, 0.032715845853090286, -0.03043215349316597, -0.025791482999920845, 0.00989743322134018, 0.015288925729691982, 0.11400023847818375, -0.00976247526705265, -0.026188839226961136, -0.00032310577807947993, -0.0068278443068265915, -0.06571950018405914, -0.018361734226346016, 0.019780233502388, -0.002512141363695264, -0.13285717368125916, -0.030074071139097214, -0.010442337952554226, 0.014316427521407604, -0.060837309807538986, 0.026611121371388435, 0.017377037554979324, -0.01316835731267929, 0.003132370300590992, 0.0516563281416893, -0.0007401542970910668, -0.03583855554461479, -0.007220368832349777, 0.11296195536851883, 0.041657641530036926, 0.00555842462927103, 0.012691709212958813, -0.05548902973532677, -0.02799251675605774, -0.042364031076431274, -0.04415128752589226, -0.04266538843512535, -0.01951693557202816, 0.002146268729120493, -0.00789798516780138, 0.02170524373650551, 0.02085910178720951, 0.011774697341024876, 0.003129857825115323, -0.012963647022843361, 0.025317838415503502, -0.009996787644922733, -0.019709836691617966, 0.01122698187828064, -0.01140642911195755, 0.011546902358531952, 0.06174582242965698, -0.003830481553450227, -0.011437020264565945, -0.013291994109749794, 0.04913140460848808, 0.06292892247438431, -0.03718327730894089, 0.08785265684127808, -0.010669995099306107, -0.06952911615371704, -0.01793232560157776, 0.014221873134374619, -0.015059576369822025, -0.020822783932089806, -0.061849795281887054, -0.0477793850004673, 0.02898339554667473, 0.03479744866490364, 0.023215794935822487, -0.065867580473423, -0.058156099170446396, -0.021132299676537514, -0.351183146238327, 0.04031618312001228, 0.019045904278755188, -0.014621879905462265, -0.0070944479666650295, -0.09158812463283539, 0.019337156787514687, -0.005526420660316944, -0.03181077167391777, 0.04873950406908989, 0.10061179846525192, -0.02647189237177372, 0.04116096347570419, -0.042276300489902496, 0.008771241642534733, 0.04946969076991081, -0.021313898265361786, -0.018081072717905045, -0.024973846971988678, -0.006699108052998781, -0.02813224494457245, -0.053117990493774414, -0.013116749003529549, -0.05856931954622269, 0.007844885811209679, -0.03657197952270508, 0.1043480932712555, 0.0028646530117839575, 0.06363389641046524, -0.034198738634586334, 0.019639408215880394, 0.03346103057265282, -0.019362792372703552, -0.1305033266544342, 0.00790987629443407, 0.008677130565047264, 0.014607647433876991, 0.05061553046107292, 0.0056849378161132336, 0.02873069792985916, 0.026906372979283333, 0.02764700911939144, 0.017569921910762787, 0.02785242721438408, 0.018164440989494324, -0.011873187497258186, -0.025475462898612022, -0.0720757246017456, -0.010672093369066715, 0.0723436251282692, -0.0006845679017715156, 0.034575413912534714, 0.02906639501452446, 0.023226475343108177, -0.03484392911195755, -0.042162247002124786, -0.021470719948410988, -0.014991039410233498, 0.011724400334060192, -0.012122881598770618, 0.019357865676283836, 0.03475050628185272, 0.013202430680394173, -0.0483112633228302, 0.00746201304718852, -0.0060222698375582695, 0.04604683443903923, -0.021644309163093567, 0.04746250435709953, 0.01689734309911728, -0.02508825995028019, 0.10780952870845795, -0.0025891419500112534, -0.004095533397048712, -0.0073683904483914375, 0.05821003019809723, 0.02062675543129444, 0.0626487210392952, 0.01681404747068882, -0.032596468925476074, 0.044680096209049225, 0.026114076375961304, 0.01682301238179207, -0.010254602879285812, 0.03308890387415886, -0.026270393282175064, -0.035829249769449234, 0.014719919301569462, 0.04476182162761688, 0.015323612838983536, -0.012336350977420807, -0.007323743775486946, 0.006946335546672344, 0.009837226942181587, 0.06614502519369125, -0.006705636158585548, -0.23637104034423828, -0.0016116115730255842, 0.028115319088101387, 0.043576374650001526, -0.0010457888711243868, 0.046522773802280426, 0.03585419803857803, -0.04321271926164627, -0.038557834923267365, -0.03417272865772247, 0.022378843277692795, -0.006485790945589542, 0.050231002271175385, 0.025599129498004913, 0.01784021593630314, -0.015897775068879128, 0.08626129478216171, -0.009542078711092472, 0.014684821479022503, 0.017855806276202202, 0.006880099419504404, -0.04460715875029564, 0.1435040831565857, -0.0038424411322921515, 0.06131404638290405, -0.03419347107410431, -0.014731528237462044, 0.0030252623837441206, 0.03236151859164238, 0.03880462422966957, 0.00990993157029152, -0.019335342571139336, 0.04808032512664795, -0.0029648849740624428, -0.0010147419525310397, -0.05854244530200958, -0.050225455313920975, -0.004931766539812088, 0.02062562294304371, -0.03332946076989174, -0.03645146265625954, 0.015377718023955822, -0.10462380945682526, -0.0057406798005104065, 0.043225668370723724, -0.022232133895158768, -0.015851804986596107, -0.04643602296710014, -0.06669589877128601, 0.0007310679065994918, -0.004010356031358242, -0.021411104127764702, -0.045282091945409775, -0.005323789548128843, -0.01354231871664524, 0.040413957089185715, 0.03008914366364479, 0.024898316711187363, 0.0029969667084515095, 0.014432883821427822, 0.011694053187966347, -0.04603847861289978, 0.15497994422912598, 0.0640903040766716, -0.013676537200808525 ]
[ -0.035296328365802765, 0.010984888300299644, -0.02697618678212166, 0.023666586726903915, 0.00218264595605433, -0.00878123939037323, -0.0059753707610070705, 0.007555616088211536, -0.029164059087634087, -0.04028980806469917, -0.003239177633076906, 0.028540635481476784, 0.007875709794461727, 0.01154434122145176, 0.04054214432835579, -0.00785121601074934, 0.024189883843064308, -0.0013076376635581255, 0.03043765015900135, -0.03383799269795418, -0.029483791440725327, 0.0503557063639164, 0.057903967797756195, 0.03537348285317421, -0.007365414407104254, -0.026982635259628296, -0.04575030878186226, 0.016032451763749123, 0.028692305088043213, -0.13599222898483276, -0.016617830842733383, -0.0037402701564133167, -0.00033259543124586344, -0.008204516023397446, -0.011507721617817879, 0.07329502701759338, -0.0019365593325346708, -0.008614656515419483, -0.02336459420621395, 0.0052440888248384, 0.009835714474320412, -0.01422753743827343, -0.030714308843016624, -0.0013443866046145558, 0.006440133787691593, -0.016532273963093758, -0.0085817351937294, -0.001403224654495716, -0.007280797231942415, -0.04753002151846886, -0.015200581401586533, 0.018303750082850456, -0.0348624512553215, -0.035233024507761, -0.009987176395952702, -0.00042727109394036233, 0.05191541463136673, -0.009786172769963741, 0.008305521681904793, -0.032568126916885376, -0.014230022206902504, 0.019592801108956337, -0.019459957256913185, -0.0312773697078228, -0.007956186309456825, -0.013024626299738884, 0.0033545801416039467, 0.0016877127345651388, 0.010515003465116024, 0.0012161729391664267, -0.01990848407149315, 0.0013641926925629377, -0.0010078941704705358, 0.005715872626751661, -0.007660700939595699, -0.033078256994485855, 0.012980803847312927, -0.028711561113595963, 0.014997170306742191, 0.01535492017865181, -0.011125982739031315, -0.00801131222397089, -0.007108170539140701, 0.039224814623594284, 0.01276157982647419, -0.011835791170597076, 0.019322792068123817, 0.012750550173223019, 0.0163436196744442, -0.009470352903008461, -0.0058868578635156155, 0.005642473232001066, 0.029159558936953545, 0.029312750324606895, -0.08581333607435226, -0.0036243449430912733, 0.017060412093997, -0.027478771284222603, -0.00481234397739172, 0.842055082321167, -0.004781731870025396, -0.008671834133565426, 0.03858722373843193, 0.0023861732333898544, 0.04175034165382385, 0.013734175823628902, -0.009824794717133045, -0.041693393141031265, 0.0067752813920378685, -0.023143040016293526, 0.060561057180166245, -0.05435994267463684, 0.007924281992018223, 0.013095144182443619, 0.03647145628929138, 0.035219985991716385, 0.021006451919674873, 0.035635434091091156, 0.0047202096320688725, 0.005193835124373436, 0.006211795844137669, -0.004408254288136959, 0.01513630896806717, -0.017268985509872437, -0.020173534750938416, -0.16573868691921234, -0.001732788747176528, -7.48790048410591e-33, 0.02136545442044735, -0.0080080796033144, 0.0005477003869600594, 0.02922818623483181, 0.027202079072594643, 0.02658132277429104, -0.012236497364938259, 0.024673474952578545, -0.004719079006463289, -0.03284003958106041, 0.027625933289527893, -0.00006330671021714807, -0.002765126060694456, 0.02736453339457512, 0.031609270721673965, 0.011140908114612103, -0.0030952163506299257, 0.06693002581596375, -0.01973710022866726, 0.05089269578456879, 0.021044716238975525, 0.02467852085828781, 0.01056726835668087, 0.0071611045859754086, 0.0006222379161044955, 0.04068804159760475, 0.026195930317044258, 0.0042547560296952724, -0.010524415411055088, -0.05905840918421745, -0.024495311081409454, 0.0018708661664277315, 0.02368011325597763, -0.018847815692424774, -0.015267557464540005, -0.05263170599937439, -0.008244909346103668, -0.002751732710748911, -0.027388161048293114, -0.028115011751651764, -0.0286552757024765, 0.018487833440303802, -0.02751624584197998, -0.042312681674957275, -0.030690984800457954, -0.010717662051320076, -0.004061673767864704, 0.05941052734851837, -0.0027207403909415007, 0.014087950810790062, 0.03939966484904289, 0.02627546712756157, -0.01643858291208744, 0.0027103761676698923, -0.03215215727686882, 0.006361187435686588, -0.009147566743195057, 0.034629397094249725, 0.03386304900050163, -0.048434071242809296, 0.035276155918836594, -0.016266999766230583, 0.01997511088848114, 0.03659350425004959, 0.014645959250628948, 0.014438079670071602, 0.0037203526590019464, 0.04008438065648079, 0.04678882285952568, 0.03136390447616577, -0.06719993054866791, 0.029178248718380928, -0.030306529253721237, -0.012250971049070358, 0.012175035662949085, 0.0070115868002176285, -0.008255244232714176, -0.027355141937732697, 0.007372381165623665, 0.05938837677240372, 0.022937877103686333, -0.0003328858292661607, -0.0312836728990078, -0.0202647615224123, -0.007410990074276924, -0.011049066670238972, 0.03636060282588005, -0.017148703336715698, 0.006497793365269899, 0.002298389095813036, -0.002807621844112873, 0.002047616057097912, 0.017538296058773994, -0.022724783048033714, -0.04140203818678856, 6.92952376973403e-33, 0.026289116591215134, 0.011485714465379715, -0.03803214430809021, 0.0098708625882864, -0.006754111964255571, -0.0385504849255085, 0.017963014543056488, 0.03809099644422531, -0.025745972990989685, 0.03101181425154209, -0.01777416281402111, 0.0007213675999082625, 0.0062619345262646675, 0.03703824803233147, 0.04935925826430321, 0.02884230948984623, -0.0192186888307333, 0.04553970694541931, 0.008500419557094574, -0.030500397086143494, -0.02447904646396637, 0.0020859260112047195, 0.029858814552426338, 0.010341709479689598, 0.011894676834344864, 0.03573234751820564, -0.027371782809495926, -0.024696193635463715, -0.02384776808321476, -0.008524603210389614, -0.011103186756372452, -0.016617296263575554, 0.00445080641657114, -0.020021002739667892, -0.017300978302955627, 0.03251037746667862, 0.00263293762691319, -0.004755703266710043, 0.0308181531727314, -0.0057849944569170475, 0.04022783413529396, 0.010257281363010406, 0.015333832241594791, 0.007020823657512665, -0.014658190310001373, -0.01909709721803665, -0.014351995661854744, -0.004244009032845497, 0.002907926682382822, 0.0061162556521594524, -0.01423563715070486, 0.005975998472422361, 0.020147578790783882, -0.009947696700692177, 0.007409792393445969, -0.016416143625974655, -0.006453910376876593, 0.040625665336847305, -0.02173594757914543, 0.0018369375029578805, -0.02015957050025463, -0.029041612520813942, -0.02330198884010315, 0.01609782688319683, -0.03735535964369774, 0.003753716591745615, -0.08073875308036804, -0.0365094318985939, 0.005094051826745272, -0.02342190034687519, 0.025373881682753563, -0.01431516744196415, -0.016020767390727997, 0.017344661056995392, -0.010324833914637566, 0.03585696220397949, -0.015655668452382088, 0.0051660859026014805, -0.018657492473721504, 0.013915026560425758, 0.004888385999947786, -0.03854799270629883, -0.0036414670757949352, 0.006130645051598549, -0.02881486341357231, -0.010239372961223125, -0.0330822579562664, 0.016063187271356583, 0.05154279246926308, 0.005686440505087376, -0.006518447306007147, 0.010919420048594475, 0.00015673015150241554, 0.002002215711399913, -0.005357770714908838, -1.3070556192928962e-8, -0.0244281068444252, 0.022559750825166702, -0.008322630077600479, 0.05761072039604187, 0.016021333634853363, 0.025619439780712128, -0.01596294343471527, -0.020675605162978172, -0.0032067610882222652, 0.017110154032707214, 0.017062973231077194, -0.02797563001513481, -0.015454635955393314, 0.0003351280465722084, 0.016940973699092865, 0.014892484992742538, -0.012829648330807686, -0.007500598207116127, 0.020174529403448105, -0.022150076925754547, -0.007523373235017061, 0.0004229384067002684, -0.017743036150932312, 0.052004680037498474, -0.05285097658634186, -0.027180923148989677, 0.049405090510845184, -0.0644160732626915, -0.013888046145439148, -0.017543310299515724, 0.008945522829890251, -0.029767541214823723, -0.05602129548788071, 0.0036021473351866007, 0.003542992053553462, -0.03044777549803257, -0.007869049906730652, -0.0039581675082445145, 0.03354387357831001, 0.02707367017865181, -0.02583407610654831, -0.04161972925066948, -0.012199758552014828, -0.04128803685307503, -0.022950490936636925, -0.039087358862161636, -0.02309746854007244, -0.016407234594225883, -0.014950988814234734, 0.02225392684340477, 0.04238925129175186, -0.027720440179109573, -0.026368148624897003, -0.0013942176010459661, 0.0058127231895923615, 0.02062240056693554, 0.0014534221263602376, 0.013550877571105957, -0.028366288170218468, -0.0172724686563015, 0.018013888970017433, 0.013799523934721947, 0.005431609693914652, -0.04108992964029312 ]
python-reimport-module
https://markhneedham.com/blog/2023/07/07/python-reimport-module
false
2023-07-24 04:44:37
VSCode: Adding Poetry Python Interpreter
[ "poetry", "vscode", "python", "til" ]
[ "TIL" ]
:icons: font I've been trying out Python's https://python-poetry.org/[Poetry^] dependency management tool recently and I really like it, but couldn't figure out how to get it setup as VSCode's Python interpreter. In this blog post, we'll learn how to do that. One way to add the Python interpreter in VSCode is to press `Cmd+Shift+p` and then type `Python Interpreter`. If you select the first result, you'll see something like the following: .The Python interpreter modal window in VSCode image::{{<siteurl>}}/uploads/2023/07/python-interpreter.png[] When I create a virtual environment directly it'll usually appear on the list, but Poetry wasn't. I went a-searching and came across https://stackoverflow.com/questions/59882884/vscode-doesnt-show-poetry-virtualenvs-in-select-interpreter-option[a StackOverflow thread where people were experiencing the same problem^]. I tried some of the suggestions, but they mostly didn't work for me. I did, however, realise that I'd be able to add the interpreter manually if I knew its path, which led me to https://github.com/python-poetry/poetry/pull/731[this PR^]. This led me to the following command which gives us that answer: [source, bash] ---- poetry env info ---- .Output [source, text] ---- Virtualenv Python: 3.11.4 Implementation: CPython Path: /Users/markhneedham/projects/duckdb-0.8/sentiment-analysis/.venv Executable: /Users/markhneedham/projects/duckdb-0.8/sentiment-analysis/.venv/bin/python Valid: True System Platform: darwin OS: posix Python: 3.11.4 Path: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11 Executable: /opt/homebrew/opt/python@3.11/Frameworks/Python.framework/Versions/3.11/bin/python3.11 ---- If we want to only get the path, we can pass in `--path`: [source, bash] ---- poetry env info --path ---- .Output [source, text] ---- /Users/markhneedham/projects/duckdb-0.8/sentiment-analysis/.venv ---- We can then pipe that to our clipboard: [source, bash] ---- poetry env info --path | pbcopy ---- And now we can go back to the Python interpreter window and paste in the result. Job done!
In this post, we're going to learn how to configure Poetry as a Python interpreter in VSCode.
uploads/2023/07/vscode-poetry-interpreter.png
[ 0.00981057807803154, 0.00412787077948451, -0.016012677922844887, 0.006447192281484604, 0.0761578232049942, 0.06370855867862701, 0.02097654901444912, 0.0529261939227581, -0.012320337817072868, -0.030331846326589584, -0.035040583461523056, -0.0016393465921282768, -0.08379227668046951, 0.00404736353084445, -0.010438348166644573, 0.0749681144952774, 0.0809078961610794, 0.004181632772088051, 0.025374537333846092, 0.007897173054516315, 0.0266143549233675, 0.07482226938009262, -0.019437234848737717, 0.01830291748046875, -0.003658351954072714, 0.01702834852039814, 0.03142666071653366, -0.017871860414743423, -0.07264897227287292, -0.03292300924658775, 0.017996666952967644, -0.012041891925036907, -0.0020457792561501265, -0.030086958780884743, 0.015764910727739334, 0.03164816275238991, -0.02875824272632599, 0.027579165995121002, 0.012962250970304012, 0.03673185035586357, -0.0691186711192131, -0.002368645276874304, 0.00920562632381916, 0.011909231543540955, -0.046986863017082214, 0.003133188933134079, -0.05811186134815216, 0.0384787954390049, 0.014099274761974812, 0.00001262919158762088, -0.05281677097082138, 0.026334580034017563, -0.026775972917675972, -0.04034300521016121, 0.002074889140203595, 0.029875658452510834, 0.026545116677880287, -0.06780631095170975, 0.007220194675028324, -0.03167576342821121, 0.01489255204796791, 0.007380432449281216, 0.017738621681928635, 0.0496402271091938, 0.03463629260659218, -0.013732454739511013, -0.020713550969958305, 0.02513967454433441, -0.05184463784098625, -0.016916882246732712, 0.008919164538383484, 0.0360422320663929, -0.037852898240089417, -0.00006194306479301304, 0.029754798859357834, -0.03800833225250244, -0.028767773881554604, 0.06780005991458893, 0.03377847000956535, 0.06673520058393478, -0.012496007606387138, 0.012959160842001438, 0.03877885639667511, 0.031626977026462555, -0.01202425081282854, -0.04167148098349571, -0.0018166621448472142, -0.005117539316415787, -0.06059202924370766, 0.02795754186809063, 0.008140967227518559, -0.08085925132036209, 0.02653140015900135, 0.026237988844513893, -0.002396472729742527, 0.029561519622802734, -0.0008418160723522305, 0.014340125024318695, 0.002709869761019945, -0.00886289682239294, -0.05222611874341965, -0.03326481580734253, 0.02760966680943966, 0.016371995210647583, -0.07717171311378479, -0.0006483154138550162, -0.020018847659230232, -0.011928457766771317, 0.004396973177790642, 0.009327860549092293, -0.0023243578616529703, -0.007028077729046345, -0.01380222849547863, -0.0034932608250528574, -0.06160491704940796, 0.062442004680633545, 0.005463572219014168, -0.02892395108938217, -0.008141417987644672, 0.02800174616277218, 0.04208899289369583, 0.01675555855035782, -0.021747257560491562, 0.08090895414352417, 0.012241738848388195, 0.03773309662938118, -0.020940858870744705, 0.05850358307361603, 0.01757984235882759, -0.04312125965952873, -0.02466893009841442, 0.05593661963939667, -0.02048863098025322, 0.006713403854519129, 0.0038223499432206154, 0.014156709425151348, 0.01682876981794834, 0.0012107091024518013, 0.05479989945888519, 0.027403714135289192, -0.02456130087375641, -0.024184342473745346, -0.01454147044569254, 0.004190052859485149, 0.038277994841337204, 0.021381380036473274, 0.008853129111230373, -0.04691746085882187, -0.024409309029579163, 0.017307234928011894, 0.001546634128317237, -0.008185568265616894, 0.07268982380628586, -0.014630485326051712, 0.021945102140307426, 0.07802931219339371, 0.06502086669206619, 0.04318355768918991, -0.02403124049305916, 0.01518300175666809, 0.01991104707121849, 0.030975287780165672, 0.020038068294525146, 0.07037007808685303, 0.013845490291714668, -0.012719041667878628, -0.03126717358827591, 0.0182664655148983, -0.026619484648108482, 0.019239339977502823, -0.05536654219031334, -0.07952235639095306, 0.06257293373346329, -0.03672587871551514, -0.008098108693957329, 0.011236450634896755, 0.08533834666013718, 0.04605745151638985, 0.04093534126877785, 0.005550264846533537, -0.09377426654100418, 0.03758219629526138, -0.00909384060651064, 0.022211074829101562, 0.030215846374630928, -0.0006542790797539055, 0.08910978585481644, 0.0048902882263064384, 0.016345832496881485, 0.03555143252015114, -0.07857472449541092, -0.0706218034029007, -0.048917096108198166, 0.01941506937146187, 0.042598698288202286, -0.06660642474889755, -0.034724511206150055, 0.05222361534833908, 0.04441354423761368, 0.04282025247812271, 0.02683919295668602, -0.008345783688127995, 0.01143709383904934, -0.03956490010023117, -0.05997689068317413, 0.03391684964299202, 0.0656614676117897, -0.019183125346899033, -0.04333905130624771, -0.0001610495091881603, -0.01156345009803772, -0.020631708204746246, 0.027726756408810616, -0.03524595871567726, 0.06549076735973358, -0.007084352429956198, 0.024171018972992897, -0.043388523161411285, 0.03200330585241318, -0.059950441122055054, 0.0252702534198761, -0.015471878461539745, 0.021004991605877876, -0.04089025780558586, 0.006964950822293758, 0.10948473960161209, 0.0753474235534668, -0.04883778095245361, -0.06679403781890869, -0.016086578369140625, -0.016980720683932304, -0.041425712406635284, 0.005631452891975641, -0.006070495117455721, -0.010923542082309723, 0.005796968005597591, -0.021086154505610466, -0.03508669137954712, 0.02669752761721611, -0.038127705454826355, -0.00849419366568327, 0.05424361303448677, -0.03235767036676407, 0.032419074326753616, 0.005962539929896593, -0.019636470824480057, -0.006875122897326946, -0.01795503869652748, -0.04387035220861435, 0.01944977603852749, 0.049262236803770065, -0.01248146127909422, 0.02679544687271118, -0.03368039056658745, -0.00902248453348875, -0.007722961250692606, -0.06273085623979568, 0.004203825257718563, 0.048872143030166626, 0.029492411762475967, -0.057354316115379333, 0.020121023058891296, -0.0016106059774756432, 0.008988403715193272, 0.0035839234478771687, -0.030939163640141487, -0.043849434703588486, -0.014056798070669174, 0.015886960551142693, 0.009359036572277546, 0.016636760905385017, 0.03514726459980011, 0.007138392422348261, -0.02223309874534607, 0.02047797292470932, 0.0240542721003294, 0.03785588592290878, -0.0037147817201912403, -0.0023366271052509546, -0.054551638662815094, -0.009555314667522907, 0.05598921328783035, -0.06520526111125946, -0.016551034525036812, -0.024189472198486328, -0.05241941288113594, 0.025361835956573486, -0.08084993809461594, -0.029976559802889824, -0.03935952112078667, 0.002814560430124402, 0.046427879482507706, -0.011073760688304901, -0.004064870532602072, 0.02799794264137745, -0.0025905161164700985, 0.011758837848901749, 0.03345702588558197, -0.006215492729097605, 0.04255763068795204, 0.03465702012181282, 0.030410286039114, 0.04238853603601456, 0.017964910715818405, -0.0005563024315051734, -0.037912409752607346, 0.024860892444849014, -0.03998548910021782, -0.267275869846344, 0.016386263072490692, -0.01355828158557415, -0.05642536282539368, 0.01679852604866028, -0.009586562402546406, 0.019987894222140312, -0.04647325351834297, -0.014233211986720562, 0.0016398114385083318, -0.041123759001493454, -0.0671193078160286, -0.012901085428893566, 0.024667203426361084, -0.011897803284227848, 0.0036229381803423166, 0.000994995003566146, -0.04191913828253746, 0.012191548012197018, 0.05413588136434555, -0.01516861654818058, -0.05217995494604111, 0.0186839010566473, 0.025284623727202415, 0.015501439571380615, 0.03409203886985779, -0.06139682978391647, 0.051844522356987, -0.04323882237076759, -0.019889341667294502, -0.02710762806236744, -0.002559177577495575, 0.0179754551500082, 0.007038552779704332, -0.024199925363063812, -0.014595946297049522, 0.02429310791194439, -0.03212782368063927, 0.02574414573609829, 0.016870955005288124, -0.01932736486196518, -0.05506451427936554, 0.010156845673918724, -0.02085941843688488, 0.07392250746488571, -0.02473795786499977, -0.09094026684761047, 0.00006555410800501704, -0.05116827040910721, 0.09096253663301468, -0.038813140243291855, -0.0352356992661953, -0.03226061165332794, 0.038248829543590546, 0.01218221802264452, 0.002472509164363146, -0.004507770761847496, -0.0075149210169911385, -0.0652199536561966, -0.024407004937529564, -0.019063405692577362, -0.0367310494184494, -0.028902104124426842, -0.050249144434928894, -0.0030568931251764297, -0.06905665993690491, -0.030308062210679054, -0.020747113972902298, 0.05196429789066315, 0.053434956818819046, -0.05548989400267601, -0.0018137969309464097, -0.03399329259991646, -0.09948080778121948, 0.006363891996443272, -0.017122775316238403, -0.03275873884558678, -0.004334766883403063, 0.012135639786720276, 0.024460917338728905, -0.04382921755313873, -0.050918202847242355, 0.01069039199501276, -0.015150495804846287, -0.014778854325413704, -0.012873711995780468, 0.01683666929602623, 0.00538126565515995, -0.008359921164810658, -0.005261855199933052, 0.06651093065738678, -0.033547282218933105, -0.032208990305662155, -0.0036052698269486427, 0.0005723661161027849, 0.006651834584772587, 0.06455454230308533, 0.004404011648148298, 0.014626696705818176, 0.0681292861700058, 0.01836795173585415, -0.061616770923137665, -0.02684534527361393, -0.013893833383917809, -0.004865305032581091, 0.008683194406330585, -0.08011196553707123, 0.004981656558811665, 0.056122299283742905, -0.004495092201977968, -0.02395974099636078, -0.05895701050758362, 0.031660616397857666, -0.03778502717614174, -0.042628996074199677, -0.03252232447266579, 0.04700646549463272, 0.020799340680241585, -0.0020939945243299007, -0.007840306498110294, -0.03947536647319794, 0.025084206834435463, 0.007814536802470684, 0.0011896645883098245, -0.053608912974596024, -0.02993272989988327, -0.00833218265324831, 0.011755445972084999, -0.002276594750583172, 0.0053810547105968, -0.01752557046711445, 0.03322816640138626, 0.027182219550013542, -0.04946675896644592, 0.036004576832056046, -0.0176287442445755, -0.03262053430080414, -0.02460559643805027, 0.01027423981577158, -0.0011247481452301145, -0.029987119138240814, -0.007882566191256046, 0.014263897202908993, 0.014131100848317146, 0.029535530135035515, 0.010531174950301647, 0.03482365980744362, 0.003982845228165388, -0.00112768798135221, 0.0069868783466517925, 0.025710273534059525, -0.03859512507915497, 0.019677337259054184, -0.012764346785843372, -0.03318827971816063, -0.021899372339248657, 0.020706478506326675, -0.024203171953558922, 0.010962276719510555, -0.026897817850112915, 0.02235502004623413, -0.051520369946956635, -0.013622559607028961, 0.013100327923893929, -0.005744921509176493, 0.037488143891096115, 0.032508108764886856, 0.03137531504034996, -0.015185926109552383, 0.01786426082253456, 0.028266727924346924, 0.04930028319358826, -0.028241705149412155, 0.03428903967142105, -0.011355588212609291, -0.013667738065123558, 0.00687915924936533, 0.041773658245801926, 0.01887994073331356, 0.009856030344963074, 0.010902239941060543, -0.013062676414847374, 0.019820580258965492, 0.02067435160279274, 0.04653012752532959, 0.009905492886900902, -0.022003890946507454, -0.03126167505979538, -0.0253254733979702, -0.022194696590304375, -0.03248231112957001, 0.005645615980029106, -0.03425298258662224, 0.0038468060083687305, -0.03772031515836716, -0.09402066469192505, 0.013235693797469139, 0.04370024427771568, -0.0004124142287764698, -0.011280635371804237, -0.02194811776280403, 0.006914294324815273, -0.03293004259467125, 0.024697264656424522, 0.06048133596777916, -0.07351616770029068, -0.015049286186695099, -0.019419502466917038, 0.01545644924044609, -0.008732843212783337, 0.04189017415046692, -0.07394354045391083, -0.013386789709329605, 0.010853704996407032, 0.0019091296708211303, -0.013654612004756927, -0.03016311302781105, -0.007814754731953144, 0.023222384974360466, -0.023174120113253593, 0.0065222615376114845, -0.025729861110448837, -0.017743563279509544, -0.019046634435653687, -0.02667510136961937, -0.00026338291354477406, -0.00009313650662079453, 0.0069303386844694614, 0.03759722411632538, -0.011944909580051899, 0.050421636551618576, -0.03577691316604614, 0.04245234280824661, 0.014055991545319557, 0.0012950107920914888, -0.008746922016143799, -0.04104720428586006, -0.01100126001983881, 0.004388418514281511, 0.024822941049933434, 0.0054184324108064175, -0.019734719768166542, -0.04301338642835617, -0.03170689940452576, -0.03259482607245445, 0.012192697264254093, -0.02806292288005352, -0.024906085804104805, 0.001094489241950214, 0.0524488128721714, 0.0021068057976663113, 0.0262740645557642, 0.003248953027650714, -0.04073350876569748, 0.06350674480199814, -0.06741417199373245, -0.040650252252817154, 0.0023203184828162193, -0.0622391477227211, 0.025637231767177582, 0.034171346575021744, 0.022515563294291496, -0.05952563136816025, 0.05038811266422272, 0.012398497201502323, 0.02057020738720894, 0.05268046632409096, -0.026102710515260696, 0.03489639237523079, -0.035768866539001465, -0.013641046360135078, -0.1003367006778717, -0.020248491317033768, 0.027863943949341774, -0.008658032864332199, -0.03837128356099129, 0.021966909989714622, -0.013842685148119926, 0.045492637902498245, -0.05604645609855652, -0.014343911781907082, 0.06377425789833069, -0.007068006321787834, 0.005887260194867849, 0.02291993610560894, -0.060654085129499435, 0.04525060951709747, 0.041664037853479385, -0.019425425678491592, -0.014871577732264996, 0.017739413306117058, 0.0496051087975502, 0.0009502043831162155, 0.048334721475839615, -0.030148543417453766, -0.015191173180937767, 0.07374852895736694, 0.017238564789295197, 0.019956983625888824, 0.03191513568162918, -0.007765046786516905, 0.04204430803656578, 0.02119389735162258, -0.007124684751033783, 0.011308431625366211, 0.046543292701244354, -0.00836243387311697, -0.05480048060417175, 0.046344105154275894, 0.004439350683242083, -0.011686633341014385, -0.03688168153166771, 0.07081671059131622, 0.005906598176807165, -0.017613207921385765, -0.03382521867752075, 0.01542575005441904, -0.047507140785455704, -0.02368510328233242, -0.039490845054388046, -0.006228600163012743, -0.04215335473418236, 0.06881188601255417, -0.0006718500517308712, -0.005593359004706144, 0.049995023757219315, -0.01795625314116478, 0.013425957411527634, 0.0072334809228777885, 0.07975530624389648, 0.06292376667261124, 0.04983260855078697, 0.03706846386194229, 0.061963971704244614, -0.03960752487182617, -0.03940742835402489, -0.003390830010175705, 0.016144299879670143, -0.008131545037031174, -0.03319920226931572, 0.01728922501206398, 0.06709422916173935, 0.032708365470170975, 0.05627420172095299, -0.029876694083213806, 0.01760995201766491, -0.011214114725589752, 0.033062662929296494, 0.007941504009068012, 0.03448183834552765, 0.01535372156649828, 0.014750486239790916, -0.0018055111868306994, -0.01048676110804081, 0.03432032838463783, -0.04245476797223091, -0.01439769845455885, 0.023405173793435097, 0.00836990773677826, 0.006700678262859583, -0.001360592432320118, 0.06130063161253929, 0.08764930814504623, -0.041110556572675705, -0.02137921191751957, -0.012134399265050888, 0.04859253019094467, 0.014996933750808239, 0.01157443504780531, -0.03185878321528435, -0.00937960110604763, -0.0017521429108455777, -0.015563183464109898, -0.012260084971785545, -0.01809653267264366, -0.01670190505683422, 0.030413951724767685, -0.005204763263463974, -0.009494547732174397, 0.024804433807730675, 0.0041081253439188, -0.0555771067738533, -0.033882834017276764, -0.034369777888059616, -0.026677042245864868, -0.03785862401127815, -0.0045279571786522865, 0.0293006282299757, -0.00948651134967804, -0.03853071853518486, -0.04557828605175018, 0.009845137596130371, -0.012463578023016453, -0.0056259348057210445, -0.038191523402929306, -0.023812638595700264, 0.019679594784975052, 0.017917774617671967, -0.02294575236737728, 0.014278391376137733, 0.054596494883298874, -0.002406671177595854, -0.027274876832962036, -0.031380169093608856, 0.038139209151268005, 0.042544927448034286, 0.025392919778823853, 0.040582239627838135, -0.07872650772333145, 0.022408343851566315, 0.028453931212425232, 0.022772539407014847, -0.06357467174530029, 0.025613263249397278, 0.016073456034064293, 0.002513250568881631, 0.05336788669228554, -0.019968455657362938, 0.012975351884961128, -0.02619979903101921, -0.028476789593696594, -0.0004322040476836264, 0.017883099615573883, 0.040006499737501144, -0.025080328807234764, 0.07891001552343369, 0.007949946448206902, 0.0018854821100831032, -0.03424115478992462, -0.015092195942997932, -0.02715085819363594, 0.014231092296540737, -0.014846176840364933, -0.0009367021848447621, -0.04964449629187584, -0.05254969373345375, -0.0002440076059428975, 0.012852437794208527, -0.04927412047982216, -0.05766473338007927, -0.006569999270141125, 0.011747791431844234, -0.023182548582553864, 0.0788063257932663, -0.044367291033267975, -0.02782892808318138, -0.006955241318792105, -0.03211917355656624, 0.006837671156972647, 0.03613167628645897, -0.002643078099936247, 0.0341133251786232, 0.02314729616045952, -0.04115753248333931, -0.029865220189094543, -0.0025469947140663862, 0.037604961544275284, 0.03531773015856743, -0.0025012472178786993, 0.03286614641547203 ]
[ -0.06749691069126129, -0.0007438313914462924, -0.01919104903936386, 0.023982524871826172, 0.029784176498651505, -0.07541370391845703, -0.035455118864774704, 0.00425523379817605, -0.0336671844124794, 0.006631018128246069, -0.0023940333630889654, -0.03556816279888153, 0.04330459609627724, -0.038182999938726425, 0.0732867419719696, 0.011580069549381733, -0.01266984362155199, -0.06220315396785736, 0.002835783176124096, 0.013578330166637897, -0.003503943793475628, 0.01752559095621109, -0.017522556707262993, -0.0596328005194664, -0.025745905935764313, 0.06284072250127792, 0.02099446952342987, -0.033345140516757965, 0.02456979639828205, -0.1586863398551941, 0.02885138802230358, 0.006822140887379646, 0.032052263617515564, -0.02562899701297283, -0.010649004951119423, 0.07915240526199341, -0.010777680203318596, 0.005844803526997566, -0.01605083979666233, 0.03077210672199726, 0.03003661334514618, 0.028669007122516632, -0.10215601325035095, -0.0321105420589447, 0.0806412473320961, -0.045364342629909515, 0.025809984654188156, -0.03169160708785057, -0.024294309318065643, -0.009531491436064243, -0.003642423776909709, 0.0018344399286434054, -0.006409215275198221, 0.009399224072694778, -0.0064625209197402, 0.009737344458699226, 0.05924725905060768, 0.06583062559366226, 0.011825031600892544, -0.03927053511142731, 0.0072350529953837395, -0.013056348077952862, -0.13529974222183228, 0.11197730153799057, -0.01817023754119873, 0.005947553087025881, -0.06425551325082779, -0.0019938312470912933, -0.00402374193072319, 0.06176000460982323, -0.006597761530429125, -0.03960598260164261, -0.03772133216261864, 0.018691089004278183, -0.01149205956608057, -0.050418026745319366, 0.03837710618972778, -0.006264869589358568, 0.06754641234874725, -0.030140629038214684, -0.024067657068371773, 0.007479427848011255, 0.0012887533521279693, -0.02374397963285446, -0.013426153920590878, -0.012193066999316216, 0.006407704669982195, 0.07702986150979996, 0.03793041408061981, -0.0035600292030721903, 0.0016613375628367066, -0.09029220789670944, 0.026379968971014023, 0.01065177470445633, -0.05414590612053871, -0.03243134915828705, 0.033088620752096176, -0.022992225363850594, -0.04137210175395012, 0.3897879719734192, -0.03359583392739296, -0.012083406560122967, -0.019376711919903755, 0.01728793978691101, 0.04618581384420395, -0.009636989794671535, -0.018804354593157768, -0.03628208115696907, 0.004408487118780613, -0.03153086081147194, -0.014230298809707165, -0.0010407473891973495, 0.07240216434001923, -0.06901060044765472, 0.004853771533817053, 0.0017937354277819395, -0.031642355024814606, 0.02671785280108452, 0.01732073910534382, -0.004148270469158888, -0.04688615724444389, -0.053809572011232376, 0.024628132581710815, 0.005085363518446684, 0.038033224642276764, 0.060369573533535004, 0.03446283936500549, 0.05760597810149193, 0.013915454037487507, -0.008981941267848015, 0.05170578509569168, -0.021777523681521416, -0.04867849126458168, -0.019226284697651863, -0.006415465846657753, 0.06352576613426208, -0.0028137299232184887, -0.00014983979053795338, 0.03575151041150093, 0.009525216184556484, 0.011754489503800869, -0.02380969747900963, 0.025997944176197052, 0.03280521184206009, -0.02201276831328869, 0.07105175405740738, -0.010469681583344936, -0.012955649755895138, -0.05972055718302727, -0.01723385415971279, 0.029317012056708336, 0.040052276104688644, -0.06686947494745255, -0.04596126079559326, 0.029494429007172585, 0.06907308846712112, 0.07983390241861343, -0.03961968794465065, -0.04341841861605644, 0.023851778358221054, 0.013023175299167633, -0.04879501089453697, -0.030545923858880997, 0.013042304664850235, -0.0033694796729832888, -0.0997394248843193, -0.041836515069007874, -0.014487886801362038, -0.03641318157315254, -0.07963765412569046, 0.022747492417693138, 0.007063941098749638, -0.038879379630088806, 0.026464153081178665, 0.007135723251849413, -0.04162738472223282, -0.01754695549607277, 0.028910335153341293, 0.07382109016180038, 0.035280145704746246, -0.02790655940771103, 0.015451780520379543, -0.04353099688887596, -0.0065401396714150906, -0.013334407471120358, -0.08264514803886414, -0.018316127359867096, -0.03592156246304512, -0.01576894521713257, -0.07510863989591599, 0.03371152654290199, 0.015272942371666431, 0.0019184937700629234, 0.04054028540849686, 0.018555855378508568, 0.038079164922237396, -0.0070965769700706005, -0.02060885727405548, -0.007792465854436159, -0.0426965206861496, 0.02199985645711422, 0.06297700107097626, 0.0065362039022147655, 0.013673778623342514, -0.059645406901836395, -0.009533986449241638, 0.038574427366256714, -0.019804101437330246, 0.04403282329440117, -0.02184123732149601, -0.07275368273258209, 0.016628168523311615, 0.045917414128780365, -0.009757857769727707, -0.0026679050642997026, -0.018143806606531143, -0.026409471407532692, 0.03334997221827507, 0.04763844609260559, 0.03288840502500534, -0.06383781135082245, -0.096011221408844, -0.08043559640645981, -0.33376437425613403, 0.011341146193444729, 0.019861415028572083, -0.02062408998608589, -0.013963403180241585, -0.05359574034810066, -0.022591225802898407, -0.01788139156997204, 0.020262517035007477, 0.035906001925468445, 0.10065845400094986, -0.009131986647844315, 0.08384428173303604, -0.09162583947181702, 0.07093501836061478, 0.03728518635034561, 0.013946760445833206, -0.019360652193427086, -0.04540054500102997, 0.013688436709344387, 0.0001430926495231688, -0.02878454513847828, -0.04334956780076027, -0.05531127750873566, -0.03521493077278137, -0.014768809080123901, 0.1092166006565094, 0.014266501180827618, 0.08516303449869156, -0.01447475329041481, 0.0594058521091938, 0.021390940994024277, -0.05395842716097832, -0.15000587701797485, 0.011814368888735771, 0.0266262236982584, 0.05508200451731682, 0.05276989936828613, 0.02882138453423977, 0.009708116762340069, -0.008243966847658157, 0.06212856248021126, -0.026566609740257263, -0.02704755589365959, 0.009552381001412868, -0.010311488062143326, 0.0029534492641687393, -0.05488501116633415, 0.030833367258310318, 0.0611773356795311, -0.0147131672129035, 0.049871865659952164, -0.0185947734862566, 0.058799829334020615, -0.043500758707523346, -0.008219193667173386, -0.09742234647274017, -0.0230980534106493, -0.0023482281249016523, -0.015553074888885021, 0.0274099912494421, 0.015552476048469543, 0.05176687240600586, -0.05063809081912041, -0.006144902668893337, 0.02608748897910118, 0.010971851646900177, -0.020130250602960587, 0.10249345749616623, 0.008688801899552345, -0.0026978827081620693, 0.05917493253946304, -0.05841045454144478, -0.0008879112428985536, 0.026812050491571426, 0.06729087233543396, 0.016512049362063408, 0.054560452699661255, 0.0462602823972702, -0.021430395543575287, 0.02268937975168228, 0.015077666379511356, 0.008930486626923084, -0.0211184024810791, 0.0009956412250176072, 0.04128493741154671, -0.03302648663520813, -0.026345498859882355, 0.046399760991334915, 0.029589759185910225, -0.02731003612279892, -0.0017677239375188947, 0.04472082108259201, 0.0011679981835186481, 0.03755280375480652, 0.05332581698894501, -0.21045532822608948, 0.024504955857992172, 0.05656708776950836, 0.03105604462325573, -0.0023656850680708885, -0.004043987952172756, 0.015858972445130348, -0.11193748563528061, -0.0677284300327301, -0.04402754455804825, 0.03220170736312866, 0.02195941098034382, 0.010895279236137867, -0.00970398634672165, 0.002536824671551585, -0.0040151141583919525, 0.09421391040086746, -0.002079267054796219, -0.00842480268329382, -0.042067352682352066, -0.025701390579342842, -0.05898476764559746, 0.15630385279655457, -0.006001937668770552, -0.0277678482234478, -0.03151283413171768, -0.003951989114284515, -0.020198391750454903, 0.012073344551026821, 0.03385316580533981, -0.0000404109523515217, 0.009988205507397652, 0.06197827681899071, -0.019098300486803055, 0.039046503603458405, -0.03673628345131874, -0.02670566737651825, 0.04222560673952103, 0.043330464512109756, 0.004782512318342924, 0.00023522537958342582, 0.08420480787754059, -0.05754050239920616, -0.023663122206926346, 0.02151336707174778, 0.01558330561965704, 0.01788368634879589, 0.008448218926787376, -0.03586756810545921, -0.008717548102140427, 0.014896239154040813, -0.016671786084771156, -0.0037038277368992567, 0.04294406622648239, 0.03491590917110443, 0.028700394555926323, 0.013785258866846561, -0.040230877697467804, 0.040978506207466125, 0.04591844975948334, 0.018225401639938354, -0.05617489665746689, 0.14225658774375916, 0.024736786261200905, -0.012604537419974804 ]
[ 0.0015537760918959975, -0.007277422584593296, 0.004351981449872255, 0.01628677174448967, 0.03374483436346054, 0.010888567194342613, -0.012133416719734669, 0.0028001281898468733, -0.018696483224630356, -0.030131688341498375, -0.014402613043785095, 0.006358617451041937, 0.001557868905365467, 0.020186135545372963, 0.04893549531698227, 0.028752150014042854, 0.008102336898446083, -0.015698963776230812, 0.022017953917384148, 0.010532905347645283, -0.013895952142775059, 0.05245661363005638, 0.019618738442659378, 0.018627574667334557, 0.03470546379685402, 0.020380834117531776, -0.08439217507839203, 0.02875286340713501, 0.03239701688289642, -0.1197969987988472, -0.03248058259487152, 0.007058239076286554, 0.006193848326802254, -0.005275819916278124, 0.02598930336534977, 0.04052780568599701, -0.009893861599266529, 0.0005848577129654586, -0.01648036763072014, 0.015638524666428566, -0.015343071892857552, 0.010841953568160534, -0.03959650546312332, 0.005279167089611292, -0.02467462047934532, -0.010417100973427296, -0.0071848491206765175, -0.005564289167523384, -0.0025289165787398815, -0.021465975791215897, -0.025865638628602028, 0.007072252221405506, -0.009573301300406456, 0.02473999187350273, -0.03364911675453186, 0.033072106540203094, 0.04848553612828255, 0.0002678312885109335, 0.011566316708922386, -0.030504336580634117, -0.012590599246323109, -0.006084034219384193, -0.03130699321627617, -0.01573200710117817, -0.03383522480726242, -0.02214343100786209, -0.021704528480768204, 0.0069999173283576965, 0.019331151619553566, -0.01858917623758316, -0.017389792948961258, -0.015736445784568787, -0.05198927968740463, -0.0032245232723653316, 0.009349496103823185, -0.023058751598000526, 0.013998686335980892, -0.04328550025820732, -0.0012233610032126307, 0.005736558698117733, -0.03225155547261238, 0.027752645313739777, 0.02367403171956539, 0.054134123027324677, 0.02129357121884823, -0.02031630650162697, 0.031469035893678665, -0.00872449018061161, 0.020653612911701202, -0.01619427278637886, -0.0028283754363656044, -0.05398648604750633, 0.031500063836574554, 0.033910367637872696, -0.0638214498758316, 0.00971333310008049, 0.018469592556357384, -0.05204883590340614, 0.01823444478213787, 0.8005804419517517, -0.008266502991318703, -0.03731932118535042, 0.019297190010547638, 0.014466666616499424, 0.06573028862476349, 0.027627458795905113, 0.022721949964761734, -0.06410115212202072, -0.0007412467966787517, -0.05389728769659996, 0.03973975405097008, -0.011465479619801044, 0.027614884078502655, 0.0011684149503707886, 0.033391986042261124, -0.005531422793865204, 0.013355322182178497, 0.019256094470620155, -0.009613326750695705, 0.000387219013646245, 0.0063958256505429745, -0.029401591047644615, 0.04186398163437843, 0.01971730776131153, -0.026166031137108803, -0.14901602268218994, -0.030879607424139977, -6.733849510728214e-33, -0.005318297538906336, -0.025773704051971436, 0.03297857940196991, -0.001777356374077499, 0.008606554940342903, 0.013202826492488384, -0.026419593021273613, -0.0141357546672225, -0.032413750886917114, -0.03778041526675224, -0.0018552563851699233, -0.032629624009132385, -0.0009105663048103452, 0.04589705169200897, 0.033863890916109085, -0.014337745495140553, 0.0013140799710527062, 0.04613726586103439, -0.005998492240905762, 0.012444458901882172, 0.03232656791806221, 0.02014905959367752, -0.0016483520157635212, 0.010653963312506676, -0.05189923942089081, 0.0055492292158305645, 0.023291846737265587, 0.012064223177731037, 0.00289961532689631, -0.04657121002674103, -0.04195011407136917, -0.0068504298105835915, 0.03083908185362816, -0.01603395864367485, -0.022063294425606728, -0.037433724850416183, -0.031944215297698975, 0.003490789793431759, -0.03660193458199501, 0.0073869675397872925, -0.006755167152732611, 0.053928155452013016, -0.04715564474463463, -0.042448826134204865, -0.03122718818485737, 0.026540258899331093, -0.05062665045261383, 0.055775273591279984, 0.009559250436723232, 0.03563931956887245, 0.03089897520840168, 0.014385058544576168, -0.015043203718960285, 0.011241304688155651, 0.002583172172307968, -0.006752508692443371, 0.007307788822799921, -0.021876992657780647, 0.05830395594239235, -0.05452117323875427, -0.008861792273819447, -0.017298197373747826, 0.042561087757349014, 0.034638117998838425, 0.04823156073689461, -0.012062185443937778, 0.02541157230734825, -0.0008729114779271185, 0.030260156840085983, 0.0135295819491148, -0.08532240986824036, 0.03048626147210598, -0.01663716323673725, -0.029337367042899132, 0.009352301247417927, -0.02416130341589451, -0.026893703266978264, -0.03808843344449997, 0.027206584811210632, 0.06902731209993362, 0.0012322957627475262, -0.017842914909124374, -0.026580967009067535, -0.05997107923030853, -0.019750505685806274, -0.0634571984410286, 0.025830676779150963, -0.01769176498055458, -0.021426668390631676, 0.018056577071547508, -0.00139187416061759, 0.026940006762742996, 0.03475366160273552, -0.016949523240327835, -0.0458182729780674, 7.207561979166087e-33, 0.019733507186174393, 0.05068293586373329, -0.020583005622029305, 0.014561804942786694, 0.014638650231063366, -0.0254813339561224, 0.04060283303260803, 0.004632095340639353, -0.027682101354002953, 0.03370571881532669, 0.013680074363946915, 0.023755792528390884, 0.009320913814008236, 0.06191987916827202, 0.03408397361636162, 0.040474873036146164, -0.0013732382794842124, 0.039986174553632736, 0.042317237704992294, 0.011233152821660042, -0.024610742926597595, 0.013395181857049465, -0.016092970967292786, -0.0036388637963682413, 0.001184996566735208, 0.03974851220846176, -0.007340156473219395, -0.00732979504391551, -0.024115126579999924, -0.01817626878619194, 0.0012447116896510124, -0.005718236323446035, -0.013446054421365261, -0.0007227238966152072, 0.02699470706284046, 0.020579321309924126, 0.023578310385346413, -0.032598305493593216, 0.02244185470044613, 0.016806837171316147, 0.0575871504843235, 0.02695763111114502, -0.016112683340907097, 0.013002350926399231, -0.01796410046517849, 0.009146458469331264, -0.004275340121239424, -0.000728256709408015, 0.01921793445944786, -0.011467103846371174, 0.00720709003508091, 0.01466331910341978, 0.03392957150936127, 0.01692580059170723, 0.02070368081331253, -0.0546550452709198, -0.013621380552649498, 0.07363434880971909, -0.06194141134619713, 0.009298219345510006, -0.046104948967695236, -0.005339657887816429, -0.006102503277361393, -0.017087137326598167, -0.019491292536258698, 0.018125904724001884, -0.06453464180231094, 0.006036732345819473, -0.036318812519311905, -0.06529466062784195, 0.029166726395487785, -0.007416194304823875, 0.01891954615712166, 0.034251101315021515, 0.02887422777712345, -0.012436560355126858, -0.01032268162816763, 0.008610479533672333, -0.025516504421830177, 0.005869957618415356, -0.005183481145650148, -0.017949510365724564, 0.009023632854223251, -0.008177208714187145, -0.05182622745633125, 0.026842916384339333, -0.03696664050221443, -0.004113673698157072, 0.02989724837243557, 0.012013053521513939, -0.007806921843439341, -0.028425170108675957, 0.027037082239985466, 0.012063147500157356, 0.07145227491855621, -1.2507578972531519e-8, -0.039791617542505264, -0.046200379729270935, -0.0010308997007086873, -0.005989920813590288, 0.04354486241936684, 0.032255567610263824, -0.004766207188367844, -0.02472204901278019, -0.0036738275084644556, 0.02879202738404274, 0.058895837515592575, -0.010979842394590378, 0.011253039352595806, 0.0062720696441829205, 0.027447734028100967, 0.00706920400261879, 0.00651804031804204, 0.0136036342009902, 0.02216438762843609, -0.044592201709747314, 0.0211373008787632, 0.06071052700281143, 0.003002811223268509, -0.00731981685385108, -0.036574576050043106, -0.02392289601266384, 0.016916483640670776, -0.10996925085783005, -0.04594598710536957, -0.021146008744835854, 0.051465246826410294, -0.003975374158471823, -0.06729380786418915, -0.003708526026457548, -0.03356841579079628, -0.05272187292575836, -0.00630470085889101, -0.003782444167882204, 0.010423542000353336, -0.013274947181344032, -0.026559101417660713, -0.01715044304728508, -0.015193752013146877, -0.048488885164260864, -0.007661642041057348, -0.025032365694642067, 0.0006516381981782615, 0.00041082134703174233, -0.01722078025341034, 0.01872764155268669, 0.03973085433244705, 0.013792195357382298, 0.02349470742046833, 0.025631261989474297, 0.015497204847633839, -0.0012787681771442294, 0.0007978552021086216, 0.03474655747413635, -0.0528576523065567, -0.01676396280527115, -0.011365371756255627, 0.0243400726467371, 0.042379267513751984, -0.021654359996318817 ]
vscode-poetry-python-interpreter
https://markhneedham.com/blog/2023/07/24/vscode-poetry-python-interpreter
false
2023-07-12 04:44:37
Redpanda: Viewing consumer group offsets from __consumer_offsets
[ "redpanda", "til" ]
[ "TIL" ]
https://docs.redpanda.com/docs/home[Redpanda^] supports consumer groups, which are sets of consumers that cooperate to consume data from topics. The consumers in a group are assigned a partition and they keep track of the last consumed offset in the https://docs.redpanda.com/docs/develop/consume-data/consumer-offsets/[`__consumer_offsets` topic]. I wanted to see how many messages had been consumed by a consumer group and that's what we'll explore in this post. My first thought was to query the `__consumer_offsets` topic using `rpk topic consume`. The following code gets three messages from this topic: [source, bash] ---- rpk topic consume __consumer_offsets --brokers localhost:9092 -n 3 ---- .Output [source, json] ---- { "topic": "__consumer_offsets", "key": "\u0000\u0002\u0000\u0019massaged-delays-consumer2", "value": "\u0000\u0003\u0000\u0008consumer\u0000\u0000\u0000\u0001\u0000\u0005range\u0000,rdkafka-5f35e588-5e24-42a0-b2e3-7913d85ac9c8\u0000\u0000\u0001\ufffd@s\ufffd\ufffd\u0000\u0000\u0000\u0001\u0000\u0003\u0000,rdkafka-5f35e588-5e24-42a0-b2e3-7913d85ac9c8\ufffd\ufffd\u0000\u0007rdkafka\u0000\u000c192.168.96.1\u0000\u0004\ufffd\ufffd\u0000\u0000\ufffd\ufffd\u0000\u0000\u0000\u001f\u0000\u0001\u0000\u0000\u0000\u0001\u0000\u000fmassaged-delays\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000#\u0000\u0000\u0000\u0000\u0000\u0001\u0000\u000fmassaged-delays\u0000\u0000\u0000\u0001\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000", "timestamp": 1689003484597, "partition": 0, "offset": 0 } { "topic": "__consumer_offsets", "key": "\u0000\u0001\u0000\u0019massaged-delays-consumer2\u0000\u000fmassaged-delays\u0000\u0000\u0000\u0000", "value": "\u0000\u0003\u0000\u0000\u0000\u0000\u0000\u0000\u0001Z\ufffd\ufffd\ufffd\ufffd\u0000\u0000\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd\ufffd", "timestamp": 1689003486581, "partition": 0, "offset": 1 } { "topic": "__consumer_offsets", "key": "\u0000\u0002\u0000\u0019massaged-delays-consumer2", "value": "\u0000\u0003\u0000\u0008consumer\u0000\u0000\u0000\u0002\ufffd\ufffd\ufffd\ufffd\u0000\u0000\u0001\ufffd@t\ufffdF\u0000\u0000\u0000\u0000", "timestamp": 1689003547718, "partition": 0, "offset": 2 } ---- I wanted to filter these messages to find the latest offset for the consumer group with the name `massaged-delays-consumer2`, but I couldn't for the life of me get that to work. My next thought was to use kcat, but that was even less successful: [source, bash] ---- kcat -C -b localhost:9092 -t __consumer_offsets -p 0 -e -q ---- .Output [source, bash] ---- consumerrange,rdkafka-5f35e588-5e24-42a0-b2e3-7913d85ac9c8�@s�,rdkafka-5f35e588-5e24-42a0-b2e3-7913d85ac9c8��rdkafka 192.168.96.1����massaged-delays#massaged-delays Z������������ consumer�����@t�F consumerrange,rdkafka-a7ffba78-1b21-4f34-bdd5-fe70fd5d43cf�@w0�,rdkafka-a7ffba78-1b21-4f34-bdd5-fe70fd5d43cf��rdkafka 192.168.96.1����massaged-delays#massaged-delays consumer�����@w� consumerrange7kafka-python-2.0.2-637f42b6-95f0-47e0-abe6-d4b27c02f1e3�E�̭7kafka-python-2.0.2-637f42b6-95f0-47e0-abe6-d4b27c02f1e3��kafka-python-2.0.2 notifications! 192.168.96.1��' consumer�����E�� consumerrange7kafka-python-2.0.2-d0841fce-363c-4683-b285-7e46d73b5a32�E���7kafka-python-2.0.2-d0841fce-363c-4683-b285-7e46d73b5a32��kafka-python-2.0.2 notifications! 192.168.96.1��' consumer�����E�6� consumerrange7kafka-python-2.0.2-d1101589-bd3e-4270-8b70-f1fe8ca88595�E�Y�7kafka-python-2.0.2-d1101589-bd3e-4270-8b70-f1fe8ca88595��kafka-python-2.0.2 notifications! 192.168.96.1��' consumer�����E� consumerrange7kafka-python-2.0.2-f709bfa7-d592-4ebb-9c87-9cea6ff43c91�E�o�7kafka-python-2.0.2-f709bfa7-d592-4ebb-9c87-9cea6ff43c91��kafka-python-2.0.2 notifications! 192.168.96.1��' consumerrange7kafka-python-2.0.2-72b0f695-03b0-461f-885b-d2f37efaea0e�E���7kafka-python-2.0.2-72b0f695-03b0-461f-885b-d2f37efaea0e��kafka-python-2.0.2 notifications! 192.168.96.1��' consumerrange7kafka-python-2.0.2-e3a53b7d-c0a2-4db7-b8d7-f9b58d2bfba5�F�@�7kafka-python-2.0.2-e3a53b7d-c0a2-4db7-b8d7-f9b58d2bfba5��kafka-python-2.0.2 notifications! 192.168.96.1��' consumer�����F�� consumerrange7kafka-python-2.0.2-2f06ad87-2ddd-4733-9be6-ba43370d26ec�I<7kafka-python-2.0.2-2f06ad87-2ddd-4733-9be6-ba43370d26ec��kafka-python-2.0.2 notifications! 192.168.96.1��' consume�����IE�� consumer range7kafka-python-2.0.2-8f74599d-8e57-4836-beef-318b23752144�IG�7kafka-python-2.0.2-8f74599d-8e57-4836-beef-318b23752144��kafka-python-2.0.2 notifications! 192.168.96.1��' consumer �����IJ�) consumer range7kafka-python-2.0.2-f01cf447-0066-437b-8654-c0be65b00a57�IK�7kafka-python-2.0.2-f01cf447-0066-437b-8654-c0be65b00a57��kafka-python-2.0.2 notifications! ---- I called upon ChatGPT, which pointed me to the `rpk group command`, which is exactly what we need. [NOTE] ==== ChatGPT made up some completely random parameters for `rpk group`, but hopefully this post will be used for the training of future models! ==== We can list the consumer groups by running the following command: [source, bash] ---- rpk group list ---- .Output [source, text] ---- BROKER GROUP 0 demo-group 0 demo-group2 0 demo-group4 0 demo-group5 0 demo-group6 0 demo-group7 0 demo-group8 0 demo-group9 0 demo-group91 0 demo-group92 0 demo-group93 0 demo-group94 0 demo-group95 0 events-consumer-group 0 massaged-delays-consumer 0 massaged-delays-consumer2 0 massaged-delays-consumer3 0 massaged-delays-consumer4 ---- I hope you like my excellent consumer group naming convention! Next, let's check what's happening with `massaged-delays-consumer4`: [source, bash] ---- rpk group describe massaged-delays-consumer4 ---- .Output [source, text] ---- GROUP massaged-delays-consumer4 COORDINATOR 0 STATE Empty BALANCER MEMBERS 0 TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG MEMBER-ID CLIENT-ID HOST massaged-delays 0 165 1384 1219 ---- From this output, we learn that there are 1,384 messages in this topic and only 165 have been consumed by the consumer group. We better get on it!
In this post, we're going to learn how to find the latest offset for a consumer group when using Redpanda.
uploads/2023/07/redpanda-banner.png
[ 0.015017994679510593, -0.03408374264836311, -0.0055767507292330265, 0.04009481519460678, 0.07251967489719391, 0.023485153913497925, 0.0061235385946929455, 0.0568050853908062, -0.018646404147148132, 0.02286207117140293, -0.015529610216617584, 0.007004329469054937, -0.051608480513095856, 0.016586067155003548, 0.007296343799680471, 0.0702255591750145, 0.07725220173597336, -0.00256059761159122, 0.03203544393181801, 0.003198350081220269, 0.052959442138671875, 0.028543878346681595, -0.013973386958241463, 0.009172121062874794, 0.021359216421842575, 0.008349280804395676, -0.014204517938196659, 0.01178800966590643, -0.061393145471811295, -0.01136157289147377, 0.024177858605980873, 0.024021774530410767, 0.012195258401334286, 0.024150066077709198, 0.035557761788368225, -0.003992204088717699, -0.034176960587501526, -0.005870356690138578, -0.00015249481657519937, 0.036180466413497925, -0.039540547877550125, 0.0014619241701439023, -0.031553685665130615, 0.03315360099077225, -0.013904883526265621, 0.03837236016988754, -0.06427468359470367, 0.009741133078932762, -0.02738470397889614, 0.02739420346915722, -0.07090913504362106, 0.025966107845306396, -0.009545812383294106, 0.00041635127854533494, 0.020455533638596535, 0.05171522498130798, 0.0017030808376148343, -0.06140832602977753, 0.025871064513921738, -0.031546711921691895, 0.032096680253744125, -0.047870293259620667, 0.005071044433861971, 0.005054958630353212, 0.009015223011374474, -0.018120793625712395, 0.018241427838802338, 0.05034218356013298, -0.016593482345342636, -0.037468984723091125, -0.027916986495256424, 0.023552173748612404, -0.027459431439638138, 0.03157707676291466, 0.0013086751569062471, -0.043172236531972885, -0.012000855058431625, 0.041448622941970825, 0.011011756025254726, 0.05267181620001793, -0.049537837505340576, 0.009288555011153221, -0.030523544177412987, 0.02989375963807106, -0.019277425482869148, -0.06314998865127563, -0.05098745971918106, -0.030923746526241302, -0.04719104617834091, 0.05631459876894951, -0.0066790031269192696, -0.016017362475395203, 0.006754195783287287, 0.022309625521302223, -0.04304010793566704, -0.017758656293153763, 0.01702285371720791, -0.004067440051585436, -0.005175168160349131, -0.009016541764140129, -0.0336683951318264, -0.011723542585968971, 0.024904990568757057, 0.03692179545760155, -0.031958792358636856, -0.016613120213150978, -0.04722213000059128, -0.017402788624167442, -0.013345744460821152, -0.0000411055916629266, -0.014394511468708515, 0.026013463735580444, -0.027639025822281837, 0.008572489023208618, -0.08504786342382431, 0.07955965399742126, 0.005492211319506168, -0.04293688386678696, 0.024410009384155273, 0.01048188004642725, 0.07170146703720093, 0.06115047633647919, 0.025101879611611366, 0.07711180299520493, -0.011067312210798264, 0.006157504860311747, -0.010528950951993465, 0.024310998618602753, -0.01871538907289505, -0.06176311895251274, 0.0007533046300522983, 0.08230243623256683, 0.02153470739722252, 0.009575764648616314, -0.00238167610950768, 0.0017679985612630844, 0.0036302083171904087, 0.00222983886487782, 0.09276846051216125, 0.015823600813746452, 0.017158590257167816, -0.04350309446454048, -0.013324907049536705, -0.008940654806792736, 0.013473177328705788, 0.02185690402984619, -0.0008666213252581656, -0.042932674288749695, -0.057564251124858856, 0.007937004789710045, 0.01575111784040928, 0.011782878078520298, 0.07637482136487961, -0.006755055859684944, 0.0014015695778653026, 0.04189924895763397, -0.001121245208196342, 0.004876253195106983, -0.009480150416493416, -0.00902867317199707, 0.019778314977884293, 0.01961098238825798, 0.011529497802257538, 0.04151025414466858, 0.01559365913271904, -0.028291407972574234, 0.012232600711286068, 0.0516633577644825, -0.017196020111441612, 0.035125620663166046, -0.052685752511024475, -0.06305745989084244, 0.048455942422151566, -0.03713012486696243, -0.0015575881116092205, -0.002449838211759925, 0.0726395919919014, 0.04808774217963219, -0.006533883046358824, -0.0006882280576974154, -0.06671818345785141, 0.04148877412080765, 0.016117578372359276, 0.020241061225533485, 0.010493398644030094, -0.001107271877117455, 0.08528394252061844, 0.02489570714533329, -0.014300614595413208, 0.029445720836520195, -0.09836231172084808, -0.046938207000494, -0.010367960669100285, -0.0060723647475242615, 0.0646626427769661, -0.060305897146463394, 0.02905980497598648, 0.058801691979169846, 0.06311105936765671, 0.02439473755657673, -0.010166971944272518, 0.014272956177592278, 0.04136614501476288, -0.07484163343906403, -0.06131501495838165, 0.04886145889759064, 0.002791216131299734, -0.014304419048130512, -0.017900219187140465, 0.0038136516232043505, -0.05150020867586136, 0.02063468098640442, 0.015123804099857807, -0.04228011891245842, 0.04670920595526695, -0.024979032576084137, 0.04257052019238472, -0.010449867695569992, 0.03770053759217262, -0.02576468698680401, 0.019662875682115555, 0.0036775213666260242, -0.024036724120378494, -0.0008129598572850227, -0.027095984667539597, 0.11012520641088486, 0.06312733143568039, 0.021917561069130898, -0.0012170815607532859, 0.03605809435248375, 0.0011764515656977892, -0.03344454988837242, 0.022014020010828972, -0.02567397803068161, -0.017976729199290276, 0.010479194112122059, -0.05362173914909363, -0.014887637458741665, 0.01205073855817318, -0.04911187291145325, -0.009453215636312962, 0.03918985277414322, -0.010010714642703533, 0.030727433040738106, 0.0038897970225661993, -0.013268869370222092, -0.003677195170894265, -0.03886404260993004, -0.0764903649687767, 0.01779458113014698, 0.00581985991448164, 0.00020647700875997543, 0.026029588654637337, -0.06309529393911362, -0.007438231725245714, -0.005204575136303902, -0.01505260355770588, 0.022423749789595604, 0.045125167816877365, 0.07220734655857086, -0.01893337443470955, 0.05573393777012825, -0.0103539377450943, -0.019112728536128998, -0.03522423654794693, -0.07066074013710022, -0.022074583917856216, 0.00026769176474772394, -0.007596280425786972, 0.016743531450629234, 0.04708600044250488, -0.00817742757499218, 0.00415344862267375, 0.014268848113715649, 0.017907623201608658, -0.013644606806337833, 0.04513319209218025, -0.0018063110765069723, -0.003068479709327221, -0.03773517161607742, -0.03816799819469452, 0.04260127991437912, -0.0331985168159008, -0.024803707376122475, 0.015085911378264427, -0.05378332734107971, 0.04597536846995354, -0.03284355252981186, -0.025548189878463745, 0.01786193624138832, 0.03460628166794777, 0.0025665860157459974, 0.008681025356054306, -0.0011239747982472181, 0.07021311670541763, 0.02549096941947937, -0.015770547091960907, 0.04105917364358902, 0.014149438589811325, 0.0364714041352272, -0.0277826189994812, 0.01363340113312006, 0.05562182143330574, -0.018256984651088715, 0.0066885557025671005, -0.0768176019191742, 0.01855037361383438, -0.01609843596816063, -0.2597235143184662, 0.032236695289611816, 0.0015660159988328815, -0.015834541991353035, 0.029125910252332687, -0.01116958912461996, 0.020119551569223404, -0.03353884443640709, 0.004322895780205727, 0.011919553391635418, 0.018248900771141052, -0.05260493606328964, 0.012778114527463913, 0.018458740785717964, -0.003782372921705246, 0.018342627212405205, -0.00302819418720901, -0.03703923523426056, -0.006916732527315617, 0.02525262162089348, 0.019741162657737732, -0.07707130908966064, -0.010122683830559254, 0.04632647708058357, 0.04314317926764488, 0.022948667407035828, -0.0654735416173935, 0.02096015214920044, -0.03659559786319733, -0.010359619744122028, -0.003681949572637677, -0.020917575806379318, -0.020518900826573372, -0.015714386478066444, -0.009737559594213963, -0.05380484461784363, 0.04757492616772652, 0.005640051327645779, -0.0002817309577949345, 0.027532782405614853, -0.022818326950073242, -0.0314687117934227, 0.014490056782960892, -0.009258841164410114, 0.055413272231817245, 0.05086674913764, -0.07027270644903183, -0.042183343321084976, -0.03702592849731445, 0.06721429526805878, -0.013470620848238468, -0.07595685869455338, -0.025313764810562134, 0.021059734746813774, -0.015054113231599331, -0.02352803200483322, -0.03177957981824875, -0.0021221106871962547, -0.016936900094151497, 0.0068272314965724945, -0.005251680035144091, -0.03590553253889084, -0.011336101219058037, -0.03648599982261658, -0.05523232743144035, -0.05101940035820007, -0.0885901227593422, 0.012195136398077011, 0.058883797377347946, 0.011986523866653442, -0.05688820034265518, 0.004605761729180813, -0.022813525050878525, -0.10958635807037354, -0.01864134520292282, -0.050378549844026566, -0.025152791291475296, 0.032595179975032806, 0.005256689619272947, 0.061387863010168076, -0.037573572248220444, -0.013742354698479176, -0.015614045783877373, -0.008793817833065987, 0.02686818689107895, -0.031411312520504, 0.007337779738008976, -0.02497207187116146, -0.016053330153226852, -0.010056089609861374, 0.04923303425312042, -0.0530465729534626, -0.04324020817875862, -0.004614871460944414, 0.02341184951364994, 0.02045590616762638, -0.018905697390437126, 0.030797556042671204, -0.01335307490080595, 0.04826431721448898, 0.03473041579127312, -0.04664849862456322, 0.00652256328612566, -0.07651587575674057, -0.0470610186457634, -0.006584934890270233, -0.04448910802602768, 0.002322565531358123, 0.023954082280397415, 0.009465872310101986, 0.004581153858453035, -0.026914747431874275, 0.003947559744119644, -0.056736305356025696, -0.01482185535132885, 0.0011318005854263902, 0.008392619900405407, 0.04687049984931946, 0.049745168536901474, -0.02791772224009037, -0.029207292944192886, 0.010366085916757584, 0.009473864920437336, -0.010163509286940098, -0.051798801869153976, -0.006119889672845602, -0.010108958929777145, -0.003256719559431076, -0.00880227517336607, 0.026531029492616653, -0.013492969796061516, -0.0072959368117153645, 0.032383158802986145, -0.01778171956539154, 0.035569339990615845, -0.029914608225226402, -0.053607866168022156, -0.013367068953812122, 0.004109219182282686, 0.03444758802652359, -0.02254040725529194, 0.014694815501570702, 0.013280190527439117, 0.05091684311628342, 0.05218758434057236, -0.004853804130107164, 0.0500226765871048, 0.009592264890670776, 0.023283112794160843, -0.015322377905249596, 0.0013566277921199799, -0.030075721442699432, 0.020703252404928207, -0.009470238350331783, -0.023362405598163605, -0.008556647226214409, 0.0485018715262413, 0.009451093152165413, -0.03177286684513092, -0.045010097324848175, 0.015754399821162224, -0.06098364666104317, -0.0013698755064979196, -0.023114727810025215, 0.0054410784505307674, 0.03123089112341404, -0.017890391871333122, 0.0068159750662744045, 0.021938813850283623, -0.026904772967100143, 0.0037624938413500786, 0.0013967010891065001, -0.006960398517549038, 0.05593003332614899, 0.005289745982736349, -0.0012128223897889256, 0.023008909076452255, 0.015769844874739647, -0.0006670162547379732, -0.00688849575817585, -0.007106412667781115, -0.0016275979578495026, 0.03036295622587204, -0.011603500694036484, 0.045564014464616776, 0.06969922035932541, -0.02507885918021202, 0.011772526428103447, -0.02285040356218815, -0.02170182578265667, 0.014609412290155888, 0.010584451258182526, -0.052546389400959015, 0.0008935496443882585, -0.013978583738207817, -0.08499952405691147, 0.0314907468855381, 0.026751024648547173, 0.016375813633203506, -0.01610581763088703, -0.009567415341734886, 0.042795330286026, -0.035485658794641495, 0.01321592926979065, 0.05689757317304611, -0.05984145402908325, 0.039645709097385406, 0.0037621124647557735, -0.005073205102235079, 0.025666937232017517, -0.01306541170924902, -0.043440092355012894, -0.008294185623526573, -0.023609431460499763, 0.03681712597608566, -0.014227130450308323, -0.02226141095161438, -0.028788389638066292, 0.030375074595212936, 0.00868884939700365, 0.007034716196358204, -0.012148301117122173, 0.00039614475099369884, 0.006223367061465979, -0.014253612607717514, 0.021192489191889763, 0.006690334063023329, -0.038855575025081635, -0.010601520538330078, -0.025203807279467583, 0.002740398747846484, -0.03786855936050415, 0.03678646683692932, 0.026643352583050728, -0.058282963931560516, 0.002131456509232521, -0.06629049777984619, -0.01657412014901638, -0.04366415739059448, 0.06702794134616852, -0.03317718580365181, -0.02174573950469494, -0.023033929988741875, 0.017589349299669266, -0.05469532310962677, 0.026035169139504433, 0.008608191274106503, 0.00045322865480557084, 0.0031495201401412487, 0.05089187994599342, 0.006159969139844179, 0.008513366803526878, -0.05083907023072243, -0.0019048360409215093, 0.06484968960285187, -0.00972883403301239, -0.037427593022584915, -0.00828510895371437, -0.05518338456749916, -0.006250409409403801, 0.02810136042535305, -0.0018425488378852606, -0.025178002193570137, 0.05128004774451256, 0.0419011227786541, 0.026498572900891304, 0.0523802787065506, -0.005152878817170858, 0.007290353998541832, -0.020559120923280716, 0.016823474317789078, -0.06884151697158813, 0.011306672357022762, 0.01739329844713211, 0.009710400365293026, 0.003038344904780388, -0.008071791380643845, -0.07830245792865753, 0.032313235104084015, -0.07081355154514313, -0.03535137698054314, 0.01693015731871128, -0.021982967853546143, 0.025123586878180504, 0.016616281121969223, -0.05967577546834946, -0.0023706115316599607, 0.047435369342565536, -0.04262761399149895, -0.02591816894710064, -0.03268790617585182, 0.06328146159648895, -0.0032782882917672396, 0.018416468054056168, -0.03341932222247124, -0.06074407324194908, 0.07047279924154282, 0.00809277594089508, 0.010069098323583603, 0.06368304044008255, -0.036901116371154785, 0.01980852708220482, 0.03585106134414673, -0.011252310127019882, 0.025679146870970726, 0.02011476643383503, -0.02801387570798397, -0.04332413151860237, 0.034404460340738297, -0.009698133915662766, -0.007594242226332426, -0.039250537753105164, 0.10227342694997787, 0.02099829912185669, -0.04739797115325928, -0.07243172824382782, 0.032717861235141754, -0.040810562670230865, -0.027422413229942322, -0.0056601171381771564, 0.034481532871723175, -0.011093244887888432, 0.07398387789726257, -0.022821929305791855, 0.0356605164706707, 0.06907597184181213, 0.00828477367758751, -0.014502689242362976, 0.04112488776445389, 0.09601689875125885, 0.09203878790140152, 0.019456638023257256, -0.00920162908732891, 0.04725176468491554, -0.04963114857673645, -0.03616312891244888, -0.016348324716091156, -0.024183496832847595, -0.03783150017261505, -0.008439455181360245, -0.0009713546605780721, 0.07083962112665176, -0.029050111770629883, 0.0739717185497284, -0.04417819157242775, 0.021617941558361053, 0.027327338233590126, 0.01457204669713974, 0.026781395077705383, 0.03519323468208313, -0.03443126380443573, 0.057417940348386765, -0.0020846128463745117, -0.025997472926974297, 0.025557443499565125, 0.01663256622850895, -0.038010042160749435, 0.010139679536223412, -0.016204096376895905, 0.016430608928203583, 0.022379135712981224, 0.04361545667052269, 0.06723613291978836, -0.013751544989645481, -0.0040389071218669415, -0.022440845146775246, -0.004398212302476168, -0.009035116992890835, 0.023560676723718643, -0.021691620349884033, 0.014531304128468037, -0.01282347273081541, -0.03232286125421524, -0.022735539823770523, -0.03943604603409767, -0.025978997349739075, 0.011007754132151604, -0.020781230181455612, 0.04845336079597473, 0.01592937298119068, -0.020365674048662186, -0.07665569335222244, -0.03474022075533867, -0.08290529251098633, -0.028470952063798904, -0.03998264670372009, 0.010535812005400658, 0.018602950498461723, 0.006081715226173401, -0.019121555611491203, -0.05120740458369255, -0.0308530256152153, -0.022513089701533318, 0.01646599918603897, -0.05665843188762665, -0.0177582036703825, 0.031256336718797684, -0.00142430211417377, 0.02425350807607174, 0.03490445017814636, 0.07953278720378876, 0.022338800132274628, 0.008550037629902363, -0.02310594730079174, 0.02596614882349968, 0.033819716423749924, 0.01343692559748888, -0.0008622876484878361, -0.07238532602787018, 0.02319484017789364, 0.024658629670739174, 0.0023554686922580004, -0.07014130800962448, -0.005402808543294668, 0.020831294357776642, -0.013576899655163288, 0.05141705647110939, -0.025866564363241196, 0.02652389369904995, 0.0029677599668502808, -0.023549925535917282, -0.029112301766872406, 0.002846620511263609, 0.024662954732775688, -0.006050629075616598, 0.08604058623313904, 0.044985607266426086, -0.025695886462926865, -0.0156637541949749, 0.013028989546000957, -0.04078959301114082, 0.003774697193875909, -0.06919636577367783, 0.013721870258450508, -0.038219302892684937, -0.062413256615400314, 0.009028802625834942, 0.019836287945508957, -0.02776469476521015, -0.030491720885038376, 0.04759865254163742, 0.011572996154427528, -0.006181070581078529, 0.0024971147067844868, -0.061128050088882446, -0.00431619118899107, -0.00472552515566349, -0.04806483909487724, -0.03624522686004639, 0.022298447787761688, -0.008785726502537727, 0.00013207097072154284, 0.0023102134000509977, -0.04889950156211853, -0.0026219512801617384, -0.018298694863915443, 0.0501069650053978, 0.08020216226577759, -0.00850480142980814, -0.016132213175296783 ]
[ -0.03646443411707878, 0.0002993362140841782, -0.05324920639395714, -0.0010586753487586975, 0.06353338062763214, -0.06659964472055435, 0.011516368016600609, 0.03658347204327583, -0.007973759435117245, -0.022371593862771988, 0.016211317852139473, -0.01928776130080223, -0.004191142972558737, -0.023000838235020638, 0.0672139823436737, -0.01714165322482586, 0.005563973914831877, -0.0602947436273098, -0.009063128381967545, 0.03443712368607521, 0.026048388332128525, -0.057884275913238525, -0.03000064194202423, -0.0012096405262127519, 0.03771800920367241, 0.02693857066333294, 0.016359684988856316, -0.06698969751596451, -0.03676651418209076, -0.1918434351682663, -0.0026730543468147516, -0.016783904284238815, 0.048828765749931335, 0.00944720022380352, 0.040388114750385284, 0.02985994890332222, 0.007368255406618118, -0.0035853872541338205, 0.012889024801552296, 0.03916038200259209, -0.005435539875179529, 0.018629170954227448, -0.04553298279643059, -0.04643767327070236, 0.011207658797502518, 0.007748794741928577, -0.029272673651576042, 0.0038471941370517015, 0.017802970483899117, -0.014988328330218792, -0.05053902044892311, 0.013890649192035198, -0.005006288178265095, 0.011151597835123539, 0.02467924915254116, 0.02622360922396183, 0.050417035818099976, 0.010437586344778538, 0.04757010191679001, -0.012081742286682129, 0.02352917194366455, -0.003438697662204504, -0.17313997447490692, 0.09503783285617828, 0.006133297458291054, 0.04972416162490845, -0.019155172631144524, 0.01676934026181698, -0.022492561489343643, 0.06062044948339462, -0.02037634700536728, -0.03809775784611702, -0.03435696288943291, 0.025852954015135765, -0.009317164309322834, -0.005014511756598949, 0.025042278692126274, 0.01933487318456173, 0.012926075607538223, -0.027862511575222015, -0.045613449066877365, 0.044965870678424835, -0.037472356110811234, -0.04360288009047508, -0.04758555442094803, -0.037104785442352295, 0.004739768337458372, 0.051133014261722565, 0.023561373353004456, 0.03496360778808594, 0.015769286081194878, 0.003569197142496705, 0.029639992862939835, 0.0034887283109128475, -0.12005700170993805, -0.018573159351944923, -0.02154705673456192, 0.006787706632167101, -0.0014346822863444686, 0.41750502586364746, -0.0019025602377951145, -0.009124868549406528, 0.05297427996993065, 0.01753944158554077, 0.019830437377095222, -0.004161919932812452, -0.01110993605107069, -0.006732840556651354, -0.0011381864314898849, -0.008405615575611591, -0.009015204384922981, 0.013708042912185192, 0.06902841478586197, -0.04670032113790512, 0.06537022441625595, -0.00023422233061864972, 0.06395154446363449, 0.00303281145170331, 0.03958536311984062, 0.010880054906010628, -0.020709965378046036, -0.004530795384198427, 0.054931819438934326, 0.012821952812373638, 0.025682950392365456, -0.012187667191028595, 0.061228957027196884, 0.051204606890678406, 0.00391611410304904, 0.02165476232767105, 0.008291796781122684, -0.04290268197655678, -0.08692533522844315, 0.04842293635010719, 0.011301744729280472, 0.03768957406282425, 0.05384311079978943, -0.04330151155591011, 0.014461441896855831, 0.02934134565293789, -0.0651513934135437, -0.014927292242646217, 0.024706192314624786, -0.04621501266956329, -0.027451349422335625, 0.14920218288898468, 0.03302702680230141, -0.011955699883401394, -0.04708100110292435, -0.02027718722820282, 0.015654761344194412, 0.04526953771710396, 0.002995725953951478, -0.10073770582675934, -0.03919723257422447, 0.022131027653813362, 0.11886278539896011, -0.039272014051675797, -0.04018675535917282, -0.007136818021535873, 0.008966576308012009, -0.04795297607779503, -0.029854394495487213, 0.06307000666856766, 0.055487580597400665, -0.09938406199216843, -0.008451646193861961, 0.02352392114698887, -0.004366256296634674, -0.07146645337343216, 0.012299717403948307, 0.04332585260272026, -0.04563441500067711, -0.011954918503761292, 0.04246794059872627, -0.008086246438324451, -0.0382530651986599, 0.03233492374420166, 0.033477261662483215, -0.033889636397361755, -0.038763031363487244, 0.019421380013227463, -0.06672036647796631, -0.0030845270957797766, -0.002566414652392268, -0.08054858446121216, -0.05752379819750786, 0.002466486766934395, -0.008213638328015804, -0.022812580689787865, -0.05351852998137474, -0.0725209042429924, -0.06090410426259041, 0.09344441443681717, -0.02480463497340679, -0.03176203742623329, -0.0008468774612993002, 0.025301340967416763, -0.015491136349737644, -0.0378444530069828, 0.017509883269667625, 0.01510993018746376, -0.02969251573085785, 0.026275265961885452, -0.051504287868738174, 0.04133642464876175, 0.016993531957268715, 0.012890956364572048, 0.09848351776599884, -0.013275385834276676, -0.01881481148302555, 0.0034216109197586775, -0.02721884287893772, 0.041314028203487396, 0.024008754640817642, -0.04326435923576355, 0.015246162191033363, 0.0028226193971931934, 0.006403276696801186, 0.025652902200818062, 0.0154875498265028, -0.031712524592876434, -0.005504576954990625, -0.3699382543563843, -0.033550020307302475, -0.007478365208953619, 0.014463524334132671, -0.03087325394153595, -0.03766784071922302, 0.02931743487715721, 0.001274417620152235, 0.02048107050359249, 0.06563612818717957, 0.04795682802796364, -0.011322448961436749, 0.0027963249012827873, -0.021238604560494423, 0.022915076464414597, 0.042922284454107285, -0.023008760064840317, -0.03189394623041153, -0.039833951741456985, 0.023868873715400696, -0.01790783368051052, -0.03999890014529228, -0.019710393622517586, -0.027033254504203796, -0.008503074757754803, 0.007169079501181841, 0.1043110117316246, 0.05337442457675934, -0.009668996557593346, -0.04091884568333626, 0.07513875514268875, 0.028419489040970802, -0.024905119091272354, -0.04005276411771774, -0.02061544917523861, 0.006153103429824114, -0.0333927683532238, 0.017799844965338707, -0.009421653114259243, -0.0344962403178215, -0.06985314935445786, 0.034859880805015564, -0.03696855530142784, -0.0650915876030922, -0.018372992053627968, 0.002420776756480336, -0.024018684402108192, -0.00763619365170598, 0.016058895736932755, 0.047157470136880875, -0.01069716364145279, 0.0416833758354187, 0.006653900723904371, 0.05588654428720474, -0.018797418102622032, -0.015997156500816345, -0.05049318075180054, -0.004438393749296665, -0.03195264935493469, 0.01136663556098938, 0.007699456997215748, 0.03835255652666092, 0.030586116015911102, -0.0215676911175251, -0.022715730592608452, 0.01424491312354803, -0.04828862473368645, 0.022424427792429924, 0.039203837513923645, 0.00619284063577652, -0.029662499204277992, 0.09757690876722336, -0.03686553239822388, -0.0017202446470037103, 0.02311977744102478, 0.034122284501791, -0.003947901073843241, -0.02155536599457264, -0.008267461322247982, 0.0032798717729747295, 0.05059986934065819, 0.006762302480638027, 0.05163688585162163, 0.0032482491806149483, 0.02385961078107357, 0.052100684493780136, -0.0225539393723011, -0.021771157160401344, 0.07879969477653503, -0.0004599183448590338, -0.008309435099363327, 0.012693164870142937, -0.057256463915109634, -0.08529534935951233, 0.028878603130578995, 0.011099016293883324, -0.2528385818004608, 0.05186948552727699, 0.006898525170981884, 0.031960271298885345, 0.00950951874256134, 0.035909127444028854, 0.0013229282340034842, -0.0243193581700325, -0.01624228246510029, -0.0023828439880162477, 0.03481147065758705, 0.10330000519752502, -0.008257959969341755, -0.02311568148434162, 0.02400415949523449, 0.00203309184871614, 0.03231244161725044, 0.02353791519999504, 0.019768327474594116, -0.015277920290827751, 0.0007042382494546473, -0.010435686446726322, 0.16411995887756348, 0.0349869467318058, -0.006751451175659895, 0.012503265403211117, -0.03169485181570053, 0.03928649425506592, 0.02089175023138523, 0.033498331904411316, -0.01278571505099535, 0.00202408479526639, 0.07617651671171188, -0.03298988565802574, 0.015989942476153374, -0.05188188701868057, 0.01182294636964798, -0.003955152351409197, 0.02097933180630207, -0.0005862989346496761, -0.028918711468577385, 0.018365100026130676, -0.036918818950653076, -0.002984385471791029, 0.06590414047241211, 0.01517935935407877, -0.011344646103680134, -0.07934154570102692, -0.029619107022881508, 0.0030618044547736645, -0.00953104067593813, -0.05948350206017494, -0.010432777926325798, 0.01856198161840439, 0.04498591646552086, 0.0337681770324707, -0.03603491932153702, -0.04061876982450485, 0.045835621654987335, -0.0058275749906897545, -0.026111287996172905, -0.022367408499121666, 0.07940639555454254, -0.015460696071386337, 0.021681519225239754 ]
[ -0.007595780771225691, 0.016150876879692078, -0.03772592917084694, 0.038266196846961975, 0.006937031168490648, -0.006192042026668787, 0.01921909675002098, 0.003394315019249916, -0.012853073887526989, -0.04363413527607918, 0.0249157827347517, -0.03800930827856064, -0.00403921864926815, -0.029633857309818268, 0.019306730479002, -0.0856965109705925, 0.04889184981584549, 0.008205577731132507, 0.022728178650140762, -0.018707377836108208, 0.004524247255176306, 0.06320969015359879, -0.009854619391262531, -0.0026011071167886257, -0.021209392696619034, 0.009495018050074577, 0.00008436536882072687, -0.026376763358712196, 0.015534729696810246, -0.12455753982067108, 0.032717153429985046, -0.04376302659511566, 0.009629554115235806, -0.012174105271697044, 0.021345363929867744, 0.022646233439445496, 0.005957820452749729, -0.042250197380781174, 0.015346183441579342, 0.031596582382917404, 0.043906450271606445, -0.008374696597456932, -0.021505435928702354, 0.009741229005157948, 0.015056795440614223, 0.00944039598107338, -0.06096035987138748, 0.034157849848270416, 0.009839142672717571, -0.019429393112659454, -0.012665126472711563, 0.026502257212996483, -0.022475076839327812, 0.04502109810709953, 0.02590380236506462, -0.0050446209497749805, -0.010197076015174389, 0.016990575939416885, -0.008331649005413055, -0.03169482946395874, 0.017932100221514702, -0.008771424181759357, -0.06012415140867233, -0.020535167306661606, -0.014085217379033566, 0.0062376465648412704, -0.04740872234106064, -0.0076383063569664955, -0.027866601943969727, 0.01198007632046938, -0.009034687653183937, 0.011448543518781662, -0.01781991310417652, -0.03732742741703987, -0.011641441844403744, -0.012562435120344162, 0.06266440451145172, -0.032730575650930405, -0.011203271336853504, -0.0273266788572073, -0.05797626078128815, 0.002956673037260771, 0.007332836743444204, 0.01767546497285366, 0.003784352447837591, -0.028060946613550186, -0.02850688062608242, -0.000298397324513644, -0.019858386367559433, 0.0008165600593201816, -0.007531288545578718, 0.013982797041535378, 0.032890621572732925, 0.008530893363058567, -0.08049997687339783, -0.02646263875067234, -0.034480586647987366, -0.021943407133221626, 0.017855621874332428, 0.7987959980964661, 0.003055370645597577, 0.033377815037965775, 0.020082779228687286, 0.029558800160884857, -0.044410597532987595, -0.04086320847272873, -0.046211764216423035, 0.019701220095157623, 0.015373092144727707, 0.01204599067568779, 0.00584177253767848, 0.07306960225105286, 0.021500114351511, 0.04286669194698334, 0.0030340668745338917, -0.0024871390778571367, 0.05531059578061104, -0.044000886380672455, -0.015902195125818253, -0.010551889427006245, 0.00937745813280344, -0.007443507667630911, 0.017409302294254303, -0.015622195787727833, 0.03689635545015335, -0.17719191312789917, 0.001029743580147624, -6.395559868976822e-33, -0.02515912614762783, -0.05082132667303085, 0.031151605769991875, 0.006550708319991827, 0.01503811776638031, 0.012692722491919994, -0.020977938547730446, -0.024734502658247948, 0.01788092590868473, -0.03156599774956703, 0.0043844315223395824, -0.019983652979135513, -0.02275584638118744, -0.02319999411702156, 0.010290621779859066, -0.03879416361451149, -0.016067933291196823, 0.04255688562989235, -0.026210933923721313, 0.006761233787983656, 0.010311302728950977, 0.030195454135537148, 0.015010270290076733, 0.02117999829351902, 0.0069733657874166965, -0.0032285787165164948, -0.0602167546749115, -0.020905068144202232, 0.027994131669402122, -0.025386206805706024, -0.03176350146532059, 0.033197563141584396, -0.03204089403152466, -0.02083299495279789, -0.06719160825014114, -0.07002156227827072, -0.03137962147593498, -0.005082196090370417, -0.020767100155353546, -0.04649300500750542, -0.037536993622779846, 0.03704986721277237, 0.0045746006071567535, -0.012599059380590916, -0.0360831618309021, 0.007170951925218105, 0.01496791560202837, 0.039167486131191254, 0.02925059013068676, 0.05249667912721634, 0.009854483418166637, -0.003776002675294876, 0.0397120900452137, 0.003592024790123105, -0.02377176284790039, -0.04906696081161499, 0.01768495887517929, 0.0005560677382163703, 0.017781438305974007, -0.0006125488434918225, 0.03231804817914963, 0.012592624872922897, 0.028304530307650566, 0.027389194816350937, 0.028292084112763405, 0.034934304654598236, 0.031041424721479416, -0.01788475550711155, -0.010532661341130733, 0.04733907803893089, -0.031237686052918434, -0.026732714846730232, 0.01754450798034668, -0.006708444096148014, 0.01844216138124466, -0.04747467488050461, -0.011113926768302917, 0.02123592235147953, -0.01888434775173664, 0.016486553475260735, 0.01798200234770775, -0.015607651323080063, 0.03171517327427864, -0.045920681208372116, -0.04169082269072533, 0.01611494831740856, 0.020090796053409576, 0.007361223921179771, 0.03651176020503044, 0.00829301681369543, 0.009252999909222126, 0.029828889295458794, 0.02602444216609001, 0.0020670248195528984, -0.013768485747277737, 6.795334477431943e-33, -0.009749212302267551, -0.04849182814359665, -0.010173187591135502, 0.014713824726641178, 0.02854059264063835, -0.05689321085810661, 0.010647679679095745, 0.007487565744668245, -0.01876061037182808, 0.032697588205337524, -0.04243580251932144, 0.01984054408967495, -0.015031672082841396, 0.06026090309023857, 0.02814493328332901, 0.020915551111102104, 0.053408533334732056, 0.011099777184426785, 0.04233293980360031, -0.012128237634897232, 0.015615925192832947, -0.016749758273363113, -0.001935658510774374, 0.03764694556593895, 0.01684775948524475, 0.04697709530591965, -0.003664473071694374, 0.05032629147171974, -0.019144704565405846, -0.07135746628046036, 0.007824881933629513, -0.019374173134565353, 0.0037241324316710234, -0.027081219479441643, 0.025708919391036034, 0.03458486497402191, -0.022904567420482635, 0.02460862323641777, 0.000308339687762782, -0.002153197070583701, 0.05816597118973732, -0.008573008701205254, -0.03421884402632713, 0.01651018299162388, 0.005023573525249958, -0.015856480225920677, 0.030327074229717255, -0.022281955927610397, -0.0187092088162899, 0.026908325031399727, 0.026990070939064026, 0.039573315531015396, 0.04172835126519203, 0.03765493258833885, -0.034283898770809174, 0.005923710763454437, 0.04448241740465164, 0.02991919219493866, 0.005079652648419142, -0.015336524695158005, -0.040701158344745636, 0.00785436388105154, 0.004934348631650209, -0.008940575644373894, -0.016342394053936005, -0.04949433356523514, 0.029658133164048195, -0.04338498413562775, 0.04398428648710251, -0.020975254476070404, 0.0036802212707698345, -0.04171432554721832, -0.01605287194252014, 0.04935019090771675, 0.006890018004924059, -0.007452141493558884, -0.008818375878036022, 0.007003954146057367, -0.003722326597198844, 0.022451486438512802, 0.018324777483940125, -0.009866633452475071, 0.04105962812900543, 0.03799502179026604, 0.011354408226907253, -0.016838451847434044, -0.04427894949913025, -0.011630973778665066, 0.01453666016459465, 0.0005119522102177143, 0.0008955954108387232, -0.02601619064807892, -0.010867160744965076, 0.02467724308371544, 0.003712471341714263, -1.2221085476937787e-8, 0.001480422681197524, -0.02659865841269493, -0.005713737104088068, 0.07122191786766052, 0.008595523424446583, -0.02449600212275982, -0.004242297261953354, -0.04964137449860573, -0.01926708035171032, 0.04043271020054817, 0.06218750402331352, -0.008492527529597282, 0.03755181282758713, 0.011269023641943932, 0.03540145605802536, -0.025453461334109306, -0.022391408681869507, -0.00867366697639227, 0.017920473590493202, 0.02667447365820408, 0.04566102474927902, 0.04938024654984474, -0.01175895519554615, -0.04119754955172539, 0.013159126974642277, 0.02680349536240101, 0.019960258156061172, -0.05289856344461441, -0.025076773017644882, -0.0625942125916481, -0.023954834789037704, -0.02906010113656521, -0.022814752534031868, 0.052594758570194244, 0.006090990733355284, -0.01693054474890232, -0.022761961445212364, 0.043274883180856705, -0.021802231669425964, -0.0021116610150784254, -0.021761968731880188, -0.0057241772301495075, -0.006573916878551245, -0.0035627365577965975, -0.02411247044801712, 0.018899787217378616, -0.06289201974868774, 0.013924814760684967, 0.04854907840490341, -0.002452889923006296, -0.0381016880273819, -0.002329339040443301, 0.016591312363743782, 0.0006661213701590896, -0.034934915602207184, -0.024624153971672058, 0.00013293809024617076, -0.0050030965358018875, 0.025144027546048164, 0.003109891200438142, 0.04934512451291084, 0.001753849908709526, -0.04637829586863518, 0.0021510052029043436 ]
redpanda-consumer-group-offsets
https://markhneedham.com/blog/2023/07/12/redpanda-consumer-group-offsets
false
2023-07-13 04:44:37
Puppeteer: Unsupported command-line flag: --enabled-blink-features=IdleDetection.
[ "puppeteer", "javascript", "til" ]
[ "TIL" ]
:icons: font In many of the https://www.youtube.com/watch?v=6Ck1d5iswm4&list=PLihIrF0tCXdc35Lq865Z0jsnwaMol9Zn7[StarTree recipe videos^] that I've worked on, I show how to write queries in the Pinot UI. If I wrote these queries manually there'd be way too many typos, so I drive the UI using a script. I've recently been exploring whether I can do this using a Node.js library called https://pptr.dev/[Puppeteer^] and wanted to share a warning message that I ran into early doors. I installed Puppeteer using the following command: [source, bash] ---- npm i puppeteer-core ---- I then created the file `drive_pinot.mjs` and added the following code, which opens the Pinot query console on the first tab: .drive_pinot.mjs [source, javascript] ---- import puppeteer from 'puppeteer-core'; async function run() { const browser = await puppeteer.launch({ headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', ignoreDefaultArgs: ['--enable-automation'], defaultViewport: null, args: [ '--window-size=1920,1080', '--disable-infobars', ], }); const [page] = await browser.pages(); // <1> await page.goto('http://localhost:9000/#/query'); // <2> await page.waitForSelector('.CodeMirror'); // await browser.close(); } run(); ---- <.> Get the first tab <.> Open the Pinot query console We can run that script like this: [source, bash] ---- node drive_pinot.mjs ---- The script launched fine, but the Chrome browser had the following warning underneath the URL bar: [source, text] ---- You are using an unsupported command-line flag: --enabled-blink-features=IdleDetection. Stability and security will suffer. ---- I didn't set any blink features, so I have no idea where this error came from. By trial and error, I did work out that I could get rid of it by opening the Pinot query console on a new tab and then closing the initial tab. Our code, therefore, looks like this: .drive_pinot.mjs [source, javascript] ---- import puppeteer from 'puppeteer-core'; async function run() { const browser = await puppeteer.launch({ headless: false, executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome', // Add your path here ignoreDefaultArgs: ['--enable-automation'], // exclude this switch defaultViewport: null, // required for --window-size args: [ '--window-size=1920,1080', // set the window size '--disable-infobars', ], }); const page = await browser.newPage(); // <1> await page.goto('http://localhost:9000/#/query'); const [initPage] = await browser.pages(); initPage.close() // <2> await page.waitForSelector('.CodeMirror'); // await browser.close(); } run(); ---- <.> Open a new browser tab <.> Close the initial one And now the error message has miraculously gone!
In this post, we're going to learn how to work around a Chrome browser warning when using Puppeteer.
uploads/2023/07/puppeteer-banner.png
[ -0.021654648706316948, -0.0009324148995801806, -0.004061280284076929, 0.013618212193250656, 0.07030767947435379, 0.024594746530056, 0.03300386667251587, 0.0678260326385498, -0.0075578223913908005, -0.02414712868630886, -0.023204000666737556, 0.0047022695653140545, -0.058334413915872574, 0.004763531964272261, 0.011693304404616356, 0.07479056715965271, 0.11019820719957352, 0.008212681859731674, 0.0046041724272072315, -0.042374301701784134, 0.03237030655145645, 0.05254799872636795, 0.021115267649292946, 0.055317074060440063, 0.02940293215215206, 0.005402201786637306, -0.006649212446063757, -0.009349403902888298, -0.08498471230268478, -0.003719258587807417, 0.01862906850874424, 0.015948230400681496, -0.011554846540093422, -0.022612472996115685, 0.0005097491084598005, -0.0048194387927651405, 0.015239245258271694, 0.02479790709912777, -0.005063148215413094, 0.03268028050661087, -0.06988094002008438, 0.015580127947032452, 0.026691263541579247, 0.017739074304699898, -0.028664227575063705, 0.03868492692708969, -0.03001072257757187, 0.015243775211274624, -0.00342931947670877, -0.019937939941883087, -0.06542295962572098, 0.05475182458758354, -0.031206393614411354, -0.0033692556899040937, -0.015568599104881287, 0.024850212037563324, 0.014474865980446339, -0.07016745954751968, -0.0016266499878838658, -0.06221592053771019, 0.00398427527397871, 0.043182622641325, 0.02964499033987522, 0.0239701010286808, 0.0018866537138819695, -0.0037769912742078304, -0.020296011120080948, 0.05026639625430107, -0.06262744218111038, -0.03292602300643921, 0.016858045011758804, -0.00217887363396585, -0.03146298602223396, 0.0022367683704942465, 0.03780052810907364, -0.031013110652565956, -0.031353406608104706, 0.06010148674249649, 0.023358948528766632, 0.019110960885882378, -0.01240608748048544, 0.0008131357026286423, 0.04760453477501869, 0.02502983994781971, -0.010418007150292397, -0.039176393300294876, -0.020328490063548088, -0.02399761788547039, -0.05187339335680008, 0.05367150530219078, 0.041064172983169556, -0.06455579400062561, 0.018917562440037727, 0.02043396607041359, -0.0031897067092359066, 0.012812087312340736, 0.013558227568864822, -0.01609831117093563, -0.011284921318292618, 0.008792288601398468, -0.02568839304149151, -0.02802896499633789, 0.0291015412658453, 0.011030358262360096, -0.0705827996134758, -0.009104129858314991, -0.02507808990776539, 0.012460489757359028, 0.00894254632294178, 0.02884303405880928, -0.037959907203912735, 0.0027446565218269825, -0.003090261947363615, 0.031186211854219437, -0.06711950898170471, 0.09270301461219788, 0.012928331270813942, -0.019735148176550865, 0.003235801123082638, 0.021847432479262352, 0.07658393681049347, 0.03300045430660248, -0.02197336219251156, 0.07316664606332779, -0.007097052875906229, 0.05973995476961136, 0.006734159309417009, 0.02337552420794964, 0.018830807879567146, -0.06133771687746048, -0.0010968943824991584, 0.0606204979121685, 0.00646214047446847, -0.026136239990592003, -0.0486723817884922, -0.007741475943475962, 0.007571342401206493, -0.018080145120620728, 0.06645891070365906, 0.023148372769355774, -0.03424100950360298, -0.0342695526778698, 0.011619883589446545, -0.010834488086402416, 0.06716984510421753, 0.010005875490605831, 0.005986394826322794, -0.024324465543031693, -0.014058913104236126, 0.044971443712711334, 0.007320862263441086, -0.002786338096484542, 0.038847438991069794, -0.019394317641854286, -0.009362476877868176, 0.06573521345853806, 0.028273042291402817, -0.007926059886813164, -0.008408990688621998, -0.004398496821522713, 0.06038632616400719, 0.036737244576215744, 0.004787825979292393, 0.04838770627975464, 0.013144252821803093, -0.024125179275870323, -0.014750730246305466, 0.04609420523047447, -0.011404184624552727, -0.004367472138255835, -0.07096011936664581, -0.02431684359908104, 0.04218428209424019, -0.05400468036532402, -0.035028472542762756, 0.05295780301094055, 0.07410162687301636, 0.010541543364524841, 0.034573886543512344, 0.025328537449240685, -0.0858219563961029, 0.05817738547921181, 0.0065909516997635365, -0.018304456025362015, 0.00780902337282896, -0.003621454816311598, 0.08894273638725281, 0.012182549573481083, 0.017433522269129753, 0.0023886559065431356, -0.04988524690270424, -0.06356429308652878, -0.026580026373267174, 0.00952976942062378, 0.0642407163977623, -0.02408411353826523, 0.000954064482357353, 0.05501914024353027, 0.03462199494242668, 0.03896598517894745, -0.018534185364842415, -0.011466418392956257, 0.041625890880823135, -0.041312601417303085, -0.0879422202706337, 0.013494796119630337, 0.03666536882519722, -0.03849707171320915, -0.011890835128724575, 0.019991548731923103, -0.04161649942398071, -0.0028787399642169476, 0.03907603770494461, 0.01552925817668438, 0.04693281650543213, 0.0006016786792315543, 0.04669639840722084, -0.038750018924474716, 0.02604781836271286, -0.06825435906648636, 0.014881732873618603, 0.005735019687563181, 0.0022803323809057474, -0.0033549328800290823, -0.009212513454258442, 0.11989221721887589, 0.06332983821630478, -0.0459553599357605, -0.05037382245063782, 0.049405500292778015, 0.018423816189169884, -0.04818003252148628, 0.020902926102280617, -0.024745803326368332, -0.02663993649184704, -0.0017644300824031234, -0.006967861671000719, -0.021602066233754158, 0.0022365159820765257, -0.047901950776576996, 0.02227688580751419, 0.05978526175022125, -0.029388757422566414, 0.07212130725383759, 0.008181709796190262, -0.0294328685849905, 0.013696830719709396, 0.00007522881787735969, -0.050555404275655746, -0.0067663430236279964, -0.006917653605341911, -0.00919788796454668, 0.001316078589297831, -0.06127079576253891, -0.005350382998585701, -0.038713663816452026, -0.0575597882270813, 0.037967465817928314, 0.029635939747095108, 0.07030323147773743, -0.027160540223121643, 0.024465741589665413, -0.004739560652524233, 0.009333843365311623, -0.00750927347689867, -0.04590626806020737, -0.010088729672133923, 0.0038671582005918026, 0.021388737484812737, 0.024081051349639893, -0.011740311980247498, -0.017563926056027412, -0.0014879547525197268, -0.029995743185281754, 0.01364100631326437, 0.005045487079769373, 0.004911296535283327, -0.0018765941495075822, -0.005705407354980707, -0.018315868452191353, -0.005669254343956709, 0.04510800540447235, -0.0494227297604084, -0.02599620446562767, 0.005800554063171148, -0.03153140842914581, 0.04307228699326515, -0.08765340596437454, -0.044202517718076706, -0.01157038751989603, 0.03670937195420265, 0.03186388686299324, 0.003313218941912055, 0.0023430727887898684, 0.033065296709537506, -0.013657192699611187, 0.014853584580123425, 0.01696326583623886, -0.013475810177624226, 0.003840894205495715, -0.005204243119806051, 0.01641828380525112, 0.037633199244737625, -0.0032316697761416435, 0.03750433027744293, -0.04354645684361458, 0.03922157734632492, -0.042223814874887466, -0.24538594484329224, 0.026357097551226616, 0.02788889780640602, 0.0006513138068839908, 0.02059192769229412, -0.003800081554800272, 0.011741536669433117, -0.03945125639438629, 0.003638026537373662, 0.00005497440724866465, -0.012037445791065693, -0.008729159832000732, -0.04940836876630783, 0.03921281546354294, 0.0007562254322692752, -0.0026478501968085766, -0.03271209076046944, -0.05118687450885773, -0.006167028099298477, 0.01690528355538845, 0.0006943480693735182, -0.07023035734891891, 0.020785225555300713, 0.012017122469842434, 0.05470150709152222, 0.030040154233574867, -0.08292996138334274, 0.059599220752716064, -0.037170540541410446, -0.04531204700469971, 0.011594614014029503, -0.020800761878490448, 0.011141456663608551, 0.004637926816940308, 0.010912428610026836, -0.0005884973797947168, 0.058539897203445435, -0.003701944835484028, 0.02185000851750374, -0.009256144054234028, -0.022332653403282166, -0.04580866917967796, 0.013585461303591728, -0.0015994098503142595, 0.08322503417730331, -0.017183594405651093, -0.09230931848287582, -0.014878743328154087, -0.047854144126176834, 0.060500115156173706, -0.03975868970155716, -0.06390581279993057, -0.03305283933877945, 0.021299533545970917, 0.013390365056693554, 0.0014191726222634315, 0.0005108630284667015, 0.007954287342727184, -0.05722355842590332, -0.024756144732236862, -0.0020067619625478983, -0.04513077437877655, -0.025346042588353157, -0.03503759577870369, -0.0031995128374546766, -0.06734401732683182, -0.050275206565856934, 0.006563093978911638, 0.08655089884996414, 0.012176171876490116, -0.04530094936490059, 0.004628701135516167, -0.013816297054290771, -0.12296435236930847, -0.00788428820669651, -0.016297191381454468, -0.023877788335084915, -0.01998826675117016, -0.024524250999093056, 0.05319032445549965, -0.02784380316734314, -0.036392804235219955, 0.022575130686163902, 0.012696025893092155, 0.03104490041732788, -0.0071705663576722145, -0.008364696986973286, -0.04772847890853882, -0.008813915774226189, -0.004875401966273785, 0.07863528281450272, -0.0486055463552475, -0.01659461297094822, -0.024195918813347816, -0.015787649899721146, 0.04140947014093399, 0.02457047812640667, 0.022760378196835518, -0.016723552718758583, 0.05236108601093292, 0.011588635854423046, -0.03458476439118385, 0.02454843930900097, -0.007483192253857851, 0.02335492894053459, 0.010330824181437492, -0.060854721814394, 0.04701961204409599, 0.031718309968709946, 0.028868122026324272, 0.012225529178977013, -0.009008849039673805, 0.00325017049908638, -0.05064764618873596, -0.050131261348724365, -0.002770972205325961, 0.014647840522229671, 0.034877754747867584, 0.003321518423035741, -0.01292250957340002, -0.04912707582116127, 0.01250997930765152, -0.009769133292138577, -0.008969154208898544, -0.043978527188301086, -0.04001199081540108, 0.009939514100551605, 0.01377383153885603, 0.019482048228383064, 0.014731045812368393, -0.019591260701417923, 0.0368853323161602, 0.03172414004802704, -0.03883263096213341, 0.037115395069122314, -0.03558569401502609, -0.028699558228254318, -0.05118055269122124, 0.024649212136864662, -0.003437448525801301, -0.010912730358541012, 0.00902759749442339, 0.028117211535573006, 0.01193069014698267, 0.034277744591236115, 0.013012799434363842, 0.034999776631593704, -0.017786426469683647, 0.007897396571934223, 0.03184108808636665, -0.01832978054881096, 0.0033758997451514006, -0.005009303335100412, -0.0313110314309597, -0.04005919769406319, -0.053879499435424805, 0.004488243721425533, -0.02000221237540245, -0.023480132222175598, -0.0358169823884964, 0.014806840568780899, -0.07624447345733643, 0.0019007526570931077, 0.005073721520602703, 0.0018776339711621404, 0.030054833739995956, 0.0488993376493454, 0.0338357649743557, -0.010074324905872345, -0.0016732609365135431, 0.02699725702404976, 0.031918302178382874, -0.05060853436589241, 0.011188645847141743, -0.006309116259217262, -0.016250841319561005, 0.007004214450716972, 0.02533702738583088, -0.008584905415773392, 0.0006414842791855335, 0.03512934222817421, 0.01377653144299984, 0.025392938405275345, 0.012902642600238323, 0.03191438317298889, 0.004240944981575012, -0.03435054048895836, 0.005815654061734676, -0.01833106204867363, -0.026301309466362, -0.03612319380044937, 0.013964506797492504, -0.0352725088596344, -0.018873240798711777, -0.032011549919843674, -0.0724131390452385, 0.031609777361154556, 0.012145749293267727, 0.04812340438365936, 0.018172865733504295, -0.00788585003465414, 0.002317247912287712, -0.047649282962083817, 0.06307617574930191, 0.07467910647392273, -0.07276255637407303, 0.016407007351517677, 0.00734024029225111, -0.011009585112333298, -0.0019015494035556912, 0.025433430448174477, -0.0749591737985611, -0.005552645772695541, 0.007699490524828434, 0.00519682839512825, -0.040371350944042206, -0.02684723399579525, -0.043916814029216766, 0.019042065367102623, -0.012740656733512878, 0.025715060532093048, -0.009575224481523037, -0.013146226294338703, -0.004792264197021723, -0.020716149359941483, 0.02359076961874962, 0.000519651104696095, -0.010971727780997753, 0.03122076764702797, -0.026096640154719353, 0.048515792936086655, -0.0064428988844156265, 0.015133416280150414, 0.023660818114876747, -0.01383975986391306, -0.015933630988001823, -0.056833360344171524, -0.019505800679326057, 0.005470929201692343, 0.07201346009969711, -0.021378695964813232, 0.007338941562920809, -0.04325816407799721, -0.007665201555937529, -0.018769918009638786, 0.005666124168783426, -0.00630202516913414, -0.027653630822896957, 0.02184884622693062, 0.054381173104047775, 0.005634947679936886, -0.005073926877230406, 0.00010287481563864276, 0.009835855104029179, 0.04648894816637039, -0.0658075138926506, -0.03516605123877525, -0.007424348033964634, -0.07647758722305298, 0.03670633211731911, 0.011649020947515965, 0.026165764778852463, -0.0502605214715004, 0.026575785130262375, 0.0343763642013073, 0.010495064780116081, 0.007375785149633884, -0.04245508089661598, 0.026934580877423286, -0.008770748041570187, 0.018556712195277214, -0.08823531866073608, 0.00955259520560503, -0.002615853678435087, -0.018668288365006447, -0.007388575002551079, 0.019624367356300354, -0.053657956421375275, 0.05127691105008125, -0.06942521035671234, -0.01292821392416954, 0.0654725655913353, -0.0012113212142139673, -0.010941178537905216, -0.007816826924681664, -0.06220216676592827, 0.034772515296936035, 0.036282457411289215, -0.0314733050763607, -0.009329157881438732, 0.011697843670845032, 0.060998089611530304, -0.004093005321919918, 0.04058322310447693, -0.018700161948800087, -0.020168092101812363, 0.0726964920759201, 0.0047021349892020226, -0.005547681823372841, 0.04725568741559982, -0.02249932289123535, 0.04516145586967468, 0.03108491748571396, 0.0324382483959198, 0.01600904017686844, 0.05026834085583687, -0.01756124570965767, -0.06456037610769272, 0.01729024387896061, -0.0024316671770066023, -0.001513282535597682, -0.07394926249980927, 0.05301026627421379, -0.010717048309743404, -0.03243531659245491, -0.03947833925485611, 0.000419192248955369, -0.038766585290431976, -0.04116078093647957, -0.03760748356580734, 0.006865615025162697, -0.04730451852083206, 0.06442456692457199, 0.019722245633602142, 0.009598532691597939, 0.08696741610765457, -0.01364861335605383, 0.016588209196925163, 0.011555400677025318, 0.07090165466070175, 0.08050772547721863, 0.05312557518482208, -0.022240949794650078, 0.08233654499053955, -0.041876886039972305, -0.02681814506649971, -0.020981287583708763, -0.027921104803681374, -0.04211517050862312, -0.045238181948661804, 0.017152631655335426, 0.0725947916507721, -0.042721427977085114, 0.05642422288656235, -0.024844223633408546, -0.01128627173602581, -0.013814619742333889, 0.011080954223871231, -0.005277703981846571, 0.0657980665564537, -0.0012078487779945135, 0.03646610677242279, -0.01395337749272585, -0.01075113657861948, 0.04974444955587387, -0.015777142718434334, -0.02171681821346283, 0.02793082967400551, -0.033800799399614334, 0.004922318272292614, 0.0014052492333576083, 0.02661316655576229, 0.0761331170797348, -0.024690667167305946, -0.009254435077309608, 0.0012026194017380476, 0.016826670616865158, 0.020482094958424568, 0.011598514392971992, -0.04209917411208153, -0.019413236528635025, -0.04485789313912392, -0.027630280703306198, -0.00868256576359272, -0.0051009757444262505, -0.034176573157310486, 0.03822364658117294, -0.03628486767411232, 0.01014577504247427, 0.0036079571582376957, -0.0369594432413578, -0.05751320719718933, -0.02580845355987549, -0.046038322150707245, -0.05263995751738548, -0.05530139058828354, -0.04010579362511635, 0.0004420401528477669, -0.010028673335909843, -0.038008954375982285, -0.04043986275792122, 0.020425844937562943, 0.013262786902487278, -0.011916689574718475, -0.0242592915892601, -0.03163185715675354, 0.02261270396411419, 0.02044636569917202, 0.002879905514419079, 0.008707641623914242, 0.07108253985643387, 0.014581592753529549, -0.003462276654317975, -0.040437690913677216, 0.004948574583977461, 0.035382967442274094, -0.0032570629846304655, 0.026502184569835663, -0.06148863956332207, 0.012839765287935734, 0.00252052815631032, -0.017070433124899864, -0.04929259791970253, 0.020528273656964302, 0.03412377089262009, -0.030042793601751328, 0.05571641027927399, -0.016545211896300316, 0.028293898329138756, -0.05600927025079727, -0.016297856345772743, 0.007514468859881163, 0.0059633636847138405, 0.047255147248506546, -0.02808532677590847, 0.09014036506414413, 0.010715731419622898, -0.008024681359529495, -0.03155934438109398, 0.0018575962167233229, -0.010072827339172363, -0.01130510214716196, -0.04926713928580284, 0.01449813973158598, -0.029650472104549408, -0.062467385083436966, -0.020503953099250793, 0.03214089944958687, -0.001851164037361741, -0.03178436681628227, 0.001423502922989428, 0.00671794218942523, -0.024378644302487373, 0.051812224090099335, -0.040416765958070755, -0.002089785411953926, -0.004395293537527323, -0.007962695322930813, 0.023160191252827644, 0.044049326330423355, -0.00795732345432043, -0.013223453424870968, 0.034143246710300446, -0.02645728923380375, -0.030814912170171738, -0.042602989822626114, 0.0461459755897522, 0.047582510858774185, -0.013665893115103245, 0.015619109384715557 ]
[ -0.06770596653223038, -0.002654029056429863, -0.015509545803070068, -0.030830129981040955, 0.024800581857562065, -0.04787970334291458, -0.009267045184969902, 0.018886210396885872, -0.04111623018980026, -0.03397731855511665, -0.008480092510581017, -0.015301516279578209, 0.008247997611761093, -0.039852574467659, 0.07624900341033936, -0.010907146148383617, 0.014239376410841942, -0.045989349484443665, -0.015063725411891937, 0.03238433226943016, 0.03403422608971596, -0.007675317116081715, -0.0012222907971590757, -0.059778448194265366, -0.027062831446528435, 0.05531735345721245, 0.020633378997445107, -0.008695201948285103, 0.006080571562051773, -0.1748294085264206, 0.021337369456887245, -0.04980429261922836, -0.00942802894860506, -0.006698388606309891, 0.0001384665083605796, 0.03458064794540405, 0.04223771020770073, 0.0023303308989852667, 0.04173663631081581, 0.029546547681093216, -0.002099866047501564, 0.006580466404557228, -0.0833376869559288, -0.01638352870941162, 0.06770555675029755, -0.012616588734090328, -0.030941104516386986, -0.02912728674709797, -0.006035595666617155, -0.01815384440124035, -0.05463099479675293, 0.005945919081568718, 0.002875653328374028, -0.032971106469631195, 0.00878121331334114, 0.02387581206858158, 0.02765377052128315, 0.04087895154953003, 0.015641510486602783, 0.04347557574510574, 0.010128225199878216, -0.016577383503317833, -0.13943001627922058, 0.1385551542043686, 0.0291843693703413, 0.06654729694128036, -0.06240300089120865, -0.007694686762988567, -0.05843127891421318, 0.033669617027044296, 0.011640511453151703, -0.003813048591837287, -0.029756838455796242, 0.034728337079286575, -0.026404505595564842, -0.03793951869010925, -0.012566033750772476, 0.028123488649725914, 0.016873972490429878, -0.016243502497673035, -0.07115273177623749, -0.024633485823869705, 0.007885397411882877, -0.008677552454173565, -0.017603809013962746, 0.0038439452182501554, -0.0063685039058327675, 0.07150407880544662, 0.016787268221378326, 0.03843316063284874, 0.0311831496655941, -0.029457444325089455, 0.04999113827943802, 0.0035541150718927383, -0.04209941625595093, 0.017117977142333984, -0.0013392951805144548, 0.013587028719484806, -0.03733446076512337, 0.392428457736969, 0.00114494189620018, 0.011355951428413391, 0.05649034306406975, -0.011722165159881115, 0.026545969769358635, 0.01665208861231804, 0.017216850072145462, -0.015642819926142693, 0.033765628933906555, 0.005919090937823057, 0.008227336220443249, -0.005256120581179857, 0.08014585822820663, -0.0600835382938385, -0.0006876483676023781, -0.004133150447160006, -0.027925770729780197, 0.023459050804376602, 0.00935006607323885, 0.04574505239725113, 0.019953522831201553, 0.01694566197693348, 0.027405772358179092, 0.021733811125159264, 0.04505930840969086, 0.010263842530548573, 0.05122169852256775, 0.04213004931807518, 0.03529354929924011, 0.02522505633533001, 0.0217287540435791, -0.026163076981902122, -0.02290087379515171, 0.015929298475384712, 0.01584658958017826, 0.050860289484262466, 0.0310447309166193, -0.02022092416882515, 0.030681073665618896, 0.0013340105069801211, -0.021214522421360016, -0.05125227943062782, 0.07326047122478485, -0.020856410264968872, 0.00027457636315375566, 0.07067554444074631, 0.00009027455234900117, -0.011427924036979675, -0.034869834780693054, -0.0033433970529586077, -0.03679242730140686, 0.011670724488794804, -0.012822739779949188, -0.03703524172306061, -0.05645079165697098, -0.003260701661929488, 0.06986451894044876, 0.008640055544674397, -0.05587862432003021, -0.0031513122376054525, 0.007821579463779926, -0.045137640088796616, 0.01037660613656044, -0.04800693690776825, 0.036489542573690414, -0.12147149443626404, -0.04102107882499695, 0.046088360249996185, -0.00009090741514228284, -0.06463585048913956, -0.05838555842638016, 0.026199711486697197, -0.06284932792186737, -0.013379753567278385, 0.05117672681808472, -0.04980045557022095, -0.007321903947740793, 0.01902226358652115, 0.04077746346592903, 0.04272378608584404, -0.032907694578170776, -0.03618936240673065, -0.001902146846987307, -0.010641989298164845, -0.03747103735804558, -0.07192839682102203, -0.0003650145954452455, -0.0005742408684454858, 0.010801486670970917, -0.02735459990799427, -0.007670606952160597, -0.058349937200546265, -0.04016953706741333, 0.0681924819946289, 0.003686382435262203, 0.01715664193034172, -0.004423966631293297, -0.023261914029717445, -0.004444943740963936, -0.04172353819012642, 0.020437462255358696, 0.011494520120322704, -0.004806300159543753, 0.014508098363876343, -0.044649746268987656, 0.07463338226079941, 0.013785718008875847, -0.05320295691490173, 0.06513572484254837, 0.029447853565216064, -0.07473677396774292, 0.02970421127974987, 0.013022515922784805, 0.0331452302634716, 0.008078163489699364, -0.06386248767375946, -0.057006049901247025, 0.0005059185205027461, 0.02406899817287922, 0.02791704423725605, -0.03827498480677605, -0.01025663036853075, -0.07170900702476501, -0.352931410074234, -0.03736841678619385, -0.06244686618447304, -0.002455643145367503, -0.026491474360227585, -0.05393518880009651, 0.03152830898761749, -0.024440962821245193, 0.008299964480102062, -0.013061759062111378, 0.09465813636779785, -0.023796021938323975, 0.03845261409878731, -0.05078951269388199, 0.004714809358119965, 0.018979093059897423, -0.024742787703871727, -0.04278050363063812, -0.01830940507352352, 0.04093266651034355, -0.017322255298495293, -0.03894666209816933, -0.02836967259645462, -0.0866064503788948, -0.015734484419226646, -0.03216233476996422, 0.11163321137428284, 0.03855818137526512, 0.04822506755590439, -0.0706804022192955, 0.06656784564256668, 0.04810244217514992, 0.004077101591974497, -0.07637248933315277, 0.006847654934972525, -0.0361858569085598, 0.032211970537900925, 0.009885860607028008, 0.0013766733463853598, -0.02133510261774063, -0.10175459086894989, 0.031961217522621155, -0.049750760197639465, -0.06776819378137589, -0.009024675004184246, -0.0045000906102359295, -0.00249356497079134, 0.0057001132518053055, -0.03890058025717735, 0.08248528838157654, 0.018580252304673195, 0.04115912318229675, 0.03206918388605118, 0.036673396825790405, -0.01935119554400444, -0.011373038403689861, -0.05320402979850769, -0.04089203476905823, 0.011729973368346691, 0.00027259194757789373, 0.033717744052410126, 0.007387628313153982, 0.04717308282852173, -0.10982907563447952, -0.0058507672511041164, 0.050253622233867645, 0.018491540104150772, -0.01960211619734764, 0.059662867337465286, -0.0055123064666986465, -0.05502486228942871, 0.1109662726521492, 0.036075759679079056, 0.015376538038253784, 0.028619855642318726, 0.035121481865644455, 0.03563985973596573, 0.031727734953165054, 0.03353601694107056, 0.010810176841914654, 0.022025711834430695, 0.005391619633883238, 0.06219647452235222, -0.02427884377539158, -0.03299516439437866, 0.04025861248373985, -0.028048282489180565, -0.028828619047999382, 0.0413411445915699, 0.0024225404486060143, -0.018556823953986168, 0.012582086957991123, -0.0003140594926662743, -0.03733590990304947, 0.04339181259274483, -0.0019959048368036747, -0.27367377281188965, 0.03738686069846153, 0.08252869546413422, 0.0709730014204979, 0.02698415517807007, -0.020373040810227394, 0.004398138727992773, -0.08870786428451538, 0.0021583603229373693, 0.03173120319843292, -0.019631441682577133, 0.046184077858924866, 0.01334337703883648, -0.008535867556929588, 0.0044746119529008865, -0.0008063502609729767, 0.041698042303323746, 0.023127134889364243, 0.006695933640003204, -0.033627092838287354, 0.04750436544418335, -0.01411663368344307, 0.1872374713420868, 0.07656540721654892, -0.014519022777676582, 0.034699585288763046, -0.0033422899432480335, 0.009039832279086113, 0.05304113030433655, 0.019367285072803497, -0.000011262163752689958, -0.01836351864039898, 0.027582645416259766, -0.008762718178331852, 0.04990117624402046, -0.04805852100253105, -0.02973215840756893, 0.009442301467061043, 0.01584675908088684, -0.010432187467813492, -0.02904859557747841, 0.040841616690158844, -0.0019419961608946323, -0.008746244013309479, 0.045922067016363144, -0.0245523601770401, -0.00938412919640541, 0.008516245521605015, -0.025082431733608246, 0.00785153266042471, -0.027589958161115646, -0.052098944783210754, -0.04112197831273079, -0.02077612094581127, -0.010378770530223846, 0.07684589922428131, 0.021255746483802795, -0.02321764826774597, 0.020532935857772827, 0.004962827078998089, -0.003008530242368579, -0.05760912597179413, 0.1104605495929718, 0.047547463327646255, 0.03979351744055748 ]
[ -0.009723478928208351, -0.015596982091665268, 0.003517157630994916, 0.030369851738214493, 0.03325203061103821, 0.022218219935894012, -0.018278690055012703, 0.014960860833525658, -0.012803804129362106, -0.011578432284295559, -0.001725999522022903, 0.012028487399220467, -0.005631244275718927, -0.03687935322523117, -0.016333110630512238, -0.013668393716216087, 0.0218006931245327, -0.010855292901396751, 0.024597911164164543, -0.0036379722878336906, -0.015695497393608093, 0.017229799181222916, 0.05413338914513588, 0.0041536856442689896, -0.024006139487028122, -0.022596750408411026, -0.032942354679107666, -0.02327801287174225, 0.037764668464660645, -0.14082957804203033, -0.011224203743040562, -0.025408104062080383, 0.015699094161391258, 0.0023143242578953505, -0.01934567280113697, 0.0033582805190235376, -0.011836846359074116, -0.032457947731018066, -0.05541365593671799, -0.021030372008681297, 0.032020021229982376, 0.011409391649067402, -0.01248724665492773, -0.007745768409222364, 0.014516842551529408, -0.04629459232091904, -0.05197557061910629, -0.011033552698791027, -0.01417497731745243, 0.003179453546181321, -0.0353790819644928, -0.0031578566413372755, 0.018619442358613014, -0.04335465282201767, -0.022356702014803886, -0.010314235463738441, -0.020148711279034615, -0.0162261500954628, 0.047553081065416336, 0.03020767867565155, 0.049491748213768005, -0.013730124570429325, 0.004874950274825096, -0.039910778403282166, 0.03936482220888138, 0.01183928269892931, -0.02447674050927162, -0.01717304438352585, -0.028833668678998947, 0.0077311876229941845, 0.014966374263167381, 0.005195639096200466, -0.00025703577557578683, -0.014367980882525444, -0.0429617315530777, -0.05856475979089737, -0.024099543690681458, -0.012714840471744537, -0.02872406132519245, 0.01703602820634842, -0.04729350283741951, -0.00836100336164236, 0.01054756622761488, 0.021548183634877205, 0.01601179875433445, 0.027329465374350548, -0.017987027764320374, 0.051884718239307404, -0.008018607273697853, -0.00950833410024643, -0.05636494234204292, -0.015671756118535995, -0.003326741512864828, 0.057695161551237106, -0.06517919152975082, 0.018043404445052147, -0.008197280578315258, -0.015017857775092125, -0.025180868804454803, 0.8325714468955994, -0.00022392843675334007, 0.01858820766210556, 0.03298775479197502, -0.01789744757115841, -0.007150027900934219, -0.007923705503344536, 0.008875353261828423, 0.01883852668106556, -0.005531906615942717, -0.009838935919106007, 0.017287829890847206, 0.02275709994137287, 0.027627939358353615, 0.003928501624614, -0.021534502506256104, -0.013961640186607838, -0.008478117175400257, 0.0077512748539447784, 0.04785531386733055, 0.07837427407503128, 0.05607575178146362, 0.006448571570217609, -0.0031511206179857254, 0.001272491761483252, 0.034908052533864975, -0.20856253802776337, 0.005286604166030884, -6.860038094605017e-33, 0.03312164172530174, -0.08190205693244934, 0.014145069755613804, 0.010824318043887615, 0.04328426718711853, 0.04029941186308861, 0.005200575105845928, 0.02110755443572998, -0.03510897606611252, -0.03427105024456978, 0.054466526955366135, -0.03260021656751633, -0.03712952136993408, -0.0181196928024292, 0.007010594941675663, 0.02206079475581646, -0.00689862621948123, 0.04389035329222679, 0.02091538906097412, -0.024436796084046364, 0.03463563695549965, 0.021366527304053307, -0.007577320095151663, 0.016575144603848457, 0.011941144242882729, 0.03197402134537697, -0.006867989432066679, 0.004564442206174135, -0.013539336621761322, -0.038473084568977356, -0.020624341443181038, -0.00038712259265594184, -0.004160095471888781, -0.01037751417607069, 0.005816601682454348, -0.05596831440925598, -0.03474348410964012, -0.00143227051012218, -0.04754193127155304, -0.01995241269469261, 0.00360032613389194, -0.015811940655112267, -0.05237576737999916, -0.045579943805933, -0.05329044908285141, 0.012656825594604015, 0.005451601464301348, 0.0015755797503516078, 0.008205612190067768, 0.015599778853356838, 0.017895491793751717, 0.028368964791297913, 0.005851395893841982, -0.008127743378281593, -0.008030270226299763, 0.015228770673274994, 0.004783963318914175, -0.009349910542368889, -0.01611418090760708, -0.04049265384674072, 0.0009025773033499718, -0.01526775024831295, -0.0017743241041898727, -0.0075957030057907104, -0.018786249682307243, -0.0021849051117897034, 0.012530095875263214, 0.018345892429351807, -0.003531485563144088, 0.01482374593615532, -0.04388176649808884, -0.017120620235800743, -0.016549060121178627, -0.008315442129969597, 0.007478298153728247, -0.020722314715385437, 0.000596518162637949, -0.0018289152067154646, 0.02001558244228363, 0.03463016450405121, -0.004249148536473513, -0.03198999539017677, -0.017071226611733437, 0.005298470612615347, -0.005282956175506115, 0.018103133887052536, 0.012763560749590397, -0.005163019057363272, -0.010077017359435558, 0.014868983067572117, 0.024038737639784813, 0.04353255778551102, -0.019879015162587166, -0.04402189701795578, -0.03316592052578926, 6.135867452941254e-33, -0.010705528780817986, 0.0037996144965291023, 0.0015994858695194125, 0.020623324438929558, 0.013781164772808552, -0.03119414672255516, 0.008075114339590073, 0.008823290467262268, 0.0035067431163042784, 0.01871083863079548, -0.04385414347052574, 0.013685625977814198, -0.036196738481521606, 0.009555350057780743, 0.0456039197742939, 0.007524499669671059, 0.028871864080429077, -0.008242808282375336, 0.04236122593283653, -0.03167850151658058, -0.022905679419636726, 0.02463274635374546, 0.0264684297144413, -0.008525960147380829, 0.01618487387895584, 0.05297768488526344, 0.00590690691024065, 0.02775459550321102, -0.0103350430727005, 0.009768658317625523, 0.027465788647532463, 0.00954707246273756, 0.0070959352888166904, -0.01110389456152916, 0.011542988009750843, 0.035292983055114746, -0.015246383845806122, -0.0029300451278686523, 0.005847793072462082, 0.0013173164334148169, 0.013508052565157413, -0.00684814527630806, -0.002464340766891837, -0.00920782145112753, 0.02095348760485649, -0.01397203840315342, 0.019293859601020813, -0.0027678669430315495, 0.005632943939417601, 0.006910641677677631, 0.027491983026266098, 0.018577488139271736, 0.0077108279801905155, 0.013409212231636047, 0.0035810000263154507, -0.03758738189935684, -0.044755514711141586, 0.0072091445326805115, -0.01838366873562336, -0.028836224228143692, -0.011218362487852573, -0.018637770786881447, -0.021070141345262527, 0.024886950850486755, -0.03145454078912735, -0.015903843566775322, -0.04615294188261032, 0.015526252798736095, 0.024241503328084946, 0.025961270555853844, 0.010124346241354942, 0.021581217646598816, 0.014041474089026451, 0.06360913068056107, -0.007902359589934349, -0.008880396373569965, 0.022279085591435432, -0.021535750478506088, 0.02302551083266735, 0.0004383751074783504, -0.007890190929174423, 0.050578974187374115, 0.009920403361320496, -0.008230632171034813, 0.03167601302266121, 0.010981174185872078, -0.03227544203400612, 0.022503642365336418, 0.039659030735492706, 0.009910481050610542, -0.012970437295734882, 0.006043181288987398, -0.018970809876918793, 0.0012217395706102252, -0.019708480685949326, -1.243436109632512e-8, -0.029806742444634438, 0.009910614229738712, -0.028052782639861107, 0.022955577820539474, 0.0122136902064085, -0.029879925772547722, -0.0452779121696949, -0.02041390724480152, -0.010387957096099854, 0.016285467892885208, 0.06027567386627197, 0.0027102967724204063, 0.0142725370824337, 0.040937639772892, 0.013735944405198097, -0.05467892065644264, -0.008811409585177898, 0.014884482137858868, 0.025126654654741287, -0.012728165835142136, 0.005519929341971874, 0.04388272762298584, 0.03235596790909767, -0.002686223713681102, -0.02839990146458149, 0.000993488822132349, 0.020468343049287796, -0.06755711883306503, -0.01746801659464836, 0.01700105518102646, -0.004182715434581041, -0.009960997849702835, -0.020213501527905464, 0.007657005917280912, -0.014764108695089817, -0.033498670905828476, -0.004218738060444593, 0.009183838963508606, 0.011823915876448154, -0.0016273281071335077, 0.022832373157143593, -0.014731182716786861, 0.021197764202952385, -0.01804153062403202, -0.04369200021028519, -0.020872458815574646, -0.017155546694993973, 0.03352796286344528, 0.04730673134326935, -0.02245362661778927, -0.01419831532984972, 0.010879755951464176, -0.0168739166110754, 0.02783222496509552, 0.027757812291383743, -0.02208290994167328, 0.04483776539564133, 0.001428268849849701, -0.027050867676734924, -0.031005462631583214, 0.04179796203970909, 0.03228216990828514, -0.00933105405420065, -0.00827321968972683 ]
puppeteer-unsupported-flag-enabled-blink-features-idledetection
https://markhneedham.com/blog/2023/07/13/puppeteer-unsupported-flag-enabled-blink-features-idledetection
false
2023-07-25 04:44:37
Confluent Kafka: DeprecationWarning: AvroProducer has been deprecated. Use AvroSerializer instead.
[ "python", "kafka", "avro", "til" ]
[ "TIL" ]
I've been creating a demo showing how to ingest Avro-encoded data from Apache Kafka into Apache Pinot and ran into a deprecation warning. In this blog post, I'll show how to update code using the Confluent Kafka Python client to get rid of that warning. I started by installing the following libraries: [source, bash] ---- pip install confluent-kafka avro urllib3 requests ---- And then my code to publish an Avro encoded event to Kafka looked like this: [source, python] ---- from confluent_kafka.avro import AvroProducer from confluent_kafka import avro schema_name = "telemetry.avsc" producer_config = { 'bootstrap.servers': 'localhost:9092', 'schema.registry.url': 'http://localhost:8081', 'broker.address.family': 'v4' } value_schema = avro.load(schema_name) producer = AvroProducer(producer_config, default_value_schema=value_schema) event = { # all my fields } producer.produce(topic="telemetry", value=event) ---- When I ran this script data did make its way into Kafka, but I also got the following warning on the `AvroProducer` line: .Output [source, text] ---- DeprecationWarning: AvroProducer has been deprecated. Use AvroSerializer instead. ---- It took me a little while to figure out where `AvroSerializer` lived and how to use it, but I eventually ended up with the following code for creating the producer: [source, python] ---- from confluent_kafka import Producer from confluent_kafka.schema_registry import SchemaRegistryClient from confluent_kafka.schema_registry.avro import AvroSerializer from confluent_kafka.serialization import ( SerializationContext, MessageField, ) schema_registry_conf = {'url': 'http://localhost:8081'} schema_registry_client = SchemaRegistryClient(schema_registry_conf) with open("telemetry.avsc") as f: value_schema = f.read() avro_serializer = AvroSerializer(schema_registry_client, value_schema) producer_conf = {'bootstrap.servers': 'localhost:9092'} producer = Producer(producer_conf) ---- I ran this code and got the following error message: .Output [source, text] ---- Traceback (most recent call last): File "/Users/markhneedham/projects/hugo-blog/blog/content/2023/07/25/new.py", line 5, in <module> from confluent_kafka.schema_registry.avro import AvroSerializer File "/Users/markhneedham/projects/hugo-blog/blog/content/2023/07/25/.venv/lib/python3.11/site-packages/confluent_kafka/schema_registry/avro.py", line 22, in <module> from fastavro import (parse_schema, ModuleNotFoundError: No module named 'fastavro' ---- Let's get `fastavro` installed: [source, bash] ---- pip install fastavro ---- When I ran the script again, the deprecation warning was gone, but I got the following error message instead: .Output [source, text] ---- Traceback (most recent call last): File "/Users/markhneedham/projects/hugo-blog/blog/content/2023/07/25/new.py", line 47, in <module> producer.produce(topic="telemetry", value=event) TypeError: a bytes-like object is required, not 'dict' ---- In the previous API, our messages were encoded inside the producer, but here we need to do it explicitly using the Avro serialiser. We, therefore, need to update this line: [source, python] ---- producer.produce(topic="telemetry", value=event) ---- To read like this: [source, python] ---- producer.produce( topic="telemetry", value=avro_serializer(event, SerializationContext("telemetry", MessageField.VALUE)), ) ---- Now if I run the script, messages make their way into Kafka and I don't have any warnings or errors! [NOTE] ==== If you want to see the entirety of both code samples, I've included them both in https://gist.github.com/mneedham/2181b1dd8ddbcdf6d31da3ff569ca1ba[a GitHub Gist^]. ====
In this post, we're going to learn how to fix a deprecation warning when using the Confluent Kafka Python library.
uploads/2023/07/kafka-deprecation-banner.png
[ 0.03311660885810852, -0.004486908204853535, -0.008946995250880718, 0.029229963198304176, 0.08387544006109238, 0.01017417199909687, 0.009972963482141495, 0.05483432859182358, 0.0021917386911809444, -0.013603129424154758, -0.016158532351255417, -0.02008090727031231, -0.06434627622365952, 0.03577949479222298, -0.01585194654762745, 0.04954974725842476, 0.08427981287240982, -0.0004815006104763597, 0.032428693026304245, 0.02783096581697464, 0.004714345093816519, 0.04702698066830635, 0.0004723035672213882, 0.05126470327377319, 0.0046575372107326984, 0.01908852532505989, -0.0030536106787621975, 0.007878146134316921, -0.05420536920428276, -0.009049007669091225, 0.05027594044804573, 0.025283075869083405, 0.016429822891950607, -0.013924561440944672, 0.0034747389145195484, -0.010083695873618126, -0.01760193146765232, -0.0032172135543078184, -0.012311258353292942, 0.03591563552618027, -0.08828388899564743, 0.007746863178908825, -0.013070094399154186, -0.014490043744444847, -0.03413459286093712, 0.0036303324159234762, -0.025704864412546158, 0.04024925082921982, 0.005010109394788742, 0.0070801228284835815, -0.05672243610024452, 0.010497170500457287, -0.012925087474286556, 0.009256911464035511, 0.010305317118763924, 0.041665446013212204, 0.02582903578877449, -0.09151642769575119, 0.029436426237225533, -0.02042984776198864, -0.04149468243122101, 0.004303577356040478, 0.012869035825133324, 0.02064366824924946, 0.017115110531449318, -0.01747054047882557, -0.02524547092616558, 0.047225452959537506, -0.031401410698890686, -0.03935603052377701, -0.008105788379907608, 0.01680741272866726, -0.031101008877158165, -0.004703619051724672, 0.013946563005447388, -0.032430507242679596, -0.008696045726537704, 0.05201224237680435, 0.027821188792586327, 0.06078840047121048, -0.0025990328285843134, -0.023552168160676956, -0.006452298257499933, 0.014409501105546951, 0.04115210846066475, -0.03475809469819069, -0.06053780019283295, -0.011011513881385326, -0.06707218289375305, 0.05311974883079529, 0.0005340653588064015, -0.04533139243721962, 0.0059040565975010395, -0.0310018602758646, -0.005491841118782759, 0.025176547467708588, 0.011640762910246849, -0.02228897623717785, 0.0012090253876522183, -0.00905686803162098, -0.06144634634256363, 0.017369750887155533, -0.004347304347902536, 0.039556220173835754, -0.048914652317762375, -0.030280539765954018, -0.061247412115335464, -0.0207145307213068, 0.009574782103300095, 0.008668315596878529, -0.0073595112189650536, 0.038047514855861664, -0.012979652732610703, 0.01022285781800747, -0.0855860784649849, 0.09269318729639053, 0.0022082156501710415, -0.06624956429004669, 0.03485480323433876, 0.024755990132689476, 0.05361153930425644, 0.041422974318265915, -0.03335879370570183, 0.07907110452651978, -0.024478113278746605, 0.04048433154821396, -0.016162114217877388, 0.06148265302181244, -0.007545581087470055, -0.03223293647170067, -0.036714840680360794, 0.06968764215707779, 0.0037417816929519176, 0.012919358909130096, 0.005824055522680283, 0.02275000512599945, -0.016317926347255707, -0.0026858565397560596, 0.06683555245399475, 0.028012940660119057, -0.007011973764747381, -0.029012102633714676, -0.013011138886213303, -0.0026978724636137486, 0.02695417031645775, 0.022670580074191093, 0.005801169667392969, -0.04950857162475586, -0.022368688136339188, 0.014919293113052845, -0.006348114926367998, 0.04292486980557442, 0.0708434209227562, -0.025885840877890587, 0.003181145526468754, 0.0635492131114006, -0.003355260007083416, 0.016313014551997185, -0.03403173387050629, 0.0007426099618896842, 0.03469713032245636, 0.027460025623440742, 0.012220812030136585, 0.04139214754104614, 0.017677094787359238, -0.028430206701159477, 0.009871933609247208, 0.04214649647474289, -0.009025556035339832, 0.012663597241044044, -0.04767630249261856, -0.04433571919798851, 0.07318815588951111, -0.05139441788196564, 0.04859008267521858, 0.019994759932160378, 0.07791142910718918, 0.023302245885133743, 0.054368432611227036, 0.0398663729429245, -0.07744164764881134, 0.05933481454849243, -0.00835163053125143, -0.004207278601825237, 0.019905146211385727, -0.00033332264865748584, 0.06432315707206726, 0.005465013440698385, 0.05082140490412712, 0.04904359206557274, -0.05608470365405083, -0.06995335966348648, -0.03665657714009285, -0.0020867371931672096, 0.04480350762605667, -0.045575544238090515, -0.008172060362994671, 0.06754975765943527, 0.05179167538881302, 0.04130580648779869, 0.0034815422259271145, 0.016604799777269363, -0.012325681746006012, -0.06449633836746216, -0.06382612138986588, 0.030874207615852356, -0.00523480586707592, -0.02527107112109661, -0.04362949728965759, 0.022829165682196617, -0.045777931809425354, -0.03520670905709267, 0.05155445262789726, -0.04502999782562256, 0.07687053829431534, 0.041567422449588776, 0.002022532746195793, -0.021380305290222168, 0.007117358036339283, -0.03595986217260361, 0.05393165722489357, -0.004450532607734203, -0.01871536672115326, -0.02680966630578041, -0.028673242777585983, 0.11870841681957245, 0.06056371331214905, -0.012356323190033436, -0.04260489344596863, 0.03046148642897606, -0.006396465934813023, -0.04053795337677002, -0.009256669320166111, -0.03986629471182823, 0.01117007341235876, -0.00039168502553366125, -0.03961630165576935, 0.007416958920657635, 0.004454613197594881, -0.017780939117074013, 0.02189692296087742, 0.08678320795297623, -0.045653149485588074, 0.04387188330292702, -0.009401991963386536, -0.005237286444753408, 0.0016717339167371392, -0.03862401470541954, -0.06614959239959717, 0.01413579098880291, -0.0025748256593942642, -0.011985229328274727, 0.037823233753442764, -0.052119433879852295, -0.05635562911629677, -0.02504632994532585, -0.04044812545180321, 0.03922111168503761, 0.032593242824077606, 0.04026034474372864, -0.01842246763408184, 0.0012794561916962266, -0.028050215914845467, 0.012807482853531837, -0.00674062455072999, -0.04126615449786186, -0.009181146509945393, -0.009088188409805298, 0.014104072004556656, 0.02048713155090809, 0.011937262490391731, 0.006395585834980011, 0.030397538095712662, 0.02044011279940605, 0.013307820074260235, 0.011604147031903267, 0.030059222131967545, 0.028564883396029472, -0.01486574113368988, -0.009298132732510567, -0.03406061604619026, 0.045614082366228104, -0.05713142082095146, -0.006506947800517082, 0.0009551986586302519, -0.055169347673654556, 0.024810856208205223, -0.05720727518200874, -0.03359502553939819, -0.022617202252149582, 0.02667197585105896, 0.04755953699350357, 0.006364861037582159, 0.013039552606642246, 0.05462430790066719, 0.023787034675478935, -0.012343833222985268, 0.026231886819005013, 0.007145882584154606, 0.031758662313222885, -0.01587177813053131, 0.051334261894226074, 0.04521150141954422, 0.012321080081164837, -0.0245576910674572, -0.04079970717430115, 0.009350920096039772, -0.05057496577501297, -0.2799486219882965, 0.027738329023122787, -0.0012009775964543223, -0.03663048520684242, 0.010614542290568352, 0.014516112394630909, 0.004142738878726959, -0.058770984411239624, -0.016690460965037346, 0.007120384834706783, -0.025772806257009506, -0.037536393851041794, 0.006847122684121132, 0.034582339227199554, -0.014781642705202103, 0.0225489791482687, -0.03514278307557106, -0.02498920075595379, -0.0042834533378481865, -0.00598978390917182, -0.0355086550116539, -0.04447058588266373, -0.024707496166229248, 0.031128650531172752, 0.01819484867155552, -0.016492141410708427, -0.08186667412519455, 0.0553712323307991, -0.031470783054828644, -0.007588251028209925, 0.009921032935380936, -0.02784292958676815, 0.0189705528318882, -0.01827755756676197, 0.003206590423360467, 0.024985067546367645, 0.01497338991612196, 0.008953483775258064, 0.023741623386740685, 0.011454884894192219, -0.01765395887196064, -0.056615427136421204, -0.013773620128631592, -0.013249107636511326, 0.08010563254356384, 0.007142871152609587, -0.0842806026339531, -0.004120552446693182, -0.0013424004428088665, 0.0721970871090889, -0.026922399178147316, -0.04236928001046181, -0.009502295404672623, 0.0390799343585968, -0.014664383605122566, 0.03376872465014458, 0.01260166335850954, -0.0033296789042651653, -0.013973274268209934, -0.007984929718077183, -0.009659905917942524, -0.018818819895386696, -0.006992883514612913, -0.06463155150413513, -0.0065140193328261375, -0.05351727828383446, -0.04002132639288902, 0.0005396438646130264, 0.07825078070163727, 0.03952097147703171, -0.06640750169754028, 0.026194913312792778, -0.017447272315621376, -0.1020267903804779, -0.0006513684638775885, -0.048614244908094406, -0.03514788672327995, -0.005749512929469347, -0.013415968045592308, 0.05999554693698883, -0.025675930082798004, -0.05077458545565605, 0.023855946958065033, -0.007014865521341562, 0.01128353551030159, -0.029169291257858276, -0.005052549764513969, -0.03031265363097191, -0.0387774333357811, -0.030398881062865257, 0.0436776839196682, -0.033085327595472336, -0.006773102097213268, -0.022621426731348038, -0.0478442907333374, 0.05812021344900131, 0.015831120312213898, 0.0073862443678081036, 0.013414996676146984, 0.04866716265678406, -0.004101133905351162, -0.06241944059729576, -0.007260078564286232, -0.05313333868980408, -0.018411176279187202, -0.003988396376371384, -0.07517360895872116, 0.011655869893729687, 0.022427532821893692, 0.008712809532880783, 0.01772809773683548, -0.042145922780036926, 0.025750229135155678, -0.047972965985536575, -0.03626534715294838, 0.005404511000961065, 0.0326097272336483, 0.03186039626598358, -0.004824148025363684, -0.024721240624785423, -0.055309511721134186, -0.0031756507232785225, 0.018063707277178764, -0.0067763361148536205, -0.022899270057678223, -0.03559645637869835, 0.011197487823665142, 0.017300432547926903, -0.0057444022968411446, 0.010076322592794895, -0.01372740138322115, 0.014251659624278545, 0.04964124411344528, -0.029667166993021965, 0.02932928316295147, -0.029425757005810738, -0.03488332778215408, -0.021316472440958023, 0.025011075660586357, 0.013791143894195557, -0.015156150795519352, 0.001205494161695242, -0.0032680786680430174, 0.04188389331102371, 0.019203050062060356, -0.0013399028684943914, 0.05794886127114296, -0.003457981161773205, 0.004799260757863522, 0.003824694314971566, 0.05033380910754204, -0.009736141189932823, 0.019371388480067253, -0.01922893151640892, -0.023090632632374763, 0.017413869500160217, 0.04389283061027527, -0.010871333070099354, -0.005457413382828236, -0.0381520576775074, 0.030145389959216118, -0.051918067038059235, -0.015485805459320545, -0.009440512396395206, -0.0014822636730968952, 0.050022684037685394, 0.0018338920781388879, -0.007045213598757982, -0.004817015491425991, -0.003120847512036562, -0.009425485506653786, 0.011201560497283936, -0.025823067873716354, 0.023189272731542587, 0.008721498772501945, 0.005145162809640169, 0.004940628074109554, 0.0283818319439888, 0.012126733548939228, -0.012417626567184925, 0.01973791792988777, -0.017659729346632957, 0.006591925397515297, 0.02164675109088421, 0.030362937599420547, 0.032340191304683685, -0.036138538271188736, 0.0014039775123819709, 0.019728684797883034, -0.012844786047935486, -0.0345505066215992, 0.010409008711576462, -0.011594220995903015, 0.010707237757742405, 0.011699014343321323, -0.06735438853502274, 0.02635917253792286, 0.02847965434193611, -0.021705161780118942, -0.0034613688476383686, -0.003318100469186902, 0.02660498581826687, -0.03770279511809349, 0.014985177665948868, 0.08345459401607513, -0.0438750796020031, 0.018651461228728294, -0.01832859218120575, 0.007687795907258987, -0.0036628807429224253, 0.02128751203417778, -0.0724368765950203, -0.006715026684105396, 0.008032960817217827, -0.016172200441360474, -0.030866341665387154, -0.03447040170431137, -0.01176235731691122, -0.014668040908873081, 0.010753164999186993, 0.017223002389073372, -0.00504888454452157, -0.009315156377851963, 0.00040244380943477154, -0.050162460654973984, 0.043298058211803436, 0.019108833745121956, 0.01371587160974741, 0.021007239818572998, -0.004912889562547207, 0.01954525336623192, -0.02773107960820198, 0.026760220527648926, 0.004895174875855446, -0.031067542731761932, -0.009797572158277035, -0.03994189202785492, -0.0031245769932866096, -0.016863539814949036, 0.07070864737033844, 0.014655115082859993, 0.005196320358663797, -0.042528606951236725, 0.01358095370233059, -0.006392278242856264, 0.01260269246995449, -0.006594330538064241, -0.034207120537757874, 0.016765277832746506, 0.047193098813295364, -0.0008212666725739837, 0.02750471606850624, -0.006156015209853649, -0.0248469989746809, 0.0649745911359787, -0.05507740378379822, -0.025493621826171875, -0.006820259615778923, -0.041416630148887634, 0.01916983351111412, 0.029567165300250053, 0.011768763884902, -0.0620088055729866, 0.0739160031080246, 0.02712428942322731, 0.01268860138952732, 0.03957853466272354, 0.0031920468900352716, 0.03550614416599274, -0.02519826404750347, -0.005130822770297527, -0.07538323104381561, -0.005761291366070509, 0.06584873050451279, -0.020455097779631615, 0.001088236807845533, -0.028570977970957756, -0.06658969074487686, 0.005758600775152445, -0.07514924556016922, -0.02207368053495884, 0.037335433065891266, -0.012920021079480648, -0.004781646188348532, -0.004556565545499325, -0.033836476504802704, 0.00814629253000021, 0.01949334517121315, -0.036590494215488434, -0.04213074967265129, 0.0022405788768082857, 0.03745279833674431, 0.008610536344349384, 0.03584860637784004, -0.01660250313580036, -0.051775019615888596, 0.08251244574785233, 0.009572763927280903, 0.03274310380220413, 0.03279103338718414, -0.015709390863776207, 0.05468899384140968, 0.024595489725470543, -0.011218390427529812, 0.012917346321046352, 0.037414681166410446, -0.01965726725757122, -0.057737816125154495, 0.03775680437684059, 0.008740323595702648, 0.01188770029693842, -0.05783393979072571, 0.05728776007890701, 0.007188581395894289, -0.04299399256706238, -0.02995394356548786, 0.03023795410990715, -0.04280471429228783, -0.025564996525645256, -0.01318898145109415, 0.03403610736131668, -0.07381435483694077, 0.06266040354967117, -0.05060600861907005, -0.0030335402116179466, 0.06377018988132477, -0.01889510452747345, 0.013385317288339138, 0.0051252394914627075, 0.07367143779993057, 0.07802969962358475, 0.030475161969661713, 0.00606814119964838, 0.05655307695269585, -0.010739755816757679, -0.033411331474781036, -0.02658187225461006, -0.0046480135060846806, -0.04031011089682579, -0.01338196825236082, 0.009239569306373596, 0.06926160305738449, 0.009261070750653744, 0.08572438359260559, -0.013820621185004711, -0.004279277287423611, -0.010907027870416641, 0.0182235948741436, 0.013830743730068207, 0.03657675161957741, 0.002716226037591696, 0.027408765628933907, 0.031395453959703445, -0.05979308858513832, -0.004699879791587591, 0.028639765456318855, -0.023455597460269928, 0.02231258898973465, -0.0019327659392729402, 0.023554638028144836, 0.0507623516023159, 0.016441332176327705, 0.0675613135099411, -0.018798884004354477, -0.02659175544977188, -0.013514840975403786, 0.023691706359386444, -0.02359364740550518, -0.0034014051780104637, -0.04445081949234009, 0.005163860972970724, -0.01647253707051277, -0.0674121230840683, -0.016413835808634758, -0.034323446452617645, -0.025805111974477768, 0.021497230976819992, -0.017656821757555008, 0.016792066395282745, 0.020080404356122017, -0.024949388578534126, -0.06629738956689835, -0.05472171679139137, -0.07244042307138443, -0.05359151214361191, -0.046317726373672485, -0.021052945405244827, -0.020285900682210922, -0.006735510658472776, -0.05169615522027016, -0.041852936148643494, -0.024567795917391777, -0.010785887949168682, 0.01501179113984108, -0.06241946294903755, -0.025168444961309433, 0.04915015026926994, 0.0005948251928202808, -0.019111808389425278, 0.012112266384065151, 0.062128420919179916, 0.03209266439080238, -0.0007374050328508019, -0.01431594230234623, 0.007155351806432009, 0.03624137490987778, -0.003906313795596361, -0.02755136229097843, -0.061432499438524246, 0.02571970410645008, 0.0416349358856678, -0.024714628234505653, -0.06873474270105362, 0.015080047771334648, 0.03446066379547119, 0.020609285682439804, 0.047613900154829025, -0.02653219923377037, 0.03196147829294205, -0.03006994165480137, -0.0433284156024456, -0.012405481189489365, 0.0264839306473732, 0.049241844564676285, 0.011669542640447617, 0.07734761387109756, 0.08753874152898788, -0.0033241277560591698, 0.0021439334377646446, -0.03296078369021416, -0.019506411626935005, 0.015274470672011375, -0.03647049143910408, -0.017724644392728806, -0.0651271715760231, -0.04546188935637474, 0.009768552146852016, 0.020812097936868668, -0.012448843568563461, -0.03326142206788063, 0.033420588821172714, 0.019842037931084633, 0.013850599527359009, 0.02278728410601616, -0.04189325124025345, 0.017184173688292503, -0.0398566760122776, -0.03516876697540283, -0.016340047121047974, 0.03486890718340874, 0.0009395335800945759, -0.034997522830963135, -0.017362158745527267, -0.029553454369306564, 0.012926280498504639, -0.023286398500204086, 0.07041565328836441, 0.0417829193174839, -0.030698999762535095, -0.013406194746494293 ]
[ -0.06554879248142242, -0.04939283803105354, -0.021729037165641785, -0.030974000692367554, 0.08712626248598099, -0.07293088734149933, -0.02856726013123989, 0.024607867002487183, -0.03264873847365379, 0.005350745748728514, -0.01864776946604252, -0.07992899417877197, -0.004707943182438612, -0.05438404902815819, 0.10400006175041199, -0.029242023825645447, -0.06075819209218025, -0.06180782616138458, -0.014040744863450527, -0.002928748494014144, 0.016310444101691246, -0.019515251740813255, -0.028044113889336586, -0.03159800171852112, 0.03154562786221504, 0.03324016183614731, 0.06858724355697632, -0.012929297983646393, -0.017550736665725708, -0.19949308037757874, 0.04055425152182579, -0.016886001452803612, -0.0015560812316834927, 0.020072845742106438, -0.024856751784682274, 0.03578345105051994, 0.005867560859769583, 0.023503502830863, 0.0042595695704221725, 0.06256619840860367, 0.022150199860334396, -0.003720786888152361, -0.052795205265283585, -0.027499018236994743, -0.018863828852772713, -0.026590336114168167, -0.00317959813401103, -0.026366135105490685, 0.001955099869519472, 0.007680035196244717, -0.026304319500923157, 0.023753046989440918, -0.004565378185361624, -0.028770530596375465, 0.027949869632720947, -0.0030750303994864225, 0.03142693266272545, 0.034785620868206024, 0.03615549951791763, 0.005482828244566917, 0.021203329786658287, 0.0044644377194345, -0.1491796225309372, 0.09192127734422684, -0.04744315892457962, 0.05235086753964424, -0.047051869332790375, -0.0170150063931942, -0.043344736099243164, 0.04896542429924011, -0.01814601756632328, -0.03522363677620888, -0.019217485561966896, 0.07137888669967651, 0.02891307882964611, 0.012120424769818783, -0.02440812811255455, 0.027688365429639816, -0.0017159675480797887, -0.016189562156796455, -0.004503386095166206, 0.03440150246024132, -0.054537978023290634, -0.01210505235940218, -0.0751592218875885, -0.015540949068963528, 0.00641212984919548, 0.045129671692848206, 0.046050988137722015, 0.0063051097095012665, -0.014282864518463612, -0.014055977575480938, 0.04137573391199112, 0.009509212337434292, -0.07627695053815842, -0.00690122228115797, -0.016263766214251518, 0.0064488681964576244, -0.022942617535591125, 0.3677142560482025, -0.009469502605497837, -0.028476258739829063, -0.023063264787197113, 0.09005583822727203, 0.018681654706597328, -0.000027635123842628673, -0.03878183290362358, 0.0035562063567340374, 0.05022408813238144, -0.011572453193366528, 0.0008258743910118937, -0.010619006119668484, 0.061914362013339996, -0.03763878345489502, 0.02540709637105465, 0.02873321808874607, 0.004391255788505077, 0.05213801562786102, -0.03489045053720474, 0.06422805786132812, 0.014602480456233025, -0.003923214040696621, 0.03527069464325905, 0.02732185274362564, 0.04926929995417595, 0.02556728944182396, 0.009086021222174168, 0.06735460460186005, 0.03759836405515671, 0.026271317154169083, -0.008877360261976719, -0.04455653950572014, -0.059792645275592804, 0.0006870727520436049, 0.018364405259490013, 0.024490099400281906, 0.02789396047592163, -0.01925472542643547, 0.014778881333768368, -0.010774031281471252, -0.05022062733769417, -0.04326744005084038, 0.03001323714852333, 0.02101830206811428, -0.02197946608066559, 0.09584973752498627, 0.017089100554585457, 0.016673333942890167, -0.018265830352902412, -0.028714073821902275, 0.019490020349621773, 0.028725989162921906, -0.005767911206930876, -0.06859203428030014, 0.0372241735458374, 0.0038050354924052954, 0.0449233315885067, -0.008869395591318607, -0.0847020298242569, -0.018563132733106613, -0.049689359962940216, -0.0917152538895607, -0.036811407655477524, 0.02524052932858467, 0.027091067284345627, -0.09959883242845535, -0.035625241696834564, 0.018931057304143906, 0.028334680944681168, -0.003187794703990221, -0.017099644988775253, -0.006125412415713072, -0.011126838624477386, -0.024019083008170128, 0.025134894996881485, -0.00829669926315546, -0.024959858506917953, 0.018109427765011787, 0.00900997407734394, -0.01379048079252243, -0.014002392068505287, 0.0017142423894256353, -0.01855023205280304, -0.0006258507492020726, -0.002177278511226177, -0.10027462989091873, -0.05592021718621254, -0.0074625564739108086, -0.036630917340517044, -0.020827466621994972, -0.045222558081150055, -0.0006944135529920459, -0.022958261892199516, 0.050175100564956665, 0.026527458801865578, -0.0024893302470445633, -0.006299632601439953, 0.057934824377298355, 0.038716576993465424, -0.05698241665959358, 0.028888577595353127, 0.09057065099477768, -0.017679525539278984, -0.0011775702005252242, -0.07429243624210358, 0.03662052005529404, 0.03767972066998482, -0.04028960317373276, 0.016422249376773834, 0.017000628635287285, -0.02008318156003952, 0.0006471340311691165, -0.03646068274974823, 0.04937785863876343, -0.032570648938417435, 0.005578762851655483, -0.014567862264811993, 0.05614965036511421, 0.007732279133051634, 0.011238323524594307, -0.00623475993052125, -0.009169068187475204, -0.03706309199333191, -0.3927527368068695, 0.028705615550279617, -0.0006350456387735903, -0.03792450204491615, 0.02420119009912014, -0.055388808250427246, -0.0028738940600305796, -0.008818432688713074, 0.027594787999987602, 0.012808653526008129, 0.0818888247013092, -0.03446293994784355, 0.02282513864338398, -0.05124757066369057, 0.004853661172091961, 0.028175875544548035, -0.0026802290230989456, -0.047029927372932434, -0.0235787071287632, 0.023871174082159996, -0.021323425695300102, -0.022517908364534378, -0.0008321957429870963, -0.019350750371813774, 0.00531023507937789, -0.0036595987621694803, 0.09970710426568985, 0.007879962213337421, 0.10176525264978409, -0.062308914959430695, 0.03768104687333107, 0.028413262218236923, 0.0045041535049676895, -0.06771233677864075, 0.005820517893880606, -0.045012909919023514, 0.006166649051010609, 0.017325662076473236, 0.010143368504941463, -0.004799604881554842, -0.0028506636153906584, 0.052877046167850494, -0.05195339769124985, -0.07062423229217529, -0.015240203589200974, -0.015924550592899323, -0.03069092333316803, 0.019438721239566803, -0.034462686628103256, 0.08346259593963623, 0.004084980580955744, 0.07999754697084427, 0.0142371179535985, 0.056411728262901306, 0.03548243269324303, -0.003307377453893423, -0.06170826405286789, -0.025558436289429665, 0.02719462849199772, 0.0060177394188940525, 0.050798386335372925, 0.04122067242860794, 0.013727455399930477, -0.060958366841077805, 0.011933017522096634, -0.009756616316735744, 0.00016750878421589732, 0.04083196818828583, 0.09102801233530045, 0.0010866954689845443, 0.003194146091118455, 0.12957538664340973, -0.02461613342165947, 0.02324974536895752, 0.0781116634607315, 0.0815909281373024, -0.04393662512302399, -0.03352712467312813, -0.015636591240763664, 0.014649725519120693, 0.06244812533259392, -0.011758983135223389, 0.04268626496195793, -0.03981407731771469, 0.003347204066812992, 0.07248145341873169, -0.020670147612690926, -0.004306989721953869, 0.040276288986206055, -0.015066903084516525, -0.026622317731380463, -0.025130758062005043, -0.02910170890390873, -0.03855092078447342, 0.06791968643665314, 0.019781161099672318, -0.25748735666275024, -0.006604793947190046, 0.0633842945098877, 0.022941941395401955, 0.005991792771965265, -0.0158312376588583, 0.005494366865605116, -0.06697263568639755, 0.003937508445233107, 0.00946330837905407, -0.029503414407372475, 0.005025251768529415, 0.01505048293620348, -0.0009637411567382514, 0.041429825127124786, 0.019003156572580338, 0.054536979645490646, 0.009187542833387852, -0.01692970283329487, -0.04452132806181908, 0.020139489322900772, -0.04355071112513542, 0.13759562373161316, 0.07233312726020813, -0.06343558430671692, 0.006123245693743229, 0.0006482662865892053, 0.027517395094037056, 0.06193844601511955, 0.03269520401954651, -0.0032683268655091524, 0.012413762509822845, 0.07991248369216919, -0.003192963544279337, 0.059955351054668427, -0.045020997524261475, -0.042212098836898804, -0.002135004149749875, 0.02801421843469143, -0.05075109377503395, -0.059027478098869324, 0.0089422557502985, -0.03844644874334335, 0.009962723590433598, 0.051420316100120544, -0.019596561789512634, -0.013378527015447617, -0.06519429385662079, -0.04051343351602554, -0.02878653258085251, -0.015129619278013706, -0.019481223076581955, 0.023617582395672798, 0.04380683973431587, 0.00812474638223648, 0.04409683495759964, 0.02265290357172489, -0.0028555127792060375, -0.021764375269412994, 0.009028099477291107, 0.041932363063097, -0.03273005411028862, 0.07944238185882568, 0.03509997949004173, 0.002985646715387702 ]
[ 0.028244657441973686, 0.001651125494390726, -0.03068261407315731, 0.04458213225007057, -0.007661344949156046, 0.0037610752042382956, 0.0064847636967897415, 0.02055026963353157, 0.009566177614033222, -0.000801303016487509, -0.00684395432472229, -0.014799058437347412, -0.02419876679778099, -0.03814169391989708, -0.045878466218709946, -0.05235256254673004, 0.036092255264520645, -0.0007225325098261237, 0.019217737019062042, -0.024143017828464508, -0.02811243198812008, 0.04408521577715874, 0.008143012411892414, -0.0033485721796751022, 0.010160914622247219, -0.0016630140598863363, -0.04905017092823982, 0.05506918579339981, 0.0465896911919117, -0.11267556995153427, -0.04726094380021095, -0.023770827800035477, 0.022021029144525528, -0.0006772223860025406, 0.012321466580033302, 0.009987428784370422, -0.03566652163863182, -0.029061198234558105, -0.04689021781086922, -0.01631099171936512, 0.03639731928706169, -0.03579214587807655, -0.011899170465767384, 0.04363959655165672, -0.024715615436434746, -0.02216438576579094, -0.04092980921268463, -0.000970348424743861, -0.01579345017671585, -0.023189352825284004, -0.04528282210230827, 0.024234134703874588, 0.032589513808488846, 0.006637509446591139, 0.016786351799964905, 0.02612711489200592, -0.03673727437853813, -0.004490463063120842, 0.009368871338665485, 0.006438445299863815, -0.012640696950256824, 0.04797777533531189, -0.02807699516415596, -0.02811153419315815, -0.03607330098748207, -0.019015038385987282, 0.01905038207769394, 0.01569034904241562, -0.0130747240036726, 0.044953346252441406, -0.0242332611232996, 0.011386962607502937, -0.04106944054365158, -0.005720048677176237, -0.012033313512802124, 0.025054682046175003, -0.004220080561935902, -0.022826317697763443, -0.015362353064119816, 0.019374806433916092, -0.020995857194066048, -0.0397576168179512, 0.007185745518654585, -0.020677052438259125, -0.03751480579376221, -0.057541053742170334, 0.009891856461763382, -0.014605263248085976, 0.02293446473777294, 0.00798039697110653, -0.01827159710228443, 0.013480576686561108, 0.0282738134264946, -0.028074204921722412, -0.05898876488208771, 0.03316299617290497, -0.013048287481069565, -0.029749559238553047, -0.01323242299258709, 0.8042523264884949, -0.019936662167310715, -0.025594085454940796, 0.01530988235026598, 0.03217630833387375, -0.00800347700715065, -0.03720850870013237, -0.019096067175269127, -0.014973415993154049, 0.0012115181889384985, 0.0176995899528265, 0.016778936609625816, 0.04111327603459358, 0.0371055081486702, -0.0031226815190166235, 0.08437313884496689, 0.04497108981013298, 0.010074642486870289, 0.007676813285797834, -0.0129851708188653, 0.021962080150842667, 0.03271080553531647, -0.05243223160505295, 0.016026349738240242, 0.014422970823943615, 0.005030515603721142, -0.18801341950893402, 0.04754805192351341, -6.69140314440399e-33, 0.06672322005033493, -0.05136938765645027, 0.002851122757419944, 0.019626691937446594, 0.02699008584022522, 0.022803718224167824, 0.009269745089113712, -0.0025849982630461454, -0.018733084201812744, -0.04380127415060997, -0.0017417293274775147, -0.002174310851842165, -0.018504386767745018, 0.01429824810475111, 0.03538518399000168, 0.015252945013344288, -0.03183675929903984, 0.03664525970816612, 0.010985968634486198, 0.03129618614912033, 0.038734983652830124, 0.017641793936491013, -0.008066731505095959, 0.05088907480239868, 0.015101651661098003, 0.004808633588254452, 0.012444068677723408, -0.028942305594682693, 0.023473361507058144, -0.0389569029211998, -0.03690820559859276, 0.07086855173110962, -0.0025075513403862715, -0.06933844089508057, -0.021091174334287643, -0.06503156572580338, -0.06594231724739075, 0.0015938831493258476, -0.0347396545112133, 0.0022756352555006742, 0.014193998649716377, 0.00338550191372633, -0.0389486663043499, -0.049960024654865265, -0.02332482300698757, 0.022383851930499077, 0.03260357305407524, 0.03066999837756157, -0.004109787754714489, 0.010172116570174694, 0.03997587785124779, -0.00250997650437057, 0.04597995802760124, 0.023009706288576126, 0.04916274547576904, 0.061281293630599976, -0.0002467854355927557, -0.011333306320011616, -0.00010338508582208306, -0.016203144565224648, 0.00000396208952224697, -0.011334926821291447, 0.028847476467490196, -0.00035821873461827636, -0.005670580081641674, -0.024035312235355377, 0.013390113599598408, 0.009719831869006157, -0.01726343110203743, 0.04045668616890907, -0.043470416218042374, -0.007224423345178366, -0.03851022943854332, -0.02390161156654358, 0.014073299244046211, -0.03206348791718483, -0.004340185783803463, -0.012205464765429497, 0.00006266455602599308, 0.019173618406057358, -0.00911057461053133, 0.016551904380321503, 0.049169912934303284, -0.06810566037893295, 0.01660158671438694, -0.04003720358014107, -0.01676129549741745, -0.002684445586055517, -0.02755960449576378, -0.019628584384918213, 0.01176286768168211, 0.06174703687429428, 0.016274040564894676, -0.012593340128660202, -0.030448105186223984, 6.250758066738717e-33, 0.0009847106412053108, -0.01894323341548443, -0.029306769371032715, 0.030083710327744484, -0.01433422788977623, -0.018671683967113495, 0.038051750510931015, 0.023863403126597404, 0.010072409175336361, 0.02340206503868103, -0.03534701094031334, -0.014229679480195045, -0.009045957587659359, -0.004065066576004028, 0.03444093093276024, -0.029263727366924286, 0.0015208132099360228, -0.010075585916638374, 0.02333611063659191, -0.005145035684108734, -0.027941696345806122, 0.016678299754858017, 0.025519249960780144, 0.015301451086997986, 0.03916265070438385, -0.0024713471066206694, -0.0051228380762040615, 0.04249282553792, -0.061674173921346664, -0.04106229543685913, 0.033609360456466675, -0.027260394766926765, 0.019763275980949402, -0.018633626401424408, -0.028844796121120453, 0.029349088668823242, 0.03686976805329323, -0.024884937331080437, -0.0068046934902668, -0.011318990960717201, 0.04190512001514435, 0.030355481430888176, 0.009266077540814877, 0.016979746520519257, -0.030986325815320015, -0.009068542160093784, 0.01650424115359783, 0.002525890711694956, 0.012724701315164566, -0.05323062464594841, -0.008027107454836369, -0.02288839779794216, -0.0036615401040762663, 0.049922846257686615, -0.01727478951215744, 0.007920908741652966, -0.009120220318436623, 0.0289311520755291, -0.04254172369837761, 0.041578441858291626, -0.01363464631140232, -0.017676016315817833, 0.027095219120383263, -0.004538239911198616, -0.017742818221449852, 0.003093356266617775, 0.03315978869795799, 0.05132918804883957, -0.03278891742229462, -0.03884207829833031, 0.005838072393089533, -0.019976306706666946, -0.013821902684867382, 0.07918797433376312, 0.06645335257053375, 0.01883012428879738, -0.0001814053684938699, -0.0019840074237436056, 0.0005198839353397489, -0.00952372420579195, 0.01288691721856594, 0.005418040789663792, -0.014842137694358826, -0.006475307513028383, 0.007446757983416319, -0.007375173736363649, -0.015538363717496395, -0.009015941992402077, 0.03129318729043007, 0.027643553912639618, -0.022257022559642792, -0.018125930801033974, 0.008739269338548183, 0.006770470179617405, -0.0031399705912917852, -1.2289669726328611e-8, 0.013769080862402916, 0.021111691370606422, -0.0054877339862287045, 0.039199210703372955, 0.009272332303225994, 0.0031474316492676735, -0.021285178139805794, 0.0020865006372332573, 0.009292825125157833, -0.0068595693446695805, -0.005439458414912224, -0.030619999393820763, 0.012307949364185333, 0.05538439378142357, 0.06887168437242508, -0.02672840841114521, -0.04694533720612526, -0.007220161147415638, 0.008424666710197926, -0.017691535875201225, 0.030465740710496902, 0.013471057638525963, -0.005133531056344509, -0.03789496421813965, 0.0010200826218351722, 0.011821169406175613, 0.026462508365511894, -0.07864373177289963, -0.0327007994055748, -0.009989113546907902, -0.015055895783007145, -0.027475178241729736, -0.02361595444381237, 0.008807539008557796, -0.043349508196115494, -0.013722737319767475, 0.017297087237238884, -0.015463942661881447, 0.002543647540733218, 0.014140753075480461, 0.012103565037250519, 0.000944223371334374, -0.03928784281015396, -0.040381163358688354, -0.031142234802246094, 0.044899940490722656, -0.040563106536865234, 0.05092812702059746, 0.045208510011434555, 0.014857610687613487, 0.016383014619350433, 0.0014050587778910995, 0.016610857099294662, 0.02078956551849842, 0.04281655326485634, -0.04016038775444031, 0.022960247471928596, -0.008327190764248371, 0.0258495956659317, -0.005183816887438297, 0.02300538308918476, -0.0064185126684606075, -0.017382748425006866, -0.010107288137078285 ]
confluent-kafka-avroproducer-deprecated-use-avroserializer
https://markhneedham.com/blog/2023/07/25/confluent-kafka-avroproducer-deprecated-use-avroserializer
false
2023-09-03 00:44:37
JupyterLab 4.0.5: Scroll output with keyboard shortcut
[ "jupyterlab", "til" ]
[ "TIL" ]
:icons: font In the latest version of Jupyter Notebook/Lab (at least), the output of each cell is shown in full, regardless of how long it is. I wanted to limit the height of the output and then scroll through it within that inner window, ideally by triggering a keyboard shortcut. I learnt how to do this with the help of https://stackoverflow.com/questions/59025144/how-do-i-set-a-shortcut-to-enable-scrolling-for-outputs-in-jupyter-lab[Stack Overflow]. First, you need to open the settings editor by typing `Cmd + ,` on a Mac or by clicking on that screen from the top menu: .Settings > Settings Editor image::{{<siteurl>}}/uploads/2023/09/settings-editor.png[] Next, click on `JSON Settings Editor` in the top right-hand corner: .JSON Settings Editor image::{{<siteurl>}}/uploads/2023/09/json-settings-editor.png[] And then paste the following JSON into the `shortcuts` array: [source, json] ---- { "command": "notebook:enable-output-scrolling", "keys": [ "S" ], "selector": ".jp-Notebook:focus", "args": {} }, { "command": "notebook:disable-output-scrolling", "keys": [ "Alt S" ], "selector": ".jp-Notebook:focus", "args": {} }, ---- This is how it should look like once you've done that: .Keyboard shortcuts added image::{{<siteurl>}}/uploads/2023/09/json-edited.png[] You can then add a scrollbar to an output cell by pressing `s` or remove the scrollbar by pressing `Alt + s`. Below is an example of what happens when you toggle output scrolling: .No scrollbar vs Scrollbar image::{{<siteurl>}}/uploads/2023/09/scrollbar-noscrollbar.png[]
In this post, we'll learn how to make the output of a Jupyterlab cell scrollable with a keyboard shortcut.
uploads/2023/09/jupyter-scroll.png
[ -0.03314096853137016, -0.0006751744076609612, -0.01094975695014, -0.005663509014993906, 0.07011229544878006, 0.029974056407809258, 0.02022312954068184, 0.041473809629678726, -0.026509370654821396, -0.03276090323925018, -0.03898082301020622, -0.0002196958230342716, -0.06381315737962723, 0.022614454850554466, -0.021504275500774384, 0.073867067694664, 0.07292115688323975, -0.002611711388453841, 0.04822620004415512, 0.018940705806016922, 0.06880321353673935, 0.05394021049141884, 0.007639486342668533, 0.023708313703536987, 0.014961224980652332, -0.021442726254463196, -0.016362851485610008, -0.0007008215761743486, -0.05684532970190048, -0.009552543982863426, 0.005445342510938644, -0.03652644529938698, 0.005121465306729078, -0.006117165554314852, 0.0421929694712162, 0.002432197565212846, -0.020661355927586555, 0.013271700590848923, -0.010288797318935394, 0.035062484443187714, -0.07284609973430634, -0.012257829308509827, -0.02214731276035309, 0.0054997652769088745, -0.03313884139060974, 0.0050354814156889915, -0.05078168585896492, 0.01093484740704298, -0.021553916856646538, 0.007297615986317396, -0.04386674612760544, 0.06200043857097626, 0.02222936786711216, -0.0691174790263176, 0.013451160863041878, 0.05550365149974823, 0.04460661858320236, -0.05671709030866623, 0.02606988698244095, -0.06135103851556778, 0.021193334832787514, -0.021985722705721855, 0.015966219827532768, 0.054277971386909485, -0.011557109653949738, -0.022239472717046738, 0.012415314093232155, 0.04277220368385315, -0.06934615969657898, -0.010357202962040901, -0.013590555638074875, 0.03335675224661827, -0.024266498163342476, -0.01038334984332323, 0.014123858883976936, -0.0373968780040741, -0.019223609939217567, 0.04990876838564873, 0.02975255250930786, 0.04595364257693291, 0.007273978088051081, -0.0008201198652386665, 0.01442102249711752, 0.07261088490486145, -0.0037974060978740454, -0.04454823210835457, -0.07295013219118118, 0.001794196548871696, -0.0523286871612072, 0.026459578424692154, -0.000485270720673725, -0.024330371990799904, 0.01720946468412876, 0.014367951080203056, -0.010567622259259224, 0.0012275741901248693, -0.01933051086962223, 0.00613699434325099, -0.0276490468531847, 0.027379533275961876, -0.04990518093109131, -0.05104703828692436, 0.02125304937362671, 0.050420816987752914, -0.07672825455665588, -0.025733863934874535, -0.026559866964817047, -0.006832493469119072, 0.00969421211630106, 0.012811199761927128, 0.0006510324310511351, -0.03540971130132675, -0.03136356174945831, 0.0025103725492954254, -0.08255717158317566, 0.053422994911670685, 0.020971493795514107, 0.010970710776746273, 0.0032627154141664505, 0.025426553562283516, 0.019439417868852615, 0.05423751845955849, 0.0010836763540282845, 0.06564746797084808, 0.006702874321490526, 0.01056866254657507, -0.001642047893255949, 0.03718670830130577, 0.0023930042516440153, -0.05933888256549835, 0.022964244708418846, 0.06177297607064247, -0.006864192895591259, 0.004863179754465818, 0.007380188908427954, -0.0030607839580625296, 0.04256723076105118, 0.00444034906104207, 0.05467177554965019, 0.034909993410110474, -0.0010189007734879851, -0.04410972818732262, 0.007419757544994354, -0.002930860500782728, 0.01604541391134262, 0.009038493037223816, -0.025844501331448555, -0.03160955384373665, -0.043156255036592484, 0.007077781017869711, -0.0024143881164491177, 0.00018016992544289678, 0.0865263044834137, -0.011436954140663147, 0.021996179595589638, 0.08052123337984085, 0.037942346185445786, 0.02889311872422695, -0.002384793944656849, 0.025223232805728912, 0.030647551640868187, 0.0586220882833004, -0.02145887352526188, 0.04092741757631302, -0.00859012734144926, 0.001941979513503611, 0.019779134541749954, 0.029814517125487328, -0.034690435975790024, -0.028973989188671112, -0.03636370226740837, -0.035093750804662704, 0.08088112622499466, -0.02520304173231125, -0.02553749643266201, 0.04645698890089989, 0.09463801234960556, 0.012101140804588795, 0.019055036827921867, 0.04526705667376518, -0.07931254059076309, 0.017166603356599808, -0.023644499480724335, -0.006602366454899311, 0.05113748088479042, -0.011826114729046822, 0.0633348822593689, 0.041693251579999924, -0.0018632382852956653, -0.006513054016977549, -0.05418258532881737, -0.052512966096401215, -0.02862888015806675, 0.018182547762989998, 0.057292114943265915, -0.05298617482185364, -0.006499424576759338, 0.06487458199262619, 0.024828104302287102, 0.03407825529575348, -0.003074012463912368, -0.02052251808345318, 0.011621559970080853, -0.043234966695308685, -0.07402314245700836, 0.0024588843807578087, 0.029367772862315178, -0.020681841298937798, 0.0009457364794798195, 0.02942265011370182, -0.020178159698843956, -0.014445692300796509, 0.028967253863811493, 0.009939034469425678, 0.050066012889146805, 0.01269480586051941, 0.016772322356700897, -0.015877733007073402, 0.016994081437587738, -0.0765271782875061, 0.016261668875813484, 0.016376258805394173, 0.02795564942061901, -0.0292766522616148, 0.009554156102240086, 0.13041280210018158, 0.06311855465173721, -0.021261125802993774, -0.06839723140001297, 0.0012308269506320357, -0.009036715142428875, -0.06475436687469482, 0.023946844041347504, -0.01907605305314064, -0.03352200612425804, 0.028546255081892014, -0.049898672848939896, -0.01716671884059906, 0.040167469531297684, -0.045393262058496475, 0.017641156911849976, 0.06223025172948837, -0.009102122858166695, 0.03624974191188812, 0.03271709755063057, -0.02757902443408966, 0.04987598955631256, -0.0025943059008568525, -0.0513555109500885, 0.011999174952507019, 0.008884117938578129, 0.013942726887762547, 0.04889645054936409, -0.044036898761987686, 0.024507084861397743, 0.001759083243086934, -0.04196814075112343, 0.009327336214482784, 0.05101409927010536, 0.05677061900496483, -0.018559521064162254, 0.025092048570513725, 0.03321545571088791, -0.025423778221011162, -0.02475096844136715, -0.039034679532051086, -0.014173083938658237, -0.020102044567465782, 0.053552888333797455, -0.0007684352458454669, 0.0049872854724526405, -0.0037886910140514374, -0.008823735639452934, -0.021305853500962257, -0.016338659450411797, 0.02218608744442463, 0.035745952278375626, -0.00877809152007103, -0.012141048908233643, -0.04106421023607254, -0.009459910914301872, 0.03639555722475052, -0.02229997143149376, -0.03578741103410721, 0.03690648823976517, -0.05583473667502403, 0.01193177979439497, -0.06257062405347824, -0.03598214313387871, -0.032981161028146744, -0.026754170656204224, 0.0253837238997221, -0.007375691086053848, 0.030008839443325996, 0.02384847216308117, 0.034759726375341415, 0.03241855278611183, 0.012621359899640083, -0.034330714493989944, 0.039433833211660385, 0.024531325325369835, 0.03323578089475632, 0.06917277723550797, -0.02073918655514717, -0.0054876240901649, -0.021553849801421165, 0.005210264585912228, -0.05807698518037796, -0.250944048166275, 0.0043544042855501175, -0.006722406949847937, -0.03213045746088028, -0.0022003077901899815, -0.029042664915323257, 0.01902170106768608, -0.05563734099268913, -0.028181999921798706, -0.011370674706995487, -0.03348682075738907, -0.05762515217065811, -0.026557274162769318, 0.057270947843790054, 0.00035348808160051703, 0.01914176531136036, -0.002615339355543256, -0.01637662574648857, 0.02637438103556633, 0.01231430470943451, 0.010127482935786247, -0.06365735828876495, -0.02474949322640896, 0.04266595467925072, 0.03759099170565605, 0.04539209604263306, -0.03908691927790642, 0.023889601230621338, -0.0600871704518795, -0.036758903414011, -0.017631394788622856, -0.02566797472536564, -0.023162810131907463, -0.010663739405572414, -0.012407333590090275, -0.032268963754177094, 0.05401095747947693, -0.03407773748040199, 0.02291514165699482, 0.027785325422883034, 0.009234018623828888, -0.011566253378987312, -0.0033722855150699615, 0.02181364968419075, 0.07006465643644333, -0.036441922187805176, -0.043438807129859924, -0.0148664191365242, -0.06004156544804573, 0.07048942148685455, -0.0021503109019249678, -0.03200603276491165, -0.029467733576893806, 0.047985516488552094, -0.016009975224733353, -0.012503490783274174, -0.01390733104199171, 0.016186177730560303, -0.02816404029726982, -0.07322023808956146, -0.02181638777256012, -0.031367626041173935, -0.04807121679186821, -0.03881419077515602, 0.024316271767020226, -0.0603950209915638, -0.05230891704559326, -0.017820434644818306, 0.061388105154037476, 0.059082482010126114, -0.05142564699053764, -0.013689200393855572, -0.003385028336197138, -0.11118269711732864, -0.0045583052560687065, -0.03885138779878616, -0.0139445336535573, 0.014114536345005035, -0.032570283859968185, 0.05349087715148926, -0.04323462396860123, -0.03864845260977745, 0.045560434460639954, 0.028074000030755997, -0.022126127034425735, -0.033519431948661804, 0.011312948539853096, -0.029176393523812294, 0.013699189759790897, 0.00796024315059185, 0.0725574865937233, -0.04833686724305153, -0.008309450000524521, -0.03528178855776787, -0.014725033193826675, 0.022810952737927437, 0.014692994765937328, 0.0123746944591403, 0.027652565389871597, -0.014104210771620274, 0.01532841008156538, -0.05208176001906395, -0.007098310627043247, -0.02086297981441021, 0.006521559786051512, -0.01339398417621851, -0.07089951634407043, 0.05011961981654167, -0.0034534644801169634, 0.01419435441493988, -0.01551919523626566, -0.04314226657152176, 0.020433321595191956, -0.061603568494319916, -0.017091888934373856, -0.02361869253218174, 0.030538486316800117, 0.04495761916041374, 0.019134774804115295, -0.011078698560595512, -0.07124848663806915, 0.012121269479393959, -0.0057417238131165504, -0.01774461939930916, -0.036193788051605225, -0.003122674999758601, -0.0008831423474475741, 0.026263711974024773, -0.013575333170592785, -0.007360892370343208, -0.017289316281676292, 0.008813141845166683, 0.027795152738690376, -0.019152943044900894, 0.030983982607722282, -0.02383212372660637, -0.032855626195669174, -0.020223155617713928, 0.01814771629869938, 0.008403122425079346, -0.007957031950354576, 0.017018401995301247, 0.01328310091048479, -0.0068299476988613605, 0.047886453568935394, 0.029039904475212097, 0.030167698860168457, 0.003961739130318165, -0.0012327656149864197, 0.031866058707237244, 0.019219767302274704, -0.011623883619904518, -0.01914239302277565, -0.03839968889951706, -0.018147515133023262, -0.02094331383705139, 0.03395874798297882, -0.0021999229211360216, -0.009087733924388885, -0.01848999410867691, 0.0025902336928993464, -0.02756282314658165, -0.04436652362346649, -0.001846942352131009, 0.003041280433535576, 0.06346922367811203, 0.01404053345322609, 0.01818830333650112, -0.01152837835252285, 0.011617200449109077, 0.010516499169170856, -0.006809857673943043, -0.03404076397418976, 0.004425903782248497, 0.009279169142246246, -0.0004121482197660953, 0.04760988801717758, 0.022437863051891327, 0.009489459916949272, 0.025523416697978973, 0.04215851426124573, -0.0262600164860487, 0.03023674339056015, 0.01981872133910656, 0.04982271045446396, 0.02347131073474884, -0.038061730563640594, -0.01569947972893715, 0.00046820237184874713, -0.03906456008553505, -0.036734964698553085, -0.04110591858625412, -0.002422360237687826, -0.050096724182367325, -0.006646779365837574, -0.0643831342458725, -0.012862054631114006, 0.05436838045716286, 0.026022126898169518, 0.025646433234214783, -0.03499646857380867, 0.004004848189651966, -0.0378962866961956, 0.02832857146859169, 0.05212186276912689, -0.06062004342675209, 0.0065087745897471905, 0.004498523660004139, -0.016855226829648018, 0.01051926240324974, 0.015968838706612587, -0.07738114893436432, -0.020138686522841454, -0.00131398590747267, 0.030435865744948387, -0.000782933842856437, -0.011636066250503063, -0.03936806321144104, 0.005466525908559561, -0.04154323786497116, 0.0011170071084052324, -0.005104864947497845, 0.009508750401437283, -0.016399726271629333, -0.020825497806072235, -0.007623700425028801, -0.03344964608550072, 0.02649093233048916, 0.05538173392415047, -0.007674844935536385, 0.05008438229560852, -0.01234739925712347, 0.055876992642879486, 0.0400124154984951, -0.01709894649684429, -0.02543811686336994, -0.013910248875617981, -0.025049831718206406, 0.025990627706050873, 0.037761978805065155, 0.03190913051366806, 0.021952908486127853, -0.06956371665000916, 0.017867570742964745, 0.005500447005033493, 0.00618570763617754, -0.024654677137732506, -0.02131584659218788, 0.016403062269091606, 0.06201907619833946, -0.01103056687861681, -0.005374885629862547, -0.013814019970595837, -0.04902668297290802, 0.05335573852062225, -0.05003618448972702, -0.0346531942486763, 0.009528053924441338, -0.062416594475507736, 0.030470840632915497, -0.013371479697525501, 0.07403863966464996, -0.042680881917476654, 0.052484337240457535, 0.026363221928477287, 0.01254009548574686, 0.012174179777503014, -0.028767094016075134, 0.048952627927064896, -0.03151308000087738, 0.010281728580594063, -0.08773795515298843, -0.02934339828789234, 0.012820158153772354, -0.033620379865169525, -0.02886568382382393, 0.02426612190902233, -0.02352750673890114, 0.03978537395596504, -0.08208691328763962, -0.014289433136582375, 0.06801692396402359, 0.008466721512377262, 0.024630622938275337, 0.04891469329595566, -0.05977189913392067, 0.040654633194208145, 0.02452789433300495, -0.00818426813930273, -0.013871688395738602, -0.0030480341520160437, 0.04082333296537399, -0.025344889611005783, 0.006392447277903557, -0.01727145165205002, -0.0073106735944747925, 0.06372272223234177, 0.0027313255704939365, 0.005234087351709604, 0.0014586393954232335, -0.034899450838565826, 0.04057753086090088, 0.015491992235183716, 0.005301651544868946, 0.017365092411637306, 0.014841978438198566, 0.0037661646492779255, -0.03859337419271469, 0.013755318708717823, 0.03333676978945732, 0.013889475725591183, -0.06177472695708275, 0.05610107257962227, -0.027051737532019615, -0.008372449316084385, -0.03882665932178497, 0.02806684747338295, -0.04366263747215271, -0.04402410238981247, -0.05137721821665764, -0.013849767856299877, -0.022963140159845352, 0.051585014909505844, -0.017178667709231377, -0.02742978371679783, 0.07774288952350616, 0.005772903561592102, 0.018996810540556908, -0.013954021967947483, 0.07578323781490326, 0.07558320462703705, 0.06533975899219513, 0.00668152654543519, 0.05513037368655205, -0.04794470593333244, -0.04159734025597572, -0.0034107354003936052, -0.052086133509874344, 0.0195936169475317, -0.023694084957242012, 0.014853009954094887, 0.08911410719156265, -0.02468535304069519, 0.07807619124650955, -0.04488927870988846, -0.010309669189155102, -0.03419668227434158, 0.018619025126099586, 0.010440032929182053, 0.06935965269804001, 0.023149408400058746, 0.015597772784531116, -0.03977251052856445, -0.005969908554106951, 0.04085616022348404, 0.0003075547865591943, 0.009736921638250351, 0.009146397933363914, -0.02309006080031395, 0.027674488723278046, -0.001883304794318974, 0.05491708591580391, 0.05080451816320419, -0.026794178411364555, -0.020434178411960602, 0.028557537123560905, 0.036039918661117554, 0.0007724732276983559, 0.028683774173259735, -0.002453254070132971, 0.019485022872686386, 0.03228010609745979, 0.009847099892795086, -0.0014938735403120518, -0.04050024598836899, 0.010096768848598003, 0.02556982822716236, 0.011066833510994911, 0.022907670587301254, 0.028945650905370712, -0.0007034538430161774, -0.03412016108632088, -0.048669613897800446, -0.06048915907740593, -0.05663727596402168, -0.02715010941028595, -0.019464019685983658, -0.009026782587170601, -0.0023230700753629208, -0.05495135858654976, -0.0431475006043911, -0.03958790749311447, 0.025007857009768486, -0.020740527659654617, -0.010463793762028217, -0.03221053630113602, 0.025426341220736504, 0.012640019878745079, -0.0003998889005742967, 0.03116738609969616, 0.06777723133563995, 0.012287878431379795, -0.055996716022491455, -0.023543979972600937, 0.008296784944832325, 0.05790427327156067, -0.019605444744229317, 0.005514638032764196, -0.042765527963638306, -0.008634842932224274, 0.019354168325662613, 0.004358627367764711, -0.06986746191978455, 0.03931998088955879, 0.05859483778476715, -0.006604495458304882, 0.044822823256254196, -0.004353920463472605, 0.04666076600551605, -0.02365446463227272, -0.0258534736931324, -0.012219279073178768, 0.03960522264242172, 0.033311422914266586, -0.0000060432466852944344, 0.071193628013134, 0.03022187575697899, -0.00038554478669539094, -0.0038870086427778006, -0.012339090928435326, -0.055848006159067154, -0.005266314838081598, -0.05003897473216057, -0.00906555075198412, -0.06917112320661545, -0.0579872764647007, -0.0185721293091774, 0.02753652259707451, -0.039561256766319275, -0.056887611746788025, -0.017903415486216545, 0.0009871912188827991, -0.019673604518175125, 0.04563578590750694, -0.0635475143790245, -0.0032164736185222864, -0.024206627160310745, -0.04221406951546669, 0.0025594260077923536, 0.006605338770896196, 0.0067856949754059315, 0.008618765510618687, 0.03064870275557041, -0.03379523381590843, 0.000702026707585901, -0.03850952535867691, -0.008872955106198788, 0.037006404250860214, -0.03048773854970932, 0.001981382956728339 ]
[ -0.041765954345464706, 0.03784819319844246, -0.0027401272673159838, -0.03735777735710144, 0.020842669531702995, 0.012666890397667885, -0.0697106197476387, -0.008137141354382038, 0.06386981159448624, 0.027880333364009857, 0.015367047861218452, -0.037030164152383804, 0.018988274037837982, -0.008444341830909252, 0.02166075073182583, -0.03441033139824867, -0.017818603664636612, -0.03510269895195961, -0.07178054004907608, 0.04771164804697037, -0.048862092196941376, -0.04006421938538551, -0.01841568574309349, -0.0647338256239891, 0.05744252726435661, 0.023778559640049934, 0.033279627561569214, -0.043085191398859024, -0.02715105377137661, -0.23121404647827148, 0.017362214624881744, -0.02582940086722374, -0.013372921384871006, -0.003948363475501537, 0.006021441426128149, 0.0792565569281578, -0.011746056377887726, 0.009274289943277836, 0.01833651401102543, 0.012757323682308197, 0.05796296149492264, 0.007340117357671261, -0.0622548870742321, 0.00023296181461773813, 0.013372528366744518, -0.024941690266132355, -0.011814449913799763, -0.03482251241803169, 0.010354678146541119, 0.017673462629318237, -0.04229602962732315, -0.05554208904504776, 0.001453758915886283, -0.019366692751646042, -0.0659649670124054, -0.016042111441493034, 0.010889703407883644, 0.07620926201343536, 0.01866147108376026, -0.03891122713685036, -0.017284637317061424, -0.0023883602116256952, -0.11784755438566208, 0.13256384432315826, 0.02957872673869133, -0.019882801920175552, -0.0279962457716465, 0.022642530500888824, 0.005563127342611551, 0.0999620333313942, -0.029275067150592804, -0.006824407260864973, -0.034109581261873245, 0.05545330420136452, 0.03135880082845688, -0.07561716437339783, -0.01614278368651867, 0.03872239217162132, 0.05997014418244362, -0.017904536798596382, -0.024884430691599846, -0.0329744778573513, 0.029261896386742592, 0.008513523265719414, -0.020924264565110207, -0.003245312487706542, -0.0173557847738266, 0.012768968008458614, 0.01802818849682808, 0.008548379875719547, 0.007538928650319576, -0.09407249093055725, 0.026295162737369537, 0.08732907474040985, -0.11784534901380539, -0.01749643124639988, 0.018660401925444603, 0.027778495103120804, -0.028192944824695587, 0.35206693410873413, -0.022673966363072395, -0.01711454428732395, 0.04386915639042854, 0.011086399666965008, 0.00315126427449286, -0.019547315314412117, 0.026797477155923843, 0.021387511864304543, -0.01561586931347847, -0.0051395767368376255, -0.013356665149331093, 0.030344782397150993, 0.04238451272249222, -0.03061174601316452, 0.004542906302958727, -0.03568405285477638, 0.0032492957543581724, -0.007482137531042099, -0.029609976336359978, -0.008944246917963028, -0.004690381232649088, 0.022453000769019127, -0.023100757971405983, -0.00042105632019229233, 0.06188308447599411, 0.05085764452815056, 0.021277716383337975, 0.02372116968035698, 0.04694357514381409, -0.022434934973716736, 0.012440646067261696, -0.019561829045414925, -0.008145013824105263, 0.038082171231508255, -0.0033909594640135765, -0.0013144006952643394, 0.014553876593708992, -0.02139008231461048, 0.0738091692328453, -0.04600701481103897, 0.0028404095210134983, -0.018884720280766487, 0.021241184324026108, -0.021745814010500908, 0.0063241650350391865, 0.13842028379440308, -0.029275819659233093, -0.0015913042007014155, -0.037410784512758255, -0.10130506753921509, -0.06364879757165909, 0.028556834906339645, -0.007006686180830002, 0.015761397778987885, 0.04206113889813423, 0.06345018744468689, 0.05928218364715576, 0.04602722451090813, -0.043806180357933044, -0.025160660967230797, -0.02588800899684429, -0.019948184490203857, -0.03970397263765335, -0.0014222179306671023, 0.022242402657866478, -0.10232223570346832, -0.05420370772480965, 0.063282810151577, -0.027855107560753822, -0.06421998143196106, -0.049154020845890045, -0.002670979592949152, -0.02119378000497818, -0.02575485222041607, 0.08052221685647964, 0.01714756339788437, -0.043619316071271896, 0.06301756203174591, 0.05819405987858772, -0.0006207659607753158, 0.018692202866077423, -0.03611547872424126, -0.0014027958968654275, -0.02680070698261261, -0.002143869874998927, -0.029853543266654015, -0.02470453828573227, -0.005307656247168779, -0.004523688927292824, 0.023856448009610176, -0.02577883005142212, -0.019589493051171303, -0.03112676925957203, -0.005873993970453739, -0.01981242746114731, -0.04623273015022278, 0.04364306852221489, 0.022529684007167816, -0.02343469113111496, -0.03123946487903595, 0.05555329471826553, 0.014332948252558708, -0.048580802977085114, 0.05526242405176163, -0.007050718180835247, -0.0036750331055372953, 0.038347117602825165, -0.009009866043925285, 0.12379699945449829, -0.06328538060188293, -0.11135797947645187, 0.004787659738212824, 0.014691037125885487, -0.021467527374625206, -0.042968522757291794, 0.025329971686005592, -0.03463897854089737, 0.010344640351831913, 0.04065903648734093, 0.008947670459747314, 0.04805277660489082, -0.10126891732215881, -0.05651456117630005, -0.33944326639175415, 0.001101170782931149, 0.028240066021680832, 0.015067429281771183, -0.01262006163597107, -0.05749346688389778, -0.009341015480458736, -0.01883913017809391, 0.03645849972963333, -0.045553792268037796, 0.09350762516260147, 0.0033235468436032534, -0.007418510038405657, -0.14376486837863922, -0.017319053411483765, 0.043013155460357666, 0.0005294737638905644, -0.002574759302660823, -0.023557264357805252, 0.023543158546090126, 0.042617592960596085, -0.013203740119934082, -0.047507595270872116, -0.0027903409209102392, 0.02361086755990982, -0.02855658158659935, 0.08723103255033493, -0.026234902441501617, 0.08820465207099915, -0.05813677981495857, 0.04875119775533676, 0.07165193557739258, -0.04536184296011925, -0.07303626090288162, 0.006293960846960545, 0.01803182065486908, -0.037811312824487686, 0.033071085810661316, -0.05089696869254112, -0.01838291808962822, 0.008756028488278389, 0.03353831544518471, -0.02829192578792572, -0.0808989480137825, 0.018745554611086845, 0.02874736487865448, 0.02584666572511196, -0.05174051225185394, -0.02668990194797516, 0.013391343876719475, 0.02049175836145878, 0.03341035172343254, -0.01981554739177227, 0.04432625696063042, 0.04604871943593025, -0.02627640776336193, -0.05708152800798416, -0.013296328485012054, -0.03672542795538902, -0.025442125275731087, 0.015172811225056648, -0.018136532977223396, 0.004618582781404257, -0.05076733976602554, -0.029364218935370445, 0.05455531179904938, 0.03239395469427109, 0.004944540560245514, 0.05251816660165787, 0.019093237817287445, -0.00685235857963562, 0.0429333932697773, 0.016350293532013893, 0.08454194664955139, 0.05403474345803261, 0.033616192638874054, 0.0376492477953434, 0.05303606018424034, 0.029825402423739433, -0.005008521024137735, 0.005218595266342163, 0.0672522634267807, 0.049401093274354935, 0.030637137591838837, -0.01991375721991062, 0.01975613459944725, -0.019105564802885056, -0.022702455520629883, 0.03170281648635864, -0.029665833339095116, -0.05354831740260124, -0.0035428025294095278, 0.0015572806587442756, 0.03606770932674408, 0.04598131403326988, 0.028426816686987877, -0.2163689136505127, 0.017230505123734474, 0.04010675475001335, 0.03732961788773537, 0.03667448088526726, 0.020168082788586617, -0.003310360247269273, -0.05355077236890793, -0.031521450728178024, 0.06418800354003906, -0.04976946488022804, 0.008400138467550278, 0.02707061916589737, -0.016652652993798256, 0.023899368941783905, -0.006955024786293507, 0.03172149136662483, 0.011507426388561726, 0.010263901203870773, -0.023304447531700134, 0.023348428308963776, -0.03231516480445862, 0.1559709906578064, 0.053983934223651886, -0.0328395776450634, -0.009089652448892593, 0.0314658097922802, -0.03759460151195526, 0.006314465776085854, -0.01592705212533474, 0.031852371990680695, -0.023725386708974838, 0.04860243946313858, 0.027352452278137207, 0.010363085195422173, -0.01680176332592964, -0.05288092792034149, 0.023743093013763428, 0.031757935881614685, -0.0460592545568943, 0.03133140876889229, 0.023563485592603683, -0.08209922909736633, -0.060261599719524384, 0.054947320371866226, 0.0008781942306086421, 0.00224553095176816, 0.07939673215150833, -0.022874625399708748, -0.027538664638996124, -0.008683787658810616, -0.06586318463087082, 0.006530794780701399, -0.002963429084047675, 0.030310185626149178, 0.05037757381796837, 0.008509164676070213, 0.004615486599504948, 0.06471037864685059, 0.04548712074756622, 0.017551003023982048, -0.04410165548324585, 0.09358837455511093, 0.03887647017836571, 0.039307739585638046 ]
[ -0.006066750735044479, 0.04324808716773987, 0.01639300025999546, 0.032422926276922226, 0.009544242173433304, 0.02809217758476734, -0.03170892223715782, 0.035468678921461105, -0.007776323240250349, -0.010805902071297169, 0.008941112086176872, 0.00789983756840229, 0.028540777042508125, -0.004103416111320257, 0.025791967287659645, -0.036622676998376846, -0.016971208155155182, -0.006518054287880659, 0.0062330057844519615, -0.018178002908825874, -0.027609415352344513, 0.012870191596448421, 0.03055763989686966, -0.03360739350318909, -0.01065209973603487, 0.004778931848704815, -0.0467040054500103, 0.0025712642818689346, 0.0173929575830698, -0.1218063160777092, -0.0353458970785141, -0.015192799270153046, 0.017759831622242928, 0.024911146610975266, -0.006564421579241753, -0.02186390571296215, 0.022077735513448715, 0.012700283899903297, 0.022369856014847755, -0.015592282637953758, 0.007081838324666023, 0.0026235023979097605, -0.00719322357326746, 0.010675432160496712, 0.016611676663160324, -0.031062563881278038, 0.012647896073758602, -0.04316406324505806, -0.027219267562031746, 0.042097967118024826, -0.04117438569664955, 0.005993565544486046, 0.012629589065909386, -0.021264750510454178, -0.017208419740200043, -0.000139954179758206, -0.011132442392408848, 0.004451460670679808, 0.054441679269075394, 0.0499487966299057, -0.003924795426428318, 0.007397809997200966, -0.03164927288889885, -0.016156360507011414, 0.006350809242576361, -0.06307129561901093, -0.007620102260261774, 0.0007207097951322794, 0.008525651879608631, 0.012215390801429749, 0.025258272886276245, -0.005578015465289354, -0.008088914677500725, -0.026774374768137932, -0.012800319120287895, -0.03943547233939171, -0.003473868826404214, -0.02381243370473385, 0.02528982236981392, -0.004715259186923504, -0.0030634310096502304, -0.03264278918504715, -0.017956281080842018, 0.07534235715866089, 0.028030943125486374, -0.005087247584015131, -0.014170237816870213, 0.012602169997990131, 0.03485758602619171, -0.028554581105709076, -0.023874565958976746, -0.05389142408967018, -0.01979793608188629, 0.056449148803949356, -0.10052136331796646, -0.016734465956687927, 0.030785169452428818, -0.022883810102939606, -0.017265958711504936, 0.8234338760375977, 0.007424171082675457, -0.000046541412302758545, 0.07860691100358963, 0.019768765196204185, 0.06393039226531982, -0.015859294682741165, 0.010928128845989704, -0.06267938762903214, 0.006874885875731707, 0.00045448815217241645, 0.027188340201973915, -0.03421182930469513, 0.02760772593319416, 0.019631318747997284, 0.02746705338358879, 0.028108922764658928, 0.0397324413061142, 0.006473987828940153, -0.0038471752777695656, 0.009219243191182613, 0.010499275289475918, -0.007619356736540794, -0.025226179510354996, -0.0002480191760696471, -0.0033388135489076376, -0.14952026307582855, -0.027405712753534317, -6.46217660320586e-33, 0.03741411492228508, -0.0535874105989933, 0.03464651480317116, -0.015222495421767235, 0.0463465079665184, -0.007295485585927963, -0.00873174425214529, 0.02425435371696949, -0.035443034023046494, -0.02573772519826889, -0.01505808625370264, 0.0014858125941827893, -0.04302288219332695, 0.012348868884146214, -0.005146515090018511, 0.010384688153862953, 0.0016394599806517363, 0.04340633377432823, 0.0005345386452972889, 0.018465064465999603, -0.005700681358575821, -0.009726489894092083, -0.01048605889081955, 0.030249636620283127, 0.009938472881913185, 0.020822223275899887, 0.03034047782421112, -0.0064341532997787, -0.005633061286062002, -0.036824606359004974, -0.030406782403588295, 0.019365649670362473, -0.009805330075323582, -0.05520728603005409, -0.045654963701963425, -0.052826546132564545, -0.002608024748042226, 0.004774666391313076, 0.01634092628955841, -0.021818948909640312, -0.05044042691588402, -0.01434602402150631, -0.04417796432971954, -0.027424868196249008, -0.0486346110701561, 0.007533792406320572, -0.0023827876430004835, 0.05353380739688873, 0.01982659474015236, 0.008474460802972317, 0.006713000126183033, 0.012578802183270454, -0.0064021931029856205, -0.010899659246206284, 0.0013508273987099528, 0.02790137194097042, 0.01923767477273941, 0.04220025986433029, 0.04343758895993233, 0.021394625306129456, 0.004894022364169359, -0.0036311664152890444, -0.02360101044178009, 0.06920889019966125, -0.005533500574529171, 0.022795287892222404, -0.0034849068615585566, -0.0008680952014401555, 0.007953950203955173, 0.023154526948928833, -0.05156278237700462, 0.0554937981069088, 0.006701197940856218, -0.055652253329753876, 0.03322025015950203, -0.031296223402023315, -0.027422938495874405, 0.019821489229798317, -0.00032911202288232744, 0.04001859948039055, 0.013520748354494572, -0.00852884165942669, -0.03714192658662796, -0.010668289847671986, -0.020365191623568535, 0.0021518291905522346, 0.019067369401454926, 0.03360474854707718, -0.014346228912472725, -0.0037506085354834795, 0.021667983382940292, 0.007731162011623383, 0.00636783754453063, -0.015809591859579086, -0.06288944184780121, 6.18240380492237e-33, 0.01847294718027115, 0.023281216621398926, -0.03188195079565048, 0.005038341972976923, 0.006839885842055082, 0.005476749502122402, 0.036425355821847916, 0.039095766842365265, 0.00985859427601099, 0.012511792592704296, -0.013251518830657005, 0.01798284240067005, -0.03838016092777252, -0.010837262496352196, 0.04044961929321289, 0.014668898656964302, -0.030664000660181046, 0.0020142812281847, -0.007318476215004921, -0.0521068274974823, -0.0073799854144454, -0.017593327909708023, 0.013577798381447792, 0.05048080161213875, 0.0056409998796880245, 0.014506291598081589, -0.03531362861394882, 0.009301993995904922, -0.03559580817818642, 0.006507741287350655, -0.014481465332210064, -0.03491682559251785, 0.01577109284698963, -0.03849756717681885, 0.012399946339428425, -0.008300850167870522, -0.007578471675515175, -0.004388364031910896, 0.008875098079442978, 0.02164563164114952, 0.040269941091537476, 0.01928170956671238, 0.009053790010511875, 0.021849222481250763, 0.02533980831503868, 0.01516810804605484, 0.005605733022093773, 0.012037768959999084, 0.04736848175525665, -0.004432840272784233, -0.028780756518244743, 0.001955921994522214, 0.003057132475078106, 0.003810018766671419, 0.02245105803012848, -0.03378715366125107, -0.04052022844552994, 0.03543557971715927, -0.03612397983670235, -0.022284800186753273, -0.0295659638941288, -0.05104592442512512, -0.03863584250211716, -0.001441975007764995, -0.025234811007976532, 0.017018895596265793, -0.05118944123387337, 0.021287398412823677, 0.013396304100751877, 0.007636664900928736, 0.029955260455608368, -0.0036628330126404762, 0.023280244320631027, 0.024279162287712097, 0.036479298025369644, -0.005552917718887329, -0.0055374144576489925, -0.010719520971179008, -0.009486619383096695, 0.01803439110517502, 0.034209512174129486, -0.019234469160437584, 0.022313237190246582, -0.021438054740428925, 0.01533760316669941, 0.03272709622979164, -0.05533130466938019, 0.016564471647143364, 0.015655603259801865, 0.0014678302686661482, -0.01058786828070879, -0.04747452214360237, -0.009065309539437294, 0.01872754655778408, 0.014360912144184113, -1.2248495551148153e-8, -0.013978201895952225, -0.0070706321857869625, 0.005035186652094126, 0.011487041600048542, 0.006579496432095766, 0.009617947973310947, 0.0005489875329658389, 0.02275131084024906, 0.032012782990932465, 0.02116413228213787, 0.041611574590206146, -0.013393846340477467, -0.013363121077418327, 0.05756055936217308, -0.012951212003827095, 0.0036871780175715685, 0.02710600383579731, 0.012881279923021793, 0.03330124169588089, -0.036654409021139145, -0.0016027233796194196, 0.04276373237371445, 0.011294362135231495, 0.012869728729128838, -0.007982678711414337, -0.010759778320789337, -0.059202831238508224, -0.08872710168361664, -0.041327305138111115, -0.03182949870824814, -0.0383332259953022, -0.024425828829407692, -0.017918603494763374, -0.007281493861228228, -0.04962225258350372, -0.05881890654563904, 0.04351035878062248, -0.01908121444284916, 0.019561970606446266, 0.04158775880932808, -0.0198682714253664, -0.01216329075396061, -0.032055892050266266, -0.05310014635324478, -0.022485697641968727, -0.008271310478448868, 0.019684866070747375, 0.03175503760576248, -0.0055358330719172955, -0.01569640077650547, 0.003184610977768898, -0.0126896221190691, 0.05000286176800728, -0.016166523098945618, 0.00185204588342458, -0.006694046314805746, -0.028781618922948837, 0.015436279587447643, -0.01953737996518612, 0.017466086894273758, 0.03273586183786392, 0.01982431299984455, 0.00490681454539299, -0.007273521274328232 ]
jupyterlab-scroll-output-keyboard-shortcut
https://markhneedham.com/blog/2023/09/03/jupyterlab-scroll-output-keyboard-shortcut
false
2023-09-05 00:44:37
Quix Streams: Process certain number of Kafka messages
[ "quixstreams", "python", "til" ]
[ "TIL" ]
:icons: font In a recent demo, I wanted to use Quix Streams to process a specified number of messages from a Kafka topic, write a message to another stream, and then exit the Quix app. This is an unusual use of Quix Streams, so it took me a while to figure out how to do it. Let's assume we have a Kafka broker running. We'll create a couple of topics using the `rpk` tool: [source, bash] ---- rpk topic create events -p1 rpk topic create massaged-events -p1 ---- Now, we're going to start by installing Quix Streams and Click, a library for processing command line arguments: [source, bash] ---- pip install quixstreams click ---- We're going to start by creating a version of the application that processes all messages. Create a file called `massage.py` and add the following imports [source, python] ---- import quixstreams as qx from quixstreams import StreamConsumer, EventData, CommitMode import json import click ---- Next, let's create a 'main' method that's going to bootstrap the app: [source, python] ---- @click.command() def run_app(): global client, topic_consumer, producer client = qx.KafkaStreamingClient('127.0.0.1:9092') # <.> topic_consumer = client.get_topic_consumer( # <.> topic="events", auto_offset_reset=qx.AutoOffsetReset.Earliest, consumer_group="events-consumer", commit_settings=CommitMode.Manual ) producer = client.get_raw_topic_producer("massaged-events") # <.> print("Listening to streams. Press CTRL-C to exit.") topic_consumer.on_stream_received = on_stream_received_handler topic_consumer.subscribe() qx.App.run(before_shutdown=before_shutdown) ---- <.> Create Kafka client <.> Create consumer for the `events` topic <.> Create producer for the `massaged-events` topic We then need to add the following functions to process each message and handle the shutdown of the app: [source, python] ---- def on_event_data_received_handler(stream: StreamConsumer, data: EventData): with data: payload = json.loads(data.value) payload["count"] *= 2 # <.> message = qx.RawMessage(json.dumps(payload, indent=2).encode('utf-8')) # <.> message.key = str(payload["id"]).encode('utf-8') producer.publish(message) #<.> topic_consumer.commit() def on_stream_received_handler(stream_received: StreamConsumer): stream_received.events.on_data_received = on_event_data_received_handler def before_shutdown(): print('before shutdown') topic_consumer.dispose() producer.dispose() ---- <.> Multiply the `count` property by 2 <.> Create a new message <.> Publish the message to the `massaged-events` topic Finally, let's call the 'main' function: [source, python] ---- if __name__ == "__main__": run_app() ---- If we run this script, it will process any messages received by the `events` topic and write a new message to `massaged-events` with the `count` property doubled. Let's ingest a message into Kafka to see if it works: [source, bash] ---- echo '{"id": 1, "count": 4}' | jq -cr --arg sep ø '[.id, tostring] | join($sep)' | kcat -P -b localhost:9092 -t events -Kø ---- And now we'll check the contents of the `events` and `massaged-events` topics: [source, bash] ---- kcat -C -b localhost:9092 -t events -e | jq -c ---- .Output [source, json] ---- {"id":1,"count":4} ---- [source, bash] ---- kcat -C -b localhost:9092 -t massaged-events -e | jq -c ---- .Output [source, json] ---- {"id":1,"count":8} ---- So far, so good. If we write any more messages to the `events` topic they will automatically be processed as well. But now we want to update our script so that we can specify how many messages to consume before stopping. If we then run the script again, it will continue from where we left off because our topic consumer was created with a consumer group that's keeping track of the last read offset. We can return that offset by running the following command: [source, bash] ---- rpk group describe events-consumer ---- .Output [source, text] ---- GROUP events-consumer COORDINATOR 0 STATE Empty BALANCER MEMBERS 0 TOPIC PARTITION CURRENT-OFFSET LOG-END-OFFSET LAG MEMBER-ID CLIENT-ID HOST events 0 1 1 0 ---- Let's update our imports: [source, python] ---- from quixstreams import StreamConsumer, EventData, CancellationTokenSource, CommitMode import threading ---- And now we'll update the `run_app` function to look like this: [source, python] ---- @click.command() @click.option('--number-events', default=1) def run_app(number_events): global client, topic_consumer, producer global events_to_consume, events_consumed, thread_lock, cancellation_thread client = qx.KafkaStreamingClient('127.0.0.1:9092') topic_consumer = client.get_topic_consumer( topic="events", auto_offset_reset=qx.AutoOffsetReset.Earliest, consumer_group="events-consumer", commit_settings=CommitMode.Manual ) producer = client.get_raw_topic_producer("massaged-events") thread_lock = threading.Lock() cts = CancellationTokenSource() # <.> cancellation_thread = threading.Thread(target=lambda: cts.cancel()) # <.> events_to_consume = number_events events_consumed = 0 print("Listening to streams. Press CTRL-C to exit.") topic_consumer.on_stream_received = on_stream_received_handler topic_consumer.subscribe() qx.App.run(cts.token, before_shutdown=before_shutdown) if cancellation_thread.is_alive(): # <.> cancellation_thread.join() ---- <.> Cancellation token used to stop message processing <.> Cancellation thread which will trigger the cancellation token <.> Join the cancellation thread to the main thread before exiting And the `on_event_data_received_handler` needs to be updated to keep track the messages consumed: [source, python] ---- def on_event_data_received_handler(stream: StreamConsumer, data: EventData): global events_consumed with data: payload = json.loads(data.value) payload["count"] *= 2 message = qx.RawMessage(json.dumps(payload, indent=2).encode('utf-8')) message.key = str(payload["id"]).encode('utf-8') producer.publish(message) topic_consumer.commit() with thread_lock: events_consumed += 1 # <.> if events_consumed >= events_to_consume: # <.> if not cancellation_thread.is_alive(): cancellation_thread.start() # <.> print("Cancellation token triggered") return ---- <.> Increment the number of messages consumed <.> Check if we've exceeded the count <.> Trigger the cancellation thread, which will cancel the token We can then call our Python script like this to process one event: [source, bash] ---- python massage.py --number-events 1 ---- Let's now add another message to Kafka: [source, bash] ---- echo '{"id": 42, "count": 9000}' | jq -cr --arg sep ø '[.id, tostring] | join($sep)' | kcat -P -b localhost:9092 -t events -Kø ---- We'll see the following output from `massage.py`: .Output [source, text] ---- Listening to streams. Press CTRL-C to exit. Cancellation token triggered before shutdown ---- And if we look at the `massaged-events` topic, it now has the following message: .Output [source, json] ---- {"id":42,"count":18000} ---- You can find the full code in this https://gist.github.com/mneedham/d877080aa5247006a1272a2da464185f[GitHub Gist^].
In this post, we'll learn how to process a specified number of messages in a Kafka topic using Quix Streams.
uploads/2023/09/quix-messages-kafka-banner.png
[ 0.0027019560802727938, -0.027367176488041878, -0.0055021364241838455, 0.02807028964161873, 0.08539073914289474, 0.02837812714278698, -0.014722258783876896, 0.07618243247270584, -0.014753120020031929, -0.021814856678247452, -0.01977968029677868, 0.00048400319064967334, -0.08927342295646667, 0.022517340257763863, 0.021142611280083656, 0.06905428320169449, 0.06533566117286682, -0.002270297147333622, 0.024034442380070686, -0.009316633455455303, 0.03017323836684227, 0.07403841614723206, 0.011204835958778858, 0.07281938195228577, 0.022893734276294708, 0.026850329712033272, -0.007142927497625351, -0.005663145799189806, -0.04352187737822533, -0.01314578764140606, 0.05250251665711403, -0.010748637840151787, -0.00587748596444726, -0.01583288237452507, 0.02012038603425026, -0.036706771701574326, -0.00010290686623193324, 0.028577320277690887, 0.0043015917763113976, 0.018643846735358238, -0.0647374615073204, 0.03983495011925697, -0.012141273356974125, -0.004598552826792002, -0.01816008985042572, 0.007604056503623724, -0.03504033759236336, 0.01177226472645998, -0.023800943046808243, -0.0350460410118103, -0.08773763477802277, 0.05141313746571541, -0.011840404011309147, -0.00015050722868181765, 0.005482719279825687, 0.03962397575378418, 0.010667174123227596, -0.0699508786201477, 0.01110851764678955, -0.013263050466775894, 0.010125724598765373, -0.0016251495108008385, 0.03311922028660774, 0.05908272787928581, 0.0037172813899815083, -0.01466884184628725, 0.001016514841467142, 0.03907094523310661, -0.03613327071070671, -0.02566075511276722, -0.004607347771525383, 0.017349690198898315, -0.03202386945486069, -0.009423980489373207, 0.025097977370023727, -0.03582146763801575, -0.012090674601495266, 0.07237627357244492, 0.02497255429625511, 0.02730393223464489, 0.004714802373200655, -0.01109329704195261, -0.004299635998904705, 0.03952919319272041, 0.004643789492547512, -0.05177553743124008, -0.024547545239329338, -0.001840878976508975, -0.06905388087034225, 0.05084679275751114, 0.03588012978434563, -0.07075728476047516, -0.004423737060278654, 0.0003458752471487969, -0.03244241699576378, 0.00994845386594534, -0.012065344490110874, -0.005929839797317982, 0.02692374214529991, 0.005589876789599657, -0.040960777550935745, 0.015124883502721786, 0.022770993411540985, 0.06558267772197723, -0.08032554388046265, -0.027425864711403847, -0.02662721648812294, -0.030984977260231972, 0.023120984435081482, 0.015746982768177986, 0.009521151892840862, 0.0177119430154562, 0.005528161767870188, 0.007171024568378925, -0.07681193202733994, 0.08498045057058334, 0.0012971005635336041, -0.024098483845591545, 0.022694138810038567, 0.014195268973708153, 0.043684810400009155, 0.028130847960710526, -0.004813733045011759, 0.07159362733364105, -0.0029915214981883764, 0.011113406158983707, -0.010080141015350819, 0.04842933639883995, -0.00816832110285759, -0.052329666912555695, 0.01400444470345974, 0.06601699441671371, 0.011799374595284462, -0.0006499347509816289, 0.00291266362182796, 0.024860378354787827, 0.014547735452651978, -0.005681653507053852, 0.046479251235723495, 0.034740377217531204, 0.007801539730280638, -0.034952402114868164, 0.01378847286105156, 0.0023815410677343607, 0.004248682875186205, 0.023447144776582718, 0.011289126239717007, -0.027744684368371964, 0.0015409855404868722, 0.058108340948820114, -0.005107154604047537, 0.0061857025139033794, 0.06963946670293808, -0.0335170179605484, -0.01740111969411373, 0.05590180307626724, 0.012112963013350964, 0.021113937720656395, -0.025719190016388893, 0.010981530882418156, 0.021230459213256836, 0.04423562437295914, 0.019608499482274055, 0.015519271604716778, 0.0036045245360583067, -0.02924165315926075, 0.006902418099343777, -0.003965840674936771, -0.04254501685500145, -0.004925811197608709, -0.03209041431546211, -0.04571439325809479, 0.0652698278427124, -0.022994209080934525, 0.01978752203285694, 0.009983454830944538, 0.0809515044093132, 0.025451036170125008, 0.026544177904725075, 0.04857395961880684, -0.0850096270442009, 0.029010625556111336, -0.042171578854322433, 0.004823104944080114, 0.024148793891072273, -0.033566270023584366, 0.06681086122989655, 0.031136231496930122, -0.006978427991271019, 0.0003544617211446166, -0.053491704165935516, -0.057231951504945755, -0.06390312314033508, 0.008140929043293, 0.06846056133508682, -0.07285378873348236, -0.0265450831502676, 0.05363158881664276, 0.039149701595306396, 0.017840996384620667, 0.001228191191330552, -0.024354975670576096, -0.0000911757379071787, -0.06587794423103333, -0.09380516409873962, 0.05276726558804512, 0.020595083013176918, -0.01653650775551796, -0.03514890372753143, -0.006728550419211388, -0.04770374298095703, 0.004910547751933336, 0.036031611263751984, -0.00527599360793829, 0.05302465334534645, -0.009072060696780682, -0.012169952504336834, -0.021813582628965378, 0.027559630572795868, -0.04014437645673752, 0.02270037680864334, 0.00017866867710836232, 0.005713025573641062, -0.012171135284006596, -0.03087485022842884, 0.11037106812000275, 0.0562133751809597, -0.03395960107445717, -0.030544361099600792, 0.033733148127794266, 0.017121696844697, -0.02698485739529133, 0.009755725041031837, -0.030077708885073662, -0.028390122577548027, -0.006079573649913073, -0.041374221444129944, -0.023042572662234306, -0.007249483838677406, -0.03154359385371208, 0.014767239801585674, 0.06236974895000458, -0.0506429523229599, 0.061263732612133026, 0.05554426461458206, -0.03474119305610657, -0.0011523275170475245, -0.028682725504040718, -0.06615503877401352, 0.02018868550658226, -0.009281369857490063, -0.011536180973052979, 0.05925789475440979, -0.06281661242246628, -0.02062331885099411, -0.016619157046079636, -0.04100998491048813, 0.041855450719594955, 0.03688737004995346, 0.05225278064608574, -0.04324617609381676, 0.009748154319822788, 0.006909523159265518, 0.001583578996360302, -0.023281404748558998, -0.04096461087465286, 0.012075814418494701, 0.016236882656812668, 0.02251565456390381, 0.02374138869345188, 0.024549873545765877, -0.0004053366428706795, 0.035774532705545425, -0.010611679404973984, 0.011353358626365662, 0.01720496267080307, 0.04379852116107941, 0.016258783638477325, 0.005024484824389219, -0.03815295547246933, -0.03071262314915657, 0.059583455324172974, -0.07165860384702682, -0.0177517868578434, 0.050649888813495636, -0.0352766253054142, 0.033352576196193695, -0.04892372712492943, -0.03101484104990959, -0.008436743170022964, 0.006627186201512814, 0.026767773553729057, 0.0015541799366474152, 0.004558388609439135, 0.04780887812376022, 0.02060670219361782, -0.0031961651984602213, 0.01904202066361904, -0.005872603040188551, 0.023279037326574326, -0.006597777362912893, -0.004382044542580843, 0.07891103625297546, 0.021280959248542786, -0.005422893445938826, -0.05396789684891701, 0.011123055592179298, -0.024293316528201103, -0.25103795528411865, 0.012136594392359257, 0.029764965176582336, -0.02364852838218212, 0.039407532662153244, -0.006070276722311974, 0.03276343271136284, -0.0335359163582325, -0.017464356496930122, 0.026750147342681885, -0.04545915126800537, -0.05676506087183952, -0.03414570540189743, 0.030895978212356567, 0.002187316073104739, 0.0050223818980157375, 0.017291782423853874, -0.030948514118790627, 0.013027636334300041, 0.030932726338505745, -0.01477001141756773, -0.06698207557201385, -0.005746245384216309, 0.03269863873720169, 0.04275982826948166, 0.018409110605716705, -0.09620119631290436, 0.05584891512989998, -0.03160657733678818, -0.012858526781201363, 0.027326595038175583, -0.03957238048315048, -0.011381774209439754, -0.0039872052147984505, -0.010567978024482727, -0.03504372015595436, 0.05386318266391754, -0.017593955621123314, 0.023447902873158455, 0.00719054788351059, -0.005383397918194532, -0.04559052363038063, -0.004927408881485462, -0.0050496445037424564, 0.07376094162464142, 0.029096873477101326, -0.08215796947479248, -0.01373264193534851, -0.025234762579202652, 0.06380721181631088, -0.0273802038282156, -0.03774184361100197, 0.00112231879029423, 0.022134674713015556, 0.0047318171709775925, -0.005518658552318811, -0.02645033411681652, 0.005991470534354448, -0.028106676414608955, -0.03014431521296501, 0.03203621134161949, -0.018906351178884506, -0.004607474431395531, -0.053611207753419876, 0.015444326214492321, -0.055459607392549515, -0.0634407252073288, 0.000005734785645472584, 0.08726238459348679, 0.036843374371528625, -0.059579938650131226, -0.057071246206760406, -0.008294614031910896, -0.09854792803525925, -0.0034152413718402386, -0.015103657729923725, -0.04677940160036087, 0.004383524414151907, -0.015056022442877293, 0.03188464790582657, -0.041969627141952515, -0.03124743141233921, 0.03817248344421387, 0.0006698250072076917, 0.010382761247456074, -0.04435287415981293, 0.0038812109269201756, -0.005264286417514086, -0.01731748692691326, -0.009668786078691483, 0.057870205491781235, -0.032595474272966385, -0.021091142669320107, -0.0122092105448246, -0.00826189387589693, 0.04787079244852066, 0.014514892362058163, 0.0023998951073735952, 0.018071014434099197, 0.030377862975001335, 0.038158439099788666, -0.03768489882349968, 0.00396675756201148, -0.042983800172805786, 0.015884509310126305, -0.009820370934903622, -0.07548392564058304, 0.00040795537643134594, 0.02634912170469761, 0.025339707732200623, -0.020968735218048096, -0.0373569056391716, 0.0033754475880414248, -0.06434214860200882, -0.04354304075241089, -0.0052881669253110886, 0.015383623540401459, 0.05520083010196686, 0.026526467874646187, -0.0005115336389280856, -0.0734437108039856, 0.03146031126379967, 0.0071332803927361965, -0.011122885160148144, -0.0509672537446022, -0.042653996497392654, -0.004539432469755411, -0.026127889752388, -0.02053551934659481, 0.011313186027109623, -0.007557583041489124, -0.013575859367847443, 0.03795728087425232, -0.05085030198097229, 0.029012218117713928, -0.02906528115272522, -0.047594986855983734, -0.04116162285208702, -0.000498891226015985, 0.00021034589735791087, -0.02434530109167099, 0.00980440340936184, 0.01653130166232586, 0.014096676371991634, 0.03780977427959442, 0.006289616227149963, 0.042605265974998474, 0.020704902708530426, 0.008279986679553986, 0.018618395552039146, 0.011780448257923126, -0.02506336197257042, 0.006812099367380142, -0.003868398955091834, -0.028128087520599365, -0.0020183210726827383, 0.013876227661967278, -0.02293487824499607, -0.011942388489842415, -0.03833048790693283, 0.003832144197076559, -0.058586325496435165, -0.012041441164910793, -0.022892139852046967, 0.013898627832531929, 0.04795534536242485, -0.01322877872735262, 0.03946506232023239, -0.01551724411547184, -0.025703592225909233, 0.0013200276298448443, -0.014922319911420345, -0.04390742629766464, 0.04657074064016342, 0.00873340293765068, -0.004141985904425383, 0.013878953643143177, -0.005687244702130556, -0.002718060277402401, 0.003019095631316304, 0.008073865436017513, 0.002171875676140189, 0.031583260744810104, -0.001862959237769246, 0.03908141702413559, 0.03797631338238716, -0.026636574417352676, 0.01444233488291502, -0.04768846184015274, -0.020369458943605423, -0.0004098314675502479, 0.00424960209056735, -0.020083865150809288, -0.0018511355156078935, -0.03136170655488968, -0.07721938192844391, 0.011487544514238834, 0.023337725549936295, 0.004389245994389057, 0.008430876769125462, -0.035618025809526443, 0.014200911857187748, -0.024885281920433044, 0.04138994589447975, 0.061542946845293045, -0.05347149819135666, -0.012338981963694096, -0.008210650645196438, 0.009900587610900402, -0.0029953480698168278, 0.016107289120554924, -0.05722884088754654, 0.010681882500648499, 0.018337395042181015, -0.006165941711515188, -0.027945788577198982, -0.016226228326559067, -0.052705228328704834, 0.013663988560438156, 0.008106711320579052, 0.017649449408054352, -0.0071387821808457375, 0.00243631680496037, -0.0442129522562027, -0.02016095258295536, 0.02951016277074814, -0.015719106420874596, 0.003575699869543314, 0.02351098693907261, -0.005667967721819878, 0.011709623970091343, -0.03193843364715576, 0.06086130812764168, 0.007669283542782068, -0.00399016123265028, -0.020325930789113045, -0.06166630983352661, -0.01941479742527008, 0.005402832292020321, 0.050286706537008286, 0.019886020570993423, -0.001075135893188417, -0.03862617164850235, -0.010250598192214966, -0.007886446081101894, 0.0035063219256699085, -0.0008241129689849913, 0.006674613803625107, 0.022302495315670967, 0.031844887882471085, -0.018371688202023506, 0.0032233805395662785, 0.008953992277383804, -0.04390665888786316, 0.055608998984098434, -0.04504235461354256, -0.04910057783126831, 0.015194726176559925, -0.040800467133522034, 0.029187340289354324, 0.010349170304834843, 0.03047509491443634, -0.08162520080804825, 0.05327471345663071, 0.04652899503707886, 0.0392133854329586, 0.04392813518643379, 0.02287241816520691, 0.0221593976020813, 0.012402046471834183, 0.006333156023174524, -0.1037805825471878, -0.01392287015914917, 0.028712494298815727, 0.0010744427563622594, 0.0064195808954536915, -0.005868364125490189, -0.06634248048067093, 0.05747897922992706, -0.033821411430835724, -0.00411268463358283, 0.05142545700073242, -0.0039503443986177444, 0.010221675969660282, 0.039008527994155884, -0.06399146467447281, 0.05837437883019447, 0.037421420216560364, -0.03280019760131836, -0.007084186654537916, 0.009572679176926613, 0.04632745310664177, 0.023573659360408783, 0.05970996990799904, 0.0073070102371275425, -0.032219141721725464, 0.06665680557489395, 0.005560764577239752, 0.007587389554828405, 0.04967120289802551, -0.030637966468930244, 0.04424845054745674, 0.03427980840206146, -0.01744985394179821, 0.02393907867372036, 0.038055889308452606, -0.013651320710778236, -0.05487571656703949, 0.03525632619857788, 0.00042492273496463895, -0.0022975639440119267, -0.0496627502143383, 0.058141663670539856, -0.0019999160431325436, -0.054385993629693985, -0.05654272064566612, 0.010943506844341755, -0.07293426990509033, -0.00676334323361516, -0.029463360086083412, 0.03616247698664665, -0.03861796483397484, 0.057558950036764145, -0.026621459051966667, -0.003174121491611004, 0.08268220722675323, -0.013281433843076229, -0.004791574086993933, -0.011401977390050888, 0.06660112738609314, 0.06993281841278076, 0.04125851020216942, -0.008424369618296623, 0.06211741268634796, -0.047846466302871704, -0.022379351779818535, 0.00407082075253129, 0.004182206466794014, -0.037524912506341934, -0.023774467408657074, 0.040317028760910034, 0.08535346388816833, -0.009238454513251781, 0.06203778460621834, -0.022215263918042183, -0.017790723592042923, -0.0008612435776740313, 0.024510424584150314, 0.0056284028105437756, 0.020065775141119957, -0.0011934066424146295, 0.03176531568169594, 0.01243685930967331, -0.045870453119277954, 0.0431089885532856, 0.007424277253448963, -0.048527538776397705, 0.04755201190710068, -0.00244157831184566, 0.023633254691958427, 0.04571548104286194, 0.02849547564983368, 0.07430101186037064, -0.020571928471326828, -0.029627369716763496, -0.0029301391914486885, -0.010206809267401695, -0.0010047784307971597, -0.0006399157573468983, -0.01874762400984764, -0.019008122384548187, -0.001922730472870171, -0.03235951066017151, -0.02274201810359955, -0.05300871655344963, -0.020496254786849022, 0.020814688876271248, -0.0038811538834124804, 0.015422309748828411, 0.022897791117429733, -0.008793484419584274, -0.08432093262672424, -0.04584619030356407, -0.057521261274814606, -0.05439002439379692, -0.027434203773736954, -0.021917711943387985, -0.015467752702534199, -0.00686482060700655, -0.047598615288734436, -0.04165956377983093, -0.028029251843690872, 0.020884346216917038, -0.022301120683550835, -0.04615353047847748, -0.018171241506934166, 0.017148733139038086, -0.012049200013279915, -0.03053499199450016, -0.0024081584997475147, 0.07332625240087509, 0.01603853888809681, -0.016901375725865364, -0.031163185834884644, 0.026031943038105965, 0.03134707733988762, -0.002412468660622835, 0.009375491179525852, -0.0747418999671936, 0.03914792463183403, 0.02765052393078804, -0.009141362272202969, -0.06929056346416473, 0.03416509926319122, 0.04688930884003639, 0.00896935909986496, 0.0641467422246933, -0.011131113395094872, 0.007584857288748026, -0.04314214736223221, -0.026189202442765236, -0.0031485555227845907, 0.03203554078936577, 0.06584522128105164, -0.0243290476500988, 0.07769127190113068, 0.04743576794862747, 0.003871849738061428, -0.041125111281871796, 0.0012944714399054646, -0.03005652129650116, -0.014087686315178871, -0.02298101596534252, 0.008994433097541332, -0.028741732239723206, -0.07768510282039642, -0.01929590292274952, 0.022748997434973717, -0.020707398653030396, -0.030055897310376167, 0.012504159472882748, 0.025746790692210197, 0.011967042461037636, 0.027758939191699028, -0.0669127032160759, -0.01039013359695673, -0.03562503680586815, -0.0412776954472065, -0.009578358381986618, 0.02051370218396187, 0.006742046680301428, -0.04668309912085533, -0.021550586447119713, -0.04047059267759323, -0.01038756500929594, 0.002410608809441328, 0.05895717442035675, 0.041287194937467575, -0.02253730222582817, -0.021487437188625336 ]
[ -0.06608186662197113, -0.010271068662405014, -0.013334733434021473, -0.029481766745448112, 0.03743079677224159, -0.06468555331230164, -0.030272459611296654, 0.02267570234835148, -0.0004070922441314906, -0.013674058020114899, -0.046071600168943405, -0.04633515328168869, 0.011364378035068512, -0.03557439520955086, 0.10898727178573608, -0.02446720376610756, 0.021183282136917114, -0.04942811280488968, -0.06346345692873001, 0.019782794639468193, -0.029301445931196213, -0.029392767697572708, -0.06300348788499832, -0.02498527057468891, 0.016938960179686546, 0.020140720531344414, 0.06581361591815948, -0.03462407365441322, 0.011500481516122818, -0.19278693199157715, -0.017479564994573593, -0.019362064078450203, 0.01765984110534191, 0.009640409611165524, -0.002825442235916853, 0.013291101902723312, 0.018920691683888435, -0.0013041032943874598, -0.007365136872977018, 0.04190453886985779, 0.05217743292450905, -0.007264369633048773, -0.05332639068365097, -0.00892295315861702, 0.026638206094503403, -0.062484852969646454, -0.02618302032351494, -0.0276083592325449, 0.030260054394602776, 0.012212920933961868, -0.04313656687736511, -0.00036446531885303557, 0.022312454879283905, -0.03295939043164253, 0.02551599219441414, 0.003819693811237812, 0.04612052068114281, 0.04679635539650917, 0.06553400307893753, 0.0011410113656893373, 0.010579915717244148, 0.003921632654964924, -0.15695831179618835, 0.10726069658994675, -0.034403521567583084, 0.026807913556694984, -0.02188165858387947, 0.017942583188414574, -0.027789020910859108, 0.07367292046546936, -0.04186973348259926, -0.028479143977165222, -0.006849066354334354, 0.07268103957176208, 0.011847867630422115, -0.024057962000370026, -0.017158901318907738, 0.00044269065256230533, 0.005136813968420029, -0.012147894129157066, -0.07193677872419357, -0.03264494240283966, -0.021331824362277985, -0.006813205312937498, -0.06776606291532516, 0.03456951677799225, 0.005843067076057196, 0.05388054996728897, 0.013088004663586617, 0.04166412353515625, 0.014757223427295685, 0.019442647695541382, 0.06966318190097809, -0.002328749978914857, -0.08130042254924774, -0.009171318262815475, -0.019292807206511497, 0.023638378828763962, -0.03842027485370636, 0.3885650038719177, -0.001871216343715787, -0.01685325615108013, 0.0003088703379034996, 0.021301791071891785, 0.031200451776385307, -0.018644925206899643, -0.012048047035932541, -0.035744644701480865, 0.019721420481801033, 0.0038661938160657883, 0.023096440359950066, -0.022581733763217926, 0.05096079036593437, -0.06397273391485214, 0.020325003191828728, -0.00039906834717839956, 0.022045496851205826, 0.006061898544430733, 0.010193811729550362, 0.06684257090091705, 0.016160061582922935, 0.006633924786001444, 0.034273095428943634, 0.010622763074934483, 0.059006430208683014, 0.035754770040512085, 0.03752977028489113, 0.03433481976389885, -0.002586872549727559, -0.005650310777127743, 0.05061957612633705, -0.03639863431453705, -0.03632863983511925, -0.026419328525662422, 0.020594626665115356, -0.000045570148358820006, 0.03426672890782356, -0.057446762919425964, -0.00021079355792608112, 0.02384619414806366, -0.013066264800727367, -0.030515721067786217, 0.04686626419425011, -0.03926321491599083, -0.0009465305483900011, 0.12214729934930801, 0.01584785431623459, -0.018448155373334885, -0.03262650594115257, -0.054131098091602325, 0.006485373247414827, 0.020843489095568657, -0.01347613800317049, -0.07312991470098495, 0.03713490068912506, 0.015493763610720634, 0.07652262598276138, 0.0013404607307165861, -0.07927209883928299, 0.015439976938068867, -0.018588734790682793, -0.08373009413480759, -0.03635158762335777, 0.027936240658164024, 0.019391918554902077, -0.11783929169178009, -0.008888263255357742, 0.021337617188692093, -0.012848060578107834, -0.023049738258123398, -0.014185367152094841, 0.024371931329369545, -0.006179906893521547, -0.022933315485715866, 0.025281252339482307, -0.02336587943136692, -0.039012614637613297, 0.01717173494398594, 0.056511469185352325, -0.021037237718701363, 0.007069070357829332, 0.017036257311701775, 0.020835544914007187, -0.01901988312602043, -0.021159963682293892, -0.10041135549545288, -0.030001942068338394, -0.033915769308805466, -0.02292172610759735, -0.04639941453933716, -0.04004208371043205, -0.026529058814048767, 0.009111862629652023, 0.06790780276060104, 0.030549487099051476, -0.008455920964479446, -0.002941462444141507, 0.02435259148478508, 0.009250209666788578, -0.05903851240873337, 0.034238941967487335, 0.02340499497950077, -0.011245434172451496, 0.016277456656098366, -0.08125273138284683, 0.023428436368703842, 0.02296934276819229, -0.017540529370307922, 0.0655781701207161, 0.00401409761980176, -0.029895152896642685, 0.017176415771245956, -0.0031396413687616587, 0.02911979705095291, -0.0543658472597599, 0.007009671535342932, 0.010913403704762459, 0.04050387442111969, 0.0027384774293750525, 0.005554054863750935, 0.019389009103178978, -0.05638035759329796, -0.03850821033120155, -0.3814793825149536, 0.020607542246580124, 0.000499213405419141, -0.011522459797561169, -0.0287488866597414, -0.05412496626377106, -0.007478677202016115, -0.022646993398666382, 0.0059020244516432285, 0.058168478310108185, 0.10821737349033356, -0.0685429573059082, 0.02543121762573719, -0.09193707257509232, 0.026942702010273933, 0.03313972055912018, -0.05489117279648781, -0.010703432373702526, -0.01324322447180748, 0.023721085861325264, -0.004382264334708452, -0.010404418222606182, -0.011723238974809647, -0.0469549261033535, 0.006473861634731293, 0.031926799565553665, 0.09537030011415482, 0.05007879436016083, 0.0833071768283844, -0.07448655366897583, 0.0790337473154068, 0.016115501523017883, -0.021211856976151466, -0.10007545351982117, -0.030410323292016983, 0.02375831827521324, 0.03322785347700119, 0.035032007843256, 0.010985683649778366, -0.007392063271254301, -0.03694913163781166, 0.02977491170167923, -0.04078194126486778, -0.06479524075984955, 0.006288968957960606, -0.00008557354885851964, -0.02074362337589264, -0.025268880650401115, -0.0019380785524845123, 0.061544906347990036, 0.019195016473531723, 0.037987712770700455, 0.01567757874727249, 0.02151351235806942, 0.008631328120827675, -0.03660847991704941, -0.02180834487080574, -0.03010525554418564, -0.003946003038436174, -0.014449029229581356, 0.03541016951203346, 0.06153295189142227, 0.03248344734311104, -0.021338125690817833, 0.0038105847779661417, 0.009198524057865143, 0.0011034844210371375, 0.04819577932357788, 0.05449741333723068, -0.012881799601018429, -0.04007263481616974, 0.11353571712970734, -0.008909983560442924, 0.00965206976979971, 0.06858475506305695, 0.053217221051454544, 0.014617771841585636, 0.011844761669635773, 0.00019130994041915983, 0.04974294826388359, 0.042841438204050064, -0.03346743434667587, 0.03225652500987053, -0.01992914266884327, -0.0005795235629193485, 0.048304926604032516, -0.016602471470832825, -0.03878546133637428, 0.05590188130736351, -0.018705416470766068, -0.02308732271194458, 0.02520807646214962, -0.021445900201797485, -0.046973779797554016, 0.06496234238147736, -0.017204778268933296, -0.2464219331741333, 0.007412306498736143, 0.0340132862329483, 0.05783350393176079, -0.009479369968175888, -0.013634733855724335, 0.007933489978313446, -0.06439897418022156, -0.01873021386563778, 0.038163624703884125, -0.009735800325870514, 0.04213981702923775, -0.006104139145463705, 0.009748876094818115, 0.033721938729286194, -0.008315975777804852, 0.06769128888845444, 0.01840236410498619, -0.020291322842240334, -0.004718870390206575, -0.01681932434439659, -0.025415387004613876, 0.14370964467525482, 0.04069916903972626, -0.017246080562472343, -0.0007445294177159667, -0.0238481592386961, 0.021230516955256462, 0.05773646757006645, 0.024874987080693245, 0.023000353947281837, 0.021708697080612183, 0.060948148369789124, 0.004343786276876926, 0.09494274109601974, -0.060984838753938675, -0.020578747615218163, 0.044249098747968674, -0.023287080228328705, -0.016836922615766525, -0.00784025527536869, 0.056606095284223557, -0.04264427721500397, -0.007478795479983091, 0.02608107402920723, -0.020901722833514214, -0.02821572683751583, -0.06626533716917038, -0.056176263839006424, 0.0007335288682952523, -0.024629492312669754, -0.0295585747808218, -0.001099051907658577, 0.02055129036307335, 0.0005795775796286762, 0.033238817006349564, 0.0021908471826463938, -0.04082171246409416, 0.02535514160990715, 0.018022529780864716, 0.04377589374780655, -0.04279632493853569, 0.11410412192344666, 0.012728743255138397, 0.005946198012679815 ]
[ -0.010082617402076721, 0.04040932282805443, 0.006359352730214596, 0.01070677675306797, 0.007125175092369318, -0.005808661226183176, 0.03599722310900688, 0.05340076610445976, 0.03138973191380501, -0.0181148499250412, -0.02506144531071186, -0.023775210604071617, -0.008467713370919228, 0.024353403598070145, 0.009517413564026356, -0.06764131039381027, 0.039162635803222656, -0.06680550426244736, 0.023671496659517288, -0.011703540571033955, -0.03340578451752663, 0.029589878395199776, 0.015667211264371872, 0.02003135159611702, -0.009179105050861835, -0.0014122630236670375, -0.007075367961078882, 0.03370276838541031, 0.03448157384991646, -0.08453567326068878, 0.014917593449354172, -0.05028292536735535, -0.02503860928118229, -0.036576047539711, 0.025598714128136635, 0.027040645480155945, -0.01811053603887558, -0.020948858931660652, -0.017302121967077255, 0.03278481587767601, 0.06859283149242401, -0.029669566079974174, -0.022646252065896988, 0.03486994281411171, -0.0011245127534493804, 0.005446590483188629, -0.023159287869930267, 0.006683013401925564, -0.022389588877558708, 0.024545015767216682, -0.05168702080845833, -0.004404519684612751, -0.02215277962386608, 0.049664292484521866, 0.027844177559018135, 0.014187085442245007, -0.029428912326693535, -0.026991957798600197, 0.01493421196937561, 0.0014327879762277007, -0.015033802017569542, 0.004926823079586029, -0.05938660353422165, -0.013938423246145248, -0.021139081567525864, -0.004292866215109825, -0.05445193126797676, 0.0182280745357275, 0.00906032882630825, 0.020330769941210747, -0.007497508078813553, 0.001240086741745472, -0.026091255247592926, -0.025472339242696762, -0.0008069748873822391, -0.038307543843984604, -0.010151402093470097, -0.01581752486526966, -0.04756148159503937, 0.002618196653202176, -0.01686619222164154, -0.022502342239022255, -0.02586808241903782, 0.02573069930076599, -0.02952534146606922, -0.01887240819633007, 0.027387872338294983, -0.03561466559767723, 0.002711324021220207, 0.003430816112086177, -0.014593636617064476, 0.04793095588684082, 0.05662211775779724, -0.011729427613317966, -0.06298142671585083, 0.024490736424922943, -0.022951552644371986, -0.026945730671286583, 0.007093389052897692, 0.8128825426101685, 0.030664915218949318, 0.00575642753392458, 0.025511926040053368, 0.024083169177174568, -0.0010377527214586735, -0.049107521772384644, -0.03184901177883148, -0.0038351912517100573, -0.0014383451780304313, -0.038149502128362656, -0.004957534372806549, 0.011881831102073193, 0.03547731041908264, -0.001935257576406002, 0.05270165205001831, 0.050747353583574295, 0.03434380143880844, 0.0389128103852272, -0.00811488926410675, 0.02410956658422947, 0.04840464890003204, -0.061985455453395844, -0.02067289501428604, 0.0044015441089868546, 0.036389775574207306, -0.12162914127111435, 0.02839832566678524, -5.9463329478665764e-33, 0.043148793280124664, -0.02810848318040371, -0.006449551321566105, 0.03666629269719124, 0.043428950011730194, -0.001319625647738576, -0.006803566124290228, -0.014492198824882507, -0.02724533900618553, -0.02050079219043255, -0.00014983469736762345, 0.0028230026364326477, -0.042596664279699326, -0.027177926152944565, -0.006691766437143087, 0.01696435920894146, -0.025877326726913452, 0.05189645662903786, -0.02454628422856331, 0.003486193483695388, 0.023403257131576538, 0.04140377417206764, -0.013507016934454441, 0.027310485020279884, -0.003366967663168907, 0.047948483377695084, 0.02306104451417923, -0.019254768267273903, -0.0045906612649559975, -0.052956029772758484, -0.03328314423561096, 0.04258513078093529, 0.009204285219311714, -0.030760200694203377, -0.0463167279958725, -0.06207161396741867, -0.043965935707092285, -0.01865731179714203, -0.04031102731823921, -0.025775203481316566, -0.0559195913374424, 0.027821598574519157, -0.03910502791404724, -0.0658847913146019, -0.04417072981595993, 0.012360497377812862, 0.0274650938808918, 0.003969082608819008, 0.010024959221482277, -0.03438597917556763, 0.06379757076501846, -0.020247509703040123, 0.029606668278574944, 0.055832959711551666, -0.00008468724990962073, 0.035101987421512604, 0.03193891793489456, 0.009126723743975163, 0.0030995989218354225, -0.046473871916532516, 0.017373140901327133, -0.006671855691820383, 0.019472189247608185, 0.015462729148566723, 0.02316497266292572, 0.00008048739255173132, 0.005160451401025057, -0.0005192483076825738, 0.013324681669473648, 0.06203306093811989, -0.06929990649223328, 0.01729668863117695, -0.03231056034564972, -0.04170762374997139, 0.03677447512745857, -0.016529671847820282, 0.013661918230354786, -0.008203036151826382, -0.018388886004686356, 0.07096139341592789, 0.009024866856634617, -0.009948914870619774, 0.0638962909579277, 0.007535204291343689, 0.025489380583167076, -0.04040302336215973, 0.022532282397150993, 0.002890203148126602, 0.0063352505676448345, -0.00009709355072118342, -0.010530016385018826, 0.040526747703552246, 0.05863359943032265, -0.003254347015172243, -0.06381352990865707, 6.85792881692926e-33, -0.015643073245882988, -0.0049225338734686375, -0.03800642862915993, 0.014567464590072632, 0.007313948590308428, -0.01535505149513483, 0.028388334438204765, 0.013848472386598587, 0.0023558142129331827, 0.02674742415547371, -0.010865801945328712, -0.00038577383384108543, -0.03423856571316719, 0.05673353746533394, 0.03496626019477844, -0.00507813086733222, 0.014469240792095661, 0.001335757551714778, 0.015135616064071655, -0.031382378190755844, -0.03073757514357567, -0.014856671914458275, -0.0026065176352858543, 0.010738360695540905, 0.017474226653575897, 0.027728211134672165, 0.018429044634103775, 0.01590791903436184, -0.019647592678666115, -0.06955035030841827, 0.006919504143297672, -0.026098763570189476, 0.00013754253450315446, -0.007024860009551048, 0.0035516154021024704, 0.019570043310523033, 0.0048088813200592995, 0.023581398651003838, -0.012837015092372894, 0.015186800621449947, 0.054417505860328674, -0.005623382981866598, 0.002747900318354368, 0.01319557148963213, -0.015451139770448208, -0.017251022160053253, 0.005769919138401747, -0.017730824649333954, 0.0018190887058153749, 0.02157222479581833, -0.012380891479551792, 0.02118319645524025, 0.005594136193394661, 0.05362645164132118, -0.0010189565364271402, -0.00654875673353672, 0.022368261590600014, 0.0458868034183979, 0.0008448780863545835, -0.00706482445821166, -0.0159465242177248, -0.04660731554031372, 0.019735442474484444, -0.003938055597245693, -0.0002573986421339214, 0.004626043140888214, -0.008962436579167843, 0.044483814388513565, -0.012114626355469227, -0.007372877560555935, 0.026441369205713272, -0.02279369905591011, -0.04021545127034187, 0.040808938443660736, 0.045938603579998016, 0.04396304115653038, -0.009732207283377647, -0.018659058958292007, -0.017192726954817772, 0.013186044991016388, 0.013270444236695766, 0.019559694454073906, -0.0408715158700943, 0.0025364935863763094, -0.009743921458721161, 0.002799917943775654, -0.024582644924521446, 0.004956379067152739, 0.060122791677713394, 0.014668167568743229, 0.008405780419707298, -0.013505896553397179, -0.011427149176597595, 0.018588675186038017, -0.004350340459495783, -1.215585854197343e-8, -0.020975392311811447, -0.03502311557531357, -0.016547491773962975, 0.05253814160823822, -0.020001403987407684, -0.005645688623189926, -0.026628628373146057, -0.016310326755046844, -0.015107160434126854, 0.012259113602340221, -0.011007580906152725, -0.03396301716566086, 0.005490261595696211, 0.036024510860443115, 0.04482468217611313, -0.02729138359427452, -0.027346080169081688, 0.00002632852556416765, 0.023177573457360268, -0.0030484646558761597, 0.060706883668899536, 0.027586067095398903, 0.012275485321879387, 0.0014187468914315104, -0.029001682996749878, -0.02392192929983139, 0.045325782150030136, -0.06151117384433746, -0.03656042739748955, -0.032647524029016495, -0.024773797020316124, -0.020245812833309174, -0.013608166947960854, 0.028849439695477486, -0.017406189814209938, 0.01845487207174301, 0.00279493466950953, 0.023470120504498482, 0.00891702901571989, -0.005409070756286383, 0.004163288976997137, -0.0255843885242939, -0.042222753167152405, -0.0325622633099556, -0.051709845662117004, 0.011651708744466305, -0.02858918346464634, 0.02733372524380684, 0.04688359051942825, 0.024824945256114006, -0.03497621417045593, -0.003542974591255188, 0.03394295275211334, -0.026503155007958412, 0.00618492579087615, -0.011784409172832966, 0.016894923523068428, -0.04567614942789078, -0.004200599621981382, -0.01955247111618519, 0.06601399928331375, 0.015603837557137012, -0.02446635067462921, 0.005486165173351765 ]
quix-streams-process-n-kafka-messages
https://markhneedham.com/blog/2023/09/05/quix-streams-process-n-kafka-messages
false
2023-09-29 00:44:37
GPT 3.5 Turbo vs GPT 3.5 Turbo Instruct
[ "openai", "langchain", "til" ]
[ "TIL" ]
:icons: font Last week OpenAI sent out the following email introducing the `gpt-3.5-turbo-instruct` large language model: .Open AI announce gpt-3.5-turbo-instruct LLM image::{{<siteurl>}}/uploads/2023/09/openai-email.png[width="500px"] I've never completely understood the difference between the chat and instruct models, so this seemed like a good time to figure it out. In this blog post, we're going to give the models 5 tasks to do and then we'll see how they get on. [NOTE] ==== I've created a video showing how to do this on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], so if you prefer to consume content through that medium, I've embedded it below: ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/C-JV0VEzn-0?si=dMTX8FpWIBgfqySZ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ You can also find all the code at the https://github.com/mneedham/LearnDataWithMark/blob/main/gpt-instruct/notebooks/GPT-Instruct-Tutorial.ipynb[GPT-Instruct-Tutorial.ipynb notebook^]. ==== == Setup First things first, let's install some libraries: [source, bash] ---- pip install langchain openai python-dotenv wikipedia ---- I've got my OpenAI key in a file called `.env`, so let's first import that: [source, python] ---- import dotenv dotenv.load_dotenv() ---- And now we're going to create chat and instruct models. First, chat: [source, python] ---- from langchain.chat_models import ChatOpenAI turbo = ChatOpenAI(model_name="gpt-3.5-turbo") ---- And then instruct: [source, python] ---- from langchain.llms import OpenAI turbo_instruct = OpenAI(model_name="gpt-3.5-turbo-instruct") ---- == Answering factual questions 🤓 It's time to put the models through their paces. Task number 1 is to answer a factual question: [source, python] ---- question = "Did Microsoft acquire OpenAI?" ---- We can get the chat LLM's answer by running the following: [source, python] ---- print(turbo.predict(question)) ---- .Output [source, text] ---- No, Microsoft has not acquired OpenAI. However, Microsoft has provided financial support to OpenAI and the two companies have formed a partnership to work together on AI research and development. CPU times: user 32.8 ms, sys: 4.46 ms, total: 37.3 ms Wall time: 3.28 s ---- Now it's instruct's turn: [source, python] ---- print(turbo_instruct.predict(question)) ---- .Output [source, text] ---- No, Microsoft did not acquire OpenAI. Microsoft and OpenAI have a partnership where Microsoft invests $1 billion in OpenAI's research and development efforts. CPU times: user 5.79 ms, sys: 3.06 ms, total: 8.85 ms Wall time: 866 ms ---- Instruct is a bit more concise, but they more or less say the same thing. == Replying with empathy 💕 Next up, replying with empathy. Let's pretend I'm sad and need cheering up. What will they suggest? [source, python] ---- question = "I'm feeling sad today. Can you cheer me up?" ---- Chat is first up: [source, python] ---- print(turbo.predict(question)) ---- .Output [source, text] ---- I'm sorry to hear that you're feeling sad today, but I'll do my best to cheer you up! Remember that it's normal to have ups and downs, and this feeling won't last forever. Here are a few things that might brighten your day: 1. Reach out to a loved one: Talking to someone you trust about how you're feeling can provide support and comfort. 2. Do something you enjoy: Engaging in activities you love, such as listening to music, reading a book, or watching a funny movie, can help lift your spirits. 3. Practice self-care: Take some time to focus on yourself. Whether it's taking a relaxing bath, going for a walk in nature, or treating yourself to your favorite snack, prioritize your well-being. 4. Surround yourself with positivity: Surround yourself with things that make you happy. This could be listening to uplifting music, reading inspirational quotes, or looking at photos that bring back good memories. 5. Help others: Sometimes, doing something kind for someone else can give you a sense of fulfillment and joy. Consider volunteering, helping a friend, or even offering a kind word or gesture to brighten someone else's day. Remember, it's okay to feel sad, but always know that brighter days are ahead. Take care of yourself and seek support when you need it. CPU times: user 6.18 ms, sys: 3.23 ms, total: 9.41 ms Wall time: 13.8 s ---- I think there are some decent suggestions there, although it does take a long time to produce the answer - just under 14 seconds. Let's see how instruct gets on: [source, python] ---- print(turbo_instruct.predict(question)) ---- .Output [source, text] ---- Of course! Here are a few things that might make you smile: 1. Look at some funny memes or watch a funny video. Laughter is the best medicine! 2. Call or text a friend or family member and have a chat. Sometimes just talking to someone can help lift our spirits. 3. Take a walk outside and enjoy some fresh air and sunshine. Nature has a way of making us feel better. 4. Treat yourself to something nice, like your favorite snack or a warm cup of tea. 5. Put on some upbeat music and dance around your room. It's hard to be sad when you're dancing! Remember, it's okay to feel sad sometimes. But know that it won't last forever and there are always things we can do to make ourselves feel better. Sending you virtual hugs and positive vibes! CPU times: user 5.34 ms, sys: 2.37 ms, total: 7.71 ms Wall time: 2.43 s ---- The suggestions are pretty similar, but less detailed. It is, however, 5 times faster, which was surprising to me. I thought instruct would give short answers and that it would be quicker because of that, but there seems to be maybe a more fundamental difference that's making it generate answers more quickly. == Code generation 💻 Time for task number 3, which is a code generation task. We're going to ask the models to create a function that iterates through a CSV file and prints out every other line. [source, python] ---- question = "Can you write a Python function that reads a CSV file and prints out every other row?" ---- Over to you, chat: [source, python] ---- print(turbo.predict(question)) ---- .Output [source, text] ---- Yes, here's an example of a Python function that reads a CSV file and prints out every other row: ```python import csv def print_every_other_row(csv_file): with open(csv_file, 'r') as file: reader = csv.reader(file) row_num = 0 for row in reader: if row_num % 2 == 0: print(row) row_num += 1 # Example usage print_every_other_row('example.csv') ``` In this function, we use the `csv` module to read the CSV file. The `csv.reader` object allows us to iterate over the rows of the file. We keep a counter `row_num` to keep track of the row number, and if `row_num` is even (i.e., every other row), we print the row. CPU times: user 5.41 ms, sys: 3.07 ms, total: 8.48 ms Wall time: 9.23 s ---- That looks good to me and having tested it, the code does do what I asked! Let's see what instruct comes up with: [source, python] ---- print(turbo_instruct.predict(question)) ---- .Output [source, text] ---- def print_every_other_row(file_name): # open the CSV file with open(file_name, 'r') as csv_file: # use the csv module to read the file reader = csv.reader(csv_file) # loop through each row in the file for i, row in enumerate(reader): # check if the row is odd if i % 2 == 1: # print the row print(row) CPU times: user 7.04 ms, sys: 3.57 ms, total: 10.6 ms Wall time: 3.4 s ---- This time we get just the function. I'd say this function is cleaner than the other one, but it has missed the `import csv` line that we need to use the CSV module. == Analysing sentiment 😊 Let's make things a bit more interesting and see if the models can analyse the sentiment of a sentence. [source, python] ---- from langchain.prompts import PromptTemplate prompt = PromptTemplate.from_template("Analyse the sentiment of the following text: {text}") question = prompt.format(text="The DuckDB team is happy to announce the latest DuckDB release (0.9.0).") ---- We're gonna run this one three times each to see if the responses differ between runs: [source, python] ---- for _ in range(0,3): print(turbo.predict(question)) ---- .Output [source, text] ---- The sentiment of the given text is positive. The sentiment of the given text is positive. The sentiment of the following text is positive. The use of words like "happy" and "announce" indicates a positive sentiment. Additionally, the mention of the latest release suggests excitement and satisfaction. CPU times: user 16.7 ms, sys: 5.17 ms, total: 21.8 ms Wall time: 5.88 s ---- And instruct: [source, python] ---- for _ in range(0,3): print(turbo_instruct.predict(question)) ---- .Output [source, text] ---- Positive Positive Positive CPU times: user 15.9 ms, sys: 4.64 ms, total: 20.6 ms Wall time: 1.21 s ---- There's quite a big difference in the responses this time. Chat returns a full sentence every time, including an explanation on the 3rd try. Instruct returns a single word each time. == Summarising a Wikipedia page 📄 And now it's time for our last task - summarising a Wikipedia page. And that page is going to be the one about the Laver Cup, a team tennis tournament that was played last weekend. [source, python] ---- from langchain.document_loaders import WikipediaLoader docs = WikipediaLoader(query="Laver Cup", load_max_docs=1).load() docs[0].page_content ---- Below is a sample of the data on that page: .Output [source, text] ---- 'The Laver Cup is an international indoor hard court men\'s team tennis tournament between Team Europe and Team World, the latter of which is composed of players from all other continents except Europe. Usually held annually since 2017, the tournament is intended to be the Ryder Cup of the tennis world. It normally takes place two weeks after the US Open, with the location rotating between various host cities (that usually do not have an ATP Tour event); alternating yearly between European cities and cities in the rest of the world. In addition to the guaranteed participation fees which are based upon the players\' ATP rankings, each member of the winning team gets $250,000 in prize money, but the tournament itself does not count towards the players\' point totals in the ATP Tour for that year.In May 2019, the Laver Cup became an officially sanctioned ATP Tour event.' ---- There's a lot more after that, but let's see how well our LLMs get on if we ask them to find 5 interesting things from the page. [source, python] ---- prompt = PromptTemplate.from_template("Give me 5 interesting things from this text: {text}") question = prompt.format(text=docs[0].page_content) ---- Chat, you're up: [source, python] ---- print(turbo.predict(question)) ---- .Output [source, text] ---- 1. The Laver Cup is an international indoor hard court men's team tennis tournament that takes place annually since 2017. 2. The tournament is intended to be the Ryder Cup of the tennis world, modeled after the biennial golf tournament between the United States and Europe. 3. The location of the tournament rotates between various host cities, alternating yearly between European cities and cities in the rest of the world. 4. Matches during the Laver Cup tournament differ from conventional 3-set matches played on the ATP Tour, with a 10-point "match tiebreak" being played instead of a deciding final set. 5. The tournament is named after Australian tennis player Rod Laver, who is considered one of the greatest players in the sport's history and has achieved the Grand Slam twice. CPU times: user 32.7 ms, sys: 4.44 ms, total: 37.2 ms Wall time: 8.87 s ---- And now instruct: [source, python] ---- print(turbo_instruct.predict(question)) ---- .Output [source, text] ---- 1. The Laver Cup is named after Australian tennis legend Rod Laver, who is widely regarded as one of the greatest players in the sport's history. 2. The tournament is intended to be the equivalent of the Ryder Cup in golf, with the best players from Europe competing against the best players from the rest of the world. 3. Matches during the Laver Cup follow a unique format, with a "match tiebreak" being played if the match is tied at one set all. 4. The winning team receives a prize of $250,000, in addition to guaranteed participation fees based on players' ATP rankings. 5. The idea for the Laver Cup was inspired by Roger Federer, and was created in partnership with his management company, a Brazilian businessman, and Tennis Australia. CPU times: user 17.3 ms, sys: 17.7 ms, total: 35 ms Wall time: 2.11 s ---- Both results are pretty good and have pulled out the main points. Interestingly, it seems like the Instruct model might not stick around for long if the following tweet is anything to go by: .Logan Kilpatrick tweet image::{{<siteurl>}}/uploads/2023/09/logan-kilpatrick-tweet.png[width="500px"]
In this post, we'll learn about the differences between the GPT 3.5 chat and instruct large language models.
uploads/2023/09/turbo-banner.png
[ -0.010360946878790855, 0.003158810082823038, -0.010014494881033897, 0.055447787046432495, 0.05989174172282219, 0.04542437568306923, 0.03606737032532692, 0.037422120571136475, 0.0049859462305903435, -0.010281735099852085, -0.005646182224154472, 0.011417124420404434, -0.07969754189252853, 0.014807958155870438, -0.008496764115989208, 0.07068037241697311, 0.07759136706590652, -0.001247895648702979, 0.026230407878756523, 0.012486125342547894, 0.02232801355421543, 0.07705710083246231, 0.023468930274248123, 0.04490414634346962, 0.008510991930961609, 0.016604699194431305, 0.025658393278717995, 0.012678920291364193, -0.07173379510641098, -0.024559391662478447, 0.021498145535588264, -0.005008351057767868, 0.00188359001185745, -0.016128158196806908, 0.02364550717175007, 0.008025669492781162, -0.03316816687583923, 0.010804158635437489, 0.020486261695623398, 0.03998282179236412, -0.05339096859097481, 0.016479913145303726, -0.020351585000753403, 0.007106231991201639, -0.05669349431991577, 0.011403578333556652, -0.05783792957663536, 0.025643883273005486, 0.027561724185943604, -0.012404878623783588, -0.07008561491966248, 0.03226873651146889, -0.026780644431710243, -0.006102071143686771, 0.0007346578640863299, 0.047333694994449615, 0.03457491099834442, -0.06874912232160568, 0.032035935670137405, -0.0438251793384552, -0.0015966931823641062, -0.0029617412947118282, 0.0256109107285738, 0.01076712179929018, 0.010462747886776924, -0.03190232813358307, 0.004497268702834845, 0.051533043384552, -0.05386805534362793, -0.029919665306806564, -0.019952045753598213, 0.01639508828520775, -0.028516242280602455, -0.016163384541869164, 0.020375270396471024, -0.04639440402388573, -0.017312636598944664, 0.054801829159259796, 0.02296076901257038, 0.029805947095155716, -0.012631568126380444, 0.0006013423553667963, 0.023983418941497803, 0.04681840538978577, -0.011037599295377731, -0.03984144702553749, -0.015440848655998707, -0.02550603821873665, -0.06280532479286194, 0.05864863470196724, -0.007589306216686964, -0.06735765933990479, 0.030989043414592743, 0.005908760707825422, -0.018072308972477913, 0.0018156273290514946, -0.01058748085051775, -0.010335463099181652, -0.006497721187770367, -0.0007741790032014251, -0.0224356297403574, -0.02486145868897438, 0.03032219596207142, 0.05863809213042259, -0.08909640461206436, -0.0004630751791410148, -0.025953257456421852, -0.017805473878979683, 0.0047300998121500015, 0.0047223493456840515, -0.017678454518318176, -0.019437948241829872, -0.0028044923674315214, -0.003266384592279792, -0.0785481184720993, 0.06038467586040497, 0.007093469146639109, -0.004827343858778477, -0.0131643395870924, 0.022051814943552017, 0.056910619139671326, 0.03840043395757675, -0.016016049310564995, 0.07436621189117432, 0.020266108214855194, 0.03890306130051613, 0.006437425967305899, 0.04307576268911362, -0.016775120049715042, -0.06682787835597992, -0.0010072103468701243, 0.04075608775019646, 0.0056501650251448154, 0.018409473821520805, 0.00285204011015594, -0.027260953560471535, 0.01021619513630867, 0.009434075094759464, 0.04147162288427353, 0.010685415007174015, -0.01044133584946394, -0.04258575662970543, 0.01158184465020895, 0.016589682549238205, 0.01401232648640871, 0.01863972283899784, -0.007089465390890837, -0.02871573530137539, -0.025101756677031517, 0.003695886814966798, -0.017301667481660843, -0.01823791302740574, 0.07252851873636246, -0.03205975517630577, 0.00572971161454916, 0.0989651307463646, 0.028098417446017265, 0.017592279240489006, 0.01428220421075821, 0.0076943146996200085, 0.015981927514076233, 0.026204794645309448, 0.019404396414756775, 0.04628940671682358, -0.002577209612354636, -0.01621704176068306, 0.005152941681444645, 0.03838568180799484, -0.0028681736439466476, 0.008502968586981297, -0.053502269089221954, -0.05031653866171837, 0.07706823945045471, -0.01901344023644924, -0.055159952491521835, 0.04500129446387291, 0.09399393200874329, 0.0225377194583416, 0.04728895425796509, 0.013739882968366146, -0.08577800542116165, 0.023325148969888687, 0.015015178360044956, 0.01177156437188387, 0.017701944336295128, -0.00961846299469471, 0.09275112301111221, -0.0005780441570095718, 0.012912618927657604, 0.03066745400428772, -0.0525149442255497, -0.0527239628136158, -0.008784330449998379, -0.0002066402230411768, 0.06782487034797668, -0.04639916867017746, 0.006912794895470142, 0.03668562322854996, 0.041753675788640976, 0.040560830384492874, 0.03623484820127487, -0.020198127254843712, 0.023642856627702713, -0.02260434255003929, -0.050475023686885834, 0.013962894678115845, 0.030891841277480125, -0.022620543837547302, -0.04731113091111183, 0.010381031781435013, -0.021012935787439346, -0.024858882650732994, 0.048361971974372864, -0.0006760663236491382, 0.03513358160853386, 0.011134996078908443, 0.020914526656270027, -0.009076175279915333, 0.04940936714410782, -0.06441472470760345, 0.015623592771589756, -0.020132699981331825, -0.02173594944179058, -0.018387746065855026, 0.00426747091114521, 0.11241190880537033, 0.05555757135152817, -0.031446099281311035, -0.05673033371567726, 0.018611077219247818, 0.018258076161146164, -0.07825194299221039, 0.004794933367520571, 0.0009460201254114509, -0.009186037816107273, -0.004616921301931143, -0.03613609820604324, -0.04016825556755066, 0.026698701083660126, -0.04691627249121666, -0.015353044494986534, 0.07381058484315872, -0.02445264346897602, 0.03386086970567703, 0.026072034612298012, -0.01469179056584835, 0.0006756719085387886, -0.014560519717633724, -0.04396373778581619, 0.002560386434197426, 0.008194449357688427, -0.013720381073653698, 0.03272809833288193, -0.032130166888237, -0.02975069172680378, -0.042039502412080765, -0.03549564257264137, 0.037158817052841187, 0.061960842460393906, 0.055061403661966324, -0.013079692609608173, 0.04003031551837921, -0.008157827891409397, 0.02845212258398533, 0.005059228278696537, -0.046505749225616455, -0.032642148435115814, -0.02857316844165325, -0.004133607726544142, 0.003669388359412551, 0.015302135609090328, 0.004304418805986643, 0.0044211880303919315, -0.0018003744771704078, 0.016437359154224396, 0.01799207367002964, 0.011747686192393303, 0.017629513517022133, -0.018621323630213737, -0.02527054212987423, -0.02554927207529545, 0.05768141895532608, -0.04296029359102249, -0.025083957239985466, -0.02315308339893818, -0.0698048323392868, 0.019587935879826546, -0.09577938169240952, -0.026836415752768517, -0.013705596327781677, 0.007128772791475058, 0.029869405552744865, -0.01580214872956276, 0.007778319530189037, 0.050386346876621246, 0.014467955566942692, 0.0035051547456532717, 0.018321914598345757, -0.026656288653612137, 0.045749589800834656, 0.006697007454931736, 0.01748955249786377, 0.03875276446342468, 0.0052798353135585785, -0.01066160574555397, -0.0691603496670723, 0.03307892009615898, -0.03641253337264061, -0.2881176769733429, 0.014488214626908302, 0.02656855247914791, -0.029066722840070724, 0.027957716956734657, -0.04553213343024254, 0.01678510382771492, -0.049159448593854904, -0.006872354540973902, 0.012359618209302425, -0.018678324297070503, -0.04155568778514862, -0.023344427347183228, 0.04018271714448929, 0.01519251149147749, 0.013528311625123024, -0.008058314211666584, -0.017440110445022583, 0.01891331933438778, 0.0461747869849205, -0.0003550568362697959, -0.05541754141449928, -0.0013306995388120413, 0.04144930839538574, 0.033052198588848114, 0.009060179814696312, -0.07536783814430237, 0.027764376252889633, -0.03468342125415802, -0.017901727929711342, -0.013557449914515018, -0.024034835398197174, 0.004837452434003353, 0.01114791352301836, -0.0009679135400801897, -0.016595710068941116, 0.07446766644716263, 0.018613412976264954, 0.022592175751924515, -0.006921705324202776, -0.013844935223460197, -0.024517618119716644, 0.028447408229112625, 0.0024470840580761433, 0.10022547096014023, -0.019865769892930984, -0.09265675395727158, -0.016737135127186775, -0.02891474962234497, 0.0730103850364685, -0.04246579110622406, -0.032126281410455704, -0.025397980585694313, 0.050816260278224945, 0.0033288937993347645, 0.0019393753027543426, 0.003998609259724617, -0.011774254031479359, -0.03956632688641548, -0.02696792595088482, -0.008880143985152245, -0.041418224573135376, -0.04555278271436691, -0.05328810214996338, 0.011272385716438293, -0.08559350669384003, -0.047798868268728256, -0.044022269546985626, 0.06325727701187134, 0.033115580677986145, -0.07116156816482544, -0.013331872411072254, -0.009698537178337574, -0.0938442051410675, 0.012288189493119717, -0.013413891196250916, -0.024484707042574883, 0.007056370377540588, -0.000654218252748251, 0.06792044639587402, -0.06291315704584122, -0.06579037755727768, 0.0335061140358448, 0.0012449325295165181, 0.01720011979341507, -0.003396413056179881, 0.03811780363321304, -0.018485385924577713, 0.002670830814167857, 0.010402106679975986, 0.058154430240392685, -0.0281060878187418, -0.01787714473903179, -0.020395910367369652, -0.0025875375140458345, 0.008972682058811188, 0.01621897704899311, 0.02328139916062355, 0.012502194382250309, 0.043137941509485245, 0.010442591272294521, -0.06348765641450882, -0.00899931974709034, -0.027683891355991364, 0.009009191766381264, -0.006785241886973381, -0.03739984333515167, 0.004571734461933374, 0.03761798515915871, -0.003248524386435747, -0.020366959273815155, -0.04607238993048668, 0.023127984255552292, -0.03948058560490608, -0.05011362209916115, -0.012180635705590248, -0.0007517478079535067, 0.039321765303611755, 0.01681339181959629, -0.02785116620361805, -0.0370485782623291, 0.017743293195962906, -0.009980402886867523, 0.003123992821201682, -0.04024950787425041, -0.015487775206565857, -0.014285346493124962, -0.03635068237781525, -0.011579466983675957, 0.002557517262175679, -0.010500087402760983, 0.011722241528332233, 0.03256945312023163, -0.04007847234606743, 0.038468725979328156, -0.013822429813444614, -0.0022840409073978662, -0.02772890217602253, 0.002844226313754916, -0.014592030085623264, -0.005720711778849363, 0.03216547518968582, 0.004728004802018404, -0.0010417342418804765, 0.03707071766257286, 0.017383454367518425, 0.02900787442922592, -0.01621808297932148, -0.0028281405102461576, -0.005389970727264881, 0.022000830620527267, -0.03502299636602402, 0.015960322692990303, -0.016034072265028954, -0.007940076291561127, -0.017837679013609886, 0.02629033848643303, -0.03357788920402527, -0.029785675927996635, -0.024535134434700012, 0.035339925438165665, -0.03587682917714119, -0.026836199685931206, 0.010626311413943768, 0.047873176634311676, 0.026990026235580444, 0.03186335414648056, 0.00517338328063488, 0.002791702514514327, -0.024747179821133614, 0.03852764144539833, 0.008301666006445885, -0.03193249925971031, -0.0018539632437750697, -0.004494133871048689, -0.010596919804811478, 0.01749066635966301, 0.03134765103459358, 0.019591400399804115, 0.03634237125515938, 0.02256673574447632, -0.0362800695002079, 0.0010794645640999079, 0.01828029751777649, 0.03735135868191719, 0.036265525966882706, -0.025021858513355255, 0.005264035891741514, -0.017267882823944092, -0.013952430337667465, -0.03646128624677658, 0.007840008474886417, -0.015607147477567196, -0.0022291610948741436, -0.03482770174741745, -0.07480980455875397, 0.013433285057544708, 0.0020835038740187883, 0.019024984911084175, 0.01989837922155857, -0.007715995889157057, 0.008640298619866371, -0.03886423632502556, 0.046436820179224014, 0.058341093361377716, -0.06354312598705292, -0.01038676779717207, -0.0002937462704721838, 0.021621007472276688, 0.007491117808967829, 0.026446564123034477, -0.05582740157842636, -0.03197485953569412, -0.014417339116334915, 0.007409435231238604, -0.055703409016132355, -0.039046917110681534, -0.026740631088614464, 0.020176494494080544, -0.013145961798727512, 0.016490906476974487, -0.0058117457665503025, -0.011455073952674866, -0.020529329776763916, -0.025264309719204903, 0.01371808722615242, -0.018487706780433655, 0.015595750883221626, 0.020151503384113312, -0.03294474631547928, 0.025824803858995438, -0.03127748891711235, 0.02655787393450737, 0.049054406583309174, -0.001695229671895504, -0.009309543296694756, -0.045445408672094345, -0.00366741931065917, -0.0007197876693680882, 0.03592297062277794, 0.0011599179124459624, -0.010331282392144203, -0.04034631326794624, 0.0008816737681627274, -0.02790871448814869, 0.033295903354883194, -0.011930213309824467, -0.01659756898880005, 0.012336483225226402, 0.04393655061721802, 0.01191597431898117, 0.021909473463892937, -0.04186754301190376, -0.02469630539417267, 0.060521192848682404, -0.09140978008508682, -0.03199790045619011, 0.004815731663256884, -0.048707954585552216, 0.048512741923332214, 0.008659767918288708, 0.016749877482652664, -0.041197456419467926, 0.055828630924224854, 0.02999001555144787, 0.02941087633371353, 0.03032262623310089, -0.02133302204310894, 0.02767525240778923, -0.020064128562808037, -0.007389343809336424, -0.08810669183731079, -0.02157965488731861, 0.001423070440068841, -0.0052255140617489815, -0.0456661581993103, 0.017715899273753166, -0.02622021920979023, 0.04067672789096832, -0.0563928596675396, -0.01334721315652132, 0.052695345133543015, -0.004861707333475351, -0.014130682684481144, -0.007591916248202324, -0.05037105083465576, 0.03067658469080925, 0.04229443520307541, -0.052469320595264435, -0.005437901709228754, -0.00021533266408368945, 0.06545785814523697, -0.0314936600625515, 0.043446872383356094, -0.031782399863004684, -0.00692713912576437, 0.06801516562700272, 0.033248547464609146, 0.009671238251030445, 0.0501161590218544, 0.0013394312700256705, 0.05840513855218887, 0.01785842701792717, 0.0069467113353312016, 0.006960589438676834, 0.02618400566279888, -0.0007630620966665447, -0.09355345368385315, 0.06094220280647278, -0.017794717103242874, -0.02314780466258526, -0.0496797151863575, 0.06394880264997482, 0.016451740637421608, -0.009460359811782837, -0.03394710645079613, 0.03995433449745178, -0.05968999117612839, -0.031133586540818214, -0.026155170053243637, -0.008638173341751099, -0.024827878922224045, 0.057576097548007965, -0.007461380213499069, -0.00289959367364645, 0.060792725533246994, 0.00171216344460845, -0.01995496265590191, -0.0001922242227010429, 0.08339338004589081, 0.07398907840251923, 0.056828707456588745, 0.008334899321198463, 0.0787370577454567, -0.017702480778098106, -0.049484025686979294, 0.0055566695518791676, -0.01907142624258995, -0.025295183062553406, -0.029935535043478012, 0.025745606049895287, 0.08594777435064316, -0.028888201341032982, 0.059692975133657455, -0.051393598318099976, 0.01439178828150034, 0.02049480751156807, 0.014414939098060131, -0.009981371462345123, 0.05376936122775078, 0.020940905436873436, 0.03358430415391922, -0.015169288963079453, -0.026359258219599724, 0.029346484690904617, -0.03001733124256134, -0.000505161820910871, 0.02287597768008709, -0.015443865209817886, 0.0063079725950956345, -0.008717715740203857, 0.029955411329865456, 0.0837504044175148, -0.05731092765927315, -0.0056930966675281525, 0.0032949948217719793, 0.023279307410120964, 0.02053195796906948, 0.034851107746362686, -0.026566971093416214, -0.018363963812589645, -0.0068420846946537495, -0.02635069377720356, -0.04087124764919281, -0.026975594460964203, -0.006282417569309473, 0.01674945093691349, -0.03983071818947792, -0.0014891182072460651, 0.021805062890052795, -0.016285864636301994, -0.04169974848628044, -0.048594072461128235, -0.06391435116529465, -0.038049910217523575, -0.062298912554979324, -0.0052809822373092175, 0.0018108796793967485, -0.010905088856816292, -0.03122907690703869, -0.061738308519124985, -0.02332117035984993, 0.007387102581560612, 0.026471806690096855, -0.049576763063669205, -0.031939372420310974, 0.010190235450863838, 0.013468308374285698, 0.004893856588751078, 0.02860676683485508, 0.0757039412856102, 0.03170525282621384, -0.01713060773909092, -0.05548721179366112, 0.0400942862033844, 0.015970613807439804, -0.002713332651183009, 0.019480111077427864, -0.06963932514190674, -0.014945105649530888, 0.04193779081106186, -0.028449716046452522, -0.06757236272096634, 0.002501511014997959, 0.061842795461416245, 0.013772029429674149, 0.05244160816073418, 0.003428694559261203, 0.002488315338268876, -0.027201585471630096, -0.027235599234700203, -0.0023108094464987516, 0.01695118471980095, 0.04288589954376221, -0.016877306625247, 0.10124701261520386, 0.04868387430906296, -0.007759799249470234, -0.031176133081316948, -0.007190113887190819, -0.021945130079984665, -0.004861513152718544, -0.0558541938662529, -0.009060496464371681, -0.026333853602409363, -0.08319506049156189, -0.015573712065815926, 0.0218302384018898, -0.01651906780898571, -0.02973126247525215, 0.008543926291167736, -0.006754855625331402, 0.016337262466549873, 0.043143440037965775, -0.05252421647310257, -0.009547838009893894, -0.027670899406075478, -0.013903772458434105, -0.0059156883507966995, 0.028635406866669655, -0.014709440991282463, 0.00009450216748518869, 0.03745095804333687, -0.04150354862213135, 0.007668479811400175, -0.010191978886723518, 0.04731936752796173, 0.0316871777176857, 0.018651165068149567, -0.0022296018432825804 ]
[ -0.06629131734371185, -0.018690209835767746, -0.02828451246023178, -0.023711327463388443, 0.0451183021068573, -0.027538856491446495, -0.028333978727459908, 0.03430311754345894, 0.0064605530351400375, -0.010535788722336292, -0.0035842189099639654, -0.06987336277961731, -0.019032463431358337, 0.007972818799316883, 0.09074758738279343, -0.006839045323431492, -0.0026962580159306526, -0.08067262172698975, 0.010127606801688671, 0.032248012721538544, 0.0210157111287117, -0.05557367578148842, -0.010693357326090336, -0.007454209960997105, -0.009314552880823612, 0.058543406426906586, 0.03465583175420761, -0.031194791197776794, 0.016758080571889877, -0.2161768674850464, -0.003939371556043625, 0.01032978668808937, 0.060052208602428436, -0.01661217212677002, -0.03395871818065643, 0.045835454016923904, -0.03351273760199547, 0.0037188504356890917, -0.022895870730280876, 0.02742328867316246, 0.022974049672484398, 0.022086963057518005, -0.04983032867312431, -0.035883527249097824, 0.09333576261997223, -0.015016256831586361, -0.014592781662940979, -0.029977548867464066, -0.0483192503452301, -0.03338737040758133, -0.025108259171247482, -0.009258570149540901, -0.0076860892586410046, -0.010687866248190403, -0.01525785494595766, -0.00001894982415251434, 0.04041044041514397, 0.061864711344242096, 0.01925625465810299, 0.0139383003115654, 0.005149820353835821, 0.014189773239195347, -0.1469881236553192, 0.13068887591362, 0.007691789884120226, 0.0668448731303215, -0.024886462837457657, 0.001907341880723834, 0.00489303283393383, 0.06316090375185013, 0.023981237784028053, -0.03506768122315407, -0.029787564650177956, 0.0003985195071436465, -0.009887230582535267, 0.001795410760678351, 0.002277969615533948, 0.023732967674732208, 0.043608613312244415, -0.03371031582355499, -0.017500361427664757, -0.015680087730288506, -0.015584103763103485, -0.036430761218070984, -0.008607631549239159, -0.0004940136568620801, -0.01017723511904478, 0.05688965693116188, -0.014162321574985981, 0.015263024717569351, -0.010124712251126766, -0.02167334035038948, 0.023743871599435806, 0.02625177428126335, -0.08430024981498718, -0.0227353572845459, 0.007824479602277279, 0.020416464656591415, -0.06074916571378708, 0.43033501505851746, -0.012359792366623878, -0.03134224936366081, 0.044360119849443436, 0.036242421716451645, 0.022826798260211945, -0.004007537849247456, -0.007868868298828602, -0.03898588940501213, -0.00516202487051487, 0.002324732020497322, -0.01209062710404396, 0.02799350768327713, 0.07199595868587494, -0.05164779722690582, 0.0037313939537853003, 0.010669629089534283, 0.019032103940844536, 0.013398227281868458, 0.012258422560989857, 0.01116201188415289, -0.03538424149155617, 0.012525010854005814, 0.020774906501173973, -0.021569758653640747, 0.0017847544513642788, -0.01933894120156765, 0.03265910595655441, 0.03344888985157013, 0.05313627049326897, 0.03175364434719086, 0.04201778396964073, -0.002678577322512865, -0.06599213182926178, -0.006591374985873699, 0.05172182619571686, 0.02375456504523754, 0.039768870919942856, -0.013351565226912498, -0.014545189216732979, 0.019726518541574478, -0.019668931141495705, -0.017157869413495064, 0.06776484847068787, -0.029184816405177116, -0.047340016812086105, 0.11390762776136398, -0.004910979885607958, -0.03428521007299423, -0.005607759580016136, -0.04535309225320816, 0.006333435885608196, 0.039578523486852646, 0.02670956589281559, -0.02496083453297615, 0.022415904328227043, 0.008746214210987091, 0.09361425042152405, -0.004414199385792017, -0.06676223874092102, -0.019810236990451813, -0.015347514301538467, -0.03940819203853607, -0.04491681233048439, 0.023750506341457367, 0.05002089962363243, -0.14044544100761414, -0.07073897123336792, 0.017372002825140953, 0.026555435732007027, -0.06943419575691223, 0.007520122453570366, 0.018196523189544678, -0.0058374651707708836, 0.003931161481887102, 0.06538528949022293, -0.013226390816271305, -0.016760459169745445, 0.004880806896835566, 0.038644954562187195, 0.03230941668152809, -0.021547121927142143, -0.01792832836508751, 0.007925146259367466, 0.006003913469612598, -0.06607994437217712, -0.076774463057518, -0.03452150523662567, -0.01978539675474167, -0.001764262793585658, -0.053391508758068085, -0.019875017926096916, -0.0021186142694205046, -0.06573547422885895, 0.11415068060159683, -0.029553966596722603, 0.015439983457326889, -0.01841462217271328, -0.015517085790634155, -0.0007539812359027565, -0.04498153552412987, -0.035211414098739624, 0.018022481352090836, -0.016787433996796608, 0.02291668951511383, -0.0564868189394474, 0.02079068310558796, 0.05733507499098778, -0.05184634029865265, 0.06087329611182213, 0.02256295643746853, -0.043528962880373, 0.011420617811381817, 0.0059140026569366455, 0.0072182659059762955, -0.0006170213455334306, -0.027221571654081345, -0.004731281660497189, 0.012468554079532623, -0.011540505103766918, 0.03015943057835102, -0.02734249271452427, -0.02453681454062462, -0.04966653510928154, -0.3336753249168396, -0.05170316621661186, 0.00046390859642997384, -0.004871463868767023, 0.015175366774201393, -0.09006883203983307, 0.05164974927902222, -0.017907461151480675, 0.06499982625246048, 0.017146144062280655, 0.08996119350194931, 0.016279110684990883, -0.00044608634198084474, -0.09147801250219345, 0.02984609082341194, 0.03580763190984726, -0.0034220078960061073, 0.0023296643048524857, -0.04023345187306404, 0.01987156644463539, 0.011979411356151104, 0.034578584134578705, -0.015395969152450562, -0.0694652572274208, -0.01188015565276146, -0.027900319546461105, 0.0992257222533226, 0.007578391116112471, 0.06750548630952835, -0.016344856470823288, 0.03934243693947792, 0.02828150987625122, -0.01810592971742153, -0.10469786822795868, 0.033475641161203384, -0.020397376269102097, 0.05525682494044304, 0.03231126442551613, 0.029484596103429794, -0.028920108452439308, -0.044927459210157394, 0.01637270487844944, -0.03021540306508541, -0.045579783618450165, -0.002728524152189493, -0.0008166544139385223, -0.014975977130234241, -0.04631716012954712, -0.04754912853240967, 0.074486643075943, 0.008909014984965324, 0.018218616023659706, 0.03141950070858002, 0.025978514924645424, -0.03517485409975052, -0.03627146780490875, -0.10416512936353683, -0.022868487983942032, -0.0037356577813625336, -0.0343521349132061, 0.02691897749900818, 0.018318256363272667, 0.0053102606907486916, -0.08457435667514801, 0.0017401018412783742, 0.012147875502705574, -0.01009860634803772, -0.008145739324390888, 0.04754601791501045, 0.0023173762019723654, -0.021466560661792755, 0.0997476726770401, -0.0008957171812653542, 0.016489582136273384, 0.039551716297864914, 0.03694532439112663, 0.024333175271749496, 0.021085400134325027, 0.02012474834918976, 0.03037438355386257, 0.013143022544682026, 0.023970087990164757, 0.04010830074548721, -0.015693048015236855, -0.014274024404585361, 0.01498769037425518, -0.02404502034187317, -0.05035564303398132, 0.06556307524442673, 0.043178290128707886, -0.012781980447471142, 0.025391729548573494, 0.004397611599415541, -0.06153212860226631, 0.06847071647644043, -0.011915038339793682, -0.24152131378650665, 0.048696886748075485, 0.08842949569225311, 0.07662048935890198, -0.002177659422159195, -0.00637320289388299, 0.003546607680618763, -0.062344979494810104, -0.029781261458992958, 0.016438184306025505, -0.006640655919909477, 0.01754634827375412, 0.013409915380179882, 0.010608620941638947, 0.002570487791672349, -0.042698122560977936, 0.07075981050729752, -0.022083358839154243, 0.0036297959741204977, -0.002246118849143386, -0.02301953360438347, -0.006654620170593262, 0.1625986099243164, 0.014658392407000065, 0.012074959464371204, -0.015490775927901268, 0.0024046339094638824, -0.02494669333100319, 0.03941601887345314, 0.012751484289765358, 0.019738901406526566, -0.03128524869680405, 0.04721739888191223, 0.0021094451658427715, 0.050056781619787216, -0.03513522818684578, -0.03435385599732399, 0.03972248360514641, 0.012273398227989674, 0.021464833989739418, 0.01621185429394245, 0.04775368794798851, -0.03125322237610817, 0.01329916063696146, 0.023226238787174225, 0.01045666728168726, -0.005791051313281059, 0.0021208131220191717, -0.06469985842704773, 0.007228940259665251, -0.011504785157740116, -0.04267297685146332, -0.029128175228834152, -0.009837137535214424, -0.002006241586059332, 0.05191425234079361, 0.045124735683202744, -0.023502668365836143, 0.020640311762690544, 0.017160581424832344, -0.0025290283374488354, -0.041358597576618195, 0.09417885541915894, 0.026006044819951057, 0.011007608845829964 ]
[ -0.01165084820240736, -0.03209250420331955, -0.007282130420207977, -0.006057898513972759, 0.07918176800012589, -0.01902216300368309, 0.0195397287607193, 0.014955015853047371, 0.004390360321849585, 0.012192298658192158, -0.017287082970142365, 0.04577917605638504, -0.0014031962491571903, -0.0012770367320626974, 0.04634690657258034, 0.004814264364540577, 0.012324423529207706, -0.011828864924609661, -0.005956423468887806, -0.004276408348232508, -0.0014240811578929424, -0.01685066893696785, 0.04196946695446968, 0.016261551529169083, -0.00014139334962237626, 0.00781728234142065, -0.00260464777238667, 0.007100909948348999, 0.02936394512653351, -0.12088052928447723, 0.02915269322693348, -0.050185855478048325, -0.012690011411905289, -0.016571026295423508, -0.02235414646565914, 0.0131639763712883, -0.02302446961402893, -0.02266913466155529, -0.043281517922878265, -0.03894469514489174, 0.018708301708102226, -0.0010025708470493555, 0.009248858317732811, 0.009706725366413593, 0.022955533117055893, -0.02954198233783245, -0.014000104740262032, -0.037732161581516266, -0.003377639688551426, -0.03723931685090065, -0.0523533970117569, -0.03597383201122284, -0.015235542319715023, -0.016901511698961258, -0.0378936342895031, 0.01577604189515114, -0.01855085790157318, -0.009973615407943726, 0.031216278672218323, 0.015625836327672005, 0.0058179269544780254, -0.030380943790078163, -0.05165661498904228, -0.027161959558725357, 0.005371694453060627, -0.008975047618150711, -0.00232469430193305, -0.00598464161157608, -0.013251994736492634, 0.01728465035557747, -0.0028796393889933825, 0.006153592374175787, -0.024817630648612976, -0.001103403978049755, -0.024414561688899994, -0.04432728514075279, 0.0020473108161240816, -0.011671937070786953, -0.013624570332467556, 0.029922112822532654, -0.009916923940181732, 0.0015645484672859311, 0.029277216643095016, -0.0022107595577836037, 0.0016005084617063403, -0.004975742194801569, -0.00332229514606297, 0.014043881557881832, -0.002594251884147525, -0.014432664029300213, -0.064387746155262, 0.014714036136865616, -0.006957557518035173, 0.031247125938534737, -0.05997398868203163, -0.034775104373693466, -0.01622219756245613, -0.027640992775559425, -0.041595183312892914, 0.8497486710548401, -0.0055794003419578075, 0.0002914820215664804, 0.02974841743707657, 0.02295312099158764, -0.023407364264130592, -0.0008980587008409202, -0.013354003429412842, 0.025921616703271866, -0.013606852851808071, -0.019070643931627274, 0.025236723944544792, -0.012306916527450085, 0.020741773769259453, 0.007495255675166845, 0.022769691422581673, 0.012441917322576046, -0.03920947015285492, 0.017484886571764946, 0.025106554850935936, 0.047055285423994064, -0.012840711511671543, -0.010819001123309135, 0.014537034556269646, -0.017247535288333893, -0.0253616850823164, -0.1720241904258728, 0.0011539839906618, -6.434566444956952e-33, 0.04675333574414253, -0.008772095665335655, -0.012736741453409195, 0.026344960555434227, 0.02021200768649578, 0.041625574231147766, 0.0072768377140164375, -0.0054254913702607155, 0.008091073483228683, -0.03394531458616257, -0.005611761007457972, -0.010378816165030003, -0.033424291759729385, -0.015561264008283615, 0.0259413905441761, -0.0012549005914479494, -0.010577189736068249, 0.0572466105222702, 0.001140692038461566, 0.009112956933677197, 0.027141958475112915, 0.04447651281952858, 0.00349241029471159, 0.01027896348387003, -0.03862624615430832, 0.042618975043296814, 0.012990947812795639, -0.01079898327589035, 0.01436688844114542, -0.027691487222909927, 0.012783871032297611, -0.019251404330134392, -0.00023402768420055509, -0.0019177579088136554, 0.02436930499970913, -0.029293309897184372, -0.056883275508880615, 0.014355011284351349, 0.009396785870194435, 0.013404898345470428, -0.0006204749224707484, 0.0058135162107646465, -0.011259031482040882, -0.052087850868701935, -0.061325475573539734, 0.035979703068733215, 0.038262106478214264, 0.039303723722696304, -0.0033671921119093895, 0.006614995654672384, 0.02111605927348137, -0.007307844236493111, -0.02857672981917858, -0.0017489016754552722, -0.011375324800610542, 0.029095487669110298, 0.0027458309195935726, 0.01821468584239483, 0.04241348057985306, -0.014298386871814728, 0.001703119371086359, -0.022221749648451805, 0.025951620191335678, 0.020484689623117447, -0.006320355925709009, 0.018839156255126, -0.003906383644789457, 0.01634538173675537, 0.040415357798337936, 0.01621747761964798, -0.07326943427324295, 0.05441654846072197, -0.035425424575805664, 0.009700874797999859, 0.056890279054641724, -0.01981486566364765, -0.003406688803806901, -0.019915804266929626, -0.005514295771718025, 0.05371246114373207, -0.005284409504383802, -0.01642182283103466, 0.01993936114013195, -0.023982137441635132, -0.03046269901096821, -0.023796536028385162, 0.013180204667150974, -0.00811443105340004, -0.018987081944942474, 0.03689742460846901, 0.017792245373129845, -0.014010025188326836, -0.015222731046378613, 0.016161788254976273, -0.009440689347684383, 6.986474266979462e-33, 0.01695956103503704, -0.004315302241593599, -0.013108463026583195, 0.021578103303909302, 0.03418999910354614, -0.007501229178160429, 0.05793079733848572, 0.013463139533996582, -0.01587371900677681, 0.020953640341758728, -0.005216145887970924, -0.01410902664065361, -0.0367269329726696, 0.03499048203229904, 0.04743821918964386, -0.047120388597249985, 0.01080335769802332, -0.019857654348015785, 0.011275933124125004, -0.002740848809480667, -0.028187721967697144, 0.003310638014227152, -0.012547946535050869, 0.009005771018564701, 0.031533122062683105, 0.060998544096946716, 0.016491563990712166, -0.011133045889437199, 0.01176342461258173, 0.020429611206054688, 0.02188931591808796, 0.005288196727633476, -0.004374392330646515, 0.02763959765434265, -0.0007056331378407776, 0.049825359135866165, 0.04094430059194565, 0.0015642009675502777, -0.021014444530010223, 0.017853032797574997, 0.048998791724443436, 0.028615785762667656, -0.005571444984525442, 0.021138537675142288, -0.005942285060882568, 0.016914714127779007, 0.0032485402189195156, 0.0037058733869343996, -0.0059148045256733894, -0.005695357918739319, 0.004614816512912512, 0.002709002234041691, 0.01717022806406021, -0.005957229528576136, -0.0027368273586034775, -0.03940112143754959, -0.0014602644369006157, 0.042251523584127426, -0.034135036170482635, -0.013336552307009697, -0.037334803491830826, -0.026179224252700806, 0.010126103647053242, 0.003910887986421585, -0.02340536192059517, -0.0176913533359766, -0.01449369266629219, 0.019306184723973274, 0.013361513614654541, -0.012084277346730232, -0.007369770668447018, -0.05376190319657326, -0.00810975581407547, 0.028403354808688164, 0.0007154836202971637, 0.0067022149451076984, -0.01811688393354416, 0.0005000299424864352, 0.018362395465373993, 0.01047087274491787, 0.00405214074999094, -0.02261919528245926, -0.00008369845454581082, -0.005258998367935419, 0.03265925124287605, 0.009365927428007126, -0.010893936268985271, 0.007502296008169651, 0.04802863672375679, 0.015103484503924847, -0.000217781140236184, 0.03161823749542236, 0.013106676749885082, -0.002862479304894805, 0.026916133239865303, -1.2531510051871919e-8, -0.0220603309571743, -0.026584921404719353, -0.013699164614081383, 0.04627352952957153, -0.02222457528114319, 0.023261556401848793, -0.011569622904062271, 0.007002177648246288, 0.02434641495347023, -0.011435696855187416, 0.03506932407617569, -0.03145730867981911, -0.028004266321659088, -0.0023774653673171997, -0.011656447313725948, -0.025973128154873848, -0.0016125309048220515, 0.03425580635666847, 0.02831021510064602, -0.013307571411132812, -0.011703970842063427, 0.024015195667743683, 0.027642978355288506, -0.037882160395383835, -0.03259871527552605, -0.03304746747016907, 0.00824581179767847, -0.06661839038133621, -0.018870381638407707, 0.014287613332271576, -0.0014291933039203286, -0.033396165817976, -0.012517186813056469, -0.016621937975287437, -0.02576649934053421, -0.026957755908370018, 0.012142383493483067, 0.0007436603773385286, 0.03096519410610199, -0.003013694193214178, 0.019738707691431046, 0.003399949287995696, 0.02846534736454487, -0.0396595299243927, -0.016566427424550056, 0.01631052792072296, -0.005960557144135237, -0.012877662666141987, 0.016654299572110176, -0.02156808413565159, -0.008252227678894997, -0.0018858318217098713, -0.024429982528090477, 0.07203848659992218, 0.024173559620976448, -0.01287925522774458, -0.0005838031647726893, -0.037832047790288925, -0.03589089214801788, 0.00795335229486227, 0.006443070247769356, 0.03024808131158352, -0.01590588316321373, -0.021475685760378838 ]
openai-gpt-chat-vs-instruct
https://markhneedham.com/blog/2023/09/29/openai-gpt-chat-vs-instruct
false
2023-09-07 00:44:37
How to run a Kotlin script
[ "kotlin", "til" ]
[ "TIL" ]
:icons: font I was recently helping Tim get a https://github.com/tlberglund/pinot-movie-ratings[Pinot data-loading Kotlin script^] working and it took me a while to figure out the best way to run it. In this blog post, I'll share the solution we came up with. But first things first, we need to install Kotlin if it's not already installed. I used a library called https://sdkman.io/[SDKMAN6] for all things JVM, so I'm gonna run the following command: [source, bash] ---- sdk install kotlin ---- And now for the Kotlin script. Our script prints out a JSON document representing a person: .script.kts [source, kotlin] ---- @file:DependsOn("com.google.code.gson:gson:2.8.6") // <.> import com.google.gson.Gson data class Person(val name: String) class Blog { companion object { @JvmStatic fun main(args: Array<String>) { println( Gson().toJson(Person("Mark Needham")) ) } } } println("Script started") println("Before main function call") Blog.main(arrayOf()) // <.> println("After main function call") ---- <.> Install GSON as a dependency <.> Run the `Blog` main class After trying a few different approaches, I came https://github.com/kscripting/kscript[kscript^], a wrapper around `kotlinc` that takes care of compilation and dependency management for us. We can install it like this: [source, bash] ---- sdk install kscript ---- And then run our script: [source, bash] ---- kscript script.kts ---- .Output [source, text] ---- [kscript] Resolving com.google.code.gson:gson:2.8.6... Script started Before main function call {"name":"Mark Needham"} After main function call ---- And that's it!
In this post, we'll learn how to run a Kotlin script.
uploads/2023/09/kotlin-banner.png
[ -0.010029091499745846, 0.0021533684339374304, 0.011287924833595753, 0.03142206743359566, 0.07265790551900864, 0.017846040427684784, 0.035885341465473175, 0.031093275174498558, -0.011446763761341572, 0.002740372670814395, -0.027240518480539322, -0.00950293242931366, -0.07661079615354538, 0.013118026778101921, -0.030564716085791588, 0.06451518833637238, 0.11269921809434891, 0.014676781371235847, 0.037540238350629807, -0.002572831464931369, 0.046406906098127365, 0.07573872059583664, -0.001510326866991818, 0.06455639749765396, 0.015130969695746899, -0.0032965862192213535, 0.01701275072991848, 0.010143324732780457, -0.05389108881354332, -0.004408109933137894, 0.0224610585719347, -0.00767657021060586, -0.016690313816070557, -0.01510833203792572, -0.02583409659564495, 0.013026908040046692, 0.012849847786128521, 0.010921388864517212, -0.0017935349605977535, 0.051236335188150406, -0.04394049569964409, 0.03152631223201752, 0.01866493560373783, 0.003456594655290246, -0.020853281021118164, 0.00905860960483551, -0.050644468516111374, 0.0022559689823538065, -0.006383294239640236, -0.022443097084760666, -0.05821039527654648, 0.033433571457862854, -0.03715163469314575, -0.028068404644727707, 0.0001363332848995924, 0.045519229024648666, 0.0040624323301017284, -0.06572367995977402, 0.006962653715163469, -0.049933746457099915, 0.003217837307602167, -0.0024260340724140406, 0.0021535425912588835, 0.03445291146636009, 0.001346190576441586, -0.004349268041551113, 0.0042443047277629375, 0.04113354533910751, -0.03615708649158478, -0.031798962503671646, 0.009769179858267307, 0.007511630188673735, -0.03178739920258522, -0.007091001607477665, 0.0396505668759346, -0.05000493675470352, -0.025675777345895767, 0.08430903404951096, 0.007335570640861988, 0.024825042113661766, -0.028865331783890724, 0.0022171232849359512, 0.0005764330853708088, 0.02391435019671917, -0.0068994793109595776, -0.04872477054595947, -0.02616807073354721, -0.024819660931825638, -0.05132767930626869, 0.06135982647538185, 0.023088600486516953, -0.04603768140077591, 0.0197796318680048, 0.017977258190512657, 0.018653826788067818, 0.0010744583560153842, 0.005919208284467459, -0.010037023574113846, -0.009647415950894356, 0.00442168302834034, -0.03998398408293724, -0.0171002559363842, 0.026337651535868645, 0.006348090246319771, -0.07905253767967224, -0.024607587605714798, -0.013165227137506008, 0.003889096435159445, 0.001151248929090798, 0.01024197693914175, -0.022388042882084846, -0.010954837314784527, -0.006678675767034292, 0.027450617402791977, -0.06997961550951004, 0.1068171039223671, -0.008938400074839592, -0.03424206003546715, -0.0047272141091525555, 0.03394269943237305, 0.07091405987739563, 0.030185509473085403, -0.04249972105026245, 0.0841151550412178, 0.012787154875695705, 0.05452136695384979, -0.013247550465166569, 0.043463919311761856, 0.006607955787330866, -0.06506264209747314, -0.015277823433279991, 0.030613074079155922, -0.005470181815326214, 0.014057694002985954, 0.02071199007332325, -0.024466346949338913, 0.012420304119586945, -0.016362853348255157, 0.033335231244564056, 0.019827604293823242, 4.0871307760426134e-7, -0.021074069663882256, -0.01063449215143919, -0.011775980703532696, 0.054412949830293655, -0.0022207798901945353, 0.008430428802967072, -0.047853484749794006, -0.025714753195643425, 0.020331867039203644, -0.03476390242576599, 0.011607415042817593, 0.04643749073147774, -0.02413555420935154, 0.006684227380901575, 0.10403747856616974, 0.04839739948511124, 0.03244636207818985, -0.01636640541255474, 0.019068120047450066, 0.03868696093559265, 0.03200243413448334, 0.029261436313390732, 0.031987693160772324, -0.0029540068935602903, -0.050742071121931076, -0.0004552577738650143, 0.04352976754307747, -0.018684083595871925, -0.01562630757689476, -0.03932061046361923, -0.07180783897638321, 0.04801588132977486, -0.03327430784702301, -0.0010473205475136638, 0.030667608603835106, 0.0927426666021347, 0.009487495757639408, 0.022653071209788322, 0.03856412693858147, -0.09829020500183105, 0.034228481352329254, -0.0011220716405659914, -0.015202018432319164, 0.021586602553725243, 0.005256650038063526, 0.07172645628452301, -0.00482387188822031, 0.005358785390853882, 0.004019536543637514, -0.07501652836799622, -0.09609626233577728, -0.003287757281213999, 0.008794487453997135, 0.04217766970396042, -0.029152553528547287, -0.0019207957666367292, 0.025522831827402115, 0.015013431198894978, 0.023050589486956596, 0.020994514226913452, -0.018625911325216293, 0.014766588807106018, -0.05972232669591904, -0.06614203006029129, 0.03091312386095524, 0.017368633300065994, -0.029886098578572273, 0.004767740145325661, 0.0008024451090022922, -0.020917894318699837, -0.014353231526911259, 0.061563875526189804, -0.015577035024762154, 0.05512019619345665, 0.025943564251065254, -0.0017704044003039598, -0.02939561754465103, 0.060168907046318054, -0.06904584914445877, 0.01856628805398941, 0.025186602026224136, 0.006681973114609718, -0.0034013257827609777, 0.00630147336050868, 0.1277579516172409, 0.06663750857114792, -0.04151859134435654, -0.05385778471827507, 0.05641915649175644, 0.027678677812218666, -0.07436462491750717, 0.009137706831097603, -0.002462157281115651, -0.02736162208020687, 0.011023174040019512, -0.030378833413124084, -0.027124712243676186, 0.006696146447211504, -0.032028645277023315, 0.02136700227856636, 0.0905015617609024, -0.03395611047744751, 0.05944521725177765, 0.00426824064925313, -0.017107043415308, 0.011031195521354675, -0.027215681970119476, -0.0791158601641655, -0.02495897188782692, 0.018169958144426346, -0.01752086915075779, 0.03382802754640579, -0.029775075614452362, -0.030565008521080017, -0.04750048741698265, -0.05350915715098381, 0.019749993458390236, 0.03181648999452591, 0.04093080013990402, -0.00723226647824049, -0.0014598217094317079, -0.009496468119323254, 0.005395451094955206, -0.023518843576312065, -0.027774471789598465, 0.00016207961016334593, 0.010397577658295631, -0.0016448382521048188, 0.029543718323111534, 0.019235460087656975, -0.0009432464139536023, 0.0028568615671247244, -0.005014140158891678, -0.0027119237929582596, -0.01284706685692072, 0.011189027689397335, 0.008120303973555565, -0.008845536038279533, -0.032269664108753204, -0.004890284035354853, 0.06115242838859558, -0.02993324026465416, -0.012200568802654743, -0.00929498951882124, -0.06607231497764587, 0.04679213836789131, -0.06583467870950699, -0.04928020015358925, -0.015967532992362976, 0.022014377638697624, 0.023505233228206635, -0.011479749344289303, -0.01566322147846222, 0.05159308761358261, -0.010804918594658375, 0.004178326576948166, 0.028221789747476578, -0.015024921856820583, 0.03975261375308037, -0.0011329285334795713, 0.02861751802265644, 0.05246686190366745, 0.015596388839185238, -0.020879361778497696, -0.012978726997971535, 0.020950352773070335, -0.04420999065041542, -0.26715222001075745, 0.009716205298900604, -0.0070493267849087715, -0.030288133770227432, 0.01811513863503933, -0.012857789173722267, -0.0037679513916373253, -0.05155434459447861, -0.004111804533749819, 0.018672483041882515, -0.021283676847815514, -0.047829288989305496, -0.023942776024341583, 0.02947751060128212, -0.0059899562038481236, 0.004164117854088545, -0.010154382325708866, -0.030452731996774673, 0.001999052707105875, 0.04770641773939133, 0.000712214969098568, -0.058874767273664474, 0.034605104476213455, 0.06739714741706848, 0.031143439933657646, 0.054504793137311935, -0.08753541111946106, 0.04753442481160164, -0.04626459628343582, -0.019455650821328163, 0.008436202071607113, -0.02423768676817417, -0.021677160635590553, 0.024082491174340248, -0.0008357585757039487, -0.006460497155785561, 0.0321672149002552, 0.01205123495310545, 0.007252390496432781, 0.0012560688192024827, -0.0055247144773602486, -0.057217471301555634, -0.008889365009963512, 0.005648573860526085, 0.09633605927228928, -0.02996140345931053, -0.10490357130765915, 0.019514242187142372, -0.07058685272932053, 0.08563681691884995, -0.019260317087173462, -0.030768856406211853, -0.01585136167705059, 0.0115506611764431, -0.012575013563036919, -0.0015208505792543292, 0.006966542452573776, 0.026798691600561142, -0.031015703454613686, -0.015067358501255512, -0.03218028321862221, -0.021086396649479866, -0.026846392080187798, -0.03155505284667015, -0.0038283311296254396, -0.07055186480283737, -0.04598000645637512, 0.014967722818255424, 0.05680471286177635, 0.01684000715613365, -0.07266408205032349, -0.016794353723526, -0.01068717148154974, -0.10696897655725479, -0.001389784854836762, -0.024327266961336136, -0.03332650288939476, -0.020313212648034096, -0.017794940620660782, 0.06847470253705978, -0.026377104222774506, -0.052848611027002335, 0.04353718087077141, -0.005471537355333567, 0.027456598356366158, 0.0010425352957099676, -0.006734039634466171, -0.03710825368762016, 0.02951839007437229, -0.004996416158974171, 0.0666113793849945, -0.06808499991893768, -0.01282472349703312, -0.003039107657968998, -0.0041357469744980335, 0.02482679858803749, 0.025181680917739868, -0.020959079265594482, 0.009318533353507519, 0.03524790331721306, 0.0261703971773386, -0.051070116460323334, 0.017101580277085304, -0.001088348450139165, -0.019944453611969948, -0.017672277987003326, -0.07534199953079224, 0.03481810912489891, 0.02039778232574463, 0.005282619036734104, 0.02111976593732834, -0.047017812728881836, 0.006583481095731258, -0.06824791431427002, -0.033702485263347626, -0.011858087964355946, 0.014034530147910118, 0.050095103681087494, 0.008123615756630898, -0.010736867785453796, -0.05459439381957054, -0.000514533428940922, 0.010721704922616482, -0.01950185000896454, -0.05445669963955879, -0.004063183441758156, -0.006525236181914806, -0.019922886043787003, 0.001938128611072898, -0.022100748494267464, -0.01918373629450798, 0.03362741321325302, 0.03659144788980484, -0.04628138616681099, -0.015042713843286037, -0.022994058206677437, -0.05081638693809509, -0.039474114775657654, -0.014183848164975643, -0.024290338158607483, 0.010725080966949463, 0.0074819764122366905, -0.003675940213724971, 0.017899202182888985, 0.0304272323846817, -0.011850901879370213, 0.01674189604818821, -0.01374690979719162, -0.015148262493312359, 0.02397789992392063, 0.007313151843845844, -0.019614381715655327, -0.007500363513827324, -0.03427361696958542, -0.03063713014125824, -0.022505132481455803, 0.019022740423679352, -0.008041241206228733, -0.008344427682459354, -0.02979625202715397, 0.020088642835617065, -0.06519853323698044, -0.017919383943080902, 0.01582488603889942, -0.023947186768054962, 0.04312499985098839, 0.0025367047637701035, 0.0065208314917981625, -0.025884434580802917, 0.0046095778234303, 0.025669405236840248, -0.002224814612418413, -0.021783966571092606, 0.01613183505833149, -0.0016468047397211194, -0.018865620717406273, 0.02061024121940136, 0.0066736130975186825, 0.04031507670879364, 0.00858049001544714, 0.016155969351530075, -0.017478957772254944, -0.0024309472646564245, 0.0020541404373943806, 0.03172345831990242, 0.020589159801602364, -0.027651267126202583, -0.022083766758441925, -0.01734919100999832, -0.02220875956118107, -0.019950654357671738, 0.005472246091812849, -0.01960364170372486, 0.007289694622159004, -0.013127465732395649, -0.08228074759244919, 0.015623710118234158, 0.03467240929603577, 0.039261527359485626, 0.016941776499152184, -0.01666327565908432, -0.011554191820323467, -0.053832754492759705, 0.02807450480759144, 0.11167498677968979, -0.05389270931482315, 0.026415877044200897, 0.026345152407884598, 0.02989719994366169, -0.005464176181703806, 0.029712649062275887, -0.06986960023641586, 0.004169711843132973, -0.0294138565659523, 0.009406530298292637, -0.026763074100017548, -0.028723405674099922, -0.038082510232925415, -0.009035211987793446, -0.0169241800904274, -0.024216018617153168, 0.00938277319073677, -0.002825218951329589, -0.019027825444936752, -0.025708403438329697, 0.01715363934636116, -0.010549980215728283, 0.014690238982439041, 0.03858667239546776, -0.03328016400337219, 0.049534257501363754, -0.03232720494270325, 0.03203880414366722, 0.029492683708667755, -0.013560250401496887, 0.004810039885342121, -0.04894319549202919, -0.0032304890919476748, 0.017247751355171204, 0.03931031748652458, 0.01474262960255146, 0.006283612456172705, -0.03482494875788689, 0.006322837900370359, -0.04532880708575249, 0.008590791374444962, -0.029659518972039223, -0.02227804809808731, 0.026324426755309105, 0.07402239739894867, 0.010538498871028423, 0.006912683602422476, 0.010278390720486641, -0.008245834149420261, 0.06851812452077866, -0.0794648751616478, -0.04638874530792236, 0.018731771036982536, -0.037606943398714066, 0.04083123058080673, 0.004161347169429064, 0.03368595615029335, -0.020897915586829185, 0.03984773904085159, 0.05090029537677765, 0.028159135952591896, 0.027388812974095345, -0.026546649634838104, 0.03656844422221184, -0.022385671734809875, 0.0007335444097407162, -0.08796288818120956, 0.012551592662930489, 0.0054387543350458145, -0.01756623573601246, -0.016613095998764038, -0.0009147045784629881, -0.04009506478905678, 0.007013657595962286, -0.044236838817596436, 0.003527403110638261, 0.04955646023154259, -0.0014093115460127592, 0.0007247791509144008, 0.005471434909850359, -0.07323912531137466, 0.03572966530919075, 0.03606497868895531, -0.03885345160961151, 0.009216900914907455, -0.02117646485567093, 0.0503898486495018, 0.023907829076051712, 0.04656658694148064, 0.0023018554784357548, 0.002224345225840807, 0.0696641281247139, 0.0063081467524170876, -0.0027038550470024347, 0.050540924072265625, -0.008534303866326809, 0.03332381695508957, 0.03570764511823654, 0.011556245386600494, -0.00700750108808279, 0.059109166264534, -0.024483341723680496, -0.08067020773887634, 0.02941136434674263, 0.012725423090159893, -0.002149531850591302, -0.07007075846195221, 0.051019277423620224, 0.0267224982380867, -0.022243516519665718, -0.03685556724667549, 0.0010815245332196355, -0.04342406615614891, -0.007464507129043341, -0.029528044164180756, -0.0039033456705510616, -0.06268774718046188, 0.06877540051937103, -0.013620174489915371, -0.012065286748111248, 0.06930947303771973, 0.002396949101239443, -0.010833782143890858, -0.012767212465405464, 0.07707171142101288, 0.06607089936733246, 0.025451170280575752, 0.015627603977918625, 0.08481535315513611, -0.007196637801826, -0.03238559141755104, -0.004673551302403212, -0.00033374936901964247, -0.028997454792261124, -0.01560727134346962, 0.01570179872214794, 0.05440610274672508, -0.016105832532048225, 0.0706319659948349, -0.008278853259980679, -0.013489608652889729, 0.006153833121061325, 0.003841620637103915, 0.004631739109754562, 0.0476699024438858, 0.014097236096858978, 0.04515894129872322, 0.005380041431635618, -0.01732996106147766, 0.024340838193893433, -0.028720181435346603, -0.01734153926372528, 0.01141391135752201, -0.019050735980272293, 0.0007873367867432535, 0.05430115386843681, 0.005079810973256826, 0.06664516776800156, -0.016270138323307037, -0.008075262419879436, -0.007572608068585396, 0.039209261536598206, 0.016083763912320137, 0.006901072803884745, -0.027392355725169182, -0.03228282928466797, -0.011693705804646015, -0.007877981290221214, -0.009994326159358025, -0.004692877177149057, -0.010066107846796513, 0.047096773982048035, -0.017178598791360855, 0.029271645471453667, 0.013505087234079838, -0.021259894594550133, -0.041853561997413635, -0.06052401661872864, -0.039422549307346344, -0.0680326446890831, -0.05827700346708298, -0.027933992445468903, 0.004595492500811815, -0.01972668245434761, -0.047687750309705734, -0.014313831925392151, -0.008263654075562954, -0.00039205607026815414, 0.004182091914117336, -0.05730230361223221, -0.016438614577054977, 0.008178170770406723, 0.01784100942313671, 0.013033014722168446, 0.012762757018208504, 0.06485579907894135, -0.012273912318050861, -0.016314592212438583, -0.025716746225953102, 0.0017126122256740928, 0.044991008937358856, 0.02603403478860855, 0.02609286643564701, -0.04702109098434448, 0.010150310583412647, 0.0024315344635397196, -0.008623780682682991, -0.04538784176111221, 0.014108147472143173, 0.04923032596707344, -0.005200629122555256, 0.06172889098525047, 0.0035247360356152058, 0.02108609862625599, -0.04988723248243332, -0.020038073882460594, 0.0016622499097138643, 0.02254970744252205, 0.04492703080177307, -0.025970816612243652, 0.11775825172662735, 0.03433360531926155, -0.013961167074739933, -0.004352435003966093, 0.005810624919831753, -0.008732589893043041, -0.008115183562040329, -0.039602406322956085, -0.009820709004998207, -0.039337631314992905, -0.06662444770336151, -0.027967430651187897, 0.004433729685842991, -0.01995105855166912, -0.03267915919423103, 0.0025208157021552324, 0.023086441680788994, -0.02356213703751564, 0.08465555310249329, -0.03834538161754608, 0.0155848553404212, -0.02202911674976349, -0.018684808164834976, 0.006662033498287201, 0.02528313919901848, -0.012784008868038654, -0.00549851730465889, 0.03611046448349953, -0.04070347175002098, -0.01587534137070179, 0.006776438094675541, 0.0479835644364357, 0.03150053694844246, -0.024775128811597824, 0.01389014907181263 ]
[ -0.07194574177265167, 0.03600848838686943, -0.02029608190059662, -0.04395662620663643, 0.02990472875535488, -0.03326050937175751, -0.031213214620947838, 0.04748015105724335, -0.049947239458560944, -0.020064927637577057, 0.020819975063204765, -0.011278640478849411, 0.02122756652534008, -0.020787181332707405, 0.09274458885192871, -0.02706947736442089, 0.03405705839395523, -0.03645030036568642, -0.06272668391466141, 0.017510809004306793, 0.0431269109249115, -0.04361310973763466, 0.0030202106572687626, -0.06217176467180252, 0.02600518800318241, 0.0513964481651783, 0.009233533404767513, -0.033275675028562546, 0.014185971580445766, -0.17065328359603882, -0.0408843569457531, -0.042766742408275604, 0.006139860954135656, -0.007323089521378279, -0.04299817234277725, 0.06795421987771988, -0.028273871168494225, 0.01341648306697607, -0.01739918254315853, 0.0267400573939085, 0.01634875126183033, 0.019868722185492516, -0.06782667338848114, -0.05622777342796326, 0.04653872922062874, -0.017008647322654724, -0.03637628257274628, -0.025128738954663277, -0.007632630877196789, -0.014470387250185013, -0.054636187851428986, -0.0025899061001837254, 0.016140423715114594, -0.0234599057585001, -0.04936358705163002, -0.013576292432844639, 0.04558119550347328, 0.052957333624362946, 0.03571387752890587, 0.022922977805137634, -0.008168586529791355, 0.01168245729058981, -0.1112498790025711, 0.1393587440252304, -0.022417938336730003, 0.06023862585425377, -0.020041806623339653, 0.013647854328155518, -0.03834478557109833, 0.04172751307487488, 0.017008408904075623, 0.00926571898162365, -0.007167723961174488, 0.0465119406580925, -0.035771507769823074, -0.05644845962524414, -0.038228120654821396, 0.029869308695197105, 0.026052989065647125, -0.053282033652067184, -0.061388321220874786, -0.03840317204594612, -0.006824937183409929, -0.0043130056001245975, -0.016357459127902985, 0.012252825312316418, -0.005929931066930294, 0.06810146570205688, 0.013345071114599705, 0.060829561203718185, 0.06462778896093369, -0.013865115121006966, 0.06829863786697388, 0.01186189241707325, -0.10297748446464539, 0.012862524017691612, -0.020940497517585754, -0.02155054733157158, -0.05488640442490578, 0.4092559218406677, -0.047581616789102554, 0.007304923143237829, 0.05971820279955864, 0.01481675822287798, 0.02496960014104843, -0.022347746416926384, -0.03623315691947937, -0.0008155726827681065, 0.036007534712553024, -0.03639315068721771, -0.01050586812198162, 0.0071801007725298405, 0.05610273405909538, -0.046969927847385406, 0.014744441956281662, -0.036506298929452896, -0.011151890270411968, -0.020585691556334496, 0.016506468877196312, 0.0648663267493248, 0.0379507876932621, 0.006300103385001421, 0.033841654658317566, -0.009589210152626038, 0.024818137288093567, 0.008791180327534676, 0.030005985870957375, -0.005992410238832235, 0.07112529128789902, 0.033830028027296066, 0.04739103093743324, -0.013305922038853168, -0.053326115012168884, -0.006446089595556259, -0.033649954944849014, 0.03429419919848442, 0.017720863223075867, -0.08619437366724014, -0.009105083532631397, -0.018158990889787674, -0.018474118784070015, -0.000012202192920085508, 0.06335511058568954, -0.019560612738132477, -0.01862606778740883, 0.04324718192219734, 0.000007173937319748802, 0.0025652803014963865, -0.017524482682347298, -0.03553155064582825, -0.015426126308739185, 0.03038434125483036, -0.011723794974386692, -0.038200680166482925, 0.020087266340851784, 0.011390849016606808, 0.06403471529483795, -0.016241448000073433, -0.06858989596366882, 0.010076486505568027, -0.0255381241440773, -0.007652739528566599, -0.010872152633965015, -0.022031666710972786, 0.030845792964100838, -0.09793376922607422, -0.024118060246109962, 0.022402837872505188, 0.004387801978737116, -0.06973124295473099, -0.008650758303701878, 0.06232234463095665, -0.02120283432304859, 0.013306370005011559, 0.033708978444337845, -0.014285805635154247, -0.010554948821663857, 0.01100684329867363, 0.038467757403850555, 0.02293117344379425, -0.004422340076416731, -0.0012921529123559594, -0.041651271283626556, -0.0011028413427993655, -0.012021947652101517, -0.11895415931940079, -0.01391298696398735, -0.005451672710478306, 0.009721594862639904, -0.009475653059780598, -0.000749961647670716, -0.02088502049446106, -0.0020875539630651474, -0.0037569317501038313, 0.030960988253355026, 0.010380248539149761, -0.010845329612493515, -0.052852533757686615, -0.001417730120010674, -0.03936013579368591, 0.039838194847106934, 0.038722384721040726, 0.037476345896720886, 0.01511410716921091, -0.05857989937067032, 0.07618219405412674, 0.03709850460290909, -0.02542216330766678, 0.03737381845712662, -0.012950694188475609, -0.06882991641759872, 0.020025094971060753, 0.01562467496842146, 0.02217116206884384, 0.014772297814488411, -0.03467132896184921, -0.03828606754541397, 0.0022814273834228516, 0.05092901736497879, 0.03250565379858017, -0.013144281692802906, -0.05630306899547577, -0.028673095628619194, -0.3701179325580597, -0.0073206545785069466, 0.00938330590724945, 0.03774859383702278, -0.007998623885214329, -0.05192279443144798, 0.00905783660709858, 0.00011548658221727237, 0.029849061742424965, -0.000004225554675940657, 0.12292609363794327, -0.0180447306483984, 0.03138657659292221, -0.08755213022232056, 0.039011646062135696, 0.02361394092440605, -0.017102492973208427, -0.031897157430648804, 0.02110319584608078, -0.007319190539419651, -0.02260803058743477, -0.04132987558841705, -0.015783751383423805, -0.07315097004175186, 0.0106965946033597, 0.01931927725672722, 0.08701413869857788, 0.04646319895982742, 0.054138753563165665, -0.09565678238868713, 0.04430898651480675, 0.035489678382873535, -0.005069842096418142, -0.11748015135526657, 0.01796477846801281, -0.04671288654208183, 0.02061103656888008, 0.032674651592969894, 0.01638728566467762, -0.020605234429240227, -0.054819781333208084, 0.034286484122276306, -0.03367026150226593, -0.047954294830560684, -0.01737554743885994, 0.01401433628052473, 0.002991034649312496, -0.025210434570908546, -0.009356528520584106, 0.040195439010858536, -0.012101317755877972, 0.06524538993835449, 0.05500940978527069, 0.003432815195992589, -0.0014253644039854407, -0.004145124461501837, -0.03671703487634659, -0.0005779317580163479, 0.0355546809732914, -0.009647756814956665, 0.05105620622634888, 0.04492378979921341, 0.018274130299687386, -0.07824961841106415, -0.010269958525896072, 0.022430460900068283, -0.0062055340968072414, 0.020145423710346222, 0.03290773183107376, 0.014865638688206673, -0.060256000608205795, 0.04121607914566994, -0.019495442509651184, 0.048742085695266724, 0.05106668174266815, 0.045421529561281204, 0.023935755714774132, -0.005143910646438599, 0.023128528147935867, 0.015390031039714813, -0.004166741389781237, -0.0034277772065252066, 0.045288633555173874, -0.06426633149385452, -0.047645922750234604, 0.048268433660268784, -0.008340553380548954, 0.003274906426668167, 0.0090453727170825, 0.001244033919647336, -0.0259074904024601, 0.0014158054254949093, 0.05978374555706978, -0.05386533588171005, 0.06634963303804398, 0.04625697806477547, -0.24512284994125366, 0.045002296566963196, 0.06211841478943825, 0.06404691934585571, -0.00425766920670867, 0.011908017098903656, 0.027119064703583717, -0.09346041083335876, -0.029332652688026428, 0.015879910439252853, 0.02910447120666504, 0.04676514118909836, 0.037182219326496124, -0.017813021317124367, 0.042206645011901855, -0.02380598708987236, 0.03639126941561699, 0.018614858388900757, -0.0008594214450567961, -0.024025335907936096, 0.022722439840435982, -0.031670983880758286, 0.1735960692167282, -0.005075191147625446, -0.021486008539795876, 0.030017437413334846, 0.012219944037497044, 0.006799356080591679, 0.03928885981440544, 0.041706185787916183, 0.007404839154332876, 0.030404768884181976, 0.046329058706760406, 0.010938532650470734, 0.04006021097302437, -0.045260004699230194, -0.025932691991329193, 0.032349370419979095, 0.0009780741529539227, 0.008691221475601196, 0.007429808843880892, 0.04663658142089844, -0.03206847980618477, 0.003805151442065835, 0.07544862478971481, -0.027486251667141914, -0.03474082052707672, -0.00541033037006855, -0.04966367781162262, -0.04748450219631195, -0.021508920937776566, -0.02836754359304905, -0.03950761631131172, 0.006260725203901529, -0.04709193482995033, 0.06638069450855255, 0.010826732963323593, -0.007976561784744263, -0.004274960141628981, -0.005144389346241951, -0.01095910556614399, -0.06545315682888031, 0.10661160945892334, 0.051876965910196304, 0.0031676150392740965 ]
[ -0.03473406657576561, 0.0002121918078046292, 0.005972056183964014, -0.003762013278901577, 0.018662190064787865, 0.04014633223414421, 0.007403710391372442, 0.018823280930519104, -0.023686692118644714, -0.009516408666968346, 0.016257574781775475, -0.0036020197439938784, 0.004510350059717894, -0.01381555013358593, 0.02356964908540249, -0.05752481892704964, -0.002972678979858756, -0.0010009714169427752, -0.0033821999095380306, 0.008287136442959309, -0.010959318839013577, 0.006654088385403156, 0.05895522981882095, 0.006852211896330118, 0.0006392099894583225, -0.03442764654755592, -0.018970798701047897, -0.04252151772379875, 0.03625498712062836, -0.10385110229253769, -0.007926230318844318, -0.00966518186032772, -0.007165145128965378, 0.01228746585547924, -0.023751195520162582, 0.024899333715438843, -0.004031925927847624, 0.009422315284609795, -0.02202380634844303, 0.015276112593710423, 0.005952914245426655, -0.009106136858463287, -0.023919379338622093, -0.026465287432074547, 0.046655867248773575, -0.07183726131916046, -0.0680752620100975, -0.048517633229494095, -0.02199321612715721, 0.0010303788585588336, -0.029634112492203712, -0.0006511185201816261, 0.027662822976708412, -0.018282661214470863, 0.0038797163870185614, -0.013621419668197632, -0.052295610308647156, 0.014879547990858555, 0.034372132271528244, -0.013619259931147099, 0.009883287362754345, -0.016442883759737015, -0.0329459086060524, -0.012285610660910606, 0.001349009806290269, -0.028349831700325012, 0.028950445353984833, 0.005419823341071606, 0.013310017064213753, -0.00394078716635704, 0.02337467297911644, 0.009077292867004871, -0.005445368122309446, 0.006437298376113176, -0.023265056312084198, 0.0002021870604949072, -0.013707617297768593, -0.004715140908956528, 0.003592678578570485, -0.002288712887093425, -0.017230305820703506, 0.004016730934381485, -0.0017562186112627387, 0.02789151482284069, -0.025263413786888123, 0.005792565178126097, -0.011833895929157734, 0.01970185711979866, -0.01944434642791748, 0.029574846848845482, -0.0003174633893650025, 0.01697429083287716, 0.01841125264763832, -0.009146908298134804, -0.10260959714651108, 0.012675554491579533, -0.029937688261270523, -0.02118835784494877, -0.001158669707365334, 0.845723569393158, -0.012948697432875633, 0.0365925207734108, 0.03243830054998398, 0.007794112898409367, 0.02592727541923523, -0.040160562843084335, -0.019028615206480026, -0.0033886698074638844, -0.014774776063859463, -0.022943872958421707, 0.05151348561048508, 0.017941394820809364, 0.03596043586730957, -0.007462786976248026, 0.04607805237174034, 0.003042347962036729, 0.01821177452802658, 0.0016002509510144591, 0.05537623539566994, 0.04034525156021118, 0.04117774963378906, -0.015069941058754921, 0.0012049167416989803, 0.006043799687176943, -0.003362345276400447, -0.16546784341335297, 0.013723890297114849, -6.599802012432194e-33, 0.0689895898103714, -0.025528226047754288, 0.03311334550380707, -0.015752077102661133, -0.028237033635377884, -0.014727864414453506, -0.03373691439628601, 0.0007137300563044846, -0.025872185826301575, -0.05857660248875618, -0.015335705131292343, 0.004023116081953049, -0.026547307148575783, -0.003934377338737249, 0.009962167590856552, 0.012170244008302689, -0.001278506824746728, 0.029629504308104515, 0.00031865263008512557, 0.011501763947308064, 0.02130071260035038, 0.02304724045097828, 0.019879823550581932, 0.013156344182789326, 0.017504079267382622, 0.02519214153289795, 0.0433218851685524, -0.011041492223739624, -0.033471353352069855, -0.041245121508836746, -0.00539341801777482, -0.008404826745390892, 0.02109929732978344, 0.01783774048089981, -0.005956921260803938, -0.06209982559084892, -0.04715302214026451, -0.007052920758724213, -0.01575157791376114, -0.013145709410309792, -0.021319519728422165, -0.023534338921308517, -0.05273348465561867, 0.008550350554287434, -0.022884195670485497, 0.020435428246855736, 0.020206211134791374, 0.00872436910867691, -0.015274874866008759, 0.03294067084789276, 0.034280404448509216, 0.029069719836115837, -0.007473009638488293, 0.021258288994431496, -0.01302929874509573, 0.06005718186497688, 0.03390999883413315, -0.03303825110197067, 0.010541725903749466, -0.00751373590901494, 0.000025178611394949257, -0.014420542865991592, 0.0039864894933998585, 0.02671039290726185, 0.00932327937334776, -0.022187422960996628, -0.027855398133397102, -0.021539347246289253, -0.013884921558201313, -0.0010040280176326632, -0.034492362290620804, 0.02625862881541252, -0.0000749624305171892, -0.016688480973243713, 0.03301000967621803, 0.00268203835003078, -0.010343095287680626, -0.005921230651438236, -0.0285473745316267, 0.05561232194304466, 0.002733719302341342, -0.018051913008093834, 0.015775257721543312, -0.007831612601876259, -0.01665624789893627, -0.01763753592967987, 0.04213961213827133, -0.03080696612596512, -0.016410313546657562, 0.012821182608604431, 0.02411477081477642, 0.04216564819216728, -0.004494049120694399, -0.03820951282978058, -0.017122061923146248, 6.227403932723755e-33, 0.019065257161855698, 0.013858226127922535, 0.0034584759268909693, -0.004023363813757896, 0.01831282302737236, -0.010695746168494225, 0.023062758147716522, 0.03210136666893959, -0.01480952464044094, 0.038768984377384186, -0.03894156962633133, -0.011884532868862152, -0.010758109390735626, 0.017490295693278313, 0.07333272695541382, 0.018022270873188972, -0.0032186100725084543, 0.02298467792570591, 0.003094292478635907, -0.018777070567011833, -0.0009729130542837083, 0.01818312332034111, 0.029132356867194176, 0.01592070423066616, 0.04669344797730446, 0.019426820799708366, -0.003249428002163768, 0.017561962828040123, -0.05377811938524246, 0.006635705474764109, 0.024447817355394363, -0.042895376682281494, -0.0029214960522949696, -0.0182813610881567, 0.016794051975011826, 0.034088827669620514, 0.006355202291160822, -0.021129632368683815, 0.000033272805012529716, -0.008176934905350208, -0.003199264407157898, -0.013373835943639278, 0.026982050389051437, 0.014459274709224701, 0.003164604539051652, -0.012978016398847103, 0.028382450342178345, -0.0072277444414794445, 0.011467790231108665, -0.0349079892039299, 0.005467050243169069, 0.035533398389816284, 0.032151397317647934, 0.002294676611199975, 0.022549370303750038, -0.022461622953414917, -0.023465538397431374, 0.01694493554532528, -0.026254458352923393, -0.009576810523867607, 0.00013794103870168328, -0.06958632171154022, -0.0018083779141306877, 0.0047793081030249596, -0.03688693791627884, -0.05976122245192528, 0.0005562093574553728, -0.02209838479757309, -0.011062148958444595, -0.022018935531377792, -0.0048482115380465984, -0.028729142621159554, 0.031169012188911438, 0.04345790296792984, 0.01678919978439808, 0.00988808274269104, -0.007282565347850323, 0.026891332119703293, 0.01612985134124756, 0.00035644148010760546, 0.03468795865774155, 0.009098676964640617, -0.0017559246625751257, 0.004484009929001331, 0.0440605990588665, -0.007650159299373627, -0.026932064443826675, 0.0035100134555250406, 0.02557918056845665, -0.017480703070759773, -0.022346876561641693, -0.004960395395755768, 0.017938725650310516, 0.010301311500370502, 0.008891423232853413, -1.2394382409297577e-8, 0.008862662129104137, -0.019252389669418335, -0.029523596167564392, 0.024134840816259384, 0.037761934101581573, -0.0009585549123585224, -0.021543234586715698, -0.03521803766489029, -0.027624301612377167, -0.015175659209489822, 0.025702711194753647, 0.022121017798781395, -0.0022727178875356913, 0.028517961502075195, -0.000007756726517982315, -0.07439976930618286, -0.022789452224969864, 0.004003907088190317, 0.010197131894528866, 0.033052440732717514, 0.014036593958735466, 0.017521027475595474, -0.015326633118093014, -0.02623855508863926, -0.03712983429431915, -0.0015381915727630258, 0.01696913130581379, -0.04101556912064552, -0.010725400410592556, -0.008528165519237518, 0.02636045217514038, -0.03226016089320183, -0.056058984249830246, 0.00013237360690254718, -0.01254535187035799, -0.025881420820951462, 0.007055586203932762, 0.012914314866065979, 0.03572426363825798, 0.01958319917321205, 0.000752948340959847, -0.025035668164491653, -0.006721466314047575, -0.02604888379573822, -0.02531530149281025, -0.0182790569961071, -0.0023957197554409504, 0.021737292408943176, 0.029445989057421684, 0.007033752743154764, -0.017442816868424416, -0.011130636557936668, -0.024310452863574028, 0.024621209129691124, 0.03563590720295906, -0.05363224446773529, 0.04662841930985451, 0.02607746794819832, -0.022076427936553955, -0.007698450703173876, 0.039326272904872894, 0.034644801169633865, -0.008303851820528507, -0.018912868574261665 ]
how-to-run-kotlin-script
https://markhneedham.com/blog/2023/09/07/how-to-run-kotlin-script
false
2023-09-12 00:44:37
kcat: SASL - Java JAAS configuration is not supported
[ "kcat", "kafka", "til" ]
[ "TIL" ]
:icons: font I've been updating the StarTree Kafka SASL recipe to use Pinot 0.12 and ran into an error while trying to have it use `kcat` to ingest data into Kafka. In this blog post, we'll learn how I did this. The initial recipe was ingesting data into Kafka using `kafka-console-consumer.sh`, which uses the Java Kafka client. I'm using this Kafka client config file: .kafka-config/kafka_client.conf [source, properties] ---- security.protocol=SASL_PLAINTEXT sasl.mechanism=PLAIN sasl.jaas.config=org.apache.kafka.common.security.plain.PlainLoginModule required \ username="alice" \ password="alice-secret"; ---- And, we use this script to ingest data from a data generator: [source, bash] ---- python datagen.py | docker exec -i kafka-sasl /opt/kafka/bin/kafka-console-consumer.sh \ --bootstrap-server localhost:9093 \ --consumer.config /etc/kafka/kafka_client.conf \ --topic events \ --from-beginning ---- This all works fine, so I tried to update the script to use `kcat` instead: [source, bash] ---- python datagen.py | kcat -P -b localhost:9092 -F kafka-config/kafka_client.conf -t events ---- But this time it's not happy and we see the following error: .Output [source, text] ---- % Reading configuration from file kafka-config/kafka_client.conf % ERROR: kafka-config/kafka_client.conf:3: Java JAAS configuration is not supported, see https://github.com/edenhill/librdkafka/wiki/Using-SASL-with-librdkafka for more information. ---- ChatGPT helped me translate my original configuration to the following: .kafka-config/kafka_client_kcat.conf [source, properties] ---- security.protocol=SASL_PLAINTEXT sasl.mechanisms=PLAIN sasl.username=alice sasl.password=alice-secret ---- And then I updated my script to use that file: ```bash python datagen.py | kcat -P -b localhost:9092 -F kafka-config/kafka_client_kcat.conf -t events ``` If we run that for a few seconds, we can then check if any data has been ingested: [source, text] ---- kcat -C -b localhost:9092 \ -F kafka-config/kafka_client_kcat.conf \ -t events \ -c 5 ---- .Output [source, json] ---- {"ts": 1694529896154, "uuid": "1c192aca-05e4-497c-823c-6de697b38ebc", "count": 153} {"ts": 1694529896154, "uuid": "1336fc02-6e2a-47da-bbdb-b960356f6cac", "count": 674} {"ts": 1694529896154, "uuid": "ce4878f0-129a-4aad-b65f-d06b5817c5cd", "count": 231} {"ts": 1694529896154, "uuid": "006d29dd-e6a2-4dec-b9dd-49ee72406aeb", "count": 287} {"ts": 1694529896154, "uuid": "86693165-5194-41a5-9531-c61453b0d565", "count": 931} ---- Success!
In this post, we'll learn how to ingest data into Kafka using kcat with SASL.
uploads/2023/09/kcat-sasl-banner.png
[ -0.01988675817847252, -0.0011076773516833782, -0.04102639853954315, 0.024614552035927773, 0.08205262571573257, 0.012440111488103867, 0.04624428600072861, 0.05208908021450043, 0.004816851112991571, -0.003550912020727992, -0.01501865591853857, -0.01977442018687725, -0.07140986621379852, 0.022300105541944504, -0.026644524186849594, 0.06061285361647606, 0.07763393223285675, 0.022333931177854538, 0.04306714981794357, 0.005250473506748676, 0.029925400391221046, 0.05753456428647041, 0.0157729834318161, 0.0672355443239212, 0.028547050431370735, 0.021779250353574753, -0.016914675012230873, 0.01198677346110344, -0.05396841838955879, -0.0167543888092041, 0.020049037411808968, 0.024029439315199852, 0.0033364761620759964, -0.030878717079758644, 0.002690864959731698, -0.035211123526096344, -0.01146780140697956, 0.01590738259255886, 0.015863433480262756, 0.034931331872940063, -0.06708571314811707, 0.03465183079242706, 0.002235803520306945, 0.016617652028799057, 0.0038464718963950872, 0.015432074666023254, -0.046490177512168884, 0.00649333605542779, -0.0037266670260578394, -0.011770596727728844, -0.07880689948797226, 0.022469133138656616, -0.0036980973090976477, -0.00942616444081068, 0.010828974656760693, 0.04633857682347298, -0.002631207462400198, -0.05672101676464081, 0.028850652277469635, -0.032059669494628906, -0.009701760485768318, 0.010552076622843742, 0.015588173642754555, -0.0016569525469094515, 0.005723413545638323, -0.0016940685454756021, -0.003320735413581133, 0.039300281554460526, -0.03646066412329674, -0.03394263610243797, 0.01553005538880825, -0.009238068014383316, -0.026706445962190628, -0.0037732813507318497, 0.03426652029156685, -0.037151265889406204, -0.045574851334095, 0.05047912150621414, 0.027117930352687836, 0.042016685009002686, -0.017543403431773186, -0.01844477280974388, 0.02722606435418129, 0.018773948773741722, 0.04099623113870621, -0.05597427487373352, -0.045374952256679535, -0.01998823881149292, -0.05416484549641609, 0.07215048372745514, 0.030381960794329643, -0.04943016543984413, 0.008604631759226322, -0.014386937953531742, -0.002483767457306385, 0.005982648581266403, -0.013075602240860462, -0.015508539043366909, -0.002771154511719942, -0.005424913018941879, -0.06589341908693314, 0.008559449575841427, 0.021989164873957634, 0.04572480916976929, -0.07749562710523605, 0.0010223870631307364, -0.06024695932865143, -0.010444036684930325, 0.01280300971120596, 0.0057717435993254185, -0.008608919568359852, -0.00254848413169384, -0.008695309050381184, -0.0034875976853072643, -0.08124689757823944, 0.09616245329380035, 0.020196640864014626, -0.03972261771559715, 0.020651638507843018, 0.022512361407279968, 0.08062107861042023, 0.027098361402750015, -0.025558624416589737, 0.07365986704826355, 0.004673106130212545, 0.030968349426984787, 0.019286388531327248, 0.04658893123269081, 0.0008241780451498926, -0.05724368244409561, -0.014515488408505917, 0.04261816665530205, 0.027712669223546982, 0.0034810942597687244, -0.01095065288245678, -0.0054428656585514545, 0.011542022228240967, -0.004762760363519192, 0.05082210898399353, 0.02431360073387623, -0.01521201990544796, -0.03691687062382698, 0.008046543225646019, 0.012201297096908092, 0.05148376151919365, 0.01930728368461132, 0.01874365471303463, -0.031986117362976074, -0.01981181837618351, 0.026703711599111557, -0.0049421475268900394, 0.03854069858789444, 0.059609584510326385, -0.020108044147491455, -0.006774702575057745, 0.06957460194826126, 0.0030461393762379885, -0.0006088647642172873, -0.02955915592610836, 0.0309506356716156, 0.03708459809422493, 0.03635190427303314, 0.017884543165564537, 0.025792192667722702, 0.028459368273615837, -0.023722337558865547, -0.007988927885890007, 0.027472270652651787, -0.029289135709404945, 0.008377156220376492, -0.04359953850507736, -0.04141046106815338, 0.05641245096921921, -0.04622037708759308, 0.021515505388379097, 0.00982521940022707, 0.08852832019329071, 0.005314837675541639, 0.032173771411180496, 0.04472087696194649, -0.08931330591440201, 0.04934094101190567, -0.024117780849337578, 0.004274233244359493, 0.0019153642933815718, -0.005446954630315304, 0.07519058138132095, 0.01187078095972538, 0.018252208828926086, 0.026720523834228516, -0.06466075778007507, -0.07783199846744537, -0.020205777138471603, 0.027169479057192802, 0.06297805160284042, -0.04616139829158783, -0.01464798953384161, 0.046936292201280594, 0.0455642007291317, 0.005205804482102394, 0.015033407136797905, 0.009549255482852459, -0.006952325813472271, -0.08565977215766907, -0.06725781410932541, 0.026312120258808136, 0.025232883170247078, -0.031873829662799835, -0.033890753984451294, 0.011064523831009865, -0.04189292713999748, 0.0026517920196056366, 0.03753933310508728, -0.017381109297275543, 0.05504218116402626, 0.006810183171182871, 0.006094411481171846, -0.02042265422642231, 0.04925956204533577, -0.059572916477918625, 0.033826589584350586, 0.006105695851147175, 0.006731707602739334, -0.0153189143165946, -0.004773490596562624, 0.12291982024908066, 0.06365824490785599, -0.004852945916354656, -0.04246043786406517, 0.060096342116594315, 0.011513398960232735, -0.08054633438587189, 0.032295890152454376, -0.01513735018670559, -0.006922232918441296, -0.005384223535656929, -0.05563239008188248, -0.02645760029554367, 0.0009631073335185647, -0.027574071660637856, 0.03290257975459099, 0.0847376361489296, -0.03366819769144058, 0.040323104709386826, 0.028743602335453033, -0.03284613415598869, 0.010244760662317276, -0.02951435185968876, -0.05997252091765404, 0.008311042562127113, -0.014250234700739384, -0.01415894366800785, 0.041335590183734894, -0.05470547080039978, -0.05914480611681938, -0.033253010362386703, -0.049241047352552414, 0.017719412222504616, 0.02920561470091343, 0.05674116685986519, -0.028537500649690628, -0.014598465524613857, -0.027705874294042587, -0.004598289728164673, -0.010196294635534286, -0.039970241487026215, 0.011401182040572166, 0.005584972910583019, 0.023441798985004425, 0.014906411059200764, 0.029397230595350266, -0.022987693548202515, 0.022680465131998062, 0.006815535016357899, 0.019154543057084084, 0.018340669572353363, 0.028961680829524994, 0.010521629825234413, -0.004986838437616825, -0.018809599801898003, -0.029048077762126923, 0.05436450615525246, -0.0565236397087574, -0.011661906726658344, -0.011480990797281265, -0.043431028723716736, 0.02687801793217659, -0.07733724266290665, -0.04941001534461975, -0.030406344681978226, 0.030617505311965942, 0.008546179160475731, -0.004775565583258867, -0.03631121292710304, 0.04248451441526413, 0.012862884439527988, -0.005800445564091206, 0.03616783395409584, -0.016436995938420296, 0.03356147184967995, -0.013534067198634148, 0.034013520926237106, 0.043429989367723465, 0.021672742441296577, 0.005501814652234316, -0.035384390503168106, 0.0012414467055350542, -0.03158984333276749, -0.2459525763988495, 0.03623197227716446, -0.0024926261976361275, -0.024062395095825195, 0.018302161246538162, -0.014993611723184586, 0.01645752601325512, -0.04731333255767822, 0.00314628635533154, 0.0009249859722331166, -0.006057840306311846, -0.023343853652477264, -0.009640690870583057, 0.03924938291311264, 0.0035351982805877924, -0.020219486206769943, -0.010023954324424267, -0.040873248130083084, 0.015360069461166859, 0.00883864052593708, -0.002187540987506509, -0.04700957611203194, -0.005551832728087902, 0.05842442810535431, 0.03407031297683716, 0.0330754779279232, -0.08559241890907288, 0.055471811443567276, -0.026688210666179657, -0.017528174445033073, 0.013240501284599304, -0.02154550515115261, 0.002007257891818881, -0.007819733582437038, 0.007176699582487345, 0.005708858836442232, 0.03818855434656143, 0.007989520207047462, 0.03660430386662483, 0.01537583488970995, -0.00905582495033741, -0.07244520634412766, -0.003315890673547983, -0.009174568578600883, 0.09914034605026245, 0.01578271947801113, -0.10914632678031921, 0.017919309437274933, -0.04542296379804611, 0.05751064047217369, -0.03894849121570587, -0.03638693317770958, -0.02439829893410206, 0.020085198804736137, -0.007065316662192345, 0.02056785114109516, 0.00009768390737008303, 0.026243560016155243, -0.012930169701576233, -0.026183679699897766, 0.002395015675574541, -0.04401504620909691, -0.0066337501630187035, -0.0451040156185627, -0.02768547646701336, -0.07454126328229904, -0.056665897369384766, -0.0018871193751692772, 0.07013066112995148, 0.011138636618852615, -0.07470015436410904, -0.032754749059677124, -0.0036262101493775845, -0.1030612587928772, 0.012323039583861828, -0.04549176245927811, -0.04251294210553169, -0.029960444197058678, -0.0592770092189312, 0.07424347847700119, -0.008459601551294327, -0.030910396948456764, 0.014319583773612976, -0.0138119300827384, 0.023875335231423378, -0.029230216518044472, 0.007155565079301596, -0.020493583753705025, -0.01447241473942995, 0.010575336404144764, 0.05734806880354881, -0.05188455805182457, -0.02191110886633396, -0.031102687120437622, -0.023929832503199577, 0.037943437695503235, 0.02023298107087612, 0.002543563023209572, 0.00259021227248013, 0.01527245994657278, 0.017362089827656746, -0.04868248477578163, 0.011991125531494617, -0.009655937552452087, 0.0057677156291902065, -0.0013329221401363611, -0.0698910728096962, 0.01807853765785694, 0.0057222298346459866, 0.011997838504612446, 0.017412569373846054, -0.057575780898332596, 0.005889619700610638, -0.0640517994761467, -0.03513121232390404, 0.00961855798959732, 0.024730227887630463, 0.04011605307459831, 0.01349128782749176, -0.0020072851330041885, -0.05371999740600586, 0.011660671792924404, 0.021265290677547455, -0.012187988497316837, -0.010390177369117737, -0.05040569230914116, 0.0036067068576812744, -0.022896749898791313, -0.017146365717053413, 0.010469958186149597, -0.012889854609966278, 0.03789045661687851, 0.061225228011608124, -0.026593724265694618, 0.0257953479886055, -0.021899577230215073, -0.04430394619703293, -0.02833527699112892, 0.020710254088044167, -0.03090696968138218, -0.0012657759943976998, -0.0016772259259596467, 0.004330174066126347, 0.014808442443609238, 0.04025394096970558, 0.010031607002019882, 0.03054122067987919, -0.004533351399004459, 0.0024617610033601522, 0.03298737108707428, 0.026336589828133583, 0.002259026048704982, 0.011279543861746788, -0.002888072980567813, -0.04274578392505646, -0.029479874297976494, 0.008061808533966541, 0.009960434399545193, -0.007844474166631699, -0.026568882167339325, 0.011336863040924072, -0.08876300603151321, -0.014870882034301758, 0.00437175901606679, -0.020054737105965614, 0.04501276835799217, 0.023829450830817223, 0.02086772955954075, -0.018088674172759056, -0.028920995071530342, 0.008376854471862316, -0.014079442247748375, -0.02753286622464657, 0.03090626373887062, 0.001783963991329074, -0.01581535115838051, 0.03749748691916466, 0.01448911800980568, 0.031590018421411514, -0.020312871783971786, -0.008830755017697811, 0.018837284296751022, 0.014324365183711052, 0.014964839443564415, 0.04001099616289139, 0.028990942984819412, -0.04976837337017059, 0.005282625090330839, 0.0005082413554191589, -0.02661927044391632, 0.000547268777154386, -0.013324672356247902, -0.01839090697467327, 0.01586933247745037, -0.01086311973631382, -0.07052086293697357, 0.01831877790391445, 0.008445329032838345, 0.03139829635620117, 0.033674199134111404, -0.009319487027823925, 0.00882729422301054, -0.03804148733615875, 0.05161561816930771, 0.0797051265835762, -0.061554789543151855, 0.026944436132907867, 0.0029777155723422766, 0.019176309928297997, 0.014172902330756187, 0.025079641491174698, -0.07093679904937744, 0.0032171024940907955, 0.0201876237988472, 0.018460318446159363, -0.03113853931427002, -0.043039124459028244, -0.010722586885094643, 0.014407572336494923, -0.011496715247631073, 0.003188544185832143, 0.0020084541756659746, 0.010699009522795677, -0.01866219937801361, -0.023435158655047417, 0.03780622035264969, 0.0011121846036985517, 0.021107271313667297, 0.02116236835718155, -0.007138395681977272, 0.02534862980246544, -0.030543901026248932, 0.03666592016816139, -0.0012813901994377375, 0.01097047422081232, -0.012729338370263577, -0.04909277707338333, 0.00046749829198233783, 0.017398227006196976, 0.07863978296518326, 0.00577377388253808, 0.007533621042966843, -0.026301536709070206, -0.012813299894332886, -0.01839849352836609, 0.016950208693742752, -0.014197158627212048, -0.004146788734942675, 0.0332779698073864, 0.0158048365265131, -0.014900236390531063, -0.007109728176146746, -0.000916142191272229, -0.04294519126415253, 0.05478191748261452, -0.04704217612743378, -0.057410381734371185, 0.01487012766301632, -0.06647111475467682, 0.005798839032649994, 0.02658495306968689, 0.03004518523812294, -0.04705178737640381, 0.05798221752047539, 0.04860151186585426, 0.014115897938609123, 0.024961426854133606, -0.03332468867301941, 0.014522282406687737, -0.032561689615249634, 0.002168094040825963, -0.09619048237800598, -0.014044139534235, 0.026564771309494972, -0.0186882633715868, -0.04096877947449684, -0.01834881119430065, -0.06707791239023209, 0.009182457812130451, -0.06198359280824661, -0.005946252029389143, 0.05511045828461647, -0.008122286759316921, 0.023637397214770317, 0.025981679558753967, -0.03517616167664528, 0.037251491099596024, -0.007526429835706949, -0.04562930017709732, -0.01708083041012287, 0.009793480858206749, 0.045648861676454544, 0.04728412628173828, 0.05723269656300545, -0.00918110366910696, -0.023017600178718567, 0.09210049360990524, 0.008847287856042385, 0.04438309371471405, 0.0562855526804924, -0.03170325979590416, 0.04416419193148613, 0.03399292379617691, 0.011074375361204147, 0.015971990302205086, 0.06502487510442734, -0.03909491002559662, -0.06180061399936676, 0.03329916670918465, 0.012214687652885914, -0.0060265762731432915, -0.062156666070222855, 0.06687003374099731, -0.007617440540343523, -0.032360199838876724, -0.05280891805887222, 0.026715250685811043, -0.03464566543698311, -0.015475577674806118, -0.0275719054043293, 0.03068443574011326, -0.07510019838809967, 0.060884442180395126, -0.02780907228589058, 0.007102147210389376, 0.05989214405417442, 0.006719640921801329, 0.020238153636455536, 0.0058236680924892426, 0.06226256862282753, 0.08206557482481003, 0.012229522690176964, 0.02674582041800022, 0.07700960338115692, -0.02219354175031185, -0.03258100524544716, -0.03572462871670723, 0.0007545611006207764, -0.045021142810583115, -0.011651165783405304, 0.023675207048654556, 0.04528690502047539, -0.009708891622722149, 0.07152774184942245, -0.02552017755806446, -0.017811601981520653, 0.0036544802132993937, -0.0022104140371084213, 0.02572413720190525, 0.03878392279148102, 0.0018753892509266734, 0.044607628136873245, 0.008838632144033909, -0.030682150274515152, 0.029898619279265404, -0.008268713019788265, -0.04109523445367813, 0.00888363178819418, -0.04262765869498253, 0.030066950246691704, 0.039653047919273376, 0.02427329681813717, 0.0593222975730896, -0.0367371141910553, -0.01986483298242092, -0.006362196058034897, 0.010142343118786812, -0.01320317480713129, 0.0069969515316188335, -0.025475824251770973, -0.01424743328243494, -0.03354558348655701, -0.023837439715862274, -0.023409055545926094, -0.017375951632857323, -0.0012764475541189313, 0.021295910701155663, -0.0035003568045794964, 0.00962851196527481, 0.0221871268004179, -0.01972728595137596, -0.06596416234970093, -0.05805891752243042, -0.05384901911020279, -0.0657239630818367, -0.05703123286366463, -0.02933422289788723, -0.013367701321840286, -0.004257517401129007, -0.0525691919028759, -0.030917279422283173, -0.002259266097098589, 0.012328688986599445, -0.020575840026140213, -0.046530451625585556, -0.008018884807825089, 0.017147382721304893, 0.02121192030608654, 0.010503881610929966, 0.017336441203951836, 0.06016240268945694, 0.02670164406299591, -0.01926090568304062, -0.043661218136548996, -0.022289585322141647, 0.037536125630140305, -0.011047706007957458, 0.0027599940076470375, -0.05074458569288254, 0.017315611243247986, 0.02407907322049141, -0.027405021712183952, -0.05965660884976387, 0.014916913583874702, 0.03993204981088638, 0.003246953012421727, 0.05136759951710701, -0.0027447715401649475, 0.001429815194569528, -0.026729149743914604, -0.04235979914665222, -0.014401116408407688, 0.043053388595581055, 0.04093804210424423, -0.006923321634531021, 0.09855452924966812, 0.053059425204992294, -0.018429908901453018, -0.01742996647953987, -0.013532043434679508, -0.013628543354570866, 0.01826927810907364, -0.04344905912876129, -0.001237363088876009, -0.04418845847249031, -0.07540470361709595, -0.0035069375298917294, 0.02855105698108673, -0.015363709069788456, -0.025699831545352936, -0.004716324619948864, 0.02061510644853115, -0.02610081247985363, 0.03153697028756142, -0.047300074249506, -0.0038202146533876657, -0.02679821290075779, -0.03994518145918846, -0.014575909823179245, 0.02292809449136257, 0.011474802158772945, -0.03185984492301941, 0.008124344982206821, -0.04327667877078056, 0.004845774732530117, -0.0321817472577095, 0.04935469478368759, 0.04797755181789398, -0.02425331249833107, -0.02448454685509205 ]
[ -0.04219960793852806, -0.0028234210330992937, -0.035296618938446045, -0.022933807224035263, 0.0691390335559845, -0.08000415563583374, -0.025802290067076683, 0.01726355403661728, -0.035493653267621994, -0.042648766189813614, 0.032336458563804626, -0.08194515854120255, -0.010830845683813095, -0.03223797678947449, 0.07924427837133408, -0.04205317422747612, -0.015428886748850346, -0.023792121559381485, -0.051828715950250626, 0.0352853424847126, 0.012288711033761501, -0.025590363889932632, -0.011681350879371166, -0.04902243986725807, 0.04085809364914894, 0.055433448404073715, 0.03589987754821777, -0.03525000438094139, -0.04245674982666969, -0.18731659650802612, 0.0024806305300444365, -0.024225829169154167, -0.00150808144826442, 0.01696326769888401, -0.044568970799446106, 0.07433044165372849, -0.002815547399222851, 0.005778919439762831, 0.021792763844132423, 0.01217725034803152, 0.037166040390729904, -0.020989451557397842, -0.02984391711652279, 0.031222324818372726, -0.017531095072627068, -0.018619855865836143, -0.02361978217959404, 0.03542373701930046, 0.023784343153238297, -0.00996989943087101, -0.04067124426364899, 0.048627354204654694, -0.025331322103738785, -0.009273270145058632, 0.015791067853569984, 0.00788087211549282, 0.045606885105371475, 0.04860899969935417, 0.05694669112563133, 0.0026415218599140644, -0.014074037782847881, 0.0407324954867363, -0.1682751178741455, 0.09710869938135147, -0.013164455071091652, 0.03407904878258705, -0.014854306355118752, 0.026714002713561058, -0.03313721716403961, 0.02793409861624241, 0.017306726425886154, 0.01032573077827692, 0.0206074770539999, 0.03761286661028862, 0.023677874356508255, -0.04650489613413811, -0.011171773076057434, 0.028540978208184242, 0.008319192565977573, 0.024047058075666428, -0.053323883563280106, 0.007608023472130299, 0.0025227791629731655, 0.010167285799980164, -0.07363094389438629, -0.0046652136370539665, -0.07976051419973373, 0.027149196714162827, 0.03286390006542206, 0.04712524637579918, 0.014474455267190933, -0.01254365500062704, 0.06482036411762238, -0.008943366818130016, -0.051762793213129044, 0.0028029954992234707, -0.058383841067552567, 0.0035645777825266123, -0.06750379502773285, 0.358549565076828, -0.02242080308496952, 0.009343310259282589, -0.024671277031302452, 0.0020042029209434986, -0.021722152829170227, -0.027158359065651894, -0.01299268938601017, 0.008999044075608253, 0.052885785698890686, -0.011557421647012234, 0.0024114407133311033, 0.010328968055546284, 0.018615903332829475, -0.022563796490430832, 0.019446218386292458, -0.04009641706943512, 0.014175877906382084, -0.005954174790531397, -0.028114503249526024, 0.0889936238527298, 0.017805084586143494, 0.03945457190275192, 0.009657909162342548, 0.033729393035173416, 0.0337718240916729, 0.03693153336644173, -0.0076444149017333984, 0.025295574218034744, 0.03104451857507229, 0.04036019742488861, 0.016170237213373184, -0.0448790080845356, -0.05580743029713631, -0.04585038125514984, -0.01980183832347393, 0.009385491721332073, 0.046403009444475174, -0.03879163786768913, 0.021971445530653, -0.04748385399580002, -0.01705215312540531, -0.04807227849960327, 0.07881345599889755, -0.01615787483751774, 0.036973219364881516, 0.08434846252202988, 0.008159353397786617, 0.011679034680128098, -0.03303254395723343, -0.0351242758333683, 0.013304945081472397, -0.013068491593003273, -0.007235683500766754, -0.022070448845624924, -0.009594782255589962, -0.04140995442867279, 0.03049243800342083, 0.005749093368649483, -0.03619745001196861, 0.01768888719379902, -0.026204263791441917, -0.09999845921993256, -0.012551865540444851, -0.04243182763457298, 0.031354185193777084, -0.09963375329971313, -0.018298272043466568, 0.00980277918279171, -0.013645729050040245, -0.034549515694379807, 0.0032432328443974257, 0.0505552813410759, -0.06608974933624268, -0.012208450585603714, 0.012617003172636032, -0.006113037001341581, 0.011172368191182613, 0.03850129246711731, 0.03630971536040306, -0.0020900764502584934, -0.03790748119354248, 0.018855277448892593, 0.020522603765130043, 0.003431645454838872, -0.013952981680631638, -0.079374760389328, -0.01692146807909012, -0.03220267966389656, -0.018246997147798538, -0.04652421176433563, -0.05840877816081047, -0.008950293995440006, -0.02427026815712452, 0.013676497153937817, 0.03008956089615822, -0.016206301748752594, 0.012552118860185146, 0.008218444883823395, -0.015582846477627754, -0.05473652109503746, 0.039119888097047806, 0.060262639075517654, 0.0022909666877239943, 0.0011453947518020868, -0.06467539072036743, 0.021482564508914948, 0.020135995000600815, -0.04580589756369591, 0.0673537403345108, -0.0242457315325737, -0.021156441420316696, 0.02730231173336506, -0.04285750910639763, 0.0269712433218956, -0.024960076436400414, 0.014433087781071663, -0.01307209488004446, 0.023278577253222466, 0.024215834215283394, 0.01967761293053627, 0.024987800046801567, -0.005540839862078428, -0.08155796676874161, -0.3809196352958679, -0.0012383655412122607, -0.016562238335609436, -0.011971796862781048, -0.0026229561772197485, 0.004071277566254139, -0.0010049553820863366, 0.01055249385535717, -0.02864742837846279, -0.00470099737867713, 0.09144139289855957, -0.01692613586783409, 0.00874650850892067, -0.04527273401618004, 0.03268669918179512, 0.010434586554765701, -0.04346054047346115, -0.034580785781145096, -0.01702083833515644, 0.014451870694756508, 0.0020252284593880177, -0.03406312316656113, -0.02472945861518383, -0.05001578852534294, -0.0028776777908205986, 0.05148147791624069, 0.09182500839233398, 0.06059785559773445, 0.036874912679195404, -0.09012819081544876, 0.008825642988085747, 0.0654556155204773, 0.009270171634852886, -0.08890974521636963, 0.014356822706758976, -0.053692057728767395, 0.03771258890628815, 0.0784459337592125, 0.02799464575946331, 0.03305114805698395, -0.01039440743625164, 0.05053305625915527, -0.04226771742105484, -0.08264447003602982, 0.0019585511181503534, -0.0066467407159507275, -0.016044773161411285, 0.011896280571818352, -0.009131568484008312, 0.06878519058227539, -0.018945645540952682, 0.09660862386226654, -0.009154915809631348, 0.02649211324751377, 0.02254333905875683, -0.028371553868055344, -0.03151733800768852, -0.041814934462308884, 0.019315198063850403, 0.0015827871393412352, 0.0505862832069397, 0.0589088499546051, 0.00016094812599476427, -0.03305816277861595, -0.018382947891950607, -0.016177715733647346, -0.01961863785982132, 0.023103732615709305, 0.059782225638628006, 0.022928768768906593, -0.05678120255470276, 0.07244329154491425, -0.013436508364975452, -0.022683488205075264, 0.10430678725242615, 0.07552443444728851, -0.0017372948350384831, -0.012926744297146797, -0.0011560347629711032, 0.004380074329674244, 0.04699151590466499, -0.01745096780359745, 0.08250092715024948, -0.05506693571805954, 0.006038941442966461, 0.05035385116934776, 0.0008722036145627499, 0.03490915149450302, 0.04847774654626846, -0.07269085943698883, -0.03428879380226135, -0.010841085575520992, 0.04352277144789696, -0.003036737674847245, 0.08621712774038315, 0.033067282289266586, -0.2768663763999939, 0.07026990503072739, 0.052737023681402206, 0.04095024988055229, 0.023667387664318085, -0.031697239726781845, -0.0006463515455834568, -0.07289304584264755, -0.013869661837816238, 0.025039194151759148, -0.010579755529761314, 0.03104029968380928, 0.03137096390128136, 0.024980494752526283, 0.05545787140727043, -0.03427845239639282, 0.04664664342999458, 0.014940031804144382, 0.0058243153616786, -0.0276859812438488, 0.028005162253975868, 0.009378991089761257, 0.14741893112659454, 0.06324050575494766, -0.0595761314034462, 0.012087658978998661, 0.03917331248521805, 0.022459032014012337, 0.04906163737177849, 0.045087214559316635, 0.025506436824798584, 0.002595944097265601, 0.06568007171154022, -0.001036404399201274, 0.05636461079120636, -0.03402519226074219, -0.005466424394398928, -0.012508302927017212, -0.012925033457577229, -0.06472259759902954, -0.0341469943523407, 0.059009432792663574, -0.04491940885782242, -0.023979179561138153, 0.04927803575992584, -0.06186753138899803, -0.024650270119309425, -0.06719095259904861, -0.03441021218895912, -0.0697563961148262, 0.020036136731505394, -0.028101613745093346, 0.023341910913586617, 0.027388984337449074, 0.006638782564550638, 0.01226743683218956, -0.0033854765351861715, 0.011040504090487957, -0.0526849664747715, 0.02858228050172329, 0.05261872336268425, -0.02886202000081539, 0.065143883228302, 0.033705923706293106, 0.02308584377169609 ]
[ -0.006167360581457615, 0.014917775988578796, -0.057614222168922424, 0.015090977773070335, 0.005595622584223747, 0.002898889360949397, -0.003718544030562043, 0.021966539323329926, 0.018991712480783463, 0.011515596881508827, -0.007727805525064468, -0.015193948522210121, 0.014937314204871655, -0.04703407734632492, 0.017870187759399414, -0.05838146433234215, 0.05470693111419678, 0.00192716543097049, -0.003950233105570078, -0.020380143076181412, -0.01568884402513504, -0.0007382242474704981, 0.04435146600008011, 0.0055547598749399185, -0.02609913796186447, 0.005373432766646147, -0.008362867869436741, 0.011831841431558132, 0.012149691581726074, -0.10542688518762589, -0.003393415827304125, -0.030440742149949074, -0.010928764939308167, -0.013442748226225376, 0.04981018975377083, 0.003571657929569483, -0.016887269914150238, -0.007748662959784269, -0.03512053191661835, 0.0015373768983408809, 0.028611352667212486, -0.03951871022582054, -0.03422017768025398, 0.013449047692120075, -0.0032413615845143795, -0.03675231337547302, -0.07582026720046997, -0.02421046793460846, -0.011545979417860508, 0.01321562472730875, -0.029525909572839737, 0.018939170986413956, 0.016748016700148582, -0.007086471188813448, 0.030203087255358696, -0.0073039336130023, -0.05062667652964592, 0.033071357756853104, 0.046851079910993576, 0.051354289054870605, -0.007969217374920845, 0.027571754530072212, -0.03510518744587898, -0.022429365664720535, 0.0015065743355080485, -0.025096340104937553, -0.026084091514348984, 0.014212441630661488, -0.026371316984295845, 0.03264937549829483, -0.005380242131650448, -0.014787052758038044, -0.01952182501554489, -0.012429263442754745, -0.01896444708108902, -0.0431550033390522, -0.0022466927766799927, -0.019566074013710022, -0.0019130667205899954, 0.02552677132189274, -0.027054592967033386, 0.0007932671578601003, -0.01348684262484312, -0.0034729260951280594, -0.040415309369564056, 0.007342381868511438, -0.02326801046729088, 0.009904168546199799, 0.011250622570514679, 0.022137241438031197, 0.02259712852537632, 0.023913657292723656, 0.001235359930433333, 0.0028667785227298737, -0.07084067910909653, -0.010970501229166985, -0.03874897211790085, -0.017955733463168144, -0.0276104137301445, 0.8358287215232849, -0.02254060097038746, 0.026601463556289673, 0.04445049911737442, 0.014417686499655247, 0.012597018852829933, -0.01884981244802475, -0.04389866814017296, -0.029528211802244186, 0.0008086134330369532, 0.003491706680506468, 0.019960403442382812, -0.002027788432314992, 0.009060785174369812, -0.006859645713120699, 0.05659668892621994, 0.025669340044260025, 0.01707991026341915, -0.010207326151430607, 0.003384498879313469, 0.0510990135371685, 0.05505887046456337, -0.05120057985186577, 0.006679063197225332, 0.0325387641787529, 0.017928097397089005, -0.16190652549266815, 0.008357458747923374, -6.346985503664968e-33, 0.0426434651017189, -0.043755508959293365, 0.02377909980714321, 0.021729370579123497, 0.028805430978536606, -0.017556151375174522, -0.021997306495904922, -0.01908966153860092, -0.041776616126298904, -0.00607070978730917, 0.023905575275421143, -0.002589500742033124, -0.037709809839725494, -0.0287623330950737, 0.02137157693505287, 0.01572505757212639, -0.006802248768508434, 0.04153735190629959, -0.022784005850553513, 0.021809734404087067, 0.05607246980071068, 0.022723987698554993, 0.04290235415101051, 0.013156156986951828, 0.009638059884309769, 0.015171545557677746, 0.019556723535060883, -0.027897097170352936, 0.0038697575218975544, -0.029280319809913635, 0.0002747611724771559, 0.019122134894132614, -0.0027129531372338533, -0.013197774067521095, -0.042319364845752716, -0.07132788747549057, -0.029128124937415123, -0.002894845325499773, -0.045143309980630875, -0.019122548401355743, -0.024898553267121315, -0.02611495740711689, -0.011228082701563835, -0.010182454250752926, -0.0209021158516407, -0.007297937758266926, 0.023717142641544342, 0.01989395171403885, 0.007982376031577587, 0.020185057073831558, 0.03129889443516731, -0.0019919234327971935, 0.021301595494151115, 0.03790782019495964, 0.01937246322631836, 0.028623541817069054, 0.011076239868998528, -0.0047158654779195786, 0.00667883874848485, -0.01665218360722065, -0.010395090095698833, -0.017135392874479294, 0.00496438704431057, -0.015017875470221043, 0.03281484544277191, -0.008416782133281231, -0.023826835677027702, 0.013703212141990662, -0.012997347861528397, 0.04006075859069824, -0.03681885823607445, 0.005901383236050606, -0.020158587023615837, -0.004041603766381741, 0.017053166404366493, -0.030931448563933372, 0.01921810396015644, 0.0638989508152008, -0.013407905586063862, 0.060876183211803436, 0.03916959464550018, -0.006827928591519594, 0.020430788397789, -0.00015920861915219575, -0.054593198001384735, -0.006233241409063339, -0.002521157031878829, -0.007901246659457684, 0.0031487606465816498, -0.004714537877589464, 0.009371579624712467, 0.043239567428827286, 0.011977290734648705, -0.0032241358421742916, -0.06394566595554352, 5.705896966007401e-33, 0.007217977661639452, -0.002977415919303894, -0.017181942239403725, 0.027644803747534752, 0.01999664306640625, -0.030173251405358315, 0.02584392949938774, -0.014264927245676517, 0.01130736991763115, 0.027912644669413567, -0.04925866797566414, 0.006290201097726822, -0.008599459193646908, 0.021154409274458885, 0.05540025979280472, -0.009525508619844913, 0.024109015241265297, 0.06310219317674637, 0.016777753829956055, -0.026081854477524757, -0.0153970280662179, 0.02226128987967968, 0.016664449125528336, 0.013517314568161964, 0.047181107103824615, 0.004575624130666256, -0.002692627254873514, 0.030107436701655388, -0.05814547464251518, -0.035531215369701385, 0.03819745033979416, 0.013905426487326622, 0.006583990529179573, -0.028922438621520996, -0.037410855293273926, 0.0006409424240700901, -0.014169394038617611, 0.019351618364453316, -0.0039687370881438255, -0.01110874954611063, 0.04279938340187073, -0.003553600749000907, -0.0006917327409610152, 0.011176460422575474, -0.008184435777366161, -0.035525087267160416, 0.016385257244110107, -0.006230580620467663, 0.034218158572912216, -0.03704461082816124, -0.00947880744934082, -0.005723496433347464, 0.02810305543243885, 0.021462127566337585, 0.006076248362660408, 0.003897519316524267, -0.01290867943316698, 0.035988688468933105, 0.013728370890021324, -0.01093470212072134, -0.012685916386544704, -0.021927550435066223, 0.029332764446735382, -0.002072750823572278, -0.012219402007758617, -0.027332991361618042, -0.001968586118891835, -0.01390884444117546, -0.00004159039235673845, -0.011869621463119984, 0.020760346204042435, -0.024931257590651512, -0.00830314215272665, 0.06184876337647438, 0.0356731191277504, -0.007111391052603722, -0.012032360769808292, 0.00012865242024417967, -0.022242076694965363, 0.022730540484189987, -0.004720184952020645, 0.008591816760599613, -0.030380822718143463, 0.0023518986999988556, 0.042905379086732864, 0.005723044741898775, -0.013979984447360039, -0.01210555899888277, 0.04353025183081627, -0.004720257129520178, -0.04664549231529236, -0.00405114097520709, 0.02244383655488491, 0.011170306243002415, 0.0035339423920959234, -1.2197900467469935e-8, 0.014145907014608383, -0.008238698355853558, -0.028424538671970367, 0.0362970270216465, 0.040332552045583725, 0.005924975965172052, -0.02707836776971817, -0.04055595397949219, -0.01866658590734005, 0.013113337568938732, -0.027006255462765694, 0.015149091370403767, 0.030827229842543602, 0.02719774842262268, 0.010625227354466915, -0.017873689532279968, -0.009008665569126606, -0.0036684854421764612, 0.016451489180326462, -0.0040813712403178215, 0.04773743078112602, -0.0024673687294125557, 0.027239840477705002, -0.02352258376777172, -0.03549165651202202, 0.00038821069756522775, 0.02511698566377163, -0.051594581454992294, -0.003763046348467469, -0.0018946153577417135, -0.027284370735287666, -0.028796685859560966, -0.021516116335988045, 0.018495388329029083, -0.026654072105884552, 0.015012269839644432, -0.01475379429757595, 0.026329215615987778, -0.0019148171413689852, -0.0015073680551722646, -0.04286631941795349, -0.02264411374926567, -0.00959533080458641, -0.038689836859703064, -0.09116397053003311, 0.007778394967317581, -0.021618595346808434, 0.050567734986543655, -0.0034893967676907778, -0.0004277565167285502, 0.0040391297079622746, -0.015637218952178955, -0.005839704070240259, -0.006727141328155994, 0.04234753176569939, -0.006694065406918526, 0.03847113251686096, -0.025778111070394516, 0.04679516330361366, -0.010041112080216408, 0.030637243762612343, -0.009220808744430542, -0.03900808095932007, -0.03451197221875191 ]
kcat-sasl-java-jaas-not-supported
https://markhneedham.com/blog/2023/09/12/kcat-sasl-java-jaas-not-supported
false
2023-09-14 00:44:37
FAISS: Exploring Approximate Nearest Neighbours Cell Probe Methods
[ "python", "faiss", "til" ]
[ "TIL" ]
:icons: font I've been learning about vector search in recent weeks and I came across FaceBook's https://faiss.ai/[FAISS library^]. I wanted to learn the simplest way to do approximate nearest neighbours, and that's what we'll be exploring in this blog post. [NOTE] ==== I've created a video showing how to do this on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], so if you prefer to consume content through that medium, I've embedded it below: ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/iY7HuG1r5YM?si=rdN5fF22veQVpvk_" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ You can also find all the code at the https://github.com/mneedham/LearnDataWithMark/blob/main/faiss-ann/notebooks/ANN-Tutorial.ipynb[ANN-Tutorial.ipynb notebook^]. ==== First things first, let's install some libraries: [source, bash] ---- pip install faiss-cpu pandas numpy ---- We'll be using the following imports: [source, python] ---- import faiss import copy import numpy as np import pandas as pd import plotly.graph_objects as go from plotly_functions import generate_distinct_colors, zoom_in, create_plot, plot_points ---- https://github.com/mneedham/LearnDataWithMark/blob/main/faiss-ann/notebooks/plotly_functions.py[`plotly_functions`^] contains a bunch of helper functions for making it easier to create charts with plot.ly. == Create vectors We're going to create 10,000 2D vectors to keep things simple. [source, python] ---- dimensions = 2 number_of_vectors = 10_000 vectors = np.random.random((number_of_vectors, dimensions)).astype(np.float32) ---- Next, let's create a search vector, whose neighbours we're going to find: [source, python] ---- search_vector = np.array([[0.5, 0.5]]) ---- == Creating a cell probe index The simplest version of approximate nearest neighbours in FAISS is to use one of the cell probe methods. These methods partition the vector space into a configurable number of cells using the K-means algorithm. When we look for our search vector's neighbours, it's going to find the centroid closest to the search vector and then search for all the other vectors that belong to the same cell as that centroid. We can create a cell probe index like this: [source, python] ---- cells = 10 quantizer = faiss.IndexFlatL2(dimensions) index = faiss.IndexIVFFlat(quantizer, dimensions, cells) ---- To create the centroids, we need to call the `train` function: [source, python] ---- index.train(vectors) ---- We can then find the centroids by querying the quantizer:: [source, python] ---- centroids = index.quantizer.reconstruct_n(0, index.nlist) centroids ---- .Output [source, text] ---- array([[0.8503718 , 0.46587527], [0.14201212, 0.80757564], [0.831061 , 0.82165515], [0.5756452 , 0.54481953], [0.5543639 , 0.1812697 ], [0.84584594, 0.16083847], [0.259557 , 0.5097532 ], [0.23731372, 0.12491277], [0.47171366, 0.8513159 ], [0.08305518, 0.30214617]], dtype=float32) ---- == Visualising cells and centroids Next, let's look at how we can visualise how the vector space has been split. We can work out which cell each vector has been assigned to by calling the `search` function on the quantizer: [source, python] ---- _, cell_ids = index.quantizer.search(vectors, k=1) cell_ids = cell_ids.flatten() cell_ids[:10] ---- .Output [source, python] ---- array([0, 4, 3, 1, 1, 8, 9, 4, 0, 9]) ---- So far so good. Now let's create a plot visualising that: [source, python] ---- color_map = generate_distinct_colors(index.nlist) # <.> fig_cells = create_plot() unique_ids = np.unique(cell_ids) for uid in unique_ids: # <.> mask = (cell_ids == uid) masked_vectors = vectors[mask] plot_points(fig_cells, masked_vectors, color_map[uid], "Cell {}".format(uid), size=6) # <.> plot_points(fig_cells, centroids, symbol="diamond-tall", color="black", size=15, showlegend=False) # <.> plot_points(fig_cells, search_vector, symbol="x", color="black", size=15, label="Search Vector") # <.> fig_cells ---- <.> Get a list of unique colours for each cell <.> Iterate over the cells <.> Plot each vector with the colour assigned to its cell id <.> Plot the centroid of each cell <.> Plot the search vector The resulting visualisation is shown below: .Vectors and their cell assignments image::{{<siteurl>}}/uploads/2023/09/ann-plot.png[] When creating the index, we need to specify how many partitions (or cells) we want to divide the vector space into. == Searching for our vector It's time to search for our vector. We'll start by adding the vectors to the index: [source, python] ---- index.add(vectors) ---- And now let's call the `search` function: [source, python] ---- distances, indices = index.search(search_vector, k=10) df_ann = pd.DataFrame({ "id": indices[0], "vector": [vectors[id] for id in indices[0]], "distance": distances[0], }) df_ann ---- .df_ann [format="csv", options="header"] |=== include::content/2023/09/14/df_ann.csv[] |=== We've got a bunch of vectors that are very close to the search vector. When we ran the `search` function, FAISS first looked for the cell in which it needed to search. We can figure out which cell it used by asking the quantizer: [source, python] ---- _, search_vectors_cell_ids = index.quantizer.search(search_vector, k=1) unique_searched_ids = search_vectors_cell_ids[0] unique_searched_ids ---- .Output [source, text] ---- array([3]) ---- So the nearest cell to `0.5, 0.5` is the one with index 3. If we wanted to find the nearest two cells, we could pass in a different `k` value. We can visualise the nearest neighbours that it's found by running the following code: [source, python] ---- fig_search = create_plot() for uid in unique_searched_ids: # <.> mask = (cell_ids == uid) masked_vectors = vectors[mask] plot_points(fig_search, masked_vectors, color_map[uid], label="Cell {}".format(uid)) # <.> plot_points(fig_search, centroids[uid].reshape(1, -1), symbol="diamond-tall", color="black", size=10, label="Centroid for Cell {}".format(uid), showlegend=False) # <.> plot_points(fig_search, points=search_vector, color='black', label="Search Vector", symbol="x", size=10) ann_vectors = np.array(df_ann["vector"].tolist()) plot_points(fig_search, points=ann_vectors, color='black', label="Approx Nearest Neighbors") # <.> fig_search ---- <.> Iterate over the cells used in the search (i.e. only cell with index=3) <.> Plot the vectors in this cell <.> Plot the centroid for the cell <.> Plot the nearest neighbours The resulting visualisation is shown below: .Approximate nearest neighbours image::{{<siteurl>}}/uploads/2023/09/ann-search-plot.png[] == Brute Force vs ANN It looks like ANN has done pretty well, but let's compare it to the brute force approach where we compare the search vector with every other vector to find its neighbours. We can create a brute force index like this: [source, python] ---- brute_force_index = faiss.IndexFlatL2(dimensions) brute_force_index.add(vectors) ---- And then search like this: [source, python] ---- distances, indices = brute_force_index.search(search_vector, k=10) pd.DataFrame({ "id": indices[0], "vector": [vectors[id] for id in indices[0]], "distance": distances[0], "cell": [cell_ids[id] for id in indices[0]] }) ---- .Brute Force [format="csv", options="header"] |=== include::content/2023/09/14/brute_force.csv[] |=== The results are the same as we got with ANN and we can see that all the neighbours belong to cell 3, which was the one used by ANN. We can actually tweak ANN to search across more than 1 cell by setting the `nprobe` attribute. For example, if we wanted to search the two closest cells, we would do this: [source,python] ---- index.nprobe = 2 ---- And then re-run the search code above. The result for this dataset wouldn't change since it's relatively small and has low dimensionality, but with bigger datasets this is a useful thing to play around with.
In this post, we'll learn how to do approximate nearest neighbours with FaceBook's FAISS vector search library.
uploads/2023/09/faiss-banner.png
[ 0.004519923124462366, 0.0037773277144879103, 0.03445184975862503, 0.031471528112888336, 0.06738317012786865, 0.05679202824831009, 0.0074223983101546764, 0.02157709002494812, -0.017680633813142776, -0.01857663318514824, 0.00020417106861714274, -0.02833796851336956, -0.04807059466838837, 0.013780842535197735, -0.01592741161584854, 0.07765692472457886, 0.0623287633061409, 0.02713034674525261, 0.012237563729286194, 0.03469950705766678, 0.023622173815965652, 0.052890729159116745, 0.00897712167352438, 0.0438607856631279, 0.01857914961874485, -0.00840542372316122, 0.0391811840236187, 0.009826580993831158, -0.03856309875845909, -0.015637308359146118, 0.03265704587101936, 0.00781833566725254, 0.009335368871688843, -0.030041223391890526, 0.022824054583907127, -0.005095009692013264, -0.0031779168639332056, 0.023115726187825203, -0.000467037403723225, 0.03529857099056244, -0.07935537397861481, 0.014586708508431911, -0.028821371495723724, 0.0066564069129526615, -0.02642981708049774, -0.009463906288146973, -0.06626089662313461, 0.010627991519868374, 0.008320124819874763, 0.001642390969209373, -0.06634606420993805, 0.048175424337387085, 0.01354924589395523, -0.03519792854785919, -0.027693357318639755, 0.053615376353263855, 0.011362443678081036, -0.08217274397611618, 0.013765370473265648, -0.03464950993657112, 0.021860191598534584, 0.028927426785230637, 0.019310226663947105, 0.043542757630348206, -0.004346231464296579, -0.0038743880577385426, -0.010225118137896061, 0.06143132224678993, -0.05916283279657364, -0.03958205506205559, -0.021016109734773636, 0.004615992307662964, -0.04353931173682213, 0.005892215296626091, -0.006377524230629206, -0.04358300566673279, -0.007524110842496157, 0.05231962725520134, 0.038198936730623245, 0.0113819669932127, -0.006005573086440563, 0.0016442841151729226, 0.01449116226285696, 0.02328428439795971, -0.017596164718270302, -0.03210185840725899, -0.05257302522659302, -0.03277064114809036, -0.08094099164009094, 0.043488066643476486, 0.0038384085055440664, -0.06359879672527313, 0.012777759693562984, 0.02246938645839691, -0.0019341947045177221, -0.0005545429303310812, 0.007604422513395548, -0.01058419793844223, 0.01947595924139023, 0.005435200873762369, -0.04400135576725006, -0.04553988203406334, 0.027045702561736107, 0.04955677315592766, -0.08323533833026886, -0.021942785009741783, -0.016926035284996033, -0.008016027510166168, 0.0008026013965718448, -0.008186768740415573, -0.027955040335655212, -0.00753089040517807, -0.013494618237018585, 0.012865912169218063, -0.06287126988172531, 0.06531652063131332, 0.018817251548171043, -0.020720941945910454, -0.011951914988458157, 0.034007616341114044, 0.05207503214478493, 0.00857407134026289, -0.020390236750245094, 0.07266474515199661, 0.0009393473155796528, 0.051256272941827774, -0.001200238591991365, 0.06386539340019226, -0.013166260905563831, -0.04531834274530411, -0.008913600817322731, 0.05853085219860077, -0.02452627569437027, -0.0017863963730633259, 0.02107079327106476, -0.02118990197777748, -0.007256184238940477, 0.0031490877736359835, 0.0519377738237381, 0.042696189135313034, 0.02904939278960228, -0.03984450921416283, 0.01412974763661623, 0.007607209961861372, 0.05522182956337929, 0.0019908947870135307, -0.008053340949118137, -0.038548246026039124, -0.035439975559711456, -0.0016225336585193872, 0.002908405615016818, -0.017801040783524513, 0.061388492584228516, -0.020569751039147377, -0.01772882416844368, 0.07910051941871643, 0.0677540972828865, 0.003686912590637803, 0.007914682850241661, 0.021004481241106987, 0.033002689480781555, 0.049112457782030106, -0.0034654485061764717, 0.04889127239584923, 0.010283553041517735, -0.039020560681819916, 0.011299794539809227, 0.06850514560937881, -0.04391461983323097, -0.015821030363440514, -0.027187444269657135, -0.04274724796414375, 0.06595208495855331, -0.020795471966266632, -0.025852540507912636, 0.04566046595573425, 0.07552066445350647, 0.02643807791173458, 0.03650061786174774, -0.003538861870765686, -0.0746292769908905, 0.04170956462621689, 0.018883811309933662, 0.02970966510474682, 0.0287538543343544, -0.017592784017324448, 0.09080007672309875, 0.01421605795621872, 0.037168245762586594, 0.052037835121154785, -0.028319142758846283, -0.058012060821056366, -0.02982185035943985, -0.008949161507189274, 0.07294096052646637, -0.03221508860588074, 0.0218392051756382, 0.042211033403873444, 0.002003437140956521, 0.03292623534798622, -0.0037565201055258512, -0.005909895058721304, 0.01368512213230133, -0.02087205834686756, -0.06245362386107445, 0.019234556704759598, 0.02793855033814907, -0.03043275512754917, -0.017314819619059563, 0.013298461213707924, -0.017765382304787636, -0.011466935276985168, 0.044340964406728745, -0.010990902781486511, 0.03416348621249199, 0.0008329292177222669, 0.02362627163529396, 0.006073945667594671, 0.018950290977954865, -0.07343260198831558, 0.019854910671710968, -0.006903698667883873, -0.023971708491444588, -0.03785804286599159, -0.008900686167180538, 0.12864360213279724, 0.0976053848862648, -0.0508321151137352, -0.06280501186847687, 0.0026478238869458437, -0.007164481095969677, -0.021691855043172836, 0.04950273409485817, -0.028547631576657295, -0.05563576892018318, 0.010262605734169483, 0.0004972666501998901, -0.02731279470026493, 0.023553859442472458, -0.051999300718307495, -0.02417433261871338, 0.0662725567817688, -0.005905912723392248, 0.03730388358235359, -0.010275553911924362, -0.006280209869146347, 0.006472349166870117, -0.03194603696465492, -0.05642157793045044, 0.011049565859138966, 0.022150732576847076, -0.012251835316419601, 0.014271280728280544, -0.023792652413249016, -0.006248442456126213, -0.028754062950611115, -0.04412107914686203, 0.010176892392337322, 0.07660072296857834, 0.06703583896160126, 0.004457369446754456, 0.0024385342840105295, -0.020775938406586647, 0.002759266411885619, -0.0045569464564323425, -0.05774078518152237, -0.024536902084946632, -0.05847010016441345, 0.032060734927654266, 0.036654870957136154, 0.011261268518865108, 0.018226642161607742, 0.027840133756399155, -0.007377669680863619, 0.0294515248388052, -0.008917024359107018, 0.034745484590530396, -0.009863416664302349, -0.02271810732781887, -0.04377954080700874, 0.013538343831896782, 0.0813782811164856, -0.02454814314842224, -0.03835994750261307, 0.007848058827221394, -0.06053943559527397, 0.02190246246755123, -0.0335230715572834, -0.017510144039988518, -0.02217882126569748, 0.014125262387096882, 0.043383073061704636, 0.005970105994492769, -0.001433182624168694, 0.012455703690648079, 0.02065909653902054, -0.0024457001127302647, 0.00027046064496971667, -0.02149028889834881, 0.0243197213858366, -0.012749185785651207, 0.027728984132409096, 0.0444546602666378, -0.015985896810889244, -0.0049888817593455315, -0.036096084862947464, 0.008535250090062618, -0.030776744708418846, -0.2721830904483795, 0.012744283303618431, 0.013940802775323391, -0.011374163441359997, 0.007148503325879574, -0.04152074456214905, -0.013137316331267357, -0.04023537039756775, -0.011493811383843422, -0.009296412579715252, 0.0012550157262012362, -0.03366959095001221, -0.04395824298262596, 0.021925993263721466, 0.02093096822500229, -0.009172972291707993, 0.000620619801338762, -0.03740747645497322, 0.009855227544903755, 0.045689988881349564, -0.009844749234616756, -0.0636298879981041, -0.00672262255102396, 0.05883980169892311, 0.02641819603741169, 0.04652069881558418, -0.08026225119829178, 0.013629519380629063, -0.06400059163570404, -0.030355848371982574, 0.008508040569722652, -0.02142968587577343, 0.002473388100042939, -0.0004549063160084188, -0.005637850612401962, -0.034462373703718185, 0.047094788402318954, -0.012152251787483692, 0.012194102630019188, 0.018150102347135544, -0.017117803916335106, -0.035938333719968796, -0.0009992223931476474, 0.009480385109782219, 0.0875045657157898, -0.0220562182366848, -0.07426416873931885, 0.00925557129085064, -0.05067402869462967, 0.047954872250556946, -0.04661642760038376, -0.02638758346438408, -0.02319534868001938, 0.011380774900317192, -0.026772797107696533, -0.010930325835943222, -0.00826350785791874, -0.0020415307953953743, -0.05221064016222954, -0.06472495943307877, -0.0030534088145941496, -0.014747532084584236, -0.037405826151371, -0.042464256286621094, -0.008108163252472878, -0.07768455147743225, -0.0482969731092453, -0.012826223857700825, 0.055136021226644516, 0.03069493919610977, -0.05596105381846428, -0.004091734066605568, -0.008075029589235783, -0.10748918354511261, -0.00985937099903822, -0.003119063563644886, -0.004900735802948475, 0.00037148091359995306, 0.004842828027904034, 0.05987290292978287, -0.05432548001408577, -0.07367762178182602, 0.051337044686079025, 0.024947982281446457, 0.008930960670113564, -0.007313868496567011, -0.004122595768421888, -0.009343959391117096, -0.0057000089436769485, 0.00752955861389637, 0.07589539140462875, -0.03632770851254463, 0.021698610857129097, 0.000022205804270925, -0.01945238560438156, 0.04312687739729881, 0.04896557703614235, -0.000542112800758332, 0.023743845522403717, 0.02093796245753765, 0.012864126823842525, -0.04081286862492561, -0.02541791833937168, -0.03717520087957382, -0.0010262110736221075, 0.01963888108730316, -0.04685687646269798, 0.011610380373895168, 0.02673005498945713, -0.012343768030405045, -0.02000471018254757, -0.049748796969652176, 0.013928351923823357, -0.051792681217193604, -0.043438900262117386, -0.04207966849207878, 0.014300242997705936, 0.04516464099287987, 0.025188976898789406, 0.00255143316462636, -0.06632767617702484, 0.007779482752084732, -0.004004898946732283, -0.00028248620219528675, -0.05235746502876282, -0.026664812117815018, 0.0021587740629911423, -0.008421763777732849, 0.012295474298298359, 0.02503606490790844, 0.013913938775658607, 0.03412076085805893, 0.021881846711039543, -0.03337555006146431, 0.0395202711224556, -0.031062079593539238, -0.03679263964295387, -0.022923646494746208, 0.008325481787323952, -0.011474032886326313, 0.007342107594013214, 0.015910977497696877, -0.002535570180043578, 0.02379082515835762, 0.051665373146533966, 0.02079756371676922, 0.029626138508319855, 0.013089592568576336, 0.013947437517344952, 0.014162068255245686, 0.005296585615724325, -0.004280740395188332, 0.015215660445392132, -0.0308468509465456, -0.04095950350165367, -0.01696016825735569, 0.024587739259004593, -0.026109419763088226, -0.009394180029630661, -0.04528297856450081, 0.03598218783736229, -0.03891150653362274, -0.0081043541431427, -0.012979700230062008, -0.007650714833289385, 0.045817699283361435, 0.00524592911824584, 0.036371033638715744, 0.014495092444121838, -0.005354075226932764, 0.039597008377313614, -0.007753248326480389, -0.03837020322680473, 0.0058529130183160305, -0.027284549549221992, -0.014034736901521683, 0.006192964036017656, 0.018889714032411575, 0.004758234601467848, 0.020420189946889877, -0.019782721996307373, -0.01430866215378046, 0.019207807257771492, 0.0008206846541725099, 0.03314739465713501, 0.03715474531054497, -0.029027944430708885, -0.018350131809711456, -0.007930039428174496, -0.025353778153657913, -0.03427915647625923, -0.017879312857985497, -0.0006948070367798209, 0.0005085297743789852, -0.029909586533904076, -0.07784488052129745, 0.001337109599262476, -0.018115941435098648, 0.02534707449376583, 0.008099867962300777, -0.05732894688844681, 0.03283800557255745, -0.026725366711616516, 0.05655302479863167, 0.05442580208182335, -0.06978558003902435, 0.015469665639102459, 0.02191760763525963, 0.0220473762601614, -0.029503721743822098, 0.0020583653822541237, -0.07693830877542496, -0.02869372069835663, 0.0131903775036335, 0.042957015335559845, 0.010061773471534252, -0.024226566776633263, -0.0469784289598465, 0.03345898166298866, -0.0076562450267374516, 0.00603984110057354, -0.019920747727155685, -0.014711248688399792, -0.03466213494539261, 0.0032807800453156233, 0.00470808707177639, -0.00866014789789915, -0.01779823750257492, 0.04136084392666817, -0.028494752943515778, 0.034434445202350616, -0.010012205690145493, 0.03806982561945915, 0.04864818602800369, -0.009569000452756882, 0.006885537412017584, -0.0536089651286602, -0.008058637380599976, 0.022960837930440903, 0.0339374914765358, -0.009518290869891644, 0.019551526755094528, -0.05307825654745102, 0.0027161368634551764, 0.007205358240753412, -0.00797512847930193, -0.005294548813253641, -0.030203208327293396, 0.02651127055287361, 0.03144589439034462, -0.027995601296424866, -0.02429833635687828, -0.0038472728338092566, -0.04745032638311386, 0.04222283512353897, -0.03087281621992588, -0.0574801042675972, -0.0006507233483716846, -0.03263292834162712, 0.0250723734498024, -0.007366345264017582, 0.03762654960155487, -0.039592985063791275, 0.04086897149682045, 0.01522231288254261, 0.03423869237303734, 0.06510553508996964, 0.005374890752136707, 0.03214329108595848, -0.03409796953201294, 0.006945924833416939, -0.09958323836326599, -0.015867995098233223, 0.03893160820007324, -0.02617030218243599, -0.01379905641078949, 0.01064270082861185, -0.007485256530344486, 0.030653618276119232, -0.06917014718055725, -0.01661113277077675, 0.04833881929516792, 0.01787468045949936, 0.00530526228249073, 0.028305819258093834, -0.03867559880018234, 0.01267766859382391, 0.04517968371510506, -0.03955429047346115, 0.009414643980562687, -0.00931735709309578, 0.06429114192724228, -0.02439781092107296, 0.03971308469772339, 0.00796911958605051, -0.008101755753159523, 0.05903727561235428, 0.03735056146979332, -0.006512772291898727, 0.03626582399010658, -0.026097822934389114, 0.05924520269036293, 0.04214373975992203, -0.018965359777212143, 0.033521708101034164, 0.0333697572350502, 0.02084898017346859, -0.06437790393829346, 0.04360250383615494, 0.011279456317424774, -0.02830248698592186, -0.08086096495389938, 0.053775399923324585, 0.01368396170437336, -0.028758617118000984, -0.019386902451515198, 0.0022513270378112793, -0.05269768834114075, 0.004768383223563433, -0.00894776452332735, -0.029720261693000793, -0.02516002207994461, 0.05419423058629036, -0.03645767271518707, -0.012042905203998089, 0.06106553226709366, -0.019752129912376404, -0.00030836794758215547, -0.014312682673335075, 0.09339200705289841, 0.06378783285617828, 0.05695754289627075, -0.010629643686115742, 0.08932200819253922, -0.025390390306711197, -0.04525638371706009, 0.0035026632249355316, -0.019051475450396538, -0.026764187961816788, -0.02205645479261875, 0.027114158496260643, 0.07539793848991394, -0.0027259765192866325, 0.044004250317811966, -0.03254973515868187, -0.019767912104725838, -0.01797628216445446, 0.02018008753657341, 0.024817755445837975, 0.03316959738731384, 0.001630322658456862, 0.054411500692367554, -0.031016714870929718, -0.02012370526790619, 0.010402917861938477, -0.022750455886125565, -0.007168028503656387, 0.010107521899044514, 0.00982567947357893, 0.03077365830540657, 0.006776302121579647, 0.03009895607829094, 0.0870421975851059, -0.036573655903339386, -0.023125551640987396, -0.004994324874132872, 0.029120339080691338, 0.028666989877820015, 0.021220238879323006, 0.0007543906685896218, 0.01106315292418003, -0.028560524806380272, -0.010216392576694489, -0.0270493533462286, -0.04697767645120621, -0.013972590677440166, 0.021156392991542816, -0.038159217685461044, -0.027986403554677963, 0.0248431283980608, -0.026235200464725494, -0.03196123614907265, -0.04028983786702156, -0.05897131189703941, -0.03978130221366882, -0.07904867827892303, -0.020505869761109352, -0.002355522708967328, -0.014372448436915874, -0.07482116669416428, -0.03706667944788933, -0.0014041358372196555, 0.028179073706269264, 0.002929080743342638, -0.058764711022377014, -0.02478516660630703, 0.009513557888567448, 0.04881904646754265, 0.02315758541226387, 0.01860749162733555, 0.05102827772498131, -0.0004384815983939916, -0.034318625926971436, -0.018887285143136978, 0.002057937905192375, 0.037833862006664276, 0.03328574448823929, 0.030793555080890656, -0.07728906720876694, 0.008642316795885563, -0.018319806084036827, -0.01587936282157898, -0.07504070550203323, 0.004306121729314327, 0.044047120958566666, 0.012077958323061466, 0.05385453999042511, -0.015464285388588905, 0.002612396376207471, -0.04589911550283432, 0.0067431689240038395, -0.006122749298810959, -0.0017435376066714525, 0.04568187892436981, -0.045181069523096085, 0.06476857513189316, 0.005696295294910669, 0.03952043130993843, -0.025360552594065666, -0.014047659933567047, -0.033271532505750656, 0.024972841143608093, -0.059972964227199554, -0.05205368995666504, -0.05100400000810623, -0.08204695582389832, -0.013913935050368309, 0.03125897794961929, -0.03701530396938324, -0.014926820062100887, 0.01902107708156109, 0.03309892863035202, 0.009101971052587032, 0.06205577030777931, -0.028927991166710854, 0.009780963882803917, -0.017519516870379448, 0.005473750177770853, -0.014188593253493309, 0.05441492050886154, 0.021189572289586067, 0.008119076490402222, 0.0276462584733963, -0.05834025889635086, -0.006008963566273451, -0.021288255229592323, 0.015191216953098774, 0.039801280945539474, 0.009353484958410263, 0.04052525758743286 ]
[ -0.07560085505247116, -0.039161138236522675, -0.03936896100640297, 0.0019870721735060215, 0.07313976436853409, -0.04300454258918762, -0.03176030144095421, 0.045969657599925995, 0.009303067810833454, 0.02236570045351982, 0.011635788716375828, -0.10333319753408432, 0.004270070232450962, -0.023106513544917107, 0.06021587550640106, -0.014676213264465332, 0.008409101516008377, -0.03721122443675995, -0.004897758364677429, 0.019172269850969315, -0.024804722517728806, -0.023475544527173042, -0.047095928341150284, -0.057438164949417114, 0.012360610999166965, 0.0477626696228981, 0.06004657223820686, -0.06585421413183212, 0.019709907472133636, -0.19952280819416046, 0.023939790204167366, -0.009965881705284119, 0.0557006299495697, -0.014985878020524979, -0.01966550387442112, 0.05859917402267456, 0.012648677453398705, 0.0240522101521492, 0.012607641518115997, 0.00698836799710989, -0.002407580381259322, 0.002343333326280117, -0.05019429698586464, -0.03826320171356201, 0.04031754285097122, 0.005224285647273064, -0.037413403391838074, -0.015317549929022789, -0.014244857244193554, 0.007284949067980051, -0.02480558305978775, -0.03236221522092819, -0.001757585327140987, -0.016159629449248314, 0.0004535684420261532, 0.0417250320315361, 0.05563824996352196, 0.021738003939390182, 0.0249080341309309, 0.02329615131020546, 0.02214794047176838, -0.030181854963302612, -0.11512837558984756, 0.12107004970312119, -0.0051526231691241264, 0.04127148911356926, -0.01094886939972639, -0.019894322380423546, -0.002238274784758687, 0.07856185734272003, -0.00032015563920140266, 0.012091200798749924, -0.03892911970615387, 0.04261915013194084, 0.010729107074439526, -0.0366300567984581, -0.007131584919989109, -0.008461077697575092, 0.03363412618637085, -0.0436401329934597, -0.04803093895316124, -0.007328527048230171, -0.035024844110012054, 0.005350833758711815, 0.0034299343824386597, 0.032030995935201645, -0.0038772309198975563, 0.026748768985271454, 0.006181858479976654, 0.02073022536933422, 0.028773199766874313, -0.015222568064928055, -0.0005689687677659094, 0.027603521943092346, -0.08672196418046951, -0.06515312194824219, 0.025862637907266617, -0.0139260683208704, -0.012117261067032814, 0.44110599160194397, -0.03840187191963196, 0.029839860275387764, 0.05882873013615608, 0.017996417358517647, 0.0073197525925934315, -0.024393832311034203, -0.015766162425279617, -0.03360934183001518, 0.006844770163297653, -0.011370223015546799, -0.0024372951593250036, -0.023508483543992043, 0.038690973073244095, -0.06565520912408829, 0.02575630694627762, -0.02267230674624443, 0.006872715428471565, 0.03552873805165291, 0.039108820259571075, 0.004505694843828678, -0.014013714157044888, -0.0044087618589401245, 0.040859781205654144, -0.014271561056375504, 0.020014643669128418, 0.008246703073382378, 0.01875116489827633, 0.022222403436899185, 0.05221632495522499, 0.006757695227861404, 0.032341521233320236, -0.01062407810240984, -0.07650399208068848, 0.006834764964878559, 0.0035907041747123003, 0.032417699694633484, 0.045236870646476746, -0.022691912949085236, -0.020124834030866623, 0.001832636073231697, -0.02907285839319229, -0.017800817266106606, 0.07034963369369507, 0.0015436492394655943, -0.01500166580080986, 0.11519055813550949, -0.01129114255309105, -0.0101117929443717, -0.03449149429798126, -0.04522065073251724, 0.0063927252776920795, 0.01424843817949295, 0.0051513551734387875, -0.02841256558895111, 0.008947565220296383, -0.00022363178140949458, 0.08953465521335602, -0.014227036386728287, -0.05727940797805786, -0.016086367890238762, -0.013179434463381767, -0.02512344904243946, -0.038290176540613174, 0.01380237378180027, 0.0398893840610981, -0.14377543330192566, -0.04095277562737465, 0.054244715720415115, -0.02006816491484642, -0.06682191789150238, 0.016200771555304527, 0.007357946131378412, -0.039794571697711945, 0.016064487397670746, 0.0767998993396759, 0.011818049475550652, -0.047103676944971085, 0.005232067778706551, 0.05905817449092865, 0.0030061195138841867, -0.01463404856622219, -0.009774851612746716, -0.008438182063400745, 0.015318783931434155, -0.06734132766723633, -0.05860961973667145, -0.03779521584510803, -0.013900913298130035, -0.02422226034104824, -0.06106817349791527, 0.04877553880214691, -0.05977214127779007, -0.01914946921169758, 0.03757937252521515, -0.043962184339761734, 0.009578794240951538, 0.004786722362041473, -0.02414197474718094, -0.00067803607089445, -0.035988181829452515, 0.0204461719840765, -0.016006477177143097, -0.01312112994492054, 0.03961346670985222, -0.03536531329154968, 0.04633280634880066, 0.08133813738822937, -0.05558089166879654, 0.060878947377204895, 0.009308251552283764, -0.007833616808056831, -0.013553875498473644, -0.00800763163715601, -0.006965828128159046, -0.004612376447767019, -0.002511056140065193, 0.005154057871550322, 0.026915790513157845, 0.0046850573271512985, 0.045710332691669464, 0.005854581482708454, -0.07531998306512833, -0.07412820309400558, -0.33590200543403625, -0.06923890113830566, -0.017901435494422913, -0.004439977928996086, 0.0205930657684803, -0.05145222321152687, 0.008471318520605564, 0.014917759224772453, 0.027845684438943863, 0.02733808010816574, 0.07837700843811035, -0.0030234677251428366, 0.024731263518333435, -0.10260678082704544, -0.0032113760244101286, 0.03392992541193962, -0.011726208962500095, -0.028914613649249077, 0.0014210520312190056, -0.013165389187633991, -0.012558058835566044, 0.010912178084254265, -0.03814033791422844, -0.07243481278419495, 0.010076245293021202, -0.023227494210004807, 0.13313913345336914, 0.035823483020067215, 0.08641688525676727, -0.07054085284471512, 0.010370275005698204, -0.025235025212168694, -0.02038341946899891, -0.032504137605428696, 0.0033325590193271637, -0.024814968928694725, 0.02114580012857914, -0.0004969200817868114, 0.011228304356336594, -0.053318653255701065, -0.047761645168066025, 0.02463509328663349, -0.021286386996507645, -0.033340077847242355, -0.071744404733181, 0.02358945459127426, 0.00987625028938055, -0.015672754496335983, -0.007178531028330326, 0.07730960845947266, 0.017928678542375565, 0.049950290471315384, 0.03572213277220726, 0.016114959493279457, -0.015861155465245247, -0.008981181308627129, -0.07892514765262604, -0.0037966296076774597, 0.004115704912692308, -0.015662100166082382, 0.00963000301271677, -0.016750594601035118, 0.042406294494867325, -0.07730203121900558, 0.015391191467642784, 0.02754678577184677, 0.00724196108058095, -0.03159335255622864, 0.032208215445280075, 0.035284195095300674, -0.029195496812462807, 0.11572682857513428, -0.0090910904109478, 0.008934888988733292, 0.046461667865514755, 0.022261640056967735, 0.02599683217704296, 0.0722009539604187, 0.02919595316052437, 0.010974220000207424, 0.04407864063978195, 0.013676999136805534, 0.02696124091744423, -0.03799482434988022, -0.024774346500635147, 0.006728499196469784, -0.018018586561083794, -0.02257928065955639, 0.03975200653076172, 0.026319565251469612, 0.003971746191382408, 0.0006481645978055894, -0.00939879473298788, -0.03274480998516083, 0.0450434647500515, 0.0014728792011737823, -0.25367453694343567, 0.016595913097262383, 0.07777215540409088, 0.07253780961036682, -0.02687300369143486, -0.018104562535881996, 0.038506947457790375, -0.07854358106851578, 0.006237040739506483, 0.024074435234069824, -0.008125470951199532, 0.04593454301357269, 0.034542813897132874, -0.01521130371838808, 0.0006838705739937723, -0.033858414739370346, 0.03031817637383938, 0.027392985299229622, -0.008958966471254826, 0.007141405250877142, 0.02790517918765545, -0.04006550461053848, 0.16634425520896912, 0.019920146092772484, -0.005997424479573965, -0.0056454455479979515, -0.01805509254336357, -0.03646688535809517, 0.020845187827944756, 0.008294733241200447, 0.03556479886174202, -0.005710191559046507, 0.017069507390260696, 0.006252855062484741, 0.03768832981586456, -0.019409209489822388, -0.06456737965345383, 0.06631547212600708, 0.003457719925791025, -0.03624697029590607, 0.01918838545680046, 0.018872307613492012, -0.0647520124912262, 0.03393114358186722, 0.05847052112221718, -0.006943264044821262, 0.020414944738149643, 0.0001502853410784155, -0.04624857380986214, 0.005094708409160376, 0.004111893009394407, -0.016146009787917137, -0.022479990497231483, -0.016205357387661934, 0.021350454539060593, 0.07034244388341904, -0.002017067279666662, 0.004819817375391722, 0.03828676789999008, -0.0009304709383286536, 0.023331327363848686, -0.04491270333528519, 0.12010239064693451, 0.03327899053692818, 0.034398358315229416 ]
[ 0.02767638862133026, -0.011546067893505096, -0.013755264692008495, -0.03595805913209915, 0.04078945517539978, 0.03292176127433777, 0.015825023874640465, 0.015440219081938267, -0.02098948135972023, 0.0033928423654288054, 0.002206448931246996, 0.06009293720126152, -0.010344060137867928, -0.011195729486644268, 0.004094838630408049, -0.027669822797179222, 0.026557287201285362, -0.05684275925159454, 0.011466137133538723, -0.022941865026950836, -0.033293403685092926, -0.010049254633486271, 0.03139243647456169, 0.019596630707383156, -0.006400907412171364, 0.023275574669241905, -0.01630738563835621, 0.016940012574195862, 0.05720147490501404, -0.13146723806858063, 0.027732744812965393, -0.057868845760822296, 0.00219510099850595, -0.020193831995129585, -0.04513866454362869, 0.0007771054515615106, -0.031631872057914734, -0.021597955375909805, -0.03330625593662262, 0.0002353214076720178, -0.0009406212484464049, -0.0004319042491260916, 0.029167737811803818, 0.009188168682157993, -0.007862540893256664, -0.01669537089765072, -0.03522258996963501, -0.03333988040685654, -0.013278864324092865, -0.02254282869398594, -0.06025489792227745, -0.0030400273390114307, -0.029790759086608887, -0.003248696681112051, -0.027110015973448753, 0.017697157338261604, 0.00550478370860219, -0.00920938141644001, 0.060362253338098526, 0.020229090005159378, -0.015258902683854103, -0.023182090371847153, -0.0032853467855602503, -0.011288342997431755, 0.012314273044466972, -0.03199738264083862, -0.011285237967967987, -0.013881862163543701, -0.00698896637186408, 0.035408541560173035, -0.012945801019668579, 0.0331665575504303, -0.04323510080575943, 0.01756495051085949, -0.01778726652264595, -0.025378333404660225, -0.027190880849957466, -0.020121930167078972, -0.017209187150001526, -0.0051962835714221, -0.01621917635202408, -0.0077539593912661076, 0.0353369414806366, 0.028453292325139046, 0.023799359798431396, -0.006448743864893913, -0.004674667492508888, -0.00015049580542836338, -0.0064143529161810875, -0.023197738453745842, -0.05814538896083832, 0.039100099354982376, -0.022914720699191093, 0.041348230093717575, -0.06884249299764633, -0.004713315982371569, 0.011037823744118214, -0.04372802749276161, -0.030346734449267387, 0.8331485986709595, -0.002221502363681793, -0.01564198173582554, 0.03851531445980072, 0.023608801886439323, 0.013679816387593746, 0.02158607728779316, -0.007529541850090027, -0.00010116009070770815, 0.026365479454398155, -0.018759755417704582, -0.012136420235037804, 0.010101486928761005, -0.011935575865209103, 0.031754858791828156, 0.009367513470351696, 0.008001585491001606, 0.022907482460141182, -0.00907192099839449, 0.013806063681840897, 0.017899172380566597, 0.007289871107786894, -0.004406755790114403, -0.007473824080079794, -0.0032235225662589073, -0.016879722476005554, -0.17841976881027222, -0.004803984425961971, -6.353645413846345e-33, 0.026171807199716568, -0.01246416475623846, -0.012450506910681725, -0.017094630748033524, 0.019628027454018593, 0.0031950422562658787, -0.024864111095666885, -0.006845615338534117, -0.016121506690979004, -0.024001915007829666, 0.041988812386989594, -0.018699010834097862, -0.007535652723163366, 0.010925156064331532, 0.029414895921945572, -0.007059039548039436, 0.0338740311563015, 0.03299048915505409, -0.015874328091740608, -0.00741141103208065, 0.04886932298541069, 0.02962362952530384, 0.021459870040416718, 0.026551999151706696, -0.033131446689367294, 0.015741471201181412, 0.002852624049410224, 0.03982776403427124, 0.0035247274208813906, -0.04463332146406174, -0.032628875225782394, 0.0035418542101979256, 0.0008835428161546588, -0.050545744597911835, 0.038614384829998016, -0.03233106806874275, -0.035484351217746735, 0.0012765012215822935, -0.015101597644388676, -0.010133222676813602, -0.02156795747578144, -0.0007443884969688952, -0.05593883991241455, -0.06141359731554985, -0.03980080038309097, 0.02214938774704933, 0.01137597020715475, 0.030927378684282303, 0.0006683306419290602, 0.001112292055040598, 0.009103723801672459, -0.0009347182931378484, -0.020332682877779007, -0.03138284012675285, 0.009093048982322216, 0.020906634628772736, 0.00681651197373867, 0.004706595558673143, 0.01394533272832632, -0.013477888889610767, 0.03380635753273964, -0.021399594843387604, 0.026490168645977974, 0.00784879270941019, 0.011319252662360668, -0.007888461463153362, 0.05958346277475357, 0.014558364637196064, 0.01713770255446434, -0.016149530187249184, -0.0556219145655632, 0.05368705093860626, -0.01385959330946207, -0.03730747476220131, 0.028354134410619736, -0.03252192214131355, -0.017514748498797417, -0.015020590275526047, -0.003523783292621374, 0.023923849686980247, -0.0008595334365963936, -0.026404399424791336, 0.02221149206161499, -0.03821375221014023, -0.025316841900348663, -0.05663668364286423, 0.04777280613780022, -0.0018517246935516596, -0.03910283371806145, -0.008315489627420902, 0.03566344454884529, 0.036742888391017914, -0.005379414185881615, -0.007492343429476023, -0.025630181655287743, 6.360560994049027e-33, 0.012618106789886951, 0.05285056680440903, -0.023491768166422844, 0.024134473875164986, 0.03370196744799614, -0.011108776554465294, 0.05233650654554367, 0.028659552335739136, -0.0240767952054739, 0.002966121304780245, -0.036885760724544525, -0.052317727357149124, -0.02873024344444275, -0.024243704974651337, 0.03330494463443756, 0.0097635667771101, -0.00550596509128809, 0.0012369088362902403, -0.0009479263098910451, -0.03911614418029785, -0.04654170945286751, -0.003649287624284625, 0.006875552702695131, 0.013292507268488407, 0.027144744992256165, 0.05067852884531021, 0.002846388379111886, 0.010545636527240276, -0.01708475686609745, 0.004176872782409191, -0.013979559764266014, -0.005880927667021751, -0.011040182784199715, -0.015779729932546616, 0.029034823179244995, 0.0601181834936142, 0.02454455941915512, 0.0032508308067917824, -0.024920394644141197, -0.0011965733719989657, 0.02665054053068161, 0.040283288806676865, -0.02597176656126976, -0.0037574132438749075, -0.00005011048779124394, 0.014074851758778095, -0.0022821829188615084, 0.009847243316471577, -0.03622855991125107, -0.0021792904008179903, -0.003047008765861392, 0.031242385506629944, 0.03467991575598717, 0.040571752935647964, 0.005488041788339615, -0.01836036704480648, -0.006588249001652002, 0.07803267985582352, 0.004156884737312794, -0.027931520715355873, -0.017242431640625, -0.03935616463422775, -0.01577516831457615, 0.04135932773351669, -0.015497119165956974, -0.015426701866090298, -0.03056374564766884, 0.0322471484541893, -0.00204537995159626, 0.04322286695241928, 0.027456097304821014, 0.007627778220921755, 0.015563705936074257, 0.03204566612839699, 0.009006528183817863, 0.005530233960598707, 0.027910621836781502, -0.007235045079141855, -0.035428717732429504, 0.02247285656630993, 0.0320856086909771, 0.019444085657596588, 0.03883272409439087, -0.001613059313967824, -0.006744190584868193, 0.030435994267463684, -0.013400628231465816, 0.0015870106872171164, 0.018808986991643906, 0.0020946082659065723, 0.02205285057425499, 0.022277910262346268, 0.008039997890591621, -0.00885223038494587, 0.03761870041489601, -1.2448094111050523e-8, -0.05478517338633537, -0.00594227435067296, -0.023499051108956337, 0.029125288128852844, -0.01752987876534462, 0.02573026902973652, 0.026428669691085815, 0.006259548477828503, -0.0071490160189569, 0.004760663956403732, 0.01602630876004696, -0.026238473132252693, 0.028830165043473244, 0.004977105651050806, -0.01789848506450653, -0.006704200990498066, -0.0062749357894063, -0.010223581455647945, 0.04136066138744354, 0.0294796135276556, -0.005561583209782839, 0.045267459005117416, 0.03766874223947525, -0.0034110185224562883, -0.02700062468647957, -0.018457720056176186, -0.010743636637926102, -0.06615640223026276, -0.025389548391103745, 0.006302784197032452, -0.03913448750972748, -0.02623949944972992, -0.0008153105736710131, -0.04953492432832718, 0.0014308503596112132, -0.023815160617232323, 0.004282734356820583, -0.006121022626757622, -0.0007221795385703444, 0.011838147416710854, -0.016666974872350693, -0.016698604449629784, 0.03867899253964424, -0.04075523838400841, -0.009727060794830322, 0.01421048678457737, 0.003105361480265856, -0.015360123477876186, 0.04035085812211037, -0.021429892629384995, -0.009584718383848667, 0.009503685869276524, -0.015439985319972038, 0.018526382744312286, 0.04719056934118271, -0.04006971791386604, -0.017377855256199837, 0.009345019236207008, -0.03033038228750229, -0.020333299413323402, 0.005262113641947508, 0.02823442779481411, -0.012385024689137936, -0.007083562668412924 ]
faiss-approximate-nearest-neighbors-cell-probe
https://markhneedham.com/blog/2023/09/14/faiss-approximate-nearest-neighbors-cell-probe
false
2023-08-20 00:44:37
JupyterLab 4.0.5: Adding execution time to cell
[ "jupyterlab", "til" ]
[ "TIL" ]
:icons: font I've been using Jupyter Lab notebooks in some of my recent videos on https://www.youtube.com/@learndatawithmark/videos[Learn Data with Mark^] and I wanted to show cell execution timings so that viewers would have an idea of how long things were taking. I thought I'd need to use a custom timer, but it turns out there's quite a nice plug-in, which we'll learn about in this blog post. The plug-in is called https://github.com/deshaw/jupyterlab-execute-time[`jupyterlab-execute-time`^] and it shows a live view of the time that a cell takes to execute, as well as showing the execution time afterward. .The jupyterlab-execute-time plugin-in in action image::{{<siteurl>}}/uploads/2023/08/cell-execution-time.gif[] We can install the library directly using pip: [source, bash] ---- pip install jupyterlab_execute_time ---- Or Poetry, if that's your thing: [source, bash] ---- poetry add jupyterlab_execute_time ---- Alternatively, we can use the extension manager inside Jupyter Lab, which you can launch by typing `Cmd + Shift + X` on a Mac. Once it pops up, search for `jupyterlab-execute-time`, as shown below: .Searching for the jupyterlab-execute-time plug-in image::{{<siteurl>}}/uploads/2023/08/time-extension-manual-search.png[] And then click on 'Install'. Regardless of the installation option used, you should then see the plugin under the 'Installed' section: .jupyterlab-execute-time plug-in installed image::{{<siteurl>}}/uploads/2023/08/time-extension-installed.png[] And here's a screenshot showing the timings for a few cells in a notebook that I'm currently working on: .Multiple cell timings image::{{<siteurl>}}/uploads/2023/08/jupyterlab-time-execution-cell.png[]
In this post, we'll learn how to add execution time to cells in JupyterLab.
uploads/2023/07/jupyterlab-banner.png
[ 0.011524385772645473, 0.011987804435193539, -0.02170245721936226, 0.013327017426490784, 0.09660734236240387, 0.04253089055418968, 0.01559492014348507, 0.04209745675325394, 0.007861156947910786, -0.022210368886590004, 0.009914452210068703, -0.0045134262181818485, -0.04971328377723694, 0.02931687794625759, -0.037368349730968475, 0.07069751620292664, 0.06164067983627319, -0.015252068638801575, 0.04867856577038765, 0.021205203607678413, 0.050025541335344315, 0.050744034349918365, -0.008917887695133686, 0.0470733642578125, -0.0007844105712138116, 0.005807426292449236, 0.0007351970416493714, -0.008123540319502354, -0.05933602526783943, -0.02632705122232437, 0.020083459094166756, -0.01554989255964756, -0.007739955559372902, 0.004366840235888958, 0.025625864043831825, 0.029278265312314034, -0.017065605148673058, 0.023353133350610733, 0.0019207557197660208, 0.04006011784076691, -0.06565992534160614, -0.011676930822432041, 0.010086903348565102, -0.008839155547320843, -0.048610441386699677, -0.007312122732400894, -0.05350036546587944, 0.02135308086872101, -0.007361628580838442, 0.013984019868075848, -0.05058026313781738, 0.06164754554629326, 0.029200483113527298, -0.03930036723613739, -0.006567090749740601, 0.03271350637078285, 0.055106718093156815, -0.06490491330623627, 0.04029512777924538, -0.04947380721569061, 0.028137238696217537, -0.024930989369750023, 0.014185507781803608, 0.0223129540681839, 0.009797250851988792, -0.008444716222584248, 0.020045939832925797, 0.0441189780831337, -0.061694446951150894, -0.023764440789818764, -0.025816522538661957, 0.017159510403871536, -0.033571865409612656, 0.0017387309344485402, 0.02517828904092312, -0.028622565791010857, -0.01940825767815113, 0.046728044748306274, 0.03772139549255371, 0.060435447841882706, 0.0022603406105190516, -0.0008844293188303709, 0.010746303014457226, 0.07260620594024658, -0.00951660331338644, -0.016198765486478806, -0.06522317230701447, -0.006277643144130707, -0.03733430430293083, 0.046012647449970245, 0.021170254796743393, -0.0562678687274456, 0.03865942358970642, 0.019291291013360023, -0.007163563743233681, 0.015911521390080452, -0.0047891950234770775, 0.0038744702469557524, -0.004308932460844517, 0.017301302403211594, -0.04523360729217529, -0.058267202228307724, 0.027514701709151268, 0.04056869074702263, -0.08470480889081955, -0.0099647780880332, -0.030756354331970215, -0.02044827863574028, 0.003104220377281308, 0.030368082225322723, -0.005110913887619972, -0.011004957370460033, -0.021309563890099525, 0.01854771189391613, -0.07865066081285477, 0.0736096054315567, 0.026363065466284752, -0.018969550728797913, -0.026140237227082253, 0.017852066084742546, 0.019370343536138535, 0.03411455452442169, -0.03028968721628189, 0.08018437027931213, 0.02267703413963318, 0.06129626929759979, -0.008149053901433945, 0.029141219332814217, -0.003143253969028592, -0.05110562592744827, 0.014399963431060314, 0.04612520709633827, 0.0025388605426996946, 0.011927789077162743, 0.028728703036904335, -0.009473525919020176, 0.013988038524985313, -0.0047690002247691154, 0.072354756295681, 0.02934238314628601, -0.0031403438188135624, -0.020289069041609764, 0.00800574105232954, -0.008471722714602947, 0.030217982828617096, 0.014560148119926453, -0.022535402327775955, -0.047091029584407806, -0.03770795464515686, -0.009203297086060047, -0.0023256295826286077, -0.004287052433937788, 0.07042728364467621, -0.017917407676577568, 0.028894132003188133, 0.11334274709224701, 0.04846414178609848, 0.021951468661427498, -0.021544143557548523, 0.03226986154913902, 0.005054472479969263, 0.051519185304641724, -0.033027417957782745, 0.04358819127082825, -0.015099888667464256, -0.01507395040243864, 0.02519731968641281, 0.02374286577105522, -0.04697742685675621, -0.0376906581223011, -0.06516768783330917, -0.04414619132876396, 0.0756588950753212, -0.038131456822156906, -0.005167399998754263, 0.06334175169467926, 0.10298964381217957, -0.0036227696109563112, 0.02826557494699955, -0.000028500435291789472, -0.08689498901367188, 0.03989231213927269, -0.002283696783706546, 0.01677015796303749, 0.05632302910089493, -0.0255911722779274, 0.0738423615694046, 0.0045487405732274055, -0.005518027115613222, 0.02810150384902954, -0.04949214309453964, -0.04193093627691269, -0.025265615433454514, -0.004559820517897606, 0.04903384670615196, -0.05894731730222702, -0.004704294726252556, 0.045198991894721985, 0.02116871438920498, 0.038923271000385284, -0.009326180443167686, -0.010324706323444843, -0.0003907361242454499, -0.060210637748241425, -0.06714335083961487, 0.018449772149324417, 0.0369885228574276, -0.04836059734225273, 0.0027951111551374197, -0.00694081699475646, -0.006511348765343428, -0.007118643261492252, 0.04601902887225151, 0.0005297953612171113, 0.02845185436308384, 0.008928562514483929, 0.024544155225157738, -0.00703429663553834, 0.022595470771193504, -0.090008445084095, 0.01770664006471634, -0.006480212789028883, 0.006629385054111481, -0.03263351321220398, -0.0020488800946623087, 0.1221097931265831, 0.04858779534697533, -0.05394594743847847, -0.05172073096036911, 0.0448528453707695, 0.007254563271999359, -0.05955987051129341, -0.0026793424040079117, -0.0037254111375659704, -0.02250896394252777, 0.021509556099772453, -0.03277239948511124, -0.024598287418484688, 0.015841886401176453, -0.03938072547316551, 0.015353313647210598, 0.06648948043584824, -0.02753021940588951, 0.03386892378330231, 0.005774724762886763, -0.04056420922279358, -0.0027514277026057243, -0.01179994735866785, -0.06615868210792542, 0.02376173809170723, 0.021067077293992043, 0.0011557069374248385, 0.03380972519516945, -0.028527608141303062, 0.007488682866096497, -0.03128425404429436, -0.06202888861298561, 0.020400362089276314, 0.05703941732645035, 0.04028536379337311, 0.015836339443922043, 0.03147440031170845, 0.004083293955773115, -0.0055981227196753025, -0.011329300701618195, -0.0634261965751648, -0.021246761083602905, -0.029530636966228485, 0.023139875382184982, 0.00944126583635807, 0.0243250522762537, -0.00015804643044248223, 0.011373878456652164, -0.012904563918709755, -0.0006206207908689976, 0.006342818029224873, 0.05582694709300995, -0.004227126948535442, -0.01261654682457447, -0.027054961770772934, -0.00298761622980237, 0.053633913397789, -0.03455106541514397, -0.02088783122599125, -0.0029005997348576784, -0.06216609105467796, -0.0013854567660018802, -0.08218276500701904, -0.020483121275901794, -0.022220013663172722, -0.025791607797145844, 0.04495004564523697, -0.009002573788166046, 0.017215341329574585, 0.029406629502773285, 0.035337191075086594, 0.010805897414684296, -0.0030812672339379787, -0.027169881388545036, 0.028138509020209312, 0.029065867885947227, 0.030479207634925842, 0.0572160929441452, 0.006475419271737337, -0.01576617732644081, -0.04211839288473129, 0.006395450793206692, -0.062473710626363754, -0.26561713218688965, -0.005105112679302692, -0.005257916171103716, -0.03221138194203377, 0.006819923873990774, -0.04120568558573723, 0.01647595688700676, -0.05281032621860504, -0.041781146079301834, -0.007088426034897566, -0.028439121320843697, -0.03024553507566452, -0.0335659421980381, 0.025477267801761627, -0.0012123112101107836, -0.012782719917595387, 0.00716078095138073, -0.027795962989330292, 0.0007734146201983094, 0.03369522467255592, 0.026951415464282036, -0.07831372320652008, -0.020858433097600937, 0.044626910239458084, 0.0244048610329628, 0.05606576427817345, -0.05686274170875549, 0.03617948666214943, -0.06712888926267624, -0.023023245856165886, 0.0065305233001708984, -0.028422977775335312, -0.0019554507452994585, -0.01921711675822735, -0.0010413213167339563, -0.025520743802189827, 0.03290947154164314, -0.011730843223631382, 0.044474776834249496, 0.01765710860490799, 0.007857765071094036, -0.027442336082458496, -0.0026023625396192074, 0.004166123922914267, 0.06510207802057266, -0.012179499492049217, -0.05465778708457947, -0.017614297568798065, -0.05552619323134422, 0.07438800483942032, -0.012376823462545872, -0.01638699881732464, -0.020295213907957077, 0.01841122843325138, -0.028725966811180115, -0.032027654349803925, -0.008943485096096992, 0.007616385817527771, -0.03461770713329315, -0.06703799217939377, -0.03161977231502533, -0.022739768028259277, -0.04578683525323868, -0.0325627401471138, 0.015045487321913242, -0.06944672018289566, -0.029351839795708656, -0.019970454275608063, 0.051503002643585205, 0.0704994723200798, -0.06685391068458557, -0.0057094222865998745, -0.007368538994342089, -0.1017075926065445, 0.00635563675314188, -0.028061864897608757, -0.009298750199377537, 0.0009756817016750574, -0.012798218987882137, 0.07281585782766342, -0.03945319727063179, -0.04002254456281662, 0.0544951930642128, -0.0049286833964288235, -0.0007307649939320982, -0.025925524532794952, -0.0118033979088068, -0.009770466014742851, 0.03225238621234894, 0.014768831431865692, 0.05789802223443985, -0.03699831664562225, -0.015840429812669754, -0.012173942290246487, -0.015569142997264862, 0.016930831596255302, 0.03257180377840996, 0.03259268403053284, 0.036620259284973145, 0.008838520385324955, 0.016192976385354996, -0.050955794751644135, -0.023108134046196938, -0.032821305096149445, 0.002486440120264888, -0.025456516072154045, -0.05700351670384407, 0.03676646202802658, 0.016227364540100098, 0.014009304344654083, -0.009593535214662552, -0.039267949759960175, 0.02255948819220066, -0.0511760339140892, -0.00769855547696352, -0.03659447282552719, 0.030923061072826385, 0.03586052358150482, 0.019888149574398994, 0.020307019352912903, -0.06001148372888565, 0.021724747493863106, -0.009037851355969906, -0.02017834410071373, -0.0383760966360569, -0.008873822167515755, 0.0012933958787471056, -0.0030235545709729195, 0.011014961637556553, -0.009502314031124115, 0.011152106337249279, 0.01595112681388855, 0.014529075473546982, -0.006671459414064884, 0.03068343922495842, -0.009240454994142056, -0.049945708364248276, -0.035026341676712036, 0.011372492648661137, 0.010942937806248665, -0.014671821147203445, 0.02510325238108635, 0.0256644394248724, -0.013428990729153156, 0.06676515936851501, 0.030047070235013962, 0.026207324117422104, -0.002833365462720394, -0.007239117752760649, 0.010881801135838032, 0.05283140391111374, -0.02232436276972294, -0.018985338509082794, -0.04192114993929863, -0.020597662776708603, -0.007391154300421476, 0.014741498976945877, -0.0006279111839830875, -0.011300561018288136, -0.03402925282716751, 0.008549092337489128, -0.03327994421124458, -0.024982159957289696, -0.021040696650743484, -0.00929316971451044, 0.05298694595694542, 0.027511758729815483, 0.03975842520594597, -0.01102207601070404, -0.00917314738035202, 0.010573338717222214, 0.012479381635785103, -0.04544808343052864, 0.010138055309653282, 0.003519420512020588, -0.01710633747279644, 0.03609515354037285, 0.020329158753156662, 0.02553258277475834, 0.01986345648765564, 0.009864862076938152, -0.04206698015332222, 0.040748365223407745, 0.020554274320602417, 0.04309728741645813, 0.035594724118709564, -0.04218783602118492, -0.05075225234031677, -0.0152946962043643, -0.024223320186138153, -0.03020315244793892, -0.05029784142971039, 0.006331292912364006, -0.06536485999822617, -0.019060594961047173, -0.06918013095855713, 0.00280807726085186, 0.06116563826799393, 0.02494184486567974, -0.017453737556934357, -0.03755217418074608, -0.0032587223686277866, -0.047528184950351715, 0.03210631012916565, 0.04657716304063797, -0.06065499410033226, 0.01354703027755022, 0.00881050806492567, 0.018090855330228806, -0.003392014419659972, 0.03159387782216072, -0.07037705183029175, -0.022433700039982796, 0.00756795285269618, 0.00320476689375937, -0.006938730366528034, -0.03561008349061012, -0.051306575536727905, 0.0056290216743946075, -0.021914897486567497, 0.023135071620345116, -0.0032302436884492636, -0.028496624901890755, 0.0009974897839128971, -0.00612485921010375, 0.005196513142436743, -0.02205546572804451, 0.011974065564572811, 0.045186009258031845, -0.003978935535997152, 0.042301129549741745, -0.024727126583456993, 0.03049393557012081, 0.03698544204235077, -0.0175388865172863, -0.01532631367444992, -0.03275514394044876, -0.0177752748131752, 0.029488826170563698, 0.016520995646715164, 0.0160377137362957, 0.0328889936208725, -0.05469018593430519, 0.018089232966303825, -0.010854009538888931, 0.023196646943688393, 0.006463449914008379, -0.0004625811998266727, 0.013683249242603779, 0.060638535767793655, 0.015598450787365437, 0.01547910738736391, -0.013615774922072887, -0.05139857903122902, 0.049112651497125626, -0.07143177837133408, -0.034738946706056595, -0.006266898941248655, -0.03483495116233826, 0.04437701404094696, -0.012378598563373089, 0.024103835225105286, -0.040790531784296036, 0.0377182774245739, 0.007533120457082987, 0.02366871014237404, 0.06586401164531708, -0.0052334521897137165, 0.02636541984975338, -0.02328275516629219, 0.005095834843814373, -0.0857345461845398, -0.022405661642551422, 0.031040677800774574, -0.016465939581394196, -0.03616304695606232, 0.03168054670095444, -0.0070240311324596405, 0.054158665239810944, -0.06079993396997452, -0.02014862187206745, 0.06703998148441315, 0.012834309600293636, 0.006736608222126961, 0.045410312712192535, -0.06159993261098862, 0.03917012736201286, 0.03791867196559906, -0.03340558335185051, -0.006658438593149185, 0.0046753427013754845, 0.06262347847223282, -0.00819211546331644, 0.018103454262018204, -0.023908216506242752, 0.008963780477643013, 0.07105965912342072, -0.005246244370937347, 0.004015037324279547, 0.015553398057818413, -0.007711965125054121, 0.0508497953414917, 0.0283836517482996, -0.015780603513121605, -0.009968661703169346, 0.01518999319523573, 0.0017450941959396005, -0.032380085438489914, 0.01055141445249319, 0.007510787807404995, 0.009074041619896889, -0.0633927658200264, 0.06923741102218628, 0.0002086861350107938, 0.0017807018011808395, -0.05260154604911804, 0.02562473714351654, -0.05672437325119972, -0.0412302203476429, -0.031268615275621414, -0.013062492944300175, -0.04760434851050377, 0.06563825905323029, -0.019503889605402946, 0.010454962961375713, 0.06410259008407593, 0.015727574005723, 0.009825148619711399, 0.00032489007571712136, 0.06982240825891495, 0.08003777265548706, 0.04214274138212204, -0.0046006725169718266, 0.07685308903455734, -0.024805821478366852, -0.04309616982936859, -0.008426163345575333, -0.04631422832608223, -0.02277343161404133, -0.0351678766310215, 0.027113595977425575, 0.07201024144887924, -0.003428362077102065, 0.05186820030212402, -0.02333247847855091, -0.006165674421936274, -0.019416464492678642, 0.013208162039518356, 0.02786932699382305, 0.046926360577344894, 0.021469127386808395, 0.02114519476890564, -0.03120427578687668, -0.003997607156634331, 0.0344102680683136, -0.042527053505182266, 0.022329211235046387, 0.02383183315396309, -0.018286757171154022, 0.006929338444024324, -0.0203033909201622, 0.020548494532704353, 0.048474326729774475, -0.03201799839735031, -0.02254624478518963, 0.02219235897064209, 0.04001238942146301, 0.014423787593841553, 0.0276163462549448, -0.024863621219992638, 0.01471385732293129, -0.008827070705592632, -0.0038422434590756893, 0.017308974638581276, -0.01658383011817932, -0.03127501532435417, 0.036836881190538406, 0.0068910690024495125, 0.01887393184006214, 0.039825987070798874, -0.03719927370548248, -0.022743750363588333, -0.04702678695321083, -0.04037754610180855, -0.04496994614601135, -0.060308512300252914, -0.0009261281229555607, 0.013920551165938377, -0.028012486174702644, -0.05103429779410362, -0.03388708829879761, 0.0030530865769833326, 0.02444359101355076, -0.03439968451857567, -0.05016450211405754, -0.02236894890666008, 0.015625201165676117, -0.0044096652418375015, -0.0020339512266218662, 0.014572646468877792, 0.068082295358181, 0.02111029624938965, -0.04348265007138252, -0.03946119546890259, -0.002847065683454275, 0.017670944333076477, -0.02221326343715191, 0.024400556460022926, -0.06257391721010208, -0.0015915834810584784, 0.03660474717617035, -0.004172847606241703, -0.06821435689926147, 0.03171525523066521, 0.03261251375079155, 0.0203280970454216, 0.04897002875804901, -0.019067075103521347, 0.022888893261551857, -0.04668615385890007, -0.015363834798336029, -0.00667081493884325, 0.04977813735604286, 0.02469838224351406, -0.0014728517271578312, 0.07822008430957794, 0.02272774837911129, -0.025084111839532852, -0.007273615803569555, -0.004569724667817354, -0.021655624732375145, 0.010803445242345333, -0.03028981201350689, -0.0335380844771862, -0.07256431877613068, -0.08495354652404785, -0.013917576521635056, 0.021604739129543304, -0.03740551322698593, -0.0508282333612442, -0.0027694820892065763, -0.01290945429354906, -0.020519211888313293, 0.03909975662827492, -0.05027018114924431, -0.014293444342911243, -0.009150140918791294, -0.035210900008678436, 0.02270089089870453, 0.010575075633823872, -0.023130711168050766, 0.0004703931917902082, 0.04364510253071785, -0.05193648487329483, -0.023181729018688202, -0.02750425972044468, 0.028920449316501617, 0.05685678496956825, 0.011245575733482838, 0.007502835709601641 ]
[ -0.09405838698148727, -0.004510770086199045, 0.005291569512337446, -0.03476887196302414, 0.039167966693639755, -0.037187717854976654, -0.002763795666396618, 0.004268305376172066, 0.05163406580686569, 0.007815663702785969, 0.018797991797327995, -0.024926532059907913, -0.0005056570516899228, -0.026818476617336273, 0.014506331644952297, -0.036337144672870636, -0.047372717410326004, -0.07162053138017654, -0.024890294298529625, -0.006618986371904612, -0.024937698617577553, -0.02890685759484768, -0.05380062758922577, -0.03238559141755104, 0.027264371514320374, 0.028459735214710236, 0.021218696609139442, -0.03798568248748779, -0.020244091749191284, -0.20060880482196808, 0.06780941784381866, -0.005796811077743769, 0.02670588716864586, 0.00024668173864483833, -0.0044149053283035755, 0.03856498375535011, -0.007025577127933502, 0.03528169170022011, -0.0009927286300808191, 0.03472118079662323, 0.040273576974868774, -0.006866120267659426, -0.07892224192619324, 0.014015710912644863, 0.05533871427178383, -0.014087631367146969, -0.01204289123415947, -0.042542964220047, 0.0152214290574193, 0.025639617815613747, -0.0420609749853611, -0.009686225093901157, 0.009188979864120483, -0.044254086911678314, -0.03283905237913132, -0.03441182151436806, 0.07444997131824493, 0.06209523603320122, 0.0374789722263813, -0.029093900695443153, -0.013593614101409912, -0.015180977061390877, -0.12728141248226166, 0.12292756140232086, -0.006627961061894894, -0.011109891347587109, -0.012214957736432552, -0.0044122724793851376, 0.02090129256248474, 0.10409180819988251, -0.06291386485099792, -0.02904793620109558, -0.022231560200452805, 0.031942617148160934, -0.021452628076076508, -0.03807026892900467, -0.00836782343685627, 0.008861162699759007, 0.04615228995680809, -0.025950074195861816, -0.0254072118550539, -0.027984995394945145, 0.023178061470389366, -0.04402976110577583, -0.008484979160130024, 0.02221474051475525, -0.021151848137378693, 0.052497830241918564, 0.02959761582314968, 0.03781998157501221, -0.005291647743433714, -0.03106471337378025, 0.002095466712489724, 0.0491090826690197, -0.0743090882897377, -0.037939541041851044, 0.025142472237348557, 0.017681410536170006, -0.024856599047780037, 0.4169921576976776, -0.044489942491054535, 0.007170436438173056, 0.015087245032191277, 0.031775493174791336, 0.023388247936964035, -0.03586237505078316, -0.00874538067728281, -0.017435545101761818, -0.021184444427490234, -0.018301786854863167, 0.011849506758153439, 0.008830105885863304, 0.08564119786024094, -0.06291517615318298, 0.010219033807516098, 0.012977728620171547, 0.019187448546290398, -0.02470994181931019, 0.03022952750325203, 0.03305641561746597, -0.0002237540320493281, 0.004867782350629568, 0.011082522571086884, -0.025883274152874947, 0.07036465406417847, -0.007564926985651255, 0.03132007643580437, 0.02681046910583973, 0.024353284388780594, -0.04284841567277908, 0.06103404983878136, 0.001114178216084838, -0.04062613099813461, 0.06340986490249634, 0.013390623964369297, 0.014982466585934162, 0.012399103492498398, -0.022136734798550606, 0.04207490012049675, -0.06843782961368561, -0.004423443228006363, -0.04033615440130234, 0.07030550390481949, -0.02770918980240822, -0.01917615719139576, 0.09761979430913925, 0.01711835153400898, -0.0018299263902008533, -0.05940411239862442, -0.051084406673908234, -0.07244092971086502, 0.0381394699215889, -0.005173639860004187, -0.006039225030690432, 0.03623763844370842, 0.04552259296178818, 0.08883246779441833, 0.014820377342402935, -0.029847579076886177, -0.030720921233296394, -0.06517406553030014, 0.00864801462739706, -0.03125164285302162, 0.014496452175080776, 0.05738714709877968, -0.12300954759120941, -0.012050495482981205, 0.010920058004558086, -0.00032942750840447843, -0.07738145440816879, -0.0235125869512558, -0.0365879163146019, -0.013997616246342659, -0.01686188392341137, 0.05239474028348923, -0.00966732669621706, -0.03585531562566757, 0.014335582964122295, 0.08644100278615952, 0.01322731003165245, 0.02449866384267807, -0.007110350299626589, 0.02753855288028717, 0.0070249177515506744, -0.02541995793581009, -0.05249748006463051, -0.03464611992239952, -0.017193756997585297, -0.015452983789145947, 0.030485955998301506, -0.025176294147968292, -0.05345023795962334, -0.0480959452688694, 0.08927666395902634, -0.05073681101202965, -0.06866040080785751, 0.0030089349020272493, -0.016412392258644104, -0.010413248091936111, -0.0537702739238739, 0.037070728838443756, -0.0227131899446249, 0.00010018447937909514, 0.04346231743693352, 0.015306998044252396, 0.04271040856838226, 0.022668663412332535, -0.01411349605768919, 0.108524389564991, -0.013250669464468956, -0.07161521911621094, 0.011616171337664127, 0.0074081108905375, -0.028082210570573807, -0.026014525443315506, 0.0023147366009652615, -0.005901174154132605, -0.00600012531504035, 0.04735448211431503, 0.01629173941910267, -0.02067820355296135, -0.02436261624097824, -0.04413612559437752, -0.3322494924068451, -0.013456879183650017, -0.021556440740823746, 0.01001479011029005, 0.03230784088373184, -0.02590445801615715, -0.007086034864187241, -0.029095817357301712, 0.036981403827667236, -0.03556312248110771, 0.0635758489370346, -0.018310055136680603, -0.01427475269883871, -0.14692211151123047, 0.029441453516483307, 0.04197166487574577, -0.0023690038360655308, -0.036672547459602356, -0.006021813023835421, 0.011497633531689644, 0.031987011432647705, -0.013380056247115135, -0.011982130818068981, 0.003286320250481367, -0.012122596614062786, -0.03496347740292549, 0.09191630780696869, -0.008945128880441189, 0.08751536160707474, -0.02699863351881504, 0.058320265263319016, 0.004643926862627268, -0.02983870916068554, -0.09507273137569427, -0.013308343477547169, -0.02546798810362816, 0.016769666224718094, 0.012850531376898289, 0.038609910756349564, -0.007269405294209719, -0.05283452570438385, 0.038288217037916183, -0.0032032560557127, -0.04869426414370537, -0.011192498728632927, 0.017793437466025352, 0.054364144802093506, -0.03865949809551239, -0.049311429262161255, 0.002453537192195654, 0.029961585998535156, -0.01848011463880539, -0.010653103701770306, -0.016156120225787163, 0.021336687728762627, -0.024848448112607002, -0.04316391795873642, 0.012004619464278221, -0.06963428854942322, -0.005968152545392513, 0.007774201221764088, 0.02939654141664505, 0.019498709589242935, -0.04703680798411369, -0.010661402717232704, 0.015986209735274315, 0.01277226209640503, -0.0418083593249321, 0.047725554555654526, -0.024861816316843033, -0.0066603547893464565, 0.10335429012775421, -0.015004294924438, 0.01818978041410446, 0.0788004994392395, 0.021624628454446793, 0.01903306506574154, 0.013623985461890697, 0.03583995997905731, 0.02168302610516548, 0.008021573536098003, 0.014232414774596691, 0.021206660196185112, -0.012544277124106884, -0.016897577792406082, 0.004794544540345669, -0.01624309830367565, 0.01774921454489231, 0.06185481697320938, -0.022715816274285316, -0.03183922544121742, -0.009965113364160061, 0.013391394168138504, -0.024914976209402084, 0.06311408430337906, -0.001741947140544653, -0.21990706026554108, 0.051111094653606415, 0.07305862009525299, 0.04122574254870415, -0.019835051149129868, -0.05193985626101494, 0.011963092721998692, -0.0392954982817173, -0.00600030180066824, 0.024682747200131416, -0.0037327606696635485, 0.0009752786136232316, -0.007926740683615208, 0.019527824595570564, 0.02182735875248909, 0.013868847861886024, 0.07059738785028458, 0.00655806390568614, -0.01191200502216816, 0.009864691644906998, 0.02276710607111454, -0.046199701726436615, 0.14596766233444214, 0.017823228612542152, 0.0290851891040802, 0.020333226770162582, 0.026382196694612503, 0.005112445447593927, 0.07186146825551987, 0.0018638097681105137, 0.012831196188926697, -0.023778971284627914, 0.015360689722001553, -0.029074763879179955, 0.02383342571556568, -0.03171034902334213, -0.03323204070329666, 0.06009405851364136, 0.008980894461274147, 0.012590105645358562, 0.026573197916150093, 0.03421050310134888, -0.08099278807640076, -0.03401148319244385, 0.048631928861141205, 0.02906363271176815, -0.027166355401277542, -0.03175464645028114, -0.04209599271416664, 0.011276799254119396, -0.036669980734586716, -0.05641329288482666, -0.012808392755687237, 0.00640020752325654, 0.020166771486401558, 0.09835018962621689, 0.03865930810570717, 0.00380098819732666, 0.06624191254377365, 0.0510462261736393, 0.014432518742978573, -0.06547960638999939, 0.1704491823911667, 0.05339769646525383, 0.010259201750159264 ]
[ 0.01118142157793045, 0.0479736253619194, 0.011674975045025349, -0.02761986292898655, -0.025112977251410484, 0.039729394018650055, -0.015984224155545235, 0.02600935846567154, 0.013412415981292725, -0.0153500996530056, 0.003964154049754143, -0.021989017724990845, -0.01610880345106125, -0.025912847369909286, 0.016623497009277344, -0.05195409432053566, 0.056578923016786575, -0.006112012546509504, 0.035513706505298615, -0.0038830696139484644, 0.003079506801441312, 0.004493579734116793, 0.03447972238063812, -0.023936592042446136, 0.026091206818819046, 0.0075235990807414055, -0.06942693144083023, 0.013856925070285797, 0.01803714968264103, -0.13461360335350037, -0.03552808612585068, -0.012732720002532005, -0.01695370487868786, 0.01303696259856224, -0.003952750004827976, -0.03111073561012745, 0.010428691282868385, 0.02162419818341732, 0.018302373588085175, -0.004664807114750147, 0.04321173578500748, 0.009213530458509922, 0.007731326390057802, 0.01634245365858078, 0.012440578080713749, -0.03233040124177933, 0.010243783704936504, -0.06683939695358276, -0.019327519461512566, 0.029548833146691322, -0.0645788237452507, 0.009029804728925228, 0.0048298100009560585, -0.04166051372885704, -0.019633274525403976, 0.024154765531420708, 0.007843145169317722, 0.031232938170433044, 0.052278246730566025, 0.015115898102521896, -0.02145511470735073, -0.006338153500109911, -0.04204489290714264, -0.013232134282588959, 0.008968054316937923, -0.06475644558668137, -0.0043715666979551315, -0.004179736133664846, 0.02025727555155754, 0.010704942047595978, 0.005640832707285881, 0.003432573052123189, -0.02323254384100437, -0.015192209742963314, -0.07418811321258545, -0.00022301453282125294, 0.0023025956470519304, -0.03168477490544319, -0.005424425937235355, -0.019791876897215843, 0.0026446394622325897, 0.0011624174658209085, 0.028181394562125206, 0.047193337231874466, 0.007790668401867151, -0.008890990167856216, 0.025279950350522995, 0.04938438534736633, 0.018723193556070328, -0.050707124173641205, -0.005746673326939344, -0.0003431728109717369, -0.031506165862083435, 0.04158836975693703, -0.09080546349287033, 0.005661546252667904, 0.021084418520331383, 0.004583398345857859, -0.001939298934303224, 0.8200697898864746, 0.008338053710758686, -0.01605921797454357, 0.030044859275221825, 0.04280078038573265, 0.03871211037039757, -0.007579370867460966, -0.01063184067606926, -0.030919412150979042, 0.007401114329695702, -0.003756872611120343, 0.034795455634593964, -0.035342879593372345, -0.0011921538971364498, 0.019702203571796417, 0.03960807994008064, 0.044759269803762436, -0.004481850191950798, -0.003215500619262457, 0.04692938178777695, -0.008851990103721619, 0.022364627569913864, -0.00427619693800807, -0.01159023866057396, -0.02713562175631523, -0.001667051576077938, -0.1351843625307083, 0.0020787303801625967, -6.264863264264615e-33, 0.004243483766913414, -0.06253648549318314, 0.03328977897763252, -0.0026566125452518463, 0.03163135424256325, 0.00026680054725147784, -0.03401971980929375, 0.009823336265981197, 0.021497434005141258, -0.028647873550653458, -0.003930474165827036, -0.01380904857069254, -0.029735205695033073, -0.0038961609825491905, -0.027087019756436348, -0.007703951559960842, 0.01009010523557663, 0.006040661130100489, 0.026836613193154335, 0.011481201276183128, 0.028288498520851135, -0.008518346585333347, -0.016931964084506035, 0.012381470762193203, -0.013312648050487041, -0.018945127725601196, 0.02904549427330494, -0.010657969862222672, 0.0195075124502182, -0.035998255014419556, -0.0006077057332731783, -0.004015487153083086, -0.0006738417432643473, -0.05581102892756462, 0.009277813136577606, -0.0660528764128685, -0.030224815011024475, 0.01961861364543438, 0.002445454942062497, -0.007436801213771105, -0.044472772628068924, 0.01320562232285738, -0.042060188949108124, -0.037296395748853683, -0.04254457727074623, 0.011219740845263004, -0.020055752247571945, 0.02370426617562771, 0.00002647624751261901, 0.028636161237955093, 0.021795745939016342, -0.003363418160006404, 0.0014097500825300813, -0.060650523751974106, -0.017403485253453255, 0.07257382571697235, 0.015803296118974686, 0.03015417791903019, 0.017698481678962708, 0.04028737172484398, -0.005774843972176313, 0.002009635092690587, -0.01551238913089037, 0.04161696881055832, -0.0185860563069582, 0.03802124038338661, -0.00004608809103956446, -0.01431011687964201, 0.03767799586057663, 0.026900814846158028, -0.07145064324140549, 0.017479347065091133, 0.01944168098270893, -0.03950713947415352, 0.015639135614037514, -0.021204061806201935, 0.023078974336385727, -0.025616254657506943, -0.01408402156084776, 0.01749672181904316, 0.022654937580227852, -0.05296240374445915, -0.027608156204223633, -0.03002450428903103, 0.003969941288232803, -0.0293129775673151, 0.025082657113671303, -0.012619983404874802, -0.02084498107433319, 0.027470102533698082, 0.028954677283763885, 0.025610921904444695, 0.0019965795800089836, -0.0003206228429917246, -0.05214446038007736, 5.576065084327018e-33, 0.02544787898659706, -0.0002527836477383971, -0.019186249002814293, 0.010148151777684689, 0.05069280043244362, 0.01310812309384346, 0.015781110152602196, 0.026975151151418686, 0.0018353239865973592, 0.025661127641797066, 0.004631970543414354, 0.025265661999583244, -0.04361102730035782, 0.01913170889019966, 0.03463006019592285, 0.018202314153313637, -0.00257129967212677, -0.01863684691488743, -0.000390621367841959, -0.0005876449286006391, -0.01949303038418293, 0.006221359595656395, 0.013102753087878227, 0.002015746431425214, 0.04674511030316353, 0.012529483996331692, -0.019912153482437134, 0.006792443338781595, -0.0073998356238007545, 0.007681600283831358, -0.032838255167007446, -0.04339725524187088, -0.0001870118430815637, -0.022656843066215515, 0.010155681520700455, 0.024942323565483093, 0.0110707962885499, -0.024949699640274048, -0.007017314899712801, 0.01649022474884987, 0.04892568290233612, 0.029615702107548714, -0.028836902230978012, -0.0077830213122069836, 0.01735329069197178, 0.06144222244620323, -0.008578542619943619, -0.0014625287149101496, 0.002608143026009202, 0.02073049545288086, -0.030704697594046593, -0.0018879931885749102, -0.008641361258924007, 0.018600305542349815, -0.004282061476260424, -0.029171409085392952, 0.00017922325059771538, 0.02968818135559559, -0.019945014268159866, 0.006156275048851967, -0.03507186844944954, -0.05355306342244148, -0.018793558701872826, -0.03312080353498459, 0.0007270193891599774, 0.023205548524856567, -0.029619205743074417, -0.01407465897500515, -0.01785365492105484, 0.0008107259054668248, 0.054024819284677505, -0.005801919382065535, -0.020250361412763596, 0.03183838352560997, 0.0006509657832793891, -0.01553872786462307, -0.043946340680122375, 0.00936145056039095, -0.06661849468946457, 0.004166400991380215, 0.03312227874994278, 0.02358354814350605, -0.005452179349958897, -0.008573245257139206, -0.010455502197146416, 0.05910877883434296, -0.043318964540958405, 0.027470791712403297, 0.011063012294471264, 0.0014023514231666923, 0.02142036147415638, -0.03450073301792145, -0.00797838531434536, 0.0672006905078888, 0.0021708880085498095, -1.232447655041824e-8, 0.007679286412894726, 0.0107059795409441, 0.002087782137095928, -0.030603498220443726, -0.0044753775000572205, -0.007197871338576078, -0.007118577603250742, 0.012837180867791176, 0.05476054176688194, 0.009362643584609032, 0.08501414954662323, 0.0015629712725058198, 0.02347230352461338, 0.05281343311071396, -0.0011689199600368738, 0.0046898373402655125, -0.0013473860453814268, -0.02289126254618168, 0.02031371369957924, -0.0024306962732225657, -0.002753783715888858, 0.02744734100997448, 0.0224984772503376, -0.000034649136068765074, -0.04639112204313278, 0.004849198739975691, -0.0332307405769825, -0.06698384881019592, -0.026127101853489876, -0.02074669860303402, -0.006264726631343365, -0.0040410179644823074, 0.0028180298395454884, -0.019599437713623047, -0.04322613775730133, -0.06818519532680511, 0.003735822159796953, -0.02111241966485977, 0.03764032945036888, 0.05458805337548256, -0.020645400509238243, -0.06078506261110306, -0.017504390329122543, -0.0447884164750576, -0.011748346500098705, -0.017110586166381836, 0.006103650201112032, -0.03127053380012512, -0.005803331732749939, -0.010455031879246235, -0.01697964407503605, 0.01755497045814991, -0.003558976808562875, -0.0012583107454702258, 0.03796390816569328, -0.000653090130072087, -0.021102795377373695, 0.020010072737932205, -0.03529827296733856, 0.00757882185280323, 0.03254874423146248, 0.023545008152723312, 0.010379297658801079, -0.028761599212884903 ]
jupyterlab-time-cell-execution
https://markhneedham.com/blog/2023/08/20/jupyterlab-time-cell-execution
false
2023-08-21 00:44:37
Python: TypeError: Instance and class checks can only be used with @runtime_checkable protocols
[ "python", "til" ]
[ "TIL" ]
:icons: font I've been playing around with https://www.trychroma.com/[ChromaDB^] and I wanted to programatically get a list of the embedding functions, which was a little trickier thna I expected. In this blog post, we'll explore how I failed and then succeeded at this task. But first, let's install ChromaDB: [source, bash] ---- pip install chromadb ---- The embedding functions live in the `chromadb.utils.embedding_functions` module. So my first thought was that I could list all the things defined in that module and then check which ones were a sub class of `EmbeddingFunction`: [source, python] ---- import chromadb.utils.embedding_functions as ef [ cls_name in dir(ef) for cls_name in dir(ef) if issubclass(getattr(ef, cls_name), ef.EmbeddingFunction) ] ---- If we run this, we'll see the following error: [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 4, in <listcomp> File "/Users/markhneedham/Library/Caches/pypoetry/virtualenvs/chroma-example-SSMwZxEc-py3.11/lib/python3.11/site-packages/typing_extensions.py", line 662, in __subclasscheck__ raise TypeError( TypeError: Instance and class checks can only be used with @runtime_checkable protocols ---- From my understanding, we'd need `EmbeddingFunction` to have a `@runtime_checkable` annotation for this technique to work. ChatGPT guided me to the following alternative, where we check if `EmbeddingFunction` exists in in the base classes of a given class via the `__bases__` attribute: [source, python] ---- import inspect [ cls_name for cls_name in dir(ef) if inspect.isclass(getattr(ef,cls_name)) and ef.EmbeddingFunction in getattr(ef,cls_name).__bases__ ] ---- If we run that piece of code, we'll see the following output: [source, text] ---- ['CohereEmbeddingFunction', 'GooglePalmEmbeddingFunction', 'GoogleVertexEmbeddingFunction', 'HuggingFaceEmbeddingFunction', 'InstructorEmbeddingFunction', 'ONNXMiniLM_L6_V2', 'OpenAIEmbeddingFunction', 'SentenceTransformerEmbeddingFunction', 'Text2VecEmbeddingFunction'] ----
In this post, we'll learn how to work around an exception when trying to find Python classes that extend a sub class.
uploads/2023/08/python-runtime-banner.png
[ 0.007790315430611372, -0.010171380825340748, 0.009647930972278118, 0.01564682275056839, 0.08784722536802292, 0.04766577482223511, 0.0007143964758142829, 0.010547462850809097, -0.0206484142690897, -0.009778843261301517, -0.004162269178777933, 0.0206796545535326, -0.07263393700122833, 0.013394671492278576, 0.005405474454164505, 0.07324130088090897, 0.09149627387523651, -0.0010111904703080654, 0.012675551697611809, -0.0012467782944440842, 0.027670834213495255, 0.06870073080062866, -0.02288527972996235, 0.033149175345897675, -0.00027911950019188225, 0.027287719771265984, 0.01739376410841942, -0.009687681682407856, -0.04940883070230484, -0.021545622497797012, 0.04064030945301056, 0.011025993153452873, 0.011957571841776371, -0.013801660388708115, 0.031862907111644745, -0.00015564631030429155, -0.009211810305714607, 0.010580495931208134, 0.027362138032913208, 0.02188933454453945, -0.06495801359415054, 0.003597203642129898, 0.008570585399866104, 0.03139530494809151, -0.04355794936418533, 0.02590746060013771, -0.07540731877088547, -0.0015266567934304476, 0.016812482848763466, -0.01298260036855936, -0.0424860417842865, 0.045095451176166534, -0.029349809512495995, -0.006976977922022343, 0.0003702433023136109, 0.053787242621183395, 0.013775020837783813, -0.09407409280538559, 0.02366245724260807, -0.049262601882219315, 0.013423397205770016, -0.0005500984843820333, 0.00011460303358035162, 0.04452526941895485, 0.0008536929381079972, 0.03819793090224266, -0.0212867371737957, 0.034796908497810364, -0.06131986156105995, -0.016121963039040565, 0.012082131579518318, -0.013711599633097649, -0.028106916695833206, -0.0031183750834316015, 0.007178765255957842, -0.018415046855807304, -0.0621093288064003, 0.025036709383130074, 0.032946035265922546, 0.016200225800275803, 0.017211243510246277, 0.02023017592728138, 0.053252555429935455, 0.02406170219182968, 0.02010418102145195, -0.027634086087346077, -0.04001401364803314, -0.018915945664048195, -0.04330592602491379, 0.04955856874585152, 0.014057605527341366, -0.06047989800572395, 0.008197187446057796, 0.022588523104786873, 0.011099566705524921, -0.012274492532014847, -0.004874286241829395, -0.027276145294308662, 0.014972168020904064, -0.0059499843046069145, -0.044077251106500626, -0.01670287735760212, -0.008554121479392052, 0.018704865127801895, -0.0928143858909607, -0.004574228543788195, -0.04192110523581505, -0.011867347173392773, -0.007478682324290276, 0.02356177382171154, -0.02348426729440689, 0.010702296160161495, -0.024135278537869453, -0.020253777503967285, -0.07424625009298325, 0.0736239030957222, 0.02303484082221985, -0.005630831699818373, -0.006814085878431797, 0.02090119943022728, 0.07544564455747604, 0.03090585395693779, 0.0049305506981909275, 0.06917063891887665, 0.02756001241505146, 0.04426753520965576, 0.0034917963203042746, 0.052460927516222, 0.002817536238580942, -0.027811093255877495, -0.022585876286029816, 0.04109850525856018, -0.021206427365541458, 0.02768852189183235, 0.009721362963318825, -0.027543138712644577, -0.014887587167322636, -0.008744742721319199, 0.044288069009780884, 0.03341803327202797, 0.013557602651417255, -0.02899007685482502, -0.01046210341155529, -0.012427507899701595, 0.04230412468314171, -0.011107102036476135, 0.0019227082375437021, -0.02960841916501522, -0.044439807534217834, 0.0307601448148489, -0.0019701002165675163, 0.02446735091507435, 0.06546364724636078, -0.04134514555335045, 0.009838881902396679, 0.09303561598062515, 0.048865675926208496, -0.003906418569386005, -0.013631242327392101, 0.025963252410292625, 0.041383493691682816, 0.02097833901643753, -0.03506159782409668, 0.059659551829099655, 0.007005524821579456, -0.012322206050157547, -0.0010440966580063105, 0.038109902292490005, -0.022810272872447968, -0.007515663281083107, -0.04270022362470627, -0.07986333966255188, 0.07813534885644913, -0.029570424929261208, -0.011787845753133297, 0.023730501532554626, 0.09556879103183746, 0.014376334846019745, 0.02871408872306347, 0.0004422118654474616, -0.09739075601100922, 0.03424374759197235, -0.01705082505941391, 0.00550867198035121, 0.00834664423018694, -0.016559060662984848, 0.07769428193569183, 0.0008083325810730457, -0.004307285416871309, 0.03214350715279579, -0.047580886632204056, -0.07599599659442902, -0.04068732261657715, -0.00809338316321373, 0.061474546790122986, -0.05434223636984825, -0.04444793239235878, 0.03251330927014351, 0.0014266548678278923, 0.04622282460331917, -0.00465034693479538, -0.007880580611526966, -0.0422702357172966, -0.02285306341946125, -0.0642748549580574, 0.025108955800533295, 0.03168917074799538, 0.015238167718052864, -0.041804537177085876, 0.0004852383863180876, -0.0012778411619365215, -0.00046542915515601635, 0.0098819425329566, -0.012179991230368614, 0.08294764906167984, 0.023420987650752068, 0.021334100514650345, -0.02180708386003971, 0.04874477908015251, -0.06365294009447098, 0.004669807385653257, 0.0011319014010950923, -0.012529903091490269, -0.011262304149568081, 0.013154705986380577, 0.12528210878372192, 0.07044652104377747, -0.04322041943669319, -0.03750075399875641, 0.013786448165774345, 0.023152658715844154, -0.07139286398887634, 0.019180163741111755, -0.029270129278302193, -0.03911137580871582, 0.005591682158410549, -0.029408296570181847, -0.03503331542015076, 0.0026117702946066856, -0.041152261197566986, 0.007352779619395733, 0.06600562483072281, -0.0395745187997818, 0.05705075338482857, 0.01513889990746975, -0.04670128598809242, 0.017634788528084755, -0.01164131797850132, -0.060513246804475784, 0.007580770179629326, 0.024046171456575394, -0.006169229745864868, 0.03688669204711914, -0.06230051442980766, -0.022934405133128166, -0.02796097844839096, -0.033401407301425934, 0.03810557723045349, 0.036021094769239426, 0.05316814035177231, 0.0018882747972384095, 0.01783272810280323, -0.025561895221471786, 0.018979495391249657, -0.02532217837870121, -0.05019429698586464, -0.009196746163070202, -0.00243945955298841, 0.04939338192343712, 0.03774172440171242, 0.004528714809566736, 0.011604380793869495, -0.023054517805576324, -0.019442781805992126, 0.007778763305395842, 0.008427384309470654, 0.041938938200473785, -0.008256611414253712, -0.025411756709218025, -0.04384975507855415, -0.016783276572823524, 0.07520121335983276, -0.04788380116224289, -0.04270268976688385, -0.012268139980733395, -0.02630024589598179, -0.006740222219377756, -0.08855023980140686, -0.035317979753017426, 0.0019257002277299762, 0.024019481614232063, 0.058379195630550385, -0.0032168766483664513, 0.017677215859293938, 0.05058873072266579, 0.02169596403837204, -0.0081472871825099, 0.014849907718598843, -0.02285030670464039, 0.032299354672431946, -0.003599965013563633, 0.012450573965907097, 0.03725116327404976, 0.02399727702140808, 0.00028612572350539267, -0.03264303877949715, 0.014333732426166534, -0.03240867704153061, -0.25861623883247375, 0.023544207215309143, 0.000047097961214603856, -0.0029008963610976934, 0.018740035593509674, -0.022148720920085907, -0.009655705653131008, -0.04847821220755577, -0.011685357429087162, 0.008338864892721176, -0.028012137860059738, -0.023601101711392403, -0.029505139216780663, 0.05235679820179939, 0.006968003697693348, -0.009106000885367393, 0.0054528918117284775, -0.02451382949948311, -0.002715835114941001, 0.053264059126377106, 0.0018208447145298123, -0.06985829770565033, 0.011105241253972054, 0.05041104182600975, 0.013247169554233551, 0.035725176334381104, -0.08373419940471649, 0.01998469978570938, -0.04734001308679581, -0.029180631041526794, 0.0030664873775094748, -0.01862265169620514, -0.0369572713971138, -0.011340419761836529, -0.020079251378774643, 0.0035622548311948776, 0.024801891297101974, -0.012441618368029594, -0.01338560413569212, 0.004262440837919712, -0.029565569013357162, -0.019559696316719055, -0.0028830301016569138, -0.0012119414750486612, 0.0740513727068901, 0.0062188818119466305, -0.07417819648981094, -0.005407980643212795, -0.04272685572504997, 0.08359851688146591, -0.050213493406772614, -0.056892912834882736, 0.0013708720216527581, 0.058602478355169296, 0.011228319257497787, -0.019287873059511185, -0.01013015117496252, 0.007184743881225586, -0.017871664837002754, -0.04067317396402359, -0.009324629791080952, -0.04298056289553642, -0.025492213666439056, -0.03955888748168945, -0.009389261715114117, -0.054151855409145355, -0.06028371676802635, -0.03737002611160278, 0.06217470392584801, 0.0591428205370903, -0.06266296654939651, -0.03562350571155548, -0.027789240702986717, -0.10079940408468246, 0.01885254681110382, -0.026425395160913467, -0.022748775780200958, -0.04974987730383873, 0.00308213965035975, 0.051779650151729584, -0.015638142824172974, -0.060832735151052475, 0.03940790519118309, -0.008337320759892464, -0.005137196741998196, -0.014241893775761127, 0.004930281545966864, -0.017993180081248283, 0.0004133476468268782, -0.01856117695569992, 0.04940817505121231, -0.020199136808514595, -0.019432270899415016, -0.020483745262026787, -0.027782954275608063, 0.008727338165044785, 0.038310591131448746, 0.02238474041223526, 0.03163931891322136, 0.01636410318315029, -0.000972570909652859, -0.05791790783405304, -0.00949353352189064, -0.01426821481436491, -0.012601166032254696, -0.018417520448565483, -0.06456012278795242, -0.005430690478533506, 0.02552860975265503, -0.010551458224654198, -0.02710963785648346, -0.041464030742645264, 0.02532818168401718, -0.047799669206142426, -0.016882646828889847, -0.018353097140789032, 0.030269136652350426, 0.01602165587246418, 0.020084602758288383, 0.0032081427052617073, -0.051383618265390396, 0.026535097509622574, -0.013981492258608341, -0.003356724511831999, -0.04273751378059387, -0.024151787161827087, 0.017428604885935783, -0.02157106064260006, 0.014775421470403671, 0.01624455489218235, 0.0055570886470377445, 0.023727908730506897, 0.017936794087290764, -0.045988600701093674, 0.03676483407616615, -0.0422808974981308, -0.03514770790934563, 0.013909382745623589, 0.0043259174562990665, -0.006396169774234295, 0.010942001827061176, -0.01891407184302807, 0.020426688715815544, 0.021964436396956444, 0.08218581229448318, 0.016458751633763313, 0.02365250326693058, 0.0042518433183431625, -0.0104701342061162, 0.06486149877309799, 0.019617363810539246, -0.01881418377161026, 0.023814935237169266, -0.028158491477370262, -0.043135423213243484, -0.021292274817824364, 0.014348326250910759, 0.007427833043038845, 0.008886140771210194, -0.043146129697561264, 0.030174309387803078, -0.03418482467532158, -0.015862587839365005, -0.003291716333478689, -0.018894273787736893, 0.03809212148189545, 0.007740481290966272, 0.023257875815033913, -0.014177395962178707, -0.007519553415477276, 0.012591595761477947, 0.03294367715716362, -0.032128289341926575, 0.026388751342892647, 0.011575404554605484, 0.004211686085909605, 0.010275965556502342, 0.027874033898115158, 0.02395821362733841, 0.005644302815198898, 0.017448538914322853, -0.029164984822273254, 0.028934653848409653, 0.011732328683137894, 0.043553564697504044, 0.011144834570586681, -0.027563193812966347, -0.02955874800682068, -0.020879771560430527, -0.040450531989336014, -0.043019626289606094, -0.00015229335986077785, -0.009654553607106209, -0.014251447282731533, -0.028209464624524117, -0.09464511275291443, -0.005563769489526749, 0.059042494744062424, 0.026282506063580513, -0.03051740862429142, -0.03911279886960983, -0.0026390342973172665, -0.04265587404370308, 0.035109661519527435, 0.0640394389629364, -0.056858744472265244, 0.01649857871234417, 0.017165936529636383, -0.01338711753487587, -0.000251348945312202, 0.03318789601325989, -0.041422344744205475, -0.040715597569942474, -0.002828959608450532, -0.009060289710760117, 0.017108790576457977, 0.0013256127713248134, -0.020967859774827957, 0.013730280101299286, -0.007432928774505854, -0.025289881974458694, 0.0060030375607311726, -0.0019944515079259872, -0.01348888035863638, -0.016170833259820938, -0.009304731152951717, -0.0031309796031564474, 0.0035757552832365036, 0.03850782662630081, -0.0036802312824875116, 0.04880967363715172, -0.02441837079823017, 0.05475194379687309, 0.04203401505947113, 0.005980504211038351, -0.031140346080064774, -0.05485094338655472, -0.011667256243526936, 0.01761164516210556, 0.04730403795838356, 0.002856477629393339, 0.01577218435704708, -0.02893260307610035, 0.005217243917286396, -0.029652690514922142, 0.029168227687478065, -0.00297147105447948, -0.019785767421126366, 0.015773765742778778, 0.05462520569562912, -0.0057838074862957, 0.04027348756790161, 0.001933493884280324, -0.01893320493400097, 0.03853590041399002, -0.03699365258216858, -0.047891177237033844, 0.012319864705204964, -0.03463925048708916, 0.04412301257252693, 0.0049766781739890575, 0.029528716579079628, -0.03943389281630516, 0.061588089913129807, 0.028008708730340004, 0.011362483724951744, 0.03508426994085312, -0.002935627708211541, 0.02481844648718834, -0.017808206379413605, 0.005339302588254213, -0.08884996175765991, -0.010404313914477825, 0.029472604393959045, -0.015880737453699112, -0.043236177414655685, 0.012177472934126854, -0.03991123288869858, 0.024409305304288864, -0.06739509850740433, -0.02473248913884163, 0.05966651439666748, 0.030390562489628792, 0.016664346680045128, 0.010451841168105602, -0.05278673395514488, 0.037360794842243195, 0.0206588301807642, -0.016935385763645172, -0.02142699994146824, 0.007449697703123093, 0.052565205842256546, -0.007547877263277769, 0.03324948623776436, 0.0059985388070344925, 0.03274436667561531, 0.05956505984067917, 0.014015835709869862, 0.010992186143994331, 0.03719167411327362, -0.010316259227693081, 0.07110020518302917, 0.03953887149691582, 0.0012184625957161188, 0.019758542999625206, 0.036201827228069305, 0.00290670501999557, -0.07587272673845291, 0.024651285260915756, 0.03584805130958557, 0.011445928364992142, -0.08255666494369507, 0.046488258987665176, 0.00811889860779047, -0.00495771411806345, -0.04045644775032997, 0.013070669025182724, -0.04589039087295532, 0.025348875671625137, -0.05092154070734978, -0.01828625425696373, -0.03619112819433212, 0.07567691057920456, -0.0021140205208212137, -0.03016389161348343, 0.0763816088438034, -0.0016815152484923601, 0.01997354067862034, 0.008562077768146992, 0.056537777185440063, 0.06138978898525238, 0.03587593138217926, 0.016691962257027626, 0.059001073241233826, -0.03949955850839615, -0.04016069322824478, 0.0013206441653892398, -0.031422294676303864, -0.030922820791602135, -0.02737090177834034, 0.038504913449287415, 0.09055900573730469, 0.03430229052901268, 0.07611776143312454, -0.035585153847932816, 0.022973446175456047, -0.03497284650802612, -0.0005151562509126961, 0.004430440720170736, 0.04503477364778519, 0.008243477903306484, 0.008145822212100029, -0.011306536383926868, -0.0049354624934494495, 0.01594458520412445, -0.009036809206008911, -0.001513957162387669, 0.018613848835229874, 0.002173694549128413, 0.01820511743426323, 0.011087318882346153, 0.02911580167710781, 0.06559590250253677, -0.0066480920650064945, -0.029132414609193802, 0.013689531944692135, 0.03341042622923851, 0.034043144434690475, 0.008030949160456657, -0.020655272528529167, -0.01968875713646412, -0.019166098907589912, -0.0025041322223842144, 0.012369461357593536, -0.04891533404588699, -0.030745698139071465, 0.05742159113287926, -0.03410116583108902, -0.029025711119174957, 0.038758523762226105, -0.012684674002230167, -0.07218433916568756, -0.041755907237529755, -0.05887370556592941, -0.02604183368384838, -0.08693845570087433, -0.0285933967679739, -0.009551418013870716, -0.031085338443517685, -0.05375765264034271, -0.06230895221233368, 0.0005005344864912331, -0.011069467291235924, -0.010840140283107758, -0.03573407605290413, -0.03706430643796921, 0.020571833476424217, 0.024013742804527283, 0.010376735590398312, -0.010785764083266258, 0.0675000324845314, 0.017189808189868927, -0.05383817106485367, -0.012249298393726349, -0.022745197638869286, 0.028742017224431038, -0.006268847733736038, 0.025191597640514374, -0.08502891659736633, 0.028199506923556328, 0.014641092158854008, 0.003027532482519746, -0.07716578245162964, 0.020318113267421722, 0.07145469635725021, 0.0002859224914573133, 0.04637806490063667, -0.009980416856706142, 0.009249464608728886, -0.032769057899713516, -0.012930378317832947, -0.012303565628826618, 0.03428194299340248, 0.036600224673748016, -0.024708518758416176, 0.06396272033452988, 0.03612682595849037, 0.012499806471168995, 0.014122317545115948, -0.007324972655624151, -0.03013591840863228, -0.008821173571050167, -0.06956950575113297, 0.007558581419289112, -0.03982949256896973, -0.06495083123445511, -0.021252930164337158, 0.022147124633193016, -0.04148285090923309, -0.02650102786719799, -0.010076303035020828, 0.024633413180708885, -0.011697350069880486, 0.06179414689540863, -0.040071941912174225, -0.002492740983143449, -0.02404971607029438, -0.022050470113754272, -0.006683811079710722, 0.039937399327754974, 0.017841901630163193, -0.015130933374166489, 0.024396078661084175, -0.03801805526018143, -0.0058120605535805225, -0.032545071095228195, 0.02919129841029644, 0.05146723985671997, -0.008106966502964497, 0.02799820341169834 ]
[ -0.07149386405944824, 0.005139652173966169, 0.002826013369485736, -0.0313604436814785, -0.0052877916023135185, -0.02475079335272312, -0.02983827143907547, 0.023831838741898537, -0.013095509260892868, -0.0045998916029930115, -0.021174434572458267, -0.05582111328840256, 0.03251731023192406, -0.04640965163707733, 0.05799613893032074, 0.004285336472094059, -0.024521522223949432, -0.0066074347123503685, -0.02252507023513317, 0.003597160568460822, 0.03037833608686924, -0.003683860180899501, -0.02543697878718376, -0.0649578645825386, -0.012236211448907852, 0.1090431734919548, 0.038198065012693405, -0.01860181614756584, 0.03657633066177368, -0.2181399166584015, -0.02209348976612091, -0.0177592970430851, 0.052437033504247665, -0.03427838161587715, 0.04380880668759346, -0.018775608390569687, -0.006063173990696669, 0.017499316483736038, -0.0062977587804198265, 0.05823624134063721, 0.053287994116544724, 0.026815097779035568, -0.05806306377053261, -0.017844339832663536, 0.08130251616239548, -0.03993621841073036, -0.017454523593187332, -0.018511183559894562, -0.03748686611652374, -0.025921186432242393, 0.010748733766376972, 0.012235825881361961, -0.00670078257098794, 0.009292279370129108, -0.026168014854192734, 0.02619008906185627, 0.03729044273495674, 0.04714411124587059, 0.021057631820440292, 0.03925463184714317, -0.030582772567868233, 0.02400054968893528, -0.10017173737287521, 0.10972867161035538, -0.04345231130719185, 0.04991776496171951, -0.0012187371030449867, -0.008329581469297409, 0.008552193641662598, 0.07506008446216583, -0.006531639490276575, -0.03953385725617409, -0.01820169948041439, 0.05622261390089989, 0.034294698387384415, -0.042040321975946426, 0.027805538848042488, 0.006396173499524593, 0.040651559829711914, -0.06674323976039886, -0.059089500457048416, 0.028642000630497932, 0.020176447927951813, -0.002237479668110609, 0.011167271062731743, 0.007725049275904894, -0.003560952842235565, 0.05222322419285774, 0.018190596252679825, 0.050183914601802826, 0.012974951416254044, -0.06873184442520142, 0.07574711740016937, 0.014040792360901833, -0.10698916763067245, -0.03891224414110184, 0.003078946378082037, 0.0004872304270975292, -0.02920433133840561, 0.4010143578052521, -0.0737597867846489, -0.011059097945690155, 0.0027143852785229683, 0.05401602387428284, -0.006451256573200226, -0.03848699480295181, 0.01126094814389944, -0.009436707943677902, -0.030253710225224495, -0.05235838145017624, -0.021320246160030365, -0.05510293319821358, 0.11287670582532883, -0.07104656100273132, -0.02947644516825676, -0.011898297816514969, -0.007892508991062641, 0.021322382614016533, -0.005227033980190754, 0.02860739640891552, -0.0015678454656153917, -0.019583789631724358, 0.05149618163704872, 0.0005756915779784322, 0.04759086295962334, 0.0553164929151535, 0.014205041341483593, 0.06576947867870331, 0.06182538717985153, 0.05775149539113045, -0.025221049785614014, 0.0020100970286875963, -0.023016152903437614, 0.02001778595149517, -0.024999361485242844, 0.07822372764348984, -0.017274636775255203, -0.025836559012532234, 0.03229384496808052, -0.03255687654018402, 0.0007146763382479548, -0.0044290125370025635, 0.02929438091814518, 0.007646616082638502, -0.060650814324617386, 0.055637285113334656, -0.029360327869653702, 0.028075845912098885, -0.05630376935005188, -0.016972053796052933, 0.02680249884724617, 0.051233720034360886, -0.010598603636026382, -0.006537332199513912, -0.007435931358486414, 0.05629260838031769, 0.07504536211490631, 0.0030451796483248472, -0.062402550131082535, -0.01413443312048912, -0.035582978278398514, -0.000025543022275087424, 0.006102511193603277, 0.03544938936829567, -0.0034329560585319996, -0.0733005702495575, -0.02580021508038044, 0.031041156500577927, -0.007870126515626907, -0.11304395645856857, 0.004616420250386, 0.03038657456636429, -0.04116722568869591, 0.037981677800416946, 0.01604819856584072, -0.02327725663781166, -0.03921164199709892, -0.009576279670000076, 0.0763644352555275, 0.04985158145427704, 0.019544340670108795, 0.006923883222043514, -0.04694616422057152, 0.016415191814303398, -0.026791684329509735, -0.10069065541028976, -0.042295221239328384, -0.0368630550801754, 0.03234159201383591, -0.024548441171646118, 0.007556203752756119, -0.04870687797665596, -0.023947665467858315, 0.03950485214591026, -0.034752197563648224, -0.001220598816871643, 0.007163042202591896, -0.02702406235039234, 0.0046050590462982655, -0.01374879851937294, 0.04710701107978821, 0.04833146557211876, 0.021975934505462646, 0.002325893845409155, -0.05343733727931976, 0.016791678965091705, 0.021612120792269707, -0.01371449138969183, 0.06884463876485825, -0.014548157341778278, -0.06254402548074722, 0.0170182716101408, 0.003570857923477888, 0.013317488133907318, 0.038444310426712036, -0.06149342656135559, 0.0002853194309864193, 0.003510735696181655, 0.019494393840432167, -0.018262647092342377, -0.04203800484538078, -0.08059977740049362, -0.07193039357662201, -0.34217798709869385, -0.038748450577259064, 0.015022031031548977, -0.026728227734565735, -0.022228658199310303, -0.107451431453228, 0.031204530969262123, 0.012782212346792221, -0.009069075807929039, 0.02900729700922966, 0.07007889449596405, 0.024501057341694832, 0.004857013467699289, -0.11655017733573914, 0.0029107769951224327, 0.027090607210993767, -0.008917787112295628, -0.07957442104816437, -0.04595117270946503, 0.011247674003243446, 0.009704628959298134, -0.02569405362010002, 0.0028876299038529396, -0.005691263824701309, 0.026726549491286278, -0.015785008668899536, 0.08165741711854935, 0.02178349159657955, 0.05036795511841774, -0.045631732791662216, 0.07116220146417618, 0.05355207994580269, 0.01894000731408596, -0.08799003809690475, -0.005327148828655481, -0.052029017359018326, -0.007880707271397114, 0.01103657390922308, 0.06176566332578659, -0.00605763727799058, -0.010418790392577648, 0.0315517820417881, -0.0073961541056632996, -0.015822747722268105, 0.014681750908493996, 0.02203804813325405, 0.014665019698441029, -0.0559532567858696, -0.042683426290750504, 0.0566982738673687, 0.008058187551796436, 0.0009310023742727935, 0.008128759451210499, 0.015298694372177124, -0.041472066193819046, -0.004414807539433241, -0.037606097757816315, -0.06859783828258514, -0.012626877054572105, -0.017667749896645546, 0.0586453415453434, -0.014973722398281097, 0.05281544476747513, -0.06714823096990585, 0.02010599710047245, -0.01522570289671421, -0.030518298968672752, -0.03716741502285004, 0.06447931379079819, -0.03134795278310776, -0.022490736097097397, 0.09633611142635345, -0.027923939749598503, 0.026038581505417824, 0.036627769470214844, 0.02976617030799389, 0.05089276656508446, 0.04771248251199722, 0.0016116338083520532, 0.003170232055708766, 0.01724592037498951, 0.020993391051888466, 0.025105416774749756, -0.08734709024429321, 0.009036640636622906, -0.0030413561034947634, -0.01969679445028305, -0.010282537899911404, 0.03753790259361267, 0.008199065923690796, -0.046852532774209976, -0.02211758680641651, 0.015614217147231102, 0.011527474969625473, 0.07893681526184082, -0.0051825447008013725, -0.21245421469211578, -0.006473314017057419, 0.09065280109643936, 0.019601406529545784, -0.00399846350774169, 0.006773443892598152, 0.023487497121095657, -0.10364037752151489, -0.022972354665398598, -0.040122661739587784, 0.056974515318870544, -0.007538092788308859, 0.034281130880117416, -0.027916643768548965, 0.010590929538011551, 0.03094182349741459, 0.04306121543049812, -0.03418693691492081, -0.012076263315975666, -0.03330643102526665, 0.021198175847530365, -0.05094527453184128, 0.1446884125471115, -0.008896270766854286, 0.02703241817653179, -0.04367221146821976, 0.03835279867053032, -0.032130565494298935, 0.052824970334768295, 0.011140190996229649, 0.06089259311556816, 0.03557507321238518, 0.0598524734377861, -0.004603398963809013, 0.011126304045319557, 0.010935246013104916, 0.017439991235733032, 0.017673078924417496, 0.02003750391304493, -0.03951623663306236, 0.05494280159473419, 0.03679056838154793, -0.06795191764831543, 0.015091336332261562, -0.001924495561979711, 0.014942755922675133, 0.0017609576461836696, 0.015355825424194336, -0.007864662446081638, -0.0027765464037656784, 0.007184476125985384, -0.04509638994932175, -0.01602218672633171, -0.0019449361134320498, -0.02284269966185093, 0.04516201093792915, 0.000052705989219248295, -0.0018401786219328642, -0.004178047180175781, 0.025831105187535286, 0.027376988902688026, -0.05209708213806152, 0.10625601559877396, 0.06224054843187332, 0.038618944585323334 ]
[ -0.02231246791779995, 0.019902579486370087, -0.014699080027639866, -0.00751158082857728, 0.011811353266239166, 0.028047891333699226, 0.0042497883550822735, 0.05209166556596756, -0.04912635684013367, -0.026098541915416718, -0.028047028928995132, -0.010795080102980137, 0.024278782308101654, -0.009670914150774479, 0.03098234347999096, -0.0033155828714370728, 0.01258831936866045, -0.01915883459150791, 0.031693849712610245, -0.016276191920042038, -0.02338678203523159, 0.02847653068602085, 0.01541465800255537, -0.005440607201308012, -0.009453650563955307, 0.007829349488019943, -0.06945120543241501, 0.010313861072063446, 0.037385109812021255, -0.14476990699768066, 0.010773304849863052, -0.009512347169220448, 0.02408064529299736, -0.0034735391382128, -0.0013329912908375263, 0.03979983553290367, 0.0023438362404704094, -0.02951759099960327, -0.04859336093068123, 0.015800034627318382, 0.015553063713014126, 0.020808137953281403, -0.027635257691144943, 0.02326073683798313, -0.020646551623940468, -0.03801843151450157, 0.011850204318761826, -0.02175949141383171, -0.02281412109732628, -0.03016732446849346, -0.022290024906396866, 0.010082950815558434, -0.02138233557343483, -0.009108626283705235, -0.014288447797298431, 0.024906326085329056, -0.0009425694006495178, -0.01720217615365982, 0.033914964646101, -0.008972177281975746, -0.026159632951021194, -0.00001573536792420782, 0.0014786532847210765, -0.025688936933875084, -0.012928374111652374, 0.0007177831721492112, 0.013307793997228146, -0.01295209676027298, 0.007665031123906374, 0.006241561379283667, -0.00450942711904645, 0.010516071692109108, -0.06291411817073822, 0.00835395697504282, -0.00993378646671772, -0.0018295650370419025, 0.03957490622997284, -0.014987552538514137, -0.0008630299125798047, -0.007600756362080574, -0.03232928365468979, -0.0022069266997277737, 0.03158535435795784, 0.007022324949502945, 0.03427110239863396, -0.011669863946735859, -0.03343009203672409, 0.0012728897854685783, -0.012007330544292927, -0.004127897787839174, -0.006608912721276283, 0.003209758549928665, -0.012975688092410564, 0.044183023273944855, -0.0731625184416771, -0.005422903690487146, 0.019954266026616096, -0.012857205234467983, -0.033012755215168, 0.8502880930900574, -0.021676557138562202, 0.01557380985468626, 0.020596731454133987, -0.004294900689274073, 0.0035984255373477936, -0.0175442174077034, 0.003992743324488401, -0.007007539737969637, -0.016018029302358627, -0.06120704859495163, -0.0006875087856315076, -0.0380990132689476, 0.02775459550321102, 0.00769332330673933, 0.021176744252443314, 0.004088795278221369, 0.033922307193279266, 0.010788632556796074, 0.033255141228437424, 0.04724181443452835, 0.015004870481789112, -0.0015995593275874853, 0.029909616336226463, -0.005590885411947966, -0.014820844866335392, -0.20046739280223846, -0.003379751928150654, -6.981165440617561e-33, 0.03182632103562355, -0.035042960196733475, 0.0030999977607280016, 0.012874708510935307, 0.0235381331294775, 0.013238517567515373, 0.008060428313910961, 0.040871862322092056, -0.014173470437526703, -0.037739016115665436, 0.040308158844709396, 0.006626043003052473, -0.01571567915380001, 0.01268967054784298, 0.02767980843782425, 0.0060116141103208065, -0.01634792611002922, 0.04260653257369995, -0.006280970294028521, 0.01560336071997881, 0.004534013103693724, 0.03081698715686798, 0.03213691711425781, -0.01197220478206873, -0.018551655113697052, 0.03323590010404587, 0.02613716386258602, 0.011034050956368446, -0.004899896681308746, -0.038592737168073654, -0.03867620602250099, -0.008698325604200363, 0.014026282355189323, -0.030487285926938057, 0.018480243161320686, -0.04692656174302101, -0.02575634978711605, 0.0108262337744236, -0.053448114544153214, -0.024472059682011604, -0.008649549447000027, -0.008986004628241062, -0.04199373349547386, -0.013776982203125954, -0.021870562806725502, -0.013467169366776943, -0.019016435369849205, 0.044152215123176575, 0.013701575808227062, 0.017624247819185257, 0.03345959633588791, 0.03721362352371216, -0.020221460610628128, 0.013781312853097916, 0.0037628598511219025, -0.021113358438014984, -0.014284123666584492, 0.035636045038700104, 0.004597293678671122, -0.01941359043121338, 0.003721623681485653, -0.017667902633547783, -0.005684553645551205, 0.03340955451130867, 0.018745437264442444, -0.03323173522949219, -0.007475515827536583, 0.003337498987093568, 0.006684023421257734, -0.010727218352258205, -0.01434878446161747, 0.011318742297589779, -0.009676137007772923, -0.0075254798866808414, 0.0127674899995327, -0.005305692087858915, -0.0001700706488918513, -0.032233335077762604, 0.003869669046252966, 0.049568742513656616, 0.023059247061610222, -0.03028860129415989, 0.005323873367160559, -0.028880316764116287, -0.016945408657193184, -0.05353410542011261, 0.07523255050182343, -0.01669709011912346, -0.0130018200725317, 0.0015303026884794235, 0.017096668481826782, 0.02087714709341526, 0.031004926189780235, -0.016748035326600075, -0.021271638572216034, 6.871698263881205e-33, -0.00023099531244952232, 0.033318523317575455, -0.03204654902219772, 0.018524497747421265, 0.003467333037406206, 0.004884674679487944, 0.04765631631016731, 0.022906087338924408, -0.018898658454418182, 0.01901671104133129, -0.018252167850732803, 0.0036292457953095436, -0.014696978963911533, -0.0025494720321148634, 0.04213084280490875, -0.002801831578835845, -0.0005535281961783767, 0.005151191260665655, 0.027504295110702515, -0.0067991213873028755, -0.018310928717255592, -0.0003891836095135659, 0.011468890123069286, 0.0477532260119915, 0.012572327628731728, 0.05898960679769516, -0.02356169931590557, -0.005093961022794247, -0.03544878587126732, -0.008188847452402115, 0.010145026259124279, 0.009833266958594322, -0.0009488584473729134, 0.02041707932949066, -0.008721652440726757, 0.02116238884627819, 0.017498547211289406, 0.006704747676849365, 0.021358871832489967, -0.024145685136318207, 0.06443094462156296, 0.025452611967921257, -0.012173552066087723, 0.0033556250855326653, -0.005432498641312122, -0.0031468675006181, -0.015437387861311436, -0.014121172949671745, 0.013022205792367458, 0.034777261316776276, -0.01003262959420681, 0.015548309311270714, 0.026598040014505386, 0.011363492347300053, 0.008295435458421707, -0.008174989372491837, -0.007852551527321339, 0.03844660148024559, -0.02878676913678646, -0.002345263957977295, -0.017989417538046837, -0.016450582072138786, -0.0032957845833152533, -0.009598306380212307, -0.018066953867673874, -0.03020779974758625, -0.05205825716257095, -0.005477797705680132, 0.012803744524717331, 0.01883608289062977, -0.0007502703228965402, 0.00990484282374382, -0.012789323925971985, 0.036910805851221085, -0.011366257444024086, 0.026524724438786507, 0.030057430267333984, -0.004659667145460844, -0.027756184339523315, -0.010399434715509415, 0.011616230010986328, -0.010319775901734829, 0.025899851694703102, -0.006691598799079657, -0.023371946066617966, -0.01199320238083601, -0.03125053271651268, 0.011465718038380146, 0.04333946108818054, -0.00285827973857522, -0.009922250173985958, -0.012771088629961014, -0.018642086535692215, 0.014622204005718231, 0.04740995541214943, -1.2643647018251158e-8, -0.005565309431403875, -0.016725828871130943, -0.02653987891972065, 0.026648372411727905, 0.007966066710650921, -0.006412171758711338, -0.0334530845284462, -0.023718785494565964, -0.002061818726360798, 0.0014479708625003695, 0.03135570138692856, -0.014843367040157318, 0.015146332792937756, 0.022924840450286865, 0.04284149780869484, 0.005820640828460455, 0.015480916947126389, 0.00948421098291874, 0.027583660557866096, -0.009806741960346699, -0.021149836480617523, 0.03440164774656296, 0.03524461016058922, 0.010812916792929173, -0.046503547579050064, -0.02109650708734989, 0.012888336554169655, -0.06959312409162521, -0.016254205256700516, 0.03917339816689491, 0.009545381180942059, -0.03800566866993904, -0.05289623141288757, -0.015630340203642845, -0.010532055050134659, -0.008548108860850334, 0.01997249945998192, -0.026845009997487068, 0.008960952050983906, -0.00700231920927763, -0.013440080918371677, -0.018942272290587425, -0.002618234371766448, -0.03372875601053238, 0.009955763816833496, -0.046518608927726746, -0.014249761588871479, 0.02758377604186535, 0.023409409448504448, -0.002555923303589225, 0.02484414540231228, -0.008159805089235306, -0.03597046807408333, 0.011206342838704586, 0.012246686033904552, 0.002385991858318448, -0.008466523140668869, 0.016618216410279274, -0.01792476326227188, -0.011416626162827015, -0.021589934825897217, 0.028015628457069397, 0.0016921075293794274, -0.0077574774622917175 ]
python-typeerrr-instance-class-check-runtime-checkable
https://markhneedham.com/blog/2023/08/21/python-typeerrr-instance-class-check-runtime-checkable
false
2023-08-23 00:44:37
pyarrow: pyarrow.lib.ArrowNotImplementedError: Filter argument must be boolean type
[ "python", "pyarrow", "til" ]
[ "TIL" ]
:icons: font I wanted to filter a table in pyarrow table recently and ran into troubles when trying to use the filter syntax that I'm used to from DuckDB. In this blog post I'll explain my mistake and how to fix it. First, let's install `pyarrow`: [source, bash] ---- pip install pyarrow ---- And now we're going to create a table that has a few countries and their corresponding continents: [source, python] ---- import pyarrow as pa countries = pa.Table.from_arrays( [ pa.array(['India', 'Pakistan', 'Belgium', 'Finland'], pa.string()), pa.array(['Asia', 'Asia', 'Europe', 'Europe'], pa.string()) ], names=['Country', 'Continent'] ) ---- Let's say we want to find just the rows where the continent is Europe. I initially tried to do that using the following syntax: [source, python] ---- countries.filter("Continent = 'Europe'") ---- .Output [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pyarrow/table.pxi", line 3154, in pyarrow.lib.Table.filter File "/Users/markhneedham/Library/Caches/pypoetry/virtualenvs/ch07-YVG4Qrie-py3.11/lib/python3.11/site-packages/pyarrow/compute.py", line 259, in wrapper return func.call(args, options, memory_pool) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "pyarrow/_compute.pyx", line 367, in pyarrow._compute.Function.call File "pyarrow/error.pxi", line 144, in pyarrow.lib.pyarrow_internal_check_status File "pyarrow/error.pxi", line 121, in pyarrow.lib.check_status pyarrow.lib.ArrowNotImplementedError: Filter argument must be boolean type ---- Hmmm, that didn't work so well. Instead we need to construct a filter predicate using some functions from the `pyarrow.compute` module, so let's import that: [source, python] ---- import pyarrow.compute as pc ---- And now we have (at least) two ways to write the filtering statement. We could use `pc.equal` like this: [source, python] ---- countries.filter(pc.equal(countries["Continent"], "Europe")) ---- Or `pc.field` like this: [source, python] ---- countries.filter(pc.field("Continent") == "Europe") ---- Either way we get the same result: .Output [source, text] ----- pyarrow.Table Country: string Continent: string ---- Country: [["Belgium","Finland"]] Continent: [["Europe","Europe"]] -----
In this post, we'll learn how to filter columns using Apache Arrow in Python.
uploads/2023/08/arrow-filter-banner.png
[ 0.0017780890921130776, 0.033219244331121445, -0.00405872194096446, 0.0014553782530128956, 0.06877757608890533, 0.03957703709602356, -0.012486053630709648, 0.01630976051092148, -0.01786520518362522, -0.026554664596915245, -0.016875045374035835, -0.03230202943086624, -0.08295828849077225, 0.024550892412662506, 0.00380576029419899, 0.08482275158166885, 0.07743799686431885, 0.015807650983333588, 0.025037167593836784, -0.023004673421382904, 0.034723054617643356, 0.06991588324308395, -0.010008295066654682, 0.053520992398262024, 0.021546225994825363, 0.0251933466643095, 0.036601658910512924, 0.010106204077601433, -0.054894063621759415, -0.005073921289294958, 0.04453166574239731, 0.0023353402502834797, 0.006225407123565674, -0.013313548639416695, 0.01901140995323658, 0.010690639726817608, -0.01490852888673544, 0.013628916814923286, -0.0034731896594166756, 0.03497331961989403, -0.06950923055410385, 0.021682584658265114, -0.0012425452005118132, 0.040122732520103455, -0.020041832700371742, 0.029191365465521812, -0.045560166239738464, 0.02551940083503723, 0.012383573688566685, 0.033854007720947266, -0.043848324567079544, 0.0361674502491951, -0.01183589268475771, -0.05234834924340248, -0.005790438037365675, 0.03355064243078232, 0.0040851193480193615, -0.0726473331451416, 0.035779744386672974, -0.032845351845026016, 0.008660291321575642, 0.006132056936621666, 0.004139831755310297, 0.037863779813051224, 0.010779478587210178, -0.0018804280553013086, -0.008778972551226616, 0.043936312198638916, -0.054520830512046814, -0.0018353639170527458, -0.011215366423130035, -0.017895836383104324, -0.053943097591400146, -0.0013875876320526004, 0.034687306731939316, -0.006101483013480902, -0.0343652069568634, 0.04348060488700867, 0.010434620082378387, 0.07180947810411453, 0.00809783861041069, -0.0033262991346418858, 0.025416824966669083, 0.04042108356952667, 0.024975094944238663, -0.08240978419780731, -0.0480189211666584, -0.021682772785425186, -0.04624427109956741, 0.04099949821829796, 0.01739870384335518, -0.027783818542957306, 0.032273806631565094, -0.007346040103584528, -0.037923891097307205, -0.025075742974877357, -0.012869464233517647, -0.020284339785575867, 0.016200225800275803, 0.026895422488451004, -0.05555460974574089, -0.05588116869330406, 0.03239063173532486, 0.026908863335847855, -0.08180894702672958, 0.024348178878426552, -0.0415547639131546, -0.001852134126238525, 0.029227232560515404, 0.0342981293797493, -0.0028061848133802414, -0.020554469898343086, 0.01461225189268589, -0.023732513189315796, -0.05539405345916748, 0.09081325680017471, 0.012499482370913029, -0.03371352702379227, -0.007098337169736624, 0.04341473802924156, 0.03922833129763603, 0.039987314492464066, -0.015529894270002842, 0.07935818284749985, -0.008937988430261612, 0.011850995942950249, 0.01201871782541275, 0.058946944773197174, 0.01407796423882246, -0.05829469487071037, -0.011634337715804577, 0.03874941170215607, 0.0217707771807909, 0.008772932924330235, -0.012117237783968449, -0.008255735039710999, -0.0037230465095490217, 0.0023574959486722946, 0.09231889247894287, 0.007016769610345364, 0.015762856230139732, -0.03778059035539627, -0.004513341002166271, -0.0019840507302433252, 0.051006950438022614, 0.018653297796845436, 0.020185792818665504, -0.04707641154527664, -0.027584867551922798, 0.007917514070868492, 0.022934405133128166, 0.03126192092895508, 0.07196810841560364, -0.00727830920368433, -0.0016782402526587248, 0.05742030218243599, 0.03259000554680824, 0.026526132598519325, -0.028191102668642998, -0.005069982260465622, 0.023886788636446, 0.04917073994874954, 0.0003749789611902088, 0.030175335705280304, -0.014713194221258163, -0.010297312401235104, 0.01449813973158598, 0.03165953606367111, -0.027907278388738632, 0.005513585638254881, -0.055759068578481674, -0.06916342675685883, 0.08011126518249512, -0.028873931616544724, 0.0067917522974312305, 0.018270036205649376, 0.08319766074419022, 0.02697656862437725, 0.035101208835840225, 0.013724777847528458, -0.08354365080595016, 0.03872111439704895, -0.046934839338064194, 0.033930692821741104, 0.023704346269369125, -0.00027280315407551825, 0.11046969890594482, 0.0020889402367174625, 0.03096928633749485, 0.0557185523211956, -0.08081494271755219, -0.05788305774331093, -0.05458822101354599, -0.0016964419046416879, 0.052510522305965424, -0.03410346060991287, -0.022411121055483818, 0.030131259933114052, 0.03129586949944496, 0.05510382726788521, -0.02021598070859909, -0.007683759089559317, 0.029353810474276543, -0.05752132087945938, -0.07737763226032257, 0.002518364693969488, 0.03070148266851902, 0.0006872902740724385, -0.0023400525096803904, 0.0251656211912632, -0.014712994918227196, -0.01745448261499405, 0.029063569381833076, -0.01772724650800228, 0.051994696259498596, 0.006367586553096771, 0.024864161387085915, -0.029184330254793167, 0.016743307933211327, -0.06124704331159592, 0.023175831884145737, -0.0006168964318931103, 0.0003379157278686762, -0.022402891889214516, 0.011526648886501789, 0.12962494790554047, 0.052121590822935104, 0.0005431570461951196, -0.044564373791217804, 0.0041272323578596115, -0.0063940780237317085, -0.031692709773778915, 0.035227805376052856, -0.059849027544260025, -0.019721191376447678, -0.007336621638387442, -0.04770643636584282, -0.0301644466817379, 0.0020439699292182922, -0.018616752699017525, -0.013845488429069519, 0.05425144359469414, -0.025441041216254234, 0.023966195061802864, 0.022287903353571892, -0.019573746249079704, -0.0051307338289916515, -0.04330626130104065, -0.03627961128950119, 0.0011267932131886482, 0.03938523679971695, -0.012117382138967514, 0.017033101990818977, -0.03333144262433052, -0.009565537795424461, -0.010605666786432266, -0.04192696511745453, 0.03839845582842827, 0.04725157469511032, 0.03754058852791786, -0.038140956312417984, 0.02470802143216133, -0.008086823858320713, -0.019941318780183792, -0.013868710026144981, -0.05386750400066376, -0.0008779180352576077, -0.005955045577138662, 0.025953106582164764, 0.03631646931171417, 0.03046073392033577, 0.015174280852079391, -0.015102102421224117, -0.023519551381468773, -0.005272508133202791, 0.0006671710289083421, 0.05212239548563957, -0.00880574993789196, -0.009867801330983639, -0.03456491231918335, 0.0009471271769143641, 0.05733438953757286, -0.04351362958550453, -0.03160105273127556, -0.007788033690303564, -0.01927207224071026, 0.05661787465214729, -0.04476065933704376, -0.040127646178007126, -0.031647950410842896, 0.020906919613480568, 0.056067656725645065, 0.0018405220471322536, -0.027074851095676422, 0.07723606377840042, 0.014033239334821701, -0.0032536371145397425, 0.019252285361289978, -0.004423614125698805, 0.018033381551504135, 0.014678465202450752, 0.035931266844272614, 0.03334200382232666, 0.030840246006846428, 0.020633449777960777, -0.04735860973596573, -0.009925220161676407, -0.035330045968294144, -0.24116846919059753, 0.008124091662466526, -0.012659349478781223, -0.026302408427000046, 0.018245024606585503, -0.01898137480020523, 0.009019039571285248, -0.009802781976759434, 0.0035198661498725414, -0.008040432818233967, -0.012180330231785774, -0.03491493687033653, -0.008558334782719612, 0.037562232464551926, -0.0018908294150605798, 0.016120243817567825, -0.009634742513298988, -0.015408912673592567, -0.0036645964719355106, 0.02438374049961567, 0.024288300424814224, -0.07630516588687897, 0.01783660054206848, 0.02861195057630539, 0.024551132693886757, 0.03955000266432762, -0.030059505254030228, 0.04932594671845436, -0.07017363607883453, -0.026970813050866127, 0.008661167696118355, -0.03262678533792496, 0.006393744144588709, -0.03444929048418999, -0.027258723974227905, -0.032272372394800186, 0.0482000857591629, -0.012255123816430569, 0.03148709237575531, 0.03448142483830452, -0.035263288766145706, -0.03928317502140999, 0.002581934444606304, -0.022081056609749794, 0.08214005082845688, -0.02165054902434349, -0.07793541997671127, -0.017277397215366364, -0.036903318017721176, 0.06566805392503738, -0.025698620826005936, -0.043867044150829315, 0.006788203027099371, 0.05121194198727608, -0.029568135738372803, 0.01608004793524742, 0.0002506290329620242, 0.010086889378726482, -0.06227497383952141, -0.027947619557380676, 0.01613318733870983, -0.0623106025159359, -0.02960754558444023, -0.046367447823286057, -0.009622878395020962, -0.0749695673584938, -0.04381734877824783, -0.01710876077413559, 0.044029876589775085, 0.0286234300583601, -0.029440494254231453, -0.026336362585425377, -0.026962975040078163, -0.10231374949216843, -0.0036437110975384712, -0.023572690784931183, -0.014654644764959812, -0.036369141191244125, -0.0243863295763731, 0.022947151213884354, -0.03941383957862854, -0.04229625687003136, 0.03350400924682617, 0.005058799870312214, -0.021817225962877274, -0.02592187374830246, 0.0011187687050551176, -0.006549424026161432, -0.0228075310587883, -0.0018744373228400946, 0.0729500949382782, -0.06311699002981186, -0.03198251128196716, 0.0023549317847937346, -0.0240764282643795, 0.04873044788837433, 0.027792181819677353, 0.018307315185666084, 0.05736454948782921, 0.0500066839158535, 0.00840802863240242, -0.04455965757369995, 0.003757946193218231, -0.025554271414875984, 0.00013509014388546348, 0.011175398714840412, -0.07682265341281891, 0.022217998281121254, 0.01076690573245287, 0.007813206873834133, -0.0019147730199620128, -0.04942972585558891, 0.01835288293659687, -0.06550797075033188, -0.016606900840997696, -0.03345566987991333, 0.017685463652014732, -0.007383356336504221, -0.0019960508216172457, 0.015201986767351627, -0.06461821496486664, 0.025765899568796158, 0.005406849551945925, 0.007632295601069927, -0.03464951738715172, -0.053376298397779465, 0.019467152655124664, 0.00008910631731851026, 0.007658490911126137, 0.022586632519960403, -0.0027702809311449528, 0.013642060570418835, 0.025495300069451332, -0.032817572355270386, 0.03180601820349693, -0.035802338272333145, -0.01730990596115589, -0.010874389670789242, 0.019573315978050232, 0.01457260176539421, -0.0023598528932780027, -0.034415800124406815, 0.0016635558567941189, 0.025540251284837723, 0.04987725242972374, 0.010481786914169788, 0.021649999544024467, 0.025665057823061943, 0.024667814373970032, 0.027686553075909615, -0.001744702341966331, -0.01018755417317152, 0.02400360442698002, -0.04261821135878563, -0.05408463627099991, -0.025530265644192696, 0.024075262248516083, 0.006487680599093437, -0.01158732920885086, -0.05086115747690201, 0.015713980421423912, -0.055392004549503326, -0.003936894703656435, -0.008665241301059723, -0.016118541359901428, 0.041690219193696976, 0.04346506670117378, 0.02424129843711853, -0.01080445945262909, 0.013123791664838791, 0.030400177463889122, 0.04887903854250908, -0.018826961517333984, 0.03254234790802002, -0.011694295331835747, -0.02220775932073593, 0.02323838882148266, 0.019022595137357712, -0.008197171613574028, 0.030436543747782707, -0.02910391427576542, -0.016807114705443382, 0.046137191355228424, 0.02384616807103157, 0.0324568971991539, 0.03279585763812065, -0.05502523109316826, -0.013980807736515999, -0.009282290004193783, -0.06063993647694588, -0.0339844636619091, -0.0048759193159639835, -0.0029851102735847235, -0.019321272149682045, -0.03340854495763779, -0.07246105372905731, -0.008173794485628605, 0.033914923667907715, -0.0353185273706913, -0.0032495190389454365, -0.019828075543045998, 0.003679756773635745, -0.032875966280698776, 0.05614021420478821, 0.06437977403402328, -0.06496625393629074, -0.0036542874295264482, 0.010107935406267643, -0.014665432274341583, 0.01802097074687481, 0.036321960389614105, -0.06735529750585556, 0.009513682685792446, 0.0015558579470962286, 0.002193658147007227, -0.023729246109724045, -0.02585407719016075, -0.0015954201808199286, 0.03150280937552452, -0.0023712965194135904, 0.010534126311540604, -0.009791502729058266, 0.005183937028050423, -0.028904292732477188, -0.04216044768691063, 0.045029811561107635, 0.004817827604711056, -0.03496299311518669, 0.029094044119119644, 0.000005149873231857782, 0.023365352302789688, -0.013899784535169601, 0.03296308219432831, 0.018016671761870384, 0.012586460448801517, -0.014897868037223816, -0.05442344769835472, -0.024148473516106606, -0.01322718895971775, 0.042384929955005646, -0.02166607789695263, 0.006954733282327652, -0.024023249745368958, -0.005159617867320776, -0.027747783809900284, 0.00002925765329564456, -0.030554575845599174, -0.030642878264188766, 0.024674952030181885, 0.05189686641097069, -0.014037969522178173, 0.029119573533535004, 0.02667298913002014, -0.030620012432336807, 0.05653761699795723, -0.028426431119441986, -0.04021790251135826, -0.001849323627538979, -0.05658801272511482, 0.053120650351047516, 0.005722239147871733, 0.01215567160397768, -0.03321416676044464, 0.04309232905507088, 0.02605869434773922, -0.0034021553583443165, 0.03930692374706268, -0.022513454779982567, 0.048252172768116, -0.019834598526358604, -0.01174556091427803, -0.10107006877660751, 0.0021012905053794384, -0.008086792193353176, -0.014164315536618233, -0.03629319369792938, -0.009943142533302307, -0.05078156664967537, 0.025036880746483803, -0.049297694116830826, -0.036827560514211655, 0.04104197025299072, 0.019626712426543236, 0.00899351853877306, 0.004794555716216564, -0.044529978185892105, 0.013599555939435959, 0.05203351005911827, -0.02672482468187809, -0.00831596553325653, -0.018021980300545692, 0.06935246288776398, -0.00923158135265112, 0.024562189355492592, -0.015213711187243462, -0.0019684825092554092, 0.08623655885457993, 0.039096008986234665, -0.009890303947031498, 0.04577019065618515, -0.029786687344312668, 0.03518958389759064, 0.0051433551125228405, -0.017323892563581467, 0.00206516170874238, 0.03235311433672905, 0.004809803329408169, -0.04026678204536438, 0.009963416494429111, 0.014605514705181122, 0.002620988991111517, -0.08611191064119339, 0.08775048702955246, -0.016763532534241676, -0.03817542642354965, -0.026081731542944908, 0.017083413898944855, -0.053841833025217056, -0.005993890110403299, -0.05183009058237076, 0.011008834466338158, -0.04651308059692383, 0.07167566567659378, -0.006838412024080753, -0.012849606573581696, 0.05860430747270584, 0.0010226238518953323, 0.012584064155817032, 0.013225126080214977, 0.0831577479839325, 0.09826592355966568, 0.02082482911646366, 0.01591876521706581, 0.04703349247574806, -0.02160511165857315, -0.05780697613954544, -0.009282166138291359, -0.04296289384365082, -0.009094493463635445, -0.007865173742175102, 0.010735709220170975, 0.06553523242473602, 0.012404948472976685, 0.0708443820476532, -0.018151169642806053, 0.008401884697377682, -0.027692129835486412, -0.02216876670718193, 0.03765024244785309, 0.04340057820081711, 0.0062110829167068005, 0.049071867018938065, 0.00018175301374867558, 0.0033140156883746386, 0.04255973920226097, -0.007389479782432318, -0.015816284343600273, 0.012356642633676529, -0.007745104376226664, -0.0039239381439983845, 0.026211872696876526, 0.027244163677096367, 0.06516364961862564, -0.020581265911459923, -0.055885713547468185, -0.029017016291618347, 0.04191036894917488, 0.002924593398347497, 0.004409028682857752, -0.010584371164441109, -0.03162892162799835, -0.02717401459813118, -0.023755552247166634, -0.023275479674339294, -0.041860517114400864, -0.021049097180366516, 0.02303851954638958, -0.035983696579933167, 0.0011822870001196861, 0.03302845358848572, 0.008895887061953545, -0.05462876707315445, -0.04008616879582405, -0.061323750764131546, -0.012951325625181198, -0.06231937184929848, 0.013217459432780743, 0.016973625868558884, -0.024343091994524002, -0.036978017538785934, -0.04141863062977791, 0.010722833685576916, -0.0010351566597819328, -0.0013055558083578944, -0.04899348318576813, -0.05621793493628502, 0.019216354936361313, 0.03856595233082771, 0.006954402197152376, 0.01474964153021574, 0.06877601146697998, -0.020997479557991028, -0.020666977390646935, -0.01772102154791355, 0.026253577321767807, 0.0807037428021431, 0.012683948501944542, 0.01160752959549427, -0.08606881648302078, 0.00020788080291822553, 0.019937166944146156, 0.01097789965569973, -0.06487640738487244, 0.023783577606081963, 0.033765003085136414, -0.007908491417765617, 0.055990055203437805, -0.0055392892099916935, 0.014255907386541367, -0.027183514088392258, -0.011905799619853497, -0.0013351270463317633, -0.00009851712820818648, 0.045979008078575134, -0.026109129190444946, 0.07099699229001999, 0.05618690326809883, 0.011699095368385315, -0.038188401609659195, -0.010643230751156807, -0.002212071092799306, 0.018623970448970795, -0.06210319697856903, 0.006777659058570862, -0.02773110941052437, -0.07381753623485565, -0.009484042413532734, 0.0032155492808669806, -0.0465608611702919, -0.03263843432068825, -0.024776630103588104, -0.010226999409496784, -0.031655989587306976, 0.021739374846220016, -0.045807112008333206, 0.016057495027780533, -0.05717088282108307, -0.035068582743406296, -0.021823804825544357, 0.061519522219896317, -0.009030665270984173, 0.005172448232769966, 0.02217201143503189, -0.027857601642608643, 0.0002229005185654387, -0.05129946768283844, 0.014428396709263325, 0.0505167692899704, -0.032391324639320374, 0.022334586828947067 ]
[ -0.04184456169605255, -0.018427344039082527, -0.012673383578658104, -0.04015229269862175, 0.045820292085409164, -0.09260569512844086, -0.025151163339614868, 0.0004775772977154702, 0.008138427510857582, -0.004228617530316114, 0.02434712089598179, -0.08186206966638565, 0.023511553183197975, -0.029405886307358742, 0.03269456326961517, -0.0019385915948078036, -0.03588160499930382, -0.049150947481393814, -0.02718391828238964, 0.04083431884646416, -0.004817383363842964, 0.001726910239085555, -0.03374456986784935, -0.05565429851412773, 0.01099413726478815, 0.07753060758113861, 0.04580133408308029, -0.025395682081580162, 0.02881276048719883, -0.2254190742969513, -0.01814630627632141, -0.014210431836545467, -0.012814217247068882, -0.03070168010890484, 0.02371291257441044, 0.027491560205817223, -0.006714825518429279, -0.004452014807611704, 0.0401119589805603, 0.02604829892516136, 0.018891403451561928, -0.0014387809205800295, -0.04922134056687355, 0.0032711620442569256, 0.06514541804790497, -0.002907287562265992, -0.042491186410188675, -0.02023475058376789, -0.014734962955117226, 0.008645299822092056, -0.029923580586910248, 0.05242515727877617, -0.026090683415532112, -0.021738072857260704, -0.017799369990825653, 0.028936266899108887, 0.02500602789223194, 0.08178816735744476, 0.010245207697153091, -0.0005527345929294825, 0.017427902668714523, -0.0197792649269104, -0.16361303627490997, 0.159311905503273, -0.014653032645583153, 0.058521006256341934, -0.023801643401384354, 0.018842456862330437, -0.0306970477104187, 0.06056729704141617, -0.00957067497074604, -0.011733208782970905, -0.020012056455016136, 0.08773154020309448, -0.017792711034417152, -0.05503986030817032, -0.022572260349988937, -0.02390807308256626, 0.030828820541501045, -0.02039841003715992, -0.02900790236890316, -0.023212939500808716, -0.028297513723373413, -0.05423247069120407, 0.02167522720992565, 0.008941452018916607, -0.04137616604566574, 0.04502443969249725, 0.0014775372110307217, -0.01836124062538147, 0.008038043044507504, -0.028782997280359268, 0.036361340433359146, 0.030342208221554756, -0.049638405442237854, 0.010489181615412235, 0.015377085655927658, 0.00135028304066509, -0.04338245838880539, 0.3976868987083435, -0.007975448854267597, 0.02058243751525879, -0.015049196779727936, 0.04558435082435608, -0.0008789325365796685, -0.020299825817346573, 0.002940308302640915, -0.0038994771894067526, 0.00003665893018478528, 0.0004811811668332666, -0.018944058567285538, -0.034277841448783875, 0.06796428561210632, -0.059783998876810074, -0.019680965691804886, -0.03938613459467888, -0.002073312643915415, 0.019932715222239494, -0.020262163132429123, 0.003089355072006583, -0.02396843023598194, -0.001132533187046647, 0.05711672827601433, 0.02338954620063305, 0.04086754843592644, 0.07083788514137268, 0.02104334719479084, 0.08004322648048401, 0.07863805443048477, 0.03727961331605911, 0.05784868076443672, -0.03245694190263748, -0.024531207978725433, 0.01781265251338482, 0.00543021596968174, 0.013227280229330063, 0.045340437442064285, 0.0032789299730211496, -0.009348268620669842, -0.016825709491968155, -0.040235161781311035, -0.08758850395679474, 0.039670828729867935, 0.018192457035183907, -0.06576712429523468, 0.10309626907110214, -0.042224183678627014, -0.012980196624994278, -0.08947991579771042, -0.04624531790614128, -0.032138578593730927, 0.009093034081161022, 0.010342476889491081, -0.027717681601643562, -0.022848093882203102, 0.05249856784939766, 0.0592278391122818, 0.009175368584692478, -0.04620124027132988, -0.023975595831871033, 0.007674633525311947, -0.05528479069471359, -0.05943901464343071, 0.01078474149107933, 0.01867133192718029, -0.08179175108671188, -0.0440916009247303, 0.00041894573951140046, -0.010505073703825474, -0.05507524311542511, -0.012411965988576412, 0.010110808536410332, -0.042979996651411057, 0.028675317764282227, 0.031773071736097336, -0.017054680734872818, -0.009134558029472828, 0.028242506086826324, 0.036575961858034134, -0.016308972612023354, 0.019279571250081062, -0.0073318686336278915, -0.004399973899126053, -0.012744893319904804, -0.002177976304665208, -0.08131060749292374, -0.05457112938165665, 0.004113129805773497, 0.0021995878778398037, -0.06748483330011368, -0.005479109473526478, -0.03527010232210159, -0.017790010198950768, 0.036443423479795456, -0.03871052339673042, -0.053095147013664246, 0.035571176558732986, 0.003703822148963809, 0.021617470309138298, -0.07432398945093155, 0.06335057318210602, 0.0447976216673851, -0.020057380199432373, 0.03927604481577873, 0.0005491371848620474, 0.02661491371691227, 0.03413374349474907, -0.08314654231071472, 0.06384748220443726, 0.043771419674158096, -0.05668243020772934, 0.03806832432746887, 0.01485341414809227, -0.004503828007727861, 0.007873773574829102, -0.05866587907075882, 0.013562725856900215, 0.0008981899591162801, 0.025488944724202156, 0.031685397028923035, -0.02280566655099392, -0.07583371549844742, -0.058316174894571304, -0.35095521807670593, -0.025972818955779076, -0.02718634344637394, -0.013388721272349358, -0.008127442561089993, -0.04946817830204964, -0.0414343923330307, -0.0007605558494105935, -0.042174942791461945, 0.0773729458451271, 0.07705370336771011, -0.001286817598156631, 0.056807201355695724, -0.047306787222623825, -0.02172355353832245, 0.06995527446269989, 0.0030718015041202307, -0.006992684211581945, -0.038502249866724014, 0.008700447157025337, 0.0566435344517231, 0.012942997738718987, -0.05005896836519241, -0.03298091143369675, 0.010089429095387459, -0.0450529083609581, 0.12860257923603058, 0.02482462115585804, 0.029747067019343376, -0.02023972012102604, 0.05639377236366272, 0.03542407602071762, -0.014058426022529602, -0.06174369528889656, 0.02896157093346119, -0.013480677269399166, -0.02855806052684784, 0.010705152526497841, -0.019135672599077225, -0.04065685346722603, 0.002690461464226246, -0.00578087056055665, -0.014368650503456593, -0.011801010929048061, -0.006155998446047306, 0.022002238780260086, 0.01721043884754181, -0.014096792787313461, 0.015110332518815994, 0.06637418270111084, 0.03467762842774391, 0.034558042883872986, 0.026128675788640976, 0.03776109591126442, -0.010316312313079834, -0.034472446888685226, -0.060936763882637024, 0.002473950618878007, -0.0033488443586975336, 0.0031261288095265627, 0.013445109128952026, -0.009279860183596611, 0.049168236553668976, -0.03486780822277069, -0.01714795082807541, 0.018566669896245003, -0.019235217943787575, -0.00801797490566969, 0.04306166246533394, 0.04439546540379524, -0.05514496564865112, 0.06498315930366516, 0.0024103529285639524, 0.018434805795550346, 0.028293916955590248, 0.04767560958862305, 0.02453177608549595, 0.07591883838176727, 0.028242016211152077, -0.04527208209037781, 0.03445005416870117, -0.012985958717763424, 0.06903979182243347, 0.010607866570353508, 0.05698903650045395, 0.042939312756061554, -0.025482354685664177, 0.00032969375024549663, 0.05999043956398964, -0.015894461423158646, -0.01801457814872265, 0.008993743918836117, -0.015605422668159008, 0.006133157294243574, 0.07177583128213882, 0.02102818340063095, -0.23324085772037506, 0.03717230260372162, 0.05301341041922569, 0.06746010482311249, -0.002758768852800131, -0.008118036203086376, 0.015548349358141422, -0.02493242360651493, -0.013218817301094532, -0.04216521978378296, 0.01244398858398199, -0.0164562426507473, 0.0558350495994091, -0.010233103297650814, -0.0033256520982831717, -0.0318199023604393, 0.029771026223897934, 0.014051603153347969, 0.01696200482547283, 0.030856458470225334, 0.01983454078435898, -0.04601678252220154, 0.16062182188034058, 0.054323844611644745, 0.01875406503677368, -0.048255838453769684, 0.029198363423347473, -0.05086871236562729, 0.028755487874150276, 0.06521546840667725, -0.011874140240252018, -0.026583004742860794, 0.07611168175935745, -0.021976204589009285, 0.045221418142318726, -0.015856659039855003, -0.030247680842876434, 0.022063635289669037, -0.010462322272360325, -0.07878322899341583, -0.058102332055568695, 0.05996868014335632, -0.043844424188137054, 0.008429926820099354, -0.0018328127916902304, 0.02444598823785782, 0.01066107489168644, 0.008076324127614498, 0.01656007021665573, 0.036911603063344955, -0.018542662262916565, -0.02119562402367592, -0.048253126442432404, -0.028870750218629837, -0.014750152826309204, 0.0225308109074831, 0.03289181366562843, 0.005654215347021818, 0.02999837137758732, 0.0044412761926651, 0.05844549089670181, -0.06495130062103271, 0.08624652028083801, 0.011807695962488651, 0.0017691534012556076 ]
[ 0.03565404564142227, 0.04172833263874054, -0.05465565249323845, -0.011377638205885887, -0.010214806534349918, -0.0014850407605990767, 0.02141685038805008, -0.0503879114985466, -0.057389821857213974, -0.009503118693828583, -0.031677648425102234, -0.006246515549719334, -0.0008160147117450833, 0.0016940669156610966, 0.0015985904028639197, -0.01972177065908909, -0.02309119515120983, -0.04483010992407799, 0.021771444007754326, -0.019907034933567047, -0.022571377456188202, 0.024183861911296844, 0.05270034447312355, 0.0017743711359798908, -0.001216161879710853, 0.013965141959488392, -0.018987637013196945, 0.03838707506656647, 0.02917763777077198, -0.10289943963289261, -0.03442983701825142, -0.04804765805602074, -0.0188541729003191, 0.023311300203204155, 0.0008760967757552862, 0.017883822321891785, -0.049142852425575256, 0.023300020024180412, 0.013444083742797375, 0.0204280074685812, 0.03659806773066521, -0.02346564084291458, -0.005289698019623756, 0.026601022109389305, 0.010713312774896622, 0.014220908284187317, -0.03794431313872337, 0.02315521240234375, -0.007065187208354473, 0.007660467177629471, -0.005160927772521973, 0.028595007956027985, -0.003832613117992878, -0.05242351070046425, 0.049937475472688675, 0.015495376661419868, 0.02528548426926136, 0.006534324958920479, 0.0009834797820076346, -0.03998013585805893, -0.045027099549770355, 0.0046958765015006065, -0.036272212862968445, -0.012637117877602577, 0.0004581137327477336, -0.016798699274659157, -0.05147942155599594, -0.01164824515581131, -0.003786737797781825, 0.0009634706075303257, -0.011055530048906803, -0.014858516864478588, -0.05000181868672371, 0.025704970583319664, -0.042171839624643326, -0.04377923160791397, 0.0022889592219144106, -0.02949930913746357, 0.011370030231773853, 0.02649330161511898, -0.022589337080717087, 0.01379378605633974, 0.0024916413240134716, -0.0030541622545570135, 0.03518225997686386, -0.017285993322730064, -0.008877606131136417, -0.03135079890489578, 0.024299608543515205, -0.0660916343331337, 0.035625357180833817, -0.029902571812272072, 0.02458915114402771, 0.07608509808778763, -0.07081945240497589, -0.036828383803367615, 0.06989012658596039, -0.023211177438497543, -0.04497939348220825, 0.819311797618866, 0.0011972365900874138, -0.026599114760756493, 0.018097031861543655, 0.02059244178235531, -0.021299364045262337, 0.028252435848116875, 0.025074532255530357, -0.01934216357767582, 0.008953003212809563, -0.026588359847664833, -0.018650703132152557, -0.009101257659494877, 0.01787884160876274, -0.017595471814274788, 0.011416394263505936, 0.01628447324037552, 0.015266627073287964, -0.016624821349978447, -0.010556907393038273, -0.004295538179576397, -0.00018389114120509475, 0.0015592161798849702, 0.0007839114405214787, 0.05128864571452141, -0.0014461654936894774, -0.14594531059265137, -0.022262318059802055, -6.946685987256036e-33, 0.016194328665733337, -0.05049910023808479, 0.05730251222848892, 0.0031473813578486443, 0.04471353068947792, -0.015305179171264172, 0.0035763534251600504, -0.04827141389250755, -0.0002781421353574842, -0.022029640153050423, -0.008664705790579319, -0.01128945592790842, -0.029887791723012924, -0.01349153183400631, 0.03705880418419838, 0.025928162038326263, 0.020027033984661102, 0.04091428592801094, -0.0032511232420802116, 0.01857825368642807, 0.017068007960915565, 0.03343556076288223, 0.038791388273239136, 0.016256485134363174, 0.004734176676720381, 0.018211008980870247, -0.0008420649101026356, -0.015608595684170723, 0.007180370390415192, -0.02623794786632061, -0.023847080767154694, 0.0182658564299345, -0.03457804396748543, -0.05356144905090332, -0.043069180101156235, -0.052802953869104385, -0.04502326622605324, -0.006053189747035503, -0.01571909710764885, 0.011580543592572212, -0.0407286211848259, -0.006147029809653759, -0.021131912246346474, -0.02396446280181408, 0.046780288219451904, -0.0022197517100721598, 0.029106635600328445, 0.05593113601207733, -0.019343476742506027, 0.004321038722991943, 0.05329081416130066, 0.000773346982896328, -0.028851812705397606, 0.02459193393588066, 0.013637919910252094, 0.013186580501496792, 0.0235324427485466, 0.034398000687360764, 0.0439562052488327, 0.0043329158797860146, 0.03803680092096329, -0.036030251532793045, 0.019173333421349525, 0.024556919932365417, 0.04492707550525665, 0.01876905746757984, 0.013993277214467525, 0.03183501958847046, 0.004069127608090639, -0.0265817791223526, -0.04006373882293701, -0.010490087792277336, 0.0127262556925416, -0.03290119022130966, 0.05003146827220917, -0.009363705292344093, -0.01153013575822115, -0.01915857009589672, 0.009184883907437325, -0.003979362081736326, 0.016121549531817436, 0.008842580020427704, -0.01721728965640068, -0.04999857768416405, -0.03304893150925636, -0.051972970366477966, 0.02928357757627964, -0.021939856931567192, -0.0035906818229705095, -0.005966812837868929, 0.008774119429290295, 0.020170357078313828, 0.0070796990767121315, -0.03171057254076004, -0.02521117590367794, 6.464550367110551e-33, 0.024030104279518127, 0.0040233139880001545, -0.016909245401620865, -0.009206132031977177, 0.011748461052775383, -0.059076469391584396, 0.05849478393793106, 0.018141265958547592, -0.01673221029341221, 0.031848710030317307, -0.04589545354247093, -0.00905811320990324, -0.014821439981460571, 0.024660317227244377, 0.04341231659054756, 0.06135044991970062, 0.024530665948987007, 0.05571787431836128, 0.018167605623602867, 0.006275293417274952, -0.0049761636182665825, 0.006669966038316488, -0.001753293676301837, 0.01780546084046364, -0.01567012630403042, 0.021829592064023018, -0.010121878236532211, -0.042203713208436966, 0.010177096351981163, -0.018686443567276, -0.02755001373589039, 0.00335248582996428, -0.010637623257935047, 0.022076953202486038, -0.02865733951330185, 0.04288659617304802, -0.0023072920739650726, -0.004772355314344168, 0.031541381031274796, 0.008275946602225304, 0.007212023250758648, 0.01673683524131775, 0.022160274907946587, 0.03540691360831261, 0.024394331499934196, -0.011894157156348228, -0.006649331655353308, 0.017359167337417603, -0.05889935418963432, -0.059762243181467056, 0.00037831280496902764, 0.0380355603992939, -0.003470561234280467, 0.0026357697788625956, 0.04025208577513695, -0.004560720641165972, -0.009789147414267063, 0.05740984529256821, -0.017273565754294395, -0.06545010209083557, -0.061770252883434296, 0.0052122692577540874, -0.016321303322911263, 0.00241931714117527, -0.005088338162750006, -0.011572095565497875, -0.026438763365149498, 0.004907809663563967, 0.05753844976425171, -0.02302240952849388, 0.0005622896132990718, -0.031769584864377975, -0.017263824120163918, 0.030368424952030182, 0.01593821309506893, 0.03333127871155739, -0.025701357051730156, 0.021124398335814476, 0.0043679228983819485, 0.05410942807793617, 0.00962293241173029, -0.02638840116560459, 0.03343328833580017, -0.015890900045633316, -0.01022472232580185, 0.012973134405910969, -0.03175841271877289, -0.03748280555009842, 0.05783374607563019, -0.0031759263947606087, 0.00038709028740413487, -0.01567222736775875, -0.04881756752729416, 0.005287673324346542, 0.02124522067606449, -1.2362578516444955e-8, -0.03036315366625786, 0.00840911827981472, -0.02563379518687725, 0.03900948166847229, -0.0038359505124390125, 0.013893158175051212, -0.012085986323654652, 0.0079428032040596, -0.013069985434412956, 0.00027718639466911554, 0.048114508390426636, 0.027245350182056427, -0.003750188509002328, 0.027211690321564674, 0.003988645970821381, 0.008552776649594307, -0.007687770761549473, 0.013563990592956543, 0.008223084732890129, -0.0040590655989944935, -0.017707647755742073, 0.05884888395667076, -0.02419593557715416, 0.00677954126149416, -0.04655347019433975, -0.007237907033413649, -0.021217243745923042, -0.07452624291181564, 0.003967194817960262, 0.005898431874811649, 0.03720732405781746, -0.038238104432821274, -0.033831268548965454, 0.013065827079117298, 0.00988354068249464, -0.030859384685754776, 0.00013260793639346957, -0.001472769072279334, 0.03374222293496132, 0.0011786860413849354, -0.00908886082470417, -0.030694887042045593, 0.028472358360886574, -0.025765107944607735, -0.03527917340397835, -0.005227942485362291, -0.03680063411593437, 0.009873522445559502, 0.014821921475231647, -0.026169205084443092, 0.02894561178982258, -0.03002927452325821, -0.015848824754357338, 0.009419092908501625, 0.012584936805069447, 0.03543639928102493, -0.023611826822161674, 0.01789148338139057, 0.016908105462789536, -0.0040261102840304375, 0.00945799145847559, 0.02941359579563141, 0.013576985336840153, 0.007702679838985205 ]
pyarrow-filter-argument-boolean-type
https://markhneedham.com/blog/2023/08/23/pyarrow-filter-argument-boolean-type
false
2023-01-06 02:44:37
Exporting CSV files to Parquet file format with Pandas, Polars, and DuckDB
[ "python", "polars", "pandas", "duckdb" ]
[ "Python" ]
I was recently trying to convert a CSV file to Parquet format and came across https://stackoverflow.com/questions/50604133/convert-csv-to-parquet-file-using-python[a StackOverflow post^] that described a collection of different options. My CSV file was bigger than the amount of memory I had available, which ruled out some of the methods. In this blog post we're going to walk through some options for exporting big CSV files to Parquet format. [NOTE] ==== I've created a video showing how to do this on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], so if you prefer to consume content through that medium, I've embedded it below: ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/aexszHMKdy8" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ ==== == The Dataset We're going to be exploring this problem using a CSV file that contains the rankings of male tennis players going back to the 1970s. This file is 270MB in size and contains about 12 million records. A sample is shown below: [source, bash] ---- head -n10 output/atp_rankings.csv ---- .Output [source, text] ---- ranking_date,rank,player,points 19900101,1,100656,2913 19900101,2,101414,2279 19900101,3,101222,2111 19900101,4,100763,1398 19900101,5,100581,1354 19900101,6,102021,1328 19900101,7,101381,1217 19900101,8,101736,1160 19900101,9,101309,1039 ---- == Pandas The simplest way to convert this file to Parquet format would be to use Pandas, as shown in the script below: .scripts/duck_to_parquet.py [source, python] ---- import pandas as pd pd.read_csv("/output/atp_rankings.csv").to_parquet( "/output/pandas_atp_rankings.parquet") ---- This code loads the file into memory before converting it to Parquet format. We're going to run it using a Docker image that I've created that contains a Python runtime along with a bunch of pre-installed libraries. The Dockerfile is shown below: .Dockerfile [source, text] ---- FROM python:3.11 WORKDIR /usr/src/app COPY requirements.txt ./ RUN pip install --no-cache-dir -r requirements.txt COPY . . CMD [ "python"] ---- `requirements.txt` contains the following: requirements.txt [source, text] ---- pandas fastparquet polars duckdb ---- Let's run the Pandas code with 1GB of RAM assigned to the Docker container: [source, bash] ---- docker run -it \ -v $PWD/scripts:/scripts \ -v $PWD/output:/output \ -m 1024m \ --name python-tennis \ --rm python-tennis:0.0.1 \ python /scripts/pandas_to_parquet.py ---- This will take 10-15 seconds and at the end of that we'll have the data in Parquet format: [source, bash] ---- du -h output/pandas_atp_rankings.parquet ---- .Output [source, text] ---- 51M output/pandas_atp_rankings.parquet ---- So far, so good. But what about if we reduce the memory to 100MB? [source, bash] ---- docker run -it \ -v $PWD/scripts:/scripts \ -v $PWD/output:/output \ -m 100m \ --name python-tennis \ --rm python-tennis:0.0.1 \ python /scripts/pandas_to_parquet.py ---- This time the container exits with the following exit code: [source, bash] ---- echo $? ---- .Output [source, text] ---- 137 ---- This is the error code that indicates Docker terminated the container due to an out of memory exception. Let's see if we can fix that using some other tools. == Polars First up is https://pola-rs.github.io/polars-book/user-guide/[Polars^], a DataFrames library implemented in Rust using Apache Arrow Columnar Format as the memory model. Polars has a neat function called `scan_csv` that lets us process CSV files without loading everything into memory. The equivalent script to convert CSV to Parquet therefore looks like this: .scripts/polars_to_parquet.py [source, python] ---- import polars as pl pl.scan_csv("/output/atp_rankings.csv").sink_parquet( "/output/polars_atp_rankings.parquet", compression="zstd", row_group_size=100_000 ) ---- The `sink_parquet` function lets us define the compression algorithm to use as well as the size to use for each group size, which is nice. There are some other parameters you can set as well, but I left those as they were. We're going to run this script using Docker, but we're also going to track the memory usage of the container so we can see what's going on. We'll do this using the following function that is a wrapper around `docker stats`: [source, bash] ---- check_memory_usage() { maxTime=${1:=30} start=$(date +%s) hasStarted=0 while true; do if [ $(date +%s) -gt `expr ${start} + ${maxTime}` ]; then break; fi stats=$(docker stats --format '{{.Name}}\t{{.MemPerc}}\t{{.MemUsage}}' --no-stream) if [ -z "${stats}" ]; then if [ ${hasStarted} -eq 1 ]; then break; fi continue; fi hasStarted=1 echo "$(date "+%Y-%m-%d %H:%M:%S")\t${stats}" done } ---- Now let's run the Polars code: [source, bash] ---- docker run -it -d \ -v $PWD/scripts:/scripts \ -v $PWD/output:/output \ -m 100m \ --name python-tennis \ --rm python-tennis:0.0.1 \ python /scripts/polars_to_parquet.py &>/dev/null && check_memory_usage ---- If we run this command, we'll see the following output: .Output [source, text] ---- 2023-01-06 17:10:58 python-tennis 62.79% 62.79MiB / 100MiB 2023-01-06 17:11:00 python-tennis 72.71% 72.71MiB / 100MiB 2023-01-06 17:11:02 python-tennis 74.48% 74.48MiB / 100MiB 2023-01-06 17:11:04 python-tennis 74.69% 74.69MiB / 100MiB 2023-01-06 17:11:06 python-tennis 82.39% 82.39MiB / 100MiB 2023-01-06 17:11:08 python-tennis 82.64% 82.64MiB / 100MiB 2023-01-06 17:11:10 python-tennis 82.65% 82.65MiB / 100MiB ---- And we have another Parquet file! [source, bash] ---- du -h output/polars_atp_rankings.parquet ---- .Output [source, text] ---- 25M output/polars_atp_rankings.parquet ---- == DuckDB Finally, let's have a look at how to do the same thing with DuckDB, an in-process SQL OLAP database management system. A script that uses DuckDB's Python client looks like this: .scripts/duck_to_parquet.py [source, python] ---- import duckdb con = duckdb.connect(database=':memory:') con.execute("SET memory_limit='100MB'") con.execute(""" COPY (SELECT * FROM '/output/atp_rankings.csv') TO '/output/duck_atp_rankings.parquet' (FORMAT PARQUET, CODEC 'SNAPPY', ROW_GROUP_SIZE 100000); """) ---- I found when using DuckDB that I needed to tell it the memory limit explicitly, otherwise it was trying to use more than that and I was ending up with incomplete and invalid Parquet files. As with Polars, we can define the compression algorithm (called codec in this case) and the row group size. Let's give this one a whirl: [source, bash] ---- docker run -it -d \ -v $PWD/scripts:/scripts \ -v $PWD/output:/output \ -m 100m \ --name python-tennis \ --rm python-tennis:0.0.1 \ python /scripts/duck_to_parquet.py &>/dev/null && check_memory_usage ---- .Output [source, text] ---- 2023-01-06 17:15:47 python-tennis 77.29% 77.29MiB / 100MiB 2023-01-06 17:15:49 python-tennis 98.82% 98.82MiB / 100MiB 2023-01-06 17:15:51 python-tennis 98.59% 98.59MiB / 100MiB 2023-01-06 17:15:53 python-tennis 99.47% 99.47MiB / 100MiB 2023-01-06 17:15:55 python-tennis 98.94% 98.94MiB / 100MiB ---- And we have one final Parquet file! [source, bash] ---- du -h output/duck_atp_rankings.parquet ---- .Output [source, text] ---- 51M output/duck_atp_rankings.parquet ---- This file is a bit bigger than the Polars one, which I think is because we used a different compression format. == Conclusion. Pandas is a great choice for converting CSV files that fit in memory, but if we want to work with really big files Polars and DuckDB are ready and waiting to step in - both work equally well in my experiments!
In this post we'll learn how to export bigger-than-memory CSV files from CSV to Parquet format using Pandas, Polars, and DuckDB.
uploads/2023/01/csv-parquet-banner.png
[ -0.011547181755304337, -0.033819738775491714, -0.027699099853634834, 0.03279601410031319, 0.08527826517820358, 0.01836615800857544, -0.006844168994575739, 0.04378349706530571, 0.00838119350373745, -0.028863849118351936, 0.020349547266960144, -0.04606761783361435, -0.06639230251312256, 0.0286991186439991, -0.02242947556078434, 0.07855016738176346, 0.054816003888845444, 0.005535033531486988, 0.056191690266132355, 0.007669122889637947, 0.030641864985227585, 0.06280451267957687, -0.014171161688864231, 0.03047233819961548, 0.006795183289796114, -0.010929842479526997, -0.021679440513253212, 0.029307663440704346, -0.05209808424115181, -0.004465778358280659, 0.041828300803899765, -0.015910502523183823, 0.004811666440218687, 0.004418647848069668, 0.028919784352183342, -0.02269633673131466, -0.028619904071092606, 0.038783472031354904, 0.0022360235452651978, 0.004485982470214367, -0.04281863197684288, 0.034976355731487274, -0.024858588352799416, 0.022111622616648674, -0.04050903767347336, 0.030291946604847908, 0.007330691907554865, 0.02188149094581604, -0.007760436274111271, -0.0066435616463422775, -0.034717462956905365, 0.04492649435997009, -0.007248202338814735, -0.01567143388092518, -0.007947267964482307, 0.04101147502660751, 0.029562652111053467, -0.04968651011586189, 0.031696073710918427, -0.009560734033584595, -0.0014241058379411697, -0.014798264019191265, 0.007257294841110706, 0.017956001684069633, 0.008199701085686684, -0.06385679543018341, -0.004256268031895161, 0.06418535113334656, -0.026681888848543167, -0.03534369170665741, -0.012462145648896694, 0.007320838049054146, -0.007282656151801348, -0.034177571535110474, -0.0023364522494375706, -0.03290639445185661, -0.004326850641518831, 0.060070574283599854, -0.003615295747295022, 0.04383663088083267, -0.013439535163342953, 0.027262937277555466, 0.013349535875022411, 0.031821295619010925, -0.002033376833423972, -0.035640012472867966, -0.03814556449651718, -0.022112395614385605, -0.06646577268838882, 0.05083710700273514, 0.0009241738589480519, -0.024352453649044037, 0.009617920033633709, 0.013519243337213993, -0.0144894327968359, -0.0063221207819879055, -0.013454146683216095, 0.006905659101903439, 0.002668132074177265, -0.00959151703864336, -0.07365500181913376, -0.012228758074343204, 0.02676066942512989, 0.03092212788760662, -0.06693834066390991, -0.014425838366150856, -0.01388311106711626, 0.012776583433151245, 0.030523179098963737, 0.011994380503892899, 0.006583422422409058, -0.012896976433694363, -0.007282146252691746, -0.008831384591758251, -0.07048393040895462, 0.050559163093566895, 0.026048537343740463, -0.04363592341542244, 0.009469673037528992, 0.035112179815769196, 0.0319758802652359, 0.03846053406596184, 0.006171597167849541, 0.0874052494764328, 0.018317274749279022, 0.007924319244921207, 0.030280999839305878, 0.051956843584775925, 0.004368569236248732, -0.06055232882499695, -0.006087928544729948, 0.057695094496011734, -0.0019203806295990944, -0.01912621222436428, 0.008167438209056854, -0.012549275532364845, -0.02579149417579174, -0.01050324086099863, 0.06875405460596085, 0.017612000927329063, 0.02055547386407852, -0.04129774868488312, 0.016519105061888695, 0.0218401737511158, 0.04313912242650986, 0.027287092059850693, -0.0002645444474183023, -0.03586435690522194, -0.022908231243491173, 0.008784882724285126, 0.03620687872171402, 0.028587792068719864, 0.07479614019393921, -0.027474256232380867, -0.005178117658942938, 0.09580955654382706, 0.030718760564923286, -0.006248275749385357, -0.015237410552799702, 0.01299454178661108, 0.04000720754265785, 0.05265761539340019, 0.028961265459656715, 0.026532785966992378, -0.020324671640992165, -0.01832229644060135, -0.006162434350699186, 0.04389354959130287, -0.044204603880643845, 0.01940275728702545, -0.05454948917031288, -0.028386462479829788, 0.0749964639544487, -0.019793521612882614, -0.0326545350253582, 0.04492899030447006, 0.09498979896306992, 0.06130396947264671, 0.03826246038079262, -0.014863776043057442, -0.08077871054410934, 0.04739134758710861, -0.0023648422211408615, 0.03320930898189545, 0.02531234733760357, -0.003252454102039337, 0.0803423747420311, 0.03420029580593109, 0.012523055076599121, 0.02889452688395977, -0.03730165958404541, -0.06835069507360458, -0.052683621644973755, -0.017401503399014473, 0.058572474867105484, -0.03871941566467285, 0.03572271019220352, 0.0244354959577322, 0.040570084005594254, 0.021531762555241585, -0.027475986629724503, 0.00907217152416706, 0.03328869491815567, -0.05605136603116989, -0.03348391130566597, 0.03945459797978401, 0.029347708448767662, -0.011320287361741066, -0.01738397218286991, 0.011640301905572414, -0.02038656361401081, -0.0008025657152757049, 0.03546002134680748, -0.025609802454710007, 0.016340553760528564, 0.03093409352004528, 0.07409227639436722, 0.011743769980967045, 0.043711282312870026, -0.04799993708729744, 0.036315564066171646, -0.00819066446274519, -0.015844516456127167, -0.021412184461951256, -0.03721882775425911, 0.12182629853487015, 0.03941572830080986, -0.030579974874854088, -0.07156930863857269, 0.025907061994075775, -0.04357680305838585, -0.027004506438970566, -0.018817773088812828, -0.002448539948090911, -0.012968591414391994, 0.01902671344578266, -0.040668316185474396, -0.051381777971982956, 0.004536026623100042, -0.03411915525794029, -0.020202839747071266, 0.06320137530565262, 0.02087482064962387, 0.046456046402454376, -0.011302829720079899, -0.029392924159765244, -0.00917399488389492, -0.018026268109679222, -0.05609810724854469, -0.0025659438688308, -0.00030891693313606083, 0.004382886923849583, 0.023613758385181427, -0.03267384693026543, -0.04896474629640579, -0.019433746114373207, -0.047681763768196106, 0.03060280904173851, 0.055234070867300034, 0.047332312911748886, -0.015249093994498253, 0.04964364320039749, -0.012142601422965527, 0.011844797059893608, -0.027273481711745262, -0.027655698359012604, -0.043985575437545776, -0.036271218210458755, 0.015647372230887413, 0.0008678625454194844, 0.021034447476267815, 0.018431074917316437, 0.01931464858353138, 0.007549415808171034, 0.012898530811071396, 0.001804386847652495, 0.038318902254104614, -0.03607436642050743, -0.0007770694210194051, -0.03365849703550339, 0.023880012333393097, 0.06477893888950348, -0.031196342781186104, -0.016404660418629646, 0.015329325571656227, -0.05363385006785393, 0.017739970237016678, -0.06773173809051514, -0.01823359541594982, -0.004456232767552137, -0.0017173134256154299, 0.045387182384729385, -0.002952108159661293, 0.0018954856786876917, 0.07210615277290344, 0.014540947042405605, 0.00854471791535616, 0.02590886317193508, 0.038713011890649796, 0.033748187124729156, -0.017958540469408035, 0.03433627262711525, 0.04546051099896431, 0.006751198787242174, -0.015093864873051643, -0.047322992235422134, -0.0029990554321557283, -0.021426599472761154, -0.2742431163787842, 0.06641844660043716, 0.0013611604226753116, -0.032878708094358444, 0.0300991702824831, -0.028192289173603058, -0.00989052839577198, -0.050477899610996246, -0.02959684655070305, 0.011755923740565777, -0.023014985024929047, -0.017188092693686485, -0.050677590072155, 0.051785606890916824, 0.019115913659334183, 0.04130711406469345, -0.0018894762033596635, -0.029292253777384758, 0.016247157007455826, 0.031618908047676086, 0.016824200749397278, -0.0623062402009964, -0.02310870587825775, 0.044523339718580246, 0.024591796100139618, 0.05777040496468544, -0.05828633904457092, 0.02740713767707348, -0.0684429258108139, -0.030027667060494423, 0.003232712158933282, -0.05789266154170036, 0.017160626128315926, -0.016955606639385223, -0.02135184407234192, -0.020859019830822945, 0.04780559986829758, -0.00780685618519783, 0.003030301071703434, 0.02034098282456398, -0.025884684175252914, -0.02152366191148758, -0.01803240366280079, 0.013567356392741203, 0.07910867035388947, 0.005212070886045694, -0.034989405423402786, -0.013944681733846664, -0.018108459189534187, 0.0563124343752861, -0.00753397960215807, -0.05123515427112579, -0.030339514836668968, 0.008091753348708153, -0.01892108842730522, 0.011116943322122097, 0.013433035463094711, -0.00885486789047718, -0.03997628018260002, -0.01892787404358387, 0.017438462004065514, -0.026001334190368652, -0.04109038785099983, -0.03971800208091736, -0.009982572868466377, -0.07860703021287918, -0.06227380782365799, 0.0016750573413446546, 0.08061499893665314, 0.04074212163686752, -0.023624058812856674, 0.020635971799492836, -0.008978093042969704, -0.10442273318767548, -0.012400099076330662, -0.015077207237482071, -0.019869379699230194, 0.02695123851299286, -0.014864481054246426, 0.08444595336914062, -0.051401928067207336, -0.04729302227497101, 0.04156707972288132, 0.004381424747407436, 0.022069701924920082, -0.0389743410050869, -0.0039028064347803593, -0.0015111956745386124, -0.01257428340613842, -0.004906519781798124, 0.07737886905670166, -0.05641323700547218, -0.013775791972875595, -0.0011656427523121238, -0.029784778133034706, 0.0630047544836998, 0.000046528275561286137, 0.02745913341641426, 0.007818819023668766, 0.045077428221702576, 0.008425462059676647, -0.05384548753499985, 0.003575334558263421, -0.04966660588979721, -0.0003308241721242666, -0.016619281843304634, -0.044008150696754456, 0.024504635483026505, 0.034898024052381516, 0.034427106380462646, 0.001609322614967823, -0.045690927654504776, 0.02710411138832569, -0.057075873017311096, -0.01833934336900711, -0.024902040138840675, -0.0017061404651030898, 0.005948177073150873, 0.014908083714544773, -0.0327201671898365, -0.044135935604572296, 0.010687779635190964, 0.005175234284251928, -0.017048416659235954, -0.04916464909911156, -0.01606367528438568, 0.020057957619428635, -0.016332827508449554, -0.004483529832214117, -0.009450748562812805, -0.039055660367012024, 0.011497474275529385, 0.037170011550188065, -0.0237476397305727, 0.019006289541721344, -0.03716925531625748, -0.04953669011592865, -0.049693211913108826, 0.03104354627430439, 0.021225910633802414, -0.005173805169761181, -0.004799304995685816, 0.0017247542273253202, 0.02743878960609436, 0.031122297048568726, 0.02487567439675331, 0.047873467206954956, -0.00047615644871257246, 0.01590508408844471, -0.006189003121107817, 0.011996008455753326, -0.04457740858197212, 0.009988107718527317, -0.029474589973688126, -0.06884901225566864, -0.008570156991481781, 0.023103266954421997, 0.0010429512476548553, -0.021835196763277054, -0.04149387404322624, 0.023429131135344505, -0.042010415345430374, -0.02792399562895298, -0.012996882200241089, 0.019960464909672737, 0.05831321328878403, 0.02587774582207203, 0.03381568193435669, 0.0011349455453455448, 0.01262207143008709, 0.017781002447009087, -0.002281561493873596, -0.0307199377566576, -0.013368277810513973, 0.0033775800839066505, -0.0014202260645106435, 0.045041367411613464, 0.021946396678686142, 0.00357782281935215, 0.03442820906639099, -0.0013638404197990894, -0.040423255413770676, 0.013644322752952576, 0.010677307844161987, 0.02406126819550991, 0.05066802725195885, -0.022120464593172073, 0.018256723880767822, -0.015639787539839745, -0.012989206239581108, -0.03896530717611313, -0.0062172990292310715, -0.010108614340424538, -0.0032956628128886223, -0.02565860189497471, -0.0617610439658165, 0.058652594685554504, 0.014517548494040966, -0.03540622070431709, 0.00767934275791049, -0.005827523767948151, -0.008766972459852695, -0.007443287875503302, 0.028858570381999016, 0.05882202088832855, -0.06363214552402496, 0.005424954928457737, -0.01761821284890175, 0.009054901078343391, -0.0006866370677016675, 0.0022343837190419436, -0.04246899113059044, -0.014130081981420517, -0.011119342409074306, 0.04666709527373314, -0.029890162870287895, 0.00507161533460021, -0.03582464158535004, 0.007775656413286924, -0.042177099734544754, 0.019332854077219963, -0.004649036563932896, 0.003943856339901686, -0.01699691079556942, -0.03644713759422302, 0.015202442184090614, -0.016604239121079445, -0.02677166648209095, 0.03640339523553848, -0.02425427734851837, 0.012257103808224201, -0.03957656770944595, 0.015475713647902012, 0.05757557600736618, -0.03531602770090103, -0.0268387608230114, -0.026479821652173996, 0.014397557824850082, 0.011580821126699448, 0.0614778958261013, 0.0032111196778714657, -0.023783978074789047, -0.024935364723205566, 0.03101683035492897, -0.010677948594093323, 0.0023752457927912474, -0.02077486366033554, -0.023244330659508705, 0.029217837378382683, 0.04245563969016075, -0.003927755169570446, 0.006590856704860926, -0.007208587136119604, -0.06096213310956955, 0.043271537870168686, -0.04416272044181824, -0.055053457617759705, -0.02815871313214302, -0.056492749601602554, 0.03976001590490341, -0.01360401138663292, 0.0247944388538599, -0.04774587228894234, 0.04568185657262802, 0.026139646768569946, 0.014132088050246239, 0.0656670331954956, 0.012736406177282333, 0.02373526245355606, -0.03940260782837868, -0.015510405413806438, -0.09724265336990356, -0.015788421034812927, 0.02858520857989788, 0.006984449457377195, -0.01097393874078989, 0.000794546736869961, -0.050526686012744904, 0.03639912232756615, -0.0819978266954422, -0.05011594295501709, 0.06484551727771759, -0.0210474394261837, 0.009586089290678501, -0.0003975274448748678, -0.02096698246896267, 0.024504326283931732, 0.02988847717642784, -0.05849197134375572, -0.006082452367991209, -0.029753178358078003, 0.05821654945611954, 0.0027260910719633102, 0.02722342126071453, -0.015886520966887474, -0.024658527225255966, 0.059407979249954224, -0.012865263037383556, 0.009677490219473839, 0.025043940171599388, -0.0042930543422698975, 0.03867090120911598, 0.010690666735172272, -0.03653848543763161, 0.027314038947224617, 0.007480304688215256, 0.0023247061762958765, -0.04998726770281792, 0.003699235850945115, 0.013730430975556374, -0.01037557888776064, -0.040353160351514816, 0.08946714550256729, 0.016672687605023384, -0.03047732450067997, -0.06766001135110855, 0.022792896255850792, -0.03860282152891159, 0.005885001737624407, -0.02619788609445095, -0.01293303444981575, -0.04661397635936737, 0.04839464649558067, -0.01714387722313404, 0.011435545980930328, 0.074256032705307, -0.014816263690590858, -0.022446710616350174, -0.01198534294962883, 0.08024045079946518, 0.07302770018577576, 0.02713119052350521, 0.003943756688386202, 0.05228624865412712, -0.009159854613244534, -0.045931246131658554, 0.009085671044886112, -0.0048166243359446526, 0.0068651773035526276, -0.012597544118762016, 0.016090307384729385, 0.0479067824780941, -0.02216215617954731, 0.09192025661468506, -0.024348946288228035, -0.009741796180605888, 0.011920778080821037, -0.003717106534168124, 0.03144202381372452, 0.02795010805130005, -0.0018518348224461079, 0.039951615035533905, -0.02553188055753708, -0.011570509523153305, 0.02663963846862316, 0.028097614645957947, -0.014863548800349236, 0.019788149744272232, -0.023092832416296005, 0.022791123017668724, 0.013022143393754959, 0.025556392967700958, 0.062425170093774796, -0.03650662302970886, 0.00517286267131567, -0.00025877205189317465, 0.005870499182492495, -0.009859836660325527, -0.0015491561498492956, -0.02767339162528515, -0.029309367761015892, -0.01175716333091259, -0.05590178444981575, 0.0015110975364223123, -0.03465942665934563, -0.03671782463788986, -0.01755583845078945, -0.02029327303171158, 0.0224190354347229, 0.040182292461395264, 0.008006368763744831, -0.06874644011259079, -0.04216393083333969, -0.054290883243083954, -0.047103870660066605, -0.07269874215126038, 0.0024832107592374086, 0.020590750500559807, -0.018263401463627815, -0.029541140422225, -0.03985670581459999, -0.049397967755794525, -0.0011061233235523105, 0.01889309659600258, -0.04486192390322685, -0.04846660792827606, 0.021791834384202957, 0.02012699842453003, 0.02718696929514408, 0.019716907292604446, 0.05416889488697052, -0.010087639093399048, -0.032911453396081924, -0.008918225765228271, 0.010401562787592411, 0.05690879002213478, -0.005310552194714546, -0.000351282418705523, -0.08431418985128403, 0.022847207263112068, 0.016916560009121895, -0.029415760189294815, -0.06599821895360947, 0.01930256560444832, 0.055511925369501114, 0.009472500532865524, 0.048692524433135986, -0.029986539855599403, 0.005803604610264301, -0.0654064267873764, -0.034619543701410294, -0.03165757656097412, -0.005000167991966009, 0.05878116562962532, -0.025703636929392815, 0.07905872166156769, 0.055935513228178024, -0.018114153295755386, -0.046948086470365524, 0.0048894393257796764, -0.022327527403831482, 0.03880886361002922, -0.057856056839227676, -0.03267907351255417, -0.06049750745296478, -0.0824800431728363, -0.0009847228648141026, 0.016367264091968536, -0.04188813269138336, -0.032665520906448364, 0.003049983875826001, 0.026796599850058556, -0.02405559830367565, 0.004282117821276188, -0.05425478518009186, 0.018127111718058586, -0.026182742789387703, -0.01048032846301794, -0.025091778486967087, 0.05610787868499756, 0.03026522509753704, -0.015914784744381905, 0.018498744815587997, -0.03387032449245453, 0.026333501562476158, 0.006162135396152735, 0.011551895178854465, 0.06832598149776459, 0.000055337095545837656, -0.011414236389100552 ]
[ -0.0689346045255661, -0.01675361953675747, -0.03453777730464935, -0.05447835847735405, 0.08948647975921631, -0.05375366285443306, -0.04194815456867218, 0.015538424253463745, 0.01581847481429577, 0.02290564589202404, 0.02250470221042633, -0.09476498514413834, -0.011025848798453808, -0.04512053355574608, 0.03866051509976387, -0.013023468665778637, 0.013602441176772118, -0.06978286802768707, -0.03756179288029671, 0.06346943974494934, -0.03242095559835434, -0.02036864310503006, -0.05214858427643776, -0.06310921162366867, 0.0037123749498277903, 0.007787776179611683, 0.03608449921011925, -0.036698076874017715, -0.012331301346421242, -0.22125683724880219, 0.023608345538377762, -0.006822009105235338, -0.0019172955071553588, -0.0075180064886808395, 0.0238540880382061, 0.0054468512535095215, 0.0226422231644392, -0.007831420749425888, -0.0034679558593779802, 0.049070458859205246, 0.032176900655031204, 0.019975073635578156, -0.05193840712308884, -0.0070252916775643826, 0.01958886906504631, 0.00694507360458374, -0.014754523523151875, -0.0003229364810977131, 0.018185468390583992, 0.026707395911216736, -0.071244016289711, 0.034933991730213165, -0.005775790195912123, -0.018804069608449936, -0.018273452296853065, 0.020164310932159424, 0.047470126301050186, 0.05898748338222504, 0.02068423479795456, 0.006293862592428923, 0.013617251999676228, 0.00034456723369657993, -0.1255878508090973, 0.10952053219079971, -0.00486601609736681, 0.04115556180477142, -0.027506200596690178, -0.0005753333098255098, -0.028703803196549416, 0.08871021121740341, -0.05303326994180679, -0.04117991402745247, -0.05262993276119232, 0.07873648405075073, 0.009428084827959538, -0.032401345670223236, -0.01959955133497715, 0.019461756572127342, 0.003509970149025321, -0.013674119487404823, -0.053799815475940704, -0.017568062990903854, -0.03390882909297943, -0.046537917107343674, -0.038053158670663834, -0.005477294325828552, -0.026543451473116875, 0.05452840402722359, 0.003483128733932972, -0.007975625805556774, 0.05738159641623497, 0.00916303601115942, 0.0283979419618845, 0.007849961519241333, -0.10878270864486694, -0.02071765810251236, 0.030931057408452034, 0.03941876441240311, 0.0076405624859035015, 0.40830186009407043, -0.02583811804652214, -0.03862868249416351, 0.07865239679813385, 0.0318257100880146, 0.017560485750436783, 0.027783026918768883, -0.0014846422709524632, 0.0021560192108154297, 0.026203066110610962, -0.04660778120160103, 0.0007812759722582996, -0.03404465690255165, 0.06186230480670929, -0.04267114773392677, 0.02862975187599659, 0.010947179980576038, -0.008431884460151196, 0.017789751291275024, -0.00849476084113121, 0.01982242614030838, -0.011907633394002914, -0.0026337401941418648, 0.03663674369454384, 0.006995522417128086, 0.022062774747610092, 0.018720731139183044, 0.015710648149251938, 0.043618492782115936, 0.059681057929992676, 0.024195125326514244, 0.0378931388258934, -0.02289789728820324, -0.06550294160842896, 0.01101109478622675, 0.023689163848757744, 0.0019944575615227222, 0.05185273289680481, -0.028730003163218498, 0.04850338399410248, -0.004573914222419262, -0.009991060942411423, -0.05125002562999725, 0.04361360892653465, 0.0055849021300673485, -0.042285650968551636, 0.11083600670099258, 0.014679760672152042, -0.027013735845685005, -0.01315394975244999, -0.054365795105695724, 0.0003586196107789874, 0.04027290642261505, 0.004960924852639437, -0.07418040186166763, 0.03037089854478836, 0.017972422763705254, 0.08242963999509811, -0.016456549987196922, -0.09066319465637207, -0.037527699023485184, -0.03961163014173508, -0.04440547898411751, -0.015207282267510891, 0.05356248468160629, 0.047655459493398666, -0.0991915687918663, -0.033431801944971085, -0.0029579761903733015, 0.01609720103442669, -0.0549665242433548, 0.010875005275011063, -0.011527650989592075, -0.0530213937163353, -0.00051020277896896, 0.04724690318107605, -0.043994396924972534, -0.031242741271853447, 0.006888939533382654, 0.0816231220960617, 0.013280760496854782, -0.0022021664772182703, 0.016315901651978493, -0.026900293305516243, 0.031175365671515465, -0.07018707692623138, -0.06930617243051529, -0.07207611203193665, 0.012177711352705956, -0.006910448893904686, -0.0066803074441850185, -0.007908443920314312, -0.010031201876699924, -0.06563138216733932, 0.03927483782172203, -0.034811582416296005, 0.013494283892214298, 0.02539563551545143, 0.030991509556770325, -0.00781206926330924, -0.054895997047424316, 0.013768475502729416, 0.010537714697420597, -0.011875052936375141, 0.03754125162959099, -0.06420450657606125, 0.019251219928264618, 0.04706447571516037, -0.04879014194011688, 0.06620702892541885, 0.048301201313734055, -0.00993538461625576, -0.038377877324819565, -0.017766207456588745, 0.0032957722432911396, -0.03603192791342735, -0.019195184111595154, -0.02997913397848606, -0.019301678985357285, 0.03702886775135994, 0.03871370851993561, -0.019587146118283272, -0.07413751631975174, -0.024732543155550957, -0.34738990664482117, -0.03969265893101692, -0.01272222213447094, -0.0003638707275968045, 0.058616165071725845, -0.03541738539934158, -0.0005997124826535583, -0.004665895830839872, -0.0075898729264736176, 0.03787685185670853, 0.0622713603079319, -0.032752424478530884, -0.014429407194256783, -0.09655360132455826, -0.02950657717883587, -0.006038489751517773, -0.021061250939965248, -0.020221836864948273, -0.015293246135115623, 0.0272676944732666, 0.02556687407195568, -0.030509566888213158, -0.04828975349664688, -0.005094307940453291, 0.02038746140897274, -0.054736386984586716, 0.11590773612260818, 0.030853021889925003, 0.09775383770465851, -0.04300614446401596, 0.03871050104498863, 0.014075120911002159, 0.0010405967477709055, -0.06776402145624161, -0.017216334119439125, -0.036042019724845886, -0.001217741402797401, 0.038289960473775864, 0.01840570569038391, -0.022590594366192818, -0.03709755837917328, -0.009888880886137486, -0.02734672836959362, -0.02298864535987377, -0.03524736315011978, 0.03225389122962952, 0.013452159240841866, 0.0007913266308605671, -0.03519495204091072, 0.07196084409952164, 0.02334929071366787, 0.013080569915473461, 0.036301642656326294, 0.03436191752552986, 0.026058200746774673, -0.03493735194206238, -0.08098837733268738, -0.010003807954490185, 0.006442704237997532, -0.02145468443632126, 0.021001379936933517, 0.005128748714923859, 0.07310178130865097, -0.05763883516192436, -0.02585197240114212, 0.024006696417927742, 0.028228724375367165, -0.014204694889485836, 0.033752135932445526, -0.016611887142062187, -0.023305688053369522, 0.08648521453142166, -0.01093815267086029, 0.019793646410107613, 0.02745717763900757, 0.06522079557180405, -0.0013729195343330503, 0.04010411351919174, 0.01943567954003811, -0.0011845281114801764, 0.051342349499464035, 0.017102045938372612, 0.01846180483698845, -0.04380729794502258, 0.046465255320072174, 0.023453079164028168, -0.0026254619006067514, 0.006912779062986374, 0.03491684049367905, 0.030717279762029648, 0.008373275399208069, -0.0181080661714077, -0.03651387244462967, -0.016807883977890015, 0.0494411438703537, 0.017467688769102097, -0.26621660590171814, 0.029641618952155113, 0.057015568017959595, 0.06289280205965042, 0.006385883316397667, -0.01122890692204237, 0.027694033458828926, -0.04479847103357315, 0.003451762953773141, 0.04512011632323265, -0.008150333538651466, 0.019512902945280075, 0.0011696426663547754, 0.013103120028972626, 0.005263058468699455, -0.02399706095457077, 0.027132004499435425, 0.03478607162833214, 0.04280594736337662, 0.006550374440848827, 0.036584578454494476, -0.03958382084965706, 0.16075818240642548, 0.016684813424944878, 0.01262700092047453, 0.016205444931983948, 0.0012627922696992755, 0.018954535946249962, 0.053601428866386414, 0.00844354648143053, -0.023553112521767616, -0.013299048878252506, 0.027868766337633133, 0.01183033175766468, 0.00599965825676918, -0.04877771809697151, -0.04756882041692734, 0.039070628583431244, 0.03535198047757149, -0.005556524731218815, -0.005223014857620001, 0.010779640637338161, -0.04194040596485138, 0.02861653082072735, 0.055971838533878326, 0.008579593151807785, 0.0038278326392173767, -0.04155462980270386, -0.03876309469342232, -0.00699014263227582, -0.005419685039669275, -0.03196810185909271, -0.004130803979933262, -0.025644809007644653, 0.0006388780893757939, 0.0736604556441307, 0.02788000926375389, -0.006571941543370485, 0.07273406535387039, 0.02237805724143982, 0.005204026121646166, -0.0745946615934372, 0.09376252442598343, 0.04650989919900894, 0.0038904407992959023 ]
[ 0.019963983446359634, 0.025554852560162544, -0.032857127487659454, -0.041153114289045334, 0.00039218386518768966, 0.0020434570033103228, 0.009640539065003395, 0.023684225976467133, -0.021087560802698135, 0.004592569079250097, -0.035500578582286835, 0.018727706745266914, 0.004152002278715372, -0.021155495196580887, 0.0027148365043103695, -0.058591797947883606, 0.014491420239210129, -0.014457352459430695, 0.018388355150818825, -0.0012044337345287204, -0.026226811110973358, -0.009318873286247253, -0.004160518292337656, -0.016008347272872925, -0.06849008798599243, 0.014857230708003044, -0.05064954236149788, 0.013536886312067509, 0.007719315588474274, -0.12312452495098114, -0.015341876074671745, -0.04998423159122467, 0.0030060135759413242, 0.009175865910947323, -0.01943184994161129, -0.022296618670225143, -0.03525691106915474, 0.014932575635612011, -0.044904548674821854, 0.0012996605364605784, 0.024113783612847328, -0.004218497313559055, -0.012616992928087711, 0.056406501680612564, 0.009473348036408424, -0.008021603338420391, -0.006927502807229757, 0.008656703867018223, -0.017511721700429916, 0.019841395318508148, -0.08272211998701096, 0.02501858025789261, -0.02797473408281803, 0.0311849657446146, -0.032869499176740646, -0.013078009709715843, -0.02667723223567009, 0.00026476889615878463, 0.005976927932351828, 0.010855484753847122, 0.0059190173633396626, -0.015144968405365944, -0.024721551686525345, -0.012355584651231766, -0.0029100989922881126, -0.03456263244152069, 0.005660529248416424, 0.019255327060818672, 0.009204428642988205, 0.036830734461545944, -0.026930375024676323, 0.0385623425245285, -0.041481971740722656, 0.020336130633950233, 0.009823054075241089, -0.01311060506850481, -0.03080311417579651, -0.03123481571674347, 0.013482683338224888, -0.010301434434950352, -0.026221061125397682, -0.026563672348856926, 0.010449974797666073, 0.010253183543682098, 0.015716563910245895, -0.017972730100154877, 0.01604609750211239, 0.01568549871444702, -0.018237635493278503, 0.008702926337718964, -0.001071579521521926, 0.0416121631860733, 0.04210863634943962, 0.03432154282927513, -0.1170576959848404, 0.0508926659822464, -0.01848214492201805, 0.018438497558236122, -0.016393059864640236, 0.8138178586959839, 0.007079178933054209, -0.010109222494065762, 0.016922906041145325, 0.022554103285074234, -0.025179453194141388, -0.029957721009850502, -0.006235931068658829, 0.03840219974517822, 0.009447770193219185, -0.08057863265275955, 0.01500690821558237, 0.04153924807906151, -0.0012341034598648548, 0.0015267013804987073, -0.013827871531248093, 0.028127606958150864, -0.01646597310900688, 0.020566223189234734, 0.014615905471146107, 0.0000028012941584165674, -0.01277628168463707, -0.01581420749425888, -0.022078052163124084, -0.015576685778796673, -0.006429749540984631, -0.12611013650894165, 0.022998200729489326, -6.669106955304769e-33, 0.03848060593008995, -0.0407557338476181, 0.02708224020898342, -0.019927961751818657, 0.004422788508236408, 0.009623268619179726, -0.0012617793399840593, 0.02125033549964428, -0.041768185794353485, -0.024913867935538292, 0.06548181176185608, -0.029348192736506462, 0.012606972828507423, -0.01624315418303013, 0.04597952589392662, -0.017474506050348282, -0.0005266069201752543, 0.031218741089105606, 0.015248376876115799, -0.03485286980867386, 0.04345326870679855, 0.061113376170396805, 0.05841807276010513, 0.019479040056467056, 0.02507740631699562, 0.03515099734067917, -0.006360869854688644, -0.005494948476552963, -0.0018623282667249441, -0.029000286012887955, -0.025794165208935738, -0.024175982922315598, 0.008755695074796677, -0.05265643075108528, 0.052151039242744446, -0.03127328306436539, -0.026322703808546066, -0.001118508051149547, -0.006871588062494993, -0.020401395857334137, -0.04406123608350754, 0.008180285803973675, -0.045372284948825836, -0.012421303428709507, -0.06782032549381256, -0.009785773232579231, 0.0075079891830682755, 0.041745614260435104, -0.015976740047335625, 0.012526333332061768, 0.01709424890577793, -0.006578856147825718, 0.021540004760026932, -0.02542985789477825, -0.0046425191685557365, 0.056550282984972, 0.014395514503121376, 0.016658654436469078, -0.005369677674025297, -0.02325272560119629, 0.05730808153748512, -0.02131653018295765, 0.022350164130330086, 0.025438474491238594, 0.004336327314376831, -0.010581489652395248, 0.07326857000589371, 0.009752444922924042, 0.03554278984665871, -0.0032066639978438616, -0.0408041812479496, 0.042143430560827255, -0.018663747236132622, -0.034861791878938675, 0.04939178004860878, -0.015607381239533424, -0.007815102115273476, 0.0019930568523705006, 0.006437984760850668, -0.016738058999180794, 0.013844137080013752, -0.0025937259197235107, 0.01530308835208416, -0.032539013773202896, -0.040682513266801834, -0.022339222952723503, 0.03710091859102249, 0.005009790882468224, 0.0018670492572709918, -0.011050470173358917, 0.01749437488615513, 0.03363286703824997, -0.010501569136977196, -0.023009760305285454, -0.03295072913169861, 7.342710768732034e-33, 0.010703662410378456, 0.010718871839344501, -0.0172452200204134, 0.011971116997301579, 0.06427419930696487, -0.021857114508748055, 0.06838980317115784, 0.030496874824166298, -0.01861768774688244, 0.007254714611917734, -0.011050084605813026, -0.023761030286550522, -0.019624626263976097, 0.007263984065502882, -0.0029587706085294485, -0.01826307736337185, -0.0002282462955918163, -0.0018204529769718647, -0.03231017291545868, -0.04385187849402428, -0.03730691969394684, -0.013078238815069199, 0.06885343790054321, 0.03481857851147652, 0.03231740742921829, 0.013265417888760567, 0.007900873199105263, 0.017956726253032684, -0.008327594958245754, 0.030985325574874878, 0.03434518724679947, 0.0005749177071265876, -0.0001901663636090234, -0.013612059876322746, -0.05170680209994316, 0.030963532626628876, 0.037441711872816086, 0.014213145710527897, 0.03046231158077717, 0.023181607946753502, 0.036122094839811325, 0.034633323550224304, -0.02485913783311844, -0.0004918623017147183, 0.02391969785094261, 0.05210873857140541, 0.011926693841814995, 0.05077313631772995, -0.031177157536149025, 0.026107629761099815, 0.007953832857310772, 0.02935931831598282, 0.012876543216407299, 0.016091210767626762, 0.04104943946003914, -0.026903314515948296, -0.02689935825765133, 0.026198377832770348, -0.053733695298433304, -0.019692258909344673, -0.05137832462787628, 0.01824270747601986, -0.04278479889035225, 0.02883416786789894, 0.009679644368588924, 0.027214210480451584, -0.049398213624954224, -0.017435604706406593, -0.021330740302801132, -0.019079647958278656, -0.004799532238394022, -0.047731559723615646, -0.023057958111166954, 0.043115682899951935, -0.009237846359610558, -0.0020565027371048927, -0.019921105355024338, 0.020961429923772812, -0.0005867972504347563, 0.042940642684698105, 0.022547215223312378, 0.001279937569051981, 0.025771260261535645, 0.0074492464773356915, 0.015353900380432606, 0.05108393356204033, -0.021314607933163643, -0.006435077171772718, 0.016813179478049278, 0.021188508719205856, 0.011250609531998634, -0.03459785133600235, 0.014023356139659882, 0.016141802072525024, 0.025401262566447258, -1.2383055469911142e-8, -0.03631089627742767, 0.028471315279603004, -0.027476264163851738, 0.02839093841612339, -0.0004090168222319335, 0.04984482005238533, 0.00366345327347517, -0.01457203272730112, 0.024068644270300865, -0.0005506155430339277, 0.051238805055618286, -0.0547398179769516, 0.028615480288863182, 0.027207178995013237, -0.008519061841070652, -0.02963789366185665, 0.02560599148273468, -0.04101185500621796, 0.004977008793503046, -0.0016222160775214434, 0.01525131519883871, 0.050817910581827164, 0.01142003946006298, 0.02023947611451149, 0.013567633926868439, -0.0025508804246783257, -0.041799645870923996, -0.10554645210504532, -0.011830780655145645, -0.0010617056395858526, -0.011923936195671558, -0.045288264751434326, -0.013032237999141216, -0.02962690405547619, 0.00719773443415761, -0.007326142396777868, -0.02597041055560112, 0.007681428454816341, 0.04262622445821762, 0.018542010337114334, -0.014873876236379147, -0.012531056068837643, 0.0038443731609731913, -0.02215477079153061, 0.0030647851526737213, -0.005487409885972738, -0.025531955063343048, 0.02315567247569561, -0.004608344752341509, -0.030906150117516518, 0.005915103480219841, 0.007116910070180893, -0.006449360400438309, 0.011817365884780884, 0.0401514507830143, 0.004994653165340424, 0.0165130365639925, 0.010058360174298286, -0.026238664984703064, -0.018317682668566704, 0.03668319433927536, -0.02237650938332081, -0.020218217745423317, -0.006819620728492737 ]
export-csv-parquet-pandas-polars-duckdb
https://markhneedham.com/blog/2023/01/06/export-csv-parquet-pandas-polars-duckdb
false
2023-01-24 02:44:37
Flink SQL: Could not execute SQL statement. Reason: java.io.IOException: Corrupt Debezium JSON message
[ "flink", "kafka" ]
[ "Flink" ]
As part of a https://github.com/mneedham/pizza-shop-workshop[JFokus workshop^] that I'm working on I wanted to create a Flink table around a Kafka stream that I'd populated from MySQL with help from Debezium. In this blog post I want to show how to do this and explain an error that I encountered along the way. To start, we have a products table in MySQL that's publishing events to Apache Kafka. We can see the fields in this event by running the following command: [source, bash] ---- kcat -C -b localhost:29092 -t mysql.pizzashop.products -c1 | jq 'keys' ---- [source, json] ---- [ "payload", "schema" ] ---- Let's first have a look at the payload: [source, bash] ---- kcat -C -b localhost:29092 -t mysql.pizzashop.products -c1 | jq '.payload' ---- .Output [source, json] ---- { "before": null, "after": { "id": 1, "name": "Moroccan Spice Pasta Pizza - Veg", "description": "A pizza loaded with a spicy combination of Harissa sauce and delicious pasta.", "category": "veg pizzas", "price": 335, "image": "https://www.dominos.co.in//files/items/MoroccanSpicePPVG_N.jpg", "created_at": "2023-01-24T12:53:48Z", "updated_at": 1674564828000 }, "source": { "version": "1.8.1.Final", "connector": "mysql", "name": "mysql", "ts_ms": 1674565167817, "snapshot": "true", "db": "pizzashop", "sequence": null, "table": "products", "server_id": 0, "gtid": null, "file": "binlog.000002", "pos": 156, "row": 0, "thread": null, "query": null }, "op": "r", "ts_ms": 1674565167827, "transaction": null } ---- `before` is null because there wasn't anything there before. If we'd done an update to this record we'd see a `before` entry that contained all the fields that are under the `after` property. And now, we'll zoom in on the schema: [source, bash] ---- kcat -C -b localhost:29092 -t mysql.pizzashop.products -c1 | jq -c '.schema' ---- .Output [source, json] ---- {"type":"struct","fields":[{"type":"struct","fields":[{"type":"int64","optional":false,"field":"id"},{"type":"string","optional":true,"field":"name"},{"type":"string","optional":true,"field":"description"},{"type":"string","optional":true,"field":"category"},{"type":"double","optional":true,"field":"price"},{"type":"string","optional":true,"field":"image"},{"type":"string","optional":true,"name":"io.debezium.time.ZonedTimestamp","version":1,"field":"created_at"},{"type":"int64","optional":true,"name":"org.apache.kafka.connect.data.Timestamp","version":1,"default":0,"field":"updated_at"}],"optional":true,"name":"mysql.pizzashop.products.Value","field":"before"},{"type":"struct","fields":[{"type":"int64","optional":false,"field":"id"},{"type":"string","optional":true,"field":"name"},{"type":"string","optional":true,"field":"description"},{"type":"string","optional":true,"field":"category"},{"type":"double","optional":true,"field":"price"},{"type":"string","optional":true,"field":"image"},{"type":"string","optional":true,"name":"io.debezium.time.ZonedTimestamp","version":1,"field":"created_at"},{"type":"int64","optional":true,"name":"org.apache.kafka.connect.data.Timestamp","version":1,"default":0,"field":"updated_at"}],"optional":true,"name":"mysql.pizzashop.products.Value","field":"after"},{"type":"struct","fields":[{"type":"string","optional":false,"field":"version"},{"type":"string","optional":false,"field":"connector"},{"type":"string","optional":false,"field":"name"},{"type":"int64","optional":false,"field":"ts_ms"},{"type":"string","optional":true,"name":"io.debezium.data.Enum","version":1,"parameters":{"allowed":"true,last,false,incremental"},"default":"false","field":"snapshot"},{"type":"string","optional":false,"field":"db"},{"type":"string","optional":true,"field":"sequence"},{"type":"string","optional":true,"field":"table"},{"type":"int64","optional":false,"field":"server_id"},{"type":"string","optional":true,"field":"gtid"},{"type":"string","optional":false,"field":"file"},{"type":"int64","optional":false,"field":"pos"},{"type":"int32","optional":false,"field":"row"},{"type":"int64","optional":true,"field":"thread"},{"type":"string","optional":true,"field":"query"}],"optional":false,"name":"io.debezium.connector.mysql.Source","field":"source"},{"type":"string","optional":false,"field":"op"},{"type":"int64","optional":true,"field":"ts_ms"},{"type":"struct","fields":[{"type":"string","optional":false,"field":"id"},{"type":"int64","optional":false,"field":"total_order"},{"type":"int64","optional":false,"field":"data_collection_order"}],"optional":true,"field":"transaction"}],"optional":false,"name":"mysql.pizzashop.products.Envelope"} ---- There's a lot there, let's get a list of fields in the schema: [source, bash] ---- kcat -C -b localhost:29092 -t mysql.pizzashop.products -c1 | jq -c '.schema .fields[] .field' ---- .Output [source, json] ---- "before" "after" "source" "op" "ts_ms" "transaction" ---- Let's select the schema for the `before` field: [source, bash] ---- kcat -C -b localhost:29092 -t mysql.pizzashop.products -c1 | jq '.schema .fields[] | select(.field == "before")' ---- .Output [source, json] ---- { "type": "struct", "fields": [ { "type": "int64", "optional": false, "field": "id" }, { "type": "string", "optional": true, "field": "name" }, { "type": "string", "optional": true, "field": "description" }, { "type": "string", "optional": true, "field": "category" }, { "type": "double", "optional": true, "field": "price" }, { "type": "string", "optional": true, "field": "image" }, { "type": "string", "optional": true, "name": "io.debezium.time.ZonedTimestamp", "version": 1, "field": "created_at" }, { "type": "int64", "optional": true, "name": "org.apache.kafka.connect.data.Timestamp", "version": 1, "default": 0, "field": "updated_at" } ], "optional": true, "name": "mysql.pizzashop.products.Value", "field": "before" } ---- Next, we're going to launch the Flink CLI and create a `Products` table with the `mysql.pizzashop.products` topic as its source: [source, sql] ---- CREATE TABLE Products ( `event_time` TIMESTAMP(3) METADATA FROM 'timestamp', `partition` BIGINT METADATA VIRTUAL, `offset` BIGINT METADATA VIRTUAL, `id` STRING, `name` STRING, `description` STRING, `category` STRING, `price` DOUBLE, `image` STRING, `createdAt` STRING ) WITH ( 'connector' = 'kafka', 'topic' = 'mysql.pizzashop.products', 'properties.bootstrap.servers' = 'kafka:9092', 'properties.group.id' = 'testGroup', 'scan.startup.mode' = 'earliest-offset', 'format' = 'debezium-json' ); ---- .Output [source, text] ---- [INFO] Execute statement succeed. ---- Now let's try to query the table: [source, sql] ---- SELECT * FROM Products; ---- This results in the following error: .Output [source, text] ---- [ERROR] Could not execute SQL statement. Reason: java.io.IOException: Corrupt Debezium JSON message '{"schema":{"type":"struct","fields":[{"type":"struct","fields":[{"type":"int64","optional":false,"field":"id"},{"type":"string","optional":true,"field":"name"},{"type":"string","optional":true,"field":"description"},{"type":"string","optional":true,"field":"category"},{"type":"double","optional":true,"field":"price"},{"type":"string","optional":true,"field":"image"},{"type":"string","optional":true,"name":"io.debezium.time.ZonedTimestamp","version":1,"field":"created_at"},{"type":"int64","optional":true,"name":"org.apache.kafka.connect.data.Timestamp","version":1,"default":0,"field":"updated_at"}],"optional":true,"name":"mysql.pizzashop.products.Value","field":"before"},{"type":"struct","fields":[{"type":"int64","optional":false,"field":"id"},{"type":"string","optional":true,"field":"name"},{"type":"string","optional":true,"field":"description"},{"type":"string","optional":true,"field":"category"},{"type":"double","optional":true,"field":"price"},{"type":"string","optional":true,"field":"image"},{"type":"string","optional":true,"name":"io.debezium.time.ZonedTimestamp","version":1,"field":"created_at"},{"type":"int64","optional":true,"name":"org.apache.kafka.connect.data.Timestamp","version":1,"default":0,"field":"updated_at"}],"optional":true,"name":"mysql.pizzashop.products.Value","field":"after"},{"type":"struct","fields":[{"type":"string","optional":false,"field":"version"},{"type":"string","optional":false,"field":"connector"},{"type":"string","optional":false,"field":"name"},{"type":"int64","optional":false,"field":"ts_ms"},{"type":"string","optional":true,"name":"io.debezium.data.Enum","version":1,"parameters":{"allowed":"true,last,false,incremental"},"default":"false","field":"snapshot"},{"type":"string","optional":false,"field":"db"},{"type":"string","optional":true,"field":"sequence"},{"type":"string","optional":true,"field":"table"},{"type":"int64","optional":false,"field":"server_id"},{"type":"string","optional":true,"field":"gtid"},{"type":"string","optional":false,"field":"file"},{"type":"int64","optional":false,"field":"pos"},{"type":"int32","optional":false,"field":"row"},{"type":"int64","optional":true,"field":"thread"},{"type":"string","optional":true,"field":"query"}],"optional":false,"name":"io.debezium.connector.mysql.Source","field":"source"},{"type":"string","optional":false,"field":"op"},{"type":"int64","optional":true,"field":"ts_ms"},{"type":"struct","fields":[{"type":"string","optional":false,"field":"id"},{"type":"int64","optional":false,"field":"total_order"},{"type":"int64","optional":false,"field":"data_collection_order"}],"optional":true,"field":"transaction"}],"optional":false,"name":"mysql.pizzashop.products.Envelope"},"payload":{"before":null,"after":{"id":1,"name":"Moroccan Spice Pasta Pizza - Veg","description":"A pizza loaded with a spicy combination of Harissa sauce and delicious pasta.","category":"veg pizzas","price":335.0,"image":"https://www.dominos.co.in//files/items/MoroccanSpicePPVG_N.jpg","created_at":"2023-01-24T12:53:48Z","updated_at":1674564828000},"source":{"version":"1.8.1.Final","connector":"mysql","name":"mysql","ts_ms":1674565167817,"snapshot":"true","db":"pizzashop","sequence":null,"table":"products","server_id":0,"gtid":null,"file":"binlog.000002","pos":156,"row":0,"thread":null,"query":null},"op":"r","ts_ms":1674565167827,"transaction":null}}'. ---- A bit of Googling led me to https://stackoverflow.com/questions/74779675/flink-failed-to-deserialize-json-produced-by-debezium[this StackOverflow question^], but my issue didn't seem to match those on that thread. Instead the problem is actually that we need to specify an extra property for the table, as described in https://nightlies.apache.org/flink/flink-docs-master/docs/connectors/table/formats/debezium/[the documentation^]: [quote] ____ In order to interpret such messages, you need to add the option 'debezium-json.schema-include' = 'true' into above DDL WITH clause (false by default). Usually, this is not recommended to include schema because this makes the messages very verbose and reduces parsing performance. ____ Let's fix our table by adding `'debezium-json.schema-include' = 'true'` to the `WITH` part of the `CREATE` clause: [source, sql] ---- DROP TABLE Products; CREATE TABLE Products ( `event_time` TIMESTAMP(3) METADATA FROM 'timestamp', `partition` BIGINT METADATA VIRTUAL, `offset` BIGINT METADATA VIRTUAL, `id` STRING, `name` STRING, `description` STRING, `category` STRING, `price` DOUBLE, `image` STRING, `createdAt` STRING ) WITH ( 'connector' = 'kafka', 'topic' = 'mysql.pizzashop.products', 'properties.bootstrap.servers' = 'kafka:9092', 'properties.group.id' = 'testGroup', 'scan.startup.mode' = 'earliest-offset', 'format' = 'debezium-json', 'debezium-json.schema-include' = 'true' ); ---- If we query the table again, this time it works!
In this post we'll learn how to work around the Corrupt Debezium JSON message when using Flink SQL.
uploads/2023/01/flink-corruption-banner.png
[ -0.0007959212525747716, -0.015640810132026672, -0.0166439488530159, 0.03663873299956322, 0.09697708487510681, 0.0005782852531410754, -0.001030039507895708, 0.0728372111916542, 0.01636737771332264, -0.007967917248606682, -0.016092611476778984, -0.008954118937253952, -0.07523705810308456, 0.030621366575360298, -0.0029194867238402367, 0.05008823797106743, 0.08204329758882523, 0.009453454986214638, 0.03782322630286217, 0.020337648689746857, 0.013348664157092571, 0.05557825043797493, -0.0016720882849767804, 0.05319812893867493, 0.014300018548965454, 0.014851710759103298, 0.0011588935740292072, 0.016010381281375885, -0.06413833051919937, 0.004381522536277771, 0.029036005958914757, -0.0021235302556306124, 0.000987397157587111, -0.03185490891337395, 0.020346667617559433, -0.003592913504689932, -0.010258725844323635, 0.03019927442073822, 0.00593411922454834, 0.03263777121901512, -0.0813586637377739, 0.03415435180068016, -0.0007657670066691935, 0.03773688152432442, -0.018364595249295235, 0.012461191043257713, -0.054913878440856934, 0.011681605130434036, -0.002798026893287897, 0.009817901067435741, -0.057124633342027664, 0.027480358257889748, -0.021613815799355507, 0.005987658631056547, 0.019931895658373833, 0.045831553637981415, 0.00674967747181654, -0.06594030559062958, 0.03774019330739975, -0.03804643824696541, 0.0008634848054498434, -0.01288190670311451, 0.022829251363873482, 0.02845628559589386, 0.005456364247947931, -0.029621366411447525, -0.002037715632468462, 0.050850290805101395, -0.012214955873787403, -0.02610769309103489, 0.019273240119218826, 0.03382512181997299, -0.03123721107840538, -0.03604305163025856, 0.020496631041169167, -0.03536546230316162, -0.018991520628333092, 0.0635257214307785, 0.017381252720952034, 0.047303084284067154, -0.03126735985279083, -0.012987345457077026, 0.020841358229517937, 0.037472572177648544, 0.013390635140240192, -0.06219426915049553, -0.031716905534267426, -0.028104009106755257, -0.04598256200551987, 0.058747004717588425, 0.022472016513347626, -0.031649183481931686, 0.01548338495194912, -0.001871383166871965, -0.02596113085746765, 0.025667084380984306, 0.018111106008291245, 0.028973374515771866, -0.0028478826861828566, -0.01066659577190876, -0.05813634395599365, 0.005791401490569115, 0.011884878389537334, 0.05748129263520241, -0.07119102776050568, -0.005820089485496283, -0.05628199502825737, -0.024946339428424835, 0.011148707009851933, 0.01528877206146717, 0.005730023607611656, 0.0010604396229609847, -0.005196833983063698, 0.01306338794529438, -0.08994501829147339, 0.0714028999209404, 0.013856662437319756, -0.050157081335783005, 0.0126124806702137, -0.00672462023794651, 0.07325789332389832, 0.025246242061257362, -0.010266169905662537, 0.08111889660358429, 0.007685187738388777, 0.010791689157485962, -0.0007945650140754879, 0.05336328595876694, -0.008289423771202564, -0.058200202882289886, -0.012460369616746902, 0.05455920100212097, 0.014948862604796886, -0.003160378197208047, 0.0048256670124828815, 0.008872909471392632, 0.007405455689877272, 0.0042344038374722, 0.06923802942037582, 0.02083277702331543, 0.010150104761123657, -0.05650843679904938, -0.011405409313738346, 0.011168214492499828, 0.035643115639686584, 0.023676345124840736, 0.009911864995956421, -0.056651245802640915, -0.02629156783223152, 0.014881251379847527, 0.0224227886646986, 0.036213479936122894, 0.05145006626844406, -0.0034608591813594103, 0.0035865879617631435, 0.07850465923547745, 0.005453156773000956, -0.00409567030146718, -0.028630703687667847, 0.02373690716922283, 0.04253078252077103, 0.02386566996574402, 0.013833139091730118, 0.024728847667574883, -0.00038483497337438166, -0.030187290161848068, 0.03805165737867355, 0.03117261454463005, -0.01835460774600506, 0.014050988480448723, -0.0598301999270916, -0.048864319920539856, 0.05616031959652901, -0.01027829572558403, -0.005479744635522366, 0.04346977919340134, 0.08721289038658142, 0.026530671864748, 0.025224022567272186, 0.048526983708143234, -0.0719965323805809, 0.024135245010256767, -0.011868728324770927, 0.006527380086481571, 0.024406682699918747, -0.004711277317255735, 0.06209154054522514, 0.01972155086696148, 0.011298137716948986, 0.025970816612243652, -0.08794598281383514, -0.07453402131795883, -0.04191357269883156, 0.015683496370911598, 0.05857425183057785, -0.043379493057727814, -0.0005044465069659054, 0.06690502166748047, 0.039314378052949905, 0.03354938328266144, -0.021169651299715042, 0.018320232629776, 0.017115505412220955, -0.06764842569828033, -0.05514703318476677, 0.04360686615109444, 0.010603046976029873, -0.032303035259246826, -0.03965286165475845, 0.004468376282602549, -0.05049486830830574, -0.017879771068692207, 0.03559623286128044, -0.02584315650165081, 0.05188426375389099, 0.01929093897342682, 0.037522222846746445, 0.00006923194450791925, 0.039076294749975204, -0.04313187301158905, 0.0544520765542984, 0.03735336661338806, -0.021019859239459038, -0.008987128734588623, -0.03162406384944916, 0.12547144293785095, 0.04930315911769867, -0.005070933606475592, -0.03214474022388458, 0.07291259616613388, -0.0023846146650612354, -0.02781147137284279, 0.008499017916619778, -0.03444253280758858, 0.0000856192345963791, -0.025296121835708618, -0.022814607247710228, -0.034683190286159515, -0.004410926718264818, -0.02143443003296852, 0.02656685747206211, 0.0750274509191513, -0.0584162175655365, 0.0562138669192791, 0.025428667664527893, -0.03703578934073448, 0.0006310935714282095, -0.02688165195286274, -0.05298653990030289, 0.015342624858021736, 0.01192113570868969, 0.0011603033635765314, 0.05150820314884186, -0.06297449767589569, -0.03176771104335785, -0.012562519870698452, -0.056229013949632645, 0.04919667914509773, 0.031004874035716057, 0.056460265070199966, -0.04209207370877266, 0.04302578791975975, -0.0240983534604311, 0.0023573506623506546, -0.017895890399813652, -0.025794077664613724, -0.011191382072865963, -0.007626495789736509, 0.0116819953545928, 0.021764211356639862, 0.046657364815473557, 0.0012843296863138676, -0.009023250080645084, 0.02005651220679283, -0.014328614808619022, 0.011230656877160072, 0.02268075942993164, -0.014964144676923752, -0.005343601573258638, -0.03344361484050751, -0.03411947935819626, 0.04588723182678223, -0.06156916543841362, -0.0238952599465847, 0.0313669890165329, -0.04037071391940117, 0.0435103178024292, -0.06240534037351608, -0.03784739226102829, -0.014483795501291752, 0.009260982275009155, 0.043437659740448, -0.004717815201729536, -0.0310251172631979, 0.0790594145655632, -0.0019638349767774343, -0.013070497661828995, 0.0031251225154846907, -0.0028135490138083696, 0.037429843097925186, -0.01162453182041645, 0.018401632085442543, 0.048501987010240555, -0.0008798952912911773, -0.014302155934274197, -0.05119156837463379, 0.019142938777804375, -0.017707327380776405, -0.27724355459213257, 0.04382161796092987, -0.00772871682420373, -0.02297987975180149, 0.020533576607704163, -0.006656060926616192, 0.002150941174477339, -0.03133801370859146, 0.0027385540306568146, -0.011895265430212021, -0.013889946974813938, -0.04488683119416237, -0.015522967092692852, 0.044901780784130096, 0.013854896649718285, 0.00003493502299534157, -0.008947224356234074, -0.0361228883266449, 0.0026794723235070705, 0.0070809293538331985, -0.014935288578271866, -0.062498293817043304, -0.016890473663806915, 0.03068689815700054, 0.04427656531333923, 0.0340016633272171, -0.0825914591550827, 0.03978142887353897, -0.04320763424038887, -0.029672957956790924, -0.005329505540430546, -0.024836061522364616, -0.013938266783952713, 0.00038340649916790426, -0.014765207655727863, 0.003254424314945936, 0.021719438955187798, -0.02286985144019127, 0.013934806920588017, 0.008916893042623997, -0.014917965047061443, -0.025340469554066658, -0.003576523857191205, -0.006015895400196314, 0.10844184458255768, -0.011691753752529621, -0.08668173849582672, 0.0044973683543503284, -0.03511809557676315, 0.04899097606539726, -0.017317943274974823, -0.06175365298986435, -0.013307844288647175, 0.04628603532910347, -0.016188297420740128, -0.003938682377338409, -0.007158932276070118, -0.006005730479955673, -0.022139975801110268, -0.019940590485930443, 0.0067276800982654095, -0.03810141235589981, -0.00777000468224287, -0.04874300956726074, 0.0031659991946071386, -0.05144182965159416, -0.05199405923485756, 0.0003120053152088076, 0.08451779186725616, 0.03522680327296257, -0.03456461802124977, -0.02575710602104664, -0.038587890565395355, -0.12207633256912231, -0.007573039270937443, -0.033232975751161575, -0.022462118417024612, -0.0010969453724101186, -0.018311910331249237, 0.040583301335573196, -0.016410881653428078, -0.03703467547893524, -0.00011656159767881036, -0.019096627831459045, 0.03137900307774544, -0.0179729126393795, 0.013997982256114483, -0.020868541672825813, -0.047062814235687256, -0.010203635320067406, 0.05891047418117523, -0.04885904863476753, -0.013726403936743736, -0.03839316964149475, -0.030901402235031128, 0.06408479809761047, -0.022664852440357208, 0.00125981867313385, -0.01383905578404665, 0.052167318761348724, 0.028285901993513107, -0.06348992139101028, -0.002601433079689741, -0.026713969185948372, -0.010284400545060635, 0.013512805104255676, -0.05139601230621338, 0.003088671015575528, 0.025928916409611702, 0.044418588280677795, -0.021032018586993217, -0.036136314272880554, 0.03019029088318348, -0.062168728560209274, -0.04498186707496643, -0.0026652684900909662, 0.01564396545290947, 0.027508126571774483, -0.010578619316220284, -0.0292624793946743, -0.04258093982934952, 0.014572654850780964, 0.012727351859211922, -0.03247852623462677, -0.04253442585468292, -0.030172526836395264, -0.027372514829039574, -0.026343118399381638, 0.015495062805712223, -0.003287683939561248, 0.010447747074067593, 0.016079740598797798, 0.039805762469768524, -0.01894528977572918, 0.03352607041597366, -0.006793396081775427, -0.04773582145571709, -0.037803541868925095, 0.0130450539290905, -0.004695780575275421, -0.005332067608833313, -0.011336082592606544, 0.0037871277891099453, 0.04158119484782219, 0.01873423345386982, 0.019147561863064766, 0.015068329870700836, 0.009358121082186699, 0.016320399940013885, 0.024442607536911964, 0.01082229521125555, -0.007929330691695213, 0.005026102066040039, -0.0141083262860775, -0.0298183374106884, -0.008230158127844334, 0.04071735963225365, 0.0017750635743141174, -0.02991863712668419, -0.03329792246222496, -0.00007640523836016655, -0.06984947621822357, -0.008628210984170437, 0.008200587704777718, -0.01531955786049366, 0.048898354172706604, 0.023892344906926155, 0.016080724075436592, -0.010964061133563519, 0.0013903110520914197, -0.027957497164607048, -0.005582381505519152, -0.019804220646619797, 0.0010570725426077843, -0.0018438275437802076, -0.015251179225742817, 0.022560829296708107, 0.010987035930156708, 0.013582242652773857, -0.016501838341355324, -0.001810284797102213, -0.010667607188224792, 0.023112626746296883, 0.010288067162036896, 0.047136787325143814, 0.03521716967225075, -0.0306458231061697, -0.00580519437789917, -0.01959756761789322, -0.023914970457553864, -0.00995032861828804, 0.0016176924109458923, 0.0025259016547352076, -0.00564833777025342, -0.007219881284981966, -0.06958598643541336, 0.059646621346473694, 0.0270857997238636, 0.005038207396864891, -0.004666097927838564, -0.012775355018675327, 0.03244448080658913, -0.028543276712298393, 0.04949521645903587, 0.07204678654670715, -0.05222956836223602, -0.007345670834183693, -0.017987314611673355, 0.016180654987692833, 0.00421519111841917, 0.029225893318653107, -0.04602930322289467, -0.0012540514580905437, 0.00818953849375248, 0.009151245467364788, -0.03846503049135208, -0.01810004934668541, 0.006829978432506323, 0.005551699548959732, 0.02933249995112419, 0.018376994878053665, 0.011465800926089287, -0.0008719850447960198, -0.0042316727340221405, -0.02015894651412964, 0.041483622044324875, -0.03087056241929531, -0.0011724232463166118, 0.02225024253129959, -0.01373760774731636, 0.0298529714345932, -0.040143225342035294, 0.033684663474559784, 0.008634550496935844, -0.021675333380699158, 0.019584808498620987, -0.048904240131378174, -0.01885005086660385, -0.0007636813679710031, 0.0722510814666748, -0.0029546301811933517, -0.011856228113174438, -0.029026223346590996, 0.01570728048682213, -0.01576484553515911, -0.0010761719895526767, 0.009351911954581738, -0.0015944096958264709, 0.024815861135721207, 0.02845599316060543, -0.00015555326535832137, 0.03366605564951897, 0.006285176612436771, -0.03431132808327675, 0.07179827243089676, -0.059748969972133636, -0.016584863886237144, -0.02496456913650036, -0.0637228861451149, 0.0027448360342532396, 0.0022072861902415752, 0.023935196921229362, -0.05701553449034691, 0.06983678787946701, 0.03824056312441826, 0.012083614245057106, 0.03429315239191055, -0.02642662264406681, 0.01632024720311165, -0.004061888437718153, -0.044237397611141205, -0.0843663290143013, 0.0035645661409944296, 0.026939736679196358, -0.02617506869137287, 0.015604976564645767, -0.012821584939956665, -0.07058313488960266, 0.010289286263287067, -0.06622153520584106, -0.007455340586602688, 0.026776740327477455, -0.011600751429796219, 0.00012764665007125586, -0.012264019809663296, -0.04272745922207832, 0.007292581722140312, 0.039065130054950714, -0.03507951274514198, -0.013321139849722385, -0.02190289832651615, 0.058958183974027634, 0.02806212566792965, 0.022415265440940857, -0.02771606482565403, -0.01140678022056818, 0.09874245524406433, 0.0005930940969847143, 0.023090844973921776, 0.05068094655871391, -0.018815981224179268, 0.03966854512691498, 0.029572399333119392, 0.00532382819801569, 0.040493208914995193, 0.02565944567322731, -0.058706022799015045, -0.0462113656103611, 0.028986729681491852, 0.015506920404732227, -0.019022494554519653, -0.04696882888674736, 0.07649552077054977, 0.0015201549977064133, -0.05130094289779663, -0.047678254544734955, 0.02307792380452156, -0.0410572811961174, -0.03170264512300491, -0.03164614737033844, 0.03109625168144703, -0.08962546288967133, 0.0636412650346756, -0.02211589738726616, 0.019767506048083305, 0.05129029601812363, -0.015549756586551666, 0.010967012494802475, 0.008048726245760918, 0.0791497454047203, 0.0736074149608612, 0.022733375430107117, 0.004926580004394054, 0.04624023288488388, -0.02278469130396843, -0.02574390359222889, -0.02339920774102211, -0.020822633057832718, -0.04360475018620491, -0.008268875069916248, 0.00694379024207592, 0.07390418648719788, -0.014744443818926811, 0.07311620563268661, -0.0022023548372089863, -0.006049819756299257, 0.008673875592648983, -0.00022771957446821034, 0.026490604504942894, 0.05277938023209572, 0.0012542319018393755, 0.03630184754729271, 0.006343850400298834, -0.05039552226662636, 0.016551638022065163, -0.01295356173068285, -0.023472994565963745, 0.028439821675419807, -0.010791284963488579, 0.03608548641204834, 0.03449683636426926, 0.03843691572546959, 0.07758840173482895, -0.0015629067784175277, -0.012489530257880688, 0.013780135661363602, -0.005976746790111065, -0.03422722592949867, 0.035159677267074585, -0.019561445340514183, -0.02694174088537693, -0.013141710311174393, -0.06097863242030144, 0.02043965272605419, -0.019424941390752792, -0.01929720863699913, 0.011824288405478, -0.006970597431063652, -0.008030231110751629, 0.04147028550505638, -0.012571456842124462, -0.04480545222759247, -0.04981372132897377, -0.046836141496896744, -0.04925772175192833, -0.059110529720783234, -0.014819344505667686, -0.019063599407672882, -0.023357141762971878, -0.030864810571074486, -0.03181297332048416, -0.023266155272722244, -0.0019620689563453197, 0.013871476985514164, -0.04748724028468132, -0.02158198691904545, 0.01570192165672779, -0.010028788819909096, -0.00235615368001163, 0.01533310953527689, 0.04687674716114998, 0.00653250003233552, 0.0038462942466139793, -0.01343716774135828, -0.007946695201098919, 0.041252218186855316, -0.015496370382606983, 0.01006774976849556, -0.07511335611343384, 0.051665935665369034, 0.01770719513297081, -0.00022114257444627583, -0.06038183718919754, 0.035664673894643784, 0.049266982823610306, -0.012562992982566357, 0.06301438063383102, -0.027904756367206573, 0.014965170994400978, -0.040788792073726654, -0.06202921271324158, -0.02146393433213234, 0.007961493916809559, 0.05217857286334038, -0.010004352778196335, 0.09186399728059769, 0.07663565874099731, -0.016547678038477898, -0.029913851991295815, -0.02215902879834175, 0.009900555945932865, -0.006578942760825157, -0.014545627869665623, -0.0312088243663311, -0.053851418197155, -0.07588449865579605, -0.0185774564743042, 0.008791613392531872, -0.016660423949360847, -0.02896704711019993, 0.012876834720373154, 0.015227997675538063, -0.04229258745908737, 0.00787495356053114, -0.03895317763090134, 0.013136612251400948, -0.038809049874544144, -0.03732994943857193, -0.04955192282795906, 0.013850362040102482, 0.007993689738214016, -0.02757011540234089, 0.014510602690279484, -0.0486823134124279, 0.010784920305013657, 0.006765703205019236, 0.036166079342365265, 0.02712821774184704, -0.02689281478524208, 0.0007676433888264 ]
[ -0.06937679648399353, -0.05443376675248146, -0.010806767269968987, -0.01709717884659767, 0.03126867488026619, -0.05306023359298706, -0.04046972841024399, 0.01750582456588745, 0.008404695428907871, -0.018709365278482437, 0.011836004443466663, -0.04394672438502312, 0.008293790742754936, -0.014538981951773167, 0.09069309383630753, -0.021248117089271545, 0.004621392115950584, -0.06904485076665878, -0.06158501282334328, 0.00794167723506689, 0.010238230228424072, -0.057309575378894806, -0.06673091650009155, -0.04133791849017143, 0.011152672581374645, 0.05209559202194214, 0.050845347344875336, -0.02993345446884632, -0.04281197488307953, -0.19393028318881989, 0.02524430863559246, -0.03235214203596115, 0.009435847401618958, -0.0390281081199646, -0.010376928374171257, 0.022742630913853645, 0.006341004744172096, -0.03402731940150261, 0.031802743673324585, 0.056421320885419846, 0.06462828814983368, -0.009604437276721, -0.0474073626101017, -0.020748650655150414, 0.017397794872522354, -0.04339393973350525, -0.018620138987898827, 0.018177423626184464, 0.028761940076947212, 0.005798115395009518, -0.09907156229019165, 0.011607366614043713, 0.004183772020041943, -0.043274734169244766, 0.024429870769381523, 0.04373005032539368, 0.033009499311447144, 0.08487960696220398, 0.02735130861401558, 0.04475655406713486, 0.03533016890287399, -0.0054488652385771275, -0.13348974287509918, 0.1025569960474968, -0.014646894298493862, 0.040057968348264694, -0.04440665245056152, -0.007333063520491123, -0.00861397199332714, 0.03282882273197174, 0.009962658397853374, -0.007190348580479622, -0.01064582820981741, 0.10942365974187851, 0.024036452174186707, -0.03742057457566261, -0.0198031198233366, 0.02750960923731327, 0.005982056725770235, 0.009224120527505875, -0.08189157396554947, -0.009128925390541553, -0.02722490206360817, -0.02196635864675045, -0.05440574884414673, 0.010529005900025368, -0.010800325311720371, 0.04495877027511597, 0.017772363498806953, 0.024697842076420784, 0.0013099979842081666, -0.02008875086903572, 0.054504916071891785, 0.00790824368596077, -0.10831469297409058, -0.01492281537503004, -0.0553411990404129, -0.0025626197457313538, -0.04131392389535904, 0.36464589834213257, 0.0071547734551131725, -0.02660953812301159, 0.032949745655059814, 0.016702614724636078, -0.007320878095924854, 0.008296786807477474, -0.012764178216457367, -0.023788487538695335, 0.038690824061632156, -0.014166231267154217, -0.01987450383603573, 0.0002760303905233741, 0.041758205741643906, -0.047602567821741104, 0.01641938090324402, 0.01575976423919201, 0.04134979844093323, 0.0030709898564964533, -0.03999201953411102, 0.026705710217356682, 0.010819795541465282, 0.052980948239564896, 0.019758250564336777, 0.021524742245674133, 0.025447435677051544, -0.001934356288984418, 0.006964781321585178, 0.06640489399433136, 0.029852787032723427, 0.0286552757024765, 0.012401043437421322, -0.022182907909154892, -0.027828391641378403, -0.005851049441844225, -0.023018741980195045, 0.019190192222595215, 0.03187514469027519, -0.027594950050115585, -0.002283115405589342, 0.004185507073998451, -0.04262961074709892, -0.049413587898015976, 0.031024377793073654, -0.03368978574872017, -0.003223832231014967, 0.10859793424606323, 0.02841143310070038, -0.007123115938156843, -0.026064768433570862, -0.035220589488744736, -0.027502665296196938, 0.024296997115015984, 0.031239472329616547, -0.03493677079677582, 0.007762526627629995, 0.026677371934056282, 0.021189743652939796, 0.010058680549263954, -0.0301741324365139, -0.02477545104920864, -0.028742602095007896, -0.0906020924448967, -0.03047061525285244, 0.05467661842703819, -0.0012128710513934493, -0.13987894356250763, -0.043805766850709915, 0.017645681276917458, 0.012585898861289024, -0.07366494834423065, 0.020929722115397453, 0.01894500106573105, -0.06169791892170906, 0.0055137318558990955, 0.04561625421047211, -0.006192625965923071, -0.021694887429475784, 0.04173143580555916, 0.03073861077427864, 0.007559371180832386, 0.023217083886265755, 0.029632089659571648, -0.03726310655474663, -0.016560686752200127, -0.037712212651968, -0.09436491131782532, -0.05759422853589058, -0.007794229779392481, -0.034111086279153824, -0.02283530682325363, -0.04109324514865875, -0.01670236326754093, -0.07322763651609421, 0.05379412695765495, 0.013451646082103252, -0.023063013330101967, 0.024521013721823692, 0.04636146500706673, 0.019324401393532753, -0.04948335513472557, 0.04212331399321556, 0.03763090446591377, -0.04743996262550354, 0.0347716249525547, -0.07468114048242569, 0.012751296162605286, 0.04318437725305557, -0.03396330773830414, 0.053604353219270706, 0.014862952753901482, -0.03357505798339844, 0.01858961023390293, -0.03547964617609978, 0.023629598319530487, -0.0021925910841673613, 0.005228498484939337, 0.003377205226570368, 0.013674473389983177, 0.01599143259227276, 0.016017062589526176, 0.0003732495824806392, -0.020791636779904366, -0.012313220649957657, -0.3507157266139984, -0.020568307489156723, -0.009376691654324532, 0.0026208548806607723, -0.02615009993314743, -0.023356102406978607, -0.001969213830307126, -0.02745457924902439, -0.004416356328874826, 0.05217188596725464, 0.11627647280693054, -0.030306413769721985, 0.014173400588333607, -0.07230277359485626, -0.028968043625354767, 0.021288234740495682, -0.036786533892154694, -0.027077315375208855, -0.01657276041805744, 0.017619643360376358, 0.014319146983325481, -0.01926601678133011, -0.005605057813227177, -0.039571620523929596, 0.0124486293643713, 0.002219549845904112, 0.13416345417499542, 0.06711392104625702, 0.04143529385328293, -0.09547943621873856, 0.08515479415655136, 0.0344185046851635, -0.016566520556807518, -0.0745665431022644, 0.0016364117618650198, -0.015891756862401962, 0.009918177500367165, 0.007396399043500423, -0.010941079817712307, 0.026507893577218056, -0.09482410550117493, 0.02243538573384285, -0.03268629312515259, -0.07898717373609543, 0.0027558065485209227, -0.007623192388564348, -0.0002630863164085895, -0.018640827387571335, -0.02091136947274208, 0.08180844783782959, 0.03617717698216438, -0.00811491534113884, 0.05177486687898636, 0.013332701288163662, 0.03722579404711723, 0.002872906159609556, -0.02377801388502121, -0.02873747982084751, -0.014804127626121044, -0.0022596607450395823, 0.03252338618040085, 0.06625629961490631, 0.011762412264943123, -0.02756463550031185, 0.043676748871803284, 0.029701178893446922, 0.0024845008738338947, 0.034473806619644165, 0.0363701768219471, -0.026809558272361755, -0.043656498193740845, 0.06884632259607315, 0.02470662072300911, 0.05535658076405525, 0.04998450726270676, 0.034351736307144165, -0.027210036292672157, -0.026433086022734642, 0.015441096387803555, 0.019069889560341835, 0.06295137107372284, 0.015638699755072594, 0.054794590920209885, 0.010437981225550175, 0.02053317427635193, 0.0624537393450737, -0.003045419231057167, -0.013455103151500225, 0.08173848688602448, -0.032287776470184326, -0.006809068378061056, -0.023024844005703926, -0.03522837907075882, -0.03239262476563454, 0.0641733929514885, 0.0123060941696167, -0.2783500552177429, 0.08250324428081512, 0.030769523233175278, 0.06790054589509964, 0.022530660033226013, 0.007507567759603262, 0.02457793429493904, -0.06404698640108109, -0.004881707951426506, -0.004665129818022251, 0.024850010871887207, 0.01969105564057827, 0.018596254289150238, -0.02034764364361763, 0.04519706964492798, -0.027046987786889076, -0.004760089796036482, 0.015243860892951488, 0.010944734327495098, -0.000308640708681196, 0.019724993035197258, -0.006576562765985727, 0.1641778200864792, 0.056079696863889694, -0.052805837243795395, 0.014263118617236614, 0.0040002609603106976, -0.005204434972256422, 0.07156524062156677, 0.051576998084783554, -0.01027542445808649, 0.020218178629875183, 0.04102771729230881, 0.03853101283311844, 0.06787033379077911, -0.065696120262146, -0.018303802236914635, 0.03804223611950874, -0.02736889198422432, -0.05302733555436134, -0.05329795554280281, 0.03265216201543808, -0.05149238929152489, 0.03381996229290962, 0.06501477211713791, -0.026633037254214287, -0.009940383955836296, -0.054188020527362823, -0.025598350912332535, -0.016940094530582428, 0.003631375730037689, -0.048807110637426376, -0.00008476642688037828, 0.01277868077158928, -0.019457867369055748, 0.04060550406575203, 0.026172112673521042, -0.011092987842857838, 0.005155844148248434, 0.04009150341153145, 0.02934826910495758, -0.031555838882923126, 0.0946134626865387, 0.001922589959576726, -0.005789357237517834 ]
[ -0.008687201887369156, 0.01952372118830681, -0.03609328344464302, 0.016244852915406227, -0.0050395154394209385, 0.022248083725571632, 0.006694068666547537, 0.04456811398267746, -0.00042065081652253866, -0.03299911692738533, -0.005644996650516987, -0.014011194929480553, 0.022111808881163597, -0.04033583030104637, -0.008616482838988304, -0.020648621022701263, 0.020775120705366135, -0.008161773905158043, 0.008829169906675816, -0.03708145022392273, -0.015529751777648926, -0.011755895800888538, 0.003936851862818003, -0.021461250260472298, 0.005120295565575361, 0.05713735893368721, -0.020483193919062614, 0.022393548861145973, 0.01834241673350334, -0.12255644053220749, -0.025106947869062424, -0.03812512382864952, -0.030237922444939613, -0.012236757203936577, 0.04674936458468437, 0.009738627821207047, -0.0011148388730362058, -0.011033580638468266, 0.022923000156879425, 0.0003450998046901077, 0.05457425117492676, -0.06759404391050339, -0.027086546644568443, -0.009746881201863289, -0.01696108467876911, -0.03368207812309265, -0.06351859122514725, 0.010895201936364174, -0.030343370512127876, 0.01603381335735321, -0.06375506520271301, 0.013442636467516422, 0.006560112349689007, 0.02223268151283264, 0.02435999922454357, 0.006389913614839315, -0.02671686001121998, 0.0359082892537117, -0.01212297286838293, 0.0017252009129151702, -0.0038481380324810743, -0.00401180237531662, -0.04017319902777672, -0.01924985833466053, -0.028112418949604034, -0.03295845910906792, -0.03179271146655083, 0.0077630095183849335, 0.00036726100370287895, 0.01938244141638279, 0.021491073071956635, 0.02056562341749668, -0.06775090843439102, -0.009164472110569477, -0.007957752794027328, -0.0006614615558646619, 0.017323670908808708, -0.016623763367533684, -0.021723540499806404, 0.010977549478411674, -0.045325569808483124, 0.01526666060090065, -0.04139650985598564, -0.018533769994974136, -0.033935680985450745, -0.013087068684399128, -0.008103996515274048, -0.00562959024682641, 0.03129851073026657, 0.009842589497566223, -0.018865637481212616, -0.011160995811223984, 0.0007004006183706224, -0.0048773689195513725, -0.09353317320346832, 0.005889140069484711, 0.002261111279949546, -0.010886602103710175, -0.0047409432008862495, 0.8423258066177368, -0.003366322023794055, 0.008183738216757774, 0.0212243665009737, 0.04151071235537529, 0.005002481397241354, -0.02958700992166996, -0.016380952671170235, 0.018689392134547234, 0.011069205589592457, -0.045301735401153564, -0.016495805233716965, 0.017111534252762794, 0.020563600584864616, -0.011996136046946049, 0.002052339958027005, 0.04663320630788803, 0.01766118034720421, -0.008858084678649902, -0.016963867470622063, 0.015333502553403378, 0.0442742295563221, 0.0008633288089185953, -0.006187757942825556, 0.022868840023875237, 0.007338124327361584, -0.167080819606781, -0.0001133843616116792, -6.951250578757073e-33, 0.042745061218738556, -0.0356399230659008, 0.05457213893532753, -0.002503379015251994, 0.038724787533283234, -0.006816824898123741, 0.01214820146560669, 0.0015657419571653008, -0.027663078159093857, -0.00791874248534441, 0.013357313349843025, -0.012612959370017052, -0.04739898815751076, -0.009599044919013977, 0.017907770350575447, 0.021875854581594467, -0.007792465388774872, 0.008839289657771587, 0.00845057051628828, 0.002721968572586775, 0.012594928033649921, 0.012321808375418186, 0.021463776007294655, 0.04927840456366539, 0.00292685953900218, 0.039439357817173004, 0.01706795021891594, -0.004829369485378265, -0.004956237506121397, -0.024013111367821693, -0.014277195557951927, 0.03226484730839729, -0.018351387232542038, -0.06767921894788742, -0.026156583800911903, -0.0609060600399971, -0.04891623929142952, -0.009772886522114277, -0.03201472759246826, -0.021812794730067253, -0.039961885660886765, 0.0018639812478795648, -0.03711290284991264, -0.005619987845420837, -0.021581724286079407, -0.0038319146260619164, 0.02742565982043743, 0.012648796662688255, -0.016462251543998718, -0.004084442742168903, 0.05217466130852699, -0.010298773646354675, 0.05594063177704811, 0.04264518618583679, 0.03973350301384926, 0.015494444407522678, -0.013155297376215458, -0.005642240401357412, 0.0010112333111464977, -0.0060222214087843895, 0.02202899567782879, -0.004176822956651449, 0.0007285707397386432, 0.03867051750421524, 0.021147096529603004, 0.0007419995963573456, 0.0332212820649147, 0.013312004506587982, 0.0261552631855011, 0.028550436720252037, -0.035695549100637436, 0.005918910261243582, -0.015550188720226288, -0.03336835280060768, 0.02859022468328476, -0.036779142916202545, -0.013903663493692875, 0.014618008397519588, 0.030621692538261414, 0.0357431136071682, 0.04462052881717682, -0.011675593443214893, 0.019154947251081467, -0.028559649363160133, -0.046850766986608505, -0.004591759759932756, -0.007839283905923367, 0.0056330240331590176, -0.01268979161977768, -0.002457621041685343, 0.026767553761601448, 0.0840357318520546, 0.021098298951983452, -0.004214719403535128, -0.02627670019865036, 6.84461487403826e-33, 0.005144144874066114, -0.01679142937064171, 0.006857030093669891, 0.009621326811611652, 0.020776428282260895, -0.028371229767799377, 0.004847359377890825, 0.017500795423984528, 0.015553944744169712, 0.05569746345281601, -0.04783863574266434, 0.0088193966075778, -0.038924690335989, 0.0038175866939127445, 0.042980700731277466, 0.0004203722346574068, 0.025241166353225708, -0.006914884317666292, 0.01767590455710888, 0.003999462351202965, 0.004148717503994703, 0.015305723994970322, 0.008060059510171413, 0.0345841608941555, 0.025884781032800674, 0.004566808696836233, -0.010795318521559238, 0.006319997366517782, -0.04488041624426842, -0.020190145820379257, 0.033828943967819214, -0.030159318819642067, -0.00038957473589107394, -0.03561420366168022, -0.02840772271156311, 0.021559588611125946, -0.016535436734557152, 0.02186824008822441, 0.028386717662215233, 0.002626944100484252, 0.007438290864229202, 0.010854722000658512, 0.022194677963852882, 0.045288849622011185, -0.007855947129428387, -0.015031835995614529, 0.021692082285881042, -0.02886064536869526, -0.00922609306871891, 0.025560496374964714, -0.03500942885875702, 0.014814039692282677, -0.00008485130820190534, 0.024674680083990097, 0.010867872275412083, -0.028937850147485733, -0.019568603485822678, 0.04428289085626602, -0.01892840676009655, -0.005090964026749134, -0.012207296676933765, 0.011852670460939407, 0.005931660998612642, 0.015561959706246853, -0.005572096910327673, -0.00545319402590394, 0.004208748694509268, -0.006330995354801416, 0.007372117601335049, -0.0381896011531353, 0.006656212266534567, -0.01772504486143589, -0.019367532804608345, 0.04359256848692894, 0.041841793805360794, -0.02468842640519142, -0.02099614031612873, 0.036066316068172455, -0.015176239423453808, 0.011692618019878864, 0.026882076635956764, -0.010453089140355587, -0.0009186296374537051, -0.032931823283433914, 0.01747654192149639, 0.009756394661962986, -0.011926279403269291, 0.0011830644216388464, 0.007337062619626522, 0.021095743402838707, -0.013984039425849915, -0.028955521062016487, -0.029232759028673172, 0.02018946222960949, -0.024748891592025757, -1.273924876699084e-8, -0.014183553867042065, -0.009923077188432217, -0.0265667624771595, 0.013731312938034534, 0.03812950849533081, -0.0011331966379657388, -0.01827065646648407, 0.00195202580653131, 0.0000813408478279598, 0.016286911442875862, 0.012872697785496712, 0.004491434432566166, 0.025963876396417618, 0.036903489381074905, 0.008047424256801605, -0.04547162353992462, 0.005325686186552048, -0.02278759330511093, 0.014506434090435505, 0.013134037144482136, 0.03892892226576805, 0.05828998237848282, 0.008482597768306732, -0.02840379811823368, 0.003921452909708023, -0.033108003437519073, 0.006072995252907276, -0.05627286434173584, 0.003933153580874205, 0.0056886933743953705, 0.008414034731686115, -0.023765305057168007, 0.0038870505522936583, 0.017004311084747314, -0.02169654332101345, -0.040031228214502335, 0.007490430027246475, -0.003036981448531151, -0.01616336964070797, -0.0003299244854133576, -0.007228161208331585, 0.021501265466213226, -0.018501628190279007, -0.02428799867630005, -0.047728728502988815, 0.03190336003899574, -0.046575699001550674, 0.03214878588914871, 0.003696254687383771, 0.0015672562876716256, -0.003334061009809375, -0.026361973956227303, 0.03202837333083153, -0.007452656980603933, 0.01852012611925602, 0.016474133357405663, 0.06230977922677994, -0.0031066802330315113, -0.0011418299982324243, -0.026639673858880997, 0.020612720400094986, 0.010074716061353683, -0.023502003401517868, -0.014916609972715378 ]
flink-sql-could-not-execute-sql-statement-corrupt-debezium-message
https://markhneedham.com/blog/2023/01/24/flink-sql-could-not-execute-sql-statement-corrupt-debezium-message
false
2023-01-24 02:44:37
Flink SQL: Exporting nested JSON to a Kafka topic
[ "flink", "kafka" ]
[ "Flink" ]
I've been playing around with Flink as part of https://github.com/mneedham/pizza-shop-workshop[a workshop that I'm doing at JFokus^] in a couple of weeks and I wanted to export some data from Flink to Apache Kafka in a nested format. In this blog post we'll learn how to do that. == Setup We're going to be using the following Docker Compose config: .docker-compose.yml [source, yaml] ---- include::content/2023/01/24/docker/docker-compose.yml[] ---- The Flink config used here is adapted Francesco Tisiot's repository at https://github.com/aiven/sql-cli-for-apache-flink-docker/[github.com/aiven/sql-cli-for-apache-flink-docker/], so thanks Francesco! Let's get started: [source, bash] ---- docker-compose up ---- == Data Generation We're going to generate data using the https://github.com/mneedham/livestream-data-generator[github.com/mneedham/livestream-data-generator] repository, which simulates users joining and leaving live stream events. Once we've checked out that repository, we can install the dependencies: [source, bash] ---- pip install -r requirements.txt ---- And then run the data generator: [source, bash] ---- python loop.py \ --timeout 1 \ --users 1000 \ --events 100 \ --max-start-delay 0 \ --min-event-length 60 \ --max-event-length 180 ---- We'll see output similar to this: .Output [source, json] ---- {"eventTime": "2023-01-23T10:15:24.089789", "eventId": "89653462-d58c-4751-974b-cc94d9fa9a11", "userId": "cf29d9e5-4f52-43cf-99c6-b6138ae612eb", "name": "Beverly Kelley", "lat": "51.5085", "lng": "-0.1257", "city": "London", "region": "England", "action": "Join"} {"eventTime": "2023-01-23T10:15:24.048042", "eventId": "3bf77680-7664-44a2-b5eb-7281fb759999", "userId": "31ab115f-b7a4-48a6-a282-5e5a3c15ddf0", "name": "Jeffery Adams", "lat": "32.5530", "lng": "-92.0422", "city": "Monroe", "region": "Louisiana", "action": "Join"} {"eventTime": "2023-01-23T10:15:24.033714", "eventId": "0283e8e6-14a7-4d8e-8aab-5d40d38eb52d", "userId": "0acad44c-2545-4c81-bd3f-33385d21160f", "name": "Alexander Fuller", "lat": "43.2501", "lng": "-79.8496", "city": "Hamilton", "region": "Ontario", "action": "Join"} {"eventTime": "2023-01-23T10:15:23.979862", "eventId": "bf061b6c-b03d-43d7-9d04-f4f8c71a9ab0", "userId": "0a9f8527-a2b4-4c5f-b82b-2a3930182c62", "name": "Julie Grant", "lat": "35.6910", "lng": "139.7679", "city": "Tokyo", "region": "Tokyo", "action": "Join"} {"eventTime": "2023-01-23T10:15:24.075753", "eventId": "868320eb-96b2-496f-af72-9cd83d9726c0", "userId": "fc20e945-f4ce-4c71-9a55-8f7253583c1c", "name": "Natalie Martinez", "lat": "39.9690", "lng": "-83.0114", "city": "Columbus", "region": "Ohio", "action": "Join"} ---- == Ingesting data into Kafka Let's now ingest that data into Kafka, using the https://stedolan.github.io/jq/[jq^] and https://docs.confluent.io/platform/current/app-development/kafkacat-usage.html[kcat^] command line tools: [source, bash] ---- python loop.py \ --timeout 1 \ --users 1000 \ --events 100 \ --max-start-delay 0 \ --min-event-length 60 \ --max-event-length 180 | jq -cr --arg sep 😊 '[.eventId, tostring] | join($sep)' | kcat -P -b localhost:29092 -t events -K😊 ---- [NOTE] ==== I've created a video showing how ingest data using this technique on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], which is embedded below. ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/izSk4vjmf_E" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ ==== We can also use kcat to check that the data has made its way into Kafka: [source, bash] ---- kcat -C -b localhost:29092 -t events -c3 | jq ---- .Output [source, json] ---- { "eventTime": "2023-01-24T11:13:05.213589", "eventId": "ebfec380-c3f1-4471-b30b-da822db57117", "userId": "983aa5c2-4f98-4507-937b-d60f41e1407e", "name": "Joanne Walters", "lat": "42.2399", "lng": "-83.1508", "city": "Dearborn", "region": "Michigan", "action": "Join" } { "eventTime": "2023-01-24T11:13:05.216398", "eventId": "9cc0a7f5-0638-4b27-a897-2a61ddab98ac", "userId": "1043a9d5-e722-4d86-91f6-8926046050d5", "name": "Michael Miller", "lat": "34.0498", "lng": "-117.4706", "city": "Fontana", "region": "California", "action": "Join" } { "eventTime": "2023-01-24T11:13:05.291973", "eventId": "2bb4a79b-f5ec-488e-84ee-72bf2fb8c293", "userId": "cd0e36ff-9171-41b5-91d2-bd32feaae17c", "name": "David Trujillo", "lat": "35.9139", "lng": "47.0239", "city": "Dīvāndarreh", "region": "Kordestān", "action": "Join" } ---- So far, so good. == Transforming stream with Flink Now let's say that we want to tranform these events to have a nested structure like this: [source, json] ---- { "event": { "time": "2023-01-24T11:13:05.213589", "id": "ebfec380-c3f1-4471-b30b-da822db57117" }, "user": { "id": "983aa5c2-4f98-4507-937b-d60f41e1407e", "name": "Joanne Walters", "lat": "42.2399", "lng": "-83.1508", "city": "Dearborn", "region": "Michigan", }, "action": "Join" } ---- We're going to do this using https://flink.apache.org/flink-architecture.html[Flink^], a popular stateful stream processor. We can interact with Flink via its SQL client: [source, bash] ---- docker exec -it flink-sql-client /opt/sql-client/sql-client.sh ---- Create a table on the `events` stream: [source, sql] ---- CREATE TABLE Events ( `event_time` TIMESTAMP(3) METADATA FROM 'timestamp', `partition` BIGINT METADATA VIRTUAL, `offset` BIGINT METADATA VIRTUAL, `eventTime` STRING, `eventId` STRING, `userId` STRING, `name` STRING, `lat` DOUBLE, `lng` DOUBLE, `city` STRING, `region` STRING, `action` STRING ) WITH ( 'connector' = 'kafka', 'topic' = 'events', 'properties.bootstrap.servers' = 'kafka:9092', 'properties.group.id' = 'eventsGroup=', 'scan.startup.mode' = 'earliest-offset', 'format' = 'json' ); ---- We can query this table to view some of the events: [source, sql] ---- select eventTime, eventId, userId, name, lat, lng, city, region, action FROM Events LIMIT 5; ---- .Output [format="csv", options="header"] |=== include::content/2023/01/24/data/events.csv[] |=== We can use the `map` function to massage this data into the nested structure. The following query does this: [source, sql] ---- SELECT map[ 'time', eventTime, 'id', eventId ] AS event, map [ 'id', userId, 'name', name, 'lat', lat, 'lng', lng, 'city', city, 'region', region ] AS `user`, action FROM Events LIMIT 1; ---- If we run this query, we'll get the following exception: .Output [source, text] ---- [ERROR] Could not execute SQL statement. Reason: org.apache.calcite.sql.validate.SqlValidatorException: Parameters must be of the same type ---- The problem is that it expects all the value to be of the same type and the `lat` and `lng` fields are doubles. The easiest solution is to cast these values to strings, as shown below: [source, sql] ---- SELECT map[ 'time', eventTime, 'id', eventId ] AS event, map [ 'id', userId, 'name', name, 'lat', CAST(lat AS STRING), 'lng', CAST(lng AS STRING), 'city', city, 'region', region ] AS `user`, action FROM Events LIMIT 1; ---- Now let's create a table that exports its contents to another Kafka topic called `events-nested`; [source, sql] ---- CREATE TABLE EventsNested ( `user` MAP<STRING,STRING>, `event` MAP<STRING,STRING>, `action` STRING ) WITH ( 'connector' = 'kafka', 'topic' = 'events-nested', 'properties.bootstrap.servers' = 'kafka:9092', 'properties.group.id' = 'testGroup', 'value.format' = 'json' ); ---- And now let's ingest the previous query into that table: [source, sql] ---- INSERT INTO EventsNested SELECT map[ 'time', eventTime, 'id', eventId ] AS event, map [ 'id', userId, 'name', name, 'lat', CAST(lat AS STRING), 'lng', CAST(lng AS STRING), 'city', city, 'region', region ] AS `user`, action FROM Events; ---- .Output [source, text] ---- [INFO] Submitting SQL update statement to the cluster... [INFO] SQL update statement has been successfully submitted to the cluster: Job ID: f2e6f707a9c69b84f4d6e9ca7bc34fc6 ---- We can then check that data is making its way into that topic using kcat: [source, bash] ---- kcat -C -b localhost:29092 -t events-nested -c1 | jq ---- .Output [source, json] ---- { "user": { "time": "2023-01-24T11:35:21.017729", "id": "6a8fbce6-aa20-46eb-a201-7580762c2a16" }, "event": { "city": "Brisbane", "lng": "153.0281", "id": "ff8663b0-4376-448a-a443-c14bb0cee0cc", "region": "Queensland", "name": "Terri Simmons", "lat": "-27.4679" }, "action": "Join" } ---- Job done! === In Summary The map structure is very helpful for creating nested structures, but it took me a little while to figure out how to use it. Hopefully this blog post will save you going through that same journey of exploration.
In this post we'll learn how to export nested documents from Flink to Apache Kafka.
uploads/2023/01/flink-banner.png
[ 0.006705249659717083, -0.0288695115596056, 0.008619698695838451, 0.040844861418008804, 0.0793909877538681, 0.019929200410842896, -0.011690555140376091, 0.06530069559812546, -0.009245631285011768, -0.02406049519777298, 0.01618623360991478, -0.03840772062540054, -0.07294254750013351, 0.02212074026465416, 0.01233394630253315, 0.04342728480696678, 0.07024328410625458, -0.007628697901964188, 0.041960082948207855, 0.0411151722073555, 0.0178822074085474, 0.051111191511154175, 0.004066205117851496, 0.030198298394680023, 0.013030191883444786, 0.009687479585409164, 0.008869283832609653, 0.00012532444088719785, -0.05344211310148239, -0.01933901198208332, 0.03429863974452019, -0.009683176875114441, -0.0071678776293993, -0.014936856925487518, 0.023978576064109802, -0.018184708431363106, -0.02683013491332531, 0.027609078213572502, 0.010425301268696785, 0.028599301353096962, -0.10258446633815765, 0.026936359703540802, 0.011019394733011723, 0.012307205237448215, -0.023099854588508606, 0.00025740780984051526, -0.056175459176301956, 0.020396890118718147, 0.0014271846739575267, 0.006553178187459707, -0.07441256940364838, 0.02262006886303425, -0.008980375714600086, 0.008726322092115879, -0.0007650973275303841, 0.018403014168143272, 0.03612503409385681, -0.05719856172800064, 0.0398796908557415, -0.013995434157550335, 0.0008077768143266439, -0.007215309422463179, 0.03342622518539429, 0.020422715693712234, 0.03427061438560486, -0.03514661267399788, 0.001190106151625514, 0.04234132915735245, -0.011075358837842941, -0.014133275486528873, 0.03139625862240791, 0.046062540262937546, -0.03328486531972885, -0.013574173673987389, 0.0070755439810454845, -0.06198370084166527, -0.01900043524801731, 0.05835504084825516, 0.02832769602537155, 0.04683263599872589, -0.03773794323205948, -0.014069365337491035, 0.015955332666635513, 0.055629752576351166, 0.005650678649544716, -0.04670266807079315, -0.02266443520784378, 0.018325095996260643, -0.07390746474266052, 0.06722856312990189, 0.007040672469884157, -0.060349974781274796, 0.022328872233629227, -0.011912588961422443, 0.005627473350614309, 0.03668290749192238, -0.00846542976796627, 0.05186225101351738, 0.022934291511774063, -0.004691611509770155, -0.05316707491874695, 0.007643889635801315, -0.01061938889324665, 0.04652415215969086, -0.06191212683916092, -0.03072422742843628, -0.060424938797950745, -0.045073240995407104, 0.021336298435926437, 0.008921511471271515, 0.013552620075643063, 0.017978329211473465, -0.007054641842842102, 0.00006325671711238101, -0.09617744386196136, 0.07412414997816086, 0.0039180270396173, -0.05205954238772392, -0.001153456512838602, -0.0043066563084721565, 0.05716582015156746, 0.04619239270687103, -0.0006830340134911239, 0.0577106811106205, -0.004842022899538279, 0.02498556114733219, 0.00970863550901413, 0.06045684218406677, -0.01580984517931938, -0.06206333264708519, -0.012751744128763676, 0.048432666808366776, 0.013955790549516678, 0.006668456830084324, 0.014751560986042023, -0.00622901925817132, -0.010129191912710667, 0.006838406436145306, 0.05952853709459305, 0.026088185608386993, -0.00010456008021719754, -0.044081076979637146, 0.012378941290080547, -0.0033192310947924852, 0.003701533656567335, 0.03075587935745716, -0.011683364398777485, -0.05318658798933029, -0.03870268911123276, 0.013054604642093182, 0.018507296219468117, 0.03200778365135193, 0.058151260018348694, -0.03504163771867752, 0.01091085746884346, 0.08911251276731491, 0.032824210822582245, -0.00987071543931961, -0.006021162960678339, -0.0029165223240852356, 0.03372637927532196, 0.03668619692325592, -0.007538174744695425, 0.02687932550907135, 0.014506259933114052, -0.04090595990419388, 0.0009938895236700773, 0.02387509122490883, -0.01936829648911953, 0.010447747074067593, -0.02527785673737526, -0.03366298973560333, 0.06711176782846451, -0.008318002335727215, 0.032578978687524796, 0.012044542469084263, 0.08534106612205505, 0.015669945627450943, 0.0425361804664135, 0.014825929887592793, -0.07373238354921341, 0.033435750752687454, -0.006992770358920097, 0.04131133854389191, 0.02543611265718937, -0.027051087468862534, 0.07229369133710861, 0.03027373179793358, 0.011743400245904922, 0.03939606994390488, -0.06653190404176712, -0.0851837694644928, -0.031778912991285324, 0.013937280513346195, 0.054361000657081604, -0.04904213920235634, -0.0018473374657332897, 0.06589982658624649, 0.03269227594137192, 0.030629325658082962, 0.0013488192344084382, 0.02873000130057335, -0.0018910836661234498, -0.06820051372051239, -0.054202690720558167, 0.0457601360976696, 0.018059536814689636, -0.046885933727025986, -0.06610788404941559, -0.01286187395453453, -0.06025787442922592, -0.0319250114262104, 0.0222372654825449, -0.044459786266088486, 0.05419612675905228, 0.006705159787088633, 0.007545211352407932, -0.006679001729935408, 0.02369387447834015, -0.019004561007022858, 0.04524087905883789, 0.01590917818248272, -0.017474204301834106, -0.019092390313744545, -0.025788281112909317, 0.10517201572656631, 0.04115151986479759, -0.013945785351097584, -0.046200141310691833, 0.0657016932964325, 0.0040376558899879456, -0.01734134741127491, -0.005233794450759888, -0.01237428281456232, -0.0010610102908685803, -0.00994954165071249, -0.03282880783081055, -0.030049888417124748, 0.003431899007409811, -0.028284329921007156, 0.037164729088544846, 0.06817448884248734, -0.05248677358031273, 0.056141775101423264, 0.024442479014396667, -0.04136002063751221, 0.010851859115064144, -0.03628521412611008, -0.061144087463617325, 0.0088872779160738, 0.014637456275522709, -0.0011962760472670197, 0.04649593308568001, -0.05298890545964241, -0.035311080515384674, -0.038399625569581985, -0.04383144900202751, 0.042440999299287796, 0.0037211221642792225, 0.06534314900636673, -0.028345976024866104, 0.04100417718291283, -0.02448819950222969, 0.017296863719820976, -0.008179170079529285, -0.03992622718214989, -0.031607162207365036, -0.016811538487672806, 0.018967101350426674, 0.0040090265683829784, 0.021280471235513687, 0.013140969909727573, 0.024193614721298218, 0.001187120215035975, 0.0008874371415004134, -0.0036397334188222885, 0.03604687377810478, -0.029660191386938095, -0.014580008573830128, -0.03122277557849884, -0.027406375855207443, 0.061123061925172806, -0.06206783279776573, 0.00018366203585173935, 0.009499440900981426, -0.05618421360850334, 0.031310658901929855, -0.04685359075665474, -0.0027411074843257666, -0.00930496770888567, 0.03337842971086502, 0.02918221615254879, 0.0013396821450442076, -0.0022170012816786766, 0.0763126090168953, 0.02877691015601158, 0.00935224536806345, 0.005487535614520311, -0.015465287491679192, 0.039742451161146164, -0.005456528626382351, 0.01696624793112278, 0.0773591697216034, -0.006068125832825899, -0.027331264689564705, -0.04663454741239548, 0.015070965513586998, -0.02349378541111946, -0.2727397680282593, 0.03060709312558174, -0.015802577137947083, -0.02097438834607601, 0.020243585109710693, 0.00278671202249825, 0.03315384313464165, -0.0393640473484993, -0.0033996240235865116, -0.005592091474682093, -0.02222026325762272, -0.03256755322217941, -0.004940432962030172, 0.043910156935453415, 0.004751918371766806, 0.002926902612671256, 0.00863614771515131, -0.022715717554092407, 0.008348781615495682, -0.009008737280964851, -0.0356631800532341, -0.03873468190431595, -0.017915956676006317, 0.04805630072951317, 0.03137098252773285, 0.011709727346897125, -0.09011770784854889, 0.04720676317811012, -0.051870666444301605, -0.02966897562146187, -0.014504151418805122, -0.023928506299853325, -0.003657260211184621, 0.0035628306213766336, -0.013403835706412792, 0.0025042842607945204, 0.014532217755913734, 0.013270648196339607, 0.013949370943009853, -0.023187873885035515, -0.001970104407519102, -0.03885671868920326, -0.028209205716848373, -0.011274394579231739, 0.08260483294725418, -0.020900622010231018, -0.08205181360244751, 0.021957477554678917, -0.017869718372821808, 0.0540899895131588, -0.029962757602334023, -0.06552506983280182, -0.027595238760113716, 0.04559342935681343, -0.02327471785247326, -0.017007049173116684, -0.02491757832467556, 0.012875944375991821, -0.026335008442401886, -0.018664654344320297, -0.009479697793722153, -0.025622498244047165, -0.015614467673003674, -0.045260246843099594, -0.04165274277329445, -0.05019783228635788, -0.06078279763460159, -0.0000919025405892171, 0.08286122977733612, 0.0250354316085577, -0.044153325259685516, -0.017479924485087395, -0.02315514162182808, -0.10982514917850494, -0.004335309844464064, -0.03402659296989441, -0.02532958984375, 0.002110118977725506, -0.004816566593945026, 0.04927648603916168, -0.052542343735694885, -0.039389561861753464, 0.01918233186006546, -0.0019272033823654056, 0.03137345239520073, -0.010653444565832615, 0.025794198736548424, -0.0300642978399992, -0.017287852242588997, -0.008591735735535622, 0.05115877464413643, -0.035029374063014984, -0.02196461334824562, -0.030063137412071228, -0.0224396213889122, 0.028674323111772537, -0.0062021296471357346, 0.017407583072781563, 0.006658905651420355, 0.015288806520402431, 0.06664643436670303, -0.053008731454610825, -0.011577656492590904, -0.02975829318165779, -0.01975242979824543, -0.009725634939968586, -0.0654551237821579, 0.01830577664077282, 0.028663726523518562, 0.05540841072797775, -0.014021985232830048, -0.04373719170689583, 0.03129839897155762, -0.06780658662319183, -0.01887441985309124, -0.00623201671987772, 0.003560449229553342, 0.03076198138296604, 0.010946415364742279, 0.011598496697843075, -0.05510978028178215, 0.030956728383898735, 0.006460991688072681, -0.019403481855988503, -0.040627919137477875, -0.025795038789510727, -0.03485523909330368, -0.010433288291096687, 0.00009571732516633347, 0.017147451639175415, 0.0019720052368938923, 0.031228486448526382, 0.048005711287260056, -0.042156949639320374, 0.03580456227064133, -0.045432064682245255, -0.04885410889983177, -0.05204823613166809, 0.01920933648943901, 0.007107061799615622, -0.037935081869363785, 0.004173201974481344, 0.00747211929410696, 0.0362602099776268, 0.03417171165347099, 0.04859406128525734, 0.021074587479233742, 0.007022460922598839, 0.018371563404798508, -0.0014499028911814094, 0.027078598737716675, -0.05239931866526604, -0.009312758222222328, -0.02812908962368965, -0.028460286557674408, -0.017981724813580513, 0.019295232370495796, -0.009511495940387249, -0.01750853657722473, -0.02324751578271389, -0.001353604719042778, -0.07469995319843292, -0.019170301035046577, -0.005792757496237755, 0.005554647650569677, 0.06398389488458633, -0.00892253965139389, 0.024769481271505356, -0.007889008149504662, -0.013681757263839245, -0.014296602457761765, 0.016347479075193405, -0.025993920862674713, -0.008432279340922832, 0.017771873623132706, -0.008473552763462067, -0.0013187357690185308, 0.04381149262189865, 0.046693045645952225, 0.004919297527521849, -0.004801550880074501, -0.0103922663256526, 0.006595059763640165, 0.005306199658662081, 0.05485180765390396, 0.051307663321495056, -0.015816636383533478, -0.00620641652494669, -0.023124445229768753, -0.0050543867982923985, -0.015501364134252071, 0.009864449501037598, 0.01022160705178976, -0.008178604766726494, -0.020103929564356804, -0.07643119245767593, 0.05704699829220772, 0.0598357692360878, 0.005725261755287647, 0.015070523135364056, -0.004545495379716158, 0.012734230607748032, -0.048495665192604065, 0.03906147927045822, 0.06556641310453415, -0.05462004989385605, -0.03173080086708069, -0.01639498770236969, 0.03528960421681404, -0.011327909305691719, 0.027487365528941154, -0.0709870234131813, -0.01626160740852356, 0.014017720706760883, -0.01210490707308054, -0.04026523977518082, -0.03089524246752262, -0.00984868686646223, 0.038248345255851746, 0.010810963809490204, 0.006749969907104969, 0.002312497701495886, -0.022838536649942398, -0.016103731468319893, -0.029269538819789886, 0.026043877005577087, -0.02964356169104576, -0.007450397126376629, -0.002832941710948944, -0.0017503402195870876, 0.028514550998806953, -0.04028896987438202, 0.03055194951593876, 0.013315871357917786, -0.026104142889380455, -0.005476930178701878, -0.03342769667506218, -0.008406130596995354, 0.007948784157633781, 0.04251357913017273, 0.005579857621341944, -0.010819465853273869, -0.04934987798333168, 0.0013918080367147923, -0.018153749406337738, -0.01378211472183466, -0.0004040790372528136, 0.01646951213479042, 0.017104387283325195, 0.022302770987153053, 0.007541046477854252, 0.025046436116099358, 0.006234452594071627, -0.03950304538011551, 0.06257664412260056, -0.04908082261681557, -0.020563118159770966, -0.025818966329097748, -0.03919203206896782, 0.0012982201296836138, -0.004723517224192619, 0.02599651739001274, -0.08168147504329681, 0.06450653076171875, 0.028431760147213936, 0.022416606545448303, 0.044092852622270584, -0.00156340969260782, 0.03414935618638992, -0.005420983303338289, -0.018253268674016, -0.07020530849695206, -0.024004466831684113, 0.03253644332289696, -0.01501118578016758, 0.0066496324725449085, -0.010580269619822502, -0.05425840988755226, 0.03130973130464554, -0.05267086997628212, -0.024859827011823654, 0.05989200994372368, -0.02337992750108242, -0.0005147791234776378, -0.009384172037243843, -0.048141706734895706, 0.02440754510462284, 0.04331745207309723, -0.051373910158872604, 0.00475429417565465, 0.013902847655117512, 0.04742726683616638, -0.004188038408756256, 0.04077097028493881, -0.04055138677358627, -0.012687085196375847, 0.09504292160272598, 0.02047952637076378, 0.02456826902925968, 0.04816802963614464, -0.006206365302205086, 0.055412571877241135, 0.012038574554026127, -0.007464076392352581, 0.003661481663584709, -0.0016410984098911285, -0.05234754458069801, -0.04933151975274086, 0.06507483124732971, 0.02827928587794304, -0.01048853900283575, -0.030697504058480263, 0.06301424652338028, 0.0022330116480588913, -0.062470149248838425, -0.04932946711778641, 0.02671094797551632, -0.040128666907548904, -0.015792058780789375, -0.023609723895788193, 0.031051302328705788, -0.08929773420095444, 0.0424407534301281, 0.0034366464242339134, -0.0028068404644727707, 0.05997367575764656, 0.014276091009378433, -0.007969063706696033, 0.029867002740502357, 0.07734248042106628, 0.06744749844074249, 0.03415582701563835, -0.004689260385930538, 0.07301665842533112, -0.03488769009709358, -0.01489310897886753, 0.00019360147416591644, 0.007655802182853222, -0.05541970580816269, -0.023980997502803802, 0.02845470979809761, 0.07871997356414795, 0.0024286124389618635, 0.07048231363296509, -0.0006414536037482321, -0.009288549423217773, -0.024494927376508713, 0.018753161653876305, 0.04218442738056183, 0.026164371520280838, 0.019571280106902122, 0.007347748149186373, 0.0003212207811884582, -0.049041807651519775, 0.019673587754368782, 0.00010372354881837964, -0.01413820032030344, 0.01092201191931963, -0.0019961115904152393, 0.030915113165974617, 0.04011699929833412, 0.028986701741814613, 0.0605357326567173, -0.005416385363787413, -0.012689342722296715, 0.0046067978255450726, 0.01058569923043251, -0.022645529359579086, 0.019141394644975662, -0.025183284655213356, -0.017840873450040817, 0.012930532917380333, -0.04397693648934364, 0.00855952687561512, -0.007099755108356476, -0.018855368718504906, 0.010362000204622746, -0.02788676507771015, 0.008000624366104603, 0.0065253605134785175, -0.0322161428630352, -0.02206963486969471, -0.03631194308400154, -0.04248730465769768, -0.07696308195590973, -0.04971545934677124, 0.007594869937747717, -0.004940326325595379, -0.012667981907725334, -0.01643817499279976, -0.025032343342900276, -0.015187036246061325, -0.010134276933968067, 0.018468555063009262, -0.0729982927441597, -0.010404047556221485, 0.011682270094752312, -0.0005759734776802361, 0.01857326366007328, -0.005503650289028883, 0.04443106800317764, 0.01754763163626194, 0.007102454546838999, -0.009161034598946571, 0.023144347593188286, 0.039022237062454224, -0.012291275896131992, -0.0035934620536863804, -0.07138332724571228, 0.04953823983669281, 0.026208732277154922, 0.0013634806964546442, -0.07836136966943741, 0.0412156879901886, 0.04141540080308914, 0.004761598538607359, 0.05429147556424141, -0.026386810466647148, -0.004889027215540409, -0.03523032367229462, -0.028469214215874672, 0.002306718612089753, 0.024193881079554558, 0.06597919017076492, -0.022059494629502296, 0.06550198048353195, 0.0704350695014, -0.0072486973367631435, -0.016209039837121964, -0.01893678307533264, -0.03565240651369095, 0.009980924427509308, -0.014453649520874023, -0.035962145775556564, -0.03387295454740524, -0.08578002452850342, -0.035783641040325165, -0.016288017854094505, -0.014303046278655529, -0.034620501101017, 0.05172982066869736, 0.009538568556308746, -0.02037755772471428, 0.009789391420781612, -0.04149838909506798, 0.0031761338468641043, -0.025420252233743668, -0.025968333706259727, -0.030792133882641792, 0.017809195443987846, 0.010755443014204502, -0.04000530764460564, -0.00035793831921182573, -0.03947193920612335, -0.006021943874657154, 0.01710265874862671, 0.06320254504680634, 0.042758841067552567, -0.0067886593751609325, -0.004645283799618483 ]
[ -0.05041014403104782, -0.05795563757419586, -0.03653578460216522, -0.03604532778263092, 0.0816672146320343, -0.05664045363664627, -0.055459290742874146, -0.008053467608988285, -0.022846736013889313, -0.030929505825042725, -0.017882544547319412, -0.060966137796640396, 0.0018238748889416456, -0.014777335338294506, 0.08262697607278824, 0.004839237313717604, -0.01211522240191698, -0.05400560796260834, -0.051460012793540955, 0.0200810469686985, 0.002406067680567503, -0.03854621201753616, -0.05886395275592804, -0.07018360495567322, -0.004893632140010595, 0.06097930297255516, 0.0651862844824791, -0.04785202816128731, -0.011252852156758308, -0.19145910441875458, 0.025219518691301346, -0.04191511496901512, -0.001380158239044249, -0.012494291178882122, 0.0006368132308125496, 0.04279711842536926, 0.019784046337008476, 0.003523917170241475, 0.009856254793703556, 0.05044398456811905, 0.047730810940265656, 0.006340550724416971, -0.060013677924871445, 0.0010273100342601538, 0.011202988214790821, -0.011156993918120861, -0.019259478896856308, -0.002752854023128748, 0.0033541161101311445, 0.0007974897744134068, -0.0628831535577774, 0.005314221605658531, -0.005177147686481476, -0.044359028339385986, 0.021809235215187073, 0.03263871744275093, 0.03226322680711746, 0.05672387778759003, 0.02319088764488697, 0.01798441633582115, -0.002784229116514325, 0.011711250990629196, -0.14867857098579407, 0.10805153846740723, 0.035953667014837265, 0.031134549528360367, -0.028389353305101395, -0.006831960752606392, -0.00007257412653416395, 0.047003842890262604, -0.001018968760035932, -0.03117990866303444, -0.03092808648943901, 0.07438982278108597, 0.02642500400543213, -0.02386065013706684, -0.026233483105897903, 0.06571098417043686, 0.024828631430864334, -0.012792854569852352, -0.06394236534833908, -0.022724198177456856, -0.023830534890294075, -0.002902764128521085, -0.04567334055900574, 0.0012814798392355442, -0.009909491054713726, 0.0315888337790966, -0.00003054212356801145, 0.04633936285972595, -0.007000522688031197, -0.024565432220697403, 0.05369511991739273, 0.014599194750189781, -0.08927349001169205, -0.006318009924143553, -0.009037133306264877, 0.03043951652944088, -0.0490109920501709, 0.37621834874153137, -0.002895102370530367, -0.02686164155602455, 0.04055251181125641, 0.02000151015818119, -0.0022931538987904787, 0.022977832704782486, -0.022427383810281754, -0.037775371223688126, 0.038083113729953766, -0.023198504000902176, -0.0007832447299733758, -0.01113495510071516, 0.039970532059669495, -0.05501880124211311, 0.00983726978302002, -0.012167077511548996, -0.0021665943786501884, 0.011636902578175068, -0.04552901163697243, 0.016053708270192146, 0.005652479361742735, -0.004000087734311819, 0.04525478929281235, 0.047492921352386475, 0.036405306309461594, 0.01824411377310753, 0.04814041405916214, 0.021907463669776917, 0.032934557646512985, 0.051298391073942184, 0.023265529423952103, -0.03402364253997803, -0.06140943989157677, -0.0042236545123159885, -0.024921700358390808, 0.006409633904695511, 0.04168842360377312, -0.04799005016684532, -0.015813257545232773, 0.028961356729269028, -0.03777068108320236, -0.04830456152558327, 0.027416637167334557, -0.01827368699014187, -0.025273291394114494, 0.12377724051475525, 0.021711617708206177, -0.002826039446517825, -0.04021603986620903, -0.03669777140021324, -0.02603132836520672, 0.05738341063261032, 0.01974348910152912, -0.0727074146270752, 0.013106483034789562, 0.034148428589105606, 0.036371324211359024, 0.019541965797543526, -0.06167712062597275, -0.004589355085045099, -0.05060860514640808, -0.07283256947994232, -0.03297802060842514, 0.020280463621020317, 0.02406986989080906, -0.1401042491197586, -0.007204899098724127, 0.03286692872643471, 0.025602689012885094, -0.02694767341017723, -0.011267568916082382, 0.022829588502645493, -0.017295442521572113, -0.028502516448497772, 0.04392465949058533, -0.0395004078745842, -0.006141081918030977, 0.03225317224860191, 0.052518825978040695, 0.01784057915210724, -0.00747663201764226, 0.032160598784685135, -0.030572040006518364, 0.0055986312218010426, -0.04401198774576187, -0.10094434767961502, -0.05144744738936424, -0.004693732596933842, -0.06719871610403061, -0.04529603570699692, -0.05637449398636818, -0.025930050760507584, -0.027933163568377495, 0.0844680592417717, 0.016313813626766205, -0.024226658046245575, 0.02251427061855793, 0.04631291329860687, 0.013712674379348755, -0.05476931110024452, 0.022739436477422714, 0.05988607183098793, -0.015226611867547035, 0.04269317165017128, -0.094609335064888, 0.03717713803052902, 0.03918219730257988, -0.03340624272823334, 0.03727193921804428, 0.04666200280189514, -0.03443271294236183, 0.00948044192045927, 0.011273786425590515, 0.02754514291882515, -0.032463930547237396, 0.004749577026814222, -0.008672150783240795, 0.018961254507303238, 0.00511885853484273, 0.042081527411937714, -0.01571843959391117, -0.04030786082148552, -0.03331846743822098, -0.3675048053264618, -0.013139924965798855, 0.0010091764852404594, -0.0073006534948945045, 0.007155522238463163, -0.053244687616825104, -0.0005785264656879008, -0.006132541224360466, -0.03400339558720589, 0.027509167790412903, 0.08870568126440048, -0.03733436390757561, -0.003948523662984371, -0.09428950399160385, -0.009333684109151363, 0.017529241740703583, -0.027869785204529762, -0.016378680244088173, -0.01143640372902155, 0.024451540783047676, 0.01826782338321209, -0.008516991510987282, -0.039959803223609924, -0.020192228257656097, 0.009864924475550652, -0.014762681908905506, 0.11561152338981628, 0.03100547008216381, 0.07882646471261978, -0.07249124348163605, 0.0627044215798378, 0.02973291650414467, -0.002575762802734971, -0.07955438643693924, -0.023953599855303764, -0.005757260136306286, 0.02721576578915119, 0.004683595150709152, 0.014323961921036243, 0.01600157655775547, -0.03766321390867233, 0.04523978382349014, -0.038060858845710754, -0.06735461950302124, -0.01784682273864746, -0.018899090588092804, -0.021847467869520187, -0.03484088554978371, -0.04685104638338089, 0.055139463394880295, 0.011846291832625866, 0.013025050051510334, 0.029481442645192146, 0.0024245749227702618, 0.029296668246388435, 0.009554324671626091, -0.03931562602519989, 0.0018653287552297115, -0.005026758648455143, -0.004249623045325279, 0.04513457790017128, 0.08730947971343994, 0.013752191327512264, -0.03747567534446716, 0.002653464674949646, 0.007544808089733124, 0.004978429991751909, 0.03824074938893318, 0.02793988585472107, -0.04536377638578415, -0.0011429993901401758, 0.10110927373170853, 0.000628510257229209, 0.05287283658981323, 0.05404147133231163, 0.040158651769161224, -0.04399767518043518, 0.00702483206987381, 0.016265327110886574, 0.006051471922546625, 0.06650413572788239, 0.0034428508952260017, 0.04374757409095764, -0.027783218771219254, 0.015108251944184303, 0.06564923375844955, -0.009930369444191456, -0.01680310070514679, 0.062353987246751785, 0.0009223521337844431, -0.021457407623529434, -0.015964727848768234, -0.014150155708193779, -0.04471175745129585, 0.06137857586145401, 0.011207431554794312, -0.2722737491130829, 0.02603445202112198, 0.05303589254617691, 0.05367060378193855, 0.007942888885736465, -0.006604066584259272, 0.05940404534339905, -0.05199859291315079, 0.024630101397633553, 0.039074379950761795, -0.02132941223680973, 0.037972792983055115, 0.001454249839298427, -0.003518718760460615, 0.047996632754802704, 0.00864661019295454, 0.03561780974268913, 0.00743217533454299, -0.010950103402137756, -0.038870759308338165, 0.005818633828312159, -0.021946316584944725, 0.1603972166776657, 0.03840464726090431, -0.018234439194202423, 0.010707428678870201, -0.003065388649702072, 0.020582402125000954, 0.06407607346773148, 0.024774949997663498, -0.005348999053239822, 0.019303957000374794, 0.03077913261950016, -0.008052361197769642, 0.06286840885877609, -0.05135326832532883, -0.028203299269080162, 0.03934314474463463, 0.0137312738224864, -0.02740687131881714, -0.0030339171644300222, 0.010182656347751617, -0.021665392443537712, 0.04631049185991287, 0.06143344193696976, -0.03740167245268822, 0.019452566280961037, -0.07108684629201889, -0.05451202020049095, -0.008171170949935913, -0.01362872775644064, -0.038227591663599014, 0.029535911977291107, -0.007252176757901907, 0.0015932124806568027, 0.07920185476541519, 0.012401087209582329, -0.013050506822764874, 0.006852616090327501, 0.030995948240160942, 0.024145910516381264, -0.036163099110126495, 0.1004001572728157, 0.019939344376325607, 0.026268044486641884 ]
[ 0.0051185330376029015, 0.02774459682404995, -0.01595173589885235, 0.023182064294815063, 0.021944426000118256, -0.012139570899307728, 0.00196314905770123, 0.017123762518167496, -0.014379608444869518, -0.027810901403427124, -0.017836561426520348, -0.0051925815641880035, 0.002843699883669615, -0.009402317926287651, -0.0022529761772602797, -0.04921464994549751, -0.008824233897030354, 0.022213071584701538, 0.03863532468676567, -0.012026656419038773, -0.04546460136771202, 0.018448976799845695, 0.02947242185473442, -0.002183449687436223, -0.02688591368496418, 0.03261534497141838, -0.024356277659535408, 0.014843461103737354, 0.021818408742547035, -0.1088697761297226, -0.003107720287516713, -0.027019519358873367, -0.0035093529149889946, -0.04309675842523575, 0.04120577126741409, 0.011955376714468002, 0.012696409597992897, -0.008312057703733444, 0.00908880215138197, -0.007253745570778847, 0.039402686059474945, -0.05511706322431564, 0.009259837679564953, -0.011211938224732876, -0.02198990061879158, -0.04792700707912445, -0.07535453885793686, -0.019637608900666237, -0.019317470490932465, 0.06748344004154205, -0.06556136161088943, 0.01274054404348135, -0.011480667628347874, 0.010211464017629623, 0.04060757905244827, 0.009660831652581692, -0.013071434572339058, 0.022182224318385124, -0.010852023027837276, -0.006846508011221886, -0.014177386648952961, 0.002406557323411107, -0.05084340274333954, -0.03228142857551575, -0.00785618182271719, -0.0396098829805851, -0.02251683548092842, 0.011672182008624077, 0.03113148733973503, 0.025840526446700096, -0.0030825878493487835, 0.03948365896940231, -0.034231457859277725, -0.024105319753289223, -0.000016535837858100422, 0.000652985880151391, 0.005969716235995293, -0.0011654000263661146, -0.040054820477962494, 0.025653289631009102, -0.01875079981982708, 0.002153002191334963, -0.01837962120771408, -0.018753595650196075, -0.05418138951063156, -0.019250964745879173, 0.0003574470756575465, 0.03207019343972206, -0.003595518646761775, -0.005528605077415705, -0.028717512264847755, 0.03018798492848873, 0.003657560097053647, -0.0016401357715949416, -0.0642055794596672, 0.01866724342107773, -0.038598962128162384, 0.008100264705717564, -0.00912108551710844, 0.820468544960022, -0.012895507737994194, 0.007299742661416531, 0.01677522249519825, 0.029071681201457977, 0.030799971893429756, -0.031244151294231415, -0.026423150673508644, 0.0006939328159205616, -0.015255180187523365, -0.05423612520098686, 0.00419492507353425, -0.006387566216289997, 0.026120778173208237, -0.010193448513746262, 0.024220451712608337, 0.028529198840260506, 0.00679625291377306, 0.0031663996633142233, -0.01038266345858574, 0.024048179388046265, 0.052755486220121384, -0.013310492970049381, 0.03391680121421814, 0.011479898355901241, 0.00755045423284173, -0.17571322619915009, 0.01340452954173088, -6.935028022031756e-33, 0.06198624521493912, -0.054813507944345474, 0.01929664984345436, -0.016162186861038208, 0.08209939301013947, 0.0005814128671772778, 0.029893659055233, -0.010927348397672176, -0.025218049064278603, -0.017732514068484306, -0.014047730714082718, -0.009647446684539318, -0.033410169184207916, -0.016354277729988098, 0.04024076461791992, -0.024986252188682556, -0.016482487320899963, 0.025215040892362595, -0.0297260582447052, -0.015781404450535774, 0.013232840225100517, 0.016078418120741844, 0.010393379256129265, 0.048629868775606155, 0.03575018793344498, 0.03421849012374878, 0.0038266670890152454, -0.012774065136909485, -0.0045100124552845955, -0.025142159312963486, -0.028029341250658035, 0.016122665256261826, -0.012436741031706333, -0.05575648695230484, 0.009653440676629543, -0.05021561309695244, -0.03202975541353226, 0.005415653344243765, -0.06243813410401344, -0.005763053894042969, -0.063895583152771, -0.02561933919787407, -0.02729525975883007, 0.017511537298560143, -0.057475969195365906, -0.03226189315319061, 0.03152564540505409, 0.06248847022652626, -0.006638781633228064, 0.04177191108465195, 0.06750550866127014, -0.014914420433342457, 0.005529167130589485, 0.02388608828186989, 0.008687851019203663, 0.02201632410287857, -0.022173967212438583, -0.008021291345357895, -0.022653376683592796, -0.005044587887823582, -0.014703800901770592, -0.014584001153707504, 0.018038516864180565, 0.03389029577374458, -0.006402014754712582, 0.02009877748787403, 0.028362810611724854, 0.011204005219042301, 0.04191551357507706, 0.041713014245033264, -0.034626562148332596, 0.017845822498202324, -0.017984401434659958, -0.020167330279946327, 0.030876867473125458, -0.026452472433447838, 0.015645261853933334, 0.014700676314532757, 0.008279615081846714, 0.04831477627158165, 0.027618207037448883, 0.015971796587109566, 0.004768881481140852, -0.01447343546897173, -0.03427048772573471, -0.022481663152575493, 0.03655761480331421, 0.03558982163667679, -0.019477859139442444, 0.03312191367149353, 0.020846087485551834, 0.050467852503061295, 0.03128666803240776, -0.025957610458135605, -0.03583388775587082, 7.633790353302495e-33, -0.002032830845564604, -0.017328552901744843, -0.021316852420568466, -0.008097766898572445, 0.0065924860537052155, -0.028144506737589836, 0.05966326221823692, -0.017102928832173347, -0.00465729832649231, 0.03201775625348091, -0.05029180273413658, 0.019661765545606613, -0.020145131275057793, 0.02157491073012352, 0.029849033802747726, -0.025098280981183052, 0.015412100590765476, -0.006448377855122089, 0.051199834793806076, 0.008260619826614857, 0.024165792390704155, -0.011587867513298988, 0.02177751623094082, 0.02918994426727295, 0.018145907670259476, 0.01652347482740879, 0.004495934583246708, -0.00364101049490273, -0.0284134354442358, -0.011580769903957844, 0.00673997076228261, -0.008662041276693344, 0.0005220043240115047, -0.0020950434263795614, -0.010992133989930153, 0.025935431942343712, -0.01630367524921894, 0.038138747215270996, 0.02339751459658146, -0.0067468564957380295, 0.03716207668185234, 0.02464527077972889, 0.00879527349025011, 0.026771055534482002, -0.004633880220353603, 0.014755629934370518, -0.00019046849047299474, -0.00029983630520291626, -0.03641495481133461, 0.03243299573659897, -0.04359087720513344, 0.0009276102646254003, 0.009534874930977821, 0.031237948685884476, 0.02278057113289833, -0.03825812414288521, -0.0399416908621788, 0.01480680238455534, -0.03256991505622864, 0.022833991795778275, 0.009684683755040169, -0.03570224344730377, 0.012900321744382381, 0.05383466184139252, 0.005288719665259123, 0.009892660193145275, -0.016102412715554237, -0.013390477746725082, -0.005518898833543062, -0.00012163505743956193, 0.05245493724942207, -0.031111054122447968, -0.01802607625722885, 0.07023980468511581, 0.02024688757956028, -0.022969791665673256, -0.06245231255888939, 0.023315178230404854, -0.008234899491071701, 0.027281032875180244, 0.01644795574247837, 0.026590285822749138, -0.0062599158845841885, -0.03429004177451134, 0.012974576093256474, 0.010075261816382408, 0.00138092169072479, 0.020195605233311653, 0.04246523976325989, 0.028804214671254158, 0.009320122189819813, -0.029385549947619438, -0.01224660687148571, 0.002243469934910536, -0.017886273562908173, -1.2490256828812107e-8, -0.0025109422858804464, 0.0032299738377332687, -0.011667689308524132, 0.045137014240026474, 0.01691362075507641, 0.016444744542241096, -0.01714378595352173, -0.018061140552163124, -0.008086282759904861, 0.01476527564227581, 0.0142321502789855, -0.012858444824814796, 0.02110908180475235, 0.051385298371315, 0.02474987506866455, -0.03371948376297951, 0.02340824343264103, -0.026593701913952827, 0.008402400650084019, -0.009125938639044762, 0.004858699161559343, 0.04771889001131058, 0.006550974678248167, -0.024327686056494713, -0.027524910867214203, 0.003728637471795082, 0.029310980811715126, -0.052842918783426285, -0.01936028152704239, -0.0398406907916069, -0.0063440632075071335, -0.027972400188446045, -0.05076507106423378, 0.03841976448893547, -0.04837467148900032, -0.04781191796064377, 0.006502434611320496, 0.004791947081685066, -0.013714248314499855, 0.0007458930485881865, -0.02661343663930893, -0.016756607219576836, -0.024577215313911438, -0.0367046520113945, -0.015776503831148148, 0.01174867618829012, -0.005638315342366695, 0.03757723793387413, 0.0034358357079327106, 0.01834169030189514, 0.026865797117352486, -0.025165574625134468, 0.02086813561618328, 0.0028783802408725023, 0.05017564818263054, 0.01784464344382286, 0.04948901757597923, 0.011256412602961063, 0.001968999160453677, -0.021469024941325188, -0.005335804540663958, 0.04397589713335037, 0.0004156974609941244, -0.005506457760930061 ]
flink-sql-export-nested-json-kafka
https://markhneedham.com/blog/2023/01/24/flink-sql-export-nested-json-kafka
false
2023-06-05 02:44:37
Python: Padding a string
[ "til", "python" ]
[ "TIL" ]
I've been writing some scripts to parse data from Apache Pinot's HTTP API and I wanted to format the values stored in a map to make them more readable. In this blog post, we'll look at some ways that I did that. I started with a map that looked a bit like this: [source, python] ---- segments = { "events3__4__1__20230605T1335Z": "CONSUMED", "events3__4__20__20230605T1335Z": "CONSUMING" } ---- And then I iterated over and printed each item like this: [source, python] ---- for segment_id, status in segments.items(): print(segment_id, status) ---- .Output [source, text] ---- events3__4__1__20230605T1335Z CONSUMED events3__4__20__20230605T1335Z CONSUMING ---- I wanted to have the `segment_id` be a fixed width so that the statuses would be aligned. One way that we can do this is with an f-string. If we want to add padding to the right with a fixed width of 35 columns, it'd be like this: [source, python] ---- for segment_id, status in segments.items(): print(f"{segment_id: <35}", status) ---- .Output [source, text] ---- events3__4__1__20230605T1335Z CONSUMED events3__4__20__20230605T1335Z CONSUMING ---- And if we want to add padding to the left: [source, python] ---- for segment_id, status in segments.items(): print(f"{segment_id: >35}", status) ---- .Output [source, text] ---- events3__4__1__20230605T1335Z CONSUMED events3__4__20__20230605T1335Z CONSUMING ---- That works well if we want to fill with spaces, but what if we want to specify a filler character? In that case, we can use `ljust` and `rjust`: [source, python] ---- for segment_id, status in segments.items(): print(segment_id.ljust(35, "."), status) ---- .Output [source, text] ---- events3__4__1__20230605T1335Z...... CONSUMED events3__4__20__20230605T1335Z..... CONSUMING ---- And padding from the left: [source, python] ---- for segment_id, status in segments.items(): print(segment_id.rjust(35, "-"), status) ---- .Output [source, text] ---- ------events3__4__1__20230605T1335Z CONSUMED -----events3__4__20__20230605T1335Z CONSUMING ----
In this post we'll learn how to pad the left and right of a string in Python.
uploads/2023/06/python-padding-banner.png
[ 0.0014872971223667264, -0.019940825179219246, -0.031006064265966415, 0.017036108300089836, 0.05939559265971184, 0.013691551983356476, -0.00001084833093045745, 0.05520184710621834, -0.007076817099004984, -0.0356111004948616, -0.03200504183769226, -0.03502238169312477, -0.07641465961933136, 0.024863863363862038, 0.0054868976585567, 0.08467551320791245, 0.07171128690242767, -0.03674406558275223, 0.03701763600111008, 0.009955690242350101, 0.03415362164378166, 0.04942016676068306, 0.002012127311900258, 0.015601306222379208, 0.0186043381690979, -0.021758029237389565, -0.010460492223501205, 0.025227833539247513, -0.04727572947740555, -0.004815423395484686, 0.01624087616801262, 0.0030414597131311893, -0.007740179542452097, 0.0013429253594949841, 0.04983329400420189, -0.013780704699456692, -0.03196513280272484, 0.002171766944229603, -0.022488567978143692, 0.009832403622567654, -0.04804510995745659, 0.018618252128362656, -0.005010675638914108, 0.01337489765137434, 0.006643810775130987, 0.003758644685149193, -0.04376906529068947, 0.02112245373427868, -0.01677439734339714, 0.011959107592701912, -0.044643253087997437, 0.035459067672491074, -0.01741456612944603, 0.009683847427368164, -0.009519769810140133, 0.043379418551921844, 0.00337450229562819, -0.06855769455432892, 0.027351120486855507, -0.01350314263254404, 0.0129599180072546, -0.010514460504055023, -0.007178033236414194, 0.027832651510834694, 0.0023544905707240105, -0.015405590645968914, -0.03540656343102455, 0.04246002063155174, -0.055990785360336304, -0.028488608077168465, -0.018379120156168938, 0.045417074114084244, -0.004845168441534042, -0.026115139946341515, 0.006630541756749153, -0.055308032780885696, -0.022533055394887924, 0.0712830051779747, -0.011364643462002277, 0.036303360015153885, -0.03606322780251503, -0.007312192115932703, 0.031945936381816864, 0.02825143188238144, 0.003555066417902708, -0.016287032514810562, -0.058692567050457, -0.038337547332048416, -0.03686939552426338, 0.04794107377529144, 0.010464035905897617, -0.046649593859910965, 0.02873077057301998, -0.00900780875235796, -0.017727864906191826, -0.007426978088915348, -0.02223402075469494, 0.011990468017756939, -0.03317055106163025, -0.02399824932217598, -0.05304719880223274, -0.013892952352762222, 0.05511956661939621, 0.062276553362607956, -0.05584784597158432, -0.03989185392856598, -0.042831964790821075, -0.007180084008723497, 0.029786385595798492, 0.03318987414240837, -0.044555872678756714, -0.022457659244537354, -0.005421943962574005, -0.008606206625699997, -0.07429981231689453, 0.04377448931336403, 0.030629392713308334, -0.023756271228194237, 0.0017377559561282396, 0.021457338705658913, 0.03252771124243736, 0.0530102364718914, 0.01795455627143383, 0.10831665992736816, -0.019006986171007156, 0.020404579117894173, 0.007555874064564705, 0.06648856401443481, -0.015543928369879723, -0.0482604056596756, -0.017372358590364456, 0.051553402096033096, -0.010626259259879589, -0.03362492099404335, -0.008432521484792233, -0.010150566697120667, 0.008223087526857853, -0.00926955696195364, 0.05937369540333748, 0.004312553908675909, 0.005218535661697388, -0.013994086533784866, -0.005811666138470173, -0.003291976172477007, 0.01998373679816723, 0.008183128200471401, -0.018377183005213737, -0.051030125468969345, -0.03544788807630539, 0.025725286453962326, 0.0011703975033015013, -0.004675066098570824, 0.0706992894411087, 0.010297158733010292, -0.011080131866037846, 0.06755299121141434, 0.002656060503795743, 0.06733988225460052, -0.0044580306857824326, -0.003933754749596119, 0.029055383056402206, 0.024282708764076233, 0.028254806995391846, 0.04668779298663139, 0.0011139913694933057, -0.017099089920520782, 0.024848060682415962, 0.03926578909158707, -0.034534186124801636, 0.009187046438455582, -0.036888446658849716, -0.04236559569835663, 0.07171686738729477, -0.04442509263753891, -0.004857209045439959, -0.00008039329259190708, 0.0822446197271347, 0.044790852814912796, 0.04061228036880493, 0.025033481419086456, -0.07869706302881241, 0.04087839648127556, 0.021770372986793518, 0.027858547866344452, 0.02067834883928299, -0.01413207221776247, 0.06659337133169174, 0.003667397191748023, 0.019456908106803894, 0.023514239117503166, -0.04814613237977028, -0.08548064529895782, -0.011841175146400928, 0.005744632333517075, 0.06575997918844223, -0.04599134624004364, 0.017575703561306, 0.06547842919826508, 0.023806452751159668, 0.04543067514896393, -0.022263068705797195, 0.006041174288839102, 0.023749370127916336, -0.055612873286008835, -0.04040628299117088, 0.008580496534705162, 0.02203175239264965, -0.028656011447310448, -0.006710725836455822, 0.010134887881577015, -0.027359802275896072, 0.000936296652071178, 0.05904890224337578, -0.008770416490733624, 0.037314269691705704, 0.0034116357564926147, 0.0577152781188488, -0.0325738787651062, 0.060045745223760605, -0.05627855658531189, 0.01343603152781725, 0.014604449272155762, -0.02661481313407421, -0.014265826903283596, -0.016908548772335052, 0.13250325620174408, 0.06597726792097092, 0.01307301502674818, -0.05860676243901253, 0.028283221647143364, -0.05092419683933258, -0.04111533612012863, 0.0018206926761195064, -0.011338716372847557, -0.028798380866646767, 0.041192635893821716, -0.04268115013837814, -0.03328438103199005, 0.013432804495096207, -0.03538913279771805, -0.003989741206169128, 0.0644807443022728, -0.008155779913067818, 0.030682092532515526, 0.012340787798166275, -0.020934253931045532, 0.002107562031596899, -0.016137711703777313, -0.025222646072506905, -0.005919907707720995, -0.022608544677495956, -0.00869186781346798, 0.05578692629933357, -0.06402144581079483, -0.04074452444911003, -0.0013161529786884785, -0.03542777895927429, 0.0037794981617480516, 0.06315979361534119, 0.04191157594323158, -0.05471620336174965, 0.05541783943772316, -0.02540808729827404, -0.004972022958099842, -0.03319090977311134, -0.039299044758081436, -0.024987779557704926, 0.014745309948921204, -0.008877965621650219, 0.03366987779736519, 0.03515314683318138, 0.009080914780497551, 0.04458297789096832, 0.008489927276968956, 0.015016135759651661, -0.007006220053881407, 0.04712509736418724, -0.001468884409405291, -0.014920515939593315, -0.042061105370521545, 0.01015210896730423, 0.047381650656461716, -0.03336042910814285, -0.046621374785900116, 0.01687144860625267, -0.05722777917981148, 0.03318719193339348, -0.05344068631529808, -0.041285693645477295, 0.031249407678842545, 0.030091410502791405, 0.05049768462777138, -0.014194708317518234, -0.01363922655582428, 0.0796869620680809, 0.01637282408773899, -0.021559428423643112, 0.022314608097076416, 0.007900948636233807, 0.03391736373305321, -0.005111458245664835, 0.046321261674165726, 0.0466751828789711, -0.00012722892279271036, -0.03164288401603699, -0.05155431851744652, -0.012786613777279854, -0.04727558046579361, -0.2659273147583008, 0.030635612085461617, -0.030816903337836266, -0.029687020927667618, 0.005534199997782707, -0.016429264098405838, -0.016834812238812447, -0.03462070971727371, -0.020821256563067436, -0.008312688209116459, -0.026466239243745804, -0.05016365647315979, -0.047941431403160095, 0.0473211370408535, 0.005954352673143148, 0.01894042082130909, -0.0057814642786979675, -0.025816528126597404, 0.022362174466252327, 0.03643142804503441, 0.006836079992353916, -0.07501237839460373, 0.017555270344018936, 0.06235611438751221, 0.011640883982181549, 0.023133600130677223, -0.05241788923740387, 0.05881521850824356, -0.06037846580147743, -0.04090878367424011, 0.021636491641402245, -0.0404377356171608, 0.017312902957201004, -0.022385312244296074, -0.013535012491047382, -0.05056971311569214, 0.019386818632483482, -0.013445593416690826, 0.01798384077847004, 0.023774288594722748, -0.022189415991306305, -0.03163747861981392, -0.017603347077965736, -0.0007105956901796162, 0.0723714530467987, -0.016597816720604897, -0.04624604806303978, -0.023651758208870888, -0.009083052165806293, 0.0653611272573471, 0.02022698149085045, -0.06274041533470154, -0.013727250508964062, -0.002775171073153615, -0.057918235659599304, 0.02382585220038891, 0.015729062259197235, -0.005210035480558872, -0.04968098923563957, -0.008279162459075451, -0.015962781384587288, -0.05831322446465492, -0.025447743013501167, -0.05448635667562485, 0.015529406256973743, -0.03519752249121666, -0.0753287822008133, 0.019843310117721558, 0.055004753172397614, 0.09182681888341904, -0.02997099794447422, -0.004771498963236809, -0.019677583128213882, -0.10672900825738907, -0.007137688808143139, -0.0366804413497448, -0.014030787162482738, -0.014519414864480495, -0.029249608516693115, 0.033651940524578094, -0.05741129070520401, -0.03857102245092392, 0.030575543642044067, 0.004983582999557257, 0.026783833280205727, -0.022057924419641495, 0.0035091990139335394, -0.03737959265708923, -0.015330667607486248, -0.02868080884218216, 0.05845840275287628, -0.029339443892240524, -0.015143937431275845, -0.012659783475100994, 0.002494435990229249, 0.021869709715247154, 0.04111022502183914, -0.004166991449892521, 0.0024626620579510927, 0.010016065090894699, -0.0000022441083729063394, -0.06818769872188568, -0.011179589666426182, -0.015096213668584824, -0.022862959653139114, 0.031103018671274185, -0.06930579245090485, 0.022768134251236916, 0.026877112686634064, 0.015160038135945797, -0.010194146074354649, -0.01493642758578062, -0.009101375937461853, -0.03846565634012222, -0.014105573296546936, -0.03885561600327492, 0.035797685384750366, 0.006410276982933283, 0.01861063577234745, -0.029820114374160767, -0.03128986060619354, 0.006583679001778364, 0.0433964841067791, -0.02428124099969864, -0.03488988056778908, -0.006409462541341782, -0.0019536581821739674, -0.009380447678267956, 0.031204117462038994, 0.00283501367084682, 0.021357020363211632, 0.014776374213397503, 0.06684525310993195, -0.014350046403706074, 0.03385908156633377, -0.019714821130037308, -0.028396515175700188, -0.008938129991292953, -0.031587664037942886, 0.017646702006459236, 0.008492709137499332, -0.013315263204276562, 0.013085759244859219, 0.014363224618136883, 0.02582339569926262, -0.006100134924054146, 0.016254285350441933, -0.03262857720255852, -0.01166190579533577, 0.03386176750063896, 0.002356457756832242, -0.0071104466915130615, -0.004958052653819323, -0.02109733410179615, -0.016791902482509613, 0.010608658194541931, 0.018285365775227547, -0.014785473234951496, -0.009210802614688873, -0.039894379675388336, 0.03822662681341171, -0.047457464039325714, -0.019345156848430634, 0.002737312577664852, -0.015138286165893078, 0.04124152660369873, -0.02028670534491539, 0.02698635682463646, -0.016919706016778946, -0.005937390960752964, 0.02316068671643734, -0.006939750164747238, -0.011037744581699371, 0.012926477938890457, -0.028878454118967056, -0.03707892820239067, 0.025706948712468147, 0.07166009396314621, 0.007873729802668095, -0.0017124742735177279, 0.019827384501695633, 0.013068468309938908, 0.016098640859127045, -0.017758619040250778, 0.052545998245477676, 0.03525566682219505, -0.042470019310712814, -0.0071288482286036015, -0.01496758870780468, -0.05024592950940132, -0.011881131678819656, -0.015089246444404125, -0.04029909893870354, 0.011835962533950806, -0.025507263839244843, -0.06569184362888336, 0.01466321386396885, 0.013083869591355324, -0.010828783735632896, 0.005425340961664915, 0.015761595219373703, -0.0008611149387434125, -0.01960090920329094, 0.022696349769830704, 0.05393531173467636, -0.04426643252372742, 0.025459468364715576, -0.01311026606708765, -0.012718875892460346, 0.006379836704581976, 0.028089797124266624, -0.04785238578915596, -0.004555670078843832, -0.0016527718398720026, 0.012888950295746326, -0.022189434617757797, -0.04442567378282547, -0.037613868713378906, 0.0016983505338430405, -0.024175183847546577, 0.008142759092152119, -0.03405681997537613, -0.011193111538887024, -0.01371063943952322, -0.027764802798628807, 0.03660542145371437, -0.007515441160649061, -0.011962712742388248, 0.05646222457289696, -0.03228037431836128, 0.05635034665465355, -0.039374738931655884, 0.059699613600969315, 0.04787050560116768, -0.017365336418151855, -0.012379673309624195, -0.07622812688350677, 0.0026651660446077585, -0.01987358368933201, 0.09605234116315842, 0.013021363876760006, -0.007219095714390278, -0.04068422317504883, 0.021443039178848267, -0.013791370205581188, 0.004990484565496445, -0.01680203154683113, -0.04014992341399193, -0.004078267607837915, 0.055506061762571335, -0.020544294267892838, 0.013270166702568531, 0.011159571819007397, -0.04856312274932861, 0.050864264369010925, -0.004589394200593233, -0.045106854289770126, -0.018933091312646866, -0.06091897189617157, 0.02280133031308651, 0.01075588259845972, 0.03378818929195404, -0.044618915766477585, 0.03481503203511238, 0.03183716908097267, 0.02507830783724785, 0.04331550747156143, -0.009402581490576267, 0.022822827100753784, -0.028557302430272102, -0.013828111812472343, -0.06760817021131516, -0.0019921825733035803, 0.037722148001194, 0.00999036617577076, -0.0643393024802208, 0.005986228585243225, -0.057176556438207626, 0.019262386485934258, -0.07733259350061417, -0.011151931248605251, 0.06092099845409393, 0.02713516168296337, 0.02662484161555767, 0.0355619452893734, -0.029739193618297577, 0.047218695282936096, 0.035001181066036224, -0.047647785395383835, -0.02071337029337883, 0.023944910615682602, 0.06285040080547333, 0.0021261482033878565, 0.04238390922546387, -0.013952945359051228, 0.01195880863815546, 0.07433098554611206, 0.024949781596660614, 0.029563939198851585, 0.05514400824904442, -0.0388733372092247, 0.04680195078253746, 0.01646522432565689, 0.008206506259739399, -0.010243543423712254, 0.027187705039978027, -0.026376917958259583, -0.07932700961828232, 0.017054295167326927, 0.0010550752049311996, 0.01593872159719467, -0.025169657543301582, 0.07763150334358215, -0.0018082185415551066, -0.03226376324892044, -0.06157900020480156, 0.02632373757660389, -0.04289860278367996, -0.009332848712801933, -0.03105951100587845, 0.0001824306818889454, -0.03432350605726242, 0.07443428039550781, -0.007630576379597187, 0.0052801743149757385, 0.07698903977870941, -0.035298120230436325, 0.0011909831082448363, 0.036816731095314026, 0.07862065732479095, 0.07058793306350708, 0.04258570075035095, 0.018404629081487656, 0.04370371252298355, -0.037122003734111786, -0.024327566847205162, -0.015055135823786259, -0.017072923481464386, 0.01448273565620184, -0.012737104669213295, 0.00025392486713826656, 0.0703786239027977, -0.03309166058897972, 0.07148830592632294, 0.018005680292844772, 0.006539242807775736, -0.00407361937686801, 0.007116248365491629, 0.0328158438205719, 0.016470886766910553, 0.010050628334283829, 0.03552732616662979, -0.010122126899659634, -0.00491377105936408, 0.027878250926733017, 0.0216266717761755, -0.002192131709307432, 0.02247474156320095, -0.030422784388065338, 0.021373040974140167, 0.026483094319701195, 0.04436425864696503, 0.08218423277139664, -0.01970529928803444, -0.0660233274102211, 0.01930355094373226, 0.021450141444802284, -0.025302600115537643, 0.03126509115099907, -0.010681038722395897, 0.004461909178644419, 0.0032598357647657394, -0.04565483331680298, -0.026654720306396484, -0.022665709257125854, -0.015711955726146698, 0.01699204556643963, 0.00775594636797905, 0.006835118401795626, 0.001681296736933291, 0.011560093611478806, -0.08490118384361267, -0.023926107212901115, -0.0713421106338501, -0.050973955541849136, -0.061342351138591766, -0.005124496761709452, -0.01295879390090704, -0.013225521892309189, -0.025085825473070145, -0.03475341200828552, -0.04585129767656326, 0.007090080063790083, -0.04227636754512787, -0.02462068386375904, -0.0016474941512569785, 0.022343561053276062, 0.06863269954919815, 0.03246012702584267, 0.023818781599402428, 0.06531465798616409, 0.015173664316534996, 0.005417356733232737, -0.0068680960685014725, 0.003210275899618864, 0.07271022349596024, 0.017331261187791824, -0.0016148739960044622, -0.08010105043649673, 0.005069714039564133, 0.013604221865534782, 0.02118667960166931, -0.07267697155475616, 0.021459009498357773, 0.035136282444000244, -0.012743745930492878, 0.0284636989235878, -0.0283048115670681, 0.0022033669520169497, -0.00639954162761569, -0.029048174619674683, -0.016133785247802734, 0.009482868015766144, 0.04436493292450905, -0.03897418826818466, 0.06529939919710159, 0.03186256065964699, -0.02131277322769165, -0.01663406565785408, 0.007801627740263939, -0.04504803195595741, 0.0275324247777462, -0.04782133176922798, -0.02871992066502571, -0.04892232269048691, -0.046695590019226074, 0.002083197236061096, 0.015838611871004105, -0.03788783773779869, -0.03237514570355415, -0.01450011320412159, 0.04155571386218071, -0.030801918357610703, 0.04361444711685181, -0.01959734596312046, 0.019586652517318726, -0.02245916612446308, -0.025181176140904427, -0.03709668666124344, 0.04774373024702072, -0.0174294114112854, 0.01959860324859619, 0.017362231388688087, -0.015838172286748886, 0.0053188917227089405, -0.008342250250279903, 0.039747368544340134, 0.010900739580392838, -0.052245453000068665, 0.005701613612473011 ]
[ -0.06273709982633591, -0.027866752818226814, -0.033543433994054794, -0.017339441925287247, 0.05273314565420151, -0.0639476552605629, -0.025089269503951073, 0.0028674823697656393, -0.003665476106107235, 0.0028082532808184624, -0.015032350085675716, -0.08192726224660873, 0.004799061920493841, -0.010760736651718616, 0.03455895185470581, -0.01086430624127388, -0.026437930762767792, -0.05387058109045029, -0.022344661876559258, 0.049791403114795685, 0.04632061719894409, 0.01807015761733055, -0.050796158611774445, -0.02801239863038063, -0.009220174513757229, 0.056395746767520905, 0.043562378734350204, -0.0195922888815403, -0.015064973384141922, -0.22672247886657715, 0.028576331213116646, -0.03800523653626442, 0.011557112447917461, -0.04469718039035797, 0.015307777561247349, 0.03974616155028343, 0.02404915541410446, 0.005792348645627499, 0.027926888316869736, 0.06553034484386444, 0.045200198888778687, -0.016954179853200912, -0.06431449204683304, -0.012614976614713669, 0.007370247971266508, -0.025515981018543243, -0.04248161241412163, -0.003898042254149914, 0.01906595565378666, 0.003376526292413473, -0.06424403935670853, 0.019376277923583984, 0.000488875200971961, -0.02206401899456978, 0.0029480382800102234, 0.023540273308753967, 0.047515567392110825, 0.08791228383779526, 0.01364440843462944, -0.009847676381468773, 0.009513027966022491, -0.009317183867096901, -0.13359606266021729, 0.1233232170343399, 0.014344320632517338, 0.04764937981963158, -0.043670881539583206, 0.03248554468154907, -0.01210207212716341, 0.06426902115345001, -0.022754298523068428, -0.02783302403986454, -0.056434690952301025, 0.06711610406637192, 0.01609985902905464, -0.06516698002815247, 0.004051964730024338, 0.04010113701224327, 0.0327121801674366, -0.013607346452772617, -0.0653657540678978, -0.004380225669592619, 0.002615099074319005, -0.01633196882903576, -0.0110250785946846, -0.019813938066363335, -0.017386727035045624, 0.06033751741051674, 0.022208023816347122, 0.0024324997793883085, 0.02664448879659176, -0.016146667301654816, 0.0037180071230977774, 0.02803035080432892, -0.06944544613361359, -0.011135498993098736, -0.002238658955320716, 0.025466738268733025, -0.008600793778896332, 0.40482792258262634, -0.03867330402135849, -0.013994197361171246, 0.034972429275512695, 0.02592449262738228, 0.021049873903393745, -0.0040853810496628284, -0.008808947168290615, -0.027638297528028488, 0.0012166730593889952, -0.02802211605012417, -0.006280695553869009, -0.01811949536204338, 0.05225256457924843, -0.03918054327368736, 0.00439461600035429, 0.018615763634443283, 0.0007005307707004249, 0.01926971599459648, -0.020037248730659485, 0.012238806113600731, -0.017327025532722473, 0.016452839598059654, 0.011206593364477158, 0.02378213405609131, 0.017913391813635826, 0.036186181008815765, 0.06511396169662476, 0.06460302323102951, 0.028009401634335518, 0.03906022384762764, 0.036119602620601654, -0.03106006793677807, -0.06629979610443115, 0.020102988928556442, -0.03322955593466759, 0.01373293250799179, 0.04386909678578377, -0.01763051562011242, 0.016362899914383888, 0.011976892128586769, -0.021657582372426987, -0.060279808938503265, 0.006951095070689917, -0.02616286836564541, -0.027443600818514824, 0.1547398418188095, -0.011734789237380028, -0.026742756366729736, -0.04391345754265785, -0.029783280566334724, -0.023290427401661873, 0.035738468170166016, -0.010084325447678566, -0.053369585424661636, -0.0012848565820604563, 0.04912614822387695, 0.05810749530792236, -0.03455956280231476, -0.03775213286280632, -0.02085721120238304, -0.016177522018551826, -0.04986541345715523, -0.03813287615776062, 0.052096009254455566, 0.04383561760187149, -0.12959998846054077, -0.035753946751356125, 0.01590840518474579, 0.005343628115952015, -0.08356471359729767, 0.010135792195796967, 0.010735015384852886, -0.0019206150900572538, 0.007747293915599585, 0.036838047206401825, -0.027223952114582062, -0.030734386295080185, 0.028040016070008278, 0.07553687691688538, -0.0006124385981820524, -0.01778903789818287, -0.0018310531741008162, -0.042278580367565155, 0.0016875105211511254, -0.03264586627483368, -0.08153528720140457, -0.06243075430393219, 0.018932700157165527, -0.01881587505340576, -0.015498419292271137, -0.012603986077010632, -0.033988770097494125, -0.08183754980564117, 0.028286650776863098, 0.0002469246683176607, -0.038022078573703766, 0.04119575396180153, 0.025698672980070114, -0.005257373675704002, -0.018397260457277298, 0.041074495762586594, 0.036714598536491394, -0.017801428213715553, 0.026273515075445175, -0.030784333124756813, 0.0035578133538365364, 0.04410863667726517, -0.036035772413015366, 0.043558914214372635, 0.03194868937134743, -0.020750083029270172, 0.010292580351233482, -0.010172542184591293, 0.011518724262714386, -0.030222004279494286, -0.031080391258001328, 0.012558086775243282, 0.005906018428504467, 0.018908094614744186, 0.060544826090335846, -0.030233509838581085, -0.07563512027263641, -0.013063470833003521, -0.37093213200569153, -0.04280026629567146, -0.0020051279570907354, -0.013978499919176102, -0.00122672482393682, -0.041470397263765335, -0.010573563165962696, -0.007101893424987793, -0.017553500831127167, 0.03680706396698952, 0.0914982259273529, -0.04159175977110863, 0.01982494257390499, -0.045486241579055786, -0.027340615168213844, 0.008687600493431091, -0.034873757511377335, -0.03668423369526863, -0.0167696550488472, 0.05099602788686752, -0.001561762299388647, -0.015529920347034931, -0.04214080795645714, -0.033378612250089645, 0.019962258636951447, -0.0440264567732811, 0.13333983719348907, -0.010473969392478466, 0.05812889337539673, -0.05340241268277168, 0.05776407942175865, -0.013217194937169552, -0.006321513094007969, -0.08397097885608673, -0.0031611232552677393, 0.0015207105316221714, -0.01296329591423273, 0.03488435223698616, 0.004939533770084381, -0.02839447744190693, -0.036590367555618286, 0.02883417159318924, -0.024882107973098755, -0.049309439957141876, -0.0027597921434789896, 0.007139675319194794, -0.0010684707667678595, -0.06539998203516006, 0.012456683441996574, 0.07796624302864075, 0.0026823142543435097, 0.016908330842852592, 0.02036643587052822, 0.03339496627449989, 0.016476327553391457, -0.00947142206132412, -0.05276845023036003, -0.036778680980205536, -0.012828863225877285, -0.02769480086863041, 0.004686401225626469, 0.012682522647082806, 0.0338202640414238, -0.03587871789932251, -0.004690074827522039, 0.03444038704037666, 0.0005382905364967883, -0.002882588654756546, 0.034391727298498154, -0.016957757994532585, -0.03605247288942337, 0.09688281267881393, 0.014126498252153397, 0.01284843310713768, 0.023327207192778587, 0.04493336006999016, -0.015482023358345032, 0.05134962499141693, 0.046424806118011475, 0.013902048580348492, 0.05200483277440071, 0.016145069152116776, 0.04709724336862564, -0.04033713787794113, 0.014551580883562565, 0.03982590138912201, -0.02345903217792511, -0.008410732261836529, 0.0444817990064621, 0.006702153943479061, 0.021083075553178787, -0.015815358608961105, -0.02125650830566883, -0.04070865735411644, 0.06377922743558884, -0.015200303867459297, -0.2773810923099518, 0.041604090481996536, 0.048479385673999786, 0.05297960340976715, 0.010780952870845795, 0.01229415088891983, 0.03927947208285332, -0.03169633075594902, -0.01145085133612156, 0.013271545991301537, -0.007793197873979807, 0.05182979628443718, 0.012231746688485146, -0.014389541000127792, 0.02249971218407154, 0.00580061599612236, 0.055078938603401184, -0.009083924815058708, 0.008825333788990974, -0.017273709177970886, 0.025398623198270798, -0.0179213285446167, 0.1591922789812088, 0.02526426874101162, 0.009353267028927803, 0.02467484027147293, -0.006252603605389595, 0.0225966889411211, 0.08987588435411453, 0.027798619121313095, -0.010873437859117985, -0.022654470056295395, 0.06627290695905685, 0.012944472022354603, 0.039039887487888336, -0.05460957810282707, -0.027841072529554367, 0.00009539049642626196, 0.019060499966144562, -0.023313600569963455, 0.0011083963327109814, 0.015195155516266823, -0.05434870347380638, 0.037366341799497604, 0.03708837553858757, 0.0310265701264143, 0.001976186875253916, -0.04263563081622124, -0.021287305280566216, 0.0051874336786568165, 0.003471704199910164, -0.011342508718371391, -0.028602832928299904, 0.0009885047329589725, 0.01945601962506771, 0.090049147605896, 0.03144608065485954, -0.01762314885854721, 0.005356288980692625, 0.045553140342235565, -0.03025374561548233, -0.0647185817360878, 0.10167474299669266, 0.026614664122462273, -0.02689853310585022 ]
[ -0.002116805175319314, 0.04614170640707016, -0.03567032516002655, 0.026364684104919434, -0.016096284613013268, -0.035090625286102295, -0.0031426302157342434, 0.0043065957725048065, -0.008114800788462162, -0.008154279552400112, -0.02290446311235428, 0.021149706095457077, 0.00035302573814988136, -0.0285776499658823, 0.01714695431292057, -0.005710821133106947, 0.004132754635065794, -0.0029000022914260626, 0.007898427546024323, -0.02862808294594288, -0.03005615808069706, 0.04593173414468765, 0.04210146144032478, -0.0014801978832110763, -0.0343015156686306, 0.03767472878098488, -0.015095535665750504, 0.0049172318540513515, 0.00515895988792181, -0.10921788960695267, -0.0028489462565630674, -0.03128766268491745, 0.014815043658018112, -0.02033301256597042, 0.0006663008243776858, -0.006250447127968073, -0.012293919920921326, -0.026760641485452652, 0.023157920688390732, 0.01607201248407364, 0.022261831909418106, -0.025674520060420036, -0.0449160672724247, -0.016710689291357994, 0.003083915216848254, -0.02161036804318428, -0.03976142406463623, -0.010127841494977474, -0.03535528481006622, 0.050579734146595, -0.029735036194324493, 0.02642192877829075, -0.005805300548672676, 0.0024159704335033894, 0.050111014395952225, -0.04463648051023483, -0.03051084838807583, 0.016124678775668144, -0.023058753460645676, -0.03326604142785072, 0.01802779547870159, 0.008507118560373783, -0.027777638286352158, -0.026750970631837845, -0.018813220784068108, -0.021631579846143723, -0.014467811211943626, 0.02094506286084652, 0.0171369481831789, -0.0084132244810462, -0.02603856287896633, 0.020738910883665085, -0.017060548067092896, -0.02995690330862999, 0.017026305198669434, 0.0005399790243245661, 0.01391781959682703, -0.04345301538705826, -0.020489821210503578, -0.002192386193200946, -0.029630262404680252, 0.007650510873645544, 0.029299499467015266, 0.03139513358473778, -0.0017477248329669237, -0.05726517364382744, -0.0019996222108602524, 0.04073190316557884, -0.0017459786031395197, -0.006518330425024033, -0.028263302519917488, 0.004741280805319548, -0.0005629849620163441, 0.002518415916711092, -0.09245160222053528, 0.006831480655819178, -0.02328234724700451, -0.02105465717613697, -0.037979546934366226, 0.8503140807151794, 0.005783362779766321, 0.009633938781917095, 0.010301035828888416, 0.009885501116514206, -0.0012457732809707522, -0.006898437160998583, -0.017740724608302116, -0.012696139514446259, -0.010942375287413597, -0.03429054841399193, 0.026949593797326088, 0.008853407576680183, 0.015221585519611835, 0.01687510311603546, 0.003385314019396901, 0.025669299066066742, -0.0002577312116045505, 0.014849786646664143, 0.03054288774728775, 0.0129559226334095, 0.013070929795503616, -0.009782635606825352, -0.00273538357578218, 0.021369976922869682, 0.016067758202552795, -0.16173043847084045, 0.006540099624544382, -8.018809568918919e-33, 0.0241814237087965, -0.022995056584477425, -0.016106612980365753, -0.00989892054349184, 0.05203692615032196, 0.01668868586421013, -0.014279576018452644, -0.020550882443785667, 0.020680682733654976, -0.016097314655780792, 0.03985634446144104, -0.006303172092884779, 0.026437576860189438, -0.02452896721661091, 0.03477849066257477, -0.023435043171048164, -0.028756387531757355, 0.061509065330028534, -0.022175651043653488, 0.01927235722541809, 0.0009636080940254033, 0.022036589682102203, 0.015291310846805573, 0.002745615318417549, 0.04138275608420372, 0.027137719094753265, -0.026726052165031433, 0.009611333720386028, -0.026287533342838287, -0.03600909933447838, -0.02964450791478157, 0.00766816595569253, 0.014363798312842846, -0.0748586654663086, 0.02427806332707405, -0.05408801883459091, 0.011497832834720612, 0.003645021701231599, -0.05203629285097122, -0.043749772012233734, -0.03643474355340004, -0.011739335022866726, -0.0036860366817563772, -0.011830540373921394, -0.02181524783372879, 0.002492596162483096, 0.00467179948464036, 0.05343792587518692, -0.004232782870531082, -0.0025960460770875216, 0.022981226444244385, 0.02306920476257801, 0.012586290016770363, -0.020579146221280098, -0.0050680264830589294, -0.00943028274923563, 0.0049140918999910355, 0.003838091855868697, 0.007779857609421015, 0.01384027674794197, -0.015188722871243954, -0.008457348681986332, 0.016486559063196182, 0.032610055059194565, -0.0019933537114411592, 0.010193015448749065, 0.05381328612565994, 0.03777528926730156, 0.019859174266457558, 0.02513112500309944, -0.06942935287952423, 0.02654380351305008, -0.03269873186945915, -0.014412511140108109, -0.00019517054897733033, -0.03678276762366295, 0.009957288391888142, -0.009858773089945316, 0.007094973232597113, 0.029538394883275032, 0.0159939955919981, -0.021732743829488754, 0.0024393480271101, -0.01809665933251381, -0.03142405301332474, -0.008341220207512379, 0.008491933345794678, 0.024481356143951416, -0.004451512824743986, 0.0019774080719798803, 0.018400967121124268, 0.032972175627946854, 0.020399564877152443, -0.02949460968375206, 0.0012375673977658153, 8.00205069289604e-33, -0.0197426900267601, 0.009205293841660023, -0.03680351749062538, 0.008890367113053799, 0.007695736363530159, -0.029421374201774597, 0.04815221205353737, 0.006445811130106449, -0.025018956512212753, 0.05319090560078621, -0.009900398552417755, -0.00033625229843892157, -0.028899865224957466, 0.02423558384180069, 0.046665143221616745, 0.0135198924690485, -0.0010213109198957682, 0.027372345328330994, 0.04819869622588158, 0.0018438517581671476, -0.013700391165912151, 0.002110676607117057, 0.025620007887482643, 0.011769245378673077, -0.0023520432878285646, 0.05182313919067383, -0.0193631611764431, -0.012269740924239159, -0.0030181664042174816, 0.00018282468954566866, -0.013263686560094357, -0.02484704554080963, 0.015410502441227436, -0.037473998963832855, -0.028877967968583107, 0.03519603610038757, 0.016848281025886536, -0.014989804476499557, 0.02113214135169983, -0.015048566274344921, 0.044585831463336945, 0.000498114328365773, 0.0018395270453765988, 0.019794780761003494, -0.014656257815659046, 0.01515958085656166, 0.012590685859322548, 0.014114604331552982, -0.023212401196360588, 0.004591674078255892, -0.005301896948367357, 0.029968785122036934, 0.0014193138340488076, 0.025111310184001923, 0.009572573937475681, -0.010236717760562897, -0.04209200292825699, 0.00045908443280495703, -0.06677623093128204, 0.0035185441374778748, -0.05099750682711601, 0.004572578240185976, 0.030220694839954376, 0.03341144695878029, 0.0026422026567161083, 0.0026978151872754097, -0.057947441935539246, -0.029310429468750954, 0.00863182544708252, -0.009482975117862225, 0.006380278151482344, -0.026409754529595375, -0.01288843248039484, 0.05444865673780441, 0.011331024579703808, 0.005817446857690811, -0.02123040147125721, 0.014502987265586853, 0.0014086903538554907, 0.043821293860673904, 0.01661953330039978, -0.010502971708774567, 0.014035863801836967, -0.004928234964609146, 0.0003182749205734581, 0.0025419958401471376, -0.015397254377603531, 0.0011830284493044019, 0.025195417925715446, -0.00253552058711648, -0.017805062234401703, 0.007023261860013008, -0.0076726628467440605, 0.02674848772585392, -0.0045305644161999226, -1.3458902436980225e-8, -0.044419653713703156, 0.020433612167835236, -0.03281001001596451, 0.047558754682540894, 0.0263979472219944, 0.017171399667859077, -0.026967555284500122, -0.02635231986641884, 0.009610236622393131, -0.0070198820903897285, 0.016984213143587112, -0.01881929486989975, -0.007159076631069183, 0.008464841172099113, 0.019242774695158005, -0.034470703452825546, -0.009740137495100498, -0.039926741272211075, 0.02534094825387001, 0.014219389297068119, 0.002830255776643753, 0.02747536450624466, -0.003865072736516595, -0.019050851464271545, 0.005779095459729433, -0.011766497045755386, 0.03803761675953865, -0.07377336919307709, 0.008489273488521576, -0.010556388646364212, 0.028228601440787315, -0.03672151640057564, -0.0063165174797177315, 0.05423464626073837, 0.010531200096011162, -0.05682931840419769, 0.02449188008904457, 0.0013531805016100407, 0.020702766254544258, 0.014673878438770771, -0.01780102401971817, -0.0021731925662606955, -0.012491059489548206, -0.028064845129847527, -0.013159186579287052, -0.01248578168451786, -0.017767582088708878, 0.03342374786734581, 0.017150091007351875, -0.014521042816340923, 0.00633656932041049, -0.03054523840546608, 0.029606860131025314, -0.007376383524388075, 0.06442252546548843, 0.024266764521598816, 0.032075315713882446, -0.012701069004833698, -0.008235915564000607, 0.011475634761154652, 0.02224694937467575, 0.017873689532279968, -0.014772764407098293, -0.02308427356183529 ]
python-pad-string
https://markhneedham.com/blog/2023/06/05/python-pad-string
false
2023-06-02 02:44:37
DuckDB: Generate dummy data with user defined functions (UDFs)
[ "duckdb", "til" ]
[ "DuckDB" ]
In the 0.8 release of DuckDB, they added functionality that lets you add your own functions when using the Python package I wanted to see if I could use it to generate dummy data so that's what we're going to do in this blog post. [NOTE] ==== I've created a video showing how to do this on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], so if you prefer to consume content through that medium, I've embedded it below: ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/EVLDg-RNjoc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ ==== We're going to do this using DuckDB's Python package. We'll install that, along with the Faker library, by running the following: [source, bash] ---- pip install duckdb faker ---- I then created a function to generate a fake person: [source, python] ---- import faker fake = faker.Faker() def generate_person(): person = { 'name': fake.name(), 'city': fake.city(), 'state': fake.state(), 'zip_code': fake.zipcode(), 'country': fake.country(), 'email': fake.email(), 'job': fake.job(), 'company': fake.company(), 'ssn': fake.ssn(), 'birthdate': fake.date_of_birth(), 'phone_number': fake.phone_number() } return person ---- Now we need to create a DuckDB database and register the function, which we'll do with the following code: [source, python] ---- import duckdb from duckdb.typing import * con.create_function( 'generate_person', generate_person, [], duckdb.struct_type({ 'name': 'VARCHAR', 'city': 'VARCHAR', 'state': 'VARCHAR', 'zip_code': 'VARCHAR', 'country': 'VARCHAR', 'email': 'VARCHAR', 'job': 'VARCHAR', 'company': 'VARCHAR', 'ssn': 'VARCHAR', 'birthdate': 'DATE', 'phone_number': 'VARCHAR' }) ) ---- A dictionary in Python maps to the `duckdb.struct_type` type in DuckDB. We can then pass in a map of the fields and their data types. We can then use that function in a query like this: [source, python] ---- con.sql(""" CREATE OR REPLACE TABLE people AS SELECT person.* FROM ( SELECT generate_person(random()) AS person FROM generate_series(1,10000) ) """) ---- When I ran this script it was returning the same person repeatedly, which makes me think the function was being cached. To work around that, I add a `seed` parameter to the function, resulting in the following code: [source, python] ---- def generate_person(seed): person = { 'name': fake.name(), 'city': fake.city(), 'state': fake.state(), 'zip_code': fake.zipcode(), 'country': fake.country(), 'email': fake.email(), 'job': fake.job(), 'company': fake.company(), 'ssn': fake.ssn(), 'birthdate': fake.date_of_birth(), 'phone_number': fake.phone_number() } return person con.create_function( 'generate_person', generate_person, [DOUBLE], duckdb.struct_type({ 'name': 'VARCHAR', 'city': 'VARCHAR', 'state': 'VARCHAR', 'zip_code': 'VARCHAR', 'country': 'VARCHAR', 'email': 'VARCHAR', 'job': 'VARCHAR', 'company': 'VARCHAR', 'ssn': 'VARCHAR', 'birthdate': 'DATE', 'phone_number': 'VARCHAR' }) ) con.sql(""" CREATE OR REPLACE TABLE people AS SELECT person.* FROM ( SELECT generate_person(random()) AS person FROM generate_series(1,10000) ) """) ---- And now it works!
In this post we'll learn how to create dummy data with DuckDB user defined functions (UDFs).
uploads/2023/02/dbz-banner.png
[ 0.010663671419024467, -0.003358539193868637, -0.006458645686507225, 0.08035522699356079, 0.10079184919595718, 0.018798204138875008, 0.0002773379674181342, 0.03908367455005646, -0.01503726840019226, -0.004209341015666723, -0.021782375872135162, -0.010697380639612675, -0.07860623300075531, 0.00461936928331852, -0.02815352752804756, 0.043311476707458496, 0.06757134199142456, -0.013436411507427692, 0.06093394756317139, 0.009267488494515419, -0.00021225055388640612, 0.04495985433459282, -0.014662006869912148, 0.029090696945786476, -0.0017837138148024678, 0.03081359714269638, 0.013132493942975998, 0.02646733820438385, -0.07131673395633698, -0.014109496958553791, 0.03707534819841385, -0.007829386740922928, 0.00044429744593799114, -0.02644573524594307, 0.018987806513905525, 0.036178089678287506, -0.03682159632444382, 0.03439798951148987, -0.014752241782844067, 0.04310329630970955, -0.06743472069501877, 0.010760936886072159, -0.007062227930873632, -0.014380634762346745, -0.07845956832170486, -0.02426895685493946, -0.014476865530014038, 0.02628150023519993, 0.017248498275876045, 0.0014120350824669003, -0.04328504204750061, 0.0721101313829422, -0.02865506522357464, -0.008699271827936172, 0.007206208538264036, 0.02842267043888569, 0.046996891498565674, -0.09348306804895401, 0.019836673513054848, -0.01739513874053955, 0.027189888060092926, 0.016872303560376167, -0.0071346573531627655, 0.001868504099547863, -0.001373344799503684, -0.01484654750674963, -0.0041785999201238155, 0.0432450994849205, -0.037863802164793015, -0.002602985827252269, 0.01640360988676548, -0.016776535660028458, -0.07246626913547516, -0.03233759477734566, 0.0004119269724469632, -0.034090884029865265, -0.016941634938120842, 0.06003395467996597, 0.02084743045270443, 0.03370817378163338, 0.006352182012051344, -0.00042257297900505364, 0.01763986609876156, 0.030858147889375687, -0.01898445561528206, -0.031881172209978104, -0.04851127043366432, 0.012717844918370247, -0.07503567636013031, 0.029806161299347878, -0.022110074758529663, -0.06252174079418182, 0.025102896615862846, 0.005510946735739708, -0.027169566601514816, -0.0024246997199952602, -0.00241088611073792, -0.0036418067757040262, 0.0315110869705677, -0.00827018916606903, -0.04360189661383629, -0.0206072349101305, 0.019716521725058556, 0.012634780257940292, -0.0645039901137352, -0.00013687532918993384, -0.005803056992590427, -0.030830249190330505, -0.014022339135408401, 0.03075023740530014, -0.023866407573223114, 0.0020833159796893597, -0.02380436845123768, -0.0033997143618762493, -0.08357909321784973, 0.06608346849679947, 0.009956789202988148, -0.02693246863782406, -0.026107307523489, 0.0270160511136055, 0.06585585325956345, 0.03710195794701576, -0.02115130051970482, 0.07438032329082489, 0.04015062004327774, 0.023251034319400787, 0.003992015961557627, 0.06478139758110046, 0.017323875799775124, -0.05029677972197533, -0.02508687786757946, 0.04579433053731918, -0.015663500875234604, -0.0014995955862104893, 0.012303116731345654, -0.007056201342493296, -0.013083599507808685, -0.011628134176135063, 0.07500799000263214, 0.022820964455604553, 0.018703518435359, -0.009905805811285973, -0.03056959994137287, -0.002813840052112937, 0.018187418580055237, 0.005058505106717348, -0.003706008195877075, -0.036084312945604324, -0.03855742886662483, 0.0336177721619606, 0.006279950961470604, 0.011813517659902573, 0.06963661313056946, -0.03928235545754433, 0.01510011125355959, 0.07602056115865707, 0.02982773818075657, 0.011522437445819378, -0.008879320695996284, 0.0008907561423256993, 0.055965546518564224, 0.039869602769613266, -0.04310955852270126, 0.030688755214214325, 0.012868142686784267, -0.041934214532375336, 0.017657112330198288, 0.04766382649540901, -0.0152038699015975, -0.004197599831968546, -0.05732860788702965, -0.048426855355501175, 0.08028041571378708, 0.002071269089356065, -0.02702922932803631, 0.029452385380864143, 0.06460810452699661, 0.025663956999778748, 0.005294181872159243, 0.0373278483748436, -0.08012766391038895, 0.05126676708459854, 0.01501381490379572, 0.008390885777771473, 0.01813312992453575, 0.014407029375433922, 0.09715937823057175, 0.0144124710932374, 0.006961793173104525, 0.0615890733897686, -0.0751400887966156, -0.08412163704633713, -0.04091308265924454, 0.00013788875367026776, 0.057332418859004974, -0.046919289976358414, 0.003552000503987074, 0.07710961997509003, 0.05528440326452255, 0.033350419253110886, -0.02054661698639393, -0.015024385415017605, -0.009408692829310894, -0.014446122571825981, -0.040181152522563934, 0.015956902876496315, 0.03913549706339836, -0.02983860671520233, 0.02072404883801937, -0.008723767474293709, -0.015467123128473759, -0.03895611688494682, 0.028799185529351234, -0.04053479805588722, 0.03153974935412407, 0.04159511625766754, 0.018726160749793053, -0.01333450898528099, 0.012420217506587505, -0.043837178498506546, 0.0210011824965477, 0.033799394965171814, -0.030476488173007965, -0.02544780634343624, -0.019171154126524925, 0.13399483263492584, 0.0583847351372242, -0.028141893446445465, -0.045603055506944656, 0.022221585735678673, -0.020924285054206848, -0.03514457494020462, 0.03373701497912407, -0.003611780935898423, -0.01604105718433857, 0.021569978445768356, -0.0046593318693339825, 0.006237928289920092, 0.022511892020702362, -0.0456412099301815, 0.001603568671271205, 0.06603817641735077, -0.030646130442619324, 0.04951155185699463, -0.02164006233215332, -0.030671171844005585, -0.007177954539656639, -0.01794317178428173, -0.05001325532793999, -0.02543625608086586, 0.03052014485001564, 0.004065875429660082, 0.06416628509759903, -0.03432273119688034, 0.004377962555736303, -0.027915365993976593, -0.047536998987197876, 0.04064299538731575, 0.033215150237083435, 0.05590512230992317, -0.0031500656623393297, 0.03897339850664139, -0.009109714068472385, 0.028188221156597137, -0.035875409841537476, -0.04251185432076454, -0.06000455841422081, -0.01874421536922455, -0.0012494748225435615, 0.0506000742316246, 0.011824469082057476, 0.005540890619158745, -0.01672445237636566, 0.024488650262355804, 0.022231759503483772, 0.008741183206439018, 0.009824750944972038, 0.0023344086948782206, -0.02339983358979225, -0.05522327870130539, -0.037327270954847336, 0.07227690517902374, -0.04579543322324753, -0.054090436547994614, -0.014066408388316631, -0.06603580713272095, 0.0009238700149580836, -0.05306783318519592, -0.017090074717998505, 0.006614234298467636, 0.019974075257778168, 0.045916084200143814, -0.0019975926261395216, 0.02537417970597744, 0.062133386731147766, -0.015317967161536217, -0.005395329557359219, 0.022817006334662437, 0.005379829555749893, 0.05036347359418869, 0.016034690663218498, 0.01790098287165165, 0.016510413959622383, 0.002614367287606001, -0.017729058861732483, -0.03842240571975708, 0.02833910472691059, -0.04893966391682625, -0.2838588356971741, 0.0388062559068203, -0.007160710170865059, -0.025870462879538536, 0.011103678494691849, -0.041726551949977875, -0.003231473034247756, -0.04151177778840065, -0.023534640669822693, 0.011761738918721676, -0.021332116797566414, -0.0320889838039875, -0.024727867916226387, 0.02993069589138031, 0.010802429169416428, -0.016592497006058693, 0.008066902868449688, -0.010440903715789318, -0.01476304978132248, 0.041433386504650116, -0.008492400869727135, -0.06241074576973915, 0.001816535834223032, 0.026531817391514778, 0.02831248566508293, 0.01126075629144907, -0.05531337112188339, 0.02875467576086521, -0.06447237730026245, -0.025096774101257324, -0.003870888613164425, -0.0033004761207848787, 0.00010500280768610537, -0.0031243504490703344, -0.014119752682745457, -0.01740562915802002, 0.027882779017090797, 0.002139993477612734, 0.02134218066930771, 0.012239266186952591, -0.04966354742646217, -0.025498928502202034, -0.0019197718938812613, 0.005030340049415827, 0.09427763521671295, -0.0045227548107504845, -0.0655442625284195, -0.003185475245118141, -0.04780789092183113, 0.06733904778957367, -0.03753035515546799, -0.03758557513356209, -0.008095511235296726, 0.03860803693532944, -0.04425838962197304, 0.02021261677145958, 0.007343100383877754, 0.02229480631649494, -0.0477287694811821, -0.03989281877875328, 0.043077193200588226, 0.01694357953965664, -0.0466187410056591, -0.00551373278722167, 0.027137460187077522, -0.08953362703323364, -0.03797405958175659, -0.026124194264411926, 0.07750760018825531, 0.06858871877193451, -0.0214347206056118, 0.004317019134759903, -0.023277807980775833, -0.10978636890649796, 0.040492940694093704, -0.03806407377123833, -0.002238562097772956, -0.004671700764447451, 0.025768907740712166, 0.07016885280609131, -0.019521059468388557, -0.026341406628489494, 0.036267343908548355, 0.0077887712977826595, 0.010434643365442753, -0.013397169299423695, 0.014360365457832813, 0.007514316588640213, -0.024559659883379936, -0.028225749731063843, 0.07789678126573563, -0.04293575510382652, -0.01411608699709177, -0.0016721206484362483, -0.013087974861264229, 0.06199498847126961, 0.019407188519835472, -0.0007670563063584268, 0.015132476575672626, 0.02066485956311226, 0.01787092164158821, -0.04135410487651825, -0.024308079853653908, -0.04585438221693039, -0.0004702036385424435, -0.014549093320965767, -0.04957367852330208, 0.012030703015625477, 0.016093380749225616, 0.021307243034243584, -0.04513847455382347, -0.004514956381171942, -0.015649061650037766, -0.058355093002319336, -0.04416142404079437, -0.020335931330919266, 0.008652674965560436, -0.007472719997167587, 0.025894733145833015, -0.03079909458756447, -0.05026160180568695, -0.0013599804369732738, 0.014148653484880924, -0.002779676578938961, -0.0575312003493309, -0.018996600061655045, -0.00853724591434002, 0.018524030223488808, 0.048795972019433975, -0.01982886902987957, -0.00713542802259326, 0.027728216722607613, 0.009466403163969517, -0.03006524220108986, 0.041261278092861176, 0.0030038836412131786, -0.026076974347233772, -0.024397242814302444, -0.0042150565423071384, 0.020245365798473358, -0.0001059747883118689, -0.024625763297080994, 0.03707382455468178, 0.037013065069913864, 0.04531155154109001, 0.007162585388869047, 0.04101734235882759, 0.01792989671230316, -0.019666194915771484, 0.013317733071744442, 0.02891581505537033, -0.038181208074092865, 0.024373255670070648, -0.0375104621052742, -0.020639685913920403, -0.015151751227676868, 0.05352532118558884, 0.0071539911441504955, 0.011906569823622704, -0.037516891956329346, 0.026570739224553108, -0.03483396768569946, 0.018437644466757774, -0.012361370027065277, 0.015020621940493584, 0.06791435927152634, 0.005716623272746801, 0.009236084297299385, 0.02456393837928772, -0.007945462130010128, 0.014716698788106441, 0.018259119242429733, -0.03230886906385422, -0.021788086742162704, 0.005195042118430138, -0.011004026047885418, -0.007440360728651285, 0.01741926558315754, 0.02026534453034401, -0.0018497073324397206, 0.0007329742074944079, -0.02322426252067089, 0.02665695920586586, -0.002566694049164653, 0.05265144631266594, 0.02883978560566902, -0.0452098473906517, -0.012008833698928356, 0.007386291865259409, -0.03851613774895668, -0.03188825398683548, -0.022415289655327797, 0.006177376955747604, -0.0012492374517023563, -0.030675172805786133, -0.06793037056922913, 0.01298980601131916, 0.042394768446683884, -0.03842461481690407, -0.013045554049313068, -0.013619838282465935, -0.019928133115172386, -0.019705723971128464, 0.06690111756324768, 0.06791678816080093, -0.0654299259185791, -0.012875077314674854, -0.012892416678369045, 0.02096010558307171, -0.0019457625458016992, 0.02381560578942299, -0.020080864429473877, -0.028837215155363083, -0.02493402361869812, -0.007858535274863243, 0.016083845868706703, -0.010347572155296803, -0.017032073810696602, -0.005891443230211735, 0.010507532395422459, -0.001727435039356351, -0.007097274996340275, -0.014328695833683014, -0.0021363000851124525, -0.017702903598546982, 0.0026969730388373137, -0.0350240021944046, -0.003025416750460863, 0.007040787488222122, -0.021180208772420883, 0.05697464197874069, -0.028429904952645302, 0.03959370404481888, 0.01896672323346138, -0.025069663301110268, -0.012607919983565807, -0.05911759287118912, 0.03216301649808884, 0.007117733359336853, 0.030266625806689262, -0.031943995505571365, -0.0034279946703463793, -0.04327613487839699, 0.009412778541445732, -0.03002884052693844, -0.0026067732833325863, -0.020490488037467003, -0.0036697464529424906, 0.02684571035206318, 0.045265596359968185, -0.004450018983334303, 0.03650091961026192, -0.016065217554569244, -0.013694742694497108, 0.026073994114995003, -0.04742356762290001, -0.026123180985450745, -0.002224968047812581, -0.03061075136065483, 0.022785505279898643, 0.01175190880894661, 0.06307198107242584, -0.05873137339949608, 0.04008035734295845, 0.008431276306509972, 0.004528391174972057, 0.035968028008937836, -0.014329479075968266, 0.0411723293364048, -0.03794693201780319, -0.02269252948462963, -0.06588521599769592, -0.019527094438672066, 0.051354777067899704, 0.023802293464541435, -0.02834983356297016, 0.026181092485785484, -0.03479095175862312, 0.03788992017507553, -0.06075628474354744, -0.014834605157375336, 0.06700968742370605, 0.0008913539932109416, -0.017496051266789436, 0.0025513882283121347, -0.04357919469475746, 0.006232455838471651, 0.05795096233487129, -0.012517706491053104, -0.03703724965453148, -0.02131495624780655, 0.07032063603401184, 0.004311571829020977, 0.04063872620463371, 0.0025901319459080696, -0.030805297195911407, 0.06251100450754166, 0.009711661376059055, 0.024504687637090683, 0.017181865870952606, 0.009419578127563, 0.01837925799190998, 0.03293595835566521, 0.018707754090428352, 0.003912834916263819, 0.03624885156750679, -0.008312482386827469, -0.09025029093027115, 0.030986007302999496, 0.0020495716016739607, -0.015583510510623455, -0.05294260010123253, 0.055444445461034775, -0.008034172467887402, -0.0401422455906868, -0.05817130208015442, 0.03350122272968292, -0.03157251700758934, -0.009102036245167255, -0.028439918532967567, -0.031273551285266876, -0.06634575873613358, 0.07067123800516129, 0.005796337034553289, -0.015745706856250763, 0.04385967552661896, 0.006541595794260502, -0.0036991958040744066, 0.0119719123467803, 0.04546734690666199, 0.070821613073349, 0.0390312522649765, 0.04627395048737526, 0.057941656559705734, -0.0002751729334704578, -0.052777428179979324, 0.016610685735940933, -0.005008456762880087, -0.011243065819144249, -0.027829427272081375, -0.018525540828704834, 0.07170666754245758, -0.009874553419649601, 0.07804524153470993, -0.01259000413119793, 0.006867520045489073, 0.0183198694139719, 0.008441079407930374, 0.02176123484969139, 0.06286725401878357, -0.011341921053826809, 0.02339446358382702, -0.022989502176642418, -0.03681958466768265, 0.04696961119771004, -0.034081339836120605, 0.007677999325096607, 0.00997516606003046, -0.0057571567595005035, 0.017559709027409554, 0.0072737219743430614, 0.027921069413423538, 0.07479249686002731, -0.0248637143522501, -0.022800149396061897, -0.005419611930847168, -0.0020858915522694588, 0.011155991815030575, 0.03180936351418495, -0.026243219152092934, -0.00381446979008615, -0.0056702569127082825, -0.06125946342945099, -0.005257062613964081, -0.04049518704414368, -0.03707512095570564, 0.027476465329527855, -0.00694100558757782, -0.013790451921522617, 0.01985359936952591, -0.031518783420324326, -0.037883155047893524, -0.028597425669431686, -0.03205321356654167, -0.026150094345211983, -0.06319401413202286, -0.027944227680563927, -0.0029521342366933823, -0.032536815851926804, -0.03780772164463997, -0.03454725816845894, -0.027261296287178993, -0.006995422765612602, 0.0008336074533872306, -0.048600584268569946, -0.05727067589759827, 0.019398141652345657, 0.009889019653201103, 0.031117647886276245, 0.004912375006824732, 0.033529020845890045, 0.015795854851603508, -0.040560103952884674, -0.0068230945616960526, 0.016055922955274582, 0.045767493546009064, 0.019789069890975952, 0.016221066936850548, -0.0807960256934166, 0.019310398027300835, 0.007856392301619053, 0.0158288162201643, -0.07644210755825043, 0.01602843962609768, 0.03896820545196533, 0.00500242505222559, 0.05374954268336296, -0.030027102679014206, -0.011438198387622833, -0.025798344984650612, -0.03065682016313076, 0.003773831995204091, -0.0037914984859526157, 0.0328662283718586, -0.04582875967025757, 0.08242431282997131, 0.02497432567179203, -0.008887859992682934, -0.04174438491463661, -0.013900998048484325, -0.017340878024697304, -0.011894779279828072, -0.04390861093997955, -0.017312536016106606, -0.034127578139305115, -0.08541832119226456, -0.01181458868086338, 0.05411553755402565, -0.05142518877983093, -0.008045499213039875, -0.004356957972049713, 0.03317252919077873, -0.0005722789210267365, 0.04692646116018295, -0.05535315349698067, 0.020504621788859367, -0.025782745331525803, -0.011920017190277576, -0.02469664439558983, 0.03198445215821266, -0.0025861267931759357, 0.0158253014087677, 0.02015107125043869, -0.04237406700849533, -0.014319686219096184, -0.027741894125938416, 0.03001847304403782, 0.053269047290086746, -0.017340613529086113, 0.036039017140865326 ]
[ -0.08209551870822906, -0.04861405864357948, -0.04076220467686653, -0.06625187397003174, 0.05751638114452362, -0.019571151584386826, -0.007552616763859987, 0.009460845962166786, 0.004301630891859531, 0.016381610184907913, -0.019064757972955704, -0.06755325943231583, 0.030699869617819786, -0.03874450549483299, 0.07715719193220139, 0.023357326164841652, 0.013401647098362446, -0.08591237664222717, -0.04358355328440666, 0.0389786921441555, -0.0027394613716751337, 0.008158699609339237, -0.034821875393390656, -0.049395423382520676, -0.010228642262518406, 0.012746867723762989, 0.039387598633766174, -0.01375094149261713, 0.009686827659606934, -0.1856546252965927, 0.046532101929187775, -0.010806089267134666, 0.019961832091212273, -0.010661404579877853, 0.026104411110281944, 0.011107335798442364, 0.04369378462433815, 0.016772538423538208, -0.014394604600965977, 0.03432048484683037, 0.0273292176425457, -0.009969355538487434, -0.049145303666591644, -0.03988611325621605, 0.06363588571548462, -0.00764463422819972, -0.006571563892066479, -0.02307596243917942, -0.013892820104956627, -0.008400474674999714, -0.05570296198129654, 0.019716590642929077, -0.021603919565677643, -0.018955837935209274, -0.012676414102315903, 0.00614027539268136, 0.02573378011584282, 0.06563340127468109, 0.005618039518594742, 0.018335597589612007, 0.020456338301301003, -0.009604566730558872, -0.09959916025400162, 0.11202087998390198, 0.0019965828396379948, 0.08181033283472061, -0.04044480249285698, -0.04364737123250961, 0.00014233277761377394, 0.07790073752403259, -0.02263944037258625, -0.03771518915891647, -0.02857300266623497, 0.06749710440635681, -0.007852913811802864, -0.014945661649107933, -0.010679686442017555, 0.024054402485489845, 0.011361242271959782, -0.029201431199908257, -0.0520087406039238, -0.029344746842980385, -0.018510369583964348, -0.017388923093676567, -0.011167853139340878, 0.026630450040102005, 0.015732109546661377, 0.0409400537610054, -0.0005052912165410817, 0.03205449506640434, 0.03899358958005905, -0.008010661229491234, 0.06408356875181198, 0.015266599133610725, -0.07046101242303848, 0.0015250417636707425, 0.02272055484354496, 0.009578172117471695, -0.01812434196472168, 0.44753459095954895, -0.024420687928795815, -0.014525645412504673, 0.01839601993560791, 0.006822288502007723, 0.018235541880130768, -0.005387867800891399, -0.009903308004140854, -0.034469276666641235, 0.011218038387596607, -0.02477519027888775, 0.007026602979749441, -0.00891229696571827, 0.06773678213357925, -0.05591682344675064, 0.00021168863167986274, 0.0011324555380269885, -0.045023344457149506, 0.021937940269708633, -0.03274110332131386, -0.009178602136671543, 0.015149963088333607, 0.010332981124520302, 0.037198640406131744, 0.02372167445719242, 0.027955805882811546, -0.0018948568031191826, 0.04112734645605087, 0.0569998137652874, 0.020692503079771996, 0.029686909168958664, 0.027700109407305717, -0.028403043746948242, -0.06927161663770676, 0.03100793994963169, 0.007712553720921278, 0.010646716691553593, -0.0016249963082373142, 0.005233194213360548, 0.016344189643859863, 0.01887425221502781, -0.0008735971059650183, -0.012470520101487637, 0.02236597239971161, 0.021073810756206512, -0.04714672639966011, 0.08294711261987686, 0.011338659562170506, -0.006136199925094843, -0.05621262639760971, -0.03746993839740753, -0.00838810857385397, 0.01787051372230053, 0.03988621011376381, -0.05364284664392471, 0.021916305646300316, 0.02021540142595768, 0.08118341118097305, -0.014051041565835476, -0.06971204280853271, -0.00634857127442956, -0.024493500590324402, -0.03805840387940407, -0.01461812760680914, -0.012728627771139145, 0.03263748064637184, -0.13168689608573914, -0.0078653609380126, 0.0388064980506897, 0.01801835373044014, -0.053050972521305084, -0.016733357682824135, -0.017252132296562195, -0.06963565200567245, -0.0058640348725020885, 0.05153878778219223, -0.04984188824892044, -0.042512230575084686, 0.03791547939181328, 0.035107605159282684, 0.003631877712905407, -0.039469774812459946, -0.03812437132000923, -0.05107559636235237, -0.008054837584495544, -0.06753367930650711, -0.09974157810211182, -0.05478314682841301, 0.016842033714056015, -0.00024292900343425572, -0.008545001968741417, -0.03704426810145378, -0.013696115463972092, -0.07568947225809097, 0.0329589881002903, -0.014177254401147366, -0.04037101939320564, 0.020579516887664795, 0.009894548915326595, 0.026163384318351746, -0.02639860473573208, 0.016118420287966728, 0.023846928030252457, -0.003417513333261013, 0.012880063615739346, -0.07278867810964584, 0.039566218852996826, 0.04061250016093254, -0.0644206553697586, 0.0891178622841835, 0.028062982484698296, -0.03139229118824005, -0.008546353317797184, -0.008490603417158127, 0.01448826678097248, -0.02343038097023964, -0.03071591816842556, -0.001691531273536384, -0.004077177494764328, 0.029686689376831055, 0.00919485092163086, -0.03951164707541466, 0.0034170777071267366, -0.017321931198239326, -0.35423702001571655, -0.04346351698040962, -0.01802399940788746, 0.00327512645162642, 0.00845513679087162, -0.04475986212491989, 0.02262776903808117, 0.0056418427266180515, -0.0012581371702253819, 0.023330308496952057, 0.0738191306591034, -0.04427143558859825, 0.025518270209431648, -0.0702284425497055, -0.005111030302941799, 0.03413964435458183, -0.023285934701561928, -0.037659164518117905, -0.007599615957587957, 0.030635526403784752, -0.02280469611287117, -0.023520098999142647, -0.029864845797419548, -0.05670563504099846, 0.0007932843873277307, -0.0680808573961258, 0.13199453055858612, 0.02880346029996872, 0.0734446570277214, -0.028406254947185516, 0.0697883814573288, 0.010229169391095638, -0.012941207736730576, -0.08600937575101852, 0.010296772234141827, -0.021263666450977325, 0.006553094368427992, 0.016398068517446518, 0.002335123484954238, -0.023994984105229378, -0.05451120063662529, 0.025035209953784943, -0.00729023665189743, -0.06464160978794098, -0.02408449910581112, 0.014298646710813046, -0.027467800304293633, -0.032999664545059204, -0.040677595883607864, 0.07238398492336273, 0.022830475121736526, 0.013513341546058655, 0.020118093118071556, 0.019649192690849304, -0.004756693262606859, -0.04225878417491913, -0.028793785721063614, 0.004181016236543655, 0.010620989836752415, 0.01160292886197567, 0.03621708229184151, 0.02541063167154789, 0.012069511227309704, -0.0524105504155159, 0.005611518397927284, -0.014529270119965076, 0.0017363550141453743, 0.006819481961429119, 0.06355196982622147, -0.019381942227482796, -0.01360586378723383, 0.13111884891986847, 0.03267354518175125, 0.055606644600629807, 0.0388476699590683, 0.04399771988391876, -0.0019637024961411953, -0.02190142311155796, 0.006479386240243912, 0.012691310606896877, 0.017797375097870827, -0.01697777397930622, 0.0373745895922184, -0.030746374279260635, -0.012287789024412632, 0.027208177372813225, 0.008605779148638248, -0.03019058331847191, 0.07408561557531357, -0.0026400366332381964, -0.01192089356482029, -0.000826620205771178, -0.025942524895071983, -0.04998335987329483, 0.06107129901647568, -0.00007146115240175277, -0.27065637707710266, -0.015991564840078354, 0.013583012856543064, 0.057568926364183426, 0.017178170382976532, 0.013664799742400646, 0.06454300135374069, -0.015363594517111778, 0.011139201000332832, 0.01273629441857338, -0.003196519101038575, 0.007876691408455372, 0.010220996104180813, -0.005252443253993988, 0.019267458468675613, 0.009839816950261593, 0.02953195571899414, -0.0025062330532819033, -0.000493706320412457, 0.0006364116561599076, 0.02945551835000515, -0.01933237537741661, 0.16492626070976257, 0.028915589675307274, 0.022023700177669525, 0.026827353984117508, -0.009862147271633148, 0.015657953917980194, 0.10257217288017273, -0.0007568731089122593, -0.017034484073519707, -0.012594535015523434, 0.03421957790851593, -0.005350115709006786, 0.02420087531208992, -0.05088064819574356, -0.06158173084259033, 0.02918190322816372, 0.005814902018755674, -0.014997933059930801, -0.01201721653342247, 0.005599466618150473, -0.027556102722883224, 0.0627889558672905, 0.03899845853447914, 0.01225157082080841, 0.0033152794931083918, -0.02485097013413906, -0.03894289955496788, 0.02070898562669754, -0.01436180341988802, -0.03894394263625145, 0.005513694137334824, 0.0005519560654647648, 0.04005075991153717, 0.10153214633464813, 0.05075789615511894, 0.028263026848435402, 0.03821635618805885, 0.018730416893959045, -0.004984822124242783, -0.039587538689374924, 0.1172826811671257, 0.04441392794251442, 0.00757595244795084 ]
[ 0.024017207324504852, -0.0271388478577137, -0.020135799422860146, -0.004401246085762978, 0.03482738137245178, 0.02386271208524704, 0.015454737469553947, 0.009097106754779816, -0.0034222754184156656, -0.02438994310796261, -0.035131052136421204, 0.019186144694685936, -0.010639231652021408, 0.020654261112213135, 0.013621714897453785, -0.034594178199768066, 0.015803217887878418, -0.02757355384528637, 0.02199200913310051, -0.0062697590328752995, -0.032855916768312454, 0.02957012876868248, 0.05291805788874626, 0.042497601360082626, -0.043658334761857986, -0.01907171867787838, -0.02752099744975567, -0.001610528095625341, 0.037760935723781586, -0.14537394046783447, 0.01378769613802433, -0.025398630648851395, 0.003948997240513563, 0.00946942251175642, -0.01393833477050066, -0.018413804471492767, -0.00963584240525961, -0.011229146271944046, -0.02775026671588421, -0.023882046341896057, 0.00006836718239355832, -0.05293471738696098, 0.017208948731422424, 0.033022280782461166, -0.001760496641509235, 0.0009995108703151345, -0.03385285660624504, 0.02164462022483349, 0.004204272758215666, 0.002803421812132001, -0.06181127578020096, 0.003675874788314104, -0.0025998675264418125, 0.013317350298166275, -0.0183101836591959, 0.04762065410614014, 0.0001411062548868358, 0.027092525735497475, 0.04414933919906616, 0.0018113584956154227, -0.00318142119795084, -0.008639906533062458, 0.0008818511851131916, -0.008594868704676628, 0.010981952771544456, -0.032810721546411514, -0.018613003194332123, -0.025414397940039635, -0.003370467806234956, 0.029417196288704872, -0.02059503085911274, 0.021576937288045883, -0.03732959181070328, 0.005328080151230097, -0.03019588626921177, -0.04234764352440834, -0.008199869655072689, -0.015858778730034828, 0.020749613642692566, 0.06210185959935188, 0.009625743143260479, -0.014860636554658413, 0.014289982616901398, -0.0005871151224710047, 0.022969109937548637, -0.01921754702925682, 0.015565318986773491, 0.017690755426883698, -0.0223329346626997, -0.01080465130507946, -0.05549238622188568, 0.035097621381282806, 0.024251099675893784, 0.017317617312073708, -0.09478136897087097, 0.017060264945030212, -0.014381665736436844, -0.038174860179424286, -0.028683045879006386, 0.826543390750885, 0.003645335789769888, -0.024448461830615997, 0.04195835068821907, 0.037087228149175644, 0.05317296087741852, -0.012810408137738705, -0.01490802876651287, -0.01239650696516037, 0.014295523054897785, -0.001993174199014902, 0.00513730151578784, 0.005633291322737932, 0.001659417524933815, 0.004204320255666971, 0.029704751446843147, 0.013980736956000328, -0.02893640287220478, 0.0031966452952474356, -0.0019501972710713744, 0.021562941372394562, 0.04756717383861542, -0.0040409378707408905, 0.025900766253471375, -0.006440941244363785, -0.013557123020291328, -0.15651945769786835, 0.006272369995713234, -6.805150589945278e-33, 0.0602642260491848, -0.04545480012893677, 0.0031400821171700954, 0.019449301064014435, 0.027103058993816376, 0.03236519172787666, 0.014593874104321003, 0.04306894168257713, -0.014130093157291412, -0.03187181055545807, 0.024326970800757408, -0.027530759572982788, 0.015363792888820171, 0.020545879378914833, 0.04112705960869789, 0.030936868861317635, -0.014060698449611664, 0.03771251440048218, 0.027227912098169327, 0.028701176866889, 0.05581577494740486, 0.05202677100896835, 0.003275178372859955, 0.03760475292801857, -0.006734153255820274, 0.0255789365619421, 0.0029246287886053324, -0.014315801672637463, -0.004025802481919527, -0.035855818539857864, -0.04007161036133766, -0.02257145754992962, -0.007424025796353817, -0.0481250025331974, 0.035734716802835464, -0.05011390522122383, -0.04944785684347153, -0.0064287856221199036, -0.035461410880088806, 0.008697272278368473, -0.021740281954407692, -0.016327595338225365, -0.04512104019522667, -0.04335863143205643, -0.04381709545850754, 0.022853171452879906, 0.0411849319934845, 0.022690996527671814, -0.01846473105251789, 0.04419233649969101, 0.01027621515095234, -0.018067581579089165, -0.004153194837272167, -0.053268078714609146, 0.01706046424806118, 0.03254946321249008, 0.01692780666053295, -0.011166797019541264, 0.021554524078965187, -0.042686827480793, -0.02664678730070591, -0.03708011656999588, 0.020011501386761665, -0.009487607516348362, -0.0016707592876628041, 0.0037826858460903168, 0.03244708478450775, 0.009796728380024433, 0.05216580256819725, -0.02871616743505001, -0.04751666635274887, 0.024890536442399025, -0.0327141210436821, -0.03250274807214737, 0.01531258411705494, -0.011565091088414192, -0.007936527952551842, -0.01303363498300314, 0.022630829364061356, 0.033161260187625885, 0.04195276275277138, 0.008978458121418953, 0.020837143063545227, -0.035156119614839554, -0.002754580695182085, -0.058168359100818634, 0.018597882241010666, 0.006656976882368326, -0.02733067236840725, -0.02337677590548992, 0.03630465641617775, 0.035193853080272675, 0.0028040576726198196, -0.017172476276755333, 0.009740853682160378, 6.713992472406948e-33, 0.003948009107261896, 0.028576815500855446, -0.04431390017271042, 0.012311181053519249, 0.05276355892419815, -0.04718496650457382, 0.05590268224477768, 0.017823176458477974, -0.008279463276267052, -0.017369534820318222, -0.04601394757628441, -0.046485982835292816, -0.0355299636721611, 0.018060851842164993, 0.023031292483210564, -0.0035138120874762535, -0.011175011284649372, -0.026755239814519882, -0.012276916764676571, -0.01794803887605667, -0.018710417672991753, 0.012578235007822514, 0.022723935544490814, 0.027258601039648056, -0.0008029314340092242, 0.029866794124245644, 0.019904999062418938, -0.003975970670580864, 0.02189042791724205, 0.03648096323013306, -0.008971821516752243, 0.008113564923405647, -0.012384402565658092, 0.013235780410468578, -0.02106909081339836, 0.010073179379105568, 0.03291384503245354, 0.026599112898111343, 0.0042184628546237946, -0.03870289772748947, 0.028096072375774384, 0.04688950628042221, -0.025572046637535095, -0.038892678916454315, -0.0070063467137515545, 0.0035029035061597824, -0.004950018133968115, 0.017848078161478043, -0.02434508129954338, -0.03515900298953056, -0.01257086731493473, 0.02184908650815487, -0.011892175301909447, 0.031093401834368706, -0.01525728590786457, -0.010455899871885777, -0.03253930062055588, 0.04543350264430046, 0.016758233308792114, -0.01929444633424282, -0.011488743126392365, -0.001720791100524366, -0.021250588819384575, 0.040068939328193665, -0.009641092270612717, -0.02471945248544216, -0.03429662063717842, 0.027303515002131462, -0.03232211619615555, -0.023932090029120445, 0.010678132995963097, -0.02239699847996235, 0.011081178672611713, 0.060098450630903244, 0.04974471032619476, 0.007653332781046629, -0.005584020633250475, -0.01766902394592762, 0.011699448339641094, 0.036928217858076096, -0.0061739906668663025, 0.0012903972528874874, 0.014652861282229424, -0.018408332020044327, -0.0012420109705999494, 0.05174630135297775, 0.00005493536082212813, -0.005584727972745895, -0.0037279643584042788, 0.007236108183860779, -0.009359488263726234, 0.023829543963074684, -0.013758277520537376, 0.013626818545162678, 0.030907338485121727, -1.2549226546809678e-8, -0.02942466363310814, 0.017454691231250763, -0.007388703990727663, 0.025140048936009407, -0.0027174302376806736, 0.0020260277669876814, -0.004049673676490784, -0.020714880898594856, 0.031239010393619537, -0.032002098858356476, 0.001473635551519692, -0.021969947963953018, -0.0027781252283602953, 0.03872717171907425, 0.02360585518181324, -0.02142716757953167, -0.0022979809436947107, -0.03266453370451927, 0.014376877807080746, 0.02210181951522827, 0.006575313862413168, 0.029295343905687332, 0.030656032264232635, -0.036224301904439926, -0.025645693764090538, 0.009031848050653934, 0.007934167049825191, -0.05792804807424545, -0.005753202363848686, 0.005604006350040436, -0.023871315643191338, -0.011117042973637581, -0.04487787187099457, -0.05284922569990158, -0.007620601914823055, -0.033578019589185715, 0.020606927573680878, -0.021840477362275124, -0.00638467725366354, 0.0044927652925252914, -0.019878990948200226, -0.042385440319776535, 0.030429592356085777, -0.03756216540932655, -0.007431377656757832, -0.0018585292855277658, 0.009925799444317818, -0.005542509723454714, 0.02522733062505722, -0.0257328562438488, -0.01384737715125084, -0.012366040609776974, -0.03892674297094345, 0.012796314433217049, 0.052947502583265305, 0.0025569864083081484, 0.017321094870567322, -0.028468653559684753, -0.03282250463962555, -0.011543896980583668, 0.030025092884898186, 0.006082367151975632, 0.017619555816054344, -0.023622611537575722 ]
duckdb-dummy-data-user-defined-functions
https://markhneedham.com/blog/2023/06/02/duckdb-dummy-data-user-defined-functions
false
2023-06-20 02:44:37
DuckDB/SQL: Convert string in YYYYmmdd format to Date
[ "duckdb", "til" ]
[ "TIL" ]
I've been working with a data set that represents dates as strings in the format 'YYYYmmdd' and I wanted to convert those values to Dates in DuckDB. In this blog post, we'll learn how to do that. Let's create a small table with a single column that represents date of births: [source, sql] ---- create table players (dob VARCHAR); insert into players values('20080203'), ('20230708'); ---- We can write the following query to return the rows in the table: [source, sql] ---- select * from players; ---- .Output [%header,format=csv] |=== dob 20080203 20230708 |=== At the moment the date of birth is a string, but we can use the `strptime` function to convert it to a timestamp: [source, sql] ---- SELECT strptime(dob, '%Y%m%d') AS dob FROM players; ---- .Output [%header,format=csv] |=== dob "2008-02-03 00:00:00" "2023-07-08 00:00:00" |=== I don't really care about the time component though, so let's get rid of that by casting it to a `DATE`: [source, sql] ---- SELECT cast(strptime(dob, '%Y%m%d') AS DATE) AS dob FROM players; ---- .Output [%header,format=csv] |=== dob 2008-02-03 2023-07-08 |=== Job done!
In this post we'll learn how to convert a date string to a Date type in DuckDB.
uploads/2023/06/duckdb-date-banner.png
[ -0.02689855545759201, 0.028609102591872215, -0.012958762235939503, 0.05474236235022545, 0.0940149649977684, 0.00912181194871664, 0.01309735793620348, 0.05016066133975983, 0.004202456679195166, -0.011234362609684467, 0.002182066673412919, -0.003025664482265711, -0.053467411547899246, 0.013494371436536312, -0.027538171038031578, 0.07390055805444717, 0.05660233646631241, -0.03736819326877594, 0.05188619717955589, -0.01995163783431053, -0.00629831338301301, 0.016894320026040077, -0.005560861434787512, 0.04823503643274307, 0.04942170903086662, 0.01685851812362671, -0.025897283107042313, -0.0031150549184530973, -0.05616455897688866, 0.012879882007837296, 0.025953207165002823, -0.007101203314960003, -0.007857348769903183, -0.0031734814401715994, -0.009022793732583523, 0.0018321621464565396, -0.03409995883703232, 0.0138839241117239, -0.0007805885979905725, 0.02321261540055275, -0.06803300976753235, -0.0015168621903285384, 0.019329210743308067, -0.000599242455791682, -0.044625382870435715, -0.010735618881881237, -0.016909494996070862, 0.021021120250225067, -0.019454965367913246, 0.004118901677429676, -0.0539390854537487, 0.041230421513319016, -0.02782268077135086, -0.006501388736069202, 0.007417632266879082, 0.0064260829240083694, 0.03382304310798645, -0.07720449566841125, -0.017075588926672935, -0.005612354259938002, 0.06338061392307281, -0.02828316204249859, -0.011662885546684265, -0.002654526149854064, 0.02895502932369709, -0.007941660471260548, -0.022592825815081596, 0.04142449423670769, -0.03397310897707939, 0.00380157632753253, 0.0031478845048695803, -0.00826246477663517, -0.03819868341088295, -0.050737448036670685, 0.017321856692433357, -0.011187177151441574, 0.00026491424068808556, 0.05077780783176422, 0.036390990018844604, 0.05729692429304123, -0.021736659109592438, 0.015297668054699898, 0.030519256368279457, 0.02051924727857113, 0.008407756686210632, -0.030170908197760582, -0.05256588011980057, -0.010087697766721249, -0.04459401220083237, 0.03956126794219017, 0.019362978637218475, -0.04117211326956749, 0.040650855749845505, 0.00494494941085577, -0.030863605439662933, -0.012638998217880726, 0.007997912354767323, 0.0020993526559323072, 0.027048489078879356, -0.024019718170166016, -0.06115533038973808, -0.03432799130678177, 0.06863041967153549, 0.012592441402375698, -0.05789121985435486, -0.017367860302329063, -0.05427118390798569, -0.0175333172082901, 0.038608334958553314, 0.03692593425512314, -0.04385944455862045, 0.01108560897409916, -0.00454414077103138, -0.009089342318475246, -0.052221741527318954, 0.037570711225271225, 0.021161001175642014, -0.026531973853707314, -0.0031328198965638876, 0.013101359829306602, 0.04393070563673973, -0.002963198581710458, -0.005098795518279076, 0.04659886658191681, 0.004958330653607845, 0.0298419538885355, 0.028092315420508385, 0.062103793025016785, 0.002120405435562134, -0.08179666101932526, -0.03350738063454628, 0.033263515681028366, 0.007603438105434179, 0.002028553979471326, 0.00533676240593195, -0.024932565167546272, -0.024757469072937965, 0.01043989509344101, 0.0695280060172081, 0.03347939997911453, 0.015883805230259895, -0.0360102578997612, -0.008817470632493496, -0.027143841609358788, 0.010247275233268738, 0.01621854305267334, -0.008234592154622078, -0.04260856658220291, -0.037185411900281906, 0.02437608875334263, 0.01843046210706234, 0.010941646061837673, 0.05262818932533264, -0.035204388201236725, 0.0007597049116156995, 0.08424292504787445, -0.00047054688911885023, 0.01518014632165432, -0.019780635833740234, -0.012617322616279125, 0.03350912034511566, 0.013956675305962563, -0.02315693348646164, 0.009312748908996582, 0.009146629832684994, 0.0016702497377991676, 0.031190667301416397, 0.01707112416625023, -0.04692443087697029, 0.001600137329660356, -0.05608580261468887, -0.04111551493406296, 0.0896623432636261, -0.03151864558458328, -0.0024637188762426376, 0.04303295910358429, 0.05664046108722687, 0.0361551009118557, 0.027202961966395378, 0.0079329963773489, -0.07438820600509644, 0.055327240377664566, -0.018760139122605324, 0.014145788736641407, 0.03463558852672577, 0.016675591468811035, 0.061327822506427765, 0.02506762370467186, 0.01894519478082657, 0.05215154215693474, -0.09198089689016342, -0.08705132454633713, -0.05780668556690216, -0.00043245675624348223, 0.01028398983180523, -0.06368230283260345, 0.012339695356786251, 0.07643719762563705, -0.008893150836229324, 0.03928976133465767, -0.02779172547161579, 0.017368745058774948, 0.0052221487276256084, -0.02038460224866867, -0.03440963849425316, 0.017493808642029762, 0.05424712970852852, -0.012532121501863003, 0.03022746928036213, 0.0016432750271633267, -0.011776402592658997, 0.002450567902997136, 0.03591454401612282, -0.01737285405397415, 0.03752082958817482, 0.04809127748012543, 0.053387075662612915, -0.030439602211117744, -0.00569717213511467, -0.06595262885093689, 0.04320157691836357, 0.04598905146121979, -0.04324813559651375, -0.03835219517350197, 0.012548628263175488, 0.14788897335529327, 0.044202446937561035, -0.0036571486853063107, -0.04409102350473404, 0.02827899158000946, -0.0005996146355755627, -0.025654960423707962, 0.025669652968645096, -0.008738461881875992, 0.02099381573498249, 0.03387964516878128, -0.02612971141934395, 0.0006393438670784235, -0.006051609758287668, -0.008278095163404942, 0.01936090551316738, 0.06656276434659958, -0.0058494675904512405, 0.04080989211797714, -0.04768455773591995, -0.04072979465126991, -0.018928255885839462, -0.038823481649160385, -0.034318745136260986, -0.0003469334915280342, 0.03796064108610153, -0.0013804108602926135, 0.054426390677690506, -0.025680098682641983, -0.038878537714481354, 0.0035849004052579403, -0.06584914028644562, 0.06922810524702072, 0.048333097249269485, 0.029354043304920197, -0.027263373136520386, 0.03676258772611618, 0.005355258472263813, 0.022560331970453262, -0.05190296843647957, -0.03196435794234276, -0.0367245227098465, 0.016704294830560684, -0.014597560279071331, 0.009563460946083069, 0.0013707817997783422, 0.005307455081492662, 0.0054355403408408165, 0.03449641913175583, -0.025216465815901756, -0.008515790104866028, 0.02999846078455448, -0.031441736966371536, -0.0022699444089084864, -0.0475870706140995, 0.0015997576992958784, 0.061097659170627594, -0.06421127170324326, -0.051100607961416245, -0.0076071396470069885, -0.05513296648859978, 0.019930347800254822, -0.03045477159321308, -0.023107172921299934, 0.0028722556307911873, 0.02101999521255493, 0.04751962423324585, 0.016193272545933723, 0.03079984337091446, 0.09556656330823898, 0.008471395820379257, 0.03297644481062889, 0.011097530834376812, 0.034268591552972794, 0.05149030312895775, 0.0224476158618927, 0.019114134833216667, 0.08550821244716644, -0.005134361796081066, -0.01626330055296421, -0.0475178025662899, 0.007394369225949049, -0.021569566801190376, -0.25224483013153076, 0.03036525472998619, -0.0645538866519928, -0.032800257205963135, 0.04013887420296669, -0.023139551281929016, 0.031647924333810806, -0.03917158767580986, -0.014608616009354591, 0.023087797686457634, 0.012449215166270733, -0.03504201024770737, -0.052480172365903854, 0.03809664025902748, 0.026000436395406723, -0.005493860691785812, 0.005079987924546003, -0.04681798815727234, 0.0026601573918014765, 0.03586949408054352, 0.025631224736571312, -0.055018458515405655, 0.011817626655101776, 0.04024382308125496, 0.0323435477912426, 0.04479813203215599, -0.03356565162539482, 0.007699643261730671, -0.05869379639625549, -0.03456995263695717, 0.00128822005353868, 0.0029305601492524147, 0.03188806027173996, -0.01901932805776596, -0.017845818772912025, -0.016530150547623634, 0.021602489054203033, 0.011778229847550392, 0.05139428749680519, 0.01976151578128338, -0.0670774057507515, -0.05126851797103882, 0.013339433819055557, 0.007170968689024448, 0.08457311242818832, 0.01735028624534607, -0.04564577713608742, 0.014813732355833054, -0.006754612550139427, 0.04868980869650841, -0.02643885649740696, -0.044199008494615555, -0.019395913928747177, 0.009123541414737701, -0.023516548797488213, -0.012152104638516903, -0.025320328772068024, 0.014037363231182098, -0.032091040164232254, -0.010230235755443573, 0.033310722559690475, -0.01611136645078659, 0.01733359694480896, -0.03564438223838806, -0.029843799769878387, -0.0890563428401947, -0.07397433370351791, -0.018178725615143776, 0.07301686704158783, 0.08168891072273254, -0.021745188161730766, -0.006220088806003332, -0.028153203427791595, -0.10818206518888474, 0.01221400499343872, -0.03314545005559921, 0.006064205896109343, -0.0245122741907835, -0.039667945355176926, 0.011967984028160572, -0.0097628990188241, -0.021214263513684273, 0.030113350600004196, 0.038933366537094116, 0.027988767251372337, -0.03655565157532692, 0.00990794412791729, -0.0083853080868721, -0.04037095606327057, -0.03269459307193756, 0.07893184572458267, -0.03318269923329353, -0.005196920596063137, 0.008777599781751633, -0.01730051077902317, 0.044595859944820404, -0.0012019420973956585, 0.0004418548778630793, 0.010323033668100834, -0.01780678704380989, 0.037008702754974365, -0.014459194615483284, -0.01738525554537773, -0.06053229048848152, -0.035300593823194504, -0.03698498383164406, -0.03867881000041962, 0.03859558701515198, 0.011274594813585281, 0.040977593511343, -0.0018517912831157446, -0.0008311105775646865, -0.0036750223953276873, -0.06710406392812729, -0.044266071170568466, -0.028560684993863106, 0.005742330569773912, 0.006182136479765177, 0.002713725669309497, -0.02264351397752762, -0.04943997412919998, -0.010944350622594357, 0.010677240788936615, 0.003675394458696246, -0.055914927273988724, -0.007593467365950346, 0.002310971263796091, 0.013385584577918053, 0.02274276874959469, -0.011169778183102608, -0.025322528555989265, 0.01422251109033823, 0.03518405556678772, -0.014399062842130661, 0.05281582474708557, 0.01108707394450903, -0.004869941156357527, -0.024560200050473213, -0.03001314029097557, 0.02443758398294449, 0.017274416983127594, -0.01843957044184208, 0.004961247555911541, 0.032427698373794556, 0.013386314734816551, 0.003745283465832472, -0.010053240694105625, -0.0015352050540968776, 0.005089379847049713, 0.03786446154117584, -0.005933890584856272, -0.04074702039361, 0.013952517881989479, -0.05440399795770645, -0.04104515537619591, -0.004165711812674999, 0.04380674287676811, -0.007687188219279051, -0.00596746476367116, -0.03262356296181679, 0.0020024715922772884, -0.04152045026421547, -0.004983279854059219, -0.03581070899963379, -0.004258312284946442, 0.04980688542127609, 0.010832644999027252, 0.03562263026833534, 0.006339389365166426, 0.006146798375993967, -0.04459383338689804, -0.0017797123873606324, -0.02942419983446598, 0.00723218871280551, 0.026033582165837288, -0.025041058659553528, 0.02133013866841793, 0.012184581719338894, 0.033978626132011414, -0.007730287034064531, -0.0038294352125376463, -0.0007030501146800816, -0.0033941571600735188, 0.027305128052830696, 0.03783952072262764, 0.050779763609170914, 0.0004107788554392755, -0.024524088948965073, -0.02275271527469158, -0.0553571917116642, -0.019003331661224365, -0.03413461148738861, 0.004229124169796705, -0.02277035266160965, -0.03353414684534073, -0.037694357335567474, 0.03799820318818092, 0.0557633601129055, -0.012329962104558945, 0.01543453335762024, 0.0012059996370226145, -0.038610927760601044, -0.029484886676073074, 0.044400252401828766, 0.05457327887415886, -0.05934612452983856, -0.003233614843338728, -0.016026439145207405, -0.018894439563155174, -0.007311094086617231, 0.05558452010154724, -0.011849177069962025, 0.001245301216840744, -0.007301067467778921, -0.0008336407481692731, -0.001751319388858974, 0.011496605351567268, -0.03245215862989426, 0.005092474166303873, 0.022080136463046074, 0.02325645089149475, 0.0025555561296641827, -0.0008830897859297693, 0.009347365237772465, -0.003929367754608393, 0.030521584674715996, -0.05546262487769127, 0.006436309777200222, 0.04077809303998947, 0.009806133806705475, 0.028343066573143005, -0.051967017352581024, -0.003975063096731901, -0.0049180081114172935, -0.026856685057282448, -0.08369339257478714, -0.08647522330284119, 0.0027029041666537523, 0.004372722469270229, 0.06199374794960022, -0.03131226822733879, -0.025556325912475586, -0.024099256843328476, 0.008810711093246937, -0.01895391196012497, -0.012054931372404099, -0.0032563426066190004, -0.02710856683552265, 0.02329123578965664, 0.0544656440615654, 0.02466118335723877, 0.031332459300756454, -0.025561245158314705, -0.035132382065057755, 0.02223825268447399, -0.03050621785223484, -0.0202915258705616, -0.00017675332492217422, -0.048584580421447754, 0.028991442173719406, -0.0000310369287035428, 0.0385148823261261, -0.04660508781671524, 0.053942855447530746, 0.038833748549222946, 0.03611592948436737, 0.05547112971544266, 0.012090162374079227, 0.04484739527106285, 0.007870172150433064, -0.049891840666532516, -0.058238137513399124, 0.0025076065212488174, 0.021443866193294525, 0.03491230309009552, -0.03833720460534096, 0.008144337683916092, -0.00900525227189064, 0.013089802116155624, -0.03925793990492821, -0.024132749065756798, 0.052878718823194504, -0.00503369327634573, -0.0002942077990155667, 0.03769784793257713, -0.04647524282336235, -0.0017626216867938638, 0.055978499352931976, -0.014403851702809334, -0.03898560255765915, -0.012044287286698818, 0.08834107965230942, -0.03304244950413704, 0.05533742159605026, -0.05262799933552742, -0.02353021688759327, 0.072409987449646, 0.01627979800105095, 0.016178391873836517, 0.02924877405166626, -0.01880987361073494, 0.026066863909363747, 0.016646485775709152, -0.0015986596699804068, -0.006874810438603163, 0.0029507321305572987, -0.03351258859038353, -0.051590412855148315, -0.036994170397520065, 0.03892507776618004, -0.009927505627274513, -0.043411985039711, 0.0912969708442688, -0.018813995644450188, -0.0422416590154171, -0.06168914586305618, -0.009107837453484535, -0.0015782882692292333, -0.0016627935692667961, -0.016828441992402077, -0.019132224842905998, -0.04663773626089096, 0.06335662305355072, 0.016466224566102028, 0.0049083419144153595, 0.07391320914030075, 0.018813496455550194, -0.0018097137799486518, 0.008155925199389458, 0.07106344401836395, 0.08503535389900208, 0.04320403188467026, 0.023860126733779907, 0.05138023942708969, -0.028697025030851364, -0.045927006751298904, 0.004720977507531643, -0.03196299076080322, 0.010886448435485363, -0.025882311165332794, -0.004941340070217848, 0.09682982414960861, -0.020269010215997696, 0.05507763475179672, 0.03375319018959999, -0.02572813630104065, 0.00637065339833498, 0.01136012189090252, 0.03557434305548668, 0.009559644386172295, -0.010672158561646938, 0.010166329331696033, 0.01044587604701519, -0.019331511110067368, 0.043351005762815475, -0.00686219846829772, -0.022691693156957626, 0.02977064996957779, -0.010621338151395321, 0.04604295641183853, -0.021700412034988403, 0.0338149294257164, 0.059861909598112106, -0.005959528498351574, -0.009669817984104156, -0.010892513208091259, 0.02022738941013813, -0.017856845632195473, 0.03326835855841637, -0.015057857148349285, -0.02790369652211666, -0.016132663935422897, -0.05975237488746643, -0.00944040808826685, 0.001649491605348885, -0.07215818762779236, 0.046685878187417984, -0.014807106927037239, -0.0019507865654304624, 0.0194888673722744, -0.049511201679706573, -0.05082226172089577, -0.04855310171842575, -0.0536440946161747, -0.007302403915673494, -0.07423601299524307, -0.03395618498325348, 0.03971825912594795, -0.053539108484983444, -0.031275443732738495, 0.0008612117962911725, -0.02560661919414997, -0.01056629978120327, -0.015762146562337875, -0.02100556530058384, -0.06812102347612381, 0.021594395861029625, 0.013279454782605171, 0.02905142307281494, 0.013966183178126812, 0.04406753554940224, -0.02617150917649269, -0.02405642159283161, -0.019035588949918747, -0.008824419230222702, 0.04668484628200531, 0.001861975877545774, 0.01832207292318344, -0.05970164015889168, 0.028312833979725838, 0.019383355975151062, 0.008370396681129932, -0.07462646067142487, 0.04324862360954285, 0.025793833658099174, -0.017445582896471024, 0.04770727828145027, -0.03453076258301735, 0.006805784534662962, -0.0191457811743021, -0.026755690574645996, 0.022922920063138008, 0.007958745583891869, 0.03597988188266754, -0.048768769949674606, 0.08004971593618393, 0.05584210902452469, -0.01833636499941349, -0.02999153919517994, -0.02982739731669426, -0.009723114781081676, 0.008436174131929874, -0.036869995296001434, -0.05448198691010475, -0.05177094042301178, -0.07971573621034622, -0.02350444160401821, 0.029581772163510323, -0.0364849679172039, -0.007325131446123123, 0.012545695528388023, 0.021443067118525505, -0.0051404982805252075, 0.005588959436863661, -0.06768815964460373, 0.007505176588892937, -0.019516494125127792, -0.015412203036248684, -0.04752424731850624, 0.032663553953170776, -0.015383622609078884, -0.003831311594694853, -0.008994129486382008, -0.04500919580459595, -0.009426338598132133, -0.01627856120467186, 0.007128436118364334, 0.04271184280514717, 0.015351827256381512, 0.034055836498737335 ]
[ -0.08096801489591599, -0.04818318784236908, -0.035957835614681244, -0.03958318009972572, 0.03600478172302246, -0.045413464307785034, -0.008714951574802399, -0.023795129731297493, 0.018046068027615547, 0.008927417919039726, 0.002212227089330554, -0.0568145290017128, 0.010261161252856255, -0.015980662778019905, 0.01475529745221138, 0.012423920445144176, -0.033720847219228745, -0.0730859711766243, -0.028691638261079788, 0.06660381704568863, -0.02336132898926735, 0.008416648022830486, -0.06931164115667343, -0.04485848546028137, 0.021572761237621307, 0.034582529217004776, 0.03225383907556534, -0.06811053305864334, -0.016353702172636986, -0.18313774466514587, 0.025142809376120567, -0.014728641137480736, 0.010670634917914867, -0.020600108429789543, 0.03778846561908722, -0.018643347546458244, 0.0775703638792038, 0.02247609570622444, -0.0018746992573142052, 0.046101003885269165, 0.015149972401559353, -0.0025926907546818256, -0.05725184082984924, -0.056904058903455734, 0.02913096360862255, 0.0021912045776844025, -0.018904002383351326, 0.0010531452717259526, -0.004558035638183355, 0.037755705416202545, -0.05708746239542961, 0.034803103655576706, -0.019319817423820496, -0.014846212230622768, 0.009193381294608116, 0.03149992972612381, 0.03645755350589752, 0.03799820318818092, 0.016416259109973907, 0.0013385765487328172, 0.009300951845943928, 0.0013089023996144533, -0.14160405099391937, 0.13137274980545044, -0.012841923162341118, 0.0581543929874897, -0.0013871118426322937, -0.007981817238032818, -0.008484290912747383, 0.05248284712433815, -0.005557665601372719, -0.04729074984788895, -0.03086601011455059, 0.07012946903705597, 0.02688414789736271, -0.037697937339544296, -0.018491564318537712, 0.0038971297908574343, 0.021486470475792885, -0.007468010764569044, -0.07001905143260956, 0.012717336416244507, -0.0041966866701841354, -0.01744207926094532, -0.019034238532185555, 0.013614172115921974, -0.001556432107463479, 0.01046866923570633, 0.0010724305175244808, 0.028104500845074654, 0.01955770142376423, -0.004306509625166655, 0.026735683903098106, 0.028482630848884583, -0.06184829771518707, 0.0025625217240303755, 0.01728738099336624, 0.01082365307956934, 0.0008895669598132372, 0.3917374908924103, -0.05362322926521301, 0.00613026786595583, -0.04764995723962784, 0.010718686506152153, -0.02640281431376934, -0.013519919477403164, 0.01195016410201788, -0.070037841796875, -0.010922539047896862, -0.04221673682332039, -0.02579609490931034, -0.00936572439968586, 0.08335300534963608, -0.08842146396636963, 0.0070040468126535416, 0.027411501854658127, 0.01379411667585373, 0.0137155931442976, -0.005122814793139696, 0.022521600127220154, 0.032198525965213776, 0.012524423189461231, 0.017065366730093956, 0.037881746888160706, 0.016398975625634193, -0.010010727681219578, 0.05483149364590645, 0.05568762123584747, 0.021657880395650864, -0.0042083547450602055, 0.06647522002458572, -0.03320850059390068, -0.08129379153251648, 0.0035877865739166737, 0.01738826371729374, 0.004959396086633205, -0.0050120423547923565, -0.027157224714756012, -0.0004135377239435911, -0.015599858947098255, -0.01922835037112236, -0.07669009268283844, 0.045525114983320236, 0.019092420116066933, -0.07463474571704865, 0.13265886902809143, 0.005043434910476208, -0.018591905012726784, -0.05095389112830162, -0.037980712950229645, -0.05446280539035797, 0.003697304055094719, 0.05483769625425339, -0.057802941650152206, 0.013023020699620247, 0.03964824602007866, 0.08342727273702621, -0.011133021675050259, -0.09780576825141907, -0.03462063521146774, -0.02058640494942665, -0.0488007478415966, -0.05585762485861778, 0.01835162378847599, 0.06206246837973595, -0.11696644872426987, -0.013727644458413124, 0.043109528720378876, 0.052487365901470184, -0.0689508318901062, 0.0032210645731538534, 0.005351104307919741, -0.04450967162847519, -0.012540093623101711, 0.07759514451026917, -0.0054664514027535915, 0.013880572281777859, -0.00506828585639596, 0.034178875386714935, 0.013709967024624348, -0.02244732715189457, -0.01838499866425991, -0.04359663650393486, -0.009506918489933014, -0.034667715430259705, -0.09426163136959076, -0.042544737458229065, 0.004454941488802433, 0.021060897037386894, -0.01167689636349678, -0.003139705630019307, -0.06643897294998169, -0.06793951243162155, 0.059269435703754425, -0.019948305562138557, -0.06442034244537354, 0.029377609491348267, 0.05173375830054283, 0.04458530619740486, -0.04581435024738312, 0.0033457453828305006, -0.017890553921461105, 0.0004817078588530421, 0.02063099853694439, -0.008239776827394962, 0.002440529875457287, 0.06608007103204727, -0.0842968001961708, 0.061613839119672775, 0.038016512989997864, -0.015200897119939327, 0.031898096203804016, 0.00020531397603917867, 0.01729058288037777, -0.008919789455831051, 0.007059538271278143, 0.0005615613772533834, -0.01863096095621586, 0.014376153238117695, 0.022693347185850143, -0.01950640045106411, -0.025232629850506783, 0.0295870378613472, -0.33275529742240906, -0.015280812047421932, -0.014138808473944664, -0.016556771472096443, 0.03423497453331947, -0.03374519571661949, -0.028713924810290337, -0.020056793466210365, 0.018974877893924713, 0.03884606063365936, 0.04392017796635628, -0.03982335701584816, 0.002943705767393112, -0.08970469236373901, -0.04103630408644676, 0.022724902257323265, -0.019496925175189972, -0.038100577890872955, 0.004705613944679499, 0.02607293426990509, 0.013366333208978176, -0.01734672300517559, -0.04315869137644768, -0.0837802067399025, 0.03062025085091591, -0.027816912159323692, 0.12615419924259186, 0.019261203706264496, 0.048013947904109955, -0.0643918365240097, 0.07247883826494217, -0.027623936533927917, 0.002176925539970398, -0.06429719179868698, 0.020816901698708534, -0.03638802096247673, -0.023671656847000122, 0.018327869474887848, 0.004001005552709103, -0.02336578443646431, -0.056292347609996796, 0.010392055846750736, 0.0018606857629492879, -0.027765491977334023, -0.012605720199644566, 0.012307506985962391, 0.04487738758325577, -0.010169497691094875, -0.03277140483260155, 0.07197663933038712, 0.029911505058407784, -0.005204970017075539, 0.027848411351442337, 0.03955868259072304, 0.03274279832839966, -0.029756544157862663, -0.054317399859428406, 0.012072875164449215, 0.004783757962286472, -0.005900188349187374, 0.050020985305309296, 0.037037625908851624, 0.011140536516904831, -0.009296577423810959, -0.04055384173989296, 0.0006037299754098058, 0.00012327231524977833, -0.014019260182976723, 0.015064272098243237, -0.014504954218864441, -0.04244140535593033, 0.07819154113531113, -0.02812006138265133, 0.03246191143989563, 0.04403819888830185, 0.04890860617160797, -0.03326212242245674, 0.004126713611185551, 0.017445242032408714, -0.0028881398029625416, 0.01911979913711548, -0.05992551147937775, 0.07694917172193527, 0.010511077009141445, 0.04908355325460434, 0.04853368550539017, 0.028556697070598602, 0.0014416847843676805, 0.05636773630976677, -0.010191029869019985, -0.019284911453723907, -0.04598148167133331, -0.02288687974214554, -0.050913356244564056, 0.05696523189544678, -0.029967661947011948, -0.281772643327713, 0.04509664326906204, 0.03862694650888443, 0.05343955382704735, 0.02252146787941456, -0.002219907706603408, -0.018405849114060402, -0.005873550660908222, -0.025370299816131592, 0.0017336647724732757, 0.008926966227591038, 0.01192199345678091, -0.001027400721795857, -0.01362496055662632, -0.0007700149435549974, 0.020112229511141777, 0.03748635575175285, 0.000038409867556765676, 0.005657224915921688, 0.01031729020178318, 0.05201750993728638, -0.004658621270209551, 0.16368581354618073, 0.05559365078806877, 0.031183673068881035, 0.005745225120335817, -0.006877173203974962, 0.018709897994995117, 0.11520541459321976, 0.034377675503492355, 0.008689835667610168, -0.02202194184064865, 0.08770586550235748, 0.027573566883802414, 0.0410677045583725, -0.017312105745077133, -0.07396724075078964, 0.06981279700994492, 0.00883046630769968, -0.011640707962214947, -0.021497825160622597, 0.029238486662507057, -0.023138994351029396, 0.06452829390764236, 0.06832920014858246, 0.02127060294151306, -0.006631102878600359, -0.04090704396367073, -0.011695324443280697, -0.003822272177785635, -0.006613448262214661, -0.013787437230348587, -0.004005532246083021, 0.0061306580901145935, -0.0003899938892573118, 0.05712020769715309, 0.07151807844638824, -0.011191146448254585, 0.035888783633708954, 0.03138165920972824, 0.0048202574253082275, -0.030364500358700752, 0.0761643648147583, 0.03074129857122898, -0.005035398527979851 ]
[ 0.029881926253437996, 0.016572395339608192, -0.00959949754178524, 0.028840482234954834, -0.004477269481867552, 0.05191781744360924, 0.004326391499489546, 0.031919848173856735, -0.004278367385268211, -0.0574156679213047, -0.04242724925279617, -0.009404699318110943, -0.02235511504113674, -0.056459829211235046, 0.008503499440848827, -0.009274869225919247, 0.019195571541786194, -0.04747948423027992, 0.06574973464012146, -0.007350676693022251, -0.0442962571978569, 0.013508153147995472, 0.009536847472190857, 0.03985493630170822, -0.03149070590734482, 0.007261759601533413, -0.016685377806425095, 0.01998794637620449, -0.01047208346426487, -0.1155846118927002, -0.04015081003308296, 0.004173242021352053, -0.03986296057701111, 0.015698488801717758, -0.0062011005356907845, -0.011770002543926239, 0.019129062071442604, 0.05243254825472832, 0.007984685711562634, -0.012252379208803177, -0.013515744358301163, -0.05145172029733658, 0.014296812936663628, 0.036139603704214096, 0.0005498436512425542, 0.008742841891944408, 0.009446065872907639, -0.000132624976686202, -0.06211872398853302, 0.028123561292886734, -0.051212504506111145, -0.0025332358200103045, -0.02704351581633091, -0.0009097941219806671, 0.05318461358547211, 0.029958931729197502, -0.017316387966275215, 0.023724159225821495, -0.02203402854502201, -0.01605807989835739, -0.05029311403632164, -0.010199827142059803, -0.03130427002906799, -0.011022822931408882, 0.022921355441212654, -0.03751597926020622, -0.02272423729300499, -0.003221419407054782, 0.01338801346719265, -0.0032154356595128775, -0.006700728554278612, 0.023187175393104553, -0.022435065358877182, 0.03711128234863281, -0.05614648759365082, 0.010454710572957993, 0.022728515788912773, -0.013293280266225338, 0.03010103851556778, -0.007136431522667408, -0.029217390343546867, 0.004742651712149382, -0.02108941040933132, 0.026176996529102325, 0.00008955229714047164, -0.05125991255044937, 0.007133211474865675, 0.045412566512823105, 0.0007077681366354227, -0.047616004943847656, -0.03393198922276497, -0.0009052688837982714, 0.012328339740633965, 0.007322303950786591, -0.07059571892023087, 0.01569696143269539, -0.023104481399059296, -0.00044316358980722725, 0.0318964384496212, 0.8024703860282898, -0.018616192042827606, 0.02353651635348797, -0.03628508001565933, 0.054515540599823, -0.010736295953392982, 0.009493944235146046, 0.031241387128829956, -0.043378446251153946, -0.0018763591069728136, -0.04599740356206894, 0.012479200959205627, 0.03267442807555199, 0.006453672889620066, -0.013186025433242321, 0.02076847478747368, 0.04785271733999252, -0.015342161990702152, -0.007186091970652342, -0.003152393037453294, -0.011940617114305496, -0.00007942859519971535, 0.00656141759827733, 0.002339177066460252, 0.005283393897116184, -0.005660128779709339, -0.13540931046009064, 0.06246480345726013, -6.416560075554262e-33, 0.03103579953312874, -0.044474292546510696, 0.04034838825464249, -0.032708656042814255, 0.049338746815919876, 0.04242338240146637, 0.013921082951128483, -0.004477369599044323, 0.057455457746982574, 0.00015638933109585196, 0.0035362867638468742, -0.05558305233716965, -0.00032177995308302343, -0.06768640875816345, 0.05301928147673607, 0.014833523891866207, -0.01594291813671589, 0.03867877647280693, 0.03933855891227722, 0.009088585153222084, 0.053750716149806976, 0.02693250961601734, 0.03189977630972862, 0.02486705407500267, 0.021231980994343758, -0.002156945876777172, -0.014018303714692593, -0.011944442987442017, 0.003421445144340396, -0.037347402423620224, -0.012967443093657494, 0.02309744618833065, -0.04504712298512459, -0.025613149628043175, 0.0630393996834755, -0.0374104343354702, -0.049729589372873306, 0.013791846111416817, -0.010075176134705544, 0.03373098745942116, -0.04653628543019295, -0.03693927451968193, -0.0436265803873539, -0.025258488953113556, -0.004077674821019173, -0.0020972294732928276, 0.016192102804780006, -0.002910938346758485, -0.015322471037507057, 0.02043258026242256, -0.00046102996566332877, -0.009937518276274204, 0.013175505213439465, -0.029431737959384918, -0.006017803214490414, 0.02586236409842968, 0.014510421082377434, -0.004017491824924946, -0.0017875534249469638, 0.012348847463726997, 0.017985638231039047, -0.0012523486511781812, 0.017757346853613853, -0.030946308746933937, -0.005459893960505724, 0.022440679371356964, 0.06934822350740433, 0.025081992149353027, 0.06109427288174629, 0.015718314796686172, -0.00386315630748868, -0.00613054446876049, -0.003678495530039072, -0.04264862462878227, 0.0034585988614708185, 0.004836316220462322, 0.05461015924811363, 0.009693503379821777, 0.07403687387704849, 0.007649864535778761, 0.05075898393988609, -0.01161460392177105, -0.03238312527537346, -0.023997405543923378, -0.011960425414144993, -0.053893253207206726, 0.008835920132696629, 0.01902872510254383, -0.010490926913917065, -0.004530396778136492, 0.015436622314155102, -0.0030587424989789724, 0.028573613613843918, -0.01459786482155323, -0.004636065568774939, 6.424083239399525e-33, 0.025282196700572968, 0.0012058716965839267, -0.014946539886295795, 0.0066916197538375854, 0.059548135846853256, -0.05470686033368111, 0.010700270533561707, 0.06621895730495453, -0.022964097559452057, 0.028249846771359444, -0.009341594763100147, -0.020642299205064774, -0.030636223033070564, 0.03667096048593521, 0.03426507115364075, 0.03445172682404518, 0.01474692765623331, -0.0044054388999938965, -0.02920549362897873, -0.011809451505541801, 0.005690582096576691, 0.01728617027401924, 0.001651531900279224, 0.01412361953407526, 0.06106412038207054, 0.03668925538659096, 0.03833027929067612, -0.001261161407455802, 0.017237316817045212, 0.03308144956827164, -0.012445703148841858, -0.02640114352107048, 0.008175460621714592, -0.04023086279630661, -0.06981687992811203, 0.029862049967050552, 0.003956388682126999, -0.02855815179646015, 0.029388271272182465, -0.02327759377658367, 0.0025680908001959324, 0.026172716170549393, -0.027066219598054886, 0.016942784190177917, -0.01805253140628338, 0.06577377021312714, -0.0006944278138689697, 0.023431427776813507, -0.004356040619313717, 0.020030010491609573, 0.008937114849686623, -0.02844599448144436, -0.02894524298608303, -0.02159048430621624, 0.017731739208102226, -0.026926463469862938, -0.01116333156824112, -0.014791546389460564, -0.04515478014945984, -0.025074852630496025, -0.060688186436891556, 0.006528452038764954, -0.03414088487625122, 0.007177645806223154, -0.014202838763594627, -0.02144022099673748, -0.004308849107474089, -0.030991410836577415, -0.024428196251392365, -0.057888515293598175, -0.0044024004600942135, -0.04788576066493988, -0.024008922278881073, 0.06033392623066902, -0.008805237710475922, -0.014351763762533665, -0.03358720988035202, 0.046012863516807556, -0.01809089072048664, 0.04575934633612633, 0.011149060912430286, 0.0024724716786295176, 0.01900809444487095, 0.014124657027423382, -0.0239417664706707, 0.03928632289171219, -0.06453007459640503, -0.015026305802166462, 0.03592373803257942, -0.008030849508941174, -0.0073891328647732735, -0.012868030928075314, -0.03046657145023346, 0.053582947701215744, 0.01001859549432993, -1.2306583307974961e-8, -0.011643940582871437, 0.026647059246897697, -0.014807542786002159, 0.0005849048029631376, 0.02398533560335636, -0.03956221044063568, -0.030772436410188675, -0.025055600330233574, 0.04134459048509598, 0.009486719965934753, 0.04219864681363106, -0.015501439571380615, 0.04149138554930687, -0.0009350847685709596, 0.0006328144809231162, -0.014699868857860565, -0.03006124682724476, -0.04480566084384918, 0.003338688053190708, -0.011527377180755138, 0.015132754109799862, 0.022862574085593224, 0.015338127501308918, -0.026551811024546623, -0.0028610308654606342, 0.035065438598394394, -0.027158495038747787, -0.048421017825603485, 0.022516632452607155, -0.0035303435288369656, 0.034973517060279846, -0.010831349529325962, 0.0008244200726039708, -0.0411616750061512, -0.018339764326810837, -0.07092466950416565, 0.031632132828235626, -0.006468722131103277, -0.022754443809390068, 0.02824290469288826, -0.018335113301873207, -0.01482196431607008, 0.002975230338051915, -0.01757979765534401, -0.033605191856622696, -0.009923395700752735, -0.03328631445765495, 0.013881008140742779, -0.02772754803299904, -0.02643352933228016, 0.01932450942695141, 0.006967825815081596, 0.015340950340032578, 0.03816278651356697, 0.03919629752635956, 0.05500408634543419, 0.012667522765696049, -0.0046248785220086575, -0.01905038021504879, -0.024317899718880653, -0.01915479637682438, -0.004080385435372591, 0.021209323778748512, -0.03964865952730179 ]
duckdb-sql-string-date
https://markhneedham.com/blog/2023/06/20/duckdb-sql-string-date
false
2023-06-27 04:44:37
Python: Get the first item from a collection, ignore the rest
[ "python", "til" ]
[ "TIL" ]
:icons: font When writing Python scripts, I often find myself wanting to take the first item from a collection and ignore the rest of the values. I usually use something like `values[0]` to take the first value from the list, but I was curious whether I could do better by using https://blog.teclado.com/destructuring-in-python/[destructuring^]. That's what we're going to explore in this blog post. We'll start with a list that contains some names: [source, python] ---- values = ["Michael", "Ryan", "Karin", "Mark", "Jennifer", "Will"] ---- We can destructure this list to get the first item and assign the rest to another variable like this: [source, python] ---- first, *rest = values print(first) print(rest) ---- .Output [source, text] ---- Michael ['Ryan', 'Karin', 'Mark', 'Jennifer', 'Will'] ---- If we don't care about the other values, we could use `_` instead of `rest`: [source, python] ---- first, *_ = values ---- The other values will still be assigned to a variable named `_`, but this seems to be a convention for throwing away data in Python. What about if we try to get the first item when the list is empty? [source, python] ---- values = [] first, *_ = values ---- .Output [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: not enough values to unpack (expected at least 1, got 0) ---- One way around this would be to check that the collection contains some values first: [source, python] ---- values = [] if len(values) > 0: first, *_ = values else: print("values is empty") ---- .Output [source, text] ---- values is empty ---- Hmmm, a bit verbose. We could convert that into a one-liner if we aren't worried about printing the message when it's empty: [source, python] ---- values = [] first, *_ = values if len(values) > 0 else [None] print(first) print(rest) ---- .Output [source, text] ---- None [] ---- Not bad, but probably not better than my usual technique, which would read like this: [source, python] ---- values = [] first = values[0] if len(values) > 0 else None print(first) ----
In this post, we're going to explore some ways that we can get the first item from a collection while throwing away the other values.
uploads/2023/06/python-first-item-banner.png
[ -0.0003750658652279526, 0.005601083859801292, -0.0224241241812706, 0.006578559521585703, 0.0549263060092926, 0.013723817653954029, -0.021161740645766258, 0.02318934164941311, -0.009305144660174847, -0.029106469824910164, -0.043044913560152054, 0.04677942395210266, -0.11454523354768753, 0.044956132769584656, 0.005152825731784105, 0.06362224370241165, 0.08674626797437668, -0.04465320333838463, -0.014251544140279293, -0.0075981467962265015, 0.008037040010094643, 0.025229044258594513, -0.0033641981426626444, 0.00523403799161315, 0.03064657561480999, 0.025067025795578957, 0.011019643396139145, -0.027423599734902382, -0.02434183843433857, -0.007432387210428715, 0.0032940125092864037, -0.008027000352740288, -0.027233321219682693, -0.008913032710552216, 0.004588853567838669, -0.010517130605876446, 0.019302399829030037, 0.0031246051657944918, -0.011388544924557209, 0.03482148051261902, -0.038611527532339096, -0.0021072530653327703, -0.044408977031707764, 0.01837139204144478, -0.04257475957274437, 0.015212742611765862, -0.02954072877764702, -0.010415555909276009, -0.04490431025624275, -0.003739511128515005, -0.07023784518241882, 0.045286331325769424, 0.0007931454456411302, -0.011918146163225174, -0.02492481842637062, 0.04054103046655655, 0.005664816126227379, -0.09823004901409149, -0.021170975640416145, -0.025460135191679, 0.02899547480046749, 0.02952563390135765, 0.0024810987524688244, 0.05363665148615837, 0.04703152924776077, -0.031787656247615814, 0.016894148662686348, 0.05997408926486969, -0.04633427411317825, -0.04734212905168533, -0.03141788765788078, 0.018972670659422874, -0.03620080277323723, -0.03028254397213459, -0.020673371851444244, -0.014847847633063793, -0.007821260951459408, 0.02086174301803112, 0.03748379275202751, 0.09059078991413116, 0.0014861546223983169, 0.021690495312213898, 0.05745317041873932, 0.007556375116109848, 0.042457036674022675, -0.038245003670454025, -0.05344625934958458, -0.009463287889957428, -0.018071813508868217, 0.00987197458744049, 0.0029041648376733065, -0.025638500228524208, 0.004145390819758177, -0.02253016084432602, 0.03480718284845352, -0.027370216324925423, -0.0043168868869543076, 0.009527764283120632, -0.019778037443757057, 0.03561150282621384, -0.02808990143239498, -0.03440675139427185, 0.01760900765657425, -0.02967328205704689, -0.04615168273448944, -0.05138547345995903, -0.041337478905916214, 0.013054436072707176, -0.009466197341680527, -0.018554817885160446, -0.038702238351106644, -0.04457852989435196, -0.053482335060834885, 0.015905261039733887, -0.05567433685064316, 0.013137214817106724, -0.005306607577949762, -0.007607425097376108, -0.03857754170894623, 0.06127934157848358, 0.03364034742116928, 0.017011461779475212, 0.029319392517209053, 0.07716837525367737, 0.014259294606745243, -0.002770025050267577, 0.027770474553108215, 0.07073450833559036, 0.010511372238397598, -0.05050492659211159, -0.03214695304632187, 0.06436780095100403, -0.03410205617547035, -0.019439343363046646, -0.025725193321704865, -0.044260840862989426, -0.0016741147264838219, 0.022624900564551353, 0.06354999542236328, 0.016038890928030014, -0.0147286057472229, -0.013851557858288288, -0.010196004994213581, 0.01372132170945406, 0.02227574773132801, 0.015438600443303585, -0.0002194727276219055, -0.0027487031184136868, -0.0013519135536625981, 0.06294360011816025, 0.024425368756055832, 0.004762993659824133, 0.060524776577949524, 0.00925268791615963, -0.03763916343450546, 0.038167309015989304, 0.03993793949484825, 0.07594931125640869, -0.042465705424547195, 0.013682442717254162, -0.000365472020348534, 0.021182097494602203, 0.028796333819627762, 0.09277385473251343, 0.01358607318252325, -0.001027380465529859, -0.015238326974213123, 0.014485170133411884, 0.000758092210162431, -0.03519756346940994, -0.015912512317299843, -0.061549995094537735, 0.069515660405159, -0.04867292940616608, -0.011351821944117546, 0.018610671162605286, 0.03565596789121628, -0.020526602864265442, 0.0359862819314003, -0.008022637106478214, -0.056125346571207047, 0.024699866771697998, -0.04743689298629761, 0.005991864949464798, 0.04791996255517006, 0.008924707770347595, 0.07998745143413544, -0.0018807929009199142, 0.022865241393446922, 0.02552092634141445, -0.06423879414796829, -0.02683122083544731, -0.014992565847933292, -0.006883789785206318, 0.03311344236135483, -0.046133607625961304, -0.020901041105389595, 0.0713096559047699, 0.015430545434355736, 0.041579343378543854, 0.04505331814289093, -0.005228493362665176, -0.027423709630966187, -0.024011701345443726, -0.045624420046806335, -0.00018029894272331148, 0.03747447580099106, 0.023718975484371185, 0.021279964596033096, 0.04688500240445137, -0.028195781633257866, 0.04554477706551552, 0.010753877460956573, -0.013926369138062, 0.054510027170181274, 0.0257277674973011, 0.003789869835600257, -0.04549870640039444, 0.03140886500477791, -0.08774163573980331, 0.01081220805644989, 0.004741591867059469, 0.0051596867851912975, -0.048688240349292755, -0.030720926821231842, 0.14871519804000854, 0.061098240315914154, -0.031637731939554214, -0.04380076006054878, -0.007946368306875229, -0.01643311232328415, -0.004141402896493673, -0.008137072436511517, -0.013472859747707844, -0.04543110355734825, 0.009376673959195614, -0.03887931630015373, -0.006280656438320875, 0.02005649544298649, -0.0024464717134833336, -0.0030073015950620174, 0.0383000448346138, -0.025852536782622337, 0.02916574850678444, 0.06792163848876953, -0.012164290994405746, 0.008752203546464443, -0.07516457885503769, -0.054223544895648956, -0.010291785933077335, -0.024441100656986237, -0.0015418732073158026, 0.06707064062356949, -0.006216523703187704, -0.03756822645664215, 0.00971188023686409, -0.05020397901535034, 0.008825413882732391, 0.03366982564330101, 0.047145720571279526, -0.06629543006420135, 0.04152947664260864, 0.010324499569833279, 0.0027997952420264482, -0.038593705743551254, -0.03783361241221428, -0.02727852761745453, 0.026269854977726936, 0.020868908613920212, 0.03945968672633171, 0.003038335358723998, -0.005208953749388456, -0.02039245143532753, 0.03418230265378952, -0.010882540605962276, 0.0016601805109530687, 0.014480043202638626, -0.0039830924943089485, -0.0030761014204472303, -0.043118979781866074, 0.0009266149718314409, 0.05098119005560875, -0.05972006916999817, -0.04395416006445885, -0.032790329307317734, -0.024054287001490593, 0.04084661602973938, -0.02614024095237255, -0.05210386589169502, -0.04821155592799187, 0.032540734857320786, -0.006999421399086714, -0.05615288391709328, 0.0030579939484596252, 0.0308056827634573, 0.021630417555570602, -0.009502056986093521, 0.06040237471461296, 0.013025104068219662, 0.0014407391427084804, -0.020380081608891487, 0.03028900921344757, 0.015814583748579025, 0.028355106711387634, 0.006497346796095371, -0.03135986626148224, 0.004094199277460575, 0.005204400513321161, -0.23744229972362518, 0.037028487771749496, -0.0007470512646250427, -0.00786642637103796, 0.027311626821756363, 0.000735291454475373, 0.01825041137635708, -0.033315762877464294, -0.012251063250005245, 0.05810794606804848, -0.014784551225602627, -0.06335677951574326, -0.005750697571784258, 0.06155320256948471, 0.03082016110420227, 0.032356057316064835, 0.01525954995304346, -0.005358795635402203, 0.03006664477288723, 0.049804117530584335, -0.03123357705771923, -0.0654948353767395, -0.0027203229255974293, 0.052101802080869675, -0.008413001894950867, 0.05028986185789108, -0.05128362029790878, 0.04508574306964874, -0.06120104715228081, -0.02129165269434452, 0.0015785180730745196, -0.017274197190999985, 0.03067965619266033, -0.05067379027605057, 0.01225347351282835, -0.03612247481942177, 0.04938534274697304, 0.01079564355313778, -0.025312138721346855, 0.039906613528728485, -0.034631673246622086, -0.046038608998060226, -0.009829822927713394, -0.003988088108599186, 0.07236497104167938, -0.015216635540127754, -0.055445704609155655, -0.05047573894262314, -0.029788769781589508, 0.035514894872903824, -0.006133435759693384, -0.020584499463438988, -0.0027054864913225174, 0.04211285337805748, -0.027007268741726875, 0.015503421425819397, -0.030649486929178238, 0.005696678534150124, -0.02769007533788681, 0.0007057362818159163, -0.04181956127285957, -0.045674070715904236, -0.0006090949173085392, -0.01708275079727173, -0.021165158599615097, -0.05832649767398834, -0.044143207371234894, 0.01158746425062418, 0.05271689593791962, 0.0402580127120018, -0.03995899856090546, -0.017642078921198845, -0.02472616732120514, -0.09658777713775635, 0.03524588420987129, -0.013761810027062893, -0.0462690033018589, -0.005905763246119022, -0.029024982824921608, 0.02792883664369583, -0.0640697255730629, -0.03392641991376877, 0.014258623123168945, 0.00022305156744550914, -0.035121381282806396, -0.029125966131687164, 0.021159926429390907, -0.02165830321609974, 0.0016558668576180935, -0.022916676476597786, 0.02764786221086979, -0.0023600244894623756, 0.023969240486621857, 0.024783022701740265, 0.005575798451900482, 0.06757095456123352, 0.021883763372898102, -0.019294464960694313, 0.02567969262599945, 0.025194840505719185, 0.051620740443468094, -0.05163551867008209, 0.006650768686085939, -0.03298443183302879, 0.0010806418722495437, 0.005630481988191605, -0.013738163746893406, 0.01616210862994194, 0.006213081534951925, -0.02266603894531727, -0.0277339406311512, -0.0094315679743886, -0.005271663889288902, -0.01500275544822216, -0.012433418072760105, -0.03682709485292435, 0.021715335547924042, 0.02022598497569561, 0.01254790835082531, -0.04853421822190285, -0.04547516256570816, 0.03305196389555931, 0.006005058530718088, -0.021541470661759377, -0.040086787194013596, -0.0627838745713234, 0.03127384930849075, -0.004846377298235893, 0.010951919481158257, 0.022700035944581032, 0.0008882583933882415, 0.04146439954638481, 0.017622657120227814, -0.013720360584557056, 0.041940029710531235, -0.03024163283407688, -0.004400438629090786, -0.015888366848230362, -0.04543861374258995, -0.018274040892720222, 0.012703187763690948, -0.06791552156209946, -0.023968255147337914, 0.03594078868627548, 0.01176654826849699, -0.012218366377055645, 0.024274300783872604, -0.02150707133114338, -0.03224598616361618, 0.022721484303474426, 0.022155260667204857, -0.013220315799117088, 0.03448178619146347, -0.026372121647000313, -0.0046307966113090515, 0.019766317680478096, 0.02217605896294117, -0.039984215050935745, -0.03842170536518097, -0.049450524151325226, 0.031871065497398376, -0.016697803512215614, -0.013917394913733006, -0.020087964832782745, -0.020714569836854935, 0.01227377075701952, -0.016445279121398926, -0.009856312535703182, 0.004289387259632349, 0.0172431543469429, 0.009926500730216503, -0.004799623973667622, -0.014319482259452343, 0.005749811418354511, -0.02087223343551159, -0.04304195195436478, 0.04596780613064766, 0.049407728016376495, -0.009153704158961773, 0.019877558574080467, -0.009897260926663876, 0.02640145644545555, 0.010717159137129784, 0.012489915825426579, 0.01875687576830387, 0.014900117181241512, 0.0003452960809227079, -0.017043337225914, -0.04575716704130173, -0.0241516325622797, -0.04856274276971817, -0.0473741814494133, -0.008009839802980423, 0.05232618376612663, -0.020548800006508827, -0.020395195111632347, -0.00031964483787305653, 0.014021924696862698, 0.045928943902254105, 0.0168802198022604, -0.004134411457926035, -0.02010353095829487, 0.0015422366559505463, -0.014408919028937817, 0.03539840131998062, -0.047447800636291504, 0.0013462426140904427, -0.004980095196515322, 0.012139255180954933, 0.053231824189424515, 0.031725626438856125, -0.06691492348909378, -0.004719969816505909, -0.011943766847252846, -0.01480336207896471, 0.0036746710538864136, -0.03000478819012642, -0.014673680067062378, 0.011940203607082367, -0.04318292811512947, -0.009734868071973324, -0.02480626106262207, 0.02635049633681774, -0.04169636219739914, -0.020657582208514214, 0.008524348959326744, -0.005018575116991997, 0.006306802853941917, 0.06008060276508331, 0.008554003201425076, 0.027142759412527084, -0.01694849133491516, 0.056682195514440536, -0.0014658207073807716, 0.0017296033911406994, 0.006093715317547321, -0.038666632026433945, -0.011849931441247463, -0.019884027540683746, 0.028327150270342827, 0.013633159920573235, -0.011104912497103214, -0.041126661002635956, 0.0011537567479535937, 0.00861520878970623, -0.016259590163826942, 0.0018333473708480597, -0.061508454382419586, 0.00875678937882185, 0.07061928510665894, 0.03994004428386688, 0.0071230982430279255, 0.022330762818455696, -0.041946206241846085, 0.062005721032619476, -0.026011236011981964, -0.03289347514510155, -0.04349937289953232, -0.04452706500887871, 0.010690586641430855, 0.033105116337537766, 0.07782706618309021, -0.02889738604426384, 0.0520162507891655, 0.05616970732808113, 0.05175509676337242, 0.04621609300374985, -0.03305584192276001, 0.02098505012691021, -0.01384690310806036, 0.00397246889770031, -0.08043785393238068, 0.00782557763159275, 0.03465507924556732, 0.00782295223325491, -0.04783618077635765, -0.02432488091289997, -0.02993425354361534, 0.00575481029227376, -0.0478399395942688, -0.0072223651222884655, 0.03445414826273918, 0.02095768041908741, 0.018409503623843193, 0.04573725536465645, -0.048502955585718155, -0.01806349866092205, 0.026039864867925644, -0.040060270577669144, 0.024784086272120476, -0.03500441834330559, 0.05816836282610893, -0.01437254250049591, 0.019120585173368454, 0.023540565744042397, -0.012119440361857414, 0.052579812705516815, 0.057924751192331314, 0.00997869297862053, 0.032421234995126724, -0.06837198883295059, 0.0217432864010334, 0.053743209689855576, -0.02997743710875511, 0.001298485673032701, -0.005885649006813765, 0.02048252895474434, -0.038673918694257736, -0.02024693787097931, 0.01909387856721878, -0.04171952232718468, -0.041739389300346375, 0.08272943645715714, -0.003659338690340519, -0.03585800528526306, -0.06423565745353699, -0.005139797925949097, -0.060753826051950455, -0.014353577047586441, -0.012480602599680424, -0.001526832696981728, -0.05870569124817848, 0.0545627735555172, -0.01323971338570118, 0.038675978779792786, 0.08843465894460678, -0.03887275606393814, 0.004563102498650551, 0.028458649292588234, 0.0492551214993, 0.11183183640241623, 0.036606065928936005, -0.0035156169906258583, 0.03609493374824524, -0.042768120765686035, -0.05374190956354141, -0.009591532871127129, -0.06440149992704391, 0.053107619285583496, -0.02198759838938713, 0.01927013508975506, 0.06403527408838272, -0.00027537374990060925, 0.06517187505960464, -0.026186181232333183, 0.0007577546639367938, 0.00015663410886190832, 0.04378984123468399, 0.028152523562312126, 0.05414484813809395, 0.017305104061961174, 0.011292114853858948, 0.023632943630218506, -0.016914373263716698, 0.051054734736680984, -0.02355049178004265, -0.008857524953782558, 0.04959775507450104, -0.03118607960641384, -0.0107554467394948, 0.05971982330083847, 0.04945085570216179, 0.06968161463737488, -0.013363446108996868, -0.06602548062801361, -0.002126984763890505, 0.013275342993438244, -0.01569492369890213, -0.042977701872587204, 0.043452221900224686, -0.01851096749305725, 0.04889621585607529, -0.037610262632369995, 0.02310548909008503, -0.02594427950680256, -0.03131547197699547, 0.05100959911942482, 0.013509998098015785, -0.008847406134009361, 0.04506773129105568, 0.020946744829416275, -0.014405705034732819, -0.05348963662981987, -0.04243544861674309, -0.051911503076553345, -0.053043387830257416, -0.015140201896429062, 0.04913974925875664, 0.012419191189110279, -0.013230463489890099, -0.05342128500342369, -0.017234433442354202, -0.01522051077336073, 0.042015329003334045, -0.022643592208623886, -0.0339452363550663, 0.045597828924655914, 0.052286453545093536, 0.041792131960392, 0.024386435747146606, 0.005670521408319473, -0.015241231769323349, -0.059318847954273224, 0.017030540853738785, -0.0022068682592362165, 0.09362423419952393, 0.018253391608595848, -0.017288783565163612, -0.06844005733728409, -0.0014752378920093179, 0.05672530457377434, 0.02916838601231575, -0.05283655226230621, 0.03702600672841072, 0.006850055884569883, -0.03184809535741806, 0.024891473352909088, -0.0069858720526099205, -0.022184887900948524, -0.04669087752699852, -0.02950822003185749, 0.031876545399427414, 0.01986664906144142, 0.05174364149570465, -0.030994562432169914, 0.03177391737699509, 0.010682731866836548, -0.000651335169095546, -0.03250611200928688, 0.0032858233898878098, -0.04683640971779823, 0.004566488787531853, -0.026666317135095596, -0.029287738725543022, -0.05346134677529335, 0.00569438561797142, -0.020383363589644432, 0.013483714312314987, -0.015138423070311546, -0.04051370918750763, 0.03615400567650795, 0.04351543262600899, -0.05720064416527748, 0.04419727250933647, -0.022019216790795326, 0.01592360995709896, -0.021572887897491455, -0.03002380020916462, -0.021027015522122383, 0.05862998589873314, 0.016062650829553604, 0.023970235139131546, 0.025798091664910316, -0.0425860770046711, -0.029242919757962227, -0.037052467465400696, -0.010257496498525143, 0.05342859402298927, -0.05241263657808304, 0.030377451330423355 ]
[ -0.08204271644353867, 0.023279884830117226, -0.033032312989234924, -0.029564490541815758, 0.05739332735538483, -0.06377647072076797, -0.0026685481425374746, 0.013781768269836903, 0.03023383393883705, 0.016324695199728012, 0.04109026864171028, -0.05055110529065132, 0.022502092644572258, -0.006744230166077614, -0.011773502454161644, -0.04767701029777527, -0.04677454009652138, -0.01703421026468277, -0.04880761727690697, -0.0033744170796126127, 0.04631314426660538, -0.019806483760476112, -0.0006037590792402625, -0.02364431321620941, 0.07043490558862686, 0.051601845771074295, 0.03423970565199852, -0.016152765601873398, -0.003454104997217655, -0.195978581905365, -0.03346247971057892, -0.03321002051234245, 0.008235043846070766, -0.02463741973042488, 0.018608009442687035, 0.0805419459939003, 0.019255448132753372, 0.014653545804321766, -0.0009998304303735495, 0.07951054722070694, 0.07636323571205139, 0.024673929437994957, -0.03272134065628052, -0.02198813110589981, -0.012708895839750767, -0.014972479082643986, -0.009612499736249447, -0.03075847029685974, 0.03901652991771698, -0.0020023472607135773, -0.024974606931209564, 0.046758878976106644, -0.04750695452094078, -0.0025996488984674215, -0.02999953180551529, -0.0011297926539555192, 0.04883921891450882, 0.030921464785933495, 0.007566929329186678, 0.025655129924416542, 0.0007864327053539455, -0.03271277993917465, -0.07665172219276428, 0.09233623743057251, 0.021977990865707397, 0.08940814435482025, -0.005461325403302908, -0.00593364704400301, -0.033596523106098175, 0.06102436035871506, 0.019699689000844955, -0.04949825257062912, -0.0022059299517422915, 0.03983190655708313, 0.00884188711643219, -0.0691775530576706, 0.03770771995186806, 0.0229230634868145, 0.07038071751594543, -0.018702859058976173, -0.0785207748413086, -0.016817986965179443, 0.023191550746560097, 0.009702824987471104, -0.0036478997208178043, 0.007485423237085342, -0.009933080524206161, 0.030585991218686104, 0.03923286870121956, 0.00022804261243436486, 0.04255703464150429, -0.05562157556414604, 0.04271336644887924, 0.07781527191400528, -0.054868150502443314, -0.014173208735883236, -0.001586579135619104, 0.02021888643503189, -0.009778903797268867, 0.39856231212615967, -0.034980859607458115, 0.03210614249110222, -0.011558068916201591, 0.026285242289304733, 0.014523661695420742, -0.018416887149214745, -0.002013520337641239, -0.06028303876519203, -0.029004955664277077, -0.033809371292591095, -0.008633306249976158, -0.06063522398471832, 0.03946234658360481, -0.05800359323620796, 0.0440555065870285, 0.0029102901462465525, 0.0003346508601680398, 0.005199885927140713, 0.011686505749821663, -0.04349007457494736, -0.015578323043882847, -0.036010365933179855, 0.058784712105989456, 0.007356726564466953, -0.014276009984314442, 0.03212088346481323, 0.04377332329750061, 0.0934554859995842, 0.042818427085876465, 0.05200425907969475, 0.027118366211652756, -0.07791806012392044, -0.07035144418478012, 0.00690070167183876, -0.008306547999382019, 0.05849289149045944, 0.03762437775731087, 0.010443687438964844, 0.04460310563445091, 0.005348781123757362, 0.023567592725157738, -0.05272959545254707, -0.035761620849370956, -0.002888113958761096, -0.02810419164597988, 0.09817837178707123, -0.014920848421752453, -0.02159419283270836, -0.05279012396931648, -0.05646345019340515, -0.04574480652809143, -0.009889136999845505, -0.05479251593351364, -0.04808817431330681, -0.020892873406410217, 0.04077460989356041, 0.07345976680517197, -0.02590521052479744, -0.013720383867621422, -0.06520768254995346, -0.04086175188422203, -0.05501051992177963, -0.06124133616685867, 0.004443808924406767, -0.008032349869608879, -0.04398692026734352, -0.02034999243915081, -0.007729721255600452, -0.054034121334552765, -0.06659974157810211, 0.023645224049687386, -0.03676530718803406, -0.06644991040229797, -0.04074962064623833, 0.05182327702641487, 0.010860675945878029, -0.013460530899465084, 0.0019755992107093334, 0.045367129147052765, 0.03379150480031967, -0.03138979896903038, 0.026802347972989082, -0.053153179585933685, 0.0011860590893775225, 0.011068440973758698, -0.07927960902452469, -0.04343579337000847, 0.020768815651535988, -0.014719495549798012, 0.024660279974341393, -0.012306508608162403, -0.04667671397328377, -0.00431097112596035, -0.011938635259866714, -0.04310308396816254, 0.008210320957005024, 0.008464635349810123, -0.0020881572272628546, -0.05774889513850212, -0.0007232603384181857, 0.03296273201704025, 0.04608392342925072, 0.013105236925184727, 0.04108240455389023, -0.01795404776930809, 0.0025024369824677706, 0.04030390828847885, -0.044894710183143616, 0.06873488426208496, -0.0018039080314338207, -0.05475277081131935, -0.00008147040352923796, -0.01523186918348074, -0.01396871916949749, -0.024744369089603424, -0.06787712872028351, 0.03188760578632355, 0.022521277889609337, 0.058007001876831055, 0.01322068553417921, -0.05418827757239342, -0.11136799305677414, 0.021086234599351883, -0.3588572144508362, 0.018836256116628647, -0.014113436453044415, -0.0033162927720695734, 0.016660813242197037, -0.06271596252918243, -0.004599113017320633, -0.012169543653726578, -0.07304894924163818, 0.017087871208786964, 0.05784044414758682, -0.03219669312238693, 0.028191087767481804, -0.0417749397456646, -0.027610724791884422, 0.013404796831309795, -0.0048963394947350025, -0.035864684730768204, -0.024237224832177162, 0.018750887364149094, 0.009702591225504875, -0.056848231703042984, 0.012420065701007843, -0.07031813263893127, 0.01572624407708645, -0.0036571789532899857, 0.12185650318861008, 0.01683616079390049, 0.05453547090291977, -0.02557397074997425, 0.017146656289696693, 0.022578896954655647, -0.032179806381464005, -0.008630997501313686, -0.04795591160655022, -0.024139484390616417, -0.022651150822639465, 0.014036226086318493, 0.003041681367903948, 0.021631408482789993, 0.033016372472047806, 0.026202071458101273, 0.0031480027828365564, -0.02762085571885109, -0.0019003144698217511, 0.01046714000403881, -0.03751220926642418, -0.03480599448084831, 0.036459047347307205, 0.09955359250307083, 0.019057083874940872, 0.06536445766687393, 0.01421276479959488, 0.022932594642043114, 0.024563945829868317, -0.02788027934730053, -0.0683930441737175, -0.038126297295093536, -0.019848056137561798, -0.01643112488090992, 0.0004749721847474575, -0.0041382815688848495, 0.04028073325753212, -0.06373107433319092, -0.03692298009991646, -0.01461243536323309, 0.012922924943268299, -0.0020003572572022676, 0.05552893877029419, -0.022600915282964706, -0.020638611167669296, 0.0830884575843811, 0.012300625443458557, -0.006968062836676836, -0.011653033085167408, 0.09630554169416428, -0.04750065132975578, 0.06306688487529755, 0.01965993642807007, 0.0011312918504700065, 0.020970331504940987, 0.05358758568763733, 0.03268853574991226, 0.02976265735924244, 0.04581071436405182, 0.07292361557483673, -0.006322781555354595, 0.020517759025096893, 0.02152019925415516, -0.008373952470719814, 0.00533274793997407, -0.017302075400948524, -0.021683817729353905, 0.01679864712059498, 0.06351714581251144, -0.010259496979415417, -0.22708944976329803, -0.0031224556732922792, 0.061291735619306564, 0.042497504502534866, 0.010749849490821362, 0.03509292006492615, 0.01747933216392994, -0.050650663673877716, -0.00922764278948307, -0.00021134168491698802, 0.00506215076893568, 0.02765537053346634, 0.03503021225333214, -0.04591981694102287, -0.009701211005449295, 0.0009745765710249543, 0.08641903847455978, -0.02845350094139576, -0.011883397586643696, 0.04387371614575386, 0.019284889101982117, -0.02278684265911579, 0.19101621210575104, 0.006642643362283707, 0.026617441326379776, -0.010494658723473549, 0.0029243631288409233, 0.012876221910119057, 0.03339385241270065, 0.07399125397205353, 0.028113512322306633, -0.009667770937085152, 0.08188381046056747, -0.002611555391922593, 0.015365147031843662, -0.04313373565673828, -0.028105761855840683, -0.010026686824858189, 0.04272788390517235, -0.07205900549888611, -0.04287716746330261, 0.029362913221120834, -0.05958469584584236, -0.012502489611506462, 0.10978800803422928, 0.010964994318783283, -0.006674892734736204, -0.06850511580705643, -0.0407751239836216, -0.0009671968291513622, -0.058999303728342056, 0.013729672878980637, -0.004954078234732151, -0.008589190430939198, 0.028685353696346283, 0.034385450184345245, -0.00036465009907260537, 0.007533582393079996, 0.045741911977529526, 0.014600217342376709, -0.009557596407830715, -0.013089500367641449, 0.10001421719789505, 0.032558005303144455, 0.006797673646360636 ]
[ -0.019503355026245117, 0.03853052482008934, -0.014463107101619244, 0.03666645288467407, -0.03133007138967514, -0.0038708921056240797, 0.011956942267715931, 0.007637429516762495, -0.011651156470179558, -0.054326701909303665, -0.0401143878698349, -0.004270121920853853, 0.026000550016760826, -0.0396089032292366, 0.03916125372052193, -0.018026676028966904, 0.006996009033173323, -0.004348859656602144, 0.05064110457897186, -0.03482793644070625, -0.00934115145355463, 0.07703157514333725, 0.03074788674712181, 0.03066198155283928, 0.004169098567217588, 0.009950959123671055, -0.04127168282866478, 0.012657114304602146, 0.023625448346138, -0.13226202130317688, -0.04872627556324005, -0.025548942387104034, 0.009034605696797371, 0.016248362138867378, 0.028787851333618164, 0.015564698725938797, 0.009942338801920414, 0.0011860150843858719, -0.01155943889170885, 0.03664431720972061, -0.032039348036050797, -0.01323439460247755, -0.015059053897857666, -0.0009667686535976827, -0.020666195079684258, -0.013966387137770653, -0.013499021530151367, 0.01872514747083187, -0.012820097617805004, -0.03541332110762596, -0.025389349088072777, 0.02290191873908043, -0.021761955693364143, -0.008310496807098389, 0.03454800695180893, -0.017003392800688744, 0.0032695007976144552, -0.01162099651992321, -0.002170925959944725, -0.058398615568876266, -0.014521723613142967, 0.020120328292250633, -0.016300002112984657, -0.010756202973425388, 0.039813220500946045, -0.04220842197537422, -0.016560619696974754, 0.011605865322053432, 0.03149185702204704, -0.007474278099834919, -0.029013164341449738, -0.024297716096043587, -0.01234236266463995, -0.014038896188139915, 0.005424043163657188, -0.01190047524869442, 0.012868540361523628, -0.057788632810115814, -0.01270676963031292, 0.008657239377498627, -0.012251329608261585, -0.025627056136727333, -0.010898003354668617, 0.04532254859805107, -0.024618113413453102, -0.03278033435344696, -0.002185120014473796, 0.0623149648308754, -0.008369931019842625, 0.00950735155493021, -0.01824573427438736, -0.04395158216357231, 0.015505364164710045, 0.03232255205512047, -0.06674940884113312, 0.022900346666574478, -0.0055040400475263596, -0.031423721462488174, -0.027655698359012604, 0.8177627325057983, -0.0012925867922604084, 0.0029496909119188786, 0.04667877033352852, 0.03166911378502846, 0.030453339219093323, -0.013706166297197342, 0.005994667764753103, -0.04294435307383537, 0.02343730628490448, -0.06682881712913513, 0.012220879085361958, -0.014173032715916634, 0.02205495908856392, -0.006533765234053135, 0.04501659795641899, 0.054979220032691956, 0.0375276654958725, 0.03338567167520523, 0.00395554443821311, 0.028939126059412956, 0.04092755541205406, -0.0032422130461782217, 0.020430654287338257, 0.0286683551967144, 0.025079265236854553, -0.16209307312965393, -0.0016060908092185855, -7.37341688522742e-33, 0.011024530045688152, -0.018250206485390663, 0.011471021920442581, -0.00490526482462883, 0.02081800065934658, 0.008627156727015972, -0.011205256916582584, 0.015589089132845402, 0.0054008387960493565, -0.035249195992946625, 0.020666219294071198, 0.009696900844573975, 0.011492643505334854, 0.014934980310499668, 0.03721429035067558, 0.004371919669210911, 0.006300156004726887, 0.05303524434566498, 0.0081024793908, 0.009586428292095661, 0.045608699321746826, 0.02866308018565178, 0.05189434066414833, 0.00676252506673336, -0.023912498727440834, 0.01591404341161251, -0.034427620470523834, 0.03878151625394821, 0.002348443726077676, -0.045409105718135834, -0.07138887792825699, 0.015531916171312332, 0.024542205035686493, -0.021678538993000984, -0.0027208561077713966, -0.044282980263233185, -0.018145397305488586, -0.015903322026133537, 0.012907908298075199, -0.01982206664979458, -0.03894823044538498, 0.023032693192362785, -0.016449129208922386, -0.024163072928786278, -0.037180982530117035, -0.022595269605517387, -0.010764294303953648, 0.043399784713983536, 0.022109292447566986, 0.020320851355791092, 0.0497494600713253, 0.005954201798886061, -0.01649521477520466, 0.011607468128204346, -0.029833870008587837, -0.022762466222047806, 0.017246557399630547, -0.015690702944993973, 0.012707885354757309, -0.004052611533552408, -0.0016363131580874324, 0.016967134550213814, 0.0376349538564682, 0.04120446369051933, 0.03781655430793762, 0.008171920664608479, 0.035248976200819016, 0.07471286505460739, 0.019343189895153046, 0.006744518410414457, -0.05211400240659714, 0.022288965061306953, -0.007321298122406006, -0.04447397589683533, 0.017352072522044182, -0.010856729000806808, 0.006797142326831818, -0.037757355719804764, 0.041501984000205994, 0.05796927958726883, 0.02580423466861248, -0.016383500769734383, -0.042363591492176056, -0.016531914472579956, -0.016975529491901398, 0.0003976990410592407, 0.03731758892536163, 0.004409142304211855, -0.025019807741045952, -0.00022857071598991752, -0.00045767714618705213, 0.013692186214029789, 0.03336600214242935, -0.03736979886889458, -0.014771307818591595, 6.700261229021405e-33, 0.01701795496046543, 0.012133251875638962, -0.00813833437860012, 0.001427884097211063, 0.0137993935495615, -0.026289114728569984, 0.025906968861818314, 0.037052400410175323, 0.004042193293571472, 0.04017684608697891, 0.015269625000655651, -0.03899705782532692, -0.02029118873178959, -0.002702376339584589, 0.03060757741332054, 0.0069853938184678555, -0.02691653184592724, 0.025308765470981598, 0.013222605921328068, -0.023111628368496895, -0.024151483550667763, 0.0012017351109534502, -0.0190900769084692, 0.02218681201338768, 0.0012611893471330404, 0.010585651732981205, -0.01622711680829525, -0.0420052744448185, -0.013506500981748104, -0.006545051001012325, 0.014226384460926056, -0.025495285168290138, 0.017716314643621445, -0.012635928578674793, -0.02759755589067936, 0.045235905796289444, 0.014455556869506836, -0.006869318895041943, 0.03465518727898598, -0.011062422767281532, 0.08532679080963135, 0.02734558843076229, 0.008799382485449314, 0.018324585631489754, 0.011090517044067383, -0.014057721942663193, -0.009882383979856968, 0.017997460439801216, 0.02635948173701763, 0.018114104866981506, -0.005036306567490101, 0.013088581152260303, -0.012717409990727901, 0.001441368949599564, 0.006591212470084429, -0.012104902416467667, -0.018662014976143837, 0.023040737956762314, -0.05099636688828468, 0.008776213973760605, -0.04270710423588753, 0.0137750543653965, -0.0471741259098053, 0.009634318761527538, -0.003911667037755251, -0.022933917120099068, -0.07388794422149658, -0.0022198804654181004, -0.0368138812482357, -0.026396619156003, 0.023439262062311172, -0.023286042734980583, 0.0026534120552241802, 0.015017444267868996, -0.013336429372429848, 0.007911715656518936, -0.041169602423906326, 0.010875766165554523, -0.027653224766254425, 0.024569669738411903, 0.02864544652402401, -0.04201958328485489, 0.0030713172163814306, 0.035178180783987045, -0.010005177929997444, -0.006858354900032282, -0.017484959214925766, -0.02287878841161728, 0.057070039212703705, -0.0042722891084849834, -0.010905811563134193, -0.05138710141181946, 0.007033261004835367, 0.019143642857670784, -0.0020502316765487194, -1.2579707941995366e-8, -0.05219917744398117, -0.018283290788531303, -0.021379441022872925, 0.05972589552402496, 0.015583403408527374, 0.028520384803414345, -0.020157787948846817, -0.024789484217762947, -0.005849533714354038, 0.01985127478837967, 0.024275926873087883, -0.02584768272936344, 0.000930365058593452, -0.006587626412510872, 0.015174423344433308, -0.01573571190237999, 0.01907072588801384, -0.023014258593320847, 0.02752828225493431, -0.03409024327993393, 0.005057099275290966, -0.020187251269817352, 0.014204182662069798, -0.004150880500674248, 0.0006101762992329895, -0.033061884343624115, 0.03686720132827759, -0.07784739136695862, -0.008891434408724308, -0.01612907275557518, 0.024355793371796608, -0.04989590868353844, -0.02890400029718876, 0.03431079536676407, 0.019920701161026955, -0.054787032306194305, 0.01641334779560566, 0.015771809965372086, -0.0033727234695106745, 0.02195063978433609, -0.03433569520711899, -0.024915380403399467, -0.022127648815512657, -0.035932887345552444, -0.017668794840574265, -0.034453440457582474, -0.04634750261902809, 0.01397754717618227, 0.013611185364425182, -0.024888809770345688, 0.04406539723277092, -0.020901957526803017, 0.013982860371470451, -0.010898363776504993, 0.03417643904685974, 0.031447991728782654, 0.00995341595262289, 0.050508711487054825, -0.03991037979722023, -0.0014998120022937655, 0.031235642731189728, 0.002802887000143528, -0.00198062090203166, -0.014871861785650253 ]
python-get-first-item-collection-ignore-rest
https://markhneedham.com/blog/2023/06/27/python-get-first-item-collection-ignore-rest
false
2023-06-28 04:44:37
Python: All about the next function
[ "python", "til" ]
[ "TIL" ]
Yesterday I wrote a blog post about some different ways to https://www.markhneedham.com/blog/2023/06/27/python-get-first-item-collection-ignore-rest/[take the first element from a Python list^]. Afterward I was chatting to my new rubber duck, ChatGPT, which suggested the `next` function on an iterator as an alternative approach. And so that's what we're going to explore in this blog post. The `next` function gets the first value from an iterator and optionally returns a provided default value if the iterator is empty. Let's try it out on our example: [source, python] ---- values = ["Michael", "Ryan", "Karin", "Mark", "Jennifer", "Will"] print(next(iter(values))) ---- .Output [source, text] ---- Michael ---- That works well. We could extract the other values as well if we wanted: [source, python] ---- values = iter(["Michael", "Ryan", "Karin", "Mark", "Jennifer", "Will"]) print(next(values)) print(next(values)) print(next(values)) ---- .Output [source, text] ---- Michael Ryan Karin ---- And the empty case? [source, python] ---- values = [] print(next(iter(values))) ---- .Output [source, text] ---- Traceback (most recent call last): File "<stdin>", line 1, in <module> StopIteration ---- The `StopIteration` exception gets thrown if you try to read from an iterator that's been exhausted. We created an empty iterator, so that was to be expected. Let's instead pass in a default value: [source, python] ---- values = [] print(next(iter(values), None)) ---- .Output [source, text] ---- None ---- This time it returns the default value instead of throwing the exception and I think this is probably a nicer solution than the one we ended up with in the last blog post, which was as follows: [source, python] ---- values = [] first, *_ = values if len(values) > 0 else [None] ----
In this post, we're going to learn about the Python next function, which can be used to extract values from an iterator.
uploads/2023/06/python-next-banner.png
[ -0.012279024347662926, -0.05989280715584755, 0.008091605268418789, 0.029205363243818283, 0.06137757748365402, 0.028196703642606735, -0.005621470510959625, 0.05993151292204857, -0.00009232615411747247, 0.0056182267144322395, -0.01787545531988144, 0.014853820204734802, -0.06895574927330017, 0.015943987295031548, 0.013510406948626041, 0.07042232900857925, 0.08462446928024292, -0.04158689081668854, 0.008427396416664124, -0.0216049961745739, 0.004540441557765007, 0.05824809521436691, 0.014907753095030785, 0.005010017193853855, 0.03194180503487587, 0.007826268672943115, -0.014642370864748955, 0.011756458319723606, -0.05402536317706108, -0.012834475375711918, 0.013379059731960297, 0.016319964081048965, -0.012227563187479973, -0.01219718623906374, 0.02938045933842659, -0.014551636762917042, -0.006435741204768419, 0.009801922366023064, -0.008145914413034916, 0.04586082696914673, -0.051241930574178696, 0.010962880216538906, -0.06337079405784607, 0.015252365730702877, -0.04239330068230629, 0.0007210784824565053, -0.015616127289831638, -0.010753185488283634, -0.0013633989728987217, -0.002107273554429412, -0.06858611851930618, 0.06541232019662857, -0.0037677744403481483, -0.021546373143792152, -0.004100613761693239, 0.021282000467181206, 0.015766963362693787, -0.08628719300031662, 0.016841357573866844, -0.00027115902048535645, 0.004503447096794844, -0.009967298246920109, -0.002650135662406683, 0.04673883691430092, 0.01967429928481579, -0.03074328787624836, -0.004955020267516375, 0.05335726588964462, -0.03827318176627159, -0.02061072364449501, -0.04906104505062103, 0.007632927969098091, -0.03615817427635193, 0.009130111895501614, -0.007090323604643345, -0.03881406784057617, -0.005581177771091461, 0.05516313016414642, 0.024262383580207825, 0.06975018233060837, -0.0077160075306892395, 0.006682524923235178, 0.04236079752445221, 0.021926747635006905, -0.011191020719707012, -0.03520304337143898, -0.030147302895784378, 0.003045129356905818, -0.03279365971684456, 0.03229315206408501, 0.005664130672812462, -0.05804145336151123, -0.00700712762773037, 0.007703895680606365, -0.022856317460536957, -0.00928991287946701, -0.012200690805912018, 0.007437051739543676, -0.009598962962627411, 0.002109239576384425, -0.03860482946038246, -0.039393287152051926, 0.006956564262509346, -0.005036132410168648, -0.06906097382307053, -0.03492424637079239, -0.018024872988462448, -0.006715102586895227, -0.001833158079534769, 0.01195165142416954, -0.03041309118270874, -0.0019383021863177419, -0.029790062457323074, -0.004942933563143015, -0.08771653473377228, 0.03596850484609604, 0.015601519495248795, -0.03475373610854149, -0.01958869770169258, 0.010531636886298656, 0.056155975908041, 0.02713290974497795, 0.016355030238628387, 0.08579569309949875, 0.02404364012181759, 0.020415708422660828, 0.01581602543592453, 0.0656304880976677, -0.011267726309597492, -0.06082146242260933, -0.017360348254442215, 0.03510715067386627, -0.022131936624646187, -0.011913379654288292, -0.009903320111334324, -0.028297895565629005, -0.02572956681251526, 0.025920119136571884, 0.07448463886976242, 0.036425117403268814, 0.003393979975953698, -0.008378724567592144, 0.0062204706482589245, 0.009569532237946987, 0.01569553092122078, -0.0009852949297055602, -0.007399531081318855, 0.013268943876028061, -0.016275908797979355, 0.021080076694488525, 0.009077762253582478, 0.006114543415606022, 0.05858244001865387, -0.006067671347409487, -0.014363418333232403, 0.05208921059966087, 0.0366225503385067, 0.0652790293097496, -0.024422382935881615, 0.02534627728164196, 0.055842429399490356, 0.04605603590607643, -0.00515611981973052, 0.06722907721996307, 0.008760946802794933, -0.026702865958213806, 0.0009429184137843549, 0.04134644940495491, -0.012799972668290138, -0.02741231583058834, -0.032555919140577316, -0.06559239327907562, 0.047975312918424606, -0.03526506572961807, -0.009879766032099724, 0.0165141299366951, 0.06754446029663086, 0.004131418187171221, 0.05598694086074829, -0.009748853743076324, -0.0677965059876442, 0.033920954912900925, -0.020889947190880775, 0.027086488902568817, 0.028035888448357582, -0.0011809635907411575, 0.08802332729101181, 0.05063663050532341, 0.0008926406153477728, 0.013003374449908733, -0.07392049580812454, -0.059095486998558044, -0.04641266539692879, -0.006459833588451147, 0.07357902824878693, -0.040838323533535004, -0.004413105081766844, 0.06404860317707062, 0.023873846977949142, 0.050564032047986984, 0.021140407770872116, -0.00705404207110405, -0.006744865793734789, -0.018223661929368973, -0.06520158797502518, 0.02841871976852417, 0.040993135422468185, -0.009720548056066036, -0.020624814555048943, 0.04296709597110748, -0.025140250101685524, 0.03697214275598526, 0.014765366911888123, -0.02840217761695385, 0.03525853902101517, 0.04095536842942238, 0.022565921768546104, -0.05234501138329506, 0.025656213983893394, -0.0669843852519989, -0.0006641281070187688, 0.011254921555519104, -0.003121707122772932, -0.03487774729728699, 0.013662601821124554, 0.15013465285301208, 0.05942799150943756, -0.023912519216537476, -0.0644657090306282, 0.03251711279153824, -0.021284207701683044, -0.01419978216290474, -0.0036362612154334784, -0.012816193513572216, -0.048193324357271194, 0.03223926201462746, -0.02999957464635372, -0.03492787480354309, 0.01524823997169733, -0.012001622468233109, -0.027109771966934204, 0.07072094827890396, -0.03726937249302864, 0.06533440202474594, 0.0136169558390975, -0.014684964902698994, -0.018163343891501427, -0.034854866564273834, -0.0577956959605217, -0.006790697108954191, -0.007458691950887442, -0.015337271615862846, 0.058861732482910156, -0.018075667321681976, -0.040922969579696655, -0.010016586631536484, -0.07574442028999329, 0.02015659585595131, 0.05804618075489998, 0.06199616193771362, -0.03734910488128662, 0.061890531331300735, 0.0012280410155653954, 0.006912773009389639, -0.03980099782347679, -0.04481569677591324, -0.04794526845216751, 0.005301508121192455, 0.023897329345345497, 0.041050899773836136, -0.000023058877559378743, 0.022310402244329453, 0.0035590704064816236, 0.021882561966776848, -0.015285401605069637, 0.0007115472690202296, 0.020698614418506622, -0.0004917211481370032, -0.008790450170636177, -0.04194706678390503, -0.028895413503050804, 0.05002792924642563, -0.062826968729496, -0.047259505838155746, 0.009126692079007626, -0.057979971170425415, 0.036108311265707016, -0.050984133034944534, -0.04010998085141182, -0.0017740665934979916, 0.007475376129150391, 0.0036103655584156513, -0.019013112410902977, 0.004952825140208006, 0.040776122361421585, 0.009928164072334766, 0.01947343721985817, 0.04174819961190224, 0.011236903257668018, 0.010365981608629227, -0.007908180356025696, -0.0030013290233910084, 0.04474826529622078, 0.036778323352336884, 0.014667659997940063, -0.04873137176036835, 0.040963251143693924, -0.015801994130015373, -0.2686566412448883, 0.03257376328110695, 0.012712758965790272, -0.020651796832680702, 0.013271155767142773, -0.0048995655961334705, 0.007833767682313919, -0.030441971495747566, 0.013865096494555473, 0.05327240377664566, -0.031173888593912125, -0.04347700998187065, -0.012339879758656025, 0.04568539187312126, -0.012323078699409962, 0.005598629824817181, 0.007242327090352774, -0.017643462866544724, 0.017911970615386963, 0.0700884535908699, 0.01565594971179962, -0.0807589590549469, -0.031474921852350235, 0.055199772119522095, 0.01310347206890583, 0.05038151517510414, -0.07902466505765915, 0.056425102055072784, -0.06471029669046402, -0.016981091350317, -0.006164561957120895, -0.002403010381385684, 0.041575536131858826, -0.025046423077583313, -0.01502258237451315, -0.019952554255723953, 0.03334750235080719, 0.00996891688555479, -0.011920692399144173, 0.051055364310741425, -0.06395892798900604, -0.05244894698262215, 0.002222292823716998, 0.021840708330273628, 0.0701867938041687, -0.007538079284131527, -0.0580204613506794, -0.03867363929748535, -0.029848873615264893, 0.05423196777701378, -0.034791503101587296, -0.04792679473757744, -0.02513580583035946, 0.025300439447164536, -0.002855701372027397, 0.026478879153728485, -0.06069401279091835, -0.02675892412662506, -0.02961169183254242, -0.039118003100156784, -0.013970362953841686, -0.03370137885212898, -0.028682474046945572, -0.029783012345433235, -0.022130031138658524, -0.04313001409173012, -0.045622192323207855, 0.015724822878837585, 0.07832451164722443, 0.03758067637681961, -0.041891198605298996, 0.0011533229844644666, -0.027854466810822487, -0.12012939155101776, -0.007776737678796053, -0.012271651066839695, -0.040784724056720734, 0.029433492571115494, 0.012663365341722965, 0.031657230108976364, -0.059749189764261246, -0.05100899562239647, 0.016881197690963745, 0.030964631587266922, 0.019186558201909065, -0.033471137285232544, 0.0005459460080601275, -0.0456368587911129, -0.0013803589390590787, -0.008028737269341946, 0.055928703397512436, 0.005121991038322449, -0.013509546406567097, -0.015807949006557465, 0.006624259985983372, 0.06324182450771332, 0.03951113298535347, 0.0047224946320056915, 0.010494721122086048, 0.02391037344932556, 0.04214101657271385, -0.04284890741109848, -0.004534334409981966, -0.017847402021288872, -0.00768082682043314, 0.011395209468901157, -0.026716120541095734, -0.0006734899361617863, 0.020834049209952354, 0.00004641061241272837, -0.03161180764436722, -0.03376273810863495, 0.0072370837442576885, -0.03293651342391968, -0.020291725173592567, -0.019320575520396233, -0.002948766341432929, 0.021473541855812073, 0.019735271111130714, -0.037821900099515915, -0.06574352085590363, 0.01462459471076727, -0.018152309581637383, 0.0056798430159688, -0.05443452671170235, -0.05545811727643013, -0.010001186281442642, -0.009808016009628773, 0.013568094000220299, 0.01098957285284996, -0.011923927813768387, 0.022576982155442238, 0.023971492424607277, -0.01572294346988201, 0.036539167165756226, -0.0492197684943676, 0.0021174191497266293, -0.028019089251756668, -0.028793226927518845, 0.006568384822458029, -0.00610747653990984, -0.005696665029972792, -0.0002005849964916706, 0.031090354546904564, 0.026113752275705338, -0.0002926396846305579, 0.028402499854564667, 0.0026635578833520412, 0.004824298433959484, 0.03110833466053009, 0.029821958392858505, -0.031056135892868042, 0.04030312970280647, -0.008037677966058254, -0.002213158179074526, -0.003229718189686537, 0.04038430005311966, -0.012495679780840874, -0.05874812975525856, -0.017386918887495995, 0.05823817476630211, -0.045590244233608246, 0.012418263591825962, -0.021923141553997993, -0.006971728056669235, 0.03170710429549217, -0.004513308871537447, 0.02892083302140236, 0.012044885195791721, -0.0051156384870409966, 0.024098580703139305, 0.006440718192607164, -0.030784020200371742, 0.02439594455063343, 0.012779281474649906, -0.012939810752868652, 0.019419295713305473, 0.0364081971347332, -0.005909065715968609, 0.004712351597845554, -0.021886194124817848, 0.0019195760833099484, 0.017488805577158928, 0.03615807741880417, 0.04409467801451683, 0.03726457059383392, 0.007392319850623608, -0.006204074714332819, -0.03941679745912552, -0.03500298783183098, -0.04194415733218193, -0.004417267628014088, -0.012499028816819191, 0.017143383622169495, -0.036493558436632156, -0.051034316420555115, -0.0002575831313151866, 0.012722576968371868, 0.007564925588667393, 0.004393332172185183, -0.022913243621587753, -0.0026002847589552402, -0.006636432372033596, 0.00994647853076458, 0.07114938646554947, -0.0404595322906971, -0.0016106307739391923, -0.021966034546494484, 0.020194392651319504, 0.029911525547504425, 0.032813701778650284, -0.05886520817875862, 0.013175380416214466, 0.006814933847635984, -0.005214813631027937, -0.01204637810587883, -0.04039960354566574, 0.003266288200393319, 0.019469957798719406, -0.01265614852309227, 0.0008040309767238796, -0.017800625413656235, 0.030218524858355522, -0.026513302698731422, -0.03364383056759834, 0.0021646390669047832, 0.00338121154345572, -0.027420103549957275, 0.0480213537812233, -0.036169011145830154, 0.019247276708483696, -0.04608268290758133, 0.04173897206783295, 0.0188551377505064, -0.019695190712809563, -0.0012205718085169792, -0.0538591630756855, 0.012615206651389599, -0.023907797411084175, 0.03552161157131195, -0.016824526712298393, -0.03522562235593796, -0.04223964735865593, -0.0014189151115715504, -0.032557036727666855, 0.0009373103966936469, 0.009838706813752651, -0.05295133218169212, 0.01514994353055954, 0.06996490061283112, 0.000013998276699567214, 0.05703428015112877, 0.0026503601111471653, -0.034755680710077286, 0.055133603513240814, -0.05610373243689537, -0.06071794778108597, -0.0311456136405468, -0.06377019733190536, 0.026105094701051712, 0.019565796479582787, 0.059642281383275986, -0.06590314209461212, 0.045164622366428375, 0.03564544394612312, 0.03535880148410797, 0.03854783996939659, -0.019427865743637085, 0.0300640519708395, -0.0019386321073397994, -0.009962696582078934, -0.1075730100274086, -0.014588641934096813, 0.03891582041978836, 0.004191736690700054, -0.014632518403232098, -0.024049852043390274, -0.028929919004440308, 0.012710797600448132, -0.05660782381892204, -0.022353867068886757, 0.03258607164025307, 0.010573209263384342, 0.006755913607776165, 0.02589624561369419, -0.039882246404886246, 0.008199406787753105, 0.0487372949719429, -0.01926315762102604, -0.010671992786228657, -0.02923891879618168, 0.06703576445579529, 0.00834894459694624, 0.036076463758945465, 0.031669650226831436, -0.016410449519753456, 0.06253360211849213, 0.042310357093811035, 0.013529331423342228, 0.04502362385392189, -0.0448487289249897, 0.011370924301445484, 0.03627600520849228, -0.011986540630459785, 0.00395502895116806, 0.010616904124617577, 0.000021685238607460633, -0.04697350412607193, -0.0016026595840230584, 0.00022652636107522994, -0.024489568546414375, -0.01723833940923214, 0.05788030847907066, 0.005083102732896805, -0.03703688830137253, -0.07414480298757553, -0.00351882865652442, -0.05907037854194641, -0.01985970139503479, -0.03306300938129425, 0.005307619459927082, -0.04773731529712677, 0.03966689482331276, 0.0012941421009600163, -0.005354538094252348, 0.03872105851769447, -0.00435907207429409, -0.0004451680288184434, 0.02269178256392479, 0.08581967651844025, 0.09153525531291962, 0.049191366881132126, 0.0043091727420687675, 0.06152305379509926, -0.024867752566933632, -0.049865152686834335, 0.0028872876428067684, -0.03159283846616745, 0.005388153716921806, -0.03420335426926613, 0.0351671427488327, 0.08425267785787582, -0.03219318762421608, 0.06490985304117203, -0.025376874953508377, -0.004636995494365692, -0.0027580945752561092, 0.02968655526638031, 0.04466204717755318, 0.07019954919815063, 0.004609042778611183, 0.042176444083452225, -0.025261396542191505, -0.03329646214842796, 0.05598563328385353, -0.005884190555661917, -0.023935429751873016, 0.02561260014772415, -0.0013323278399184346, 0.014660963788628578, 0.04712744802236557, 0.04706497862935066, 0.07283120602369308, -0.03284057602286339, -0.02520725131034851, 0.0022321525029838085, 0.027056843042373657, -0.006715315859764814, 0.01196280773729086, 0.006323548965156078, -0.007952099665999413, 0.02532811276614666, -0.02478182688355446, -0.010562707670032978, -0.018965283408761024, -0.020747575908899307, 0.033110618591308594, -0.037371061742305756, -0.010077092796564102, 0.02572796866297722, -0.006183147896081209, -0.021093429997563362, -0.03588487580418587, -0.039212536066770554, -0.04396236687898636, -0.07463553547859192, 0.002932442119345069, 0.030467716977000237, 0.01310819759964943, -0.040469832718372345, -0.050341054797172546, -0.036103833466768265, -0.032747503370046616, 0.027679985389113426, -0.05639031156897545, -0.034094855189323425, -0.0011087689781561494, 0.007041062228381634, 0.03382563963532448, 0.03868655860424042, 0.04302956163883209, -0.003200674196705222, -0.029867112636566162, -0.0024441631976515055, 0.030835704877972603, 0.04793834686279297, 0.04297715425491333, -0.022844240069389343, -0.10047689080238342, 0.024443618953227997, 0.03185700625181198, 0.009116741828620434, -0.0635334849357605, 0.026241209357976913, 0.02031410112977028, -0.013893513940274715, 0.035280440002679825, -0.020200133323669434, -0.020101772621273994, -0.0469362698495388, -0.03174920007586479, 0.020018503069877625, -0.0180653128772974, 0.04353475198149681, -0.010471328161656857, 0.044911909848451614, 0.03537964075803757, 0.00738665321841836, -0.017417920753359795, 0.004483715631067753, -0.031981468200683594, 0.011383877135813236, -0.03153323754668236, -0.04516464099287987, -0.04276091977953911, -0.048890527337789536, -0.01761181652545929, 0.02034059725701809, -0.029262972995638847, -0.027544457465410233, 0.029652945697307587, 0.017742810770869255, -0.027809271588921547, 0.0806816816329956, -0.050938427448272705, -0.012248601764440536, -0.003497206838801503, -0.016706278547644615, -0.012451745569705963, 0.0190920177847147, -0.016478009521961212, 0.03432532772421837, 0.008383969776332378, -0.010373460128903389, -0.01975659839808941, -0.01614055596292019, 0.01793579012155533, 0.05800241976976395, -0.025078633800148964, -0.002287672134116292 ]
[ -0.11178107559680939, -0.0073649040423333645, -0.03250059112906456, -0.05762697756290436, 0.03801625221967697, -0.07394421845674515, 0.0011154928943142295, 0.03646590933203697, 0.032538384199142456, -0.005961299873888493, 0.023107942193746567, -0.037162426859140396, -0.006101301871240139, 0.0009764672140590847, 0.03315393254160881, -0.01254564430564642, -0.027525946497917175, -0.06586795300245285, -0.038921624422073364, -0.01723434589803219, 0.03344966098666191, -0.029464371502399445, -0.030067479237914085, -0.07352064549922943, 0.049910079687833786, 0.042420387268066406, -0.00752223189920187, -0.036849245429039, -0.025905219838023186, -0.2062464952468872, 0.013317860662937164, -0.047423966228961945, 0.02313796803355217, -0.04065381735563278, -0.019309163093566895, 0.04883052408695221, 0.0064237890765070915, 0.022271258756518364, 0.022471129894256592, 0.06571990996599197, 0.04074294492602348, 0.025455914437770844, -0.08146559447050095, -0.0020701007451862097, 0.01181247178465128, 0.0014422409003600478, -0.014303660951554775, -0.04212357848882675, 0.00769810751080513, -0.015789717435836792, -0.06180339306592941, 0.005871522706001997, -0.019879788160324097, -0.03766689449548721, -0.01676715910434723, 0.012246190570294857, 0.019400056451559067, 0.0764080062508583, 0.013904687017202377, 0.0188739113509655, 0.02607090398669243, -0.023114582523703575, -0.11448465287685394, 0.11349191516637802, 0.029736937955021858, 0.04152126982808113, -0.036874134093523026, -0.008662025444209576, -0.03707185760140419, 0.08213261514902115, 0.027661575004458427, -0.02004174329340458, -0.008903997018933296, 0.07123835384845734, 0.018495850265026093, -0.034894105046987534, 0.01726510189473629, 0.02814282476902008, 0.05947965383529663, -0.014229456894099712, -0.07842735946178436, -0.021250000223517418, 0.0030886721797287464, -0.010599246248602867, -0.0055663068778812885, 0.020131791010499, -0.03346528857946396, 0.04842401295900345, 0.05944695696234703, 0.021042292937636375, 0.0437382310628891, -0.024932067841291428, 0.016566697508096695, 0.04323606565594673, -0.04195322096347809, 0.0070082806050777435, 0.015511523932218552, -0.00402854336425662, -0.03454004228115082, 0.372310996055603, -0.020247800275683403, 0.013044078834354877, 0.04047391563653946, 0.049338821321725845, -0.005249994341284037, -0.01298908144235611, -0.017421923577785492, -0.06451613456010818, -0.028312871232628822, -0.06357204914093018, 0.01317228190600872, -0.06504926830530167, 0.09431690722703934, -0.07429642975330353, 0.009191935881972313, 0.01056739967316389, 0.007995416410267353, 0.010261304676532745, 0.024061687290668488, 0.018190793693065643, -0.012143263593316078, -0.020778631791472435, 0.013235737569630146, 0.02838839590549469, -0.0125633105635643, 0.02189905010163784, 0.03407401219010353, 0.07284483313560486, 0.028112903237342834, 0.041638851165771484, 0.06933767348527908, -0.06786908954381943, -0.08399233967065811, 0.01732359081506729, -0.002681012498214841, 0.02685130015015602, 0.03922399505972862, -0.012539960443973541, 0.03954453766345978, -0.0024051701184362173, 0.012479458004236221, -0.0553218349814415, -0.006983590312302113, -0.005033711437135935, -0.04673995450139046, 0.109018974006176, -0.0038415715098381042, -0.04968160390853882, -0.03482171520590782, -0.04223577678203583, -0.006095861550420523, 0.030397377908229828, -0.016115445643663406, -0.06837783753871918, 0.005009310320019722, 0.03916197642683983, 0.07465653866529465, -0.002062315121293068, -0.03841056302189827, -0.022311324253678322, -0.05807047709822655, -0.04032452031970024, -0.06727512180805206, 0.035060178488492966, 0.022593460977077484, -0.11156938970088959, -0.015615000389516354, -0.0020346599631011486, -0.010917196050286293, -0.07555235922336578, 0.03070378489792347, 0.014056351035833359, -0.05715472623705864, -0.04977341741323471, 0.06269196420907974, -0.010806867852807045, -0.030239073559641838, -0.018753554672002792, 0.0517859160900116, 0.032211463898420334, -0.008745408616960049, 0.03806496784090996, -0.04892514646053314, 0.009673114866018295, -0.03143186867237091, -0.0698108971118927, -0.050424933433532715, 0.008940097875893116, -0.0037283417768776417, -0.015462019480764866, 0.001936828950420022, -0.03395405784249306, -0.06971914321184158, 0.033405642956495285, -0.034719862043857574, -0.029933318495750427, 0.0017186067998409271, 0.031109634786844254, -0.010557453148066998, 0.007891422137618065, 0.031816769391298294, 0.016146743670105934, 0.027099082246422768, 0.04247136041522026, -0.049661263823509216, 0.018985489383339882, 0.037225835025310516, -0.07453149557113647, 0.08807434886693954, 0.022658776491880417, -0.013488578610122204, -0.02348202094435692, -0.009946293197572231, -0.004822855349630117, -0.0571441613137722, -0.03596758842468262, -0.0064533003605902195, 0.0062670898623764515, 0.033070314675569534, 0.0022092696744948626, -0.03245467692613602, -0.047175344079732895, 0.004574570804834366, -0.3571989834308624, -0.027521217241883278, 0.0018058238783851266, -0.008449533954262733, 0.01677718758583069, -0.08154873549938202, -0.01874161884188652, -0.001349056838080287, -0.03544130548834801, 0.009613358415663242, 0.07444964349269867, -0.010885771363973618, 0.036248669028282166, -0.07432631403207779, -0.007910890504717827, 0.025434253737330437, -0.006015739869326353, -0.020042169839143753, 0.003193965880200267, 0.08153349161148071, 0.012619069777429104, -0.012376234866678715, -0.0133362440392375, -0.08552251011133194, -0.020900839939713478, -0.038979027420282364, 0.11285959929227829, 0.018469313159585, 0.08137405663728714, -0.020969612523913383, 0.05473112687468529, 0.00702755618840456, -0.008006209507584572, -0.015818031504750252, -0.022875752300024033, -0.014741185121238232, -0.02205835096538067, 0.011456232517957687, 0.010232546366751194, -0.019115980714559555, 0.020889488980174065, 0.024669311940670013, -0.03136196732521057, -0.03204232081770897, -0.022839823737740517, 0.02144106663763523, 0.005277835763990879, -0.024245189502835274, 0.030952736735343933, 0.1063053086400032, 0.008366038091480732, 0.031390637159347534, -0.0005959139089100063, 0.020432371646165848, 0.04269927740097046, -0.042296152561903, -0.05222678929567337, 0.00830746628344059, -0.031390588730573654, -0.000826351169962436, 0.01333958562463522, 0.036774005740880966, 0.045720022171735764, -0.020527999848127365, -0.00458295876160264, 0.012418225407600403, 0.03559146448969841, 0.0008805786492303014, 0.01743033342063427, -0.04670552909374237, -0.025918692350387573, 0.10112041980028152, 0.005748228635638952, 0.014283948577940464, -0.023296747356653214, 0.06535743176937103, -0.0048319329507648945, 0.027919774875044823, 0.035330791026353836, 0.036137133836746216, 0.020176803693175316, 0.0032168193720281124, 0.038836006075143814, -0.004489293787628412, 0.0016923003131523728, 0.030400078743696213, -0.015958338975906372, 0.020367223769426346, 0.03308325633406639, -0.037673380225896835, -0.008129370398819447, 0.002171476138755679, -0.009345654398202896, -0.005386939272284508, 0.055799275636672974, -0.01955416239798069, -0.250318706035614, -0.010637948289513588, 0.061135973781347275, 0.045689672231674194, 0.006183317396789789, 0.047826070338487625, 0.026460254564881325, -0.05773787200450897, -0.018247384577989578, -0.0025631142780184746, 0.005226082168519497, 0.030273903161287308, 0.005825765896588564, -0.008783881552517414, 0.005929505918174982, -0.026939034461975098, 0.05723259970545769, -0.0013337295968085527, -0.01939748413860798, 0.0065635619685053825, 0.03810121491551399, -0.007475927006453276, 0.18108977377414703, -0.009187986142933369, 0.011270392686128616, 0.00602037413045764, 0.003337051020935178, 0.01686418615281582, 0.05240323022007942, 0.03492846339941025, 0.009625385515391827, -0.0103718601167202, 0.06283252686262131, -0.017129531130194664, 0.022521069273352623, -0.07921073585748672, -0.010672925040125847, 0.02339722216129303, 0.026951082050800323, -0.032668404281139374, -0.008255756460130215, 0.0367254875600338, -0.056278713047504425, -0.02488013356924057, 0.11613991856575012, 0.03632847219705582, -0.008569729514420033, -0.04338064044713974, -0.04396945238113403, 0.01923975721001625, -0.009818192571401596, -0.04063141718506813, 0.01116691343486309, -0.021680742502212524, 0.004383360035717487, 0.08234092593193054, 0.024036237969994545, -0.002242820104584098, 0.005183600354939699, 0.0034853864926844835, 0.01687040366232395, -0.02998802438378334, 0.15383121371269226, 0.03925928846001625, 0.05110916495323181 ]
[ -0.009362454526126385, 0.06197904422879219, -0.011480165645480156, 0.014704925939440727, -0.019952595233917236, 0.006160149350762367, 0.004208235535770655, 0.003995297010987997, 0.013483809307217598, -0.057302869856357574, -0.024785224348306656, 0.0007993208710104227, 0.008263852447271347, -0.03101699985563755, 0.027121933177113533, -0.018134193494915962, 0.00979316234588623, -0.0015895733376964927, 0.045632846653461456, -0.04863787442445755, -0.033223338425159454, 0.08349525928497314, 0.057400912046432495, 0.014390735886991024, -0.04476752504706383, 0.019808800891041756, -0.04028613492846489, 0.0018514038529247046, 0.018980994820594788, -0.13012710213661194, -0.04583346098661423, -0.045321960002183914, 0.0018170280382037163, 0.008467420004308224, 0.01547141745686531, -0.003696866799145937, 0.005248939618468285, 0.030195804312825203, 0.01942472718656063, 0.026327472180128098, -0.011901043355464935, -0.04105282574892044, -0.023849718272686005, 0.0037826430052518845, -0.029088716953992844, -0.01863788440823555, -0.030809691175818443, 0.020833296701312065, -0.013484148308634758, -0.030178342014551163, -0.011423812247812748, 0.02111768163740635, -0.008104613050818443, -0.00785622838884592, 0.050780292600393295, -0.001064659096300602, 0.014806760475039482, -0.012315560132265091, 0.013490308076143265, -0.07743248343467712, 0.01138968113809824, 0.00022076137247495353, -0.02711104042828083, -0.019863367080688477, 0.034097179770469666, -0.04341866448521614, 0.006412527058273554, 0.00254751811735332, 0.010294079780578613, -0.011976277455687523, -0.03116997517645359, -0.0002962820581160486, -0.001877799048088491, -0.0035764994099736214, 0.02359689213335514, -0.032665759325027466, -0.0012641764478757977, -0.018866637721657753, 0.010646004229784012, 0.012376880273222923, -0.012855828739702702, -0.021604023873806, -0.011489872820675373, 0.040035974234342575, -0.01811996102333069, -0.04482952877879143, -0.001912526204250753, 0.049167703837156296, 0.007300407160073519, 0.005733978468924761, -0.033133264631032944, -0.04445501044392586, 0.003858933225274086, 0.007938208058476448, -0.061617232859134674, 0.027176667004823685, -0.002552357967942953, -0.02502111904323101, -0.004000552464276552, 0.8251674771308899, 0.03057062067091465, 0.0014356509782373905, 0.04169875383377075, -0.009320985525846481, 0.03756566718220711, -0.011301502585411072, -0.006047483999282122, -0.04087812080979347, 0.048043157905340195, -0.054371584206819534, 0.004217017907649279, -0.009986763820052147, 0.035511258989572525, 0.024443509057164192, 0.024501992389559746, 0.04871867224574089, 0.01768777146935463, 0.014500531367957592, 0.00984566006809473, 0.01660296507179737, 0.040767163038253784, -0.004976614844053984, 0.044921875, 0.043667517602443695, 0.020863886922597885, -0.16850177943706512, -0.011091628111898899, -7.679431125525078e-33, 0.02661730907857418, -0.05203912779688835, 0.03210943937301636, -0.0066377404145896435, -0.0038178875111043453, 0.01670531928539276, -0.008752838708460331, 0.004679092671722174, 0.00879073329269886, -0.023371770977973938, -0.014616814441978931, 0.004992781672626734, 0.015187916345894337, 0.0007521830848418176, 0.04408794641494751, -0.008174042217433453, 0.017385859042406082, 0.028891196474432945, 0.022911312058568, -0.00225607817992568, 0.05910696089267731, 0.03719247877597809, 0.037870120257139206, -0.0014701575273647904, 0.010751387104392052, 0.015807397663593292, -0.014180165715515614, -0.0225610863417387, 0.024017438292503357, -0.04898039624094963, -0.07397431135177612, 0.005457681603729725, 0.03628489747643471, -0.009751089848577976, 0.017147138714790344, -0.031419843435287476, 0.019866125658154488, -0.00834883563220501, -0.00342599512077868, -0.037937063723802567, -0.03678096830844879, 0.009568683803081512, -0.000420216703787446, -0.012090889737010002, -0.02077987976372242, -0.03158437833189964, -0.01869499497115612, 0.039791204035282135, 0.008032876998186111, 0.031364452093839645, 0.026821084320545197, 0.00198389682918787, -0.020320165902376175, 0.0030374075286090374, -0.030495185405015945, -0.019890204071998596, -0.003322465578094125, -0.009970979765057564, -0.0037177102640271187, -0.00461431872099638, -0.0010068545816466212, 0.02340840920805931, 0.01846957951784134, 0.04012103006243706, 0.006624456960707903, -0.006098127458244562, 0.021465858444571495, 0.042442794889211655, 0.0024336648639291525, 0.021307960152626038, -0.04621636122465134, -0.006691359914839268, -0.03406940773129463, -0.04149463772773743, 0.007983323186635971, -0.013805861584842205, -0.011317161843180656, -0.01675591804087162, 0.03565671667456627, 0.035240013152360916, 0.04908524453639984, -0.002326220041140914, -0.026611488312482834, -0.016989443451166153, -0.013319135643541813, -0.009858804754912853, 0.017196396365761757, 0.005755849648267031, 0.0027903022710233927, -0.005051662214100361, -0.0021561088506132364, 0.030266648158431053, 0.018035242334008217, -0.006312941666692495, -0.003200845094397664, 7.25352307359927e-33, 0.002016328740864992, -0.00868083443492651, 0.0017614756943657994, 0.016739388927817345, 0.037419602274894714, -0.012232786975800991, 0.0569072924554348, 0.02530040219426155, 0.0179054643958807, 0.02975168637931347, -0.017832571640610695, -0.02979016676545143, -0.006186304148286581, -0.0012547591468319297, 0.04880284518003464, 0.024519553408026695, -0.005143326707184315, 0.015295986086130142, 0.045610904693603516, -0.03052944503724575, -0.009733636863529682, -0.0074150776490569115, -0.0023266407661139965, 0.014912349171936512, -0.018498679623007774, 0.04167529195547104, -0.009528173133730888, -0.04975904896855354, 0.010505358688533306, 0.005827807355672121, 0.037257544696331024, -0.018077943474054337, 0.035437989979982376, -0.026590432971715927, -0.031871918588876724, 0.025148089975118637, 0.016165146604180336, -0.010330121964216232, 0.013084502890706062, 0.0009195309248752892, 0.06449916213750839, -0.007847259752452374, 0.021193834021687508, 0.01834818348288536, 0.022529464215040207, -0.016583865508437157, -0.024519482627511024, 0.008378836326301098, 0.009581057354807854, 0.01912940852344036, 0.004602297209203243, 0.0005724356160499156, -0.018221404403448105, 0.005982528440654278, 0.01809610240161419, -0.003213014919310808, -0.022789835929870605, 0.0003864292521029711, -0.04644853249192238, 0.0034311648923903704, -0.022793112322688103, 0.007554773706942797, -0.023278675973415375, 0.018210986629128456, -0.010353600606322289, -0.013758939690887928, -0.08019459992647171, -0.0306558720767498, -0.03493820130825043, -0.01987922005355358, -0.003356196917593479, -0.050055649131536484, -0.004655611701309681, 0.010018490254878998, -0.0006198986666277051, 0.021707434207201004, -0.02811504900455475, 0.0005901250406168401, 0.0063577815890312195, 0.019358735531568527, 0.0043672299943864346, -0.029714040458202362, 0.022219737991690636, 0.027290023863315582, -0.01476939208805561, -0.01502987090498209, -0.00019858080486301333, -0.03372356668114662, 0.05046341195702553, -0.003692088881507516, 0.006845015566796064, -0.024123340845108032, -0.011557389050722122, 0.03684304654598236, 0.012791167944669724, -1.2945538863107231e-8, -0.06035619229078293, -0.0301713515073061, -0.02482069469988346, 0.07161164283752441, 0.021079804748296738, 0.03151175379753113, 0.015032468363642693, -0.0255860798060894, -0.008287763223052025, 0.0046845669858157635, -0.00036673329304903746, -0.033989761024713516, 0.019873889163136482, -0.002203514100983739, 0.03211051598191261, -0.026041997596621513, 0.029774848371744156, -0.03232663869857788, 0.03449622541666031, -0.028802387416362762, -0.011446853168308735, -0.0017587889451533556, -0.0031800763681530952, -0.028910018503665924, -0.018764372915029526, -0.02617046795785427, 0.03902531415224075, -0.07818946242332458, 0.005524304695427418, -0.04487883672118187, 0.0156825240701437, -0.0366731658577919, -0.041907306760549545, 0.01711278408765793, -0.006943556014448404, -0.025533853098750114, -0.0023182108998298645, 0.00961774867027998, 0.03277309983968735, 0.022534707561135292, -0.022370630875229836, -0.03291560336947441, -0.012975240126252174, -0.032599322497844696, -0.004620786756277084, -0.04124386981129646, -0.030505942180752754, 0.02008712664246559, 0.008884540759027004, -0.04014604166150093, 0.00859664287418127, -0.03006257861852646, 0.032599739730358124, -0.023583456873893738, 0.06865356117486954, 0.020926516503095627, 0.01763291470706463, 0.01650097779929638, -0.025755980983376503, -0.0170793067663908, 0.03373933210968971, -0.014812561683356762, -0.016325833275914192, -0.005798807367682457 ]
python-next-function-iterator
https://markhneedham.com/blog/2023/06/28/python-next-function-iterator
false
2023-06-19 02:44:37
Hugging Face: Using `max_length`'s default (20) to control the generation length. This behaviour is deprecated
[ "duckdb", "til", "generative-ai", "hugging-face" ]
[ "TIL" ]
I've been trying out some of the https://huggingface.co/[Hugging Face^] tutorials and came across an interesting warning message while playing around with the https://huggingface.co/google/flan-t5-large#usage[google/flan-t5-large model^]. In this blog post, we'll learn how to get rid of that warning. I was running a variation of the getting started example: [source, python] ---- from transformers import T5Tokenizer, T5ForConditionalGeneration tokenizer = T5Tokenizer.from_pretrained("google/flan-t5-large") model = T5ForConditionalGeneration.from_pretrained("google/flan-t5-large") input_text = "Who is the UK Prime Minister? Explain step by step" input_ids = tokenizer(input_text, return_tensors="pt").input_ids outputs = model.generate(input_ids) print(tokenizer.decode(outputs[0])) ---- The output from running this fragment of code is shown below: [source, text] ---- <pad>The Prime Minister of the United Kingdom is Theresa May. Theresa May is the ---- To be fair, we have had a lot of Prime Ministers over the last few years, but it hasn't been Theresa May for several years! In any case, I also got the following error message when it executed the `outputs =` line: [source, text] ---- /Users/markhneedham/projects/docs-bot/env/lib/python3.11/site-packages/transformers/generation/utils.py:1353: UserWarning: Using `max_length`'s default (20) to control the generation length. This behaviour is deprecated and will be removed from the config in v5 of Transformers -- we recommend using `max_new_tokens` to control the maximum length of the generation. warnings.warn( ---- I'm not actually setting a maximum length, but we seem to end up down this code path if no maximum is set. You can also see that the output is chopped off. We can fix that by setting the parameter `max_new_tokens`: [source, python] ---- outputs = model.generate(input_ids, max_new_tokens=1000) print(tokenizer.decode(outputs[0])) ---- The new output is shown below: [source, text] ---- <pad> The Prime Minister of the United Kingdom is Theresa May. Theresa May is the wife of David Cameron. David Cameron is the Prime Minister of the United Kingdom. So, the final answer is Theresa May.</s> ---- The accuracy is pretty bad, but at least it's not chopping off the output anymore.
In this post, we'll learn how to set the maximum token length when using the google/flan-t5-large model in Hugging Face.
uploads/2023/06/huggingface-maxlength.png
[ -0.010747069492936134, -0.053032487630844116, 0.008618208579719067, 0.0033722794614732265, 0.04250723868608475, 0.035932011902332306, 0.00502930348739028, 0.03429451212286949, 0.007009575143456459, 0.005734594538807869, -0.04457103833556175, -0.005915483459830284, -0.05947069823741913, 0.021338891237974167, -0.011874452233314514, 0.06609243154525757, 0.045047421008348465, 0.013827450573444366, 0.005043373443186283, 0.011434148997068405, 0.04730146750807762, 0.03442757949233055, 0.012541634030640125, 0.030545154586434364, 0.04420650005340576, 0.012001981027424335, 0.011914637871086597, 0.013677112758159637, -0.04878279194235802, -0.0038643216248601675, 0.0454222597181797, -0.01006076019257307, 0.00359992403537035, -0.0015647531254217029, 0.036859653890132904, 0.0016438388265669346, -0.03516577184200287, 0.006359441205859184, -0.0016465394292026758, 0.05880996584892273, -0.06316769123077393, 0.02759566344320774, -0.02946196123957634, 0.002169214654713869, -0.041249170899391174, 0.010027733631432056, -0.04709428548812866, 0.0071249050088226795, 0.010098123922944069, -0.018810121342539787, -0.08880239725112915, 0.02702510729432106, -0.012248819693922997, -0.021415602415800095, 0.018774855881929398, 0.04559691622853279, -0.004520231392234564, -0.08845219016075134, 0.035091374069452286, -0.05695619434118271, 0.01715674065053463, -0.025522742420434952, 0.01613783650100231, 0.01812872290611267, 0.005643955431878567, -0.022581735625863075, -0.0255730003118515, 0.06167495250701904, -0.06425370275974274, -0.03129427507519722, 0.0010292306542396545, 0.04250997304916382, -0.02268386445939541, 0.017046643421053886, -0.0059754373505711555, -0.036657169461250305, -0.021828750148415565, 0.046284712851047516, 0.05511828884482384, 0.06319151073694229, -0.02310093864798546, -0.02242490090429783, 0.035056836903095245, 0.0331265889108181, -0.0007484066300094128, -0.015831535682082176, -0.008038072846829891, 0.0058203148655593395, -0.0347495935857296, 0.04807145148515701, 0.03438824042677879, -0.0618726946413517, -0.006620557047426701, -0.0034402662422508, -0.02435109205543995, 0.002922680927440524, -0.003093256149441004, -0.00674310652539134, -0.03480887413024902, -0.026843424886465073, -0.03156549111008644, -0.027110407128930092, 0.0035685617476701736, -0.005826522130519152, -0.07066146284341812, -0.007792353630065918, -0.04562332481145859, -0.0034491720143705606, 0.03961987420916557, -0.009725647047162056, -0.021371886134147644, 0.006502990610897541, -0.01519035268574953, 0.011457727290689945, -0.08913502842187881, 0.06968346238136292, -0.011340065859258175, -0.005240348633378744, 0.007792116142809391, 0.03100813366472721, 0.0596492625772953, 0.03799322247505188, 0.0030767524149268866, 0.06930322200059891, -0.00984069611877203, 0.037375204265117645, 0.020734820514917374, 0.04685371741652489, -0.02719842456281185, -0.06647034734487534, -0.006720507983118296, 0.05710422620177269, -0.0005463720299303532, 0.026875734329223633, -0.017684703692793846, 0.0098113426938653, -0.010069755837321281, -0.00879174005240202, 0.06927972286939621, 0.02130720391869545, 0.012373499572277069, -0.030201978981494904, 0.00590034294873476, -0.0021117888391017914, 0.02936713583767414, 0.0023093887139111757, -0.02386203035712242, -0.02165140025317669, -0.013942884281277657, 0.015509877353906631, -0.0017265781061723828, 0.02164517343044281, 0.05532845854759216, 0.0017748159589245915, 0.008784971199929714, 0.047918327152729034, 0.04937371611595154, 0.018600892275571823, -0.010321862064301968, 0.004202757030725479, 0.04945354908704758, 0.014933496713638306, -0.004231423605233431, 0.06220719963312149, 0.022997891530394554, -0.015695098787546158, 0.001596360933035612, 0.04082510992884636, -0.012942521832883358, 0.014041257090866566, -0.06273059546947479, -0.03960200399160385, 0.06197008490562439, -0.04699840396642685, -0.016769887879490852, 0.013639026321470737, 0.06104715168476105, 0.004514128435403109, 0.024635329842567444, 0.009883821941912174, -0.06418576091527939, 0.05574255436658859, 0.02807007171213627, 0.05125412344932556, 0.027630221098661423, -0.02417113445699215, 0.07219303399324417, 0.03412787616252899, -0.0029989704489707947, 0.020257985219359398, -0.07854930311441422, -0.06102345138788223, 0.008584761992096901, -0.017010482028126717, 0.058476902544498444, -0.038241270929574966, 0.025748344138264656, 0.08380894362926483, 0.038545917719602585, 0.04864770919084549, -0.009738961234688759, -0.004829880315810442, 0.005137615837156773, -0.02726362831890583, -0.04497596621513367, 0.02769969031214714, 0.019077518954873085, -0.005741580855101347, -0.021201517432928085, 0.01582016423344612, 0.002344489097595215, -0.011354640126228333, 0.016431111842393875, -0.022556154057383537, 0.006811094470322132, 0.021026000380516052, 0.020334329456090927, -0.02536063827574253, 0.039998769760131836, -0.03423301503062248, 0.02621200866997242, 0.027691135182976723, -0.007841438986361027, -0.016643982380628586, -0.0393688902258873, 0.10118791460990906, 0.04638975113630295, -0.0160613302141428, -0.06992726027965546, 0.02887032926082611, -0.01733020879328251, -0.02072567492723465, 0.002023005159571767, -0.023929519578814507, -0.009609292261302471, -0.00277513125911355, -0.05107240378856659, -0.03928345814347267, 0.03589429333806038, -0.057332348078489304, -0.020476339384913445, 0.06185169517993927, -0.03843896836042404, 0.0426427498459816, -0.02612128295004368, 0.017771102488040924, 0.007095028646290302, -0.004411713220179081, -0.04310259222984314, 0.01439713966101408, 0.002172790002077818, 0.006137175485491753, 0.03922664746642113, -0.009276166558265686, -0.03040335141122341, 0.0036657387390732765, -0.07222149521112442, 0.00837166141718626, 0.04156346991658211, 0.06654271483421326, -0.0272808987647295, 0.04813336953520775, -0.012723708525300026, 0.02693547122180462, -0.020753275603055954, -0.03947629779577255, -0.0009646840044297278, -0.0392489992082119, 0.00953612383455038, 0.015218101441860199, 0.029814960435032845, 0.01853829249739647, -0.021045101806521416, -0.011817333288490772, 0.04561387002468109, 0.016198568046092987, 0.023361630737781525, -0.028114981949329376, 0.0013074754970148206, -0.048483286052942276, -0.014794853515923023, 0.0743010938167572, -0.029602760449051857, -0.029332028701901436, 0.002377869328483939, -0.056623928248882294, 0.046454768627882004, -0.07462485879659653, -0.04390883073210716, 0.017524423077702522, 0.010661588050425053, 0.024301325902342796, 0.009315499104559422, -0.008028985932469368, 0.061495788395404816, 0.0006000454886816442, 0.024699408560991287, 0.03732869774103165, 0.012948459945619106, 0.05600069835782051, -0.033716026693582535, 0.020975368097424507, 0.04016963019967079, -0.005177611019462347, -0.022493166849017143, -0.048597149550914764, -0.009326678700745106, -0.03334033489227295, -0.28324225544929504, 0.032887812703847885, 0.001749202492646873, -0.042282383888959885, 0.022697480395436287, -0.03566010296344757, 0.032433558255434036, -0.048396363854408264, -0.017254071310162544, 0.011304321698844433, -0.030987322330474854, -0.033111684024333954, -0.01574578881263733, 0.024441082030534744, -0.0027219695039093494, 0.013321221806108952, -0.0167599655687809, -0.022250475361943245, 0.015132326632738113, 0.032998163253068924, -0.014036664739251137, -0.047140058130025864, -0.016744956374168396, 0.048460692167282104, 0.03590850532054901, 0.009138353168964386, -0.058066193014383316, -0.005533186718821526, -0.05955521762371063, -0.011894145980477333, 0.0013114104513078928, -0.006029495503753424, 0.028426116332411766, 0.0006312629557214677, -0.0021176778245717287, -0.006207450293004513, 0.03928819298744202, -0.005567424464970827, -0.013331626541912556, 0.008797461166977882, 0.0007615466020070016, -0.06171038746833801, 0.0043636285699903965, 0.004831184633076191, 0.06786645948886871, -0.018626393750309944, -0.06918822973966599, -0.0190996453166008, -0.010514807887375355, 0.06537404656410217, -0.045622698962688446, -0.02641446329653263, -0.03267546743154526, 0.03610342741012573, -0.0029677024576812983, 0.04368400573730469, -0.004749464802443981, -0.026118837296962738, -0.03110353834927082, -0.0281472560018301, -0.024043945595622063, -0.04341486096382141, -0.03860481455922127, -0.05099031701683998, -0.013402667827904224, -0.040891438722610474, -0.05637921020388603, -0.027859259396791458, 0.06997400522232056, 0.00909701269119978, -0.02469772659242153, -0.010126011446118355, -0.005868314765393734, -0.11354362219572067, -0.027371538802981377, -0.04845592379570007, -0.03521258383989334, 0.045679882168769836, 0.004780514165759087, 0.06272412836551666, -0.07642059773206711, -0.07190850377082825, 0.018368199467658997, -0.017009783536195755, 0.02149546518921852, -0.007536678574979305, 0.018808117136359215, -0.009752378799021244, 0.013880159705877304, -0.03015132062137127, 0.06458021700382233, -0.021164748817682266, -0.0421052910387516, -0.0533660389482975, -0.007264190353453159, 0.01989922858774662, -0.0190848708152771, 0.03343672305345535, -0.014984707348048687, 0.02399778738617897, 0.022135280072689056, -0.04742693156003952, 0.00006032275268808007, -0.030692197382450104, -0.02101297304034233, 0.0057947831228375435, -0.05234524607658386, 0.02459578402340412, 0.021678322926163673, 0.008836672641336918, 0.0020362429786473513, -0.0524321012198925, 0.003014273475855589, -0.05396058410406113, -0.06426981836557388, -0.012203605845570564, -0.009821999818086624, 0.024918200448155403, 0.034588683396577835, -0.015853865072131157, -0.05261926352977753, 0.034231264144182205, -0.017820017412304878, -0.006089196074754, -0.05309199169278145, -0.02951880916953087, -0.01341380923986435, -0.0035954208578914404, -0.014785055071115494, 0.011912989430129528, -0.02025337517261505, 0.021603185683488846, 0.04289652779698372, -0.015180006623268127, 0.03219270333647728, -0.026258764788508415, -0.03178182244300842, -0.05497800558805466, -0.0022924405056983232, -0.00037822307785972953, -0.020887911319732666, 0.018102208152413368, -0.009844589978456497, 0.01660757139325142, 0.03732555732131004, 0.017442306503653526, 0.054094746708869934, 0.0009280848316848278, 0.00507095642387867, 0.012123982422053814, 0.05374528467655182, -0.041521452367305756, 0.015235335566103458, -0.04815526306629181, 0.0017481311224400997, 0.0069337389431893826, 0.02612585388123989, -0.0007076053880155087, -0.016960717737674713, -0.039175473153591156, 0.005893257912248373, -0.05658726021647453, -0.0047813826240599155, -0.02507002092897892, 0.03748011961579323, 0.032479215413331985, -0.002261979738250375, 0.008708025328814983, 0.008557147346436977, 0.021160056814551353, 0.0007764339097775519, 0.022072458639740944, -0.04997093603014946, 0.02582758478820324, -0.0016412597615271807, 0.018169282004237175, 0.006623768713325262, 0.019972238689661026, 0.03444141149520874, 0.0300754401832819, 0.0035377677995711565, -0.004089197143912315, 0.026580335572361946, 0.01202528364956379, 0.045382771641016006, 0.06416507065296173, -0.04576950892806053, 0.03456241637468338, -0.045557308942079544, -0.015578112564980984, -0.018301744014024734, 0.017725182697176933, -0.03307321295142174, -0.018952377140522003, -0.013915392570197582, -0.057934559881687164, 0.012020193971693516, 0.03604169934988022, 0.028576049953699112, 0.029848407953977585, -0.010604660958051682, 0.02365706115961075, -0.04296877235174179, 0.014590062201023102, 0.04149230197072029, -0.06291911751031876, -0.0049774362705647945, -0.01994023472070694, 0.011053730733692646, 0.02005426026880741, 0.041804321110248566, -0.04789625108242035, -0.020456159487366676, -0.04406808689236641, -0.003844605293124914, -0.04645955190062523, -0.054059289395809174, -0.02328447811305523, 0.05291828513145447, -0.028113530948758125, -0.0012368333991616964, -0.030682232230901718, -0.022269969806075096, -0.007320298347622156, -0.01746700517833233, 0.003896852023899555, -0.009310451336205006, -0.008465345948934555, 0.029676761478185654, -0.03187008202075958, 0.028743816539645195, -0.028028083965182304, 0.049455057829618454, 0.04800991714000702, -0.026785092428326607, -0.0004841072950512171, -0.02190970815718174, 0.009649231098592281, -0.0010509188286960125, 0.04488709196448326, 0.041067034006118774, -0.012697789818048477, -0.03741028904914856, 0.01999625936150551, -0.025412127375602722, 0.02639874629676342, -0.0027798342052847147, -0.027668707072734833, -0.015807127580046654, 0.0443248450756073, -0.0004443939251359552, 0.04684556648135185, -0.04620353505015373, -0.020825613290071487, 0.05642460286617279, -0.0453212670981884, -0.03826136142015457, -0.012735099531710148, -0.05328135937452316, 0.04423246532678604, -0.003809924703091383, 0.04163530096411705, -0.039362311363220215, 0.03865071386098862, 0.05309603735804558, 0.04264449328184128, 0.02455555833876133, -0.019576184451580048, 0.037708692252635956, -0.0086595444008708, -0.029057156294584274, -0.0878380537033081, -0.006146631669253111, 0.021383849903941154, -0.0005115263047628105, -0.03411286696791649, -0.005456453189253807, -0.043419551104307175, 0.024024924263358116, -0.07521501928567886, -0.01769135519862175, 0.050444431602954865, 0.0019261703127995133, -0.0064181177876889706, 0.04102848842740059, -0.05926445871591568, 0.02627166174352169, 0.011621225625276566, -0.04262574389576912, -0.04935077950358391, -0.005238491576164961, 0.06512439996004105, -0.022819509729743004, -0.035035546869039536, -0.050103865563869476, 0.0024911160580813885, 0.07757407426834106, 0.027358127757906914, 0.03307629004120827, 0.014898465014994144, -0.0013636774383485317, 0.04611463099718094, 0.0073958407156169415, 0.003853806760162115, -0.010974939912557602, 0.0207035131752491, -0.020031386986374855, -0.09556126594543457, 0.10378368198871613, 0.020281465724110603, 0.0061987596563994884, -0.034465305507183075, 0.04607668146491051, 0.023442555218935013, -0.013114910572767258, -0.03694832697510719, 0.01811016909778118, -0.05015857145190239, -0.05688236281275749, -0.032319311052560806, 0.002161401556804776, -0.028493553400039673, 0.06129343807697296, -0.004833155777305365, 0.004193938337266445, 0.07402762770652771, -0.0198683962225914, 0.013196179643273354, 0.043211691081523895, 0.09152205288410187, 0.0668230727314949, 0.06709056347608566, 0.0021314339246600866, 0.05774466693401337, -0.014333976432681084, -0.0558357872068882, 0.018327580764889717, -0.006223231088370085, -0.003809133544564247, -0.02357635274529457, 0.012919275090098381, 0.06721804291009903, -0.01761624962091446, 0.07498614490032196, -0.03824570029973984, 0.009390111081302166, -0.013961026445031166, 0.043212663382291794, 0.04381720721721649, 0.06983684003353119, 0.016307644546031952, -0.006249059457331896, -0.03560962155461311, -0.051464129239320755, 0.024782082065939903, 0.01440430711954832, -0.011269547045230865, 0.015015986748039722, -0.005392103921622038, 0.014026938937604427, 0.02558775059878826, 0.05866679549217224, 0.07943931967020035, -0.01797931082546711, -0.004785846918821335, 0.022681085392832756, 0.021797986701130867, 0.005753952544182539, 0.018369309604167938, -0.015429828315973282, -0.008732262998819351, -0.010855709202587605, -0.02429276704788208, -0.02464728243649006, -0.039318397641181946, -0.03015916422009468, 0.04042921960353851, -0.03758959844708443, -0.007736107800155878, 0.02348303608596325, -0.01553055364638567, -0.029322640970349312, -0.03786632418632507, -0.03958775848150253, -0.04991606995463371, -0.047549981623888016, -0.010464152321219444, -0.012078054249286652, -0.006784306839108467, -0.03670644015073776, -0.03732714429497719, -0.031186504289507866, -0.012003474868834019, 0.019160952419042587, -0.05218721181154251, -0.015236238949000835, 0.025502968579530716, -0.005879248958081007, 0.018230823799967766, 0.025020349770784378, 0.04888458177447319, 0.048619624227285385, 0.014745661988854408, 0.003092234954237938, 0.04192185401916504, 0.04602997004985809, 0.028815921396017075, 0.03245614096522331, -0.08486218750476837, -0.02031843736767769, 0.00814935564994812, -0.03030623309314251, -0.06019079312682152, 0.019339747726917267, 0.022593343630433083, 0.018567239865660667, 0.05105135962367058, -0.004760699346661568, -0.003023048397153616, -0.05286169424653053, -0.023763004690408707, -0.0001864629884948954, -0.006275330204516649, 0.050123825669288635, -0.003606647253036499, 0.07620476186275482, 0.07765248417854309, -0.00396733358502388, -0.011689437553286552, -0.005624362267553806, -0.017194615676999092, 0.05107368156313896, -0.046617936342954636, -0.0300359558314085, -0.05692575126886368, -0.07573101669549942, 0.00900270976126194, 0.015565372072160244, -0.04087159410119057, -0.04050854220986366, 0.01927797682583332, -0.020055675879120827, -0.005372569430619478, 0.025209706276655197, -0.02595774456858635, -0.019559696316719055, -0.016170017421245575, -0.012569434940814972, -0.03494875878095627, 0.025023849681019783, 0.004088555462658405, 0.00527846347540617, 0.03402118757367134, -0.02897784486413002, -0.0027887788601219654, -0.036839839071035385, 0.054743506014347076, 0.020850755274295807, -0.024467675015330315, 0.012366286478936672 ]
[ -0.07484310120344162, 0.007547058630734682, -0.028641290962696075, -0.024270646274089813, 0.058266546577215195, -0.022935526445508003, 0.012550829909741879, 0.0045073810033500195, -0.015442867763340473, 0.012918462045490742, 0.014165045693516731, -0.06553351879119873, 0.006025607697665691, 0.01686306670308113, 0.04088086262345314, -0.0026757661253213882, 0.008653692901134491, -0.06503202021121979, -0.04260937124490738, 0.04035859555006027, 0.0637783408164978, -0.027142222970724106, -0.003479299135506153, -0.03336496651172638, 0.02608051709830761, 0.013335581868886948, 0.05801168456673622, -0.03130150958895683, 0.01731047034263611, -0.23237839341163635, 0.04882931336760521, -0.018241804093122482, -0.015866022557020187, 0.0008584102033637464, 0.025423292070627213, 0.03529014065861702, 0.012184254825115204, 0.03571194037795067, 0.03152025118470192, 0.04016076773405075, -0.012748993001878262, 0.04753817990422249, -0.06783298403024673, -0.030422450974583626, 0.0622389055788517, 0.01941237598657608, -0.03614145144820213, -0.0055679501965641975, -0.06305805593729019, 0.0013254915829747915, -0.020824003964662552, 0.0314926914870739, 0.028751207515597343, 0.0032569062896072865, -0.0035946276038885117, 0.029588522389531136, 0.03364194929599762, 0.04188802093267441, 0.035950180143117905, 0.01071940828114748, 0.0007141731912270188, 0.011203992180526257, -0.15526345372200012, 0.09143797308206558, 0.006254321429878473, 0.06168145686388016, 0.0038983782287687063, -0.030572906136512756, -0.03645286709070206, 0.06137726828455925, -0.001771804760210216, -0.007980483584105968, -0.027694502845406532, -0.010693853721022606, -0.008998678997159004, 0.011184703558683395, 0.003970242105424404, 0.048787061125040054, 0.019139166921377182, 0.00600476423278451, -0.002750686602666974, -0.0036572401877492666, -0.027352986857295036, -0.05731624737381935, 0.009119217284023762, -0.02180580236017704, -0.03754890337586403, 0.015032319352030754, -0.02864469587802887, 0.013499372638761997, 0.019105399027466774, -0.02904948592185974, 0.053200721740722656, 0.0019265958108007908, -0.08500067889690399, -0.017405841499567032, 0.027133168652653694, 0.04328342527151108, -0.10092537850141525, 0.42315685749053955, -0.010595396161079407, -0.017750117927789688, -0.015064182691276073, 0.06011772155761719, 0.04407860338687897, 0.018677232787013054, -0.022256718948483467, -0.004769268445670605, 0.014088810421526432, -0.052353426814079285, -0.013546643778681755, -0.025145724415779114, 0.02805934101343155, -0.058031752705574036, 0.02450079470872879, -0.036246806383132935, 0.025761764496564865, 0.02794666402041912, -0.03064100816845894, -0.006322857458144426, -0.01825375109910965, 0.014071709476411343, 0.035179197788238525, -0.0122823566198349, 0.03714939206838608, 0.03869183361530304, 0.04296672344207764, 0.07783691585063934, 0.04050534963607788, 0.03418836370110512, 0.006386396009474993, -0.03904685378074646, -0.062469903379678726, -0.006700173951685429, 0.011369306594133377, -0.012518726289272308, 0.03961462900042534, -0.0027474332600831985, 0.012910866178572178, 0.01628217287361622, -0.009012481197714806, -0.06776483356952667, -0.0045223962515592575, 0.02095918357372284, -0.048995863646268845, 0.07845532894134521, -0.042739059776067734, -0.004080771002918482, -0.01571793667972088, 0.03248535841703415, -0.03454821929335594, 0.0580354705452919, 0.0008399063372053206, -0.0716831386089325, 0.051102131605148315, 0.040342263877391815, 0.0751418024301529, 0.05141594260931015, -0.07159620523452759, -0.032023921608924866, 0.04102705046534538, -0.026311464607715607, -0.03923673927783966, -0.005501695442944765, 0.054205454885959625, -0.12628811597824097, -0.07223859429359436, 0.014760369434952736, -0.016676491126418114, -0.06999053806066513, -0.012356800958514214, -0.012693182565271854, -0.034429773688316345, -0.004171408247202635, 0.06563519686460495, -0.025811342522501945, -0.006784055847674608, 0.012907656840980053, 0.041442304849624634, 0.04439043253660202, -0.05006677284836769, -0.043294940143823624, -0.007689953316003084, -0.002729790285229683, -0.04856995493173599, -0.03765757009387016, 0.0010436945594847202, -0.016640102490782738, 0.01052539236843586, -0.04765714704990387, 0.0015282351523637772, 0.014287772588431835, -0.04332392290234566, 0.06024535745382309, -0.04807266592979431, -0.04293104633688927, -0.0032380535267293453, 0.02587098255753517, 0.00925577711313963, -0.025358621031045914, -0.035975467413663864, 0.040924254804849625, -0.036352116614580154, 0.010144722647964954, -0.01924467831850052, 0.06885559111833572, 0.013011608272790909, -0.035952504724264145, 0.10416413843631744, 0.030917737632989883, -0.019411711022257805, 0.0032169485930353403, 0.0036744580138474703, -0.019364895299077034, -0.03152592107653618, 0.01790539361536503, 0.009810335002839565, 0.02620241604745388, 0.01220189593732357, 0.0003480593441054225, 0.018734341487288475, -0.02011091448366642, -0.05808282271027565, -0.40458664298057556, -0.024881523102521896, -0.021078983321785927, -0.009954001754522324, 0.007834022864699364, -0.09357979893684387, -0.006606425158679485, -0.03745657205581665, -0.006279575172811747, 0.03932323306798935, 0.026384765282273293, 0.0074004135094583035, -0.04104306176304817, -0.03877909854054451, 0.00486320024356246, 0.009024071507155895, -0.04775547608733177, 0.005349894519895315, -0.01733371987938881, 0.05861852690577507, -0.0042592622339725494, 0.001407516305334866, -0.0544876903295517, -0.026326335966587067, -0.026899714022874832, -0.00266966107301414, 0.10812508314847946, 0.015859996899962425, 0.02180151268839836, -0.04480670765042305, 0.03766554966568947, 0.02518695965409279, -0.02207651175558567, -0.05470066890120506, 0.03279649838805199, 0.013951891101896763, -0.01965324953198433, -0.0081207025796175, 0.01816319301724434, -0.016356419771909714, -0.042754534631967545, 0.007039936725050211, -0.048415977507829666, -0.020851777866482735, -0.007643999997526407, 0.015013073571026325, 0.006589723285287619, -0.03680041432380676, -0.014322686940431595, 0.07969118654727936, 0.034754540771245956, 0.015038393437862396, 0.015547472052276134, 0.0016175111522898078, 0.032757118344306946, -0.059453994035720825, -0.07531189173460007, -0.013052938506007195, -0.027728714048862457, -0.014312329702079296, 0.010398177430033684, 0.001296110451221466, 0.01929614506661892, -0.07552295178174973, -0.05654589459300041, 0.025531809777021408, -0.014917036518454552, 0.011354775168001652, 0.009226513095200062, -0.0021589624229818583, 0.020352084189653397, 0.15189242362976074, -0.007213841658085585, -0.0013858863385394216, 0.05328269675374031, 0.027107447385787964, -0.0156980250030756, 0.029832785949110985, -0.016953127458691597, 0.021558059379458427, 0.042490724474191666, -0.0005724690854549408, 0.04284827411174774, -0.005934780463576317, -0.029503267258405685, -0.0235869400203228, -0.021098632365465164, 0.03164638951420784, 0.04487327113747597, -0.00017334159929305315, 0.008907842449843884, 0.0013090241700410843, 0.0025371224619448185, -0.036117371171712875, 0.03543860837817192, -0.022634217515587807, -0.24567584693431854, 0.047117870301008224, 0.04824747517704964, 0.0722653716802597, 0.023022862151265144, 0.01879863068461418, 0.03804027661681175, -0.03497840464115143, -0.02804604172706604, 0.017359791323542595, -0.03960529342293739, 0.0525277778506279, 0.032027047127485275, 0.005625929217785597, 0.016140703111886978, -0.0158403180539608, -0.002616834593936801, 0.013108614832162857, -0.020263180136680603, 0.0005860367091372609, 0.007377403322607279, -0.06332094222307205, 0.13688990473747253, 0.007280142977833748, -0.014773953706026077, -0.008052244782447815, -0.012309052981436253, 0.010437749326229095, 0.07047339528799057, -0.022492902353405952, 0.0015829108888283372, 0.013110348954796791, 0.024250410497188568, -0.0228946004062891, 0.03851378709077835, -0.03654848039150238, -0.03500092029571533, -0.008228946477174759, 0.04072904959321022, 0.014112016186118126, 0.013536290265619755, 0.0069606611505150795, 0.016084956005215645, -0.02128670923411846, 0.06155041605234146, -0.02174399234354496, 0.0013917558826506138, 0.04471639543771744, -0.0377652570605278, 0.023134317249059677, -0.007565880659967661, -0.022477183490991592, -0.012127003632485867, 0.025345578789711, 0.04235861450433731, 0.05321027338504791, 0.03142005205154419, -0.02077089622616768, 0.0029542995616793633, 0.02018607407808304, -0.013534661382436752, -0.007554349023848772, 0.07981107383966446, 0.013839419931173325, 0.046437330543994904 ]
[ -0.04591112211346626, 0.022935470566153526, -0.0086515536531806, 0.0017339700134471059, 0.010975142940878868, -0.00016465455701109022, -0.04127836227416992, 0.033474817872047424, -0.025857288390398026, -0.0028710977640002966, 0.004876990802586079, 0.023701002821326256, 0.0334000289440155, -0.023927925154566765, 0.01821223832666874, -0.004974101670086384, -0.029916642233729362, 0.002092096023261547, -0.01801978051662445, -0.03627060353755951, -0.005177444778382778, 0.07281970977783203, 0.010897444561123848, 0.031535133719444275, -0.012980623170733452, -0.01003433857113123, -0.03270475193858147, -0.0024941768497228622, 0.03153572604060173, -0.09731025248765945, -0.026140976697206497, -0.03040475584566593, 0.003398200264200568, -0.0008227901998907328, -0.030696285888552666, 0.04283183068037033, -0.022617725655436516, 0.017985697835683823, 0.0047987173311412334, -0.018806053325533867, 0.01635776273906231, -0.0625457689166069, -0.013043860904872417, -0.005110353231430054, 0.015464525669813156, -0.0028764300514012575, -0.039361219853162766, -0.020908502861857414, -0.004189202096313238, -0.006043124943971634, -0.02420666068792343, -0.0021575791761279106, -0.0033221221528947353, 0.005296105518937111, -0.030493512749671936, -0.014670103788375854, 0.0014520632103085518, -0.013049701228737831, 0.001661795424297452, -0.017143262550234795, -0.030180014669895172, 0.03677675500512123, -0.01650473289191723, -0.03538666293025017, -0.034594446420669556, 0.0006478421273641288, -0.0013841165928170085, 0.025622118264436722, 0.000287075963569805, 0.007989549078047276, -0.006045637186616659, 0.0006730756722390652, -0.018515992909669876, -0.00382337998598814, -0.006071963347494602, -0.023263169452548027, 0.03212694451212883, -0.023144932463765144, 0.012910454533994198, 0.0027516342233866453, 0.003272764151915908, -0.007558130193501711, 0.024280263110995293, 0.006436280440539122, -0.01217583753168583, -0.059043318033218384, -0.04444916173815727, 0.013305461034178734, 0.02609258145093918, 0.026066912338137627, -0.002103402279317379, 0.016157686710357666, -0.011641589924693108, 0.06166695058345795, -0.09791389852762222, 0.02325250580906868, -0.027915557846426964, -0.00022904133948031813, -0.025563327595591545, 0.8458189368247986, -0.031361717730760574, 0.013642174191772938, 0.03575233370065689, 0.038610849529504776, -0.01741521991789341, -0.04562538489699364, -0.01976332813501358, -0.017055891454219818, 0.028154799714684486, -0.049579497426748276, 0.05514441430568695, -0.007855175994336605, 0.03500731661915779, -0.006123077590018511, 0.06255830824375153, 0.031194021925330162, -0.01957947015762329, 0.009308937005698681, 0.002573933219537139, 0.03613215684890747, 0.05041290074586868, 0.0017557317623868585, -0.0011997615220025182, 0.021499788388609886, 0.008624047972261906, -0.16618900001049042, -0.016545791178941727, -6.339186098647262e-33, 0.031299371272325516, 0.030667094513773918, 0.04872908443212509, 0.05061305686831474, -0.024750327691435814, 0.02482835203409195, -0.0045777871273458, 0.006667326670140028, -0.017249710857868195, -0.01779777742922306, -0.029860833659768105, 0.01640355959534645, -0.02654167264699936, -0.022611405700445175, 0.005782948341220617, -0.034143779426813126, -0.014503918588161469, 0.05871777981519699, -0.026252910494804382, 0.010379587300121784, 0.019002875313162804, 0.034605640918016434, -0.003871253691613674, -0.015959326177835464, -0.003901843912899494, 0.02717450074851513, 0.01412441860884428, -0.009489449672400951, -0.019069716334342957, -0.04123486205935478, -0.0436733104288578, 0.0029371578712016344, 0.010961799882352352, -0.02093666046857834, 0.030893893912434578, -0.05001886934041977, -0.03120732493698597, -0.00832150038331747, -0.05848972499370575, -0.037861622869968414, -0.04683912917971611, 0.01251599844545126, -0.01924123615026474, 0.0009726459975354373, -0.0026050156448036432, 0.01843150332570076, 0.011477223597466946, 0.011779201216995716, -0.006341340020298958, 0.00894150324165821, 0.041770800948143005, 0.019417842850089073, -0.038284361362457275, 0.01259263139218092, 0.0035270084626972675, 0.02651640772819519, -0.009517553262412548, 0.015409601852297783, 0.012590250000357628, -0.01157415471971035, 0.027310844510793686, -0.026229558512568474, 0.013269215822219849, 0.025682158768177032, -0.009267468005418777, 0.009052379056811333, -0.001375087653286755, 0.014542445540428162, 0.025156572461128235, 0.021339379251003265, -0.05510333925485611, 0.029467174783349037, -0.008424465544521809, -0.01885293424129486, 0.015953022986650467, -0.034902334213256836, 0.07051104307174683, 0.027199119329452515, -0.011484220623970032, 0.031163262203335762, 0.009655837900936604, -0.02578560821712017, 0.021088428795337677, -0.021326983347535133, -0.0029072491452097893, -0.023977650329470634, 0.0231358353048563, 0.015803910791873932, 0.030515240505337715, -0.006100405473262072, 0.047819867730140686, 0.018630269914865494, 0.0255747027695179, -0.017489949241280556, -0.03603196144104004, 6.827978690238247e-33, 0.017746156081557274, -0.04693074896931648, -0.014254624024033546, -0.020053524523973465, -0.002100499579682946, -0.011951891705393791, 0.01993672363460064, 0.03134184330701828, -0.05105913057923317, 0.02856413461267948, 0.006984517443925142, -0.02160009741783142, 0.005370727274566889, 0.011764274910092354, 0.04900866374373436, -0.002831596415489912, 0.028759317472577095, 0.008960547856986523, 0.019140489399433136, 0.014102820307016373, 0.002900354564189911, 0.01762702688574791, 0.007480323314666748, 0.009730636142194271, -0.010089353658258915, 0.05346841737627983, -0.03816426172852516, -0.007027031853795052, 0.01974331960082054, -0.002767966128885746, 0.024458693340420723, -0.042075060307979584, -0.00047474008169956505, 0.009342486038804054, -0.013569477945566177, 0.014975661411881447, -0.0003771100309677422, 0.007659447845071554, 0.013071960769593716, 0.0050638760440051556, 0.0008695812430232763, 0.002893824828788638, 0.004221964627504349, 0.040483154356479645, -0.01563272252678871, -0.014257380738854408, -0.021570736542344093, -0.0480039156973362, 0.020565032958984375, -0.010431988164782524, 0.008701547048985958, 0.021301493048667908, -0.005408308934420347, -0.01807643286883831, 0.02022947184741497, -0.055087119340896606, -0.0059765055775642395, 0.010923879221081734, -0.01949937269091606, -0.014225343242287636, -0.0053299227729439735, -0.027690423652529716, -0.0036939019337296486, -0.042971353977918625, -0.02045924961566925, -0.008481092751026154, -0.04811476916074753, 0.0031691743060946465, 0.039843399077653885, 0.033198535442352295, -0.0328432060778141, -0.01696639694273472, 0.03311222046613693, 0.024025551974773407, 0.012966683134436607, 0.03224143385887146, 0.00412544421851635, -0.00994198303669691, 0.006475953850895166, 0.012852241285145283, -0.01588638685643673, -0.016609597951173782, 0.005786412861198187, -0.007409385871142149, -0.027528464794158936, -0.01478529255837202, -0.0034591765142977238, 0.04390716180205345, 0.06272017955780029, 0.005687854718416929, -0.014574752189218998, 0.008086325600743294, 0.021112775430083275, 0.014680285938084126, 0.010539398528635502, -1.2653322833955372e-8, -0.013917460106313229, 0.021450653672218323, -0.013386417180299759, 0.017011642456054688, 0.0032944618724286556, 0.03580638766288757, -0.008742080070078373, -0.021727558225393295, -0.011116200126707554, 0.015605008229613304, 0.01668117381632328, 0.01226791087538004, -0.0021455290261656046, -0.027469784021377563, 0.0035165646113455296, -0.04536212235689163, -0.043629229068756104, -0.013767887838184834, 0.023754652589559555, -0.031335148960351944, -0.012225664220750332, 0.052055370062589645, -0.03900957480072975, -0.019611826166510582, 0.012748554348945618, -0.027712181210517883, 0.02888726443052292, -0.052606336772441864, 0.010245426557958126, -0.030449507758021355, -0.03081611543893814, -0.03554832190275192, -0.059244755655527115, 0.009522447362542152, 0.007999064400792122, 0.018973764032125473, 0.0007811015238985419, -0.033146921545267105, 0.0029760117176920176, 0.023914514109492302, 0.01274190004914999, 0.019251205027103424, -0.007481259293854237, -0.02522217482328415, 0.005206310655921698, 0.0068701268173754215, 0.027836015447974205, 0.009479423984885216, 0.01792251691222191, 0.020321395248174667, -0.0004997888463549316, -0.020365670323371887, -0.021838532760739326, 0.04028624668717384, 0.01673891209065914, 0.0014441070379689336, -0.023770000785589218, -0.011876712553203106, -0.02132723107933998, 0.009534377604722977, 0.009910816326737404, -0.009039144031703472, -0.013046606443822384, -0.006964918226003647 ]
huggingface-max-length-generation-length-deprecated
https://markhneedham.com/blog/2023/06/19/huggingface-max-length-generation-length-deprecated
false
2023-06-21 02:44:37
Chroma/LangChain: Index not found, please create an instance before querying
[ "chroma", "chromadb", "langchain", "til", "generative-ai" ]
[ "TIL" ]
Somewhat belatedly, I've been playing around with https://github.com/hwchase17/langchain[LangChain^] and https://huggingface.co/[HuggingFace^] to spike a tool that lets me ask question about https://podcasts.apple.com/gb/podcast/real-time-analytics-with-tim-berglund/id1680445905[Tim Berglund's Real-Time Analytics podcast^]. I'm using the https://www.trychroma.com/[Chroma^] database to store vectors of chunks of the transcript so that I can find appropriate sections to feed to the Large Language Model to help with answering my questions. I ran into an initially perplexing error while building this out, which we're going to explore in this blog post. I have a script called `generate_embeddings.py` that I use to generate embeddings of 256 length chunks of each podcast episode: .generate_embeddings.py [source, python] ---- from langchain.document_loaders import ( YoutubeLoader ) from langchain.embeddings import HuggingFaceEmbeddings from langchain.text_splitter import CharacterTextSplitter from langchain.vectorstores import Chroma splitter = CharacterTextSplitter( chunk_size=256, chunk_overlap=50, separator=" " ) # YouTube video IDs files = [ "nCLN15W_WOc", "K14Kn0D-I4Y" ] # Create chunks of text data = [] for file in files: yt_loader = YoutubeLoader(file) yt_data = yt_loader.load() data += splitter.split_documents(yt_data) # Create embeddings for those chunks and store them in Chroma hf_embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2') store = Chroma.from_documents( data, hf_embeddings, [f"{item.metadata['source']}-{index}" for index, item in enumerate(data)], collection_name="transcript", persist_directory='db', ) store.persist() ---- This takes a couple of seconds to run and then I wanted to see which chunks it would return if I asked about Anna McDonald, who was the guest for the last two episodes: [source, python] ---- from langchain.embeddings import HuggingFaceEmbeddings from langchain.vectorstores import Chroma hf_embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2') store = Chroma(persist_directory="db", embedding_function=hf_embeddings) print( store.similarity_search("Who is Anna McDonald?", top_n=2) ) ---- When I ran this, I got this error: .Error [source, text] ---- NoIndexException: Index not found, please create an instance before querying Exception ignored in: <function PersistentDuckDB.__del__ at 0x2acde7920> ---- There's a whole thread on different ways that this can happen on https://github.com/hwchase17/langchain/issues/3011[LangChain's GitHub repository^], but it turns out my problem was that I hadn't specified the collection name. Let's fix that: [source, python] ---- hf_embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2') store = Chroma(collection_name="transcript", persist_directory="db", embedding_function=hf_embeddings) for row in store.similarity_search("Who is Anna McDonald?", top_n=2): print(row) ---- And now if we run the script, we'll see the following output: .Output [source, text] ---- page_content="- Yeah, and you're great at explaining it. So, if you wanna know who Anna is, and you wanna know the\nbasics of Kafka Streams... Back to that episode. I'll just say you are a Customer\nSuccess Technical Architect at Confluent. - Almost got it this time." metadata={'source': 'nCLN15W_WOc'} page_content='- Anna McDonald is a world-class,\nno universe-class expert in Kafka, and in\nparticular, Kafka Streams. Kafka Streams is an important\npart of the ecosystem and I wanted her to give us\nan introduction to the topic. Good, solid foundation in Kafka\nStreams on' metadata={'source': 'K14Kn0D-I4Y'} page_content="and I'm joined here today\nby my friend, Anna McDonald. Anna is a customer success\ntechnical architect at Confluent. - Bravo (clapping) - I got it. Better known as the Duchess of Siesta. Anna, welcome to the\nReal-Time Analytics Podcast. - Thank you very" metadata={'source': 'K14Kn0D-I4Y'} page_content="- What up? - My guest today- - I learned how to book a... Oh, sorry, I was just gonna say, I learned how to book a\nconference room sort of today, so I can do these. - So now we can do it more. - That's right. - My guest today has been Anna McDonald. Anna," metadata={'source': 'nCLN15W_WOc'} ----
In this post we'll learn how to work around the index not found error when using the Chroma database to do similarity search.
uploads/2023/06/langchain-chroma-banner.png
[ 0.0004665731976274401, 0.009894311428070068, -0.013886405155062675, 0.04499361664056778, 0.06635577976703644, 0.015960687771439552, 0.021908661350607872, 0.03945256769657135, 0.00035066172131337225, 0.00438761105760932, -0.03896881267428398, -0.008134576492011547, -0.06858855485916138, 0.0066690752282738686, -0.012434661388397217, 0.06407838314771652, 0.06243542209267616, 0.003327776677906513, 0.01725785806775093, 0.0040986305102705956, 0.028643188998103142, 0.042106907814741135, 0.008448257111012936, 0.022026507183909416, 0.025530816987156868, 0.003158609149977565, 0.006647191476076841, 0.030722564086318016, -0.0565682016313076, 0.011987621895968914, 0.03823402151465416, -0.011882022954523563, 0.017991546541452408, -0.03177327662706375, 0.04393260180950165, 0.018957436084747314, -0.035407401621341705, 0.04597371071577072, 0.011741618625819683, 0.029503291472792625, -0.051889121532440186, 0.03313722088932991, -0.02633013390004635, 0.011253857053816319, -0.054806631058454514, -0.0005752516444772482, -0.05318298190832138, 0.024467652663588524, -0.0035493928007781506, -0.016480019316077232, -0.07860737293958664, 0.025135593488812447, -0.008989688940346241, -0.008071217685937881, -0.010174401104450226, 0.048837099224328995, 0.02813342772424221, -0.10763966292142868, 0.022404847666621208, -0.024523185566067696, -0.017964795231819153, -0.029512494802474976, -0.005906210746616125, 0.011053144931793213, -0.004222099669277668, -0.03333871811628342, -0.03903931751847267, 0.040853001177310944, -0.047840483486652374, -0.042413558810949326, 0.01855560764670372, 0.03252871707081795, -0.03646976128220558, 0.0006689229630865157, 0.007856720127165318, -0.03251117467880249, -0.015300176106393337, 0.06911494582891464, 0.019407793879508972, 0.053895529359579086, -0.023704800754785538, 0.015048852190375328, 0.02478352189064026, 0.04556389898061752, -0.021414298564195633, -0.01417737826704979, -0.04889924079179764, -0.018010711297392845, -0.057512231171131134, 0.030084772035479546, -0.004333628807216883, -0.04100141301751137, 0.02361571229994297, 0.020686205476522446, -0.005514586344361305, 0.0023258442524820566, 0.03434639796614647, 0.025876132771372795, -0.007830196060240269, -0.0035720777232199907, -0.04110913723707199, -0.010120565071702003, 0.019783081486821175, 0.016374196857213974, -0.06600579619407654, -0.013706312514841557, -0.008890453726053238, -0.02038828283548355, -0.003701380919665098, -0.03635783493518829, -0.0016104844398796558, -0.0032928278669714928, -0.01060416828840971, 0.007744814269244671, -0.05871235579252243, 0.06173073500394821, 0.027835585176944733, -0.033014215528964996, -0.01854572631418705, 0.026287835091352463, 0.03748549520969391, 0.03906596824526787, -0.006999343167990446, 0.0874251127243042, -0.0038130651228129864, 0.010421720333397388, -0.026242638006806374, 0.050867725163698196, -0.030165882781147957, -0.041906360536813736, -0.015661535784602165, 0.06202041730284691, -0.007825207896530628, 0.023386694490909576, 0.008689424954354763, -0.002498520538210869, -0.019042538478970528, 0.011284900829195976, 0.05753263086080551, 0.014680732041597366, -0.01850626990199089, -0.02573057822883129, -0.004207277204841375, -0.016397884115576744, 0.03421613574028015, 0.005987618118524551, -0.044695787131786346, -0.03315073624253273, -0.027289994060993195, 0.0030829960014671087, -0.019981980323791504, -0.009165909141302109, 0.06892068684101105, -0.037002529948949814, 0.011190627701580524, 0.06650232523679733, 0.016857819631695747, 0.012978916056454182, -0.0040803407318890095, 0.005578063428401947, 0.028154822066426277, 0.02219676971435547, -0.042050834745168686, 0.046886079013347626, 0.006918555591255426, -0.017077021300792694, -0.0011985547607764602, 0.04988774284720421, -0.02518141083419323, -0.012895887717604637, -0.05687921494245529, -0.03013894334435463, 0.0757320448756218, -0.02937127836048603, -0.03787980601191521, 0.03505481034517288, 0.07983966916799545, 0.03233055770397186, 0.008067875169217587, 0.007828264497220516, -0.07905472069978714, 0.05765578895807266, 0.01960073597729206, 0.02523060329258442, 0.04392547160387039, -0.008217171765863895, 0.08273805677890778, 0.011881604790687561, -0.013544866815209389, 0.04062642157077789, -0.08714865893125534, -0.07586805522441864, -0.017238743603229523, 0.004429765976965427, 0.04911722242832184, -0.05378428474068642, 0.020954269915819168, 0.07870130240917206, 0.028049571439623833, 0.020819826051592827, -0.01037541776895523, 0.008585741743445396, 0.0031491469126194715, -0.03733820840716362, -0.039323121309280396, 0.03321215137839317, 0.04227351024746895, -0.013517257757484913, -0.01817803829908371, 0.015580636449158192, 0.013435843400657177, 0.009261981584131718, 0.042676378041505814, -0.03684559464454651, 0.02315133437514305, 0.003916768357157707, 0.03597438335418701, -0.018840139731764793, 0.04033862426877022, -0.03654744103550911, 0.043191127479076385, -0.012261802330613136, -0.04105840623378754, 0.0003520940081216395, -0.0390164889395237, 0.11347120255231857, 0.05757451802492142, -0.02435407042503357, -0.049877382814884186, 0.00894603505730629, -0.0010331346420571208, -0.03572966903448105, -0.006021992303431034, -0.03282926604151726, -0.010824642144143581, -0.0020223844330757856, -0.054129503667354584, -0.03463248163461685, 0.01716594770550728, -0.042552269995212555, -0.00047470309073105454, 0.06973905116319656, -0.012682685628533363, 0.044583532959222794, 0.0026044496335089207, 0.019678989425301552, 0.0019158595241606236, -0.01709378883242607, -0.040904734283685684, -0.00863905530422926, 0.030147017911076546, -0.006317525170743465, 0.01721348613500595, -0.02011825516819954, -0.017717745155096054, -0.03221981227397919, -0.04866090044379234, 0.016592906787991524, 0.04757417365908623, 0.0671495571732521, 0.008444671519100666, 0.04092821851372719, -0.014893232844769955, 0.010211567394435406, -0.022939098998904228, -0.05328424274921417, -0.03528085723519325, -0.06668323278427124, 0.0021625447552651167, 0.028709927573800087, 0.03843029588460922, 0.022700659930706024, 0.006442434620112181, 0.004254097584635019, 0.009141218848526478, 0.006981076207011938, 0.03466549143195152, -0.02963080070912838, -0.01197023969143629, -0.029171420261263847, -0.02670237049460411, 0.05759583041071892, -0.04720952734351158, -0.025731733068823814, -0.011417875066399574, -0.07527406513690948, 0.021224534139037132, -0.04516986012458801, -0.02205723337829113, 0.005440413951873779, 0.022341134026646614, 0.04649939388036728, 0.004210745915770531, 0.007398740388453007, 0.0660676434636116, 0.020224491134285927, 0.036198049783706665, 0.011236333288252354, 0.008748975582420826, 0.0583767294883728, -0.031700555235147476, 0.0103217838332057, 0.048064935952425, 0.009216156788170338, -0.034891895949840546, -0.041846781969070435, 0.024014292284846306, -0.05768971145153046, -0.3114524185657501, 0.03302711248397827, -0.005837585311383009, -0.04707798361778259, 0.013039305806159973, -0.027538320049643517, 0.0007016713498160243, -0.06234729290008545, -0.014978562481701374, -0.004323883447796106, -0.045559514313936234, -0.008126812987029552, -0.03300229832530022, 0.01244693249464035, 0.01229365635663271, 0.016858963295817375, -0.03789025545120239, -0.016085486859083176, 0.00917266309261322, 0.05000019446015358, -0.013738919049501419, -0.04339665174484253, -0.009563897736370564, 0.058386605232954025, 0.017816664651036263, 0.027795735746622086, -0.0697312206029892, 0.023008372634649277, -0.021905679255723953, -0.014540483243763447, 0.006259595509618521, -0.026730520650744438, 0.011046606115996838, -0.01179567538201809, -0.018639113754034042, -0.038568463176488876, 0.04994535446166992, 0.009919040836393833, 0.022777700796723366, 0.007092245388776064, -0.0036200641188770533, -0.023051084950566292, 0.03095872700214386, -0.01298922672867775, 0.07956349104642868, -0.024678649380803108, -0.06772737950086594, -0.0019299151608720422, -0.050856996327638626, 0.07969421148300171, -0.011202512308955193, -0.059047989547252655, -0.025184571743011475, 0.04420124739408493, -0.002752381144091487, 0.0015601121122017503, 0.008888797834515572, -0.010874249041080475, -0.04984914883971214, -0.034283142536878586, 0.0008762723300606012, -0.039573099464178085, -0.0335431769490242, -0.06251499801874161, 0.0029947382863610983, -0.06747444719076157, -0.048194561153650284, -0.004375659395009279, 0.06026357039809227, 0.026698671281337738, -0.048167403787374496, 0.016668813303112984, 0.0036118109710514545, -0.1052105650305748, -0.009160716086626053, -0.027334388345479965, -0.022443532943725586, 0.015420571900904179, 0.01365688070654869, 0.055513959378004074, -0.0635322630405426, -0.05030670389533043, 0.04359171912074089, -0.014300288632512093, 0.012685359455645084, -0.03282764554023743, 0.033431556075811386, 0.005292331334203482, -0.013646322302520275, -0.011831101961433887, 0.033970240503549576, -0.046544149518013, -0.049110397696495056, 0.0013661732664331794, -0.011828788556158543, 0.01222418062388897, -0.012754714116454124, 0.025735577568411827, 0.017728181555867195, 0.05251382291316986, 0.022834239527583122, -0.06203550100326538, -0.031969889998435974, -0.04277477413415909, 0.00289840972982347, 0.015716087073087692, -0.04526916518807411, 0.020042072981595993, 0.05505819246172905, 0.024503245949745178, -0.028196414932608604, -0.006784958299249411, 0.01679002121090889, -0.04877517372369766, -0.029796989634633064, -0.017924241721630096, 0.006937256082892418, 0.023417629301548004, 0.011107253842055798, -0.05208506062626839, -0.054856933653354645, 0.0003001370932906866, 0.011918899603188038, -0.005796187091618776, -0.044236283749341965, -0.008515340276062489, 0.009863264858722687, -0.01436619646847248, 0.03162162005901337, -0.00813857652246952, -0.03855669125914574, 0.0016684430884197354, 0.00880341324955225, -0.019137823954224586, 0.064675472676754, -0.051507312804460526, -0.030895980075001717, -0.023999078199267387, 0.012171006761491299, 0.01588551141321659, 0.0077627417631447315, -0.003460161155089736, 0.0054594068787992, 0.022900182753801346, 0.058809999376535416, 0.002389822620898485, 0.018325582146644592, 0.026120349764823914, -0.028917554765939713, 0.007981815375387669, 0.041769202798604965, -0.04292120039463043, 0.025942154228687286, -0.0028899372555315495, -0.011988027021288872, -0.005656156688928604, 0.04496690630912781, 0.026873154565691948, 0.003566659986972809, -0.051493607461452484, 0.048987165093421936, -0.030133046209812164, -0.011811555363237858, 0.002768529811874032, 0.002102880273014307, 0.04172835499048233, 0.00021560792811214924, 0.029179997742176056, -0.003378413850441575, -0.005542997270822525, -0.007141060661524534, -0.0011233732802793384, -0.05266235023736954, -0.004431493114680052, 0.0072195082902908325, 0.0018634720472618937, 0.013502097688615322, 0.005039125680923462, 0.010930956341326237, 0.05595408380031586, -0.00017800621571950614, -0.01688729226589203, 0.035392601042985916, 0.004651879891753197, 0.06767652183771133, 0.059631962329149246, -0.010172281414270401, 0.025240518152713776, -0.028671665117144585, -0.023078780621290207, -0.0031659977976232767, 0.011435638181865215, -0.017957331612706184, -0.017893079668283463, -0.020687146112322807, -0.07700513303279877, 0.037761639803647995, -0.016931544989347458, 0.01859102211892605, 0.003844859544187784, -0.0217309407889843, 0.013241305015981197, -0.044023238122463226, 0.04309910535812378, 0.06593560427427292, -0.07012124359607697, -0.001725840731523931, -0.025907358154654503, 0.0111134247854352, -0.015558214858174324, 0.02141493186354637, -0.04471958056092262, -0.03597213700413704, -0.02614479698240757, 0.014893386512994766, -0.034690387547016144, -0.03559280186891556, -0.020328514277935028, 0.0345408171415329, -0.0014689862728118896, -0.0038936957716941833, -0.03484433516860008, -0.02889515645802021, 0.0036528618074953556, -0.024339307099580765, 0.010371430777013302, -0.031221020966768265, -0.012793732807040215, 0.022278517484664917, -0.01631901040673256, 0.02000945620238781, -0.046028684824705124, 0.06299377232789993, 0.042070187628269196, -0.026304718106985092, 0.015921443700790405, -0.045398809015750885, 0.015971006825566292, 0.013851449824869633, 0.0467381551861763, 0.035650722682476044, -0.0008220662130042911, -0.021413039416074753, 0.03513624891638756, -0.022054634988307953, 0.0303184874355793, -0.009362614713609219, -0.016049180179834366, 0.010055643506348133, 0.03975643962621689, 0.011362951248884201, 0.024134764447808266, -0.028189631178975105, -0.0276032667607069, 0.05862690135836601, -0.04153285175561905, -0.04031877592206001, -0.01995041035115719, -0.04457632452249527, 0.013025056570768356, -0.0027634387370198965, 0.028974739834666252, -0.05322333425283432, 0.04954797029495239, 0.017561698332428932, 0.03872402384877205, 0.027614207938313484, 0.014450907707214355, 0.029888320714235306, -0.02231997810304165, -0.026883067563176155, -0.07150410115718842, -0.0018063356401398778, 0.038700636476278305, -0.010238025337457657, 0.00780326034873724, 0.011535553261637688, -0.027668971568346024, 0.018826553598046303, -0.06187277287244797, -0.042379241436719894, 0.024283265694975853, -0.035573311150074005, 0.011896993033587933, 0.02365310676395893, -0.04299401864409447, -0.001237803022377193, 0.03768276423215866, -0.03451785817742348, -0.026539180427789688, -0.023043261840939522, 0.0814935714006424, -0.012218971736729145, -0.00043538588215596974, -0.018025515601038933, -0.016122078523039818, 0.07937991619110107, -0.0020673475228250027, 0.03729980066418648, 0.03260883688926697, 0.007878161035478115, 0.020793775096535683, 0.04505228251218796, -0.017386673018336296, 0.02048822119832039, 0.005821422673761845, -0.02591066248714924, -0.07684800773859024, 0.059992846101522446, 0.005599543452262878, 0.00873128604143858, -0.010399891994893551, 0.06678995490074158, 0.030391639098525047, -0.028953956440091133, -0.06774579733610153, 0.05368978902697563, -0.047013286501169205, -0.019624389708042145, -0.019197970628738403, -0.017433099448680878, -0.0164125245064497, 0.04641124606132507, -0.013626405969262123, 0.010234401561319828, 0.07312190532684326, -0.01210821233689785, 0.006642212625592947, 0.0026213875971734524, 0.07720015197992325, 0.06004504859447479, 0.06886570900678635, 0.028287850320339203, 0.06015266478061676, -0.035587042570114136, -0.04191301390528679, 0.003890501568093896, 0.010653347708284855, 0.011511954478919506, -0.009815691970288754, -0.003947074990719557, 0.0549347810447216, -0.032146260142326355, 0.08623925596475601, -0.03903580084443092, -0.015924114733934402, -0.00444828299805522, 0.020136358216404915, 0.03317040950059891, 0.043656617403030396, 0.008475735783576965, 0.02199755795300007, -0.024161189794540405, -0.03828379511833191, 0.028052855283021927, -0.009781851433217525, -0.00939207710325718, 0.03532599285244942, -0.0035950762685388327, 0.04285721853375435, -0.014757507480680943, 0.047318100929260254, 0.0792960673570633, -0.03311948850750923, 0.0180878434330225, -0.007772359065711498, 0.013966239057481289, -0.00047041778452694416, 0.04070711135864258, -0.0033483842853456736, -0.02548392489552498, -0.008670519106090069, -0.04415066912770271, -0.021208927035331726, -0.022668147459626198, -0.03080569952726364, 0.040203291922807693, -0.026375269517302513, 0.002661579055711627, 0.026891270652413368, 0.005561324302107096, -0.05457936227321625, -0.033870354294776917, -0.026721160858869553, -0.04529937729239464, -0.054875243455171585, -0.018858497962355614, 0.024820752441883087, 0.013226200826466084, -0.04293249174952507, -0.0025810645893216133, -0.016335444524884224, -0.006461108103394508, 0.02632514387369156, -0.06016755476593971, -0.025508685037493706, 0.02179809845983982, 0.01463188324123621, 0.018831118941307068, 0.028098609298467636, 0.05800141394138336, -0.00940194446593523, -0.027475524693727493, 0.008115168660879135, 0.0379115492105484, 0.031692348420619965, 0.015199766494333744, 0.015387490391731262, -0.10272932052612305, -0.003948491532355547, 0.0022074617445468903, -0.01950458064675331, -0.07412059605121613, 0.015512213110923767, 0.05361538752913475, -0.00327166635543108, 0.0456862635910511, -0.010171718895435333, 0.005580192431807518, -0.07113414257764816, -0.0356699638068676, -0.01026127114892006, 0.020168164744973183, 0.05298374965786934, -0.0036529686767607927, 0.09640585631132126, 0.006276104599237442, -0.007580806966871023, -0.0395575575530529, -0.010823071002960205, -0.015233970247209072, 0.028114134445786476, -0.02312004193663597, -0.037329405546188354, -0.02472160942852497, -0.06107916682958603, -0.032119885087013245, 0.023859074339270592, -0.02088247798383236, -0.02265351451933384, 0.033929936587810516, 0.01018115971237421, -0.04075924679636955, 0.021070091053843498, -0.04401669651269913, -0.0029812504071742296, -0.017456717789173126, -0.0050164177082479, -0.021628854796290398, 0.017383448779582977, 0.011552161537110806, -0.013250559568405151, 0.042091794312000275, -0.07044335454702377, 0.0009060653392225504, -0.003309291321784258, 0.013410739600658417, 0.050526686012744904, -0.000006816700533818221, -0.0013885819353163242 ]
[ -0.07988621294498444, -0.0015463659074157476, -0.04241916909813881, -0.031003721058368683, 0.06142463535070419, -0.025345701724290848, -0.04558684304356575, -0.003993522375822067, 0.007297370117157698, -0.003962952643632889, -0.02100217714905739, -0.05591871961951256, 0.0024886908940970898, 0.007109342608600855, 0.10761747509241104, 0.011883252300322056, 0.0027833229396492243, -0.06175008788704872, -0.009251711890101433, 0.0215589702129364, 0.0016250918852165341, -0.05114929378032684, -0.009174137376248837, -0.03476361930370331, -0.0006984175997786224, 0.027146268635988235, 0.04247589781880379, -0.03922242671251297, 0.02888987772166729, -0.22759398818016052, 0.016362378373742104, -0.03140401840209961, 0.06364116072654724, -0.012484467588365078, -0.0023607963230460882, 0.04927901178598404, -0.007584009785205126, 0.028687264770269394, -0.00380794913507998, 0.05987490713596344, 0.023699067533016205, 0.019640665501356125, -0.0532197430729866, -0.06828106194734573, 0.06239662319421768, 0.0016816220013424754, -0.025757713243365288, -0.011250986717641354, -0.033490847796201706, 0.033124156296253204, -0.04904055967926979, -0.019353700801730156, -0.0005542913568206131, -0.019063688814640045, -0.014536013826727867, 0.018307693302631378, 0.04031413793563843, 0.07796376943588257, 0.008106152527034283, 0.04629562795162201, 0.008380432613193989, -0.012907516211271286, -0.13821333646774292, 0.12189025431871414, -0.017346404492855072, 0.0647067204117775, -0.02503444254398346, 0.024573301896452904, -0.021998930722475052, 0.07925320416688919, 0.0031703521963208914, -0.04697708413004875, 0.00025936347083188593, 0.0253263171762228, 0.032023247331380844, 0.006048411596566439, 0.025394639000296593, 0.043014299124479294, 0.025512050837278366, -0.050779517740011215, -0.041294489055871964, 0.011678374372422695, -0.017078811302781105, -0.03690410405397415, -0.001285251579247415, -0.00023166176106315106, -0.008386846631765366, 0.037682849913835526, -0.04381480813026428, 0.017426878213882446, 0.02286526933312416, -0.007822894491255283, 0.05306418985128403, 0.0018418150721117854, -0.08786075562238693, -0.03546178340911865, -0.004487786442041397, 0.02915951795876026, -0.05193896219134331, 0.41916990280151367, 0.0009980194736272097, -0.021829871460795403, 0.0618501752614975, 0.03415718302130699, 0.017597679048776627, -0.014029134064912796, 0.0018670811550691724, -0.021432481706142426, 0.007702850271016359, -0.015824448317289352, -0.019643470644950867, -0.007786058820784092, 0.04247520491480827, -0.05280713364481926, 0.030806008726358414, 0.021490884944796562, 0.02712146006524563, 0.033361297100782394, -0.033884547650814056, -0.0025618269573897123, -0.008772984147071838, 0.010171711444854736, 0.030468231067061424, -0.017253264784812927, 0.01695600338280201, -0.003792713861912489, 0.04837081953883171, 0.04631086438894272, 0.0553845651447773, 0.014556273818016052, 0.030540039762854576, -0.015920354053378105, -0.08512062579393387, 0.014244548976421356, 0.004690098110586405, -0.004533002153038979, 0.023895611986517906, -0.03821924701333046, -0.0045747822150588036, 0.011763643473386765, 0.013265810906887054, -0.019560230895876884, 0.009952298365533352, 0.009441918693482876, -0.056091394275426865, 0.11927197128534317, -0.0007085933466441929, -0.0393524207174778, -0.03738784044981003, -0.033898431807756424, -0.011312269605696201, 0.023147262632846832, 0.010282782837748528, -0.045151736587285995, 0.03833577781915665, 0.029870187863707542, 0.0955161452293396, -0.03251112625002861, -0.06548036634922028, -0.02323349006474018, -0.021212827414274216, -0.05137503147125244, -0.020899830386042595, 0.0508996807038784, 0.05089063569903374, -0.10812418907880783, -0.027234818786382675, 0.02443518489599228, 0.025950051844120026, -0.09528346359729767, 0.01172998733818531, 0.0050418865866959095, -0.032795727252960205, 0.03143470361828804, 0.04687013849616051, -0.026915665715932846, -0.048019394278526306, 0.012472129426896572, 0.04861633852124214, 0.00397461885586381, 0.01361000444740057, -0.01629086770117283, -0.026064403355121613, 0.013218352571129799, -0.07084222882986069, -0.09409671276807785, -0.030965685844421387, -0.017176128923892975, -0.01980976015329361, 0.0028612702153623104, 0.01235290803015232, -0.009436455555260181, -0.06458915770053864, 0.0786961168050766, -0.02979418635368347, -0.022498035803437233, 0.013508341275155544, 0.0038976166397333145, -0.010512588545680046, -0.020119182765483856, -0.006482820026576519, 0.04560745880007744, -0.018503928557038307, 0.02920365519821644, -0.053408097475767136, 0.03557489812374115, 0.027145346626639366, -0.032685786485672, 0.07225777208805084, 0.022859741002321243, -0.016150573268532753, -0.004000864923000336, -0.026579001918435097, 0.010928132571280003, -0.002630748087540269, -0.007464354392141104, 0.008204848505556583, -0.0007501599611714482, 0.024154815822839737, 0.024275626987218857, -0.059957295656204224, -0.0466405525803566, -0.025355534628033638, -0.36906686425209045, -0.018516531214118004, 0.0053489115089178085, 0.02381991595029831, -0.002032702323049307, -0.07051748782396317, 0.030626555904746056, -0.0005200662999413908, 0.03218800574541092, 0.056303270161151886, 0.07170037925243378, -0.005003847647458315, 0.0018064574105665088, -0.07485126703977585, 0.012905930168926716, 0.03373788297176361, -0.030710577964782715, 0.011788074858486652, -0.02391214296221733, 0.03874649852514267, -0.0012156827142462134, -0.025205006822943687, -0.014885439537465572, -0.036096397787332535, -0.006548509933054447, -0.02047719806432724, 0.10911940038204193, 0.06049536541104317, 0.031725481152534485, -0.053275216370821, 0.06320911645889282, 0.020159799605607986, -0.0067374506033957005, -0.11432787775993347, -0.003008273197337985, -0.01094563864171505, 0.02859981171786785, -0.0031394565012305975, 0.026267996057868004, -0.047494545578956604, -0.07809095084667206, 0.03761338070034981, -0.038639020174741745, -0.066889688372612, -0.03288041055202484, 0.0011177083943039179, -0.035674091428518295, -0.05534468591213226, -0.017987245693802834, 0.05633831024169922, 0.013455700129270554, 0.0036380693782120943, 0.0294908806681633, 0.0373871810734272, -0.04246629774570465, -0.030173268169164658, -0.06463725119829178, -0.009232059121131897, -0.005055767949670553, -0.0053022680804133415, 0.015577113255858421, 0.023746484890580177, 0.034690484404563904, -0.052618607878685, -0.020593121647834778, 0.029635602608323097, 0.01349118072539568, 0.0015976366121321917, 0.018171880394220352, -0.0249020978808403, -0.018698716536164284, 0.10893504321575165, -0.0017118159448727965, 0.02512214332818985, 0.03134265914559364, 0.04508291184902191, -0.009342988021671772, -0.023235823959112167, 0.0019923080690205097, -0.003501485800370574, 0.02100863680243492, 0.01854514889419079, 0.030661236494779587, -0.05334199592471123, -0.006586446892470121, 0.03275318443775177, 0.009488007985055447, -0.028005177155137062, 0.0815519466996193, 0.028865881264209747, 0.013612092472612858, 0.01928572915494442, -0.022056419402360916, -0.049895379692316055, 0.03723260387778282, 0.0057226624339818954, -0.2548571825027466, 0.035896290093660355, 0.058642495423555374, 0.051857586950063705, 0.006658077705651522, 0.007649481296539307, 0.04115510359406471, -0.04717643931508064, -0.014050091616809368, 0.011498896405100822, 0.01700538396835327, 0.041053686290979385, 0.029913445934653282, -0.008972049690783024, 0.02417924255132675, 0.009351778775453568, 0.05350779742002487, 0.018964486196637154, 0.0220843143761158, -0.007320610340684652, -0.006046581082046032, -0.03878523036837578, 0.16167977452278137, 0.010321351699531078, 0.007583114318549633, -0.0031228975858539343, -0.012079461477696896, -0.015391344204545021, 0.07219298183917999, 0.0061684767715632915, -0.03996611759066582, 0.018233343958854675, 0.03629501909017563, 0.013474790379405022, 0.0331571064889431, -0.05933568254113197, -0.022769315168261528, 0.03316802904009819, 0.023152057081460953, 0.0035335831344127655, 0.02824419178068638, -0.009808129630982876, -0.038818661123514175, 0.03869122266769409, 0.021018825471401215, -0.005230865906924009, 0.017265861853957176, -0.006510506849735975, -0.059901852160692215, 0.010736907832324505, -0.03471662849187851, -0.02537313476204872, -0.005032774526625872, -0.0007073855958878994, -0.007359788753092289, 0.07616616785526276, 0.014103585854172707, -0.008215920068323612, 0.00008899629028746858, 0.019356371834874153, -0.015948563814163208, -0.0609612762928009, 0.05844768509268761, 0.021787401288747787, 0.02525513246655464 ]
[ -0.0037040673196315765, 0.012809309177100658, -0.005391842219978571, 0.017695920541882515, 0.010502304881811142, 0.026916811242699623, 0.009139608591794968, 0.03197886794805527, -0.00830273050814867, -0.007137902546674013, -0.010857873596251011, -0.006565447896718979, 0.01850162446498871, -0.013039651326835155, -0.004587781615555286, -0.013339647091925144, -0.00250815087929368, -0.0182789359241724, 0.02936016209423542, -0.0032506848219782114, -0.045839983969926834, 0.062366027384996414, 0.033888623118400574, 0.005020736716687679, -0.0033076482359319925, 0.016566967591643333, -0.060065239667892456, 0.008674814365804195, 0.04954356327652931, -0.10511074960231781, 0.018634000793099403, -0.026176078245043755, 0.0008689831010997295, 0.009209869429469109, 0.002168826060369611, 0.024108687415719032, -0.007961376570165157, -0.022182470187544823, -0.029304716736078262, 0.010748897679150105, 0.0026530937757343054, -0.0004160422831773758, -0.007714450359344482, 0.022519811987876892, -0.007709339261054993, -0.03435131534934044, -0.03362404927611351, -0.005082541611045599, -0.0057708462700247765, -0.0004779523005709052, -0.05874559283256531, -0.004376578144729137, 0.002554925624281168, 0.030521409586071968, -0.0055490476079285145, 0.006543758790940046, -0.02161063253879547, 0.020332887768745422, 0.03530954197049141, 0.0071937269531190395, 0.006243851501494646, -0.020733434706926346, -0.007602082099765539, -0.018021507188677788, -0.012954257428646088, -0.014837807975709438, -0.00872730277478695, 0.03466187044978142, -0.000595094810705632, 0.03434227406978607, -0.014842014759778976, 0.023326219990849495, -0.059195034205913544, -0.02918427623808384, -0.013785718940198421, -0.03947347775101662, 0.00816730223596096, -0.0459841750562191, 0.004140455275774002, -0.00633185263723135, -0.033125266432762146, 0.003804565407335758, 0.03939751163125038, -0.015798289328813553, -0.014726817607879639, -0.04611670598387718, -0.0038035036996006966, 0.01186951994895935, -0.020094484090805054, 0.010769159533083439, -0.028134701773524284, 0.016709445044398308, 0.019548246636986732, 0.0012481105513870716, -0.08121199905872345, 0.010010465048253536, -0.000814423430711031, 0.011724015697836876, -0.005132417660206556, 0.8504975438117981, 0.019267015159130096, 0.009587937965989113, 0.027450747787952423, 0.006582916248589754, -0.010154057294130325, -0.044112302362918854, 0.006590291857719421, -0.007960885763168335, -0.0001536002819193527, -0.02376745082437992, -0.0003236533375456929, 0.01695539616048336, 0.010456202551722527, 0.0016602074028924108, 0.04235750809311867, 0.03323660045862198, 0.004505837336182594, 0.00823773629963398, 0.013616652227938175, 0.03639116883277893, 0.033183276653289795, -0.022797582671046257, 0.019650153815746307, -0.004110842943191528, 0.009342778474092484, -0.1891777664422989, 0.016181379556655884, -6.500317721470196e-33, 0.039333634078502655, -0.008629776537418365, -0.0016334803076460958, 0.005278163123875856, 0.018251357600092888, -0.0009770911419764161, -0.022380314767360687, 0.028139077126979828, -0.013009217567741871, -0.023730652406811714, 0.01877514459192753, -0.00013828229566570371, -0.002988081192597747, -0.012665037997066975, 0.016866786405444145, 0.0021807244047522545, -0.018185433000326157, 0.03668016567826271, -0.01595151238143444, 0.015974843874573708, 0.017558086663484573, 0.023217353969812393, 0.0369294136762619, 0.011767210438847542, -0.024150891229510307, -0.00366475572809577, 0.019750243052840233, -0.02337765134871006, -0.00014458340592682362, -0.03956695646047592, -0.0528639480471611, -0.015073448419570923, -0.00349056301638484, -0.048252422362565994, 0.0014048608718439937, -0.06501805037260056, -0.04665070399641991, -0.006453855894505978, -0.04640978202223778, -0.03644435852766037, -0.014357689768075943, 0.016823777928948402, -0.03763195872306824, -0.034835416823625565, -0.034192413091659546, 0.015205267816781998, 0.017516618594527245, 0.024801062420010567, -0.016839971765875816, 0.037011951208114624, 0.025515161454677582, 0.023693455383181572, -0.007280436344444752, -0.00453351903706789, -0.0006640375941060483, 0.041694026440382004, 0.0185515396296978, -0.0026443854440003633, 0.0047278800047934055, 0.009009801782667637, -0.007761640008538961, -0.024244006723165512, 0.03899949789047241, 0.033007826656103134, 0.006846495904028416, -0.010475477203726768, 0.034472640603780746, 0.003954928368330002, 0.020051846280694008, 0.029831768944859505, -0.053817640990018845, -0.0026337814051657915, -0.026699382811784744, -0.015653828158974648, 0.014640526846051216, -0.028324630111455917, 0.013530021533370018, -0.0040016183629632, 0.009029258973896503, 0.03891738876700401, 0.0011389695573598146, -0.02878435328602791, 0.01030024979263544, -0.05332846939563751, -0.03984564170241356, -0.04215233400464058, 0.02352502942085266, -0.015328580513596535, -0.004778437782078981, 0.020788975059986115, 0.01690959744155407, 0.043441299349069595, 0.014873852021992207, -0.03437605872750282, -0.020105069503188133, 6.931188563608382e-33, 0.007108196150511503, -0.02430087886750698, -0.019845983013510704, -0.030079180374741554, 0.013166133314371109, -0.002930016489699483, 0.03892312943935394, 0.06229332461953163, -0.02915254421532154, 0.011075615882873535, -0.02125004678964615, -0.04679127410054207, -0.03873802721500397, 0.024339573457837105, 0.04828626289963722, -0.015605357475578785, 0.013613606803119183, 0.010420935228466988, 0.014843870885670185, 0.023523403331637383, 0.00532741891220212, 0.0021240697242319584, 0.013378896750509739, 0.05132826790213585, 0.04109205678105354, 0.04889577627182007, -0.008152853697538376, 0.008932813070714474, -0.003930535167455673, 0.00949621107429266, 0.016298478469252586, -0.03407309949398041, -0.025083210319280624, -0.008939525112509727, -0.02149793691933155, 0.020495984703302383, 0.013504434376955032, 0.014043989591300488, -0.009719990193843842, -0.01070456299930811, 0.051783572882413864, 0.03916218504309654, -0.031639888882637024, 0.034858498722314835, -0.000647501670755446, 0.010702843777835369, -0.018003540113568306, 0.01876874454319477, -0.01247384026646614, -0.012364962138235569, -0.006913767196238041, 0.010987578891217709, 0.030415669083595276, -0.005033822264522314, -0.000027400525141274557, -0.022971520200371742, -0.014099580235779285, 0.014749476686120033, -0.03901180252432823, -0.010607916861772537, -0.024874795228242874, -0.024498628452420235, -0.026638081297278404, -0.009305634535849094, -0.013224374502897263, -0.04170507192611694, -0.021110329777002335, -0.010368481278419495, -0.010636730119585991, -0.012922133319079876, -0.008408521302044392, -0.023880481719970703, 0.010074228048324585, 0.06138181313872337, -0.000050332848331891, 0.03439173847436905, 0.006882056128233671, -0.03944620490074158, -0.004123176448047161, 0.0036724808160215616, 0.026033680886030197, 0.033942658454179764, 0.026285212486982346, -0.03904321417212486, 0.008604169823229313, 0.0292094424366951, -0.02312443032860756, 0.0316922664642334, 0.047108374536037445, -0.014264686033129692, 0.015970397740602493, -0.006473743822425604, -0.008178571239113808, 0.0018627687823027372, -0.00020229825167916715, -1.2612998645522566e-8, -0.032947786152362823, -0.012508491054177284, -0.004448706284165382, 0.04018677398562431, -0.009414663538336754, 0.010244003497064114, -0.015459293499588966, -0.01983468234539032, 0.018551692366600037, -0.005055929534137249, 0.04165840521454811, -0.006662924773991108, 0.008521967567503452, 0.039317045360803604, -0.005549584049731493, -0.04827249050140381, 0.007346103433519602, 0.004476761911064386, 0.015945160761475563, 0.0077760061249136925, 0.020047025755047798, 0.05746257305145264, 0.028569193556904793, -0.002447261940687895, -0.010716515593230724, 0.008205415681004524, 0.03970031812787056, -0.05276697129011154, -0.010430539958178997, -0.03235548734664917, 0.012455894611775875, -0.026904387399554253, -0.04059046879410744, -0.005590347107499838, -0.014013233594596386, -0.002532802987843752, 0.03141036257147789, -0.006829324644058943, -0.003094862448051572, 0.004244843032211065, -0.015435515902936459, 0.010600489564239979, -0.009665865451097488, -0.037396520376205444, -0.029438508674502373, -0.018685055896639824, -0.017992865294218063, 0.02862681820988655, 0.05199313908815384, -0.01723591610789299, 0.011145255528390408, -0.04070717841386795, -0.013455754145979881, 0.0201888270676136, 0.033539991825819016, -0.014571458101272583, -0.006227090954780579, -0.0009535374119877815, -0.01278382632881403, -0.011662009172141552, 0.03091984987258911, -0.012623659335076809, -0.003703731345012784, -0.01330506056547165 ]
chroma-index-not-found-create-instance-querying
https://markhneedham.com/blog/2023/06/21/chroma-index-not-found-create-instance-querying
false
2023-06-07 02:44:37
DuckDB/SQL: Pivot - 0 if null
[ "duckdb", "sql", "til" ]
[ "TIL" ]
:icons: font I've been learning all about the https://duckdb.org/docs/sql/statements/pivot.html[PIVOT function^] that was recently added in DuckDB and I ran into an issue where lots of the cells in my post PIVOT table were null values. In this blog post, we'll learn how to replace those nulls with 0s (or indeed any other value). == Setup I'm working with https://github.com/JeffSackmann/tennis_atp[Jeff Sackmann's tennis dataset^], which I loaded by running the following query: [source, sql] ---- CREATE OR REPLACE TABLE matches AS SELECT * FROM read_csv_auto( list_transform( range(1968, 2023), y -> 'https://raw.githubusercontent.com/JeffSackmann/tennis_atp/master/atp_matches_' || y || '.csv' ), types={'winner_seed': 'VARCHAR', 'loser_seed': 'VARCHAR'} ); ---- I then created a view on top of that table that contains matches played by top 10 ranked players in the last few years: [source, sql] ---- CREATE OR REPLACE VIEW top10Players AS FROM matches SELECT winner_name AS player, winner_ioc AS country, surface, datepart('year', tourney_date) AS matchYear, round, count(*) AS matches WHERE matchYear >= 2020 AND tourney_level IN ('G') AND winner_name IN ( from matches select distinct winner_name where winner_rank <=10 AND datepart('year', tourney_date) >= 2020 ) GROUP BY ALL ORDER BY count(*) DESC; ---- Now that we've got that setup, it's time to pivot. == Every day I'm PIVOTing I wrote the following query to show the number of matches won by players from a particular country across a bunch of years. [source, sql] ---- PIVOT top10Players ON matchYear USING SUM(matches) GROUP BY country ORDER BY "2022" DESC; ---- .Output [options="header"] |==================================== | country | 2020 | 2021 | 2022 | 2023 | ESP | 17 | 23 | 41 | 4 | ITA | 11 | 23 | 24 | 3 | RUS | 19 | 29 | 22 | 6 | CAN | 8 | 21 | 15 | 5 | NOR | 4 | 6 | 13 | 1 | SRB | 16 | 27 | 11 | 7 | GRE | 9 | 13 | 10 | 6 | GBR | 2 | 6 | 10 | 2 | USA | 6 | 6 | 8 | 1 | GER | 14 | 17 | 8 | 1 | ARG | 8 | 11 | 7 | 1 | BEL | 5 | | 6 | | DEN | | | 6 | 3 | POL | 2 | 6 | 5 | 3 | FRA | 3 | 4 | 4 | | AUT | 17 | 3 | | | SUI | 5 | 7 | | |==================================== You can see that towards the end of the table we have empty cells. This is because players from those countries didn't win any matches in that time period. We'd usually replace null values using the `coalesce` function, which is exactly what we're going to do here. But what I really like about DuckDB is that it treats the whole PIVOT query as if it was any other sub query or Common Table Expression. i.e. we can include it in a `FROM` clause and then operate on the resulting columns. To make this even cleaner, I'm going to use the `FROM...SELECT` and `SELECT * REPLACE` clauses, described in the https://duckdb.org/2022/05/04/friendlier-sql.html[Friendlier SQL with DuckDB^] blog post. The query is shown below: [source, sql] ---- FROM ( PIVOT top10Players ON matchYear USING SUM(matches) GROUP BY country ORDER BY "2022" DESC ) SELECT * REPLACE( coalesce("2020", 0) AS "2020", coalesce("2021", 0) AS "2021", coalesce("2022", 0) AS "2022", coalesce("2023", 0) AS "2023" ); ---- .Output [options="header"] |==================================== | country | 2020 | 2021 | 2022 | 2023 | ESP | 17 | 23 | 41 | 4 | ITA | 11 | 23 | 24 | 3 | RUS | 19 | 29 | 22 | 6 | CAN | 8 | 21 | 15 | 5 | NOR | 4 | 6 | 13 | 1 | SRB | 16 | 27 | 11 | 7 | GRE | 9 | 13 | 10 | 6 | GBR | 2 | 6 | 10 | 2 | USA | 6 | 6 | 8 | 1 | GER | 14 | 17 | 8 | 1 | ARG | 8 | 11 | 7 | 1 | BEL | 5 | 0 | 6 | 0 | DEN | 0 | 0 | 6 | 3 | POL | 2 | 6 | 5 | 3 | FRA | 3 | 4 | 4 | 0 | AUT | 17 | 3 | 0 | 0 | SUI | 5 | 7 | 0 | 0 |==================================== Our table is now filled with 0s instead of nulls, you love to see it!
In this post we'll learn how to replace null values when using the PIVOT function in DuckDB.
uploads/2023/06/duckdb-pivot-nulls.png
[ -0.033938586711883545, 0.02200792171061039, 0.0012474105460569263, 0.02725651115179062, 0.08129269629716873, 0.02291179820895195, 0.01696508750319481, 0.03075634129345417, -0.035732656717300415, -0.02198231779038906, -0.012565398588776588, -0.029102247208356857, -0.08269060403108597, -0.01343599148094654, -0.006207067985087633, 0.0739985778927803, 0.05764777213335037, 0.010204566642642021, 0.018156463280320168, -0.030468231067061424, 0.01769399456679821, 0.04331996291875839, 0.004457698669284582, 0.0579209141433239, 0.06505205482244492, 0.02376141957938671, 0.017816582694649696, -0.020486701279878616, -0.06163323298096657, 0.01742514967918396, 0.05980562046170235, -0.019082792103290558, -0.0004986500134691596, -0.004450902342796326, 0.0065894778817892075, -0.023299161344766617, 0.003439597086980939, 0.022856425493955612, -0.013081902638077736, 0.0020400702487677336, -0.0721026062965393, -0.002177526941522956, 0.002018810249865055, 0.005782300606369972, 0.01004303339868784, -0.004704905208200216, -0.05161942541599274, 0.028010396286845207, -0.04360082745552063, -0.0028769164346158504, -0.059198372066020966, 0.04940544441342354, -0.006252158433198929, 0.01610592193901539, -0.014881090261042118, 0.02686753310263157, 0.033062148839235306, -0.03209031745791435, 0.0012998321326449513, -0.040582653135061264, 0.037877704948186874, 0.0013375913258641958, 0.005327177233994007, 0.03271425887942314, 0.022344352677464485, 0.009777645580470562, 0.005478001199662685, 0.05516158044338226, -0.035739704966545105, 0.009196212515234947, -0.004328835289925337, -0.047724831849336624, 0.0038965230342000723, -0.023266756907105446, 0.036544185131788254, -0.011289368383586407, -0.023207999765872955, 0.06852420419454575, 0.042620401829481125, 0.03562721982598305, -0.004687512293457985, -0.00903387926518917, 0.006865923758596182, 0.029600854963064194, 0.013364440761506557, -0.06979048997163773, -0.04217963665723801, -0.024961233139038086, -0.050426285713911057, 0.037116535007953644, 0.007277943659573793, -0.020933421328663826, 0.027575785294175148, 0.015317622572183609, -0.010502124205231667, -0.009169178083539009, 0.011963841505348682, 0.005168372765183449, 0.02807461842894554, -0.0055068121291697025, -0.025876596570014954, -0.04116204008460045, 0.07515349239110947, 0.009034969843924046, -0.1013665720820427, 0.005907666403800249, -0.05029130354523659, -0.0025713674258440733, 0.05025031417608261, 0.02427002042531967, -0.041962262243032455, -0.020241860300302505, -0.0033878276590257883, 0.011822314001619816, -0.06708505004644394, 0.07252965122461319, 0.03157328441739082, 0.011865074746310711, 0.022922206670045853, 0.016280217096209526, 0.04171565920114517, -0.008798781782388687, -0.017331279814243317, 0.06451231241226196, -0.0167413167655468, 0.029527124017477036, 0.03802262246608734, 0.05372650548815727, -0.022880414500832558, -0.08550845831632614, -0.01654842123389244, 0.03970256447792053, -0.01133494358509779, 0.016209527850151062, 0.019230015575885773, -0.04813159257173538, -0.022939372807741165, -0.021001312881708145, 0.07007740437984467, 0.004060976207256317, 0.021308036521077156, -0.019242025911808014, 0.004009309224784374, -0.0012398133985698223, 0.035647694021463394, 0.004531169310212135, 0.006596243008971214, -0.03350241854786873, -0.03366504982113838, 0.020647365599870682, 0.05197467282414436, 0.011840860359370708, 0.06492909044027328, -0.039194121956825256, -0.010852937586605549, 0.09842916578054428, 0.013003802858293056, -0.025347843766212463, -0.004336648620665073, 0.029937826097011566, 0.042251523584127426, 0.03108111582696438, 0.006835875101387501, 0.038783811032772064, 0.01906432956457138, -0.02222367189824581, 0.02492920495569706, 0.018723390996456146, -0.04125319793820381, -0.025170505046844482, -0.0425088107585907, -0.051320645958185196, 0.09577852487564087, -0.021039588376879692, -0.008428686298429966, 0.05554686486721039, 0.08785980194807053, 0.006848410237580538, 0.03431211784482002, 0.024057909846305847, -0.08183378726243973, 0.038669243454933167, -0.03795694559812546, -0.002648248802870512, 0.04146791622042656, 0.004614630714058876, 0.06121542304754257, 0.038238681852817535, 0.030049657449126244, 0.06944581121206284, -0.0754895880818367, -0.077117919921875, -0.04320595785975456, -0.013650191947817802, 0.03831078112125397, -0.03947245329618454, 0.0272865891456604, 0.05712383985519409, 0.0182560496032238, 0.007121212314814329, -0.03943442180752754, 0.024574942886829376, 0.030938871204853058, -0.017740655690431595, -0.04853631183505058, 0.02206282690167427, 0.03394037485122681, -0.0032455152831971645, -0.01872875541448593, 0.012068605050444603, -0.03589342534542084, -0.009211449883878231, 0.032452087849378586, -0.006118035409599543, 0.03520827740430832, 0.021309744566679, 0.0005393966566771269, -0.029748177155852318, -0.0028265388682484627, -0.0600668229162693, 0.043349165469408035, 0.05544985085725784, -0.00999919418245554, -0.002022557193413377, -0.007318995427340269, 0.13006065785884857, 0.06446035206317902, -0.020948220044374466, -0.04837547242641449, 0.05789824575185776, 0.0164184607565403, 0.011932802386581898, 0.05977834388613701, -0.050144877284765244, 0.0025062966160476208, -0.020304398611187935, -0.0075029549188911915, -0.021858343854546547, 0.02395952120423317, -0.012229668907821178, 0.012785353697836399, 0.048844508826732635, -0.006921207997947931, 0.04073270037770271, 0.02218596078455448, -0.04498278349637985, -0.035722654312849045, -0.014911497011780739, -0.03115019202232361, 0.0004769202205352485, 0.030900487676262856, -0.004125175066292286, 0.019703373312950134, -0.04603799805045128, 0.02200581319630146, -0.00666020205244422, -0.05727957561612129, 0.024067291989922523, 0.03036179393529892, 0.044354844838380814, -0.02668857015669346, 0.027959061786532402, -0.008244644850492477, -0.02577616460621357, -0.02829337678849697, -0.03353416174650192, -0.03630588576197624, 0.013028807938098907, 0.010444428771734238, -0.001677356194704771, 0.023775281384587288, -0.012609053403139114, -0.03624644875526428, -0.009916470386087894, -0.0149522814899683, 0.013392784632742405, -0.004973611328750849, -0.015681609511375427, -0.034498780965805054, -0.04029102250933647, -0.004456556402146816, 0.05272809416055679, -0.06769922375679016, -0.057313453406095505, 0.01606108248233795, -0.04321178048849106, 0.034371137619018555, -0.020343270152807236, -0.03503567725419998, 0.02402038872241974, 0.013700135052204132, 0.01932561583817005, -0.008477991446852684, -0.0015270081348717213, 0.10429321229457855, 0.012651958502829075, 0.010648294351994991, 0.01721469685435295, 0.003991629928350449, 0.04768957197666168, 0.024869466200470924, -0.009549862705171108, 0.06710038334131241, -0.028859132900834084, -0.005556032992899418, -0.02476799301803112, -0.0034808400087058544, 0.0009370479383505881, -0.2532636225223541, 0.019116679206490517, -0.02016545459628105, -0.02853371948003769, 0.011287198401987553, -0.05460868775844574, 0.0191707331687212, -0.013049342669546604, -0.04360806196928024, 0.03044704906642437, 0.012589013203978539, -0.026352759450674057, -0.02752521075308323, 0.027908392250537872, 0.0030151326209306717, 0.006734142079949379, 0.03114927187561989, -0.047155894339084625, 0.007457391358911991, 0.051592905074357986, 0.014562927186489105, -0.0628473088145256, 0.029600949957966805, 0.02498633973300457, 0.030808310955762863, 0.0733715072274208, -0.08203345537185669, 0.010489500127732754, -0.04800580441951752, -0.033021148294210434, -0.010468272492289543, 0.0054784310050308704, -0.009133684448897839, -0.017249206081032753, 0.003916838206350803, -0.017380403354763985, 0.015561246313154697, 0.011721931397914886, 0.02163696475327015, 0.04310670867562294, -0.03967931494116783, -0.03133083134889603, 0.008579694665968418, 0.03460068255662918, 0.098121777176857, 0.009139311499893665, -0.05946480110287666, 0.018411075696349144, -0.032516106963157654, 0.046569764614105225, -0.03831023350358009, -0.017173409461975098, -0.008402041159570217, 0.03360246494412422, 0.00039731766446493566, -0.008235445246100426, -0.014764192514121532, 0.002078456338495016, -0.049201849848032, -0.036402542144060135, 0.022442573681473732, -0.022588705644011497, -0.01675545983016491, -0.02046516351401806, -0.004856667015701532, -0.09001918137073517, -0.047759633511304855, -0.0003736108192242682, 0.07331803441047668, 0.06594409048557281, -0.028288351371884346, -0.0014384990790858865, -0.020454013720154762, -0.1034977063536644, -0.011458552442491055, -0.02916785329580307, 0.020732028409838676, -0.000166697587701492, -0.08463894575834274, 0.022684715688228607, -0.008873986080288887, -0.028116559609770775, 0.020454512909054756, 0.04956571012735367, 0.006357780657708645, -0.04772749915719032, -0.006479454692453146, 0.021636268123984337, -0.020317958667874336, 0.0003996357263531536, 0.08031414449214935, -0.05733482912182808, 0.009574662894010544, 0.0033090454526245594, -0.03583557903766632, 0.0325390063226223, -0.002136763883754611, -0.022261967882514, 0.012486317194998264, -0.014466512948274612, 0.03492448851466179, -0.039434920996427536, 0.0029423858504742384, -0.03753213584423065, -0.03489061817526817, -0.013862475752830505, -0.029124276712536812, 0.027774974703788757, -0.0044717867858707905, 0.029920820146799088, 0.009651060216128826, -0.023564863950014114, -0.0018823143327608705, -0.07244186103343964, -0.027569936588406563, -0.015800904482603073, 0.005546771455556154, -0.0062710875645279884, -0.0012944700429216027, -0.013796832412481308, -0.041766662150621414, 0.022921673953533173, -0.009441884234547615, -0.016415055841207504, -0.059645652770996094, -0.018248731270432472, -0.007730846758931875, -0.010917489416897297, 0.0027470297645777464, 0.0013864049687981606, -0.0022013187408447266, 0.030375858768820763, 0.020162049680948257, -0.007149695418775082, 0.03990006819367409, 0.014851031824946404, -0.018395306542515755, -0.01944953203201294, 0.004075879696756601, -0.006121831946074963, 0.01764075830578804, -0.02194969542324543, 0.007688138633966446, 0.02410886436700821, 0.02530461922287941, -0.006189948413521051, -0.009150154888629913, -0.01421366911381483, 0.014747564680874348, 0.048163749277591705, -0.00912045780569315, -0.03528447821736336, 0.02662864699959755, -0.04282744228839874, -0.032756246626377106, -0.04202917218208313, 0.03763943538069725, -0.022367483004927635, -0.0212786253541708, -0.05228283628821373, -0.018605489283800125, -0.031289130449295044, -0.015865731984376907, -0.011660316027700901, 0.007173643913120031, 0.044752154499292374, 0.044111218303442, 0.04161854460835457, -0.003040639916434884, 0.0033337404020130634, -0.014484567567706108, -0.030826179310679436, -0.040496814996004105, -0.006010560318827629, -0.03267601504921913, -0.03724989295005798, 0.04490182548761368, 0.007453791797161102, -0.003689347067847848, -0.011775304563343525, 0.00040932008414529264, -0.01698054000735283, 0.02344219572842121, 0.0438690185546875, 0.03480222076177597, 0.047637857496738434, -0.0021414272487163544, -0.0332782082259655, 0.00414190161973238, -0.07060938328504562, -0.021513277664780617, -0.04930706322193146, -0.006055221892893314, -0.020363688468933105, -0.04979940131306648, -0.04977427423000336, 0.010528890416026115, 0.042890097945928574, -0.003584281774237752, 0.036621954292058945, -0.022377198562026024, -0.032794371247291565, -0.02699630707502365, 0.04260672628879547, 0.07063663005828857, -0.06909749656915665, -0.002482997952029109, -0.0031816144473850727, -0.015363220125436783, -0.009743734262883663, 0.03447330743074417, -0.03655194491147995, -0.015644673258066177, -0.0030957236886024475, 0.04185890778899193, -0.00816638395190239, 0.038666512817144394, -0.027327431365847588, -0.02033402770757675, -0.0004474332381505519, 0.034608714282512665, 0.0032784335780888796, 0.005664144642651081, -0.017550058662891388, -0.004523706156760454, 0.014284520410001278, -0.02112620137631893, -0.020809387788176537, 0.03324957191944122, -0.01503704208880663, 0.007385639939457178, -0.017013760283589363, 0.02678683027625084, 0.01134008914232254, -0.0031402769964188337, -0.05043737590312958, -0.07196971774101257, 0.0017847494455054402, -0.00023064957349561155, 0.04216569662094116, -0.021685201674699783, -0.030156636610627174, 0.002403233665972948, -0.0027914438396692276, -0.028180943801999092, -0.02301926352083683, 0.006442762911319733, -0.04942496120929718, 0.07605690509080887, 0.0521516427397728, 0.025817595422267914, 0.022735582664608955, -0.00432802876457572, -0.026034021750092506, 0.06000629439949989, 0.004930134862661362, -0.027586832642555237, -0.01843004673719406, -0.05024127662181854, 0.026788411661982536, -0.020122727379202843, 0.04639111086726189, -0.04596506431698799, 0.049422554671764374, 0.036226168274879456, 0.01193257700651884, 0.03961746767163277, 0.001332614803686738, 0.04035558924078941, -0.022328916937112808, -0.027147425338625908, -0.08970558643341064, -0.009129566140472889, 0.0012452263617888093, -0.008456271141767502, -0.012568691745400429, 0.006085393484681845, -0.019533049315214157, -0.009098238311707973, -0.06681440025568008, -0.02281208522617817, 0.04246525093913078, 0.031435705721378326, 0.018266133964061737, 0.03559122234582901, -0.041707251220941544, 0.006063033826649189, 0.04245224595069885, 0.002016889862716198, -0.03197775408625603, -0.017263252288103104, 0.07976967841386795, 0.0017248132498934865, 0.026438778266310692, -0.050657790154218674, -0.003438433399423957, 0.06236444041132927, 0.040756408125162125, 0.017515987157821655, 0.04508358985185623, -0.029134521260857582, 0.041482482105493546, 0.019378626719117165, 0.00467302929610014, -0.025585664436221123, 0.021509867161512375, -0.036783769726753235, -0.05315306410193443, -0.02096663974225521, 0.04173353314399719, -0.003827909706160426, -0.08932805806398392, 0.0767204612493515, -0.015533235855400562, -0.021915124729275703, -0.05536598712205887, -0.012805375270545483, -0.017389193177223206, -0.0036410579923540354, -0.021988267078995705, -0.0009461548761464655, -0.05178064480423927, 0.06992118805646896, -0.005169032607227564, 0.004452524706721306, 0.04443592205643654, 0.03537885099649429, -0.017009187489748, -0.0021610353142023087, 0.07151412218809128, 0.10305988043546677, 0.03437712416052818, -0.012265932746231556, 0.04631073400378227, -0.0188321340829134, -0.046118833124637604, -0.009759998880326748, -0.029449740424752235, -0.028847666457295418, -0.025374138727784157, 0.0010407068766653538, 0.0975455790758133, -0.007458072155714035, 0.05611118674278259, 0.015040354803204536, -0.022867491468787193, -0.012981566600501537, -0.034841664135456085, 0.04054911062121391, 0.05213367938995361, -0.026055896654725075, 0.02439362183213234, 0.012697411701083183, 0.0010304511524736881, 0.030437223613262177, 0.01602468267083168, -0.008471909910440445, 0.0018797862576320767, -0.031305860728025436, 0.015067465603351593, -0.013754908926784992, 0.01702841930091381, 0.04827814921736717, -0.010734295472502708, 0.004183897748589516, 0.005268015433102846, 0.03191376477479935, -0.003547184867784381, 0.007913738489151001, -0.004026541952043772, -0.03040410205721855, -0.008988998830318451, -0.02338578552007675, -0.015582402236759663, -0.027273863554000854, -0.028143133968114853, 0.012790611013770103, -0.003730577416718006, 0.008292101323604584, 0.06580895930528641, -0.018365958705544472, -0.045082397758960724, -0.06454309076070786, -0.03396792337298393, -0.059343140572309494, -0.1047186627984047, -0.03206224367022514, 0.014013715088367462, -0.031195152550935745, -0.03622600436210632, -0.009736666455864906, -0.03785690665245056, -0.02166791260242462, 0.010955208912491798, -0.0234933290630579, -0.04971432313323021, 0.0003411976795177907, 0.02656460739672184, 0.027231533080339432, 0.02063043974339962, 0.04615529626607895, 0.007801817264407873, -0.028291089460253716, -0.008416430093348026, -0.003225971246138215, 0.041784096509218216, -0.007874349132180214, 0.006203442346304655, -0.04091760888695717, 0.032842691987752914, 0.010285702534019947, -0.01076796930283308, -0.07430959492921829, 0.036624521017074585, 0.042972464114427567, -0.007847731001675129, 0.05871627479791641, -0.014451732859015465, 0.00813269428908825, -0.02691442333161831, -0.00048710036207921803, -0.008148279041051865, 0.009670518338680267, 0.057736460119485855, -0.060557495802640915, 0.04796604812145233, 0.034779101610183716, -0.006913441698998213, -0.009044467471539974, 0.00008630759839434177, -0.02586924284696579, 0.01081375777721405, -0.030046917498111725, -0.02546088397502899, -0.06229650229215622, -0.08336818963289261, -0.018135610967874527, 0.012762332335114479, -0.03907402232289314, -0.015946751460433006, -0.04393908753991127, 0.04878702387213707, -0.01483598630875349, 0.031817082315683365, -0.038987837731838226, 0.03244612365961075, -0.04953646659851074, -0.017291981726884842, -0.04659927263855934, 0.03433141112327576, -0.01783706434071064, 0.011327692307531834, 0.04773513972759247, -0.061542823910713196, 0.016852671280503273, -0.012638097628951073, 0.01378714106976986, 0.017165319994091988, -0.009839583188295364, 0.02854081615805626 ]
[ -0.07014202326536179, -0.04056709632277489, -0.04090992361307144, -0.06047484278678894, 0.016290821135044098, -0.0038788048550486565, 0.0023607739713042974, -0.009748240932822227, 0.06554365158081055, 0.035657644271850586, 0.01582728885114193, -0.07784882187843323, 0.035854823887348175, 0.001831708592362702, -0.018952611833810806, -0.044625602662563324, -0.027675742283463478, -0.0184981357306242, -0.04380619898438454, 0.059689201414585114, -0.07266321033239365, -0.0507625974714756, -0.049591850489377975, -0.0064110043458640575, 0.047862451523542404, 0.014127766713500023, 0.03846367821097374, -0.04575975239276886, -0.021699251607060432, -0.23665764927864075, -0.006074394565075636, -0.047802481800317764, 0.0018610336119309068, 0.01505648996680975, 0.027895038947463036, -0.019625462591648102, 0.048220351338386536, -0.0063596731051802635, 0.028078358620405197, 0.021181320771574974, 0.003113764338195324, -0.00878643337637186, -0.04767675697803497, 0.009833087213337421, 0.04803552106022835, 0.0061746505089104176, -0.011400580406188965, -0.018856776878237724, 0.018748296424746513, 0.00942210666835308, -0.022543881088495255, 0.0354071781039238, -0.05008183419704437, 0.02228301577270031, 0.001961840083822608, 0.05085356533527374, 0.03685853257775307, 0.06606674939393997, 0.0006849686033092439, -0.016567017883062363, 0.05691499635577202, 0.012430854141712189, -0.15071198344230652, 0.10799223184585571, -0.0037961588241159916, 0.06687890738248825, 0.0026547901798039675, 0.0023215850815176964, -0.022181233391165733, 0.06395196914672852, -0.0016238151583820581, -0.04108261689543724, -0.007398356683552265, 0.05484023690223694, 0.018890423700213432, -0.045715879648923874, -0.04867136850953102, 0.014090039767324924, 0.02201068587601185, -0.007690872065722942, -0.06286559998989105, -0.0070448680780828, -0.03779736906290054, -0.029013285413384438, -0.030277064070105553, 0.01008268166333437, 0.00426117517054081, -0.016567975282669067, 0.00455682585015893, 0.008244328200817108, 0.0447438545525074, 0.04588305950164795, 0.03889593854546547, 0.04825587198138237, -0.07618334144353867, 0.009494146332144737, 0.008757565170526505, -0.0036386302672326565, 0.011960450559854507, 0.4012838900089264, -0.020602447912096977, 0.012939056381583214, -0.039351001381874084, 0.013579879887402058, -0.037683453410863876, -0.034034889191389084, 0.02312183566391468, -0.024403434246778488, -0.030598746612668037, 0.006864793598651886, -0.023242266848683357, -0.0430261492729187, 0.06408466398715973, -0.05727384239435196, -0.011103106662631035, 0.01709234155714512, 0.009610150940716267, 0.047036685049533844, -0.008605679497122765, 0.008739238604903221, -0.01446598581969738, -0.019438130781054497, 0.031853511929512024, 0.002357258228585124, 0.026339806616306305, 0.03519197925925255, 0.0004333764663897455, 0.10468437522649765, 0.06546737998723984, -0.020778194069862366, 0.08187956362962723, -0.0025094770826399326, -0.09410137683153152, 0.011581980623304844, 0.030370794236660004, 0.008207814767956734, -0.023893143981695175, -0.006394022144377232, 0.014113903976976871, -0.00022921185882296413, -0.011064023710787296, -0.081407330930233, 0.08710794895887375, -0.015211193822324276, -0.059101663529872894, 0.13101908564567566, -0.040161874145269394, -0.029783494770526886, -0.045494601130485535, -0.03654606267809868, -0.010106158442795277, -0.02208940126001835, -0.014927680604159832, -0.019415823742747307, -0.03302134945988655, 0.04691493138670921, 0.04649156704545021, -0.0038565616123378277, -0.09824613481760025, -0.07038471847772598, -0.05039229989051819, -0.037674639374017715, -0.04208831489086151, 0.049195561558008194, 0.08105278760194778, -0.10708636790513992, -0.03367798030376434, -0.008612066507339478, -0.035538166761398315, -0.026819301769137383, 0.024331841617822647, -0.0289410799741745, -0.06762884557247162, 0.01002019178122282, 0.0665196105837822, 0.02239646203815937, 0.017728155478835106, -0.04055137187242508, 0.04744679480791092, 0.01391282957047224, 0.01816849783062935, -0.007718140725046396, -0.02103990688920021, -0.0004869963158853352, -0.040241509675979614, -0.03879125788807869, -0.07735564559698105, 0.014049102552235126, 0.03368700295686722, -0.036535825580358505, -0.046677619218826294, -0.06627319753170013, -0.10158390551805496, 0.07049818336963654, -0.02266467548906803, -0.037293486297130585, 0.020442254841327667, -0.007088294718414545, 0.05589558929204941, -0.03135531768202782, -0.03355815261602402, 0.01871182955801487, 0.004411735571920872, -0.006207700353115797, 0.0021323610562831163, 0.014353910461068153, 0.043863870203495026, -0.06162898615002632, 0.0761319026350975, 0.023048503324389458, -0.04822738096117973, 0.029880056157708168, -0.05939710885286331, -0.007588396314531565, -0.00798678956925869, -0.03221675008535385, -0.011418801732361317, -0.017326831817626953, 0.015450396575033665, -0.012916670180857182, 0.0006236944464035332, 0.02066037617623806, -0.010283290408551693, -0.3420645594596863, -0.014173977077007294, -0.049504052847623825, -0.010161245241761208, 0.0284163486212492, -0.013952209614217281, -0.028248954564332962, -0.018527843058109283, 0.03380557522177696, 0.05899490788578987, 0.05162830278277397, -0.025782061740756035, -0.009644565172493458, -0.058881279081106186, -0.011266469955444336, 0.030580466613173485, -0.03584848716855049, -0.0014047948643565178, -0.013119648210704327, 0.004769367631524801, 0.06693921238183975, -0.01011495292186737, -0.008905647322535515, -0.08651234954595566, 0.053945668041706085, 0.011575755663216114, 0.09333548694849014, 0.04974961280822754, 0.01539900153875351, -0.05115824565291405, 0.08183040469884872, 0.022709079086780548, -0.022279683500528336, -0.005990371108055115, 0.06653031706809998, -0.009808389469981194, -0.00951639749109745, -0.007381503004580736, 0.01570264622569084, -0.015950916334986687, -0.033888574689626694, -0.03494508937001228, -0.004183650016784668, -0.06653086096048355, 0.011179677210748196, -0.010617728345096111, 0.021862788125872612, -0.005762653425335884, -0.031232036650180817, 0.08442632108926773, 0.03226059675216675, -0.008677623234689236, 0.04610705375671387, 0.0006585493101738393, 0.02691754698753357, -0.03971942886710167, -0.03178597241640091, -0.005112758371978998, 0.0021982991602271795, 0.005400232970714569, 0.032777417451143265, 0.009796230122447014, 0.04914939031004906, -0.001157511374913156, -0.04058359935879707, 0.013343608006834984, 0.016394298523664474, -0.0014409874565899372, 0.003087249817326665, -0.024520650506019592, -0.05206696316599846, 0.031088650226593018, 0.014166007749736309, 0.06631290912628174, 0.04905594512820244, 0.05801018700003624, -0.006802404765039682, 0.034062616527080536, 0.030202671885490417, 0.003268538974225521, 0.006304878741502762, -0.06418180465698242, 0.08505463600158691, 0.00540259201079607, 0.03429746627807617, 0.08178744465112686, 0.033834200352430344, -0.0019575944170355797, 0.0534835085272789, 0.023896370083093643, -0.007667718920856714, -0.015085713006556034, -0.02613893896341324, 0.0073455022647976875, 0.031545236706733704, -0.012879152782261372, -0.22935821115970612, 0.01462782733142376, 0.04234791919589043, 0.042065005749464035, 0.06753485649824142, -0.02402556873857975, 0.03473446145653725, -0.027491264045238495, -0.033703241497278214, 0.0055373720824718475, 0.019860193133354187, 0.0001886713580461219, 0.015844225883483887, -0.014130963943898678, -0.018724044784903526, -0.02384653128683567, 0.010506286285817623, -0.003836209187284112, 0.03828420862555504, 0.005056741181761026, 0.0714426264166832, -0.018859073519706726, 0.1694841831922531, 0.03242584690451622, 0.03390085697174072, 0.02405404858291149, 0.01559564657509327, -0.0254766084253788, 0.07090693712234497, 0.028766412287950516, -0.02341664396226406, 0.00837781187146902, 0.07573939114809036, 0.029908915981650352, 0.021368680521845818, 0.007262689992785454, -0.04056306555867195, 0.059007931500673294, -0.03005063533782959, -0.04359012842178345, -0.016573797911405563, 0.02388394996523857, -0.011386305093765259, 0.039008643478155136, 0.0809720903635025, -0.008409373462200165, -0.009483423084020615, -0.037630293518304825, 0.004610219970345497, 0.009127291850745678, -0.03555063530802727, -0.02362835220992565, -0.013886493630707264, -0.03948500379920006, -0.003411770099774003, -0.006604407448321581, 0.007213461212813854, -0.013659155927598476, 0.056180793792009354, 0.029411189258098602, 0.02365809865295887, -0.02822670340538025, 0.03694011643528938, 0.031937774270772934, -0.007722978945821524 ]
[ 0.002140064025297761, 0.04478444531559944, 0.010569557547569275, -0.000834992213640362, -0.019149167463183403, 0.06458466500043869, 0.014819405972957611, 0.006745355669409037, -0.0235673226416111, -0.010058489628136158, -0.03157413750886917, -0.014555472880601883, 0.04472737014293671, -0.007741942070424557, -0.001362709212116897, -0.012429877184331417, -0.012957312166690826, -0.02349109761416912, 0.04202359914779663, -0.004517421592026949, -0.02853054739534855, 0.004142474848777056, 0.017878903076052666, 0.0000520973298989702, -0.03334714472293854, 0.0005564367165789008, -0.04600029066205025, 0.029372578486800194, 0.002609158866107464, -0.08970056474208832, -0.061001330614089966, -0.03456741198897362, -0.009912311099469662, 0.03019575960934162, -0.03621723875403404, -0.06127839535474777, -0.02836863324046135, 0.024137122556567192, 0.01840975694358349, 0.013822795823216438, 0.021055804565548897, -0.03275319188833237, 0.004842863883823156, 0.024522311985492706, 0.005291337613016367, 0.004946860484778881, -0.028993740677833557, 0.027432268485426903, 0.0004366849025245756, 0.008035926148295403, -0.04955080896615982, -0.019762082025408745, 0.010835295543074608, -0.014621591195464134, 0.0610065832734108, 0.004418819211423397, -0.021874532103538513, 0.0035868333652615547, -0.01529893558472395, -0.04162411391735077, 0.013260524719953537, -0.006135637406259775, -0.04370813071727753, -0.013968554325401783, -0.02224572002887726, -0.0449494794011116, -0.02309323474764824, 0.01182022038847208, -0.013591735623776913, 0.012440257705748081, 0.014863482676446438, -0.007459823042154312, -0.03894643485546112, -0.017164098098874092, -0.04711822047829628, 0.035298414528369904, -0.031612955033779144, -0.02619531750679016, 0.034040000289678574, 0.020991701632738113, -0.04872479289770126, 0.008034611120820045, -0.00480167381465435, -0.015348035842180252, 0.014006329700350761, -0.05712452158331871, 0.034254416823387146, 0.0037051853723824024, 0.000021427518731798045, 0.009877324104309082, -0.04853476583957672, 0.03149103745818138, 0.030212527140975, 0.03717535361647606, -0.10969653725624084, 0.03173087164759636, 0.013875444419682026, -0.006027009803801775, -0.007241278886795044, 0.8288378119468689, 0.0024380432441830635, 0.0103443693369627, -0.002847080584615469, -0.0041127330623567104, -0.03544897958636284, 0.0168807040899992, 0.015243597328662872, -0.001763505395501852, -0.00003531315451255068, -0.03760964423418045, -0.0032458705827593803, 0.03605121746659279, 0.004375645890831947, 0.0030290696304291487, -0.03725266084074974, 0.06290767341852188, -0.004992134403437376, 0.0028994553722441196, -0.007322571240365505, -0.0029872755985707045, 0.007776452228426933, -0.011161107569932938, -0.008717412129044533, 0.023210160434246063, 0.017506293952465057, -0.13869792222976685, 0.0061001284047961235, -6.605476711410789e-33, 0.016747260466217995, -0.048405442386865616, 0.027300557121634483, -0.010868621058762074, 0.00006094663331168704, 0.004562050569802523, -0.01108073815703392, -0.02416379004716873, -0.006584132090210915, -0.049430835992097855, 0.023119769990444183, 0.020367419347167015, -0.012278426438570023, -0.017323441803455353, 0.052474696189165115, -0.0013912207214161754, 0.0033392496407032013, 0.03254169598221779, 0.00907052680850029, -0.020752092823386192, 0.02491920441389084, 0.029818065464496613, 0.03359328582882881, 0.01446464005857706, 0.01797567866742611, 0.06157747283577919, -0.0378812775015831, -0.04137052223086357, -0.028890805318951607, -0.041880588978528976, -0.02861196920275688, -0.009504872374236584, -0.01285009365528822, -0.04664898291230202, 0.012386485002934933, -0.05739574879407883, 0.01688401959836483, -0.009342352859675884, -0.020011160522699356, 0.01446476299315691, -0.05301014706492424, -0.03603144362568855, -0.015582902356982231, -0.0325804203748703, 0.00458937231451273, 0.00317383068613708, 0.02495008520781994, 0.032490074634552, -0.029070572927594185, 0.017756976187229156, 0.027881784364581108, -0.01544226799160242, 0.01629461720585823, 0.0032913784962147474, -0.001714175334200263, 0.0249988604336977, -0.00251752813346684, 0.003944227006286383, -0.009538953192532063, -0.027791965752840042, 0.053270239382982254, -0.020635385066270828, 0.033922236412763596, 0.013357332907617092, 0.015287678688764572, 0.04746013134717941, 0.0180561114102602, -0.015262843109667301, 0.04312931001186371, -0.020444443449378014, -0.004026411566883326, 0.00817599706351757, 0.004561918787658215, -0.01812000572681427, 0.058117616921663284, -0.00024715292965993285, 0.05047750100493431, -0.02318410761654377, 0.005057971458882093, 0.01953868381679058, 0.05540838465094566, 0.006556684151291847, -0.031885676085948944, -0.026787418872117996, -0.04738733917474747, -0.018937742337584496, 0.04780900850892067, 0.0252829696983099, 0.002163778757676482, 0.0039058662950992584, 0.02249223366379738, 0.009408469311892986, 0.01488412544131279, -0.02281899005174637, -0.025135314092040062, 6.26406980557781e-33, -0.003315192414447665, -0.01086141262203455, -0.00685459328815341, -0.02601141668856144, 0.06312245875597, -0.03018490970134735, 0.05888595059514046, 0.011501544155180454, 0.001921927323564887, 0.018191318958997726, -0.026388639584183693, -0.03156804293394089, 0.01256567146629095, 0.039785709232091904, 0.026554562151432037, 0.04037430137395859, 0.014978425577282906, 0.015432788990437984, -0.03734777122735977, 0.01784753054380417, 0.008131803013384342, 0.04284294694662094, 0.0025817060377448797, 0.039094239473342896, 0.006104022730141878, 0.029369980096817017, -0.0052282256074249744, -0.009703263640403748, -0.010830940678715706, 0.03977447375655174, 0.01539763156324625, -0.018682701513171196, -0.01959231123328209, -0.001400195644237101, -0.049368537962436676, 0.03463202342391014, 0.023294968530535698, -0.014011270366609097, 0.012517946772277355, 0.014901150949299335, 0.018707143142819405, -0.020089605823159218, -0.008228674530982971, 0.046105191111564636, 0.008485624566674232, -0.0002119690179824829, -0.007851039990782738, 0.00872042402625084, -0.023721272125840187, -0.02210933342576027, 0.006076070014387369, 0.03379056975245476, -0.011405529454350471, 0.021540723741054535, 0.02837299555540085, -0.014066560193896294, -0.017519179731607437, 0.02803960256278515, -0.019264107570052147, -0.04530283063650131, -0.06851475685834885, -0.0010691233910620213, -0.05134525150060654, 0.018008532002568245, 0.013236384838819504, 0.025194376707077026, -0.05073491856455803, -0.01202041283249855, -0.007942908443510532, -0.011441295966506004, -0.018813326954841614, -0.01777043752372265, -0.009587332606315613, 0.03660009428858757, 0.017914043739438057, 0.05162952467799187, -0.029205206781625748, 0.037709012627601624, -0.007956634275615215, 0.04179507866501808, 0.017016980797052383, -0.04117385670542717, -0.0045797936618328094, -0.011125694960355759, -0.0020994057413190603, 0.026723172515630722, -0.05114016309380531, -0.04319700598716736, 0.011859959922730923, 0.007056505884975195, 0.013228675350546837, -0.05377452075481415, -0.0017687638755887747, 0.01602509431540966, 0.0009644266101531684, -1.229118229417736e-8, -0.012782743200659752, 0.026652008295059204, -0.012374158017337322, 0.03486422449350357, 0.01788979582488537, 0.003654888831079006, -0.012254374101758003, -0.023117681965231895, 0.020979514345526695, 0.015026464127004147, 0.04129386693239212, -0.013306785374879837, 0.04128703847527504, 0.023788778111338615, 0.01522054709494114, 0.007118116598576307, -0.007027567829936743, 0.007496978156268597, 0.007992391474545002, -0.005200116895139217, -0.047879647463560104, 0.04089333117008209, -0.05745423585176468, -0.008677788078784943, -0.0030207911040633917, -0.00787193700671196, 0.009906409308314323, -0.07413778454065323, -0.011100919917225838, -0.004631499759852886, 0.052258964627981186, -0.011361084878444672, -0.04257390648126602, -0.004319947212934494, -0.021851038560271263, -0.024668052792549133, 0.038768138736486435, 0.00452612666413188, 0.01318638026714325, 0.015911756083369255, -0.04545428976416588, -0.0027113391552120447, -0.03667682409286499, -0.01514347456395626, -0.03640950843691826, 0.0020766952075064182, -0.011187742464244366, -0.0014275069115683436, 0.015574398450553417, -0.06093631312251091, 0.011970884166657925, -0.007010491564869881, -0.023217735812067986, -0.003868684871122241, -0.0023739319294691086, 0.03559209406375885, 0.03945370018482208, 0.028667213395237923, -0.007716017309576273, -0.005995249841362238, 0.010249659419059753, 0.01774682104587555, 0.007834860123693943, -0.011363799683749676 ]
duckdb-sql-pivot-0-if-null
https://markhneedham.com/blog/2023/06/07/duckdb-sql-pivot-0-if-null
false
2023-06-30 04:44:37
Detecting and splitting scenes in a video
[ "video-editing", "til" ]
[ "TIL" ]
When editing videos for my YouTube channel, https://www.youtube.com/@learndatawithmark[Learn Data with Mark^], I spend a bunch of time each week chopping up a screencast into scenes that I then line up with a separately recorded voice-over. I was curious whether I could automate the chopping-up process and that's what we're going to explore in this blog post. I started out by asking ChatGPT the following question: .ChatGPT Prompt [source, text] ---- I want to chop up a demo for a YouTube video into smaller segments. Ideally, I want to do the cuts when the screen is cleared. Is there a Python library that will let me iterate over a video file and detect changes between frames? ---- ChatGPT pointed me to a library called https://www.scenedetect.com/cli[PySceneDetect^] and that's where our adventure begins. If you want to try this out yourself, I've created the following Poetry file containing all the dependencies that I used: .pyproject.toml [source, yml] ---- [tool.poetry] name = "scene-detection" version = "0.1.0" description = "" authors = ["Mark Needham <m.h.needham@gmail.com>"] readme = "README.md" packages = [{include = "scene_detection"}] [tool.poetry.dependencies] python = "^3.11" opencv-python-headless = "^4.7.0.72" scikit-image = "^0.21.0" scenedetect = "^0.6.1" pandas = "^2.0.3" matplotlib = "^3.7.1" plotly = "^5.15.0" kaleido = "0.2.1" [build-system] requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" ---- If you create that file in a directory locally, you can install everything by running this command: [source, bash] ---- poetry install ---- You should now have a command line tool called `scenedetect`. After trying a few command that didn't seem to do anything, I came across an example that computes the difference between adjacent frames (`detect-content`): [source, bash] ---- scenedetect --input BetterSQL-Demo.mp4 \ -s better-sql.stats-detectcontent.csv \ detect-content \ list-scenes ---- It writes those differences to `better-sql.stats-detectcontent.csv` and then I use the `list-scenes` command to output the detected scenes. The output is shown below: .Truncated Output [source, text] ---- [PySceneDetect] Scene List: ----------------------------------------------------------------------- | Scene # | Start Frame | Start Time | End Frame | End Time | ----------------------------------------------------------------------- | 1 | 1 | 00:00:00.000 | 7101 | 00:01:58.350 | ----------------------------------------------------------------------- ---- It's only detected one scene, which isn't quite right. There are quite a few transitions in the video where I got from one code example to a blank screen and I want each of those to be a new scene. Let's have a look at the first few lines of the CSV file: [source, bash] ---- head -n5 better-sql.stats-detectcontent.csv ---- .The first few lines of `better-sql.stats-detectcontent.csv` [%header,format=csv] |=== Frame Number,Timecode,content_val,delta_edges,delta_hue,delta_lum,delta_sat 2,00:00:00.017,4.5211226851851856e-05,0.0,0.0,0.00013563368055555556,0.0 3,00:00:00.033,0.0,0.0,0.0,0.0,0.0 4,00:00:00.050,0.0,0.0,0.0,0.0,0.0 5,00:00:00.067,0.0,0.0,0.0,0.0,0.0 |=== I don't know what most of these values mean, but the documentation suggested that we create a chart plotting the `Frame Number` against the `content_val`. We can do that using plot.ly: .visual.py [source, python] ---- import pandas as pd import plotly.graph_objects as go import plotly.io as pio data = pd.read_csv('better-sql.stats-detectcontent.csv') fig = go.Figure(data=go.Scatter(x=data['Timecode'], y=data['content_val'], mode='lines')) fig.update_layout( title='Line Chart of Content Value', xaxis_title='Frame Number', yaxis_title='Content Value', autosize=True ) pio.write_image(fig, 'figure.svg', width=1000, height=600) ---- The resulting image is shown below: .A plot of Frame Number vs Content Value image::{{<siteurl>}}/uploads/2023/06/scenedetect-plot.svg[] We can see that most of the time there are minimal changes between pairs of frames, but on around 15 occasions there is a change bigger than 1. Let's try running `scenedetect` again, but this time with the threshold set to `1`: [source, bash] ---- scenedetect --input BetterSQL-Demo.mp4 \ -s better-sql.stats-detectcontent.csv \ detect-content -t 1 \ list-scenes ---- Running it with this threshold tells `scenedetect` to create a new scene whenever the threshold is exceeded. The output of running the command is shown below: .Truncated Output [source, text] ---- [PySceneDetect] Scene List: ----------------------------------------------------------------------- | Scene # | Start Frame | Start Time | End Frame | End Time | ----------------------------------------------------------------------- | 1 | 1 | 00:00:00.000 | 509 | 00:00:08.483 | | 2 | 510 | 00:00:08.483 | 967 | 00:00:16.117 | | 3 | 968 | 00:00:16.117 | 1394 | 00:00:23.233 | | 4 | 1395 | 00:00:23.233 | 1763 | 00:00:29.383 | | 5 | 1764 | 00:00:29.383 | 2319 | 00:00:38.650 | | 6 | 2320 | 00:00:38.650 | 2808 | 00:00:46.800 | | 7 | 2809 | 00:00:46.800 | 2887 | 00:00:48.117 | | 8 | 2888 | 00:00:48.117 | 4057 | 00:01:07.617 | | 9 | 4058 | 00:01:07.617 | 5308 | 00:01:28.467 | | 10 | 5309 | 00:01:28.467 | 5368 | 00:01:29.467 | | 11 | 5369 | 00:01:29.467 | 5449 | 00:01:30.817 | | 12 | 5450 | 00:01:30.817 | 6819 | 00:01:53.650 | | 13 | 6820 | 00:01:53.650 | 6879 | 00:01:54.650 | | 14 | 6880 | 00:01:54.650 | 7101 | 00:01:58.350 | ----------------------------------------------------------------------- ---- It detected 14 different scenes, which sounds promising. Let's now run it one more time, but this time with the `split-video` command appended so that it will split the video up into segments: [source, bash] ---- scenedetect --input BetterSQL-Demo.mp4 \ -s better-sql.stats-detectcontent.csv \ detect-content -t 1 \ list-scenes split-video ---- Let's check the resulting file listing: [source, bash] ---- du -h BetterSQL-Demo-Scene*.mp4 ---- .Output [source, text] ---- 284K BetterSQL-Demo-Scene-001.mp4 324K BetterSQL-Demo-Scene-002.mp4 224K BetterSQL-Demo-Scene-003.mp4 216K BetterSQL-Demo-Scene-004.mp4 276K BetterSQL-Demo-Scene-005.mp4 388K BetterSQL-Demo-Scene-006.mp4 144K BetterSQL-Demo-Scene-007.mp4 576K BetterSQL-Demo-Scene-008.mp4 2.0M BetterSQL-Demo-Scene-009.mp4 176K BetterSQL-Demo-Scene-010.mp4 276K BetterSQL-Demo-Scene-011.mp4 816K BetterSQL-Demo-Scene-012.mp4 116K BetterSQL-Demo-Scene-013.mp4 196K BetterSQL-Demo-Scene-014.mp4 ---- We can have a look at some of the frames in the extracted scenes by calling the `save-images` command like this: [source, bash] ---- scenedetect --input BetterSQL-Demo.mp4 \ -s better-sql.stats-detectcontent.csv \ detect-content -t 1 \ list-scenes save-images ---- Let's have a look at a couple of examples: .Last frame of scene 1 image::{{<siteurl>}}/uploads/2023/06/BetterSQL-Demo-Scene-001-03.jpg[] .First frame of scene 2 image::{{<siteurl>}}/uploads/2023/06/BetterSQL-Demo-Scene-002-01.jpg[] That looks good, that's exactly the cut that I would have made. And it does seem to pick up all the switches to a completely blank screen as new scenes. An interesting cut that it found that is quite clever is the following one: .Last frame of scene 6 image::{{<siteurl>}}/uploads/2023/06/BetterSQL-Demo-Scene-006-03.jpg[] .First frame of scene 7 image::{{<siteurl>}}/uploads/2023/06/BetterSQL-Demo-Scene-007-01.jpg[] Pretty cool, I'd say it's done a great job. I'm gonna give this a go on my next video to see if it saves me time, but here's hoping!
In this post, we're going to learn how to split a video into scenes using the scenedetect library.
uploads/2023/06/detect-split-scenes.png
[ 0.008630456402897835, -0.02515631914138794, 0.0018139452440664172, 0.05179392173886299, 0.07053909450769424, 0.022409994155168533, 0.023557154461741447, 0.04259512946009636, 0.019730208441615105, 0.0004348364018369466, -0.04319510608911514, 0.009278688579797745, -0.07291170209646225, 0.001552104135043919, -0.008686268702149391, 0.07022614032030106, 0.07905622571706772, -0.015485841780900955, 0.03944817930459976, 0.021420102566480637, 0.03971007093787193, 0.07886087894439697, 0.029286134988069534, 0.02899724617600441, -0.0031388592906296253, -0.013508071191608906, 0.018830349668860435, 0.02548086643218994, -0.06402135640382767, -0.008203468285501003, 0.04735427722334862, -0.01260300725698471, 0.002876326907426119, -0.04637756571173668, 0.05235462635755539, 0.027634240686893463, -0.026514744386076927, 0.04589493200182915, 0.0052964892238378525, 0.035985492169857025, -0.06872350722551346, 0.018763484433293343, -0.014222732745110989, -0.0309292059391737, -0.04222586005926132, 0.007983592338860035, -0.029728161171078682, 0.03851556405425072, 0.022999096661806107, -0.018824979662895203, -0.06270452588796616, 0.06820493936538696, 0.004660640377551317, -0.02025519125163555, 0.009770572185516357, 0.04421504959464073, 0.021686354652047157, -0.09170985966920853, 0.036979254335165024, -0.007008842192590237, -0.003234247677028179, -0.01263377908617258, -0.028078701347112656, 0.020172027871012688, 0.00878874585032463, -0.04611998423933983, -0.009468014352023602, 0.04428620636463165, -0.019601911306381226, -0.01601756364107132, 0.018260320648550987, 0.018634961917996407, -0.028520727530121803, 0.009454330429434776, 0.02295619435608387, -0.017394909635186195, 0.017187951132655144, 0.0686042532324791, 0.0015096134738996625, 0.04141557961702347, -0.002393609844148159, -0.00366055965423584, 0.01832227036356926, 0.0576053187251091, -0.040069833397865295, -0.02965642139315605, 0.00234193354845047, -0.02262641303241253, -0.07045267522335052, 0.008852791972458363, -0.023747224360704422, -0.07358916103839874, 0.016419362276792526, 0.01436180341988802, 0.004965333268046379, 0.00900302454829216, -0.010613614693284035, 0.021163195371627808, 0.006137253250926733, -0.004253600724041462, -0.02727341279387474, -0.013984196819365025, 0.0388791449368, 0.050822291523218155, -0.07350444793701172, -0.023064518347382545, 0.0018748613074421883, -0.022157149389386177, -0.01086394488811493, 0.012705591507256031, 0.004100710619240999, 0.0011229821247979999, 0.0032401669304817915, 0.0035708770155906677, -0.06289340555667877, 0.06665478646755219, -0.005759701132774353, -0.03468179330229759, -0.011286658234894276, 0.02832203358411789, 0.04219044744968414, 0.011963778175413609, -0.00194799923337996, 0.08360966295003891, -0.02572302147746086, 0.02895132638514042, 0.004178682807832956, 0.06689973175525665, -0.005192661192268133, -0.08129535615444183, 0.0008665340137667954, 0.03480619564652443, -0.03475368767976761, -0.0010967990383505821, 0.0167225394397974, -0.009630297310650349, 0.008470077998936176, -0.026002444326877594, 0.055073294788599014, 0.050962723791599274, -0.01567496918141842, -0.006756315939128399, -0.0007444457150995731, -0.011947400867938995, 0.034890927374362946, 0.009674041531980038, -0.023624544963240623, -0.01929282397031784, -0.040286410599946976, 0.01190967857837677, -0.0041452329605817795, 0.021820908412337303, 0.08414305001497269, -0.03512630611658096, 0.0011418384965509176, 0.07480128854513168, 0.062272898852825165, 0.0372328944504261, -0.035731974989175797, 0.00773612642660737, 0.03427565470337868, 0.0373520664870739, 0.0018969235243275762, 0.03892364352941513, -0.031004320830106735, -0.025896351784467697, -0.009274396114051342, 0.016769543290138245, -0.021777357906103134, 0.007530531380325556, -0.04591823369264603, -0.04692031070590019, 0.05114908516407013, -0.03588435798883438, -0.01247087400406599, 0.01466146670281887, 0.08780060708522797, 0.06365787237882614, 0.02104819193482399, 0.0023526325821876526, -0.0810605138540268, 0.05194063112139702, -0.00925795640796423, 0.011270581744611263, 0.030570989474654198, -0.01450343057513237, 0.08423634618520737, 0.011209562420845032, -0.0002123082085745409, 0.020528335124254227, -0.07770741730928421, -0.07540852576494217, -0.02906394563615322, 0.020885242149233818, 0.04275678098201752, -0.025605270639061928, 0.016175542026758194, 0.060746897011995316, 0.05363738164305687, 0.03889428451657295, 0.007990875281393528, -0.01121449377387762, 0.03251061215996742, -0.06165802478790283, -0.06185917183756828, 0.013071390800178051, 0.008490406908094883, -0.012820457108318806, -0.018814528360962868, -0.006977166514843702, -0.010790550149977207, -0.024114832282066345, 0.05848420411348343, -0.01887061446905136, 0.03583211079239845, 0.012896427884697914, 0.011018585413694382, -0.03265972062945366, 0.05258314311504364, -0.05071891099214554, -0.000619910832028836, -0.02349049225449562, -0.024613376706838608, -0.05025055259466171, 0.0018914780812337995, 0.12046527862548828, 0.04320491850376129, -0.018443657085299492, -0.0712735578417778, 0.020685719326138496, -0.04234060272574425, -0.03616909682750702, -0.011538596823811531, -0.0005439905798994005, -0.02368592470884323, 0.021141573786735535, -0.015769999474287033, -0.015599604696035385, 0.005015873815864325, -0.0327170267701149, -0.013012472540140152, 0.058239713311195374, 0.017701273784041405, 0.030237644910812378, -0.003907728940248489, 0.005889786407351494, 0.00739243533462286, -0.0024527607019990683, -0.025561535730957985, 0.003227065084502101, 0.03123326413333416, 0.0001150421448983252, 0.016957519575953484, -0.05711919441819191, -0.03540651500225067, -0.012555396184325218, -0.06077948585152626, 0.0004510460130404681, 0.04566359519958496, 0.035776831209659576, -0.010685785673558712, 0.022280247882008553, -0.016598789021372795, 0.024091336876153946, -0.013114191591739655, -0.025061527267098427, -0.042570650577545166, -0.04906342923641205, -0.017255298793315887, 0.01232194248586893, 0.012889099307358265, 0.02758701890707016, 0.022331558167934418, 0.022489367052912712, 0.022733962163329124, 0.03482238948345184, 0.04059433192014694, 0.0006542886258102953, -0.010409238748252392, -0.024188455194234848, 0.003681929549202323, 0.051405832171440125, -0.05628789961338043, -0.00013106035476084799, -0.025617029517889023, -0.0476837083697319, 0.023694176226854324, -0.07098829746246338, -0.02304990030825138, -0.011866064742207527, 0.007001835387200117, 0.03665047511458397, 0.012331626377999783, 0.016577066853642464, 0.05284767970442772, -0.003273341804742813, 0.029162658378481865, 0.01957281306385994, -0.010074624791741371, 0.05319306626915932, -0.007437818218022585, 0.033398017287254333, 0.04452367499470711, -0.014674428850412369, -0.033173587173223495, -0.026227038353681564, 0.05004339665174484, -0.051043592393398285, -0.2988671064376831, 0.014770529232919216, 0.007540687453001738, -0.03248743340373039, 0.027123501524329185, -0.05435687676072121, -0.009832842275500298, -0.0611608549952507, -0.01415039412677288, 0.010390887036919594, -0.03764476254582405, -0.043713171035051346, -0.01433695387095213, 0.03968532010912895, 0.013883145526051521, -0.024356642737984657, -0.016351204365491867, -0.025197897106409073, 0.012842060066759586, 0.04511796683073044, 0.0060476926155388355, -0.05011691525578499, -0.02056528814136982, 0.05226215347647667, 0.026428328827023506, 0.012898280285298824, -0.03421475738286972, 0.0427321195602417, -0.03824125602841377, -0.026117201894521713, 0.014424597844481468, -0.024070117622613907, 0.0018511032685637474, 0.015254232101142406, 0.000774950603954494, -0.01608051173388958, 0.06733842939138412, 0.006884463131427765, 0.006122188176959753, -0.0008184051257558167, -0.025065720081329346, -0.04678589850664139, 0.01762540265917778, -0.004153519403189421, 0.06423702090978622, -0.007338752970099449, -0.06644505262374878, -0.005923324730247259, -0.03674909844994545, 0.0798657014966011, -0.02606211043894291, -0.04791618511080742, 0.006097129546105862, 0.02604961022734642, -0.012659922242164612, 0.002069823443889618, 0.010343949310481548, -0.01677660644054413, -0.06274160742759705, -0.05454593151807785, -0.031811222434043884, -0.03074411302804947, -0.04496636986732483, -0.02261085994541645, 0.03216954693198204, -0.06920718401670456, -0.02602534182369709, -0.018358716741204262, 0.06236590817570686, 0.03969605267047882, -0.042300861328840256, -0.0011691405670717359, -0.008052400313317776, -0.11167033761739731, 0.01267213374376297, 0.007058503571897745, -0.0157999899238348, 0.014093860983848572, 0.006735902279615402, 0.04510108008980751, -0.05034937709569931, -0.026114555075764656, 0.06214822083711624, -0.006142991594970226, 0.008334578946232796, -0.026272282004356384, 0.02240636944770813, -0.014125552028417587, -0.0020994588267058134, -0.015361043624579906, 0.07431325316429138, -0.028627721592783928, -0.04056046903133392, -0.0023676282726228237, -0.006641029845923185, 0.03839821368455887, 0.022265944629907608, 0.021227074787020683, 0.008977790363132954, 0.01050689909607172, 0.03906475380063057, -0.0407881923019886, -0.004616155754774809, -0.02181505784392357, -0.007806950248777866, 0.002372132148593664, -0.04629910737276077, 0.012475065886974335, 0.03819457069039345, 0.008548703044652939, -0.02996944822371006, -0.011694720946252346, 0.011954561807215214, -0.0242726169526577, -0.009723495692014694, -0.005825044121593237, 0.03015599586069584, 0.007385372184216976, 0.021486077457666397, -0.03361981362104416, -0.06580985337495804, 0.006284280680119991, 0.011114338412880898, -0.0022094815503805876, -0.04590457305312157, -0.026100942865014076, 0.0017622828017920256, -0.004944170359522104, 0.021639974787831306, 0.007531290873885155, -0.028208352625370026, 0.006960829719901085, 0.016957804560661316, -0.03141719847917557, 0.04490426555275917, -0.06112233176827431, -0.0485333576798439, -0.02122274972498417, 0.013236266560852528, 0.039771728217601776, -0.02118567004799843, 0.02153889462351799, 0.0022489256225526333, 0.017188046127557755, 0.05236417055130005, 0.007220820523798466, 0.048895206302404404, -0.015059576369822025, -0.01861288957297802, -0.0018758149817585945, 0.023646514862775803, -0.04354136809706688, 0.0064042252488434315, -0.006872682366520166, 0.0032601954881101847, -0.0037147800903767347, -0.00972280278801918, -0.0125551987439394, 0.010966279543936253, -0.042583465576171875, 0.030734892934560776, -0.013967989012598991, -0.01023914385586977, -0.015916213393211365, 0.0172759797424078, 0.032586731016635895, 0.011391798965632915, 0.03217152878642082, 0.0042600021697580814, -0.018436461687088013, 0.017769837751984596, -0.005906033795326948, -0.03716020658612251, 0.023236986249685287, 0.015393799170851707, -0.004002200905233622, 0.03231397271156311, 0.010569270700216293, -0.006433653179556131, 0.0211744736880064, -0.0012698101345449686, -0.041036833077669144, 0.024054739624261856, 0.002430632710456848, 0.030161412432789803, 0.03477219119668007, -0.05005913972854614, -0.012556809931993484, -0.029852088540792465, -0.008500363677740097, -0.046759702265262604, 0.01998203806579113, -0.027372706681489944, -0.011314214207231998, -0.0381852351129055, -0.07187473028898239, 0.02869899943470955, 0.0001906481193145737, 0.014096989296376705, -0.023634718731045723, -0.009373920038342476, 0.008494730107486248, -0.0265133548527956, 0.04719236493110657, 0.08559291064739227, -0.05727360025048256, 0.008572663180530071, 0.021025152876973152, 0.017616713419556618, -0.0007965285331010818, 0.011485072784125805, -0.031155608594417572, -0.02048947475850582, -0.03137432411313057, 0.017610782757401466, -0.025506189092993736, -0.018511705100536346, -0.0469038151204586, 0.03428415581583977, -0.016361117362976074, 0.019425280392169952, -0.04345333203673363, -0.010750515386462212, 0.015194118954241276, -0.0428895577788353, -0.007758467923849821, -0.010327856056392193, -0.012939952313899994, 0.051301922649145126, -0.025409912690520287, 0.03238937258720398, -0.013458357192575932, 0.039392780512571335, 0.040027961134910583, -0.0010678739054128528, -0.01451180875301361, -0.0532093271613121, -0.015537161380052567, 0.013703711330890656, 0.03920206427574158, 0.009040174074470997, -0.002227039309218526, -0.03350546956062317, 0.024744249880313873, -0.024276262149214745, 0.003818100318312645, -0.02788064070045948, -0.024941755458712578, 0.023533685132861137, 0.06986444443464279, 0.007282672915607691, 0.03220183402299881, -0.009859110228717327, -0.05065533518791199, 0.06173068657517433, -0.0952727347612381, -0.034191619604825974, 0.0034722276031970978, -0.052028246223926544, 0.0648052990436554, 0.0030461542773991823, 0.018076058477163315, -0.07223179191350937, 0.015407219529151917, 0.012177691794931889, -0.005677111446857452, 0.042946722358465195, -0.010473491623997688, 0.011945027858018875, -0.04661410301923752, -0.012336053885519505, -0.0800018385052681, -0.030740145593881607, 0.018745163455605507, -0.0014392290031537414, -0.03651604428887367, 0.01678677275776863, -0.038477107882499695, 0.040579695254564285, -0.04732857272028923, -0.027601968497037888, 0.06923353672027588, -0.015430523082613945, -0.0076005663722753525, 0.0067996131256222725, -0.05306512117385864, 0.01801983267068863, 0.029243316501379013, -0.024955451488494873, -0.014379939995706081, -0.02323143742978573, 0.0758732408285141, 0.009652860462665558, 0.01867203414440155, -0.008165123872458935, -0.02113524079322815, 0.09273293614387512, 0.00021602002379950136, 0.024639979004859924, 0.01696748100221157, -0.005000213626772165, 0.007619877345860004, 0.04231985658407211, -0.006197700742632151, 0.002064645756036043, 0.005818868521600962, 0.008500483818352222, -0.06494103372097015, 0.06404627114534378, 0.0038084746338427067, 0.010192972607910633, -0.02050209417939186, 0.07867536693811417, 0.005062814801931381, -0.03922184929251671, -0.07313321530818939, 0.05207463353872299, -0.039146751165390015, -0.03435236215591431, -0.02812509424984455, -0.03362387791275978, -0.025107640773057938, 0.06261175125837326, -0.024367183446884155, 0.007648426108062267, 0.055873215198516846, -0.013753036968410015, 0.010477527044713497, 0.016987735405564308, 0.06574505567550659, 0.08794906735420227, 0.05019279941916466, 0.020237861201167107, 0.0710015743970871, -0.020033076405525208, -0.03544546663761139, 0.0006209607236087322, -0.012188160791993141, -0.03257456794381142, -0.04112553223967552, 0.008834665641188622, 0.05741439387202263, -0.008974741213023663, 0.0781920924782753, -0.027541354298591614, 0.002968507818877697, 0.015150437131524086, -0.01113840937614441, 0.004561716690659523, 0.052403226494789124, 0.006157676689326763, 0.014719278551638126, 0.000574665202293545, -0.030935218557715416, 0.05041833594441414, -0.04992678761482239, -0.006006539799273014, 0.05013230815529823, 0.010760628618299961, 0.020105088129639626, 0.013228964991867542, 0.03680017590522766, 0.06950445473194122, -0.030139930546283722, -0.041417788714170456, -0.00579269602894783, 0.009758981876075268, -0.006202870514243841, 0.04853888973593712, -0.01296449638903141, -0.00011210114462301135, 0.03576774150133133, -0.0657585859298706, -0.024176882579922676, -0.024587880820035934, -0.037117645144462585, 0.016872331500053406, -0.027440248057246208, 0.01311121229082346, 0.009197688661515713, -0.006241158116608858, -0.04329628124833107, -0.03364446759223938, -0.06012287363409996, -0.052690863609313965, -0.03732359781861305, -0.016693877056241035, 0.012906817719340324, -0.00989250186830759, -0.04303227365016937, -0.024051852524280548, -0.015255219303071499, -0.008130042813718319, -0.00250784819945693, -0.06321404129266739, -0.02653314173221588, 0.01795635186135769, 0.011967549100518227, -0.00942534301429987, 0.022650985047221184, 0.059964869171381, 0.009610941633582115, -0.011184655129909515, -0.018913941457867622, 0.04586540907621384, 0.01924564503133297, -0.0013984146062284708, 0.019709739834070206, -0.0909024178981781, -0.0006818770198151469, 0.01686851680278778, 0.008206694386899471, -0.05147634819149971, -0.01057377364486456, 0.046437498182058334, 0.01234209630638361, 0.05906284227967262, -0.007186572067439556, 0.022460883483290672, -0.060563825070858, -0.004609521012753248, -0.05509569123387337, 0.004185580648481846, 0.052446410059928894, -0.020642969757318497, 0.05649412423372269, 0.01519155502319336, -0.01039996836334467, -0.022155627608299255, -0.007881115190684795, -0.025477582588791847, 0.02432893216609955, -0.03903491050004959, -0.029221393167972565, -0.020323481410741806, -0.07636121660470963, -0.028226949274539948, 0.03036588616669178, -0.014800001867115498, -0.041997168213129044, -0.0011751077836379409, -0.002734207082539797, -0.009745928458869457, 0.05679819732904434, -0.052938833832740784, -0.029767723754048347, -0.01921585015952587, -0.023195568472146988, -0.0025901340413838625, 0.03974862024188042, 0.002412044210359454, 0.007333147339522839, 0.027817972004413605, -0.05049078166484833, -0.041620418429374695, 0.017761481925845146, 0.02305006980895996, 0.044397514313459396, -0.008631016127765179, -0.01668698713183403 ]
[ -0.06453981250524521, -0.009939239360392094, -0.011359971947968006, -0.023925302550196648, 0.05111805349588394, -0.030027301982045174, -0.029113205149769783, 0.03081338107585907, -0.014969143085181713, 0.009248717688024044, 0.006884713191539049, -0.07320629805326462, -0.008080967701971531, 0.004648967180401087, 0.08319047838449478, 0.03376936540007591, 0.039796534925699234, -0.06707999110221863, -0.018864113837480545, 0.024339187890291214, -0.015672767534852028, 0.004924652632325888, -0.004115838557481766, -0.016933225095272064, 0.01774984411895275, -0.017832843586802483, 0.024079132825136185, -0.042583663016557693, -0.01365827675908804, -0.20146790146827698, 0.046585965901613235, 0.013219168409705162, 0.05278491601347923, -0.024784164503216743, -0.017314186319708824, 0.0511208176612854, 0.002106965985149145, 0.008938353508710861, -0.04135330766439438, 0.01970534585416317, 0.044867001473903656, 0.0013360503362491727, -0.0721275806427002, -0.08754738420248032, 0.05456127971410751, 0.008840671740472317, -0.0008376539335586131, -0.045421648770570755, 0.0030879992991685867, 0.0237437654286623, -0.041297368705272675, -0.021129537373781204, 0.00008468155283480883, -0.045510053634643555, -0.03658510744571686, -0.013252278789877892, 0.017737658694386482, 0.10958874225616455, 0.02934296801686287, 0.008647824637591839, 0.0032267258502542973, -0.012773597612977028, -0.12391570210456848, 0.10722275078296661, 0.0033374447375535965, 0.05393856018781662, -0.031442586332559586, -0.006474566645920277, 0.009332437068223953, 0.09055537730455399, -0.03344138339161873, -0.025752855464816093, -0.014933977276086807, 0.042593564838171005, 0.007809116039425135, -0.027884164825081825, 0.02656158246099949, 0.0016387198120355606, 0.01607833430171013, -0.022103842347860336, -0.0363115556538105, 0.0022084361407905817, -0.03081963025033474, -0.023683173581957817, -0.01555782463401556, 0.0008095784578472376, 0.019487233832478523, 0.056401126086711884, -0.018931524828076363, 0.04334980621933937, 0.013157645240426064, -0.020483026280999184, 0.04539654776453972, 0.004122589714825153, -0.10288316011428833, -0.048934128135442734, 0.02670815773308277, 0.010371292009949684, -0.017872069031000137, 0.42217376828193665, -0.014472804963588715, -0.04013674706220627, 0.06503038853406906, 0.024477610364556313, 0.03689603880047798, 0.002461739582940936, -0.045651406049728394, -0.013884283602237701, -0.017579689621925354, 0.0030689395498484373, 0.012911601923406124, -0.005206276662647724, 0.06041853129863739, -0.024526726454496384, 0.04032507911324501, 0.016713988035917282, -0.005007690750062466, 0.03808746859431267, -0.019139958545565605, -0.024960478767752647, -0.012877285480499268, -0.0009580416954122484, 0.0195348858833313, -0.019892504438757896, 0.019348498433828354, -0.03902258723974228, 0.06671477854251862, 0.05096970126032829, 0.047262657433748245, -0.006177801173180342, 0.045655034482479095, -0.022765351459383965, -0.07364713400602341, 0.01898380182683468, -0.0078219473361969, 0.0368766114115715, 0.0371105894446373, -0.03121323697268963, 0.01733679696917534, 0.009121127426624298, 0.004539221525192261, -0.028281359001994133, 0.039836496114730835, 0.020476914942264557, -0.018992779776453972, 0.07816476374864578, -0.015880022197961807, -0.032115861773490906, -0.03982182964682579, -0.05548499524593353, 0.0016970706637948751, 0.03927021846175194, -0.008910085074603558, -0.008713608607649803, 0.037942152470350266, 0.017023645341396332, 0.08164432644844055, -0.04085768386721611, -0.047976404428482056, 0.03208905830979347, -0.017257902771234512, -0.03523249179124832, -0.028608329594135284, 0.002540827030315995, 0.05069196596741676, -0.11707211285829544, -0.038039352744817734, 0.01178413163870573, 0.0012619855115190148, -0.051482222974300385, -0.021960409358143806, -0.01829323172569275, -0.040316782891750336, -0.01142682321369648, 0.015001146122813225, -0.026613054797053337, -0.05843953415751457, 0.04324258118867874, 0.06376849114894867, 0.01692812331020832, -0.012153788469731808, -0.001839777105487883, -0.008390670642256737, 0.029538223519921303, -0.04130100458860397, -0.13228316605091095, -0.007497367449104786, -0.00898777786642313, 0.02486492320895195, -0.01605282351374626, -0.020306296646595, -0.05002734437584877, -0.06946854293346405, 0.05679818615317345, -0.013096137903630733, 0.037900034338235855, 0.009579431265592575, -0.0103773083537817, -0.03524809703230858, -0.003871655324473977, -0.007946610450744629, 0.03404596075415611, -0.028749987483024597, 0.020143697038292885, -0.05643909052014351, 0.06360781192779541, 0.030259938910603523, -0.02171478420495987, 0.06460084766149521, 0.03248521313071251, -0.03097783774137497, -0.05049412325024605, 0.0014183011371642351, 0.01207225676625967, -0.010858273133635521, -0.03232959657907486, 0.007861233316361904, -0.003381306305527687, 0.014869743026793003, 0.03351640701293945, -0.021023627370595932, -0.05897163227200508, -0.01987278088927269, -0.34706997871398926, -0.045969389379024506, -0.010677384212613106, 0.0237201489508152, 0.027227817103266716, -0.0634777620434761, 0.010757483541965485, -0.005021614022552967, 0.04119067266583443, 0.01927175186574459, 0.0743744894862175, -0.03806546330451965, 0.03630657494068146, -0.11826461553573608, 0.02406381443142891, 0.03548828139901161, -0.04049994796514511, -0.022580133751034737, -0.0391416922211647, 0.010411625728011131, -0.02339698188006878, 0.00046312803169712424, -0.02530243806540966, -0.045318372547626495, -0.013868177309632301, -0.023026198148727417, 0.1258794516324997, 0.04473773017525673, 0.08173421025276184, -0.014005633071064949, 0.053190845996141434, 0.01997195929288864, -0.016656825318932533, -0.08567270636558533, -0.016252337023615837, 0.0167832188308239, 0.05137797072529793, 0.029199015349149704, 0.01453933585435152, -0.024082709103822708, -0.06088646501302719, 0.037646494805812836, -0.06350020319223404, -0.09790169447660446, -0.07071848213672638, 0.03259311988949776, -0.03946458175778389, -0.01756329834461212, -0.0031169599387794733, 0.05774516984820366, 0.0184942539781332, -0.0073451092466712, -0.004815823398530483, -0.0018380741821601987, -0.0087131904438138, 0.003047539386898279, -0.07154719531536102, 0.011388768441975117, -0.011627641506493092, -0.03370845690369606, 0.003968291450291872, 0.046378687024116516, 0.046106234192848206, -0.07020764797925949, 0.0256356168538332, 0.025652699172496796, 0.022418325766921043, -0.02597695030272007, 0.042360302060842514, -0.003422519890591502, -0.0021528250072151423, 0.11724547296762466, 0.0015514018014073372, 0.032437052577733994, 0.022066159173846245, 0.04518463462591171, 0.009110930375754833, 0.004259503446519375, -0.0022569759748876095, -0.025439588353037834, 0.029603267088532448, 0.002963969949632883, 0.007431009318679571, -0.027056831866502762, -0.013839679770171642, 0.03426221385598183, -0.040249232202768326, -0.04899369925260544, 0.06231933832168579, 0.005243954714387655, 0.01871008612215519, 0.021366478875279427, -0.06299545615911484, -0.026603376492857933, 0.03640751540660858, 0.013772529549896717, -0.2545371353626251, 0.006088412832468748, 0.05740320309996605, 0.050906240940093994, -0.004854395054280758, 0.014276652596890926, 0.04593624919652939, -0.03509765490889549, 0.003076559631153941, 0.03352951630949974, -0.019205287098884583, 0.04232653230428696, -0.015756158158183098, 0.01567353494465351, 0.002138870069757104, 0.009084533900022507, 0.07885005325078964, 0.020653264597058296, 0.0010079819476231933, 0.006487353704869747, -0.005979505833238363, -0.04052979499101639, 0.13729572296142578, 0.008121760562062263, 0.01039149984717369, -0.019694862887263298, -0.03051609732210636, -0.02045590989291668, 0.08165386319160461, -0.020790886133909225, -0.029695458710193634, 0.0003155305457767099, 0.030031252652406693, 0.0026617133989930153, 0.04309128224849701, -0.07412783801555634, -0.025567544624209404, 0.042946863919496536, 0.005482626147568226, 0.010370636358857155, 0.011464676819741726, 0.01756802387535572, -0.015443646349012852, 0.015719734132289886, 0.036967549473047256, 0.02157394215464592, 0.01808503083884716, 0.011175031773746014, -0.07540902495384216, 0.01551150158047676, -0.025219464674592018, -0.00028459070017561316, 0.010805229656398296, 0.0016337829874828458, 0.019314005970954895, 0.06734749674797058, 0.026156162843108177, 0.01797916181385517, 0.04943207651376724, 0.050847988575696945, -0.0040563298389315605, -0.056859344244003296, 0.11091001331806183, 0.016265632584691048, 0.01162012666463852 ]
[ 0.038779910653829575, -0.022084390744566917, 0.022981084883213043, -0.040511827915906906, 0.03418082743883133, -0.006035342812538147, 0.004450129810720682, 0.021792327985167503, -0.003077969653531909, 0.028681296855211258, -0.012681919150054455, 0.009827043861150742, -0.044929202646017075, 0.02247401513159275, 0.018724843859672546, -0.014096090570092201, 0.012252573855221272, -0.028757577762007713, 0.014793682843446732, 0.021730700507760048, -0.003575447015464306, 0.034534480422735214, 0.04326898977160454, 0.03739451244473457, -0.0018523914040997624, 0.026258813217282295, -0.05832117050886154, 0.0042416928336024284, 0.044203195720911026, -0.11136191338300705, 0.01207122951745987, -0.02093793824315071, 0.02173656038939953, -0.004439897835254669, 0.00544666638597846, -0.024907615035772324, -0.017073366791009903, 0.008487052284181118, -0.04122953489422798, 0.001362764509394765, -0.013678847812116146, -0.0038597031962126493, 0.020228516310453415, -0.00821368396282196, -0.010848059318959713, -0.02599804848432541, -0.020042752847075462, -0.043947890400886536, -0.0007244711159728467, -0.01185233611613512, -0.06391893327236176, 0.01683015376329422, -0.041376177221536636, 0.018978485837578773, -0.019731009379029274, 0.03711964562535286, 0.014607499353587627, 0.008982914499938488, 0.037188779562711716, -0.002229796489700675, -0.003840596880763769, -0.01603439263999462, -0.04837610945105553, -0.015159199014306068, 0.002579905791208148, -0.017756866291165352, -0.00018460697901900858, -0.020666196942329407, 0.005114644765853882, 0.025386570021510124, -0.041250474750995636, 0.0058500091545283794, -0.028699953109025955, -0.017244776710867882, -0.03155086562037468, -0.021812353283166885, 0.007613508962094784, -0.037651147693395615, -0.019395479932427406, 0.020310228690505028, -0.003065759316086769, 0.0006319621461443603, 0.0220387801527977, -0.004449527710676193, -0.0014984904555603862, -0.016301224008202553, 0.01195734553039074, 0.026411913335323334, -0.010391956195235252, -0.016664141789078712, -0.04513246938586235, 0.035778068006038666, 0.01869608461856842, 0.020324641838669777, -0.07487799972295761, -0.003337262198328972, -0.016435934230685234, -0.050175078213214874, -0.01762101799249649, 0.8287270665168762, -0.018332557752728462, -0.03677160665392876, 0.010267910547554493, 0.00950466189533472, 0.018813656643033028, 0.01038091629743576, -0.006770979147404432, -0.007511666044592857, -0.00040554231964051723, -0.03834635019302368, 0.007962184026837349, 0.01770014874637127, 0.012905139476060867, 0.0213374774903059, 0.010539857670664787, 0.027937885373830795, -0.01143944263458252, 0.01004840899258852, -0.0016818486619740725, 0.015654174610972404, 0.013807757757604122, -0.02885161153972149, 0.011367512866854668, 0.012830971740186214, -0.009129012003540993, -0.16652904450893402, 0.02683502621948719, -7.132491971186699e-33, 0.05914810672402382, -0.04336128383874893, -0.0068522365763783455, 0.011478019878268242, 0.03064071573317051, 0.01268318947404623, -0.015563780441880226, 0.023731907829642296, 0.02403901517391205, -0.03660926967859268, 0.047076206654310226, -0.06699367612600327, -0.008769713342189789, 0.029842091724276543, 0.03302016109228134, -0.002076978562399745, -0.0028416053391993046, 0.022414101287722588, 0.001023908262141049, 0.019201310351490974, 0.0005035080830566585, 0.05148739740252495, -0.0033874367363750935, 0.04003801941871643, -0.013054896146059036, 0.011304489336907864, -0.016522249206900597, -0.015013983473181725, 0.026362814009189606, -0.03867864981293678, -0.04400473088026047, 0.008719773963093758, 0.019798368215560913, -0.028517231345176697, 0.019081933423876762, -0.04107978940010071, -0.07854791730642319, 0.00012070130469510332, -0.016255713999271393, -0.002308085560798645, -0.027285302057862282, 0.01773151196539402, -0.0565766766667366, -0.03765636309981346, -0.044571470469236374, -0.010562339797616005, -0.00949076283723116, 0.06554088741540909, -0.012688643299043179, 0.043947964906692505, 0.03701937198638916, 0.013593671843409538, -0.00039823478437028825, -0.03821612894535065, -0.01523993443697691, 0.04279731214046478, 0.035302769392728806, -0.0004830292018596083, 0.026221103966236115, -0.01655617542564869, 0.0005561768775805831, -0.013490987941622734, 0.019741950556635857, 0.033622484654188156, 0.015121659263968468, 0.004873502999544144, 0.04055405780673027, 0.0032550995238125324, 0.019418751820921898, 0.006969464011490345, -0.10523808002471924, 0.044334422796964645, -0.029721347615122795, -0.044027648866176605, 0.030856620520353317, -0.028396770358085632, -0.024437526240944862, 0.006210756488144398, 0.0019072848372161388, 0.048991695046424866, 0.006561377551406622, 0.0008421511738561094, 0.03773747384548187, -0.08016636967658997, 0.0036750289145857096, -0.04385308548808098, 0.024216964840888977, -0.010663197375833988, -0.026678621768951416, 0.008935749530792236, 0.0010205736616626382, 0.02474067732691765, -0.01129844505339861, 0.0011994983069598675, 0.0191721860319376, 7.679959363298979e-33, 0.006842412054538727, 0.03773609548807144, -0.024999728426337242, 0.02538611739873886, 0.03936951979994774, -0.010637562721967697, 0.0607471838593483, -0.009971551597118378, -0.024267368018627167, -0.009635130874812603, -0.02107434906065464, -0.021526651456952095, -0.051408540457487106, 0.015431513078510761, 0.018877552822232246, -0.014671055600047112, -0.011319296434521675, -0.02107679285109043, -0.007024472579360008, -0.0001988972508115694, -0.034901633858680725, -0.0036666749510914087, 0.024208104237914085, -0.008246554993093014, 0.019333887845277786, 0.023006772622466087, 0.000515348685439676, 0.02144165150821209, 0.007794427219778299, -0.0018940969603136182, 0.0033260779455304146, -0.013085033744573593, -0.03354230523109436, -0.016165660694241524, 0.01358803454786539, 0.04175242781639099, 0.03014463558793068, -0.005944463424384594, -0.02360893413424492, -0.004384063184261322, 0.041848983615636826, 0.05916585773229599, -0.029081547632813454, -0.01691313460469246, -0.014011536724865437, 0.012022021226584911, -0.00022786049521528184, 0.036074332892894745, -0.04889155924320221, -0.017402522265911102, -0.028714511543512344, 0.036367952823638916, 0.036580201238393784, 0.025751138105988503, 0.02386344037950039, -0.024732917547225952, -0.008445720188319683, 0.05242504924535751, 0.004298242274671793, -0.010748827829957008, -0.0316958986222744, 0.008899513632059097, 0.0019842740148305893, 0.04590708389878273, -0.0056426008231937885, 0.002189615974202752, -0.011132008396089077, 0.012700716964900494, -0.02871560864150524, 0.005630081985145807, 0.02699209749698639, -0.02066083811223507, 0.0037263648118823767, 0.04361815005540848, 0.018712302669882774, 0.0074085271917283535, -0.01026136428117752, -0.015638353303074837, -0.01085292175412178, 0.007173452526330948, 0.019855791702866554, -0.0037519775796681643, 0.037193264812231064, 0.00694557698443532, -0.006222234573215246, 0.05717421695590019, -0.01407479215413332, -0.0038277856074273586, 0.028673237189650536, 0.008532106876373291, 0.01521631795912981, -0.0149361127987504, 0.020227115601301193, 0.014185234904289246, 0.0288408063352108, -1.2783751834888335e-8, -0.029470017179846764, -0.020313581451773643, -0.02861051820218563, 0.04051478952169418, -0.00040546178934164345, 0.008562808856368065, -0.003585169557482004, 0.00680738827213645, 0.02872474677860737, -0.029895853251218796, 0.061363160610198975, -0.03581773117184639, -0.009175553917884827, 0.025930605828762054, -0.019090645015239716, -0.04390743374824524, 0.007132129278033972, 0.013936415314674377, 0.025264093652367592, 0.03766797110438347, -0.0023558505345135927, 0.03556351363658905, 0.03990459442138672, -0.008899873122572899, -0.02833499386906624, -0.004755012691020966, 0.026510685682296753, -0.06629278510808945, -0.0271007027477026, -0.0056249103508889675, -0.004478721413761377, -0.01625026762485504, -0.018026284873485565, -0.00708959111943841, -0.003934269305318594, -0.04026727005839348, 0.0035877295304089785, 0.0037616074550896883, 0.018129106611013412, 0.004451627377420664, -0.0025993476156145334, -0.014446456916630268, 0.027493176981806755, -0.04956761375069618, 0.008170156739652157, 0.017204228788614273, -0.004222449380904436, -0.01250635925680399, 0.022666003555059433, -0.006792003754526377, 0.006552084814757109, 0.03055846132338047, -0.027324918657541275, 0.03325394168496132, 0.048127204179763794, 0.0015128152444958687, 0.03608454018831253, -0.011442827060818672, -0.05548267811536789, -0.03404417634010315, 0.011405599303543568, 0.008795849047601223, 0.004945351742208004, -0.03011775016784668 ]
detecting-splitting-scenes-video
https://markhneedham.com/blog/2023/06/30/detecting-splitting-scenes-video
false
2023-06-08 02:44:37
Creating LinkedIn Carousel/Slides
[ "linkedin", "til" ]
[ "TIL" ]
If you've been using LinkedIn recently, you've likely seen those posts where people post slides in a kind of carousel that you can horizontally scroll. I wanted to create one to explain Apache Pinot's Upserts feature, but I wasn't sure how to create one. Since it's 2023, I started by asking ChatGPT: .ChatGPT doesn't know about LinkedIn Carousel image::{{<siteurl>}}/uploads/2023/06/chatgpt-carousel.png[] Unfortunately ChatGPT doesn't know how to do it, but https://www.linkedin.com/in/harrison-avisto-42996077/[Harrison Avisto^] does and was happy to teach me. The basic idea is that you need to upload a PDF when you're creating your post, as showing in the animation below: .Uploading a PDF image::{{<siteurl>}}/uploads/2023/06/linkedin-post.gif[] So the next question is, how do you go about creating those PDFs? I'm sure there are lots of ways to do this, but I've come across two that I think are pretty accessible. The first is to create a 'LinkedIn Carousel' using https://www.canva.com/[canva.com] and you can do this on a free account. .A LinkedIn Carousel on canva.com image::{{<siteurl>}}/uploads/2023/06/carousel-canvas.png[] You can then create a bunch of images and then download as PDF, as shown below: .Download as PDF on canva.com image::{{<siteurl>}}/uploads/2023/06/canva-pdf.png[] If you don't want to use canva, you can do a similar thing with Google Slides. Create a new slides document as normal and then go to `File > Page Setup` and change the dimensions of the slide/canvas: .Google Slides Canvas size image::{{<siteurl>}}/uploads/2023/06/google-slides.png[] Again, create slides like normal and export as PDF when you're done. And here's the one I made: ++++ <iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:7072557847632306176" height="640" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe> ++++
In this post we'll learn how to create a LinkedIn carousel using Google Slides and canva.com
uploads/2023/06/linkedin-banner.png
[ -0.009834366850554943, -0.012113384902477264, 0.03723857179284096, 0.08265436440706253, 0.06433173269033432, -0.003289155662059784, 0.0027852188795804977, 0.06497646868228912, -0.007686505559831858, 0.002213830826804042, -0.03503270819783211, -0.010082858614623547, -0.0464194193482399, 0.016734233126044273, -0.009713109582662582, 0.034746203571558, 0.054880011826753616, -0.004604909103363752, 0.0032946309074759483, 0.008033215068280697, 0.007030935492366552, 0.04633883386850357, -0.02632564678788185, -0.002792235929518938, 0.022208740934729576, -0.009084108285605907, 0.0011581367580220103, 0.03216637298464775, -0.05107031762599945, -0.024379774928092957, 0.034142643213272095, -0.005681285634636879, 0.014361942186951637, -0.0019335525576025248, 0.023417677730321884, 0.002698906697332859, -0.015794742852449417, -0.0038135964423418045, 0.012333357706665993, 0.01340680755674839, -0.06605294346809387, 0.025111397728323936, 0.013688032515347004, -0.03246254846453667, -0.01105213351547718, 0.0058382293209433556, -0.04691467061638832, 0.01611175388097763, 0.015467180870473385, 0.0062142242677509785, -0.06281618773937225, 0.02420538105070591, -0.011689605191349983, 0.03672948107123375, 0.022146163508296013, 0.018601322546601295, 0.018671534955501556, -0.045251887291669846, 0.02929570898413658, -0.05384387820959091, 0.011285475455224514, -0.0030675153248012066, -0.009507354348897934, 0.023381473496556282, 0.009100746363401413, -0.022070836275815964, 0.020544087514281273, 0.03975341469049454, -0.013563096523284912, -0.03267289698123932, -0.0015906007029116154, -0.011622334830462933, 0.028901303187012672, 0.00849574152380228, 0.013620982877910137, -0.029307780787348747, -0.05302468687295914, 0.05614636465907097, 0.007295128423720598, 0.04257683828473091, -0.015472082421183586, 0.02270781248807907, 0.017277957871556282, 0.03764630854129791, -0.030446968972682953, -0.021886875852942467, -0.03657488152384758, -0.004009152762591839, -0.060696013271808624, 0.0787172019481659, -0.04032449051737785, -0.04948371648788452, 0.021630797535181046, 0.024635368958115578, 0.001064689364284277, 0.00299630593508482, 0.0015856251120567322, 0.011217225342988968, 0.0025728452019393444, -0.007717845030128956, -0.04512650892138481, 0.013769392855465412, 0.019032562151551247, 0.01711973175406456, -0.07393006235361099, -0.006780361291021109, -0.011890463531017303, -0.027522806078195572, -0.004363724961876869, -0.0044273752719163895, -0.051639214158058167, -0.003741737687960267, -0.013388192281126976, 0.03966643661260605, -0.06945221871137619, 0.08388594537973404, 0.03272417187690735, -0.03322524204850197, 0.015280190855264664, 0.00738506717607379, 0.05137106776237488, 0.02670132741332054, -0.004614667966961861, 0.04759091138839722, 0.011848957277834415, 0.038033999502658844, -0.03201679140329361, 0.054131172597408295, -0.027083443477749825, -0.06476710736751556, -0.021860770881175995, 0.055125679820775986, 0.0006555571453645825, -0.021053941920399666, 0.021441128104925156, -0.02355332486331463, 0.009629348292946815, 0.0023867778945714235, 0.07941634953022003, 0.010600256733596325, 0.0015758690424263477, -0.019885122776031494, 0.010165604762732983, 0.003939671907573938, 0.05560934543609619, -0.016277175396680832, -0.004486553370952606, -0.02122259885072708, -0.07418033480644226, 0.0020032201427966356, -0.006556951440870762, -0.0036266837269067764, 0.08331720530986786, -0.050168491899967194, 0.004439694806933403, 0.08628644794225693, 0.03550151363015175, -0.009179196320474148, 0.024571560323238373, 0.022969722747802734, 0.03191437944769859, 0.02694469504058361, 0.02735024318099022, 0.055070821195840836, -0.012281018309295177, -0.05357702448964119, 0.011858265846967697, 0.036715421825647354, -0.01252380758523941, 0.004530065692961216, -0.06863538175821304, -0.03475369140505791, 0.04277382045984268, -0.0488835908472538, -0.025195948779582977, 0.08588551729917526, 0.10028278082609177, 0.01521700993180275, 0.034319132566452026, 0.013729105703532696, -0.08841215819120407, 0.06530316174030304, 0.03723101317882538, 0.01952703669667244, 0.004483239725232124, -0.03674651309847832, 0.06670638918876648, 0.02630774676799774, 0.03259594738483429, 0.014922220259904861, -0.08575849235057831, -0.061937425285577774, -0.04164889454841614, 0.01192344818264246, 0.07282046973705292, -0.04313841834664345, 0.011354946531355381, 0.06541978567838669, 0.022887248545885086, 0.03556007146835327, 0.0029958838131278753, 0.033686891198158264, 0.04034411162137985, -0.057449255138635635, -0.05920279026031494, -0.0028930306434631348, 0.029645264148712158, -0.01686396822333336, -0.026595337316393852, -0.017648426815867424, -0.019812103360891342, -0.00162543635815382, 0.06337346136569977, -0.01034892350435257, 0.045911163091659546, 0.0168413445353508, 0.056986406445503235, -0.026139672845602036, 0.04658609256148338, -0.03616365045309067, 0.030828900635242462, 0.027693113312125206, -0.01090580690652132, -0.004515569191426039, 0.020404208451509476, 0.11574963480234146, 0.06762402504682541, -0.00579786766320467, -0.03370553255081177, 0.03734453395009041, 0.02980104088783264, -0.03610389679670334, 0.02321365661919117, 0.019458042457699776, 0.027696426957845688, 0.01429926510900259, 0.0013544823741540313, -0.046370331197977066, 0.0294698104262352, -0.032713163644075394, 0.004419404082000256, 0.06767042726278305, -0.0062906984239816666, 0.06013727933168411, -0.0007639771210961044, -0.00033482929575257003, -0.03043341636657715, -0.01784183271229267, -0.06384655833244324, -0.0030378014780580997, 0.028052309527993202, -0.0018826050218194723, 0.025613214820623398, -0.007320105563849211, -0.026637455448508263, -0.027488335967063904, -0.030546432361006737, 0.019671738147735596, 0.036600448191165924, 0.05647767707705498, -0.006632158998399973, 0.040335118770599365, -0.02402982860803604, 0.010206835344433784, -0.021493354812264442, -0.034759312868118286, -0.03394965082406998, -0.018607122823596, 0.0027964378241449594, 0.034183330833911896, 0.028844231739640236, -0.004701246507465839, 0.00944497436285019, -0.008921503089368343, 0.019105983898043633, -0.00698593445122242, 0.003969648852944374, 0.028743833303451538, 0.0013220309047028422, -0.04673518240451813, -0.020164484158158302, 0.04104958102107048, -0.0374813936650753, -0.01879771612584591, -0.00003203260348527692, -0.054614584892988205, 0.0359053909778595, -0.06602177768945694, -0.03615301474928856, 0.00044623969006352127, 0.007526271976530552, 0.03326884284615517, 0.013390917330980301, 0.03356802836060524, 0.05013558641076088, 0.018841659650206566, 0.02240360714495182, 0.01586133800446987, -0.03820175305008888, 0.06384151428937912, -0.02547563798725605, -0.0031411531381309032, 0.07147036492824554, -0.04464368894696236, -0.014067087322473526, -0.049209918826818466, 0.03909280523657799, -0.05043746903538704, -0.30198904871940613, 0.03997337073087692, 0.013484801165759563, -0.042094919830560684, -0.015533288940787315, -0.05546394735574722, 0.008693398907780647, -0.03181212767958641, -0.024698778986930847, 0.0027159759774804115, -0.024797270074486732, -0.009631534107029438, -0.047954075038433075, 0.018053337931632996, 0.007638226263225079, 0.04586835205554962, 0.02036113478243351, -0.02352297119796276, 0.0017974022775888443, 0.03277447074651718, -0.020665057003498077, -0.060430243611335754, -0.012716969475150108, 0.0598597452044487, 0.020837076008319855, 0.027803216129541397, -0.03888974338769913, 0.028131822124123573, -0.034142300486564636, -0.017579011619091034, 0.014290284365415573, -0.011494362726807594, -0.009295644238591194, 0.022189335897564888, -0.03354628384113312, -0.024341488257050514, 0.03502689674496651, 0.00005762083310401067, 0.004845085088163614, -0.0148342065513134, 0.0008863353286869824, -0.03159719333052635, 0.013808189891278744, 0.021771466359496117, 0.08339986205101013, -0.031160859391093254, -0.056404344737529755, -0.00006929213122930378, -0.04578320309519768, 0.07039890438318253, -0.005008540116250515, -0.04399584233760834, -0.01262056827545166, 0.011031823232769966, -0.004288846161216497, 0.009744158014655113, -0.010518388822674751, -0.010484243743121624, -0.06978559494018555, -0.032743360847234726, -0.02118408866226673, -0.024358553811907768, -0.04228341951966286, -0.05470388010144234, 0.007862729951739311, -0.06646592915058136, -0.08791171759366989, -0.001000564661808312, 0.0933418869972229, 0.010687902569770813, -0.030556393787264824, 0.01057190541177988, -0.03374110907316208, -0.09646894782781601, -0.0012354233767837286, -0.007317849434912205, -0.017957495525479317, 0.0040125418454408646, -0.016873810440301895, 0.05343827232718468, -0.018280602991580963, -0.035205524414777756, 0.04404228925704956, 0.011378676630556583, 0.026124300435185432, -0.006704783998429775, 0.03664308413863182, -0.015137294307351112, 0.008463224396109581, -0.02348034456372261, 0.07516125589609146, -0.012660225853323936, -0.02481781132519245, -0.00016418503946624696, -0.002548600547015667, 0.031668130308389664, -0.0108353765681386, -0.015389576554298401, -0.0076730987057089806, 0.04277249798178673, 0.024088634178042412, -0.06077660992741585, -0.008491531014442444, -0.015531782992184162, -0.017938653007149696, 0.006006227340549231, -0.03494514524936676, -0.00862827617675066, 0.008354010060429573, 0.014163196086883545, -0.025604180991649628, -0.027328219264745712, 0.020615926012396812, -0.05379973724484444, -0.057694535702466965, -0.021768765524029732, 0.008951641619205475, 0.02365034818649292, -0.006917264312505722, -0.0312095545232296, -0.03538765013217926, 0.014675179496407509, -0.030838657170534134, -0.026047172024846077, -0.04235921427607536, 0.008672527968883514, -0.013503721915185452, -0.0022645648568868637, 0.010032782331109047, 0.010300925932824612, -0.008078870363533497, 0.007663266733288765, 0.04801781103014946, -0.055571239441633224, 0.027047032490372658, -0.033356208354234695, -0.025379842147231102, -0.037462349981069565, 0.0007139634108170867, 0.008865268900990486, -0.0024458575062453747, 0.03272780776023865, -0.00840793363749981, 0.018241584300994873, 0.06851401925086975, 0.005114254076033831, 0.02143489383161068, 0.019239814952015877, -0.012154988944530487, 0.023078560829162598, -0.017469147220253944, -0.0774994045495987, -0.017748985439538956, -0.007034243084490299, -0.0187643151730299, -0.029388191178441048, 0.004810447804629803, 0.005610654130578041, 0.000024981938622659072, -0.03429602459073067, 0.018390238285064697, -0.03444700688123703, -0.009011955931782722, -0.012510416097939014, 0.013088248670101166, 0.05208393931388855, 0.01223789807409048, 0.014954528771340847, -0.005377659108489752, -0.025155501440167427, 0.05953994765877724, 0.00005775578392785974, -0.0014136710669845343, -0.015853729099035263, -0.010701214894652367, 0.001174543984234333, 0.0003160047926940024, 0.0003576067683752626, 0.03881954029202461, 0.0009212741861119866, 0.01274440810084343, -0.02447122521698475, 0.029163477942347527, -0.011702628806233406, 0.04283192381262779, 0.042281657457351685, -0.038789693266153336, 0.010897262021899223, -0.02202063798904419, 0.0031908443197607994, -0.03927157446742058, 0.007682928815484047, -0.012094631791114807, 0.006989062298089266, -0.03733210638165474, -0.08554455637931824, 0.0477752611041069, -0.029744457453489304, 0.013473747298121452, -0.003835803596302867, -0.028549237176775932, -0.013490539975464344, -0.05250254273414612, 0.04337938129901886, 0.0797463208436966, -0.05714939907193184, 0.02349776029586792, -0.00046986059169285, -0.009120373986661434, 0.016444960609078407, 0.027138635516166687, -0.03141600266098976, 0.02618723176419735, -0.04389243200421333, 0.03165528178215027, -0.04500412195920944, -0.04019535332918167, -0.05538463592529297, -0.007446364499628544, 0.019355859607458115, 0.020797953009605408, -0.034054234623909, -0.025999877601861954, 0.0014594433596357703, -0.042282331734895706, -0.0011094516376033425, -0.02256416343152523, -0.04253844916820526, 0.04517999291419983, -0.07456056773662567, 0.03569762408733368, -0.03776790574193001, 0.009732971899211407, 0.016333408653736115, -0.05908937379717827, 0.019541427493095398, -0.04562930017709732, -0.0056157466024160385, 0.031016454100608826, 0.0686856284737587, -0.011382369324564934, -0.000586507492698729, -0.0521680973470211, -0.003832577494904399, -0.03996990621089935, -0.00004042154614580795, -0.028456464409828186, -0.014892532490193844, 0.030609721317887306, 0.060814715921878815, -0.0006167139508761466, -0.02378803677856922, -0.006542589981108904, -0.010522072203457355, 0.03190699219703674, -0.051720526069402695, -0.028778115287423134, -0.006977553945034742, -0.05033872649073601, 0.055487051606178284, 0.016816647723317146, 0.030739309266209602, -0.030257318168878555, 0.010894245468080044, 0.029127212241292, 0.015324465930461884, 0.019056299701333046, -0.001550565822981298, 0.01017948891967535, -0.029201548546552658, -0.0012163168285042048, -0.06980503350496292, -0.016113871708512306, 0.007757263723760843, -0.0006338442908599973, -0.0077697779051959515, 0.025295764207839966, -0.02901706099510193, 0.05948255956172943, -0.06391720473766327, -0.008298581466078758, 0.04273135960102081, -0.0013402403565123677, 0.021174276247620583, -0.002685007406398654, -0.04911264777183533, 0.042397208511829376, 0.009580772370100021, -0.05176159739494324, 0.0020186351612210274, 0.00623858068138361, 0.0716109648346901, 0.020917000249028206, 0.041319478303194046, -0.0317772701382637, 0.009324483573436737, 0.07996474951505661, 0.005535484757274389, -0.004770881496369839, 0.06431138515472412, -0.0002817053464241326, 0.03133073076605797, 0.03170895576477051, -0.005258951336145401, 0.012774981558322906, 0.007820130325853825, -0.023968763649463654, -0.07766556739807129, 0.053217146545648575, 0.0009696605848148465, -0.029292309656739235, -0.019349712878465652, 0.06170634925365448, 0.016395140439271927, -0.027419501915574074, -0.07336266338825226, 0.0428595095872879, -0.01945454068481922, 0.0031149208080023527, -0.037966810166835785, -0.018511338159441948, -0.024542320519685745, 0.05963004007935524, -0.0244000181555748, -0.0026425975374877453, 0.05115679278969765, -0.004640598781406879, 0.012576659210026264, -0.009014309383928776, 0.064238540828228, 0.08306029438972473, 0.057549044489860535, 0.002199881011620164, 0.07658349722623825, 0.007344912271946669, -0.054518379271030426, -0.009947440586984158, -0.02151198498904705, -0.01803027279675007, -0.030205151066184044, 0.02792964316904545, 0.04081222787499428, -0.038954537361860275, 0.06904389709234238, -0.010082842782139778, -0.008626575581729412, -0.000852951081469655, 0.008623857982456684, 0.0005202604224905372, 0.01940450631082058, 0.03696712851524353, 0.01571699231863022, -0.02896270342171192, -0.054402198642492294, 0.054169751703739166, -0.03464629501104355, -0.009708056226372719, 0.03526332974433899, -0.00198096944950521, 0.015001713298261166, -0.02412431687116623, -0.005899014882743359, 0.07520361989736557, -0.01820799708366394, -0.01273499894887209, 0.018897769972682, 0.02252926118671894, 0.02566996030509472, 0.06655284017324448, 0.02032545953989029, -0.02183556742966175, -0.003217834746465087, -0.006167947314679623, -0.0007227418827824295, -0.01743358187377453, -0.0324849858880043, 0.0041704075410962105, -0.055735357105731964, -0.0038086427375674248, 0.033114880323410034, -0.04304056987166405, -0.07930339127779007, -0.02611534483730793, -0.022232776507735252, -0.047490935772657394, -0.06664585322141647, 0.0004593650810420513, 0.020832369104027748, -0.015474539250135422, -0.03555060923099518, -0.021986545994877815, 0.001576218637637794, 0.01273342128843069, 0.015879681333899498, -0.04222986474633217, -0.011984585784375668, 0.009114482440054417, 0.0074208383448421955, 0.009340869262814522, 0.03137964755296707, 0.0642201229929924, 0.02082735300064087, -0.013425450772047043, -0.019618431106209755, 0.02922227792441845, 0.020728299394249916, -0.008845746517181396, 0.025798575952649117, -0.09194552153348923, 0.0208249744027853, -0.009529108181595802, -0.031139034777879715, -0.06324277818202972, -0.0016411831602454185, 0.043062444776296616, -0.009123416617512703, 0.02871660143136978, 0.021115774288773537, -0.01689646951854229, -0.04208797961473465, -0.029746970161795616, -0.027448620647192, 0.004515497479587793, 0.054265376180410385, -0.012211760506033897, 0.07763992995023727, 0.032462768256664276, -0.03261934965848923, -0.022237788885831833, -0.014635126106441021, -0.014156516641378403, 0.007019993383437395, -0.06375376880168915, -0.0326460562646389, -0.050893738865852356, -0.07499422878026962, -0.041324641555547714, 0.024383891373872757, -0.02251369319856167, -0.009602620266377926, -0.0008711321279406548, 0.02756597474217415, -0.008719395846128464, 0.007950953207910061, -0.029719479382038116, -0.009744210168719292, 0.003618522547185421, 0.01820698380470276, -0.02818731777369976, 0.022943813353776932, 0.002137012081220746, -0.0066045611165463924, 0.04146430268883705, -0.04133615270256996, -0.00022512707801070064, -0.025723114609718323, 0.014589247293770313, 0.026905840262770653, -0.00701927999034524, 0.004540212918072939 ]
[ -0.07760167121887207, -0.035850830376148224, -0.02276405692100525, -0.0420089066028595, 0.025898389518260956, 0.0029035138431936502, -0.019354358315467834, 0.0006621803040616214, -0.02630436234176159, -0.005364834330976009, -0.0166365634649992, -0.0036235572770237923, 0.013581755571067333, 0.020179541781544685, 0.07674845308065414, 0.037548016756772995, 0.026351289823651314, -0.03524022549390793, -0.016839131712913513, 0.05020274221897125, 0.02014925144612789, -0.011734304949641228, -0.03410061448812485, -0.023610632866621017, -0.004146553575992584, -0.008066259324550629, 0.019975025206804276, -0.05034194886684418, 0.0023791128769516945, -0.15874944627285004, 0.029925592243671417, -0.04681909829378128, -0.030936937779188156, 0.003054607892408967, -0.008393504656851292, 0.025671519339084625, 0.021319715306162834, 0.006106527056545019, 0.029259124770760536, -0.0042161657474935055, 0.015156351961195469, -0.0005147619522176683, -0.07591335475444794, -0.055543262511491776, 0.07255827635526657, 0.008504437282681465, 0.008419563062489033, -0.02747415192425251, -0.04396168142557144, 0.016808517277240753, -0.042944855988025665, -0.006852464750409126, 0.01134882029145956, -0.01699555292725563, -0.03267570585012436, 0.052338607609272, 0.03229464590549469, 0.0644204318523407, -0.007344430778175592, 0.03588203713297844, 0.029517291113734245, -0.00024547555949538946, -0.11995867639780045, 0.12481500208377838, 0.006198220886290073, 0.03911089524626732, -0.046125493943691254, 0.026008322834968567, -0.023346776142716408, 0.07064325362443924, 0.04767368361353874, -0.021187331527471542, -0.030302582308650017, 0.04368453100323677, 0.008366161957383156, -0.04640129208564758, -0.005822648294270039, 0.052233483642339706, 0.003566424362361431, -0.02708064764738083, -0.03463456407189369, -0.0023690841626375914, -0.005871922243386507, -0.020252861082553864, -0.026143237948417664, 0.010001212358474731, 0.044014014303684235, 0.02186012826859951, -0.000667630520183593, 0.03649503365159035, 0.05192965269088745, -0.023438317701220512, 0.018572639673948288, -0.03128761053085327, -0.061420708894729614, -0.01637214422225952, 0.019976595416665077, 0.0076894923113286495, -0.01853092946112156, 0.4264628291130066, -0.04071808606386185, -0.0036381457466632128, 0.10160330682992935, 0.010580416768789291, -0.018800603225827217, 0.004365961067378521, 0.003211801405996084, -0.048402391374111176, 0.01173823419958353, -0.006650291383266449, -0.0011720897164195776, -0.007437995634973049, 0.057127390056848526, -0.042280413210392, 0.01787465251982212, -0.009639747440814972, -0.0065573882311582565, 0.027952056378126144, -0.011626791208982468, -0.004581948276609182, -0.023399099707603455, 0.04604697600007057, 0.005448273383080959, 0.031151073053479195, -0.031197864562273026, -0.013563482090830803, 0.05157771706581116, 0.02366175502538681, 0.06541351228952408, 0.02756507135927677, 0.05471732094883919, -0.005944053176790476, -0.06893755495548248, 0.009829128161072731, 0.004221382550895214, 0.016934774816036224, 0.021635504439473152, -0.04918443039059639, 0.018439792096614838, 0.037980012595653534, -0.004794056061655283, -0.017481878399848938, 0.054441921412944794, 0.003956122323870659, -0.008403938263654709, 0.14378832280635834, 0.007222373504191637, -0.03347090259194374, -0.023363349959254265, -0.023945199325680733, -0.028264714404940605, 0.012048142962157726, -0.02275141328573227, -0.061888400465250015, -0.008458678610622883, 0.007771502248942852, 0.049109552055597305, 0.0024092053063213825, -0.06406772136688232, 0.00411444716155529, -0.002739751012995839, -0.05667015165090561, -0.04211055859923363, -0.011170070618391037, 0.05671128258109093, -0.17636623978614807, 0.0001515568874310702, 0.011743703857064247, 0.017231309786438942, -0.05370495095849037, -0.028044801205396652, 0.021912097930908203, -0.029021840542554855, -0.005026007071137428, 0.079437255859375, -0.0018233765149489045, -0.02399059198796749, -0.0026579448021948338, 0.060809727758169174, 0.023435086011886597, -0.014227041974663734, -0.03879702836275101, -0.025031501427292824, 0.0036350267473608255, -0.1040034294128418, -0.07929516583681107, -0.01522204652428627, -0.0022701877169311047, 0.011809815652668476, 0.031007874757051468, 0.003682899521663785, -0.060772739350795746, -0.09904245287179947, 0.08131823688745499, -0.002825542353093624, 0.015948055312037468, -0.0025695827789604664, -0.00030617546872235835, 0.009231561794877052, -0.004114542156457901, -0.028710275888442993, -0.011412268504500389, -0.050509363412857056, 0.01962088979780674, -0.056253910064697266, 0.03774935379624367, 0.05329258367419243, -0.041281409561634064, 0.0776585265994072, 0.009613684378564358, -0.040425803512334824, -0.0027857108507305384, 0.011099349707365036, 0.0054596299305558205, 0.013294991105794907, -0.012694389559328556, -0.012573367916047573, -0.0010136017808690667, 0.01603563129901886, 0.040475912392139435, 0.012834792025387287, 0.007596453186124563, 0.008081608451902866, -0.3287363350391388, -0.04209103807806969, -0.01739645004272461, 0.028180262073874474, 0.013871881179511547, -0.06829977035522461, 0.02242640219628811, -0.003203602973371744, 0.024128731340169907, 0.022011827677488327, 0.1315363198518753, -0.02706911414861679, 0.022876394912600517, -0.08657291531562805, 0.014079776592552662, 0.02801353856921196, -0.027179205790162086, -0.007679079193621874, 0.003973611164838076, -0.00932440347969532, -0.017029812559485435, 0.0022357902489602566, -0.036957480013370514, -0.06890713423490524, 0.03702521696686745, -0.005672695580869913, 0.09256574511528015, 0.03225824236869812, 0.03306626155972481, -0.05688748508691788, 0.06516069173812866, 0.0189085453748703, -0.016638904809951782, -0.0888436883687973, 0.005189127754420042, 0.0033883783034980297, 0.043160904198884964, -0.02484162338078022, -0.011906896717846394, -0.05650319159030914, -0.08812721073627472, 0.021589109674096107, -0.011846154928207397, -0.06677181273698807, -0.03367351368069649, 0.026068352162837982, -0.026169948279857635, -0.024955760687589645, -0.022927360609173775, 0.10578382015228271, 0.020383169874548912, -0.013943938538432121, 0.002174446824938059, 0.027236610651016235, -0.01251932978630066, -0.015281673520803452, -0.05726170912384987, -0.05192727595567703, -0.015415884554386139, 0.0194252859801054, 0.006972844246774912, 0.019614877179265022, 0.03391863778233528, -0.06754917651414871, 0.005518805701285601, 0.030821140855550766, -0.03654750809073448, 0.013401040807366371, 0.024622246623039246, -0.011560838669538498, -0.017104605212807655, 0.08884986490011215, 0.04086862877011299, 0.0683840811252594, 0.009859997779130936, 0.025047393515706062, -0.003431149525567889, 0.041877564042806625, 0.007973265834152699, -0.015294755809009075, -0.003910249099135399, -0.01786113530397415, 0.03863335773348808, 0.012095456011593342, -0.0439491905272007, 0.04512880742549896, 0.004339244682341814, -0.09446651488542557, 0.06696850061416626, 0.022773783653974533, -0.007115151733160019, 0.03182521462440491, -0.034351252019405365, -0.05163032189011574, 0.06761080771684647, -0.003917721100151539, -0.28404802083969116, 0.04650135710835457, 0.055590685456991196, 0.07753098011016846, 0.004886118695139885, 0.001913378364406526, 0.048901528120040894, -0.047982484102249146, 0.014307461678981781, 0.01992984674870968, -0.012802551500499249, 0.03688059374690056, -0.019735878333449364, -0.013351344503462315, 0.0008022491238079965, -0.007317219860851765, 0.007834420539438725, 0.010471286252140999, -0.0007278259727172554, -0.03917928785085678, 0.0036984647158533335, -0.02893674559891224, 0.17027431726455688, 0.05980126932263374, 0.006146637257188559, -0.0057310014963150024, -0.011685671284794807, -0.00010728350753197446, 0.04175936058163643, 0.010517639108002186, -0.018359066918492317, 0.0005411703605204821, -0.029431462287902832, -0.011512361466884613, 0.03280801698565483, -0.060865841805934906, -0.0407855324447155, 0.043571699410676956, 0.014983641915023327, -0.00043704541167244315, 0.019022786989808083, 0.012665634043514729, -0.03345639258623123, 0.023852791637182236, 0.04676134139299393, 0.01856854557991028, 0.004640781786292791, 0.028625188395380974, -0.04519899562001228, -0.017055513337254524, -0.02103446051478386, -0.03822252154350281, -0.006890483200550079, -0.015804259106516838, -0.0025505113881081343, 0.06216913089156151, 0.04203154519200325, -0.02544199861586094, 0.0015141142066568136, 0.029171831905841827, 0.0108968336135149, -0.03938761353492737, 0.08813132345676422, 0.02832050807774067, 0.03146958723664284 ]
[ -0.03748729079961777, 0.0027762805111706257, 0.001979817170649767, -0.027803029865026474, -0.007568238768726587, 0.005217051133513451, 0.019765520468354225, -0.011298946104943752, -0.015326024033129215, 0.009525868110358715, -0.003443131921812892, 0.05727829784154892, 0.024169933050870895, 0.022705361247062683, 0.003183219116181135, -0.018582085147500038, 0.005384893622249365, -0.009060106240212917, 0.03595155477523804, 0.011142570525407791, -0.009906367398798466, -0.02789154462516308, 0.03260878100991249, -0.00025303824804723263, -0.011955445632338524, -0.03540358692407608, -0.08406636863946915, -0.01722634956240654, 0.027759946882724762, -0.13208669424057007, 0.007138710934668779, -0.04431465268135071, -0.042029161006212234, -0.026906900107860565, -0.041171565651893616, 0.011832746677100658, -0.02713245153427124, -0.0015270198928192258, 0.00010857469169422984, 0.014401351101696491, 0.028757959604263306, -0.05793337896466255, 0.003132796147838235, -0.009354058653116226, 0.04203286021947861, -0.030646909028291702, -0.03174624964594841, -0.002178153023123741, 0.009743975475430489, 0.023111851885914803, -0.01818467676639557, -0.009945491328835487, -0.00814045313745737, 0.008935337886214256, 0.02237889915704727, -0.016026930883526802, -0.009554171934723854, 0.015942415222525597, 0.026948733255267143, 0.006935884244740009, 0.01048403698951006, -0.0030057921539992094, -0.01882980205118656, -0.02000553533434868, 0.017980415374040604, -0.02003958448767662, 0.0031769564375281334, -0.013105561956763268, -0.040592681616544724, 0.014409408904612064, 0.015096129849553108, 0.026015881448984146, 0.012562844902276993, -0.0005229501402936876, -0.019296476617455482, -0.013901364989578724, -0.0016162785468623042, 0.02830529771745205, -0.04780673235654831, -0.04408985376358032, 0.020798848941922188, 0.016559649258852005, 0.02915334701538086, 0.0479654036462307, -0.02071934938430786, -0.007359491195529699, 0.003821562509983778, 0.011856064200401306, -0.017326651141047478, -0.003983267582952976, -0.046038419008255005, 0.03210213780403137, -0.017296696081757545, 0.010378818958997726, -0.03725763037800789, -0.024548310786485672, -0.0047579663805663586, -0.03427378833293915, -0.0198981873691082, 0.8146416544914246, -0.003338174195960164, 0.025950325652956963, 0.08170026540756226, -0.018584510311484337, 0.0013898604083806276, -0.015088992193341255, -0.02267436496913433, 0.013100577518343925, 0.0356307178735733, 0.0019061602652072906, -0.004568391013890505, -0.002329654758796096, 0.005885575897991657, 0.04551410302519798, -0.02257162146270275, -0.018128259107470512, -0.010680567473173141, -0.024594562128186226, 0.016073523089289665, -0.005568572320044041, 0.0189678892493248, 0.017160404473543167, 0.007357113528996706, -0.027550682425498962, -0.024647144600749016, -0.19836969673633575, 0.012947636656463146, -6.666896291241253e-33, 0.03225114569067955, -0.02295798249542713, 0.008775511756539345, -0.022570297122001648, 0.023839863017201424, 0.02483239397406578, -0.012156418524682522, 0.007118903566151857, -0.04348761588335037, -0.01954782009124756, 0.014696613885462284, -0.004098490811884403, -0.023801689967513084, 0.016383007168769836, 0.02212551049888134, -0.010961247608065605, -0.01434899028390646, 0.05550895631313324, 0.022104239091277122, -0.0047561959363520145, -0.0021089224610477686, 0.010360381565988064, -0.027235718443989754, 0.04566580802202225, -0.02138405106961727, 0.05860193073749542, 0.014879033900797367, 0.012441305443644524, -0.007224672473967075, -0.04645524546504021, -0.007956813089549541, 0.022784186527132988, 0.014513980597257614, -0.05483708158135414, 0.030230296775698662, -0.07720386981964111, -0.04592352733016014, -0.012986446730792522, -0.05191800743341446, -0.028226159512996674, 0.007924553006887436, -0.04875518009066582, -0.012428388930857182, -0.0003456327540334314, -0.04488160088658333, 0.018336063250899315, 0.030078863725066185, -0.005141372326761484, 0.014924384653568268, 0.0066969427280128, 0.039622705429792404, 0.01859891414642334, -0.008928258903324604, -0.0014344928786158562, 0.007432812359184027, -0.021143442019820213, -0.01892000436782837, 0.024990003556013107, -0.022414471954107285, -0.041643738746643066, 0.027985064312815666, -0.01272113248705864, -0.029595615342259407, 0.0023389598354697227, -0.029546601697802544, -0.02315041981637478, 0.004126230254769325, 0.0061476207338273525, 0.018643910065293312, 0.006112407427281141, -0.04019400477409363, 0.06471067667007446, -0.0348355770111084, 0.011529427021741867, 0.035707853734493256, -0.005526785738766193, 0.014672785997390747, 0.06855733692646027, 0.030158409848809242, 0.025241870433092117, -0.03201722726225853, -0.025449538603425026, 0.0212665107101202, -0.032925885170698166, -0.040127918124198914, 0.005137561820447445, 0.035238999873399734, 0.020181890577077866, -0.04623022302985191, 0.01619783602654934, 0.04691199213266373, 0.06839412450790405, -0.011432664468884468, -0.003002505050972104, -0.013527787290513515, 6.758758970706107e-33, -0.014768974855542183, 0.010892658494412899, -0.015287098474800587, 0.013808516785502434, 0.03833223879337311, 0.004627740941941738, 0.017573576420545578, 0.036757227033376694, -0.017010940238833427, -0.004005535505712032, -0.021204311400651932, 0.0011071863118559122, -0.052410345524549484, -0.018444513902068138, 0.06633566319942474, -0.05065451189875603, 0.021383047103881836, -0.033745329827070236, -0.01839475892484188, -0.019848695024847984, 0.02348409779369831, 0.03193734213709831, -0.0031535110902041197, 0.03548962250351906, -0.0002301554341102019, 0.0849614143371582, 0.03056413307785988, 0.005146620329469442, -0.04677052050828934, 0.030036544427275658, -0.0034962445497512817, -0.043724704533815384, 0.0022951788268983364, 0.03330828994512558, 0.02500150166451931, 0.012766447849571705, 0.0006428632186725736, -0.005448563955724239, -0.0027120267041027546, -0.03460468351840973, 0.009157209657132626, 0.03629633039236069, 0.023031920194625854, 0.010540845803916454, 0.036811843514442444, -0.00838753953576088, -0.01005315501242876, -0.026343118399381638, 0.02168136276304722, 0.037946440279483795, -0.01913703978061676, 0.009786258451640606, 0.04598008468747139, -0.03420544043183327, 0.01695512980222702, -0.040230195969343185, -0.024150114506483078, -0.027503738179802895, 0.01688000187277794, -0.020037667825818062, 0.01703345961868763, -0.023933522403240204, 0.013134289532899857, 0.019657205790281296, -0.05296869948506355, -0.014789750799536705, -0.04099477827548981, -0.030208278447389603, 0.00014394658501259983, 0.020031241700053215, 0.00813036598265171, 0.00557907996699214, 0.0066803572699427605, 0.02130248211324215, 0.01779310777783394, 0.005612918641418219, 0.04785075783729553, 0.036543406546115875, 0.02373737283051014, -0.04162391275167465, -0.0016219774261116982, 0.023440664634108543, 0.010607646778225899, -0.0231910552829504, -0.006734184455126524, 0.05782230943441391, -0.041603680700063705, -0.016862379387021065, 0.0021104037296026945, -0.026236126199364662, -0.000729938386939466, 0.013083363883197308, 0.007296527270227671, 0.006942609325051308, 0.03237593546509743, -1.24709060855821e-8, 0.008141204714775085, 0.011809105053544044, 0.0014548355247825384, -0.02449377067387104, 0.008669775910675526, 0.04097415879368782, -0.006687137298285961, 0.033733539283275604, -0.0008342757355421782, -0.012364035472273827, 0.05434206873178482, -0.035395748913288116, 0.01583949662744999, 0.0220722034573555, -0.021772783249616623, -0.03193529322743416, 0.020895078778266907, -0.0025494347792118788, 0.011883791536092758, -0.025211060419678688, 0.0026584984734654427, -0.0009923138422891498, 0.024409351870417595, 0.006686435546725988, -0.05940926820039749, -0.013560794293880463, 0.012429156340658665, -0.0288887657225132, -0.04336671158671379, -0.023692399263381958, 0.0011138671543449163, -0.04099863022565842, -0.0435742624104023, 0.013093948364257812, -0.009338214062154293, -0.030136005952954292, 0.002200704300776124, 0.02563018910586834, 0.011738118715584278, 0.021084001287817955, 0.05349358916282654, 0.0068611279129981995, 0.035993583500385284, -0.03383580967783928, -0.014400852844119072, -0.0017061148537322879, 0.017521321773529053, 0.028104690834879875, -0.015768107026815414, -0.01856601983308792, 0.0036273424047976732, -0.04491330310702324, -0.0035139380488544703, 0.017261570319533348, 0.027363495901226997, -0.05771346762776375, 0.06745651364326477, 0.00946204923093319, -0.00396460248157382, 0.0320853553712368, 0.020455559715628624, 0.002377146389335394, 0.006438863463699818, 0.010293343104422092 ]
linkedin-slides-carousel
https://markhneedham.com/blog/2023/06/08/linkedin-slides-carousel
false
2023-06-06 02:44:37
Python: Working with tuples in lambda expressions
[ "python", "til" ]
[ "TIL", "python" ]
I'm still playing around with data returned by Apache Pinot's HTTP API and I wanted to sort a dictionary of segment names by partition id and index. In this blog post we're going to look into how to do that. We'll start with the following dictionary: [source, python] ---- segments = { "events3__4__1__20230605T1335Z": "CONSUMED", "events3__4__13__20230605T1335Z": "CONSUMED", "events3__4__20__20230605T1335Z": "CONSUMING" } ---- As I mentioned above, I want to sort the dictionary's items by partition id and index, which are embedded inside the key name. In the following key: [source, text] ---- events3__4__13__20230605T1335Z ---- The partition id is `4` and the index is `13`. To sort by these values, we need to split on `__` and then grab the 1st and 2nd indexes of the corresponding list, before calling the `int` function to have those values treated as numbers rather than strings. The code looks like this: [source, python] ---- sorted_segment_ids = sorted( segments.items(), key=lambda item: ( int(item[0].split("__")[1]), int(item[0].split("__")[2]) ) ) for segment_id, server_names in sorted_segment_ids: print(f'{segment_id: <35}', server_names) ---- .Output [source, text] ---- events3__4__1__20230605T1335Z CONSUMED events3__4__13__20230605T1335Z CONSUMED events3__4__20__20230605T1335Z CONSUMING ---- That works, but we have some repetition in the code and it's not particularly readable. It would be slightly easier if we could destructure the `item` tuple, but you can't do that in lambdas in Python 3. Instead, we can use an assignment expression, which assigns a value to a variable name and also returns that value. The updated code looks like this: [source, python] ---- sorted_segment_ids = sorted( segments.items(), key=lambda item: (( seg_id := item[0], seg_parts := seg_id.split("__"), partition := int(seg_parts[1]), index := int(seg_parts[2]) )[2:]) ) for segment_id, server_names in sorted_segment_ids: print(f'{segment_id: <35}', server_names) ---- Our lambda function returns a 4 value tuple, but we don't need the first two, so we filter those out with the `[2:]` slice operator. We could also convert the `partition` and `index` expressions into one list comprehension, like this: [source, python] ---- sorted_segment_ids = sorted( segments.items(), key=lambda item: (( seg_id := item[0], seg_parts := seg_id.split("__"), [int(val) for val in seg_parts[1:3]] )[2:]) ) for segment_id, server_names in sorted_segment_ids: print(f'{segment_id: <35}', server_names) ---- It's still kinda verbose though, although I think it is easier to understand what's going on. I still don't like having to use the slice operator though, so perhaps I should just bite the bullet and use a function instead! That would look like this: [source, python] ---- def sort_fn(item): seg_id, *_ = item seg_parts = seg_id.split("__"), return [int(val) for val in seg_parts[1:3]] sorted_segment_ids = sorted(segments.items(), key=sort_fn) for segment_id, server_names in sorted_segment_ids: print(f'{segment_id: <35}', server_names) ----
In this post we'll learn how to work with tuples inside Python lambda expressions.
uploads/2023/06/python-lambdas-banner.png
[ -0.0203822273761034, -0.02381654642522335, -0.03754696249961853, 0.02001895010471344, 0.06099385768175125, 0.037514571100473404, -0.01668158918619156, 0.03680942952632904, -0.010380006395280361, 0.0009192037978209555, -0.02741391770541668, -0.006222656928002834, -0.05516012758016586, 0.055468637496232986, 0.014291906729340553, 0.07752110809087753, 0.10294391959905624, -0.022139331325888634, 0.036830149590969086, -0.01122263167053461, 0.05889533460140228, 0.045225296169519424, -0.004930316004902124, 0.020517030730843544, 0.01437861192971468, 0.006201508920639753, 0.0010000059846788645, 0.017485132440924644, -0.02454204298555851, -0.0185592919588089, 0.015984926372766495, 0.03333945944905281, 0.01869860850274563, 0.0006880684522911906, 0.0332561656832695, -0.028413308784365654, -0.021283801645040512, -0.011064755730330944, 0.010311686433851719, 0.034122101962566376, -0.04318442568182945, 0.01083594374358654, -0.019845129922032356, 0.017595166340470314, -0.02116312086582184, 0.018859723582863808, -0.06148828938603401, -0.007317489478737116, -0.026686178520321846, 0.02845817245543003, -0.0438336506485939, -0.0006925943889655173, -0.015921542420983315, -0.006941910367459059, -0.015087917447090149, 0.04306357726454735, -0.009911560453474522, -0.0708983764052391, 0.03281259536743164, -0.013085032813251019, -0.00025347256450913846, -0.016444073989987373, 0.0027601581532508135, 0.007209653500467539, 0.017848551273345947, -0.0487847775220871, -0.020145820453763008, 0.06401634216308594, -0.05051528289914131, -0.012375257909297943, -0.0029489947482943535, 0.025886056944727898, -0.014309101738035679, 0.00527123361825943, -0.011117849498987198, -0.04296098276972771, -0.00715919304639101, 0.07762212306261063, 0.003409875091165304, 0.05322672054171562, -0.02666950412094593, 0.002252842066809535, 0.009565196931362152, 0.035477712750434875, -0.0051953732036054134, -0.016854822635650635, -0.07836156338453293, -0.022173568606376648, -0.05481904000043869, 0.019502630457282066, 0.00431706290692091, -0.0436333566904068, 0.01264887023717165, -0.0036230769474059343, -0.0210566483438015, 0.006631817668676376, 0.011281546205282211, -0.01282599475234747, -0.004493527580052614, -0.014023706316947937, -0.03902874514460564, -0.01133138220757246, 0.03220490738749504, 0.05130886286497116, -0.041894856840372086, -0.01366817019879818, -0.03964328393340111, -0.02941880375146866, 0.019243454560637474, -0.009169340133666992, -0.027309495955705643, 0.0005663515767082572, -0.033688947558403015, 0.002550603589043021, -0.0728132352232933, 0.0507727786898613, 0.024117087945342064, -0.03787112981081009, 0.020934488624334335, 0.01920613832771778, 0.04717840999364853, 0.028516829013824463, -0.004601967521011829, 0.08797472715377808, 0.023569049313664436, -0.010103316977620125, 0.022396761924028397, 0.06479877978563309, 0.005659820977598429, -0.05908168479800224, -0.01740337908267975, 0.044436264783144, 0.00882307905703783, -0.03783562779426575, -0.037590935826301575, -0.043492354452610016, -0.020216677337884903, 0.0024946366902440786, 0.055235352367162704, 0.002054483164101839, 0.0017701531760394573, -0.030228842049837112, -0.011206913739442825, -0.016270898282527924, 0.001031210646033287, 0.014047157019376755, -0.01746452786028385, -0.04088884964585304, -0.020099405199289322, 0.017912063747644424, 0.028447363525629044, 0.024585597217082977, 0.038865454494953156, -0.03206866979598999, -0.007305364590138197, 0.06640682369470596, 0.017944999039173126, 0.03958627209067345, -0.024379245936870575, -0.007363731972873211, 0.037753697484731674, 0.012644541449844837, 0.031628791242837906, 0.034719858318567276, 0.009353927336633205, -0.021492594853043556, 0.020310960710048676, 0.05099852755665779, -0.03824874013662338, -0.010954845696687698, -0.0395541712641716, -0.025376534089446068, 0.05470709502696991, -0.028674891218543053, 0.0005449093296192586, 0.03001074492931366, 0.08057866990566254, 0.023506928235292435, 0.04325055330991745, 0.020399954169988632, -0.06437108665704727, 0.019671784713864326, 0.013026467524468899, 0.01672990806400776, 0.029313864186406136, 0.015667106956243515, 0.07220827043056488, 0.004070383030921221, 0.013876128010451794, 0.0173003189265728, -0.07302553206682205, -0.08331122994422913, -0.02535191737115383, 0.011184552684426308, 0.06531799584627151, -0.025914229452610016, 0.030311645939946175, 0.06393332034349442, 0.005712306126952171, 0.04127213731408119, -0.012766239233314991, 0.006260164547711611, 0.002256565261632204, -0.06788954883813858, -0.05323849618434906, 0.018943151459097862, 0.04335569962859154, -0.028747864067554474, -0.014039685018360615, 0.026508700102567673, -0.035005174577236176, -0.010551074519753456, 0.04308290779590607, -0.04924212768673897, 0.0578128844499588, 0.02931959368288517, 0.037455346435308456, -0.010778849944472313, 0.046535953879356384, -0.039472002536058426, 0.04229237511754036, 0.0005080006667412817, -0.014844117686152458, -0.037087708711624146, -0.00886659324169159, 0.13451935350894928, 0.08557063341140747, -0.0022683602292090654, -0.03535739704966545, 0.027387062087655067, -0.007712223567068577, -0.04246952757239342, -0.019839860498905182, -0.026583245024085045, -0.027894558385014534, 0.02129976451396942, -0.06343460828065872, -0.02459690161049366, 0.02888403832912445, -0.04780840873718262, -0.022332988679409027, 0.04273521527647972, -0.006511155050247908, 0.029711946845054626, 0.02614588662981987, -0.01344379410147667, 0.03051809035241604, -0.03350946307182312, -0.026758525520563126, -0.019762244075536728, -0.01130919810384512, -0.004211525432765484, 0.04466427117586136, -0.07039010524749756, -0.007377149537205696, 0.001450954470783472, -0.0016822227044031024, 0.030530128628015518, 0.043954022228717804, 0.039404820650815964, -0.055354125797748566, 0.06474103778600693, -0.03056180849671364, -0.024322807788848877, -0.017050499096512794, -0.0567718930542469, -0.031978167593479156, 0.003730765311047435, 0.019408708438277245, 0.020683564245700836, 0.024572640657424927, 0.0018106981879100204, 0.02908250130712986, 0.0020620590075850487, -0.0020200444851070642, 0.01257034670561552, 0.047798801213502884, 0.010218682698905468, -0.01531333476305008, -0.04323980212211609, -0.006589758209884167, 0.043756138533353806, -0.0337739959359169, -0.025664037093520164, -0.029590407386422157, -0.05606195330619812, 0.05389479920268059, -0.0642600730061531, -0.03393188491463661, 0.005319663789123297, 0.052598606795072556, 0.018484795466065407, -0.01770763471722603, -0.025916503742337227, 0.07403716444969177, 0.01950712688267231, -0.0147953936830163, 0.042753882706165314, 0.0019779163412749767, 0.03491125628352165, -0.011134504340589046, 0.02007840760052204, 0.04910193011164665, 0.01820131205022335, -0.030611788854002953, -0.03818385303020477, -0.01562187634408474, -0.021833933889865875, -0.27692222595214844, 0.030459338799118996, -0.020644064992666245, -0.01653788797557354, 0.013817300088703632, 0.0022850928362458944, -0.025896718725562096, -0.026602599769830704, 0.0018190506380051374, 0.01714826002717018, -0.0367153137922287, -0.02119862474501133, -0.004477709531784058, 0.04471953213214874, 0.00025821596500463784, 0.026300745084881783, -0.02741243690252304, -0.051854152232408524, -0.0009941537864506245, 0.040488023310899734, 0.003431612392887473, -0.047165483236312866, -0.023883942514657974, 0.048090677708387375, -0.0020309817045927048, 0.008149983361363411, -0.06129658967256546, 0.04207950457930565, -0.050526876002550125, -0.025033872574567795, -0.007872218266129494, -0.027829617261886597, 0.015352276153862476, -0.03272322192788124, 0.0168074369430542, -0.055259570479393005, 0.02596004121005535, -0.009870356880128384, -0.011639038100838661, 0.02792135626077652, -0.04273930564522743, -0.04316103085875511, 0.01030558068305254, -0.009973243810236454, 0.08575375378131866, 0.019379151985049248, -0.0481685996055603, -0.04006953537464142, -0.02578258514404297, 0.06929242610931396, 0.002383188344538212, -0.05029507726430893, -0.028792856261134148, 0.009951977990567684, -0.03908872231841087, 0.014358865097165108, 0.0085312994197011, 0.007577221840620041, -0.019389798864722252, -0.008647412061691284, -0.008664324879646301, -0.053061459213495255, 0.01675698347389698, -0.07463831454515457, -0.02907487004995346, -0.046065304428339005, -0.07008708268404007, 0.027426186949014664, 0.05011831596493721, 0.03777746111154556, -0.030436616390943527, 0.010222193785011768, -0.02370043285191059, -0.12555187940597534, 0.00023650673392694443, -0.0033666815143078566, -0.020797759294509888, -0.013943785801529884, -0.020207544788718224, 0.04215964674949646, -0.05698356032371521, -0.04284878075122833, 0.027696453034877777, -0.004421613644808531, -0.005063289776444435, -0.040890246629714966, 0.012187213636934757, -0.03189872205257416, -0.010399953462183475, -0.04610086977481842, 0.04256400465965271, -0.018692918121814728, -0.004770742729306221, -0.01905634254217148, 0.013096878305077553, 0.06740450114011765, 0.009981542825698853, 0.02289411425590515, -0.00016354538092855364, 0.03562160208821297, 0.021273374557495117, -0.06781471520662308, 0.0023855145554989576, -0.02282731421291828, -0.002876842860132456, 0.04338476434350014, -0.049182601273059845, -0.0007904859958216548, 0.054145101457834244, 0.008945485576987267, 0.007939127273857594, -0.031347617506980896, 0.014758908189833164, -0.045229025185108185, 0.012375746853649616, -0.02765846997499466, 0.037370048463344574, 0.01651960052549839, 0.039523862302303314, -0.014411280862987041, -0.06766059249639511, 0.023930015042424202, 0.020628757774829865, -0.02207369916141033, -0.0659959614276886, -0.047341376543045044, 0.0016914650332182646, -0.029956916347146034, 0.01705032028257847, 0.015385881066322327, 0.0016127193812280893, 0.044743046164512634, 0.04152386263012886, -0.005613670218735933, 0.04092215374112129, -0.028658069670200348, -0.006717948243021965, -0.0007187166484072804, -0.01598132960498333, 0.008768116123974323, 0.004588740412145853, -0.0016121644293889403, -0.011163275688886642, 0.027653923258185387, 0.048682112246751785, 0.03155529871582985, 0.01060789730399847, -0.028438275679945946, 0.0035075864288955927, 0.027529316022992134, -0.009939966723322868, -0.031731683760881424, 0.020009351894259453, -0.026136312633752823, -0.02589060179889202, -0.010002993047237396, 0.02845126762986183, -0.0031369237694889307, -0.02268257923424244, -0.03284459188580513, 0.02092919498682022, -0.026026641950011253, 0.009911998175084591, -0.03814689815044403, -0.005806426517665386, 0.03384442627429962, -0.018926328048110008, 0.040832456201314926, -0.0028886995278298855, 0.003390410216525197, -0.0021183770149946213, 0.013626134023070335, -0.0017828397685661912, 0.02403450757265091, -0.011780211701989174, -0.020002543926239014, 0.03865465894341469, 0.05951203405857086, -0.027736252173781395, -0.003921935800462961, 0.004294937942177057, -0.018793346360325813, 0.008069021627306938, -0.02077484503388405, 0.04418320953845978, 0.03686525672674179, -0.028720993548631668, 0.00850015226751566, -0.012640342116355896, -0.04831518232822418, -0.0345454178750515, -0.003625545185059309, -0.030325233936309814, 0.012342168018221855, -0.004953350871801376, -0.07970855385065079, 0.032068103551864624, 0.00035008054692298174, -0.04422017186880112, 0.003767560701817274, 0.012593417428433895, 0.004129160661250353, 0.0004088729911018163, 0.04228825122117996, 0.07129836082458496, -0.03022480197250843, 0.025887275114655495, 0.0022578341886401176, -0.0008510308107361197, -0.009843791835010052, 0.033464230597019196, -0.054328352212905884, -0.01117243617773056, -0.029901554808020592, 0.010433128103613853, 0.002261323155835271, -0.024324694648385048, -0.007680374663323164, 0.02347586490213871, -0.017760949209332466, 0.02317284792661667, -0.008436308242380619, -0.007555533666163683, -0.008144427090883255, -0.0314776748418808, 0.0439106710255146, 0.0026957723312079906, -0.02573072910308838, 0.03427647799253464, -0.02626376785337925, 0.02578122355043888, -0.01984102465212345, 0.0415135994553566, 0.03096117079257965, -0.025413980707526207, -0.029270632192492485, -0.06423905491828918, -0.026185916736721992, -0.03193628787994385, 0.10558868199586868, -0.007766051683574915, 0.002134306589141488, -0.027615664526820183, 0.006690193898975849, -0.046580106019973755, -0.0060769980773329735, 0.01567804254591465, -0.026547249406576157, 0.021912910044193268, 0.06051340326666832, -0.007295817602425814, 0.0215180441737175, -0.0071683041751384735, -0.029227767139673233, 0.0676991418004036, -0.026190951466560364, -0.050367504358291626, -0.045426350086927414, -0.058846116065979004, 0.0170831810683012, -0.005222086329013109, 0.03292544186115265, -0.03756476193666458, 0.05224505066871643, 0.039917122572660446, 0.052728503942489624, 0.0397610068321228, -0.014888101257383823, 0.010639415122568607, -0.036165088415145874, 0.013952241279184818, -0.07831939309835434, -0.024443883448839188, 0.04503238573670387, -0.010356449522078037, -0.01790662109851837, -0.004081094637513161, -0.0701446682214737, 0.015401997603476048, -0.09643521904945374, -0.04039720445871353, 0.05101167410612106, 0.0140518294647336, 0.03425225988030434, 0.008899865671992302, -0.032041583210229874, 0.007566696032881737, 0.047676052898168564, -0.028652464970946312, 0.0052277883514761925, 0.005331103224307299, 0.05791905149817467, 0.012709331698715687, 0.029564686119556427, 0.002126642968505621, -0.0427589975297451, 0.059759512543678284, 0.013948719017207623, 0.012428082525730133, 0.06679613888263702, -0.027517732232809067, 0.02216147631406784, 0.0066833412274718285, -0.01853851228952408, -0.014977585524320602, 0.026133690029382706, 0.009468999691307545, -0.053351014852523804, 0.0247974693775177, 0.01283406000584364, 0.03279466554522514, -0.04657825827598572, 0.07669910043478012, 0.002102034632116556, -0.029369736090302467, -0.0424717515707016, 0.015092570334672928, -0.06104058399796486, -0.019316524267196655, -0.020044397562742233, 0.016681114211678505, -0.0322229377925396, 0.07787777483463287, -0.007279398385435343, 0.004153236281126738, 0.07678573578596115, -0.023823820054531097, -0.010285728611052036, 0.04758080467581749, 0.0772189125418663, 0.09483212977647781, 0.05459791049361229, 0.003433606121689081, 0.04959430918097496, -0.03356199339032173, -0.02696889452636242, -0.027607517316937447, -0.0484415702521801, 0.009927847422659397, 0.004010783042758703, 0.024139393121004105, 0.0711732804775238, -0.030175285413861275, 0.06433909386396408, -0.020278213545680046, 0.04474079608917236, -0.004002425353974104, 0.0008925587753765285, 0.02090516872704029, 0.034873250871896744, -0.02805846929550171, 0.03477155417203903, 0.002912383060902357, -0.04272310435771942, -0.0033399309031665325, 0.031560901552438736, -0.04317288100719452, 0.025861697271466255, -0.025450896471738815, 0.021129446104168892, 0.020914889872074127, 0.03453174605965614, 0.08520587533712387, -0.018221044912934303, -0.0426529236137867, -0.009479772299528122, 0.021653154864907265, -0.01916399411857128, 0.009107005782425404, -0.0006161666242405772, -0.01335822232067585, 0.002628069370985031, -0.041516661643981934, -0.01213630847632885, -0.00878421775996685, -0.012768899090588093, 0.023082168772816658, -0.0035813148133456707, 0.011650239117443562, 0.01595350354909897, 0.0390300415456295, -0.08402347564697266, -0.031250253319740295, -0.08284174650907516, -0.036159973591566086, -0.05548207834362984, -0.017023859545588493, 0.029333746060729027, 0.008200175128877163, -0.022390583530068398, -0.045760978013277054, -0.033517420291900635, 0.010705975815653801, -0.012549467384815216, -0.05015122517943382, -0.025036578997969627, 0.018817568197846413, 0.042965322732925415, 0.03158678114414215, -0.00018452179210726172, 0.049276288598775864, 0.011458219029009342, -0.008046752773225307, -0.013004853390157223, 0.006099557038396597, 0.07092917710542679, 0.029303215444087982, -0.0029751649126410484, -0.06362076848745346, 0.0339515395462513, 0.02123202197253704, -0.0040936581790447235, -0.0769045427441597, -0.0042768558487296104, 0.05710475891828537, 0.0026290835812687874, 0.048666782677173615, -0.03967127203941345, -0.005953132174909115, -0.04473882168531418, -0.032153282314538956, -0.014623647555708885, 0.011946055106818676, 0.037942372262477875, -0.04454757273197174, 0.08971056342124939, 0.02897946909070015, -0.0075488160364329815, -0.03671131283044815, 0.0044199079275131226, -0.029123879969120026, 0.03162560984492302, -0.04529106616973877, -0.01856834441423416, -0.024561623111367226, -0.053117282688617706, 0.007692771498113871, 0.04041089490056038, -0.026941776275634766, -0.028875013813376427, 0.009149382822215557, 0.020402871072292328, -0.04068239778280258, 0.018324002623558044, -0.042143456637859344, 0.019100170582532883, -0.019685830920934677, -0.031200909987092018, -0.017543664202094078, 0.05472953990101814, -0.0028414675034582615, 0.003416525898501277, 0.01824892871081829, -0.010223761200904846, -0.0236266627907753, -0.02638174779713154, 0.04350593686103821, 0.052427202463150024, -0.03727220371365547, -0.006584387272596359 ]
[ -0.09360798448324203, -0.03743308037519455, -0.032077714800834656, -0.029559383168816566, 0.06446216255426407, -0.055272381752729416, 0.027401842176914215, -0.019817303866147995, 0.021164918318390846, 0.001086625037714839, 0.002973180031403899, -0.06665168702602386, 0.018469011411070824, 0.0013163258554413915, 0.0511188805103302, -0.003908833488821983, 0.024076443165540695, -0.037904806435108185, -0.03183554857969284, 0.016581358388066292, 0.03576609492301941, -0.018531175330281258, -0.06413887441158295, -0.04298117011785507, -0.006843958515673876, 0.05548783019185066, 0.05562101677060127, -0.03125893324613571, -0.034808892756700516, -0.22809965908527374, 0.03399993106722832, -0.02722642943263054, 0.030567321926355362, -0.030652418732643127, 0.035332776606082916, 0.020037353038787842, 0.01667257957160473, 0.03616684675216675, -0.007405573967844248, 0.042075566947460175, 0.035747312009334564, -0.02552119828760624, -0.06125254929065704, 0.002383506391197443, 0.01670529507100582, 0.00452765915542841, -0.0303328987210989, -0.01366288773715496, -0.0029287715442478657, 0.0210332702845335, -0.06264908611774445, 0.008167712017893791, -0.024328766390681267, -0.011112402193248272, -0.012354405596852303, 0.018606659024953842, 0.041271403431892395, 0.05088409408926964, 0.024315916001796722, 0.00510420510545373, 0.03687899187207222, -0.005553262773901224, -0.11789686977863312, 0.08339035511016846, 0.04381828382611275, 0.04090812802314758, -0.017869289964437485, -0.02641916647553444, -0.027507120743393898, 0.06659296154975891, -0.0018029336351901293, -0.022468043491244316, -0.0382365845143795, 0.06800241023302078, 0.003604527562856674, -0.07224399596452713, 0.015552829019725323, -0.00301939994096756, 0.033974241465330124, 0.004262218717485666, -0.08624819666147232, -0.0022868970409035683, -0.008115410804748535, -0.028566617518663406, -0.020258016884326935, -0.01882023736834526, -0.001714720856398344, 0.05209610238671303, 0.02229331247508526, -0.007946949452161789, 0.02370343543589115, -0.026331858709454536, 0.02081102505326271, 0.05034966766834259, -0.0385025218129158, 0.009682229720056057, -0.020752733573317528, 0.00349567667581141, -0.014524869620800018, 0.42442721128463745, -0.011674409732222557, 0.037757158279418945, 0.002757025184109807, 0.0034698329400271177, 0.028028875589370728, 0.0008645408670417964, -0.023131664842367172, -0.02405071072280407, -0.000553236051928252, -0.02531944215297699, 0.021983090788125992, 0.008597762323915958, 0.08843334019184113, -0.04498360678553581, 0.011209515854716301, 0.029122203588485718, 0.0073434701189398766, 0.04696757346391678, -0.010419118218123913, 0.02210092730820179, -0.03912061080336571, -0.008736676536500454, 0.03569696843624115, -0.015393923968076706, -0.011380634270608425, 0.02403191663324833, 0.043335217982530594, 0.045707494020462036, 0.033036310225725174, 0.04342414438724518, 0.027596041560173035, -0.055642563849687576, -0.0942838117480278, 0.00664865504950285, -0.022955620661377907, 0.017307119444012642, 0.028177129104733467, -0.03771131485700607, 0.004376608412712812, -0.01563294418156147, -0.01978401467204094, -0.04043741896748543, 0.033046022057533264, -0.03022482618689537, -0.009014150127768517, 0.17567193508148193, -0.03766731917858124, -0.023016346618533134, -0.04579325020313263, -0.02404027432203293, -0.011097397655248642, 0.010324297472834587, -0.009806136600673199, -0.08760686218738556, 0.006124323699623346, 0.015116066671907902, 0.08664451539516449, -0.033045150339603424, -0.015985794365406036, 0.005811218172311783, -0.021248329430818558, -0.06794705986976624, -0.025008361786603928, 0.04801984131336212, 0.04255659505724907, -0.1050494983792305, -0.031901825219392776, 0.011446460150182247, -0.013287384994328022, -0.062296461313962936, 0.019651297479867935, 0.042482856661081314, -0.026921387761831284, 0.01596914231777191, 0.0489940345287323, -0.045162271708250046, -0.013817872852087021, -0.004505789838731289, 0.08190759271383286, -0.0055150557309389114, -0.02731725014746189, -0.024220261722803116, -0.04003278166055679, -0.028781546279788017, -0.018073542043566704, -0.07532387226819992, -0.06405306607484818, 0.0033086263574659824, -0.015301620587706566, 0.007082105614244938, -0.045754458755254745, -0.045215580612421036, -0.05053571239113808, 0.06586963683366776, -0.006902971304953098, -0.04557514935731888, 0.020395228639245033, 0.02159002237021923, -0.03483142331242561, 0.013529633171856403, 0.011391918174922466, 0.03326023370027542, 0.01949320361018181, 0.04246119409799576, -0.051311202347278595, 0.0037332680076360703, -0.014797080308198929, -0.03294965997338295, 0.05262050777673721, 0.026856033131480217, -0.013722596690058708, -0.010148104280233383, -0.012618955224752426, 0.006717409007251263, -0.006279050372540951, -0.04457472637295723, 0.024589765816926956, 0.0034491128753870726, 0.04803638905286789, 0.04855065420269966, -0.03175830841064453, -0.09321369230747223, -0.01823299005627632, -0.35155627131462097, -0.034834329038858414, -0.022235486656427383, -0.023215357214212418, -0.01217885036021471, -0.03173869848251343, -0.002572466619312763, -0.01691965013742447, -0.02478175237774849, 0.028978630900382996, 0.09689538925886154, -0.013622747734189034, 0.01468138862401247, -0.04925062879920006, -0.009860123507678509, 0.031128251925110817, -0.0435088686645031, -0.03647206351161003, -0.04126965254545212, 0.03542628884315491, 0.0021980716846883297, -0.017340628430247307, -0.019706109538674355, -0.02712780050933361, -0.009219757281243801, -0.04312090575695038, 0.12613917887210846, -0.002575310179963708, 0.06569905579090118, -0.03791441768407822, 0.04628264531493187, 0.039055708795785904, 0.01056768000125885, -0.07422303408384323, -0.009921341203153133, -0.005541922524571419, -0.041025348007678986, 0.0030814397614449263, -0.013387112878262997, -0.01872449554502964, -0.06663873046636581, 0.03356795758008957, -0.024457212537527084, -0.0457582026720047, 0.0020040245726704597, -0.010015245527029037, -0.003233404364436865, -0.009810343384742737, 0.03299469128251076, 0.054208431392908096, 0.014657111838459969, 0.02828221581876278, 0.020329603925347328, 0.035290759056806564, 0.017689231783151627, -0.024023322388529778, -0.0356852263212204, -0.048628684133291245, -0.022839533165097237, -0.03370315581560135, 0.01970415934920311, -0.008041338063776493, 0.04870149865746498, -0.04383673518896103, -0.029030393809080124, 0.0037238672375679016, -0.02000296674668789, 0.0038910347502678633, 0.01736016944050789, -0.017556019127368927, -0.03911760076880455, 0.07637999951839447, 0.011576317250728607, 0.04276837036013603, 0.0227613877505064, 0.04984407499432564, -0.02167375013232231, 0.05586962029337883, 0.0386027917265892, -0.02312760427594185, 0.05102861300110817, -0.028999321162700653, 0.062286291271448135, -0.04698764532804489, 0.03264986723661423, 0.03838342800736427, 0.0003653962048701942, 0.05478872358798981, 0.03131283074617386, 0.02948940172791481, -0.000876419828273356, -0.007539175916463137, -0.039347026497125626, -0.01328546367585659, 0.06940820068120956, -0.00872021447867155, -0.2513795793056488, 0.09719113260507584, 0.03215606510639191, 0.04758278653025627, 0.03767596185207367, 0.019275253638625145, 0.055445346981287, -0.023352796211838722, 0.01997491903603077, 0.018120676279067993, 0.017491010949015617, 0.06480833888053894, 0.024783935397863388, -0.027975857257843018, -0.00930296815931797, 0.010897163301706314, 0.04410233721137047, 0.00450998917222023, -0.004826237913221121, 0.03830912336707115, 0.01996871829032898, 0.013577890582382679, 0.17143693566322327, 0.02863495424389839, 0.010323388502001762, 0.011811967939138412, -0.014124776236712933, 0.04116453230381012, 0.035328593105077744, 0.04281250387430191, 0.025849537923932076, -0.030640173703432083, 0.06112370267510414, -0.013245944865047932, 0.03371221572160721, -0.053300678730010986, 0.02239544875919819, 0.0012090079253539443, 0.03926757350564003, -0.016089534386992455, -0.015434096567332745, -0.003526422195136547, -0.07810328900814056, 0.01731686107814312, 0.06318563222885132, -0.01179212424904108, -0.00932262558490038, -0.05926428362727165, -0.023850494995713234, 0.028543604537844658, 0.004678689409047365, -0.01414734311401844, -0.02440643683075905, 0.002105691470205784, 0.018419962376356125, 0.0464177280664444, 0.019986338913440704, -0.008714896626770496, -0.014129326678812504, 0.014365555718541145, -0.01947069726884365, -0.04958346486091614, 0.10960166156291962, 0.0078733516857028, -0.002930684946477413 ]
[ -0.0011157140834257007, 0.027855457738041878, -0.004638886544853449, 0.03475307300686836, -0.01382778026163578, -0.057896938174963, 0.026092324405908585, 0.010312422178685665, 0.0047186799347400665, -0.0295398011803627, -0.026587875559926033, 0.03894761949777603, 0.0025187204591929913, -0.023098303005099297, -0.013406605459749699, -0.024271832779049873, -0.009821681305766106, -0.00853392668068409, 0.00713362218812108, -0.03442399948835373, -0.01806376688182354, 0.041921086609363556, 0.03003849647939205, 0.010400132276117802, -0.01617356576025486, 0.009814420714974403, -0.011115314438939095, 0.0020706867799162865, 0.01621324196457863, -0.09783841669559479, 0.0029873549938201904, -0.03674081340432167, -0.007517453283071518, -0.02022254280745983, 0.0032349522225558758, -0.007292782887816429, -0.019030727446079254, -0.04897182807326317, -0.0065567889250814915, 0.00723924208432436, 0.021706409752368927, 0.005901568103581667, -0.02825581282377243, 0.0008937554084695876, -0.02844439260661602, -0.007817156612873077, -0.035939812660217285, -0.006219552829861641, -0.032330989837646484, 0.010174344293773174, -0.036797478795051575, 0.03627975285053253, -0.002370494417846203, 0.02958330698311329, 0.047695938497781754, -0.03043401427567005, -0.05549843981862068, -0.014833512715995312, -0.014205300249159336, -0.005472030956298113, 0.029477134346961975, 0.023814404383301735, -0.02109558694064617, -0.03880447521805763, -0.006055161356925964, -0.04040135443210602, 0.009143657982349396, 0.0016956912586465478, 0.026194842532277107, -0.028061801567673683, -0.006053056102246046, 0.0030502984300255775, -0.021339528262615204, -0.04105806350708008, -0.0012247002450749278, -0.0032265905756503344, 0.0255427286028862, -0.04874834418296814, -0.03182698041200638, 0.00506385276094079, -0.06085450202226639, 0.030852394178509712, 0.005003137979656458, 0.024903589859604836, 0.007710294798016548, -0.06782493740320206, -0.019837239757180214, 0.042112965136766434, -0.03626623377203941, 0.0011302800849080086, -0.039560768753290176, -0.014776049181818962, 0.02131609246134758, -0.011245587840676308, -0.039086077362298965, 0.0371098518371582, 0.007875173352658749, -0.007392018102109432, -0.02368914522230625, 0.8316921591758728, -0.017089158296585083, 0.02783818356692791, 0.014175847172737122, 0.0019119814969599247, 0.005872033070772886, -0.01000132318586111, -0.02647191286087036, 0.0067403726279735565, 0.004572218284010887, -0.026330919936299324, 0.021169070154428482, 0.03243058919906616, 0.03527315706014633, 0.021459205076098442, 0.018148386850953102, 0.027089644223451614, 0.011805320158600807, 0.015658549964427948, 0.019197482615709305, 0.037079792469739914, 0.02265872247517109, -0.016092954203486443, 0.007962610572576523, 0.03628400340676308, 0.03207549452781677, -0.14034689962863922, 0.01242480706423521, -7.168217448560096e-33, 0.03863203898072243, -0.030335593968629837, 0.0021257365588098764, -0.021796483546495438, 0.049989908933639526, -0.003649989841505885, 0.003750935662537813, -0.016683068126440048, 0.0019822949543595314, -0.027178095653653145, 0.03073759563267231, -0.007185228634625673, 0.03142973780632019, -0.03253186494112015, 0.03461964800953865, -0.03903651237487793, -0.01771647110581398, 0.07719603925943375, -0.0005366230616346002, -0.0037660428788512945, 0.010824439115822315, 0.021780025213956833, 0.008788703009486198, 0.023618599399924278, 0.011818940751254559, -0.005767230875790119, -0.02428019978106022, -0.010040981695055962, -0.008413050323724747, -0.03215370699763298, -0.04107773303985596, 0.018911555409431458, 0.012499812059104443, -0.055988796055316925, 0.023838896304368973, -0.04458964988589287, -0.03486444056034088, -0.006294354796409607, -0.038356516510248184, -0.0633435845375061, 0.008778956718742847, 0.003060423769056797, 0.0050294664688408375, -0.012059957720339298, -0.04510742798447609, 0.02800367958843708, -0.006794034503400326, 0.04085930436849594, -0.0007546888664364815, -0.0005512938951142132, 0.011348111554980278, 0.014230391941964626, 0.04433722794055939, -0.018221667036414146, -0.015189478173851967, 0.0031245960853993893, 0.023008616641163826, 0.02176966704428196, 0.012777289375662804, 0.012154619209468365, -0.02668134868144989, -0.01020862441509962, 0.00555299362167716, 0.06104670464992523, 0.00461309589445591, -0.02906673774123192, 0.044492561370134354, 0.014692421071231365, 0.025216946378350258, 0.004935722332447767, -0.06323067098855972, 0.02316298894584179, -0.046325720846652985, -0.013580423779785633, -0.004702783655375242, -0.03727928549051285, -0.007876478135585785, 0.0020088041201233864, -0.01906043104827404, 0.015068366192281246, -0.004054900258779526, 0.002249164506793022, 0.03734361007809639, -0.018048234283924103, -0.012118496000766754, 0.008343775756657124, -0.006514556240290403, 0.02237214893102646, 0.01804765686392784, -0.03216994181275368, 0.019124923273921013, 0.026087841019034386, 0.02582765929400921, -0.04918596148490906, -0.005981466732919216, 7.227369793661412e-33, -0.017703624442219734, 0.0031200069934129715, 0.008949242532253265, 0.0033592465333640575, 0.002688300795853138, -0.04270550608634949, 0.017935706302523613, 0.03519070893526077, -0.03567243739962578, 0.04526996612548828, -0.00026060035452246666, -0.003743462497368455, -0.013862555846571922, 0.026304587721824646, 0.05851784348487854, 0.01021890714764595, 0.0005256752483546734, 0.0007126581622287631, 0.05783578008413315, 0.028624750673770905, -0.0441632978618145, -0.0031760702840983868, 0.014479651115834713, -0.01959948241710663, -0.02610030584037304, 0.055279359221458435, -0.008474883623421192, -0.0068006208166480064, -0.019727040082216263, -0.021327076479792595, -0.007605257444083691, -0.002147053834050894, -0.00612680334597826, -0.04791407659649849, -0.0457027293741703, 0.03496333956718445, 0.003088508266955614, -0.05467928946018219, 0.00792655348777771, -0.010617103427648544, 0.061380840837955475, 0.015593967400491238, 0.027021026238799095, 0.03160221874713898, -0.013055434450507164, -0.027288295328617096, 0.016191372647881508, 0.0265741478651762, -0.026257790625095367, -0.008266991004347801, -0.0019958948250859976, 0.032127223908901215, 0.011692478321492672, 0.02254158817231655, 0.02370215207338333, -0.017376894131302834, -0.03366530314087868, -0.0013341062003746629, -0.06372901797294617, -0.012151196599006653, -0.027321485802531242, 0.005219712853431702, 0.02370312623679638, 0.03595763444900513, -0.016196098178625107, -0.03347830846905708, -0.05700847879052162, -0.027344390749931335, -0.019646497443318367, -0.02711334079504013, -0.005370668135583401, -0.012376600876450539, 0.007033257745206356, 0.02393583580851555, 0.009186018258333206, -0.0017976646777242422, -0.029717182740569115, 0.01966789923608303, 0.008122066035866737, 0.0303121879696846, 0.02218993566930294, 0.0009185717208310962, 0.0052246227860450745, -0.0043977233581244946, 0.013947789557278156, -0.0113528398796916, -0.0068031735718250275, 0.029347486793994904, -0.008939435705542564, -0.01443449966609478, -0.025065498426556587, -0.032577935606241226, 0.013397513888776302, 0.04396621137857437, 0.023876115679740906, -1.2673478266833627e-8, -0.013478154316544533, 0.04526316002011299, -0.03596124053001404, 0.05820245295763016, 0.03645726665854454, 0.011986395344138145, -0.05198144540190697, 0.0051798103377223015, 0.00675838952884078, 0.012094157747924328, 0.039637647569179535, -0.042297378182411194, 0.0008531328639946878, 0.010155027732253075, 0.016218435019254684, -0.04370945319533348, -0.018765395507216454, -0.021699201315641403, 0.025598417967557907, -0.00003217296034563333, 0.0013315282994881272, 0.015930676832795143, 0.026628971099853516, -0.014088070020079613, 0.006065521854907274, -0.0034069307148456573, 0.05896087735891342, -0.053036272525787354, -0.002265364397317171, -0.00958107691258192, -0.01548488438129425, -0.02882627211511135, -0.004072993528097868, 0.06207957863807678, 0.009017961099743843, -0.038005199283361435, -0.010038825683295727, 0.006324854679405689, 0.030125092715024948, 0.019420521333813667, 0.005729637574404478, -0.00549046928063035, 0.00672920374199748, -0.022837046533823013, -0.01638711243867874, 0.0024399440735578537, -0.0421183742582798, 0.07398282736539841, 0.04231364652514458, -0.003590492531657219, -0.01583588309586048, -0.03320154920220375, 0.03545473888516426, -0.009345099329948425, 0.08021027594804764, 0.03471764922142029, 0.03211192041635513, -0.007813806645572186, -0.014238711446523666, 0.014344441704452038, 0.041732508689165115, 0.022171275690197945, -0.050499845296144485, -0.024091186001896858 ]
python-lambda-expression-tuple
https://markhneedham.com/blog/2023/06/06/python-lambda-expression-tuple
false
2023-06-06 02:44:37
Kafka/Kubernetes: Failed to resolve: nodename nor servname provided, or not known
[ "til", "kubernetes", "kafka" ]
[ "TIL" ]
I've been trying out the https://docs.pinot.apache.org/basics/getting-started/kubernetes-quickstart[Running Pinot in Kubernetes^] tutorial and ran into a problem trying to write data to Kafka. In this blog we'll explore how I got around that problem. I'm using Helm with Kubernetes and started a Kafka service by running the following: [source, bash] ---- helm repo add kafka https://charts.bitnami.com/bitnami helm install -n pinot-quickstart kafka kafka/kafka --set replicas=1,zookeeper.image.tag=latest ---- I waited until the service had started and then ran the following command to port forward the Kafka service's port 9092 to port 9092 on my host OS: [source, bash] ---- kubectl port-forward service/kafka-headless 9092:9092 -n pinot-quickstart ---- I then ran a script that attempted to write some data into Kafka: [source, bash] ---- python datagen.py --sleep 0.0001 2>/dev/null | jq -cr --arg sep ø '[.uuid, tostring] | join($sep)' | kcat -P -b localhost:9092 -t events -Kø ---- This hung for a few seconds before throwing the following error: .Output [source, text] ---- %3|1685969550.862|FAIL|rdkafka#producer-1| [thrd:kafka-0.kafka-headless.pinot-quickstart.svc.cluster.local:9092/]: kafka-0.kafka-headless.pinot-quickstart.svc.cluster.local:9092/0: Failed to resolve 'kafka-0.kafka-headless.pinot-quickstart.svc.cluster.local:9092': nodename nor servname provided, or not known (after 5002ms in state CONNECT) ---- I'd assumed that all I needed to do was map the port, but it seems like it tries to resolve the hostname, which isn't known by the host OS. A workaround for this issue is to https://github.com/bitnami/charts/issues/1021[update your `/etc/hosts`^] file: ``` 127.0.0.1 kafka-0.kafka-headless.pinot-quickstart.svc.cluster.local ``` If your Kafka has a different host name, be sure to change the second argument appropriately.
In this post we'll learn how to work around a problem when trying to write from the host OS to Kafka running inside Kubernetes.
uploads/2023/06/k8s-kafka-banner.png
[ -0.029192732647061348, -0.03465353697538376, -0.020820707082748413, 0.04348096251487732, 0.07877234369516373, -0.0017509697936475277, 0.02187737450003624, 0.048432596027851105, 0.0001843946083681658, -0.0169659610837698, -0.011229876428842545, -0.014554422348737717, -0.04221055656671524, 0.03693687170743942, 0.022050641477108, 0.044043757021427155, 0.08727442473173141, -0.0017243772745132446, 0.03615644574165344, -0.02001667581498623, 0.03315984085202217, 0.05680638179183006, 0.02005925215780735, 0.06331557780504227, 0.03662911802530289, 0.00008071347110671923, -0.024731799960136414, 0.008732467889785767, -0.043845925480127335, 0.015607276931405067, 0.004840543493628502, 0.015842879191040993, 0.0028094039298594, -0.023821864277124405, 0.009572536684572697, -0.016493801027536392, 0.005839416291564703, 0.009896669536828995, 0.015512791462242603, 0.013011082075536251, -0.050546325743198395, 0.029713274911046028, 0.007514046970754862, 0.012088948860764503, 0.016080571338534355, 0.028204023838043213, -0.011454811319708824, 0.0012261784868314862, 0.025365380570292473, -0.03432817757129669, -0.10005848854780197, 0.016793709248304367, -0.0059371585957705975, 0.013526570983231068, 0.01871342584490776, 0.034904561936855316, -0.019039643928408623, -0.058872029185295105, 0.03330690786242485, -0.027559379115700722, -0.020499492064118385, -0.02368471957743168, 0.00842560175806284, 0.030971365049481392, 0.019610172137618065, -0.03084094263613224, -0.008854675106704235, 0.05098458379507065, -0.019816389307379723, -0.02234604023396969, 0.02193554863333702, -0.003765957662835717, -0.005528084002435207, -0.009427972137928009, 0.040714774280786514, -0.06491144001483917, -0.0033745754044502974, 0.04652828723192215, 0.03914700448513031, 0.05518432334065437, -0.019457943737506866, -0.023184116929769516, -0.027518149465322495, 0.012490056455135345, 0.004478449001908302, -0.044078536331653595, -0.03373340144753456, -0.01808708906173706, -0.05577244982123375, 0.09110166132450104, 0.03456989303231239, -0.04001176729798317, -0.012092836201190948, -0.007115566171705723, 0.0005584052414633334, 0.013254353776574135, 0.001639032270759344, 0.03357977792620659, 0.015528473071753979, -0.009656289592385292, -0.011045262217521667, 0.04483940452337265, 0.0020578685216605663, 0.061584118753671646, -0.07086734473705292, -0.04678747057914734, -0.025955066084861755, -0.01612911932170391, 0.012182818725705147, 0.018854890018701553, -0.015164995566010475, -0.012172342278063297, -0.02278665266931057, 0.03259638696908951, -0.07953153550624847, 0.09353978931903839, 0.018458304926753044, -0.04335281252861023, 0.04050812870264053, 0.005908667109906673, 0.02411123923957348, 0.025688612833619118, -0.04409660026431084, 0.07164519280195236, -0.04822526127099991, 0.024886153638362885, -0.00891665369272232, 0.03170947730541229, -0.011330708861351013, -0.06490670889616013, -0.00856765080243349, 0.057979341596364975, 0.03148608282208443, 0.007557112257927656, -0.003389578079804778, 0.0017330683767795563, -0.005273585207760334, 0.007715368177741766, 0.05132682994008064, 0.053228240460157394, -0.006523517891764641, -0.034793920814991, 0.004613116849213839, 0.005619841627776623, 0.046948257833719254, 0.017950348556041718, 0.013389011844992638, -0.05039877071976662, -0.0317358523607254, 0.0117962546646595, -0.023179225623607635, 0.030630188062787056, 0.04346799477934837, -0.01568896323442459, -0.0004804803756996989, 0.059836167842149734, 0.010225791484117508, 0.025968948379158974, -0.00031637074425816536, -0.007904088124632835, 0.034127335995435715, 0.04608001932501793, 0.032110486179590225, 0.033499475568532944, 0.014354820363223553, -0.07765785604715347, -0.00956417340785265, 0.02523794025182724, -0.00441014626994729, -0.004556865431368351, -0.055115338414907455, -0.027654465287923813, 0.041867490857839584, -0.04235709831118584, 0.03955696150660515, 0.02236771397292614, 0.09035748988389969, 0.021952802315354347, 0.022275475785136223, 0.035474974662065506, -0.0662936270236969, 0.04592231661081314, 0.0028977170586586, -0.012359452433884144, 0.005740954540669918, -0.005093651823699474, 0.04858735203742981, 0.03213375434279442, 0.0207626074552536, 0.018253682181239128, -0.07004895061254501, -0.06406527757644653, -0.03080708160996437, 0.02199392020702362, 0.06641124933958054, -0.02154725417494774, -0.012071510776877403, 0.0372341014444828, 0.02036205865442753, 0.01645832695066929, 0.0032671198714524508, 0.0038618301041424274, 0.023514190688729286, -0.09056130051612854, -0.06972074508666992, 0.042893748730421066, -0.007227614056318998, -0.05163443833589554, -0.027314696460962296, -0.017075203359127045, -0.06257228553295135, 0.01022571325302124, 0.05699319764971733, -0.029936594888567924, 0.06115319952368736, 0.023708192631602287, 0.032455507665872574, -0.02319408394396305, 0.05947115644812584, -0.03845904767513275, 0.0394594706594944, 0.008010536432266235, 0.0014366849791258574, -0.0028238496743142605, 0.0014006918063387275, 0.09446333348751068, 0.06091747805476189, -0.014330600388348103, -0.06050034984946251, 0.06217047944664955, 0.015183977782726288, -0.03782770037651062, -0.002566130831837654, -0.013772848062217236, -0.02714904211461544, 0.004586856346577406, -0.036211080849170685, -0.026674138382077217, 0.00218437728472054, -0.0205861646682024, 0.004193691071122885, 0.07201482355594635, -0.03435565158724785, 0.07799095660448074, 0.038632843643426895, -0.01260856818407774, 0.025291496887803078, -0.03357521817088127, -0.0781124010682106, -0.02052455209195614, -0.024773839861154556, -0.016617897897958755, 0.051804766058921814, -0.06443149596452713, -0.05070396512746811, -0.051493797451257706, -0.0587318018078804, 0.02085082046687603, 0.011799412779510021, 0.03433721885085106, -0.02168131433427334, 0.04027296230196953, -0.05227423831820488, -0.0099925696849823, -0.0022013939451426268, -0.03531889244914055, 0.014680160209536552, 0.024163074791431427, 0.002419558120891452, 0.0043339175172150135, 0.01638689823448658, -0.043165672570466995, 0.041029199957847595, -0.025014961138367653, 0.011097006499767303, 0.006802807562053204, 0.029925422742962837, 0.005182027351111174, 0.009855471551418304, -0.008869888260960579, -0.012533084489405155, 0.04681313782930374, -0.07834447175264359, 0.0019880877807736397, 0.03193085640668869, -0.06610853970050812, 0.025652611628174782, -0.04952387511730194, -0.03661012277007103, -0.04110409691929817, 0.017862660810351372, 0.0025230469182133675, 0.020852824673056602, -0.010307799093425274, 0.05647424980998039, 0.021204885095357895, -0.007775904145091772, 0.018245311453938484, -0.02411545440554619, 0.02414090186357498, -0.00912848673760891, 0.03612298145890236, 0.06174691766500473, -0.012531142681837082, -0.02077193185687065, -0.03327920287847519, 0.028427816927433014, -0.055687133222818375, -0.2503949999809265, 0.05168169364333153, 0.00695157190784812, -0.023800626397132874, 0.04162471741437912, -0.011212050914764404, -0.0011133052175864577, -0.026524262502789497, 0.005552459042519331, 0.007789278868585825, -0.03342839330434799, -0.013638481497764587, -0.027989158406853676, 0.036899007856845856, -0.00313700083643198, 0.007169502787292004, -0.017484640702605247, -0.03829646855592728, 0.01701723225414753, -0.024483058601617813, -0.036506108939647675, -0.04087325558066368, -0.01698225922882557, 0.037363529205322266, 0.020709481090307236, 0.018834544345736504, -0.06641029566526413, 0.0742746889591217, -0.03122836910188198, -0.019072767347097397, -0.02405303530395031, -0.04082165285944939, 0.006431083660572767, 0.0303520318120718, 0.02864740416407585, -0.03481758013367653, 0.01818644069135189, 0.013515382073819637, 0.036580640822649, 0.023772597312927246, -0.04287654161453247, -0.07283257693052292, 0.015457342378795147, 0.019080013036727905, 0.09336763620376587, -0.00875572394579649, -0.08095359057188034, 0.00039943549199961126, -0.04091659188270569, 0.07109703868627548, -0.02883807383477688, -0.07296036928892136, -0.030872296541929245, 0.010063611902296543, -0.014718960039317608, 0.022994259372353554, 0.00630167918279767, 0.018723145127296448, -0.031137019395828247, 0.0014705803478136659, -0.009259042330086231, -0.027481425553560257, -0.0005310121923685074, -0.08459965884685516, -0.01997150294482708, -0.04945395141839981, -0.05282824486494064, 0.02241770550608635, 0.07012226432561874, -0.0036951852962374687, -0.059839460998773575, 0.00046509879757650197, -0.013389643281698227, -0.10915790498256683, 0.00592225044965744, -0.05738498643040657, -0.043571680784225464, -0.010901260189712048, -0.02957645244896412, 0.04446236789226532, -0.01874398998916149, -0.035760730504989624, 0.015929918736219406, -0.008410105481743813, 0.0315360464155674, -0.021008390933275223, -0.003166715381667018, -0.04044436290860176, 0.017257435247302055, -0.004653786774724722, 0.06094418093562126, -0.045485250651836395, -0.012249148450791836, -0.0246486347168684, -0.022665653377771378, 0.052373308688402176, -0.024456031620502472, 0.007202648092061281, -0.011827555485069752, 0.028429320082068443, 0.036016568541526794, -0.038505759090185165, 0.00004633709249901585, -0.021089749410748482, -0.00037790744681842625, -0.004663287661969662, -0.06785351037979126, 0.030463797971606255, 0.0369790680706501, 0.04135468974709511, 0.020655114203691483, -0.03120032511651516, 0.006646112073212862, -0.07412588596343994, -0.014605154283344746, 0.006963339634239674, 0.02638005092740059, 0.04861798509955406, 0.020650560036301613, -0.011740973219275475, -0.0549633726477623, 0.002559407614171505, 0.038177892565727234, -0.013475819490849972, 0.0056635672226548195, -0.028051957488059998, 0.010953119955956936, -0.013372020795941353, 0.015410954132676125, 0.016010714694857597, 0.007573525886982679, 0.02252422459423542, 0.0675443708896637, -0.011380861513316631, 0.007906818762421608, -0.030476035550236702, -0.04355053976178169, -0.031823109835386276, 0.02262973040342331, 0.011356151662766933, -0.03973519429564476, -0.01586488075554371, -0.010509303770959377, 0.02791786380112171, 0.037562254816293716, 0.002595959696918726, 0.014817841351032257, -0.017950696870684624, 0.01571572758257389, 0.02697889506816864, 0.016031531617045403, 0.008298897184431553, -0.024803027510643005, -0.01289097499102354, -0.03771376609802246, 0.0044136252254247665, 0.055250659584999084, -0.001189140835776925, -0.036599062383174896, -0.03991995006799698, 0.007833385840058327, -0.08560480922460556, -0.005746743176132441, -0.0010612980695441365, 0.004196171648800373, 0.020988916978240013, -0.003951347433030605, 0.012230978347361088, 0.017744949087500572, -0.012305324897170067, -0.015752967447042465, -0.02162431739270687, -0.04278157651424408, 0.03247388079762459, -0.010010709054768085, 0.016890816390514374, 0.04141606017947197, 0.021241189911961555, 0.03488640859723091, -0.027745123952627182, 0.028665218502283096, -0.009130239486694336, 0.03372134640812874, -0.006412513554096222, 0.03309449180960655, 0.041311509907245636, -0.05374599248170853, 0.024436654523015022, -0.009755800478160381, -0.010866147466003895, -0.0010629963362589478, 0.0019884391222149134, -0.009142184630036354, 0.037133362144231796, 0.006778232287615538, -0.057631418108940125, 0.04628453403711319, 0.01783103682100773, 0.016826186329126358, 0.03511114418506622, -0.03243357688188553, 0.02371249534189701, -0.03495548665523529, 0.036943934857845306, 0.1084713414311409, -0.0439675971865654, 0.02910645119845867, -0.024719113484025, 0.019099082797765732, -0.003958963323384523, 0.025660835206508636, -0.04401809722185135, -0.01666555181145668, 0.016356773674488068, 0.019280195236206055, -0.06480477005243301, -0.043766994029283524, -0.036709606647491455, 0.0008186236955225468, 0.041245635598897934, 0.023540982976555824, 0.008290266618132591, -0.012232359498739243, -0.019031012430787086, -0.06050164997577667, 0.029425427317619324, -0.01587911695241928, 0.013431967236101627, -0.0008935852092690766, -0.02199113741517067, 0.038749292492866516, -0.0359344519674778, 0.011849974282085896, -0.018954597413539886, -0.017494821920990944, 0.000012165090993221384, -0.018130406737327576, -0.010951820760965347, 0.0016520327189937234, 0.07416592538356781, 0.02520616166293621, 0.023307466879487038, -0.016078462824225426, 0.023092012852430344, -0.019122833386063576, -0.031222255900502205, -0.003898244583979249, 0.013740423135459423, 0.03300444781780243, 0.0358230359852314, -0.026955870911478996, -0.013822615146636963, 0.012603904120624065, -0.051123347133398056, 0.05353599786758423, -0.04768511652946472, -0.04976384714245796, -0.007742035202682018, -0.06333434581756592, 0.0252835750579834, 0.011258620768785477, 0.02485242672264576, -0.07293930649757385, 0.05747944489121437, 0.04699676111340523, 0.03541165590286255, 0.0036427665036171675, -0.021069621667265892, 0.005824679508805275, -0.015342706814408302, -0.025955386459827423, -0.08024699240922928, 0.00048286045785062015, 0.03153160959482193, -0.017207471653819084, 0.014523293823003769, -0.005113988183438778, -0.04750558361411095, 0.023807832971215248, -0.0518806092441082, -0.018593771383166313, 0.04875103011727333, -0.02091560699045658, -0.008052844554185867, 0.023265719413757324, -0.03826964646577835, 0.021114327013492584, 0.01289220992475748, -0.04286368563771248, -0.005496695637702942, 0.013648665510118008, 0.045374300330877304, 0.021831335499882698, 0.0438823476433754, -0.012117480859160423, -0.06198619678616524, 0.07227800041437149, 0.012152260169386864, 0.033585816621780396, 0.08262575417757034, -0.016398528590798378, 0.04469789192080498, 0.04332083836197853, -0.025056416168808937, 0.03275304287672043, 0.025944679975509644, -0.0649292841553688, -0.04825325682759285, 0.03287665918469429, 0.010480931960046291, 0.012896494008600712, -0.028986457735300064, 0.058561623096466064, -0.007745910901576281, -0.05101953074336052, -0.07186930626630783, 0.021057186648249626, -0.0381358377635479, -0.025220457464456558, -0.042044248431921005, 0.03862973675131798, -0.07061398774385452, 0.05481218546628952, 0.0022466001100838184, 0.015179304406046867, 0.05065485090017319, -0.024356411769986153, 0.006532401777803898, 0.02402661181986332, 0.06588293612003326, 0.07180777192115784, 0.008991988375782967, -0.003202329622581601, 0.05330741032958031, -0.0253582876175642, -0.011003043502569199, -0.04430517554283142, -0.0020189895294606686, -0.04033951461315155, -0.007860344834625721, 0.01946437917649746, 0.03557721525430679, -0.025757478550076485, 0.05630408599972725, 0.008089016191661358, 0.005741961300373077, -0.013102645054459572, 0.019926514476537704, 0.03446348011493683, 0.02296224795281887, -0.010180574841797352, 0.03991089016199112, 0.03580167517066002, -0.050856947898864746, -0.009904935956001282, 0.006272229366004467, -0.0321844145655632, 0.008102240972220898, -0.03785195201635361, 0.006780959200114012, 0.046316564083099365, -0.04743347689509392, 0.05742209032177925, -0.014504963532090187, -0.013436972163617611, -0.01626109890639782, 0.01999918930232525, -0.03604825958609581, 0.015425249002873898, -0.029594365507364273, -0.02028971165418625, -0.014717994257807732, -0.026264812797307968, -0.01743895933032036, -0.022447705268859863, -0.029568903148174286, -0.01524670422077179, -0.0027117272838950157, 0.013833458535373211, -0.005155925638973713, -0.039127226918935776, -0.06927960366010666, -0.03563322499394417, -0.05291976034641266, -0.07284051179885864, -0.032600287348032, -0.010957063175737858, -0.006342444568872452, 0.011366725899279118, -0.03288547322154045, -0.016272425651550293, -0.021969743072986603, 0.0012463490711525083, 0.010652104392647743, -0.048883505165576935, -0.01409270241856575, 0.011359654366970062, 0.012959666550159454, 0.0012811929918825626, 0.01761544682085514, 0.0683790072798729, 0.019349414855241776, -0.01365192886441946, -0.011770126409828663, -0.02241651900112629, 0.052584271878004074, -0.012125623412430286, -0.006679400335997343, -0.042974915355443954, 0.024896305054426193, 0.014841328375041485, 0.04088635742664337, -0.05792975053191185, 0.006757121067494154, 0.03571425750851631, -0.016293013468384743, 0.0501726008951664, -0.01214760635048151, 0.02819652669131756, -0.06225062906742096, -0.03853544592857361, -0.0084398677572608, 0.02026238664984703, 0.030459171161055565, 0.004094688221812248, 0.10856320708990097, 0.053354717791080475, -0.005515009164810181, -0.004482140764594078, 0.014735990203917027, -0.033497508615255356, 0.0086800716817379, -0.06008034199476242, -0.01439284160733223, -0.03990918770432472, -0.03914402425289154, -0.028535138815641403, 0.039224494248628616, 0.009117909707129002, -0.036314744502305984, 0.032517656683921814, -0.006756816525012255, -0.023581085726618767, 0.012450850568711758, -0.035290155559778214, -0.024394840002059937, -0.020642114803195, -0.021872537210583687, -0.0032303689513355494, 0.030688174068927765, 0.019108695909380913, -0.0581040158867836, 0.012288138270378113, -0.016325198113918304, 0.012306982651352882, 0.005268041975796223, 0.041969336569309235, 0.028892643749713898, -0.03687465190887451, -0.017855480313301086 ]
[ -0.06838247179985046, -0.03659074008464813, -0.018527105450630188, -0.029776105657219887, 0.06119496747851372, -0.07945483922958374, -0.04751671105623245, 0.022142987698316574, -0.026708023622632027, -0.008059653453528881, 0.020402012392878532, -0.08471380919218063, -0.004593636374920607, -0.04278014972805977, 0.0962616354227066, 0.010960572399199009, -0.010506469756364822, -0.05493695288896561, -0.017021579667925835, 0.02640492469072342, -0.014778667129576206, -0.04737730696797371, -0.059479497373104095, -0.03923831880092621, 0.0012094340054318309, 0.059352122247219086, 0.052683550864458084, -0.03590184822678566, -0.034623775631189346, -0.1874142438173294, 0.008824494667351246, -0.05160360038280487, -0.013517492450773716, 0.0028970048297196627, 0.0008237255970016122, 0.05570711940526962, 0.0281709972769022, -0.013868849724531174, 0.043052494525909424, 0.05880982428789139, 0.043190211057662964, -0.016306152567267418, -0.021047312766313553, 0.043659765273332596, -0.0038804556243121624, -0.04266473278403282, -0.004221449606120586, 0.0037056398577988148, 0.03977326676249504, -0.044553693383932114, -0.0611119382083416, 0.016231589019298553, -0.05035819858312607, -0.03230191767215729, 0.016923705115914345, 0.030571511015295982, 0.053516704589128494, 0.07083925604820251, 0.05284332111477852, 0.00798981636762619, 0.010360684245824814, -0.017376787960529327, -0.17288540303707123, 0.10564550757408142, 0.01618865132331848, 0.04347951337695122, -0.041742295026779175, 0.006318041123449802, -0.06223388761281967, 0.03519052639603615, 0.030714010819792747, -0.01798051781952381, -0.01729106903076172, 0.08126918226480484, 0.008216246962547302, 0.0012639221968129277, -0.024513952434062958, 0.017161251977086067, 0.01861090213060379, 0.005115140229463577, -0.06473251432180405, 0.028167353942990303, -0.04566023498773575, 0.037042174488306046, -0.06917993724346161, 0.006645753048360348, -0.048926934599876404, 0.03572025150060654, -0.0018799982499331236, 0.020061204209923744, 0.027922745794057846, 0.004220935516059399, 0.03695777803659439, 0.02074265666306019, -0.10453076660633087, -0.007824481464922428, -0.014252453111112118, -0.01428320910781622, -0.04195291921496391, 0.3538229167461395, 0.009788441471755505, -0.0039017123635858297, -0.0018395994557067752, 0.026307038962841034, 0.009764032438397408, 0.007882294245064259, -0.039104338735342026, -0.035383544862270355, 0.028361642733216286, 0.014973209239542484, 0.01945585571229458, 0.0029873105231672525, 0.03960850462317467, -0.035832684487104416, 0.03323642164468765, -0.0027263162191957235, -0.020309027284383774, 0.02458365075290203, -0.07368505746126175, 0.07623619586229324, 0.012417718768119812, 0.011340958066284657, 0.05915599688887596, 0.012800446711480618, 0.031988561153411865, 0.02145722322165966, 0.015751102939248085, 0.03550615534186363, 0.04457878693938255, 0.03523790463805199, 0.01435451302677393, -0.005769615061581135, -0.029707757756114006, -0.04476342350244522, -0.03062458708882332, -0.012698950245976448, 0.029813021421432495, -0.039812710136175156, 0.0006329216412268579, -0.008943690918385983, -0.009647981263697147, -0.05610451474785805, 0.04275987669825554, -0.019616911187767982, -0.002384304068982601, 0.09463120251893997, 0.027528395876288414, -0.0010288255289196968, -0.015964724123477936, -0.04189888387918472, -0.012394608929753304, 0.004324581008404493, -0.00627222890034318, -0.0508083738386631, 0.014945254661142826, -0.010084621608257294, 0.0524897426366806, 0.018858490511775017, -0.05030288174748421, 0.011126288212835789, -0.02297222428023815, -0.07235735654830933, -0.03425712510943413, -0.004733370151370764, 0.031518902629613876, -0.10361294448375702, -0.003657952882349491, 0.016664989292621613, 0.013388974592089653, -0.04549010470509529, -0.03998476639389992, 0.03941180557012558, -0.02028696797788143, -0.03780623525381088, 0.014822572469711304, -0.03143589571118355, 0.022517165169119835, 0.039468854665756226, 0.03290403261780739, 0.0008656270219944417, -0.013170859776437283, 0.023150233551859856, -0.011440574191510677, -0.02167198807001114, -0.010211736895143986, -0.10146237164735794, -0.053509827703237534, -0.0029037464410066605, -0.038088373839855194, -0.05939722806215286, -0.07283900678157806, -0.015048102475702763, -0.022695032879710197, 0.07103783637285233, 0.0631895661354065, -0.006384322885423899, 0.023174302652478218, 0.022341016680002213, 0.03449362516403198, -0.05496976897120476, 0.008747119456529617, 0.0606364868581295, -0.0011178221320733428, 0.03913779929280281, -0.09830959141254425, 0.026280350983142853, 0.022662736475467682, -0.009186475537717342, 0.006819161586463451, 0.025512631982564926, -0.005100081209093332, 0.009007713757455349, -0.013055766001343727, 0.045374203473329544, -0.033258404582738876, 0.002677129115909338, -0.04336407408118248, 0.037001486867666245, 0.008045822381973267, 0.036917686462402344, -0.015084494836628437, -0.03569537028670311, -0.057528942823410034, -0.37773773074150085, -0.010161376558244228, -0.029697688296437263, 0.01043029222637415, -0.03463022783398628, -0.02245299331843853, -0.0020675368141382933, 0.009569916874170303, 0.0027717500925064087, 0.018289022147655487, 0.10239548981189728, -0.04600027948617935, 0.021712010726332664, -0.0685679242014885, 0.002548390068113804, 0.02989962324500084, -0.04270806163549423, -0.015771962702274323, -0.002535387873649597, 0.023720113560557365, -0.005996499210596085, -0.042401157319545746, -0.01127168070524931, -0.042313553392887115, -0.017683930695056915, 0.02142953686416149, 0.12155544757843018, 0.026260070502758026, 0.06873980909585953, -0.0977744534611702, 0.03250006213784218, 0.040564823895692825, 0.017873357981443405, -0.10078510642051697, 0.012678764760494232, -0.02449362352490425, 0.044183749705553055, 0.04096052795648575, 0.008839596062898636, 0.005343777593225241, -0.07235178351402283, 0.04642697051167488, -0.05442722514271736, -0.049820512533187866, -0.009796175174415112, 0.007824888452887535, -0.02088017202913761, -0.006533075589686632, -0.04265361651778221, 0.02822180464863777, -0.00446734856814146, 0.06523478031158447, 0.014423591084778309, 0.019510753452777863, 0.0473051518201828, -0.004296286031603813, -0.03565337881445885, -0.04817299544811249, 0.006977202836424112, 0.017420683056116104, 0.07182817906141281, 0.061332955956459045, 0.0054546440951526165, -0.059484440833330154, 0.03154057264328003, 0.009987113997340202, -0.009627523832023144, 0.029631899669766426, 0.06602530181407928, -0.023483173921704292, -0.007428138051182032, 0.09308529645204544, -0.0014221681049093604, 0.028369905427098274, 0.07335685938596725, 0.03608067333698273, 0.0034699500538408756, 0.00035450677387416363, 0.03923097997903824, 0.013790902681648731, 0.060059402137994766, -0.04326023906469345, 0.06516547501087189, -0.0559660904109478, 0.003700811415910721, 0.07991301268339157, 0.018529308959841728, 0.015920378267765045, 0.030704878270626068, -0.0470619760453701, -0.05219610035419464, 0.0007601522956974804, 0.023071469739079475, -0.03608819842338562, 0.07337977737188339, 0.024775370955467224, -0.24411584436893463, 0.04701659083366394, 0.04304175078868866, 0.034358423203229904, 0.022611103951931, 0.0015542740002274513, 0.025319727137684822, -0.06444733589887619, -0.016147878021001816, 0.017111146822571754, -0.023279722779989243, 0.05379347875714302, 0.01914110966026783, 0.01773948408663273, 0.025864722207188606, 0.009271511808037758, 0.04186742380261421, 0.005618889816105366, 0.0097659295424819, -0.035163816064596176, 0.02868199720978737, 0.008128189481794834, 0.14180712401866913, 0.04311098903417587, -0.0373731330037117, 0.02140863984823227, -0.012378512881696224, 0.03870994225144386, 0.05842505767941475, 0.032342780381441116, 0.011922069825232029, -0.01002382580190897, 0.06702858209609985, -0.008873662911355495, 0.0663188174366951, -0.04668727144598961, -0.005870093125849962, -0.007400688249617815, 0.034322790801525116, -0.060585688799619675, -0.03395061567425728, 0.02726062573492527, -0.0037126922979950905, 0.034782834351062775, 0.06064261868596077, -0.016174867749214172, -0.01314676832407713, -0.08077308535575867, -0.05254402011632919, -0.04034028947353363, -0.005979925859719515, -0.046077292412519455, 0.00851315539330244, 0.029103955253958702, 0.008997215889394283, 0.04577596113085747, 0.01576031558215618, -0.01952994242310524, -0.03398924320936203, 0.00899954792112112, 0.019398158416152, -0.05852954462170601, 0.08286363631486893, -0.008615633472800255, 0.027082622051239014 ]
[ 0.029492467641830444, 0.02138957940042019, -0.0007929729763418436, 0.008375268429517746, 0.03302684798836708, 0.008859974332153797, -0.012302599847316742, 0.012258539907634258, 0.013354197144508362, 0.014237388968467712, 0.0037578281480818987, -0.018427224829792976, -0.017170539125800133, -0.015652939677238464, -0.007183963432908058, -0.052067406475543976, 0.03241249546408653, -0.008112085983157158, 0.02022264152765274, -0.01786069944500923, -0.06183580309152603, 0.008120179176330566, 0.02788330614566803, -0.00886145792901516, -0.03454173728823662, 0.014799700118601322, -0.04693743586540222, 0.014394287019968033, 0.03205199912190437, -0.13108137249946594, -0.020460395142436028, -0.03240597993135452, -0.012987560592591763, 0.013634330593049526, 0.01886502094566822, 0.052267756313085556, 0.00941745936870575, 0.01850844733417034, -0.05810517445206642, 0.07321903109550476, 0.0631272941827774, -0.039208099246025085, -0.019028810784220695, 0.003778657643124461, -0.010180758312344551, -0.007148270960897207, -0.056706659495830536, -0.025523290038108826, -0.01478502806276083, -0.002547960029914975, -0.01780835911631584, 0.030671214684844017, 0.008191749453544617, 0.02013891376554966, 0.04562705382704735, 0.020659679546952248, -0.05180920287966728, 0.016118517145514488, 0.04768176004290581, 0.010792183689773083, 0.034361571073532104, 0.016410838812589645, 0.008056899532675743, -0.035204898566007614, -0.011933207511901855, -0.030224325135350227, 0.0009000123245641589, -0.003230756614357233, -0.0023862163070589304, 0.006628874223679304, 0.025706855580210686, 0.03149999678134918, -0.05336146429181099, -0.008335832506418228, 0.0035904343239963055, 0.01770837791264057, 0.0006272766622714698, -0.01110292598605156, -0.006111159920692444, -0.0013957826886326075, -0.04747182875871658, -0.008036306127905846, -0.035720035433769226, 0.009754270315170288, -0.07498949021100998, -0.012270139530301094, -0.04419812187552452, -0.00497534591704607, 0.025088872760534286, -0.03629138693213463, 0.0071052080020308495, -0.012308741919696331, 0.015721291303634644, -0.048057351261377335, -0.05038128420710564, -0.006733144633471966, -0.03951755166053772, -0.0047818622551858425, -0.015863021835684776, 0.7997050285339355, 0.023686226457357407, 0.009973552078008652, -0.007945040240883827, 0.004351727198809385, 0.026246018707752228, -0.02926267683506012, -0.0235042292624712, -0.019112521782517433, -0.025262096896767616, -0.0026962081901729107, 0.004543808754533529, 0.031228898093104362, 0.011170589365065098, 0.030038533732295036, 0.04199889674782753, 0.02096429280936718, 0.0037023117765784264, -0.005953983403742313, -0.030974334105849266, 0.06576989591121674, 0.03648833557963371, -0.040083520114421844, -0.009303481318056583, 0.03139156848192215, -0.020220566540956497, -0.15981055796146393, 0.0008638956351205707, -6.685989258234484e-33, 0.04413634166121483, -0.054015614092350006, 0.02321835421025753, -0.014259593561291695, 0.04991260915994644, -0.030042706057429314, -0.020730892196297646, -0.007382256910204887, -0.0378485806286335, 0.006808817386627197, -0.015448453836143017, 0.0068910857662558556, -0.026637226343154907, -0.02281932160258293, 0.013058421202003956, 0.0036245863884687424, -0.02316538244485855, 0.02818850427865982, -0.02704634517431259, 0.011665645986795425, 0.018837392330169678, 0.014238966628909111, -0.0226068627089262, -0.017193544656038284, 0.058571793138980865, 0.003695891471579671, 0.018400447443127632, -0.03324662148952484, 0.01310579665005207, -0.04144687578082085, -0.050239454954862595, -0.0018586947117000818, -0.013947554863989353, -0.053808923810720444, -0.026047656312584877, -0.07020797580480576, -0.017733894288539886, 0.0076002636924386024, -0.07484779506921768, -0.022950323298573494, -0.033942047506570816, -0.031243301928043365, -0.043673429638147354, -0.0341595783829689, -0.002525879070162773, -0.0029579035472124815, 0.005846866872161627, 0.04296085610985756, 0.017840243875980377, -0.0058617000468075275, 0.043908458203077316, -0.033926595002412796, 0.02204824611544609, 0.0017832122975960374, 0.020773641765117645, 0.028299083933234215, 0.04943571984767914, 0.0009483143221586943, -0.023202236741781235, 0.011641493067145348, 0.0021306804846972227, -0.01704075001180172, -0.044344402849674225, 0.015873044729232788, 0.022548221051692963, -0.023798221722245216, 0.018688810989260674, 0.054370082914829254, -0.021922754123806953, 0.033424701541662216, -0.02075359597802162, -0.005451846402138472, -0.056777480989694595, -0.017283393070101738, 0.018177365884184837, -0.011215096339583397, 0.01566264219582081, 0.03591340035200119, -0.021149426698684692, 0.06085631623864174, 0.0008119185222312808, 0.02108968049287796, -0.014051186852157116, -0.00008413712930632755, -0.01725750043988228, -0.014792777597904205, 0.022676624357700348, 0.003621805226430297, -0.0060401796363294125, -0.014389192685484886, 0.027249349281191826, 0.0660894513130188, 0.00018397682288195938, -0.02756797894835472, -0.05830907076597214, 6.809087761336564e-33, 0.005859889555722475, -0.012134833261370659, -0.02409851923584938, 0.01272999681532383, 0.04054994881153107, -0.02477363310754299, 0.04130001366138458, 0.036351971328258514, -0.012534305453300476, 0.011328199878334999, -0.04366918280720711, -0.033775947988033295, -0.03651483356952667, 0.0228645708411932, 0.050921354442834854, -0.033643584698438644, 0.018238091841340065, 0.037471953779459, 0.039473146200180054, 0.0056593166664242744, -0.005141868721693754, 0.004205222707241774, 0.033307041972875595, 0.026316000148653984, -0.008086901158094406, 0.0354752279818058, -0.005423981696367264, 0.017085900530219078, -0.07489350438117981, -0.0354335717856884, 0.032671503722667694, -0.03140730783343315, 0.008153839968144894, 0.008679340593516827, -0.007804720662534237, 0.021661506965756416, 0.012791939079761505, 0.02783122844994068, 0.008092710748314857, -0.04116591811180115, 0.03673494607210159, 0.0054351044818758965, -0.007803599815815687, 0.02764977514743805, -0.03768731281161308, 0.020051274448633194, 0.03441577032208443, -0.01778901182115078, 0.006168967112898827, 0.00455786008387804, -0.020023418590426445, 0.006202774588018656, 0.02232743427157402, 0.026187676936388016, -0.005098562687635422, 0.022004399448633194, -0.04448101669549942, 0.02645505592226982, 0.035206425935029984, 0.029878217726945877, 0.010058472864329815, -0.0732278972864151, 0.024275677278637886, 0.040324363857507706, -0.007120305206626654, -0.02486070990562439, 0.012428839690983295, 0.003639961825683713, -0.00345910107716918, -0.0031118434853851795, -0.011727781966328621, 0.013525520451366901, -0.029430847615003586, 0.0733480155467987, 0.014361407607793808, 0.007290228735655546, 0.00755399139598012, 0.032436903566122055, 0.03495274484157562, 0.026157507672905922, 0.008968058042228222, 0.012263873592019081, -0.05775047838687897, -0.0338115319609642, 0.03275185078382492, -0.012488637119531631, -0.0026971884071826935, 0.019232267513871193, 0.05400349944829941, 0.01145512331277132, -0.021295707672834396, -0.004275990184396505, -0.002078790683299303, 0.030228540301322937, -0.032172203063964844, -1.2417734396308333e-8, 0.04321213811635971, -0.006192522123456001, -0.0008863615221343935, 0.05734480544924736, 0.01992008276283741, 0.019527453929185867, -0.029254509136080742, 0.0009425632888451219, -0.041215747594833374, 0.015656478703022003, -0.031689662486314774, -0.0024724958930164576, -0.013840942643582821, 0.026175854727625847, 0.040035344660282135, -0.024521108716726303, -0.013434083200991154, -0.009454301558434963, 0.04630132392048836, -0.013624122366309166, 0.0393562838435173, 0.03183286637067795, 0.007920629344880581, -0.012463576160371304, -0.04391000047326088, 0.015303737483918667, 0.03988805040717125, -0.05485183000564575, -0.008858982473611832, -0.009926291182637215, -0.011338567361235619, -0.019124573096632957, -0.07088863849639893, 0.031554561108350754, -0.016546523198485374, -0.0063937073573470116, -0.027562301605939865, 0.030218465253710747, 0.019913973286747932, 0.0020254389382898808, -0.020748265087604523, 0.02692684717476368, -0.05151372402906418, -0.041465308517217636, -0.012746481224894524, 0.029070783406496048, -0.00852891430258751, 0.05796150118112564, 0.0056760841980576515, -0.026759088039398193, 0.01241834182292223, -0.03728318586945534, 0.0599166601896286, -0.017933234572410583, -0.009625795297324657, 0.022071760147809982, 0.03240847960114479, -0.04459099844098091, -0.0116744888946414, -0.02158987894654274, 0.008965530432760715, 0.02031365968286991, -0.017686888575553894, -0.012061639688909054 ]
kafka-kubernetes-failed-resolve-nodename-servname-not-known
https://markhneedham.com/blog/2023/06/06/kafka-kubernetes-failed-resolve-nodename-servname-not-known
false
2023-06-23 04:44:37
Running a Hugging Face Large Language Model (LLM) locally on my laptop
[ "hugging-face", "langchain", "til", "generative-ai" ]
[ "TIL" ]
:icons: font I've been playing around with a bunch of Large Language Models (LLMs) on Hugging Face and while the free inference API is cool, it can sometimes be busy, so I wanted to learn how to run the models locally. That's what we'll be doing in this blog post. [NOTE] ==== I've created a video showing how to do this on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], so if you prefer to consume content through that medium, I've embedded it below: ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/Ay5K4tog5NQ" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ ==== You'll need to install the following libraries if you want to follow along: [source, bash] ---- pip install 'langchain[llms]' huggingface-hub langchain transformers ---- The first step is to choose a model that you want to download. I quite like https://huggingface.co/lmsys/fastchat-t5-3b-v1.0[lmsys/fastchat-t5-3b-v1.06] so we're gonna use that one for the rest of the post. ## Downloading the LLM We can https://stackoverflow.com/questions/67595500/how-to-download-model-from-huggingface[download a model^] by running the following code: [source, python] ---- from huggingface_hub import hf_hub_download HUGGING_FACE_API_KEY = "<hugging-face-api-key-goes-here>" # Replace this if you want to use a different model model_id = "lmsys/fastchat-t5-3b-v1.0" filenames = [ <1> "pytorch_model.bin", "added_tokens.json", "config.json", "generation_config.json", "special_tokens_map.json", "spiece.model", "tokenizer_config.json" ] for filename in filenames: downloaded_model_path = hf_hub_download( repo_id=model_id, filename=filename, token=HUGGING_FACE_API_KEY ) print(downloaded_model_path) print(downloaded_model_path) ---- <.> I worked out the filenames by browsing https://huggingface.co/lmsys/fastchat-t5-3b-v1.0/tree/main[Files and versions^] on the Hugging Face UI. This model is almost 7GB in size, so you probably want to connect your computer to an ethernet cable to get maximum download speed! As well as downloading the model, the script prints out the location of the model. In my case it's the following: .Output [source, text] ---- /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/pytorch_model.bin /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/added_tokens.json /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/config.json /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/generation_config.json /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/special_tokens_map.json /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/spiece.model /Users/markhneedham/.cache/huggingface/hub/models--lmsys--fastchat-t5-3b-v1.0/snapshots/0b1da230a891854102d749b93f7ddf1f18a81024/tokenizer_config.json ---- [WARNING] ==== Any files that you don't explicitly download like this will be downloaded the first time that you use the model. I'm downloading everything separately so that I don't have to unexpectedly have to wait for things later on! ==== ## Running the LLM We're now going to use the model locally with LangChain so that we can create a repeatable structure around the prompt. Let's first import some libraries: [source, python] ---- from langchain.llms import HuggingFacePipeline from langchain import PromptTemplate, LLMChain ---- And now we're going to create an instance of our model: [source, python] ---- model_id = "lmsys/fastchat-t5-3b-v1.0" llm = HuggingFacePipeline.from_model_id( model_id=model_id, task="text2text-generation", model_kwargs={"temperature": 0, "max_length": 1000}, ) ---- [NOTE] ==== The value that we use for `task` needs to match the label of the model that's just underneath the model name on the Hugging Face UI. image::{{<siteurl>}}/uploads/2023/07/task-type.png[title='The task type for this model'] ==== Now let's create a template for what we want the LLM to do when we send it a prompt: [source, python] ---- template = """ You are a friendly chatbot assistant that responds conversationally to users' questions. Keep the answers short, unless specifically asked by the user to elaborate on something. Question: {question} Answer:""" prompt = PromptTemplate(template=template, input_variables=["question"]) llm_chain = LLMChain(prompt=prompt, llm=llm) ---- Next, let's create a little function that asks a question and prints the response: [source, python] ---- def ask_question(question): result = llm_chain(question) print(result['question']) print("") print(result['text']) ---- We'll also create a (ChatGPT generated) Timer context manager to make it easier to see how long it takes to answer each question: [source, python] ---- import time class TimerError(Exception): """A custom exception used to report errors in use of Timer class""" class Timer: def __init__(self): self._start_time = None def __enter__(self): if self._start_time is not None: raise TimerError(f"Timer is running. Use .stop() to stop it") self._start_time = time.perf_counter() def __exit__(self, exc_type, exc_val, exc_tb): if self._start_time is None: raise TimerError(f"Timer is not running. Use .start() to start it") elapsed_time = time.perf_counter() - self._start_time self._start_time = None print(f"Elapsed time: {elapsed_time:0.4f} seconds") ---- Now let's see how well the model knows London: [source, python] ---- with Timer(): ask_question("Describe some famous landmarks in London") ---- .Output [source, text] ---- Describe some famous landmarks in London <pad> Some famous landmarks in London include: * Buckingham Palace * St. Paul's Cathedral * The Tower of London * The London Eye * The London Eye is a giant wheel that flies over London. Elapsed time: 17.7592 seconds ---- I'm not sure about that last bullet, but I do like the idea of a giant wheel flying over the city! Let's try something else: [source, python] ---- with Timer(): ask_question("Tell me about Apache Kafka in a few sentences.") ---- .Output [source, text] ---- Tell me about Apache Kafka in a few sentences. <pad> Apache Kafka is a distributed streaming platform that allows for the real-time processing of large amounts of data. It is designed to be scalable, fault-tolerant, and easy to use. Elapsed time: 15.7795 seconds ---- Not too bad. It doesn't do so well if I ask about Apache Pinot though! [source, python] ---- with Timer(): ask_question("Tell me about Apache Pinot in a few sentences.") ---- .Output [source, text] ---- Tell me about Apache Pinot in a few sentences. <pad> Apache Pinot is a Java framework for building web applications that can handle a wide range of tasks, including web development, database management, and web application testing. Elapsed time: 13.6518 seconds ---- It's also nowhere near as fast as ChatGPT, but my computer isn't as good as the ones that they use! Having said that, it is pretty cool to be able to run this type of thing on your own machine and I think it could certainly be useful if you want to ask questions about your own documents that you don't want to send over the internet.
In this post, we'll learn how to download a Hugging Face Large Language Model (LLM) and run it locally.
uploads/2023/06/huggingface-local-llm-banner.png
[ -0.0032571875490248203, 0.016856273636221886, 0.010969113558530807, 0.020346567034721375, 0.07303621619939804, 0.04892099276185036, 0.031776342540979385, 0.0330025851726532, -0.01425036508589983, -0.00868921261280775, -0.01154403667896986, -0.0013813935220241547, -0.07473839819431305, 0.0038193047512322664, -0.03289341554045677, 0.06697267293930054, 0.05848521739244461, 0.020463095977902412, 0.003067843848839402, 0.019078407436609268, 0.020785661414265633, 0.06410408765077591, 0.01909114420413971, 0.04425458610057831, 0.017959941178560257, 0.007350359112024307, 0.030399944633245468, 0.012317683547735214, -0.05112690478563309, -0.006454525049775839, 0.03594253957271576, -0.00710085267201066, 0.0001868637918960303, -0.009432442486286163, 0.03892233967781067, 0.0007393923006020486, -0.035121504217386246, 0.02867935039103031, 0.008354452438652515, 0.04015093296766281, -0.04271737486124039, 0.022939858958125114, -0.012601903639733791, 0.015282686799764633, -0.037298936396837234, -0.003121183952316642, -0.04838486388325691, 0.018248995766043663, 0.013105437159538269, -0.030614126473665237, -0.0741700679063797, 0.03327300772070885, -0.025312788784503937, 0.020595712587237358, -0.006563646253198385, 0.029699139297008514, 0.020389040932059288, -0.10107701271772385, 0.018530312925577164, -0.046037524938583374, -0.008396930061280727, 0.0038683582097291946, 0.03285127878189087, 0.010400833562016487, -0.023221144452691078, -0.014090546406805515, -0.012433324940502644, 0.05018208548426628, -0.0771196186542511, -0.042807687073946, 0.006710540968924761, 0.0041495212353765965, -0.0556110255420208, -0.005438863765448332, 0.030132584273815155, -0.044693827629089355, -0.03347189724445343, 0.04388262704014778, 0.03428080677986145, 0.0420747734606266, -0.00870789960026741, -0.013462616130709648, 0.03716295585036278, 0.034358810633420944, -0.012132728472352028, -0.02950221858918667, -0.019563956186175346, -0.022871768102049828, -0.07153593003749847, 0.05419151857495308, 0.017966413870453835, -0.05104168504476547, 0.005072294734418392, 0.021061360836029053, -0.0014720545150339603, 0.00949682667851448, 0.004794218577444553, -0.002073594368994236, -0.004146189894527197, 0.008191384375095367, -0.028131771832704544, -0.03033556044101715, 0.015441694296896458, 0.020067544654011726, -0.08693178743124008, -0.025023384019732475, -0.00909131858497858, -0.008417677134275436, 0.005318870767951012, -0.024299094453454018, -0.020739907398819923, -0.015441526658833027, -0.009499059990048409, 0.009510889649391174, -0.06828950345516205, 0.0766870379447937, 0.00499056838452816, -0.02448207698762417, -0.023145509883761406, 0.03759980574250221, 0.06498023122549057, 0.02655755914747715, -0.032981302589178085, 0.07878366857767105, 0.010954407043755054, 0.06206605210900307, -0.010351652279496193, 0.054300457239151, -0.00916301179677248, -0.0606098435819149, -0.010350238531827927, 0.05353272706270218, 0.0011763311922550201, 0.020374268293380737, 0.01686030812561512, -0.018456418067216873, 0.012032654136419296, -0.006460422184318304, 0.05880580097436905, 0.0023789277765899897, -0.0006294374470598996, -0.006332522723823786, 0.0028071540873497725, 0.013883897103369236, 0.044623393565416336, 0.011594831943511963, -0.019365554675459862, -0.04206690192222595, -0.03915311396121979, -0.00204807473346591, 0.006918494123965502, 0.005414026323705912, 0.05005624145269394, -0.019261378794908524, 0.0036461870186030865, 0.08462420105934143, 0.03371966630220413, 0.00016057296306826174, 0.013098410330712795, 0.014124427922070026, 0.0320822075009346, 0.032466739416122437, -0.01281284261494875, 0.058090079575777054, 0.024384120479226112, -0.014929153956472874, 0.004385277163237333, 0.040365394204854965, -0.022503485903143883, 0.0006240826332941651, -0.05960360914468765, -0.04276189208030701, 0.05741800740361214, -0.04392978176474571, -0.047057751566171646, 0.03769074007868767, 0.09212936460971832, 0.04016118869185448, 0.03761744871735573, 0.014234947971999645, -0.08534573018550873, 0.032611947506666183, 0.026009008288383484, 0.009049945510923862, 0.02492455393075943, -0.012241518124938011, 0.09908387809991837, 0.007887010462582111, -0.01036377064883709, 0.03220174461603165, -0.05617532879114151, -0.0340585932135582, -0.026570530608296394, 0.004158002324402332, 0.06782736629247665, -0.05243217572569847, 0.011870389804244041, 0.03976348415017128, 0.033522069454193115, 0.039592038840055466, 0.008311036042869091, -0.009923728182911873, 0.01765991374850273, -0.021563732996582985, -0.052205491811037064, 0.013600356876850128, 0.03274359181523323, -0.018387867137789726, -0.008733457885682583, 0.0017161794239655137, -0.02185709774494171, -0.016322797164320946, 0.04352207109332085, -0.01783609390258789, 0.02322300896048546, -0.011000048369169235, 0.009199476800858974, -0.013189887627959251, 0.030740508809685707, -0.040041882544755936, 0.03376052901148796, 0.0004311388183850795, -0.041675589978694916, -0.021407950669527054, -0.019932899624109268, 0.10732153058052063, 0.07472393661737442, -0.035894472151994705, -0.05160561576485634, 0.008998232893645763, 0.016050640493631363, -0.05481470003724098, 0.011943090707063675, -0.024147532880306244, -0.025343745946884155, -0.009777658618986607, -0.004776966292411089, -0.03873695060610771, 0.007663220167160034, -0.056772198528051376, -0.01056310348212719, 0.0709582194685936, 0.007405285257846117, 0.030296221375465393, -0.021044105291366577, -0.0018466976471245289, 0.004525595344603062, -0.027834521606564522, -0.05530943721532822, 0.017639830708503723, 0.017854725942015648, -0.01119147427380085, 0.02691059000790119, -0.03603338077664375, -0.014767948538064957, -0.03241126239299774, -0.0412059985101223, 0.04224776849150658, 0.03918810933828354, 0.060907136648893356, 0.00923368614166975, 0.02802157774567604, -0.04408827796578407, 0.03562411293387413, -0.03378802910447121, -0.04988335072994232, -0.025435741990804672, -0.04122241958975792, -0.00027083902386948466, 0.027795908972620964, 0.03611883521080017, 0.017314760014414787, 0.018550168722867966, -0.006589691620320082, 0.04377104714512825, 0.018143940716981888, 0.03930620104074478, -0.0032755210995674133, -0.0014491925248876214, -0.038308002054691315, -0.024686986580491066, 0.07709918171167374, -0.03395770490169525, -0.040934380143880844, -0.01875882036983967, -0.06887887418270111, 0.026011411100625992, -0.06399720907211304, -0.046777285635471344, -0.02713368833065033, 0.028593329712748528, 0.03810678422451019, 0.012725255452096462, 0.009078141301870346, 0.030643004924058914, 0.020115451887249947, 0.02018929459154606, 0.0351526141166687, -0.00349189224652946, 0.06269476562738419, -0.03763126954436302, 0.0066960896365344524, 0.02784564718604088, -0.010328156873583794, -0.007985016331076622, -0.07244033366441727, 0.026499904692173004, -0.045546308159828186, -0.3008113205432892, 0.005990272853523493, 0.011548539623618126, -0.04678459092974663, 0.01500758621841669, -0.04395689442753792, 0.015375880524516106, -0.05487127974629402, -0.01677561178803444, 0.022136710584163666, -0.02868100069463253, -0.01948448084294796, -0.04247792437672615, 0.020801657810807228, 0.01488050539046526, -0.00008254425483755767, -0.017602765932679176, -0.026201672852039337, 0.008264641277492046, 0.03142894059419632, -0.002383628860116005, -0.05331425741314888, -0.01038262527436018, 0.058586377650499344, 0.013799942098557949, 0.03506860509514809, -0.06295248121023178, 0.014638698659837246, -0.03170042857527733, -0.01686377264559269, -0.00006233993917703629, -0.022592252120375633, 0.01147594302892685, -0.016204027459025383, -0.010525934398174286, -0.02591678872704506, 0.06610045582056046, 0.013290938921272755, 0.034087084233760834, 0.006503168027848005, 0.0010893094586208463, -0.045436613261699677, 0.005478431470692158, 0.006690322421491146, 0.08628197759389877, -0.013818633742630482, -0.08759086579084396, -0.00859031267464161, -0.04885132610797882, 0.07866258174180984, -0.035754479467868805, -0.04921317845582962, -0.019590336829423904, 0.038553934544324875, 0.018879162147641182, -0.0017460468225181103, 0.001987413503229618, -0.019130345433950424, -0.058729734271764755, -0.03774666041135788, -0.001175667392089963, -0.03338463231921196, -0.06492345035076141, -0.06384466588497162, 0.000599750317633152, -0.08441978693008423, -0.05312371626496315, -0.01936960779130459, 0.0731898844242096, 0.04934493824839592, -0.041364412754774094, 0.00039158857543952763, -0.011212583631277084, -0.10420115292072296, 0.01428564265370369, -0.016071271151304245, -0.013498522341251373, 0.002155753318220377, 0.001457341481000185, 0.07840070128440857, -0.04036599025130272, -0.046469785273075104, 0.037292513996362686, -0.002716636983677745, 0.0016600026283413172, -0.005462693516165018, 0.03193606063723564, -0.0022040121257305145, 0.01489400863647461, -0.015902336686849594, 0.05599972978234291, -0.02127324976027012, -0.03490688279271126, -0.007474690675735474, -0.01569531299173832, 0.004210114479064941, 0.0035345645155757666, 0.0055539533495903015, 0.019340794533491135, 0.04679989814758301, 0.009098207578063011, -0.05321995168924332, -0.008474810048937798, -0.011116665787994862, 0.005730477627366781, 0.00030646627419628203, -0.047344911843538284, -0.007662617601454258, 0.04678803309798241, 0.005967325530946255, -0.023591214790940285, -0.038263969123363495, 0.0020646718330681324, -0.06487671285867691, -0.055977050215005875, -0.02774582989513874, 0.0060812789015471935, 0.04032040014863014, 0.01642942801117897, -0.02750948816537857, -0.03843757137656212, 0.019091667607426643, 0.021430615335702896, -0.01872592605650425, -0.04499907046556473, -0.018146861344575882, 0.0053472621366381645, -0.007852272130548954, -0.011432950384914875, 0.031230956315994263, -0.0052198441699147224, 0.02152823843061924, 0.027707044035196304, -0.044589199125766754, 0.053428225219249725, -0.0004951306618750095, -0.029062924906611443, -0.01787741854786873, 0.014791375957429409, -0.01633824221789837, 0.009427221491932869, 0.01518416777253151, -0.0030103896278887987, 0.019515523687005043, 0.03949572145938873, 0.01726415567100048, 0.034077297896146774, 0.0001301150768995285, -0.011004733853042126, 0.011455785483121872, 0.020469803363084793, -0.041390299797058105, -0.0019240103429183364, -0.01391428429633379, -0.0020924238488078117, -0.004583030939102173, 0.01500794943422079, -0.01786426641047001, -0.0006520831375382841, -0.044164806604385376, 0.0246291384100914, -0.05193436145782471, -0.022472096607089043, 0.00436069630086422, 0.007399022113531828, 0.031571436673402786, 0.01256311684846878, 0.005417789798229933, 0.02093721739947796, -0.015663668513298035, 0.020049024373292923, 0.002919789170846343, -0.04098118841648102, 0.015618542209267616, -0.004924932960420847, 0.00045244311331771314, 0.006331524346023798, 0.0022864697966724634, 0.0311677735298872, 0.030858255922794342, 0.015213430859148502, -0.022938450798392296, 0.03830545395612717, -0.0015339332167059183, 0.02946018986403942, 0.041818175464868546, -0.0436345711350441, 0.0045873066410422325, -0.019418295472860336, -0.024992400780320168, -0.005637479014694691, -0.0032859051134437323, -0.00812896341085434, -0.016886547207832336, -0.03202712535858154, -0.07483182847499847, 0.01040904875844717, -0.015945179387927055, 0.024824507534503937, 0.01695495843887329, -0.0316496342420578, 0.01486205030232668, -0.04190594702959061, 0.023802682757377625, 0.046658020466566086, -0.07341460138559341, 0.017883505672216415, 0.012311779893934727, -0.0037635103799402714, -0.007794050965458155, 0.021854033693671227, -0.055522240698337555, -0.029386252164840698, -0.0063191670924425125, 0.011054135859012604, -0.03165820613503456, -0.01554060447961092, -0.03328830376267433, 0.03269150108098984, 0.006841898430138826, 0.005020461045205593, -0.013899180106818676, -0.03499986603856087, -0.0036240601912140846, -0.01484554260969162, 0.009686581790447235, -0.026153158396482468, 0.001379212480969727, 0.038350533694028854, -0.01995650678873062, 0.028032148256897926, -0.04092973843216896, 0.054978709667921066, 0.05088920518755913, -0.020060986280441284, 0.0001010923006106168, -0.04431936517357826, -0.0018981581088155508, 0.01548271719366312, 0.023374443873763084, 0.030595675110816956, 0.015194769948720932, -0.05508722364902496, 0.0077235642820596695, -0.019520197063684464, 0.03726343438029289, -0.0008269326062873006, -0.0077827684581279755, 0.012827645987272263, 0.031466610729694366, 0.009277962148189545, -0.005640325136482716, -0.010819585993885994, -0.022997114807367325, 0.061133865267038345, -0.05693924427032471, -0.04838348180055618, -0.009110456332564354, -0.03338097035884857, 0.028496719896793365, 0.006442933343350887, 0.036724336445331573, -0.03964326158165932, 0.04128991439938545, 0.025740835815668106, 0.03273114189505577, 0.0364958830177784, 0.004640884697437286, 0.030953440815210342, -0.025255685672163963, -0.013066396117210388, -0.055395323783159256, -0.0041387444362044334, 0.032696738839149475, -0.02407999336719513, -0.016942162066698074, -0.00010864236537599936, -0.05433039367198944, 0.06200585886836052, -0.0679890364408493, -0.007308077998459339, 0.048030462116003036, -0.0009117309818975627, 0.0003513612609822303, 0.034661926329135895, -0.05460001528263092, 0.03204268589615822, 0.024994714185595512, -0.042405445128679276, -0.009198788553476334, -0.02352268062531948, 0.06332327425479889, -0.0190733652561903, 0.03662583976984024, -0.0228927880525589, 0.0051679848693311214, 0.07093437016010284, 0.030719324946403503, 0.00954318605363369, 0.033774957060813904, 0.0074192918837070465, 0.055586013942956924, 0.02373412810266018, -0.0027492917142808437, 0.018568197265267372, 0.026986317709088326, 0.00032165664015337825, -0.09038925170898438, 0.06515633314847946, 0.0016761072911322117, -0.01620858535170555, -0.0661337822675705, 0.055287547409534454, 0.039738770574331284, -0.007290464825928211, -0.04265490919351578, 0.032020941376686096, -0.05198892205953598, -0.027301980182528496, -0.024406129494309425, -0.020382072776556015, -0.031239768490195274, 0.06635662168264389, -0.016999779269099236, 0.021603379398584366, 0.06264544278383255, -0.007229336071759462, -0.0025043298956006765, -0.011719112284481525, 0.09868201613426208, 0.07458516210317612, 0.057820532470941544, 0.020044397562742233, 0.08027172833681107, 0.0009617488831281662, -0.05157753452658653, 0.004921879153698683, 0.01248690765351057, -0.04010101780295372, -0.03661790490150452, 0.02437417209148407, 0.07124040275812149, -0.031803328543901443, 0.05803868919610977, -0.036345817148685455, -0.03288956731557846, 0.005221841856837273, 0.022194622084498405, 0.026406437158584595, 0.024935465306043625, 0.01022132858633995, 0.008718115277588367, -0.022891707718372345, -0.03435654938220978, 0.034029677510261536, -0.01760759763419628, -0.0009604255901649594, 0.024580052122473717, -0.013831786811351776, 0.02684183046221733, -0.0010798382572829723, 0.04255049303174019, 0.09613339602947235, -0.04284808039665222, 0.011373098939657211, -0.007024095859378576, -0.004333623219281435, 0.011482096277177334, 0.030802613124251366, -0.010914728045463562, -0.03487319499254227, -0.01278378814458847, -0.036020226776599884, -0.01826782524585724, -0.022148851305246353, -0.013680553995072842, 0.023884335532784462, -0.02254018560051918, -0.012807127088308334, 0.02300974354147911, -0.006232547573745251, -0.061174046248197556, -0.03883830085396767, -0.06928573548793793, -0.0501897856593132, -0.05962235480546951, -0.01210054848343134, -0.008792158216238022, 0.004708286374807358, -0.06597741693258286, -0.032296475023031235, -0.02709975279867649, 0.008496281690895557, 0.01107911765575409, -0.06282134354114532, -0.026341281831264496, 0.02397490292787552, -0.0012615207815542817, 0.018193330615758896, 0.015700871124863625, 0.06579432636499405, 0.023192621767520905, -0.014255408197641373, -0.027886105701327324, 0.0331181138753891, 0.04191404953598976, 0.02300761267542839, 0.026355447247624397, -0.08476278185844421, 0.012364886701107025, 0.017212869599461555, -0.0275498628616333, -0.06324538588523865, 0.009938858449459076, 0.031100556254386902, 0.02534922957420349, 0.055274881422519684, -0.009707014076411724, 0.00018620589980855584, -0.036634087562561035, -0.03965597599744797, -0.011150903068482876, 0.010332013480365276, 0.0450725294649601, -0.00446347938850522, 0.08697815984487534, 0.010600974783301353, -0.0058862860314548016, -0.05551692098379135, -0.0035608201287686825, 0.007843850180506706, 0.0185506884008646, -0.03682703897356987, -0.0003573470457922667, -0.03327145799994469, -0.06815517693758011, -0.029471853747963905, 0.03600292652845383, -0.016703957691788673, -0.02435488812625408, 0.00876680389046669, -0.009972142986953259, -0.02650628052651882, 0.04703373834490776, -0.046091653406620026, -0.009602031670510769, -0.03559143841266632, 0.006594967097043991, -0.020463768392801285, 0.038343191146850586, 0.014920707792043686, 0.005848814733326435, 0.03839000687003136, -0.05519390478730202, -0.0007049486739560962, -0.0047650146298110485, 0.035240836441516876, 0.023127714172005653, 0.0007718466804362833, 0.005774942692369223 ]
[ -0.07991854846477509, 0.00003007844316016417, -0.021059606224298477, -0.03649500757455826, 0.0404549241065979, -0.03821255639195442, -0.05204017460346222, 0.010973941534757614, 0.005488913971930742, -0.024063486605882645, -0.009492428041994572, -0.08131121098995209, 0.005134523380547762, -0.026744404807686806, 0.10410032421350479, 0.006142564583569765, 0.016733337193727493, -0.05571489408612251, 0.004098208621144295, 0.052360035479068756, -0.0025862662587314844, -0.011425156146287918, -0.01917131617665291, -0.013842014595866203, -0.01873014122247696, 0.033901508897542953, 0.05965053662657738, -0.0047734323889017105, 0.04518803581595421, -0.20731423795223236, 0.010401060804724693, 0.0011367083061486483, 0.04108366370201111, 0.006018574349582195, -0.0035015519242733717, 0.04269491136074066, 0.0034390613436698914, -0.002842641668394208, -0.009077507071197033, 0.039128806442022324, 0.000912770046852529, 0.019619420170783997, -0.05831810086965561, -0.031433358788490295, 0.082219697535038, -0.009824816137552261, -0.004624235909432173, -0.01141445990651846, -0.042058881372213364, -0.01418446283787489, -0.020794356241822243, -0.008695140480995178, -0.007668753154575825, -0.009658057242631912, -0.0287274569272995, 0.02496342360973358, 0.05478972569108009, 0.05273681879043579, 0.025148138403892517, 0.015386562794446945, -0.011949202045798302, -0.012152033858001232, -0.11249005049467087, 0.13683997094631195, -0.030702052637934685, 0.06650969386100769, 0.00914236530661583, -0.005727593321353197, 0.029133101925253868, 0.06740574538707733, -0.017033232375979424, -0.018051402643322945, -0.02833694778382778, 0.021907666698098183, 0.005051161628216505, -0.023169100284576416, 0.03312664106488228, 0.02445797249674797, 0.03288330137729645, -0.02322748489677906, -0.047215137630701065, -0.02320435643196106, -0.008154047653079033, -0.046995408833026886, -0.012196563184261322, 0.018045851960778236, -0.030290819704532623, 0.038168858736753464, -0.039306461811065674, 0.016932129859924316, -0.011479334905743599, -0.023434003815054893, 0.005484559573233128, 0.013107615523040295, -0.08393620699644089, -0.033752769231796265, -0.0009502702159807086, 0.01510636880993843, -0.05369383841753006, 0.4677351713180542, -0.01679479144513607, -0.0189941618591547, 0.02801438793540001, 0.005133423022925854, 0.045398812741041183, -0.008285596035420895, -0.021799741312861443, -0.004413409624248743, -0.004633083939552307, -0.0146585488691926, -0.009882929734885693, 0.010054942220449448, 0.038114141672849655, -0.05858704075217247, -0.00016879563918337226, -0.024848267436027527, 0.016522102057933807, 0.016474029049277306, 0.011694284155964851, -0.03159918263554573, -0.029242103919386864, 0.02388259582221508, 0.04443356394767761, -0.04824484512209892, 0.03010433539748192, -0.015074500814080238, 0.03292818367481232, 0.039566997438669205, 0.06385457515716553, 0.026905475184321404, 0.021625902503728867, -0.021440764889121056, -0.0514337532222271, -0.008687159046530724, 0.014883026480674744, -0.006606108043342829, 0.040543340146541595, -0.031501609832048416, -0.0046185823157429695, 0.0028241565451025963, -0.015174134634435177, -0.0432630255818367, 0.05247125402092934, -0.027072705328464508, -0.022761262953281403, 0.0949762761592865, 0.000013909367226005998, -0.019185233861207962, -0.03776084631681442, -0.01843360997736454, 0.003966023679822683, 0.05285673588514328, -0.01312923338264227, -0.00896826758980751, 0.04770141839981079, -0.015510974451899529, 0.09694456309080124, -0.013422989286482334, -0.07763463258743286, -0.013718108646571636, 0.0025256103835999966, -0.040832795202732086, -0.016094151884317398, 0.006407677195966244, 0.019008753821253777, -0.13337688148021698, -0.0625327080488205, 0.0058469926007092, 0.0027617423329502344, -0.06448302417993546, 0.008513321168720722, 0.015597409568727016, -0.018307136371731758, 0.031084630638360977, 0.042643263936042786, 0.010662000626325607, -0.04500128701329231, -0.005523201078176498, 0.017763903364539146, 0.015513710677623749, -0.04386094585061073, -0.03600260987877846, -0.014552471227943897, -0.0042337095364928246, -0.06446881592273712, -0.0654282197356224, -0.015942877158522606, -0.03167217597365379, -0.009726397693157196, -0.055847521871328354, 0.033855121582746506, -0.01643410697579384, -0.04230671375989914, 0.0395180769264698, -0.02227628603577614, 0.008907405659556389, -0.010597659274935722, -0.002344484906643629, 0.006368991453200579, -0.03101011924445629, 0.00518827885389328, 0.03888767212629318, -0.021821653470396996, 0.0031854771077632904, -0.0353529155254364, 0.04804106056690216, 0.050395384430885315, -0.02257704548537731, 0.08751792460680008, 0.004505944903939962, -0.06038825586438179, 0.009708531200885773, 0.02964142896234989, -0.0003055236884392798, -0.004064997658133507, -0.012763069011271, 0.041114646941423416, 0.010554575361311436, 0.01564333215355873, 0.014885559678077698, -0.020058313384652138, -0.054088886827230453, -0.04816987365484238, -0.33651426434516907, -0.010351734235882759, -0.0062941135838627815, 0.039052970707416534, -0.005211828276515007, -0.09264034777879715, 0.01748853363096714, -0.014811045490205288, 0.06793727725744247, 0.0461026094853878, 0.09158436208963394, -0.029244599863886833, -0.00691245449706912, -0.06011711806058884, 0.002996960422024131, 0.014799732714891434, -0.003757036756724119, -0.00469125946983695, -0.039776820689439774, 0.015781499445438385, -0.02615129016339779, -0.026332024484872818, -0.04462909325957298, -0.056955259293317795, 0.005961148999631405, -0.02228393964469433, 0.10618485510349274, 0.04642261192202568, 0.044312458485364914, -0.059903308749198914, 0.04982922971248627, 0.025123823434114456, -0.006703578867018223, -0.0942622721195221, 0.01071260403841734, -0.03089182823896408, 0.029526585713028908, -0.011373003013432026, 0.04485281556844711, -0.01887013204395771, -0.05990418419241905, 0.012877453118562698, -0.01930982992053032, -0.05322183668613434, -0.04333953559398651, 0.03423584997653961, 0.012454913929104805, -0.049928806722164154, -0.04721461609005928, 0.046490028500556946, 0.02085302770137787, 0.011260275729000568, 0.019621439278125763, 0.018857765942811966, -0.05742492899298668, -0.03325490280985832, -0.07087086141109467, -0.03935028985142708, -0.01703721284866333, -0.01372824888676405, 0.027247503399848938, 0.03473711013793945, 0.028589695692062378, -0.10588550567626953, -0.0010262877913191915, 0.0075212158262729645, -0.009574420750141144, -0.025202449411153793, 0.053970396518707275, 0.007151213940232992, -0.0253159087151289, 0.09045632183551788, 0.013331268914043903, 0.02962990291416645, 0.04269314184784889, 0.04483465105295181, 0.022885747253894806, 0.04671574756503105, -0.01513700745999813, 0.002158608753234148, 0.03793175145983696, 0.016470782458782196, 0.012956991791725159, -0.02690662443637848, -0.025045352056622505, 0.035496193915605545, 0.0030232949648052454, -0.03318933770060539, 0.050386980175971985, 0.014844841323792934, -0.00004892093056696467, 0.017147306352853775, 0.0014113811776041985, -0.04164073243737221, 0.05916295573115349, -0.008452897891402245, -0.2434167116880417, 0.03198713809251785, 0.0604044646024704, 0.10360082238912582, -0.013078195042908192, -0.016147390007972717, 0.024394996464252472, -0.08077890425920486, -0.022472647950053215, 0.01968778297305107, -0.020340224727988243, 0.04071211442351341, 0.04424213990569115, 0.011238260194659233, 0.030628997832536697, -0.02757655829191208, 0.02159443125128746, 0.0007277807453647256, 0.00991808157414198, -0.024364689365029335, -0.01564973220229149, -0.04982256889343262, 0.15947021543979645, 0.019265679642558098, -0.006118420977145433, 0.04420968517661095, 0.020894605666399002, -0.01365753822028637, 0.05963994190096855, 0.03309265524148941, 0.005418889224529266, 0.01060539297759533, 0.029113968834280968, 0.0317930206656456, 0.025883091613650322, -0.04140004888176918, -0.051012925803661346, 0.05073961615562439, 0.03837466984987259, 0.003255863906815648, 0.03277553617954254, 0.056369390338659286, 0.0000037865820559090935, 0.02059766836464405, 0.025575054809451103, -0.030942274257540703, 0.026512768119573593, 0.023511752486228943, -0.06285180151462555, 0.026970386505126953, -0.006060380954295397, -0.03170597553253174, -0.023918386548757553, -0.006143779959529638, 0.03799477219581604, 0.07431495189666748, 0.030420882627367973, -0.01452127005904913, 0.016260214149951935, 0.03717908263206482, 0.009706070646643639, -0.030592763796448708, 0.08408954739570618, 0.011982153169810772, 0.019983550533652306 ]
[ 0.01569344662129879, -0.010802260600030422, 0.01715058833360672, -0.0038095375057309866, 0.0482340045273304, 0.04236259683966637, -0.017760027199983597, 0.013696493580937386, 0.019891738891601562, 0.009792199358344078, 0.035435374826192856, -0.00553548987954855, 0.012807759456336498, -0.006191045977175236, 0.04609331116080284, -0.016228042542934418, 0.03523041307926178, -0.027798544615507126, 0.036926619708538055, 0.02047589048743248, -0.02898407354950905, 0.031003490090370178, 0.026820622384548187, 0.020560460165143013, 0.0004204781726002693, 0.0007996628992259502, -0.028081828728318214, 0.024010177701711655, 0.06620454043149948, -0.143408864736557, -0.00815434567630291, -0.035730551928281784, -0.022334778681397438, 0.007139156106859446, -0.018742648884654045, 0.010107536800205708, -0.011210563592612743, -0.015092126093804836, -0.04536861553788185, -0.002800930989906192, -0.001513032359071076, -0.028417978435754776, 0.03988378867506981, -0.014262505806982517, 0.011907612904906273, -0.000025184954210999422, -0.03276138752698898, -0.020894872024655342, -0.03432117775082588, -0.012014961801469326, -0.05229754373431206, -0.012163999490439892, -0.025731371715664864, -0.008757656440138817, -0.04616421461105347, -0.008091162890195847, 0.002150673884898424, 0.0118095763027668, 0.03398017957806587, -0.00015505851479247212, -0.010253961198031902, -0.0048803105019032955, -0.020075583830475807, -0.003336513414978981, 0.006444069091230631, 0.0011915500508621335, -0.03750287741422653, 0.013829793781042099, -0.001768558518961072, 0.02162397839128971, -0.021824343129992485, -0.007698368281126022, -0.025858215987682343, -0.013162773102521896, -0.02716844156384468, -0.05438404157757759, 0.006590094417333603, -0.02023828960955143, -0.001995198428630829, 0.00007096445915522054, -0.0026375341694802046, -0.013276869431138039, -0.0034676638897508383, 0.02383768931031227, 0.003023250261321664, 0.009331945329904556, -0.011266041547060013, 0.0090843066573143, -0.009033944457769394, -0.02510605938732624, -0.03140561282634735, 0.011921202763915062, -0.005938594229519367, 0.02350783348083496, -0.06437394767999649, -0.0023589227348566055, -0.013113705441355705, -0.024171749129891396, -0.03637434169650078, 0.8362776041030884, 0.005523727275431156, 0.013074947521090508, 0.055705226957798004, 0.039735954254865646, 0.00841180793941021, -0.0227951817214489, -0.00002737719660217408, 0.006187778897583485, 0.015237748622894287, -0.032047998160123825, 0.018466223031282425, 0.008641376160085201, 0.0019409266533330083, 0.02907659485936165, -0.0010392211843281984, 0.01259755901992321, -0.00010191750334342942, -0.018052469938993454, 0.014973890967667103, 0.019020570442080498, 0.012924930080771446, -0.02499920129776001, 0.03556764870882034, -0.008435770869255066, -0.01831376925110817, -0.20848554372787476, -0.00410956796258688, -6.420529573040195e-33, 0.048011358827352524, -0.027108121663331985, 0.01192894484847784, 0.021173615008592606, 0.030606556683778763, 0.03249521180987358, 0.016382094472646713, 0.02808813750743866, -0.011671700514853, -0.02509543113410473, 0.01236388273537159, -0.015596482902765274, 0.00760407792404294, 0.0003294484631624073, 0.018794313073158264, 0.010343470610678196, 0.0011032144539058208, 0.046362753957509995, -0.0226623322814703, 0.03206515684723854, 0.02804880030453205, 0.030376212671399117, 0.018778778612613678, 0.018472958356142044, -0.0488441027700901, 0.02441597729921341, 0.008277925662696362, 0.0019224282586947083, -0.006165726110339165, -0.0409577302634716, -0.0500941276550293, -0.0215356033295393, 0.016873909160494804, -0.04567769542336464, 0.032753512263298035, -0.05104881525039673, -0.05434270575642586, 0.0046381838619709015, -0.02850118838250637, -0.023390134796500206, -0.0239413995295763, 0.0032893801108002663, -0.0388064831495285, -0.04495440796017647, -0.05801103636622429, 0.027514828369021416, 0.009602206759154797, 0.0126664899289608, -0.026656348258256912, 0.016902608796954155, 0.04298263415694237, 0.004125369247049093, -0.03883888199925423, -0.017925038933753967, -0.010816339403390884, 0.023756936192512512, 0.006436707451939583, 0.024312341585755348, -0.004187667742371559, 0.0019173620967194438, 0.0003147489333059639, -0.009052662178874016, 0.037753716111183167, 0.023294121026992798, -0.005615022964775562, -0.0033195584546774626, 0.023801149800419807, -0.008942469954490662, 0.04894596338272095, 0.006047225557267666, -0.05457285791635513, 0.03921550139784813, -0.013110436499118805, -0.03413062542676926, 0.030155694112181664, -0.038737952709198, -0.0025729755870997906, -0.012202094309031963, 0.00528820650652051, 0.02509974129498005, 0.021661825478076935, -0.012919274158775806, 0.015570913441479206, -0.04276904836297035, 0.0012000709539279342, -0.05750186741352081, 0.024481546133756638, -0.026633869856595993, -0.008654207922518253, -0.004367654211819172, 0.03504818305373192, 0.041507504880428314, -0.0003097621665801853, -0.03060927428305149, -0.004015644546598196, 6.892399454083155e-33, 0.030245143920183182, -0.008684583939611912, -0.01830393634736538, -0.0002765020471997559, 0.044218555092811584, -0.011896686628460884, 0.02411551959812641, 0.04982466995716095, -0.020539848133921623, 0.002636360004544258, -0.0043341671116650105, -0.03260369598865509, -0.055118683725595474, 0.011049914173781872, 0.06419522315263748, -0.004866403061896563, 0.01424593199044466, -0.03762349858880043, 0.018452994525432587, -0.015948191285133362, -0.0010654067154973745, 0.007062498014420271, 0.017537890002131462, 0.020520387217402458, 0.003157742554321885, 0.0570078007876873, -0.01670682802796364, 0.023769376799464226, -0.0014102774439379573, 0.03994207829236984, 0.012089215219020844, -0.022780174389481544, -0.008644516579806805, -0.001412288984283805, 0.00009861502621788532, 0.05334925651550293, 0.013618622906506062, 0.035986702889204025, -0.0034812400117516518, -0.025990866124629974, 0.02499726600944996, 0.02561272867023945, -0.037115223705768585, 0.008403087966144085, -0.0004936832119710743, 0.013614989817142487, -0.006576888728886843, -0.008922156877815723, -0.011509496718645096, -0.013200066052377224, 0.02465907484292984, -0.012984051369130611, 0.04305553063750267, 0.0022147984709590673, -0.0019781070295721292, -0.015979710966348648, -0.039403218775987625, 0.04008902609348297, -0.014794171787798405, -0.015505190938711166, -0.02090434357523918, -0.0313824824988842, -0.02610173635184765, 0.013933601789176464, -0.014222737401723862, -0.009952540509402752, -0.025322820991277695, -0.017339741811156273, -0.029229776933789253, 0.015578711405396461, 0.012393577955663204, 0.005324529483914375, -0.011724231764674187, 0.0434967540204525, 0.026049377396702766, 0.0013719238340854645, -0.004393416922539473, -0.024336066097021103, -0.00320554175414145, -0.005239360965788364, 0.00173743546474725, -0.02259243093430996, 0.020150596275925636, -0.0018429167103022337, -0.001056623994372785, 0.008138040080666542, -0.017638029530644417, 0.032440800219774246, 0.025016706436872482, 0.0014522488927468657, -0.00988363940268755, 0.026088859885931015, 0.007365910802036524, 0.01071502361446619, 0.024776918813586235, -1.2542068716925314e-8, -0.039947912096977234, -0.009341181255877018, -0.0239249337464571, 0.04521618038415909, -0.04796105623245239, 0.04671948403120041, -0.012411367148160934, -0.024598633870482445, 0.037414468824863434, 0.007657541893422604, 0.016514431685209274, -0.02288898639380932, -0.010407180525362492, 0.024368727579712868, -0.007808149326592684, -0.019929204136133194, -0.004095588810741901, 0.009723753668367863, 0.018646689131855965, 0.00032054027542471886, 0.026043418794870377, 0.05532006546854973, 0.04737687483429909, -0.04172876104712486, 0.013338404707610607, -0.016381539404392242, 0.007424229755997658, -0.06587778031826019, -0.02385769598186016, -0.007915748283267021, -0.016138892620801926, -0.03996933624148369, -0.02914636954665184, -0.02083696983754635, 0.004596527200192213, -0.008019763976335526, 0.0067354049533605576, -0.011281891725957394, 0.023802654817700386, -0.006219928152859211, 0.013894075527787209, 0.014060928486287594, 0.014707744121551514, -0.03879958763718605, -0.01914953999221325, 0.020302660763263702, 0.022516656666994095, -0.03555171936750412, 0.03013620898127556, 0.020990069955587387, -0.026880115270614624, -0.01791439764201641, -0.03428478166460991, 0.029597438871860504, 0.022702636197209358, 0.011961009353399277, 0.0120476009324193, -0.0025164352264255285, -0.02159789390861988, -0.0073714605532586575, 0.027765939012169838, 0.017722725868225098, 0.012650304473936558, -0.013981468975543976 ]
hugging-face-run-llm-model-locally-laptop
https://markhneedham.com/blog/2023/06/23/hugging-face-run-llm-model-locally-laptop
false
2023-06-23 02:44:37
LangChain: 1 validation error for LLMChain - value is not a valid dict (type=type_error.dict)
[ "gpt4all", "langchain", "til", "generative-ai" ]
[ "TIL" ]
I surely can't be the first to make the mistake that I'm about to describe and I expect I won't be the last! I'm still swimming in the LLM waters and I was trying to get GPT4All to play nicely with https://python.langchain.com/docs/get_started/introduction.html[LangChain^]. I wrote the following code to create an LLM chain in LangChain so that every question would use the same prompt template: [source, python] ---- from langchain import PromptTemplate, LLMChain from gpt4all import GPT4All llm = GPT4All( model_name="ggml-gpt4all-j-v1.3-groovy", model_path="/Users/markhneedham/Library/Application Support/nomic.ai/GPT4All/" ) template = """ You are a friendly chatbot assistant that responds in a conversational manner to users questions. Keep the answers short, unless specifically asked by the user to elaborate on something. Question: {question} Answer:""" prompt = PromptTemplate(template=template, input_variables=["question"]) llm_chain = LLMChain(prompt=prompt, llm=llm) ---- When I ran this code, I got the following error: .Output [source, text] ---- Traceback (most recent call last): File "/Users/markhneedham/projects/docs-bot/gpt4all_chain.py", line 26, in <module> llm_chain = LLMChain(prompt=prompt, llm=llm) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/markhneedham/projects/docs-bot/env/lib/python3.11/site-packages/langchain/load/serializable.py", line 65, in __init__ super().__init__(**kwargs) File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for LLMChain llm value is not a valid dict (type=type_error.dict) ---- It took me a long time to work out that the issue is that the value we've passed in as `llm` is invalid as it doesn't extend LangChain's `BaseLanguageModel` class. And the reason for that is that I accidentally passed in the `GPT4All` class, rather than the one with the same name from the LangChain library. Let's fix that: [source, python] ---- from langchain.llms import GPT4All llm = GPT4All( model="/Users/markhneedham/Library/Application Support/nomic.ai/GPT4All/ggml-gpt4all-j-v1.3-groovy", ) ---- And now we can run that code without any errors!
In this post we'll learn about an error message when passing the wrong GPT4All model to LangChain.
uploads/2023/06/langchain-invalid-model-banner.png
[ 0.018077023327350616, -0.0004906986723653972, -0.03334304690361023, 0.02616344578564167, 0.056741178035736084, -0.010624325834214687, 0.010035795159637928, 0.038250792771577835, 0.020797356963157654, 0.011317229829728603, -0.04082619026303291, 0.01761767640709877, -0.06874828785657883, 0.011165261268615723, -0.013199604116380215, 0.06680205464363098, 0.09180524945259094, -0.011372411623597145, -0.01156404335051775, -0.012751658447086811, 0.01621878892183304, 0.05567597597837448, 0.01931857503950596, 0.0030207945965230465, 0.004144401289522648, 0.02930978685617447, 0.01922791637480259, 0.013621731661260128, -0.08317438513040543, -0.005838912911713123, 0.0449385829269886, -0.0022646524012088776, 0.04875294119119644, 0.005389939993619919, 0.02658214420080185, 0.011764472350478172, -0.041837871074676514, 0.00283061433583498, 0.01345707755535841, 0.015881391242146492, -0.03978591039776802, 0.029233867302536964, -0.022788751870393753, 0.022870918735861778, -0.05060458555817604, 0.027271857485175133, -0.036004502326250076, 0.01177868340164423, -0.018151873722672462, -0.03574826195836067, -0.07521943747997284, 0.02800063230097294, -0.01928255334496498, -0.029115773737430573, 0.020086094737052917, 0.048880163580179214, -0.0066598146222531796, -0.10855765640735626, 0.02827415056526661, -0.023175744339823723, -0.013282588683068752, 0.004047945607453585, 0.008539335802197456, 0.017825819551944733, 0.005599366966634989, -0.02351006492972374, -0.009431690908968449, 0.04563574865460396, -0.07390259951353073, -0.05102480947971344, -0.00868599396198988, 0.012752401642501354, -0.010696006938815117, -0.025263799354434013, -0.0040460433810949326, -0.026912666857242584, -0.04931063577532768, 0.04348021745681763, 0.011642925441265106, 0.07019490003585815, -0.020748643204569817, 0.014601223170757294, 0.04067671298980713, 0.03624506667256355, 0.004730368964374065, -0.0152838584035635, -0.03016083501279354, -0.01287445891648531, -0.013015286065638065, 0.06681548058986664, 0.015823660418391228, -0.05065740644931793, 0.032698675990104675, 0.028083376586437225, 0.005684542469680309, -0.051132138818502426, -0.007687164470553398, 0.0315113365650177, -0.010352129116654396, 0.0019789680372923613, -0.015964295715093613, -0.02455076575279236, 0.017797688022255898, -0.00035786564694717526, -0.07100513577461243, -0.004813864827156067, -0.03817199543118477, -0.015999581664800644, -0.017240190878510475, -0.006482092663645744, -0.05013388395309448, -0.002962932689115405, -0.039897363632917404, 0.00394856184720993, -0.0610818974673748, 0.09353557229042053, 0.011091278865933418, -0.03383445739746094, -0.027499286457896233, 0.009308471344411373, 0.04395391047000885, 0.008125563152134418, -0.007463803514838219, 0.07591480016708374, 0.0187710989266634, 0.061199165880680084, 0.019597437232732773, 0.06465885043144226, -0.020201032981276512, -0.05826803669333458, -0.008899594657123089, 0.07282570749521255, -0.038759227842092514, 0.024603622034192085, -0.007012704387307167, -0.013886114582419395, -0.04090147092938423, 0.027379946783185005, 0.015936320647597313, 0.019476136192679405, -0.00962695013731718, 0.0015142828924581409, -0.0009044118341989815, 0.010062498040497303, 0.010483115911483765, 0.05629668012261391, -0.01974514126777649, -0.021748406812548637, -0.05800677090883255, 0.026985958218574524, 0.003735745558515191, 0.03279663622379303, 0.06734918802976608, -0.013146190904080868, -0.009088888764381409, 0.07599333673715591, 0.03560773655772209, 0.023844005540013313, -0.05353530868887901, 0.018111495301127434, 0.014374291524291039, 0.022291209548711777, -0.007059181574732065, 0.061608973890542984, 0.016283895820379257, -0.024711236357688904, 0.008048729971051216, 0.027768347412347794, 0.015915868803858757, 0.014196783304214478, -0.05404343083500862, -0.058478984981775284, 0.040389664471149445, -0.0413946732878685, -0.052858565002679825, -0.012043463997542858, 0.08848877251148224, 0.015294498763978481, 0.05507519096136093, 0.029653754085302353, -0.06851223111152649, 0.027213864028453827, 0.007035626098513603, 0.02995748072862625, 0.049014776945114136, 0.0014041871763765812, 0.09557634592056274, -0.010497423820197582, -0.020911306142807007, 0.018734831362962723, -0.05766769126057625, -0.04999353736639023, -0.0024002755526453257, -0.008642074652016163, 0.06718864291906357, -0.046526871621608734, 0.009669474326074123, 0.09110825508832932, 0.025976108387112617, 0.038168635219335556, 0.03245330974459648, 0.02033773995935917, -0.012378906831145287, -0.02671249769628048, -0.042343154549598694, 0.033399127423763275, 0.0588061586022377, -0.0009754401980899274, -0.02399146929383278, 0.012505986727774143, -0.017363978549838066, 0.026100944727659225, 0.05071094632148743, 0.009103012271225452, 0.03483063355088234, 0.006153583992272615, 0.033627428114414215, -0.02668893337249756, 0.04034782946109772, -0.04451536387205124, 0.030063040554523468, -0.01368078775703907, -0.01705942675471306, -0.02535831741988659, -0.012389740906655788, 0.10460929572582245, 0.05753818899393082, -0.010686100460588932, -0.07475081831216812, 0.020355964079499245, 0.009500034153461456, -0.050263412296772, 0.009164913557469845, -0.00454787677153945, -0.03730260953307152, -0.01974502205848694, -0.04709011688828468, -0.04229789972305298, -0.025158291682600975, -0.02180139347910881, -0.01691145822405815, 0.0898413360118866, -0.03358548507094383, 0.041374094784259796, -0.006604792084544897, 0.0030486388131976128, -0.030497867614030838, -0.01994485780596733, -0.04751158133149147, 0.010229437611997128, 0.010500400327146053, -0.0206631850451231, 0.034392330795526505, 0.000594152370467782, -0.06616982817649841, -0.03933332860469818, -0.07558885216712952, 0.013427467085421085, 0.04622924327850342, 0.0771528109908104, -0.010390620678663254, 0.07292507588863373, -0.0062620616517961025, -0.00489825289696455, -0.034603483974933624, -0.05066825449466705, -0.04863426461815834, -0.018816405907273293, 0.0063782562501728535, 0.012690752744674683, 0.024695612490177155, 0.021625753492116928, -0.0142830153927207, -0.003962608519941568, 0.009200163185596466, 0.0341963954269886, 0.01376088336110115, -0.010273967869579792, -0.007762710563838482, -0.02815951220691204, -0.019449053332209587, 0.043828316032886505, -0.06487826257944107, -0.04320652782917023, -0.002681508893147111, -0.07683519273996353, 0.028144825249910355, -0.08094296604394913, -0.02759525179862976, 0.021043555811047554, 0.0153160709887743, 0.04023895040154457, 0.00012738995428662747, 0.020025795325636864, 0.040277231484651566, -0.009495395235717297, -0.009109342470765114, 0.009973317384719849, -0.010952029377222061, 0.046364471316337585, -0.004994264338165522, 0.016027143225073814, 0.029177989810705185, -0.010038116946816444, -0.00631328159943223, -0.05166615918278694, 0.017859622836112976, -0.03533462807536125, -0.27655377984046936, 0.03865445405244827, 0.011968577280640602, -0.037726856768131256, 0.032415200024843216, -0.0063707237131893635, 0.021789919584989548, -0.04799025133252144, -0.007167952600866556, -0.0032929363660514355, -0.023768706247210503, -0.029675304889678955, -0.028175724670290947, 0.024459879845380783, 0.030921487137675285, 0.022541243582963943, -0.01748630963265896, -0.040758807212114334, 0.026873894035816193, 0.05867437645792961, -0.0011895823990926147, -0.024316802620887756, -0.0025642907712608576, 0.04799673706293106, 0.031108859926462173, 0.025605132803320885, -0.044012486934661865, 0.06039554253220558, -0.04536892846226692, -0.02131982147693634, -0.0038479717914015055, -0.01811792701482773, -0.021187009289860725, -0.0036947824992239475, -0.009822260588407516, -0.014885214157402515, 0.041970688849687576, 0.009394998662173748, -0.005842732731252909, -0.0024780137464404106, -0.017210956662893295, -0.04493651166558266, 0.02345881797373295, -0.01453301403671503, 0.07502371817827225, -0.007918672636151314, -0.08466227352619171, -0.02852380834519863, -0.009029675275087357, 0.07509120553731918, -0.05487660691142082, -0.05359167605638504, -0.0011705325450748205, 0.026622474193572998, 0.01378068421036005, 0.014303098432719707, -0.017953243106603622, -0.012327982112765312, -0.04906429350376129, 0.008960425853729248, -0.02464531548321247, -0.06460508704185486, -0.01341895293444395, -0.05169298127293587, -0.017594989389181137, -0.044209763407707214, -0.03131833299994469, -0.02971678599715233, 0.0627332404255867, 0.02879681997001171, -0.061164453625679016, -0.01633545383810997, -0.022902045398950577, -0.10160885006189346, -0.016126275062561035, -0.024552876129746437, -0.0057554044760763645, 0.00811764132231474, -0.0353817455470562, -0.002151660853996873, -0.06879520416259766, -0.06157872825860977, 0.016709662973880768, 0.022254500538110733, 0.014506257139146328, -0.025672372430562973, 0.007132788188755512, -0.007131732534617186, -0.033125825226306915, 0.0003126970259472728, 0.048953376710414886, 0.009122265502810478, -0.03001890331506729, -0.010869216173887253, -0.0009234510944224894, 0.01228941511362791, 0.0043714614585042, 0.016557099297642708, 0.009563902392983437, 0.0238301083445549, 0.03819418326020241, -0.05988139659166336, -0.02369954064488411, -0.03599850460886955, -0.014141146093606949, -0.008475607261061668, -0.04353254288434982, 0.015231256373226643, 0.003719358006492257, 0.017109107226133347, -0.02253708615899086, 0.011693081818521023, 0.01389585342258215, -0.018985683098435402, -0.0499395988881588, -0.006052634213119745, -0.001013158354908228, 0.01886361837387085, 0.035999737679958344, -0.04551425948739052, -0.08386776596307755, 0.024190641939640045, 0.021850552409887314, 0.0035094604827463627, -0.007841386832296848, -0.021458014845848083, -0.01476129237562418, -0.030201666057109833, 0.002393609844148159, 0.010264555923640728, -0.02724473550915718, 0.014811957255005836, 0.03600721433758736, -0.04897410795092583, 0.035610903054475784, -0.04816669225692749, -0.03177673742175102, -0.018313614651560783, -0.028088543564081192, 0.0008806283585727215, 0.026756005361676216, 0.00835676770657301, 0.011527727358043194, -0.003186445217579603, 0.05326857790350914, -0.03779450058937073, 0.04217473790049553, 0.01850602962076664, -0.01567857526242733, 0.020695991814136505, 0.04210991784930229, -0.028189485892653465, 0.03802869841456413, -0.024423278868198395, -0.00957497302442789, -0.022468967363238335, 0.02770228311419487, -0.0039963386952877045, 0.0029479635413736105, -0.04569248855113983, 0.0264299213886261, -0.013043944723904133, 0.03617510572075844, 0.02318810299038887, 0.017177438363432884, 0.01726209744811058, 0.0015290150186046958, 0.05174446851015091, -0.023737143725156784, 0.016963928937911987, 0.03265988454222679, -0.011231280863285065, -0.03539677709341049, 0.005881447345018387, -0.00768645666539669, 0.03971538692712784, 0.01846327632665634, 0.0017264338675886393, -0.026124970987439156, 0.016485407948493958, -0.0071564302779734135, -0.009887096472084522, 0.022431349381804466, 0.018480787053704262, 0.042576298117637634, 0.001957123400643468, 0.008378221653401852, 0.025731198489665985, -0.025571303442120552, -0.033586397767066956, -0.02632426843047142, 0.01455691922456026, 0.010327382013201714, 0.015554061159491539, -0.03508434817194939, -0.07666637003421783, 0.038935549557209015, 0.013977416791021824, 0.01849520392715931, 0.006522963754832745, -0.021015921607613564, 0.0004331055097281933, -0.04111144319176674, 0.027360090985894203, 0.07232993841171265, -0.05992724373936653, 0.014189758338034153, -0.04106082394719124, 0.03397245332598686, -0.011540815234184265, 0.0002862802939489484, -0.051289740949869156, -0.022576920688152313, -0.029713718220591545, -0.017162472009658813, -0.03464781492948532, -0.04085218161344528, -0.0013474997831508517, 0.051049135625362396, 0.006048663519322872, -0.0003665652475319803, -0.0018700433429330587, 0.030234048143029213, 0.011355116963386536, -0.04070363566279411, 0.015169555321335793, -0.030500708147883415, 0.004898620769381523, 0.029878385365009308, -0.0066353920847177505, 0.022780952975153923, -0.05171094462275505, 0.028694575652480125, 0.021280720829963684, 0.0022065427619963884, -0.025107674300670624, -0.04592624679207802, 0.013757470063865185, -0.00821765884757042, 0.02078370191156864, 0.011501798406243324, -0.003904275596141815, -0.000601226813159883, 0.017537614330649376, -0.028142336755990982, 0.03056325390934944, -0.0024450207129120827, -0.0259927399456501, 0.002515821484848857, 0.07287602871656418, 0.0003183548687957227, 0.04944390431046486, -0.01796640083193779, -0.015576661564409733, 0.049103304743766785, -0.04162253439426422, -0.04716222733259201, -0.041405774652957916, -0.04381626099348068, 0.056218471378088, 0.028903989121317863, 0.026866236701607704, -0.08471905440092087, 0.0399588979780674, 0.035146694630384445, 0.058590613305568695, 0.029397066682577133, -0.0026705365162342787, 0.026286644861102104, -0.021208854392170906, -0.021278612315654755, -0.09460059553384781, 0.016161665320396423, 0.010821767151355743, -0.001948519260622561, -0.0373995266854763, 0.00017695777933113277, -0.052816372364759445, 0.014675464481115341, -0.03854728862643242, -0.03230968490242958, 0.029208455234766006, 0.016989815980196, -0.012334251776337624, 0.04253162071108818, -0.02832680754363537, 0.003994199447333813, 0.030684707686305046, -0.06023506447672844, -0.0284971185028553, -0.029150154441595078, 0.07462387531995773, 0.004814280662685633, 0.010373043827712536, -0.025959501042962074, -0.0032857577316462994, 0.054601628333330154, 0.04084677994251251, 0.0017690809909254313, 0.035561371594667435, 0.01906628906726837, 0.04483846575021744, 0.052694857120513916, 0.016158994287252426, 0.008512912318110466, 0.006332078482955694, -0.03387193754315376, -0.08467556536197662, 0.062092989683151245, 0.018507814034819603, 0.005344756413251162, -0.025494718924164772, 0.054225265979766846, 0.0074864537455141544, -0.03949045389890671, -0.016587749123573303, 0.0210778396576643, -0.07505139708518982, -0.02585095725953579, -0.03376498818397522, -0.002724338322877884, -0.017671911045908928, 0.046666838228702545, -0.01167393196374178, 0.022164857015013695, 0.07422090321779251, -0.01361918170005083, -0.01514192670583725, 0.030744409188628197, 0.05976104736328125, 0.045566048473119736, 0.02900254912674427, 0.02566133625805378, 0.04784503951668739, -0.04185403138399124, -0.03309747576713562, -0.034654341638088226, -0.051314808428287506, 0.0012535578571259975, -0.02076049894094467, 0.00022299960255622864, 0.06731540709733963, -0.03330870717763901, 0.0614570789039135, -0.002058066427707672, 0.00019730823987629265, 0.003654058091342449, 0.03295322135090828, 0.012295274063944817, 0.0881885439157486, 0.008227611891925335, 0.048728957772254944, -0.019113576039671898, -0.029513902962207794, 0.0345928780734539, -0.01965569518506527, -0.009335972368717194, 0.03862572833895683, -0.0046852449886500835, 0.011906466446816921, 0.015930917114019394, 0.03424490988254547, 0.0938289538025856, -0.02543298900127411, -0.03511660173535347, 0.009710611775517464, 0.03939882293343544, 0.010669328272342682, 0.02264559082686901, 0.005718972999602556, -0.01166510209441185, -0.024818507954478264, -0.022770026698708534, -0.006132929585874081, -0.006486973259598017, -0.036702658981084824, 0.0462435707449913, -0.03592441603541374, -0.013345347717404366, 0.011392894200980663, 0.01228769589215517, -0.05576365441083908, -0.03131309151649475, -0.05992540717124939, -0.055944234132766724, -0.053887397050857544, -0.0003323377459309995, 0.007181844208389521, -0.01490930374711752, -0.036597393453121185, -0.026432104408740997, -0.018742704764008522, -0.0007123224786482751, -0.005025404971092939, -0.045589473098516464, -0.03158613666892052, 0.01700713485479355, 0.03077789582312107, 0.00575158791616559, 0.01133397314697504, 0.06597334891557693, -0.006842814385890961, 0.0016178537625819445, -0.003564287442713976, 0.040387123823165894, 0.023019595071673393, -0.0135306091979146, 0.05596358701586723, -0.0698709487915039, 0.014575289562344551, 0.032527171075344086, 0.026119817048311234, -0.07318426668643951, 0.005173399578779936, 0.05759637430310249, -0.016865521669387817, 0.03687530755996704, 0.02704669162631035, 0.0021438547410070896, -0.02953501231968403, -0.021159594878554344, -0.019622964784502983, 0.022920366376638412, 0.0544605627655983, -0.0047434852458536625, 0.07623114436864853, 0.050531357526779175, -0.0013507436960935593, -0.016737814992666245, -0.02413264848291874, -0.0018329315353184938, -0.03311016038060188, -0.0163036547601223, -0.07195696979761124, -0.03747625648975372, -0.03784945234656334, 0.002327876864001155, 0.0003584753139875829, -0.02411891147494316, -0.01665169559419155, 0.019215600565075874, -0.0002787180710583925, -0.04164475202560425, 0.041033558547496796, -0.03578871116042137, -0.02649502642452717, -0.022138085216283798, -0.017017485573887825, -0.010562865994870663, 0.019452646374702454, 0.028565185144543648, 0.004473768640309572, 0.043579209595918655, -0.04897557571530342, 0.013768141157925129, 0.01283365860581398, 0.007651809137314558, 0.02352139540016651, -0.02436898462474346, 0.01993618533015251 ]
[ -0.08123113960027695, 0.0033445232547819614, -0.05842979624867439, -0.019161053001880646, 0.020402774214744568, -0.04779525101184845, -0.021054700016975403, -0.004829007666558027, 0.016380675137043, -0.04938787221908569, 0.014176616445183754, -0.04506504163146019, 0.03792303428053856, 0.020537499338388443, 0.07195783406496048, 0.018952125683426857, -0.015370717272162437, -0.059426646679639816, -0.0011880785459652543, 0.04586954042315483, 0.0135032394900918, -0.036902036517858505, -0.012544004246592522, -0.02035648189485073, 0.02480396442115307, 0.027103563770651817, 0.023375609889626503, -0.01890159398317337, -0.0041445051319897175, -0.2330838441848755, 0.04674506559967995, 0.0034174274187535048, 0.005903616081923246, -0.017128994688391685, -0.029877426102757454, 0.07716493308544159, -0.015553477220237255, 0.007150945253670216, 0.016050754114985466, 0.06160816550254822, 0.011171328835189342, 0.012789139524102211, -0.06010475382208824, -0.04141983762383461, 0.053930360823869705, -0.0466870442032814, -0.02099291980266571, -0.005934897344559431, -0.017022622749209404, -0.017936592921614647, -0.007703943643718958, 0.004503780975937843, -0.011794904246926308, -0.028711754828691483, -0.034375209361314774, 0.01920051872730255, 0.01880071684718132, 0.06369137018918991, 0.0012964471243321896, 0.009795566089451313, -0.002008895156905055, 0.005060515366494656, -0.14845475554466248, 0.11638008058071136, -0.03513200953602791, 0.07168371230363846, -0.025535358116030693, 0.008545486256480217, -0.02943142130970955, 0.09255784749984741, 0.011302348226308823, -0.038602154701948166, -0.011649694293737411, 0.05040242522954941, 0.01015379372984171, -0.004795965738594532, -0.012086468748748302, 0.009524112567305565, 0.06054921820759773, -0.007789178751409054, -0.050033509731292725, -0.014597857370972633, -0.005703567992895842, -0.07266649603843689, 0.005571620538830757, -0.0021200249902904034, -0.017880326136946678, 0.05912186577916145, -0.028580892831087112, 0.019840696826577187, 0.04417194798588753, -0.0346643440425396, 0.010165124200284481, 0.03210058435797691, -0.07746009528636932, -0.017653081566095352, 0.003105388255789876, -0.004762353375554085, -0.09095822274684906, 0.41024646162986755, 0.008333220146596432, -0.01843990385532379, 0.03512411564588547, 0.05780622363090515, 0.017757223919034004, 0.03314971923828125, -0.02023250237107277, -0.018107593059539795, 0.0016504625091329217, -0.02034737914800644, -0.029155300930142403, -0.018303772434592247, 0.04924941062927246, -0.056776680052280426, -0.0020174989476799965, 0.006985876709222794, -0.010331558994948864, 0.007008673623204231, -0.045619841665029526, 0.05869472771883011, -0.026724806055426598, 0.01957150734961033, -0.0005189171060919762, 0.003983113914728165, -0.025336073711514473, -0.01053784228861332, 0.0020044981501996517, 0.03916920721530914, 0.03394997492432594, 0.027661947533488274, 0.03787017986178398, -0.02874183841049671, -0.06471588462591171, 0.009354004636406898, 0.04127372428774834, 0.006230643019080162, 0.04949208348989487, -0.05367277190089226, 0.03018013946712017, 0.007263751234859228, -0.004462947137653828, -0.05727410316467285, -0.033081140369176865, 0.024618396535515785, -0.02311132289469242, 0.07408060133457184, -0.02130366489291191, -0.045130737125873566, -0.018985413014888763, 0.002678960794582963, -0.011933190748095512, -0.003490916918963194, 0.008520644158124924, -0.050300292670726776, 0.03224720433354378, 0.04320186749100685, 0.08181507885456085, -0.005388930439949036, -0.050678789615631104, 0.0031897060107439756, -0.021758368238806725, -0.041719406843185425, -0.03550407290458679, 0.06594028323888779, 0.017876898869872093, -0.10987090319395065, -0.050932470709085464, -0.009204313158988953, -0.001276424154639244, -0.10037197172641754, 0.026112200692296028, 0.004058329854160547, -0.05016188696026802, 0.0023083530832082033, 0.034512799233198166, -0.020477470010519028, -0.038338907063007355, -0.0043654958717525005, 0.02463165484368801, 0.05203791707754135, 0.008318513631820679, 0.015064721927046776, 0.006027875933796167, -0.019739776849746704, -0.04660886526107788, -0.06047198176383972, -0.018792033195495605, -0.03852738067507744, -0.009051240049302578, -0.0438421405851841, -0.027048321440815926, 0.027586007490754128, -0.031589239835739136, 0.05242213234305382, -0.051831554621458054, -0.0010005277581512928, -0.022731980308890343, -0.04602840542793274, 0.013323567807674408, -0.011406321078538895, 0.017469853162765503, 0.043024759739637375, 0.01752929948270321, 0.04872975870966911, -0.07337678223848343, 0.018740998581051826, 0.04957161098718643, -0.03582479804754257, 0.052876584231853485, 0.04449671134352684, -0.05387747287750244, -0.009554224088788033, -0.005935180000960827, -0.009827726520597935, -0.01509273611009121, -0.0266575925052166, -0.03978411853313446, 0.04852355644106865, 0.027233051136136055, 0.006444569211453199, -0.046746134757995605, 0.00020565080922096968, -0.0326656699180603, -0.3568892478942871, -0.012207642197608948, 0.03282419219613075, 0.0040506282821297646, 0.005595875438302755, -0.0914158970117569, 0.028620723634958267, 0.004528977908194065, -0.026927506551146507, 0.04183876886963844, 0.11258929967880249, 0.0031590822618454695, 0.007677764631807804, -0.06499803811311722, -0.010142586193978786, 0.05746036767959595, -0.03892144933342934, -0.012798315845429897, 0.017236242070794106, 0.0546998456120491, -0.03197246417403221, 0.00764658534899354, 0.00477978028357029, -0.07898176461458206, -0.037979815155267715, -0.006804680917412043, 0.134073868393898, 0.026699723675847054, 0.047141000628471375, -0.005860338918864727, 0.06741920113563538, 0.01933847740292549, 0.0025176957715302706, -0.07058975100517273, 0.034576524049043655, -0.015924252569675446, 0.00538927735760808, 0.026552511379122734, 0.055566128343343735, -0.02523067221045494, -0.07619347423315048, 0.013583682477474213, -0.01460154540836811, -0.050553906708955765, -0.01338759995996952, 0.013129739090800285, -0.028531856834888458, 0.013974270783364773, -0.023268047720193863, 0.06047291308641434, -0.014557545073330402, 0.02625640109181404, 0.030156895518302917, 0.03137543797492981, -0.01836554706096649, -0.008412148803472519, -0.08760110288858414, -0.03484465926885605, 0.010377333499491215, 0.0034402792807668447, 0.01728185825049877, 0.05157933756709099, 0.04150669276714325, -0.025434531271457672, -0.04244884103536606, -0.012910240329802036, 0.00475890189409256, -0.012947062030434608, 0.05931337922811508, -0.03581560403108597, 0.006191939581185579, 0.08995048701763153, 0.04568982496857643, 0.022496124729514122, -0.014759196899831295, 0.062158528715372086, -0.04099007695913315, 0.01332238782197237, -0.008425134234130383, -0.014249811880290508, 0.01093525905162096, 0.024671519175171852, 0.01332211121916771, -0.015942063182592392, -0.027948185801506042, 0.01924549974501133, -0.06308365613222122, 0.035906944423913956, 0.06882888823747635, 0.029706602916121483, -0.02793714962899685, 0.021421261131763458, 0.0020377279724925756, -0.003501072758808732, 0.05718933790922165, -0.0007775754202157259, -0.23420435190200806, 0.04435967281460762, 0.06755191832780838, 0.08299318701028824, 0.00005892827539355494, 0.03888710215687752, -0.0012355759972706437, -0.0670245960354805, -0.04096023738384247, 0.011509688571095467, 0.03114684671163559, 0.03354807198047638, 0.018089884892106056, -0.01888248138129711, 0.02087072841823101, -0.049086395651102066, 0.04199476167559624, 0.0025667017325758934, -0.0019485100638121367, 0.019116029143333435, 0.03488712012767792, 0.023263799026608467, 0.14274278283119202, 0.0022036561276763678, 0.004650924354791641, 0.02850058302283287, -0.013289672322571278, 0.0021700914949178696, 0.05266382172703743, 0.04735245183110237, -0.029766760766506195, 0.020750420168042183, 0.08177702128887177, 0.004771458450704813, 0.053849149495363235, -0.04560195282101631, 0.0025265803560614586, 0.006450478453189135, 0.044109046459198, 0.0013105918187648058, -0.03307772055268288, 0.043210841715335846, -0.01816418394446373, -0.018551748245954514, 0.075841523706913, 0.02882903255522251, -0.01015049684792757, -0.029156042262911797, -0.05086105316877365, 0.024233855307102203, -0.033755701035261154, -0.019860031083226204, -0.04428786784410477, 0.006785090081393719, -0.012274722568690777, 0.009571600705385208, 0.03601551800966263, -0.02624545991420746, -0.016603359952569008, 0.014802107587456703, 0.021366089582443237, -0.039082661271095276, 0.1314353048801422, 0.02110620215535164, -0.012634390965104103 ]
[ 0.025197306647896767, 0.023486431688070297, 0.011810587719082832, 0.0030158446170389652, 0.006614204961806536, -0.014691915363073349, -0.00556274875998497, 0.02934148907661438, 0.00794578529894352, -0.00823228619992733, -0.010553580708801746, 0.0015496453270316124, 0.02804577350616455, 0.015257994644343853, 0.013671724125742912, 0.0025922677014023066, 0.012319805100560188, 0.022829631343483925, 0.015766823664307594, -0.011839546263217926, -0.03805501386523247, 0.016318004578351974, 0.042683981359004974, 0.03099057637155056, -0.033334702253341675, -0.033769313246011734, -0.0020030394662171602, 0.006204313598573208, 0.021840320900082588, -0.07889311015605927, -0.0008441311656497419, -0.031966496258974075, -0.025650378316640854, 0.004906415473669767, 0.005497677251696587, 0.04914747178554535, 0.0014483630657196045, 0.00435693608596921, 0.0039967503398656845, 0.0036593428812921047, 0.024347007274627686, -0.003834383562207222, 0.010866758413612843, 0.02118225209414959, 0.015127484686672688, -0.006409232504665852, -0.030566822737455368, -0.022570151835680008, -0.01749802939593792, -0.01782253384590149, -0.003975873347371817, -0.007667131721973419, 0.0011288122041150928, -0.018503384664654732, 0.006211190950125456, 0.01889886148273945, -0.011927099898457527, -0.01972910948097706, 0.029203269630670547, -0.016056351363658905, 0.028758356347680092, -0.0015533093828707933, -0.06019138544797897, -0.024884391576051712, -0.0011370007414370775, 0.031033514067530632, -0.004159545060247183, 0.03599437326192856, -0.0038762912154197693, 0.021756380796432495, -0.013100764714181423, 0.02401966042816639, -0.02549472637474537, 0.007395402528345585, -0.018155822530388832, -0.040989454835653305, 0.019128018990159035, -0.022739415988326073, 0.016715478152036667, 0.0053468309342861176, 0.0003486033238004893, 0.026989514008164406, 0.018756134435534477, -0.02016305923461914, -0.021915363147854805, -0.03987918794155121, 0.00862855277955532, 0.020588817074894905, 0.014544411562383175, -0.03517167642712593, -0.021398328244686127, -0.013399050571024418, -0.017717091366648674, -0.017226122319698334, -0.08410584926605225, -0.029942022636532784, -0.05202362313866615, -0.030240632593631744, -0.019895223900675774, 0.8109410405158997, 0.005257520824670792, -0.0032475031912326813, -0.00036169702070765197, 0.008737586438655853, -0.007321320939809084, 0.05155239999294281, 0.005222308915108442, 0.02319495752453804, -0.004350424278527498, 0.0027815280482172966, 0.013203256763517857, 0.00004803250340046361, 0.04041511192917824, 0.026285551488399506, 0.015337404794991016, 0.015893878415226936, -0.017420971766114235, 0.02102481946349144, -0.04889875277876854, 0.08086277544498444, -0.016858628019690514, -0.011828901246190071, 0.04258693754673004, -0.006303713191300631, -0.0009584366925992072, -0.1406470239162445, 0.025494050234556198, -7.155471416377336e-33, 0.06495953351259232, -0.04772987216711044, 0.017159869894385338, 0.019600003957748413, 0.06490705907344818, 0.028249621391296387, 0.028256580233573914, -0.007160474546253681, -0.0029199367854744196, -0.053712960332632065, -0.009861142374575138, -0.01473010703921318, -0.041397470980882645, -0.012987839989364147, 0.00947918463498354, -0.001971019199118018, 0.03174937888979912, 0.03324682265520096, -0.013583887368440628, 0.029379574581980705, 0.005127054639160633, 0.06730060279369354, 0.04410000890493393, 0.024475596845149994, 0.010487200692296028, 0.05622962489724159, 0.03033026121556759, -0.006425646133720875, 0.041734304279088974, -0.01815572753548622, -0.054173633456230164, -0.037228502333164215, -0.018626783043146133, -0.012848311103880405, -0.010942242108285427, -0.04893321916460991, -0.04215420410037041, -0.0010375998681411147, 0.02062108740210533, -0.01720591075718403, -0.03257023170590401, 0.0014583825832232833, 0.03320794180035591, -0.06758301705121994, -0.03906669840216637, 0.013840604573488235, 0.02251371741294861, 0.07534177601337433, 0.0039184740744531155, 0.03415282815694809, 0.021693745627999306, 0.022775886580348015, -0.05851501598954201, 0.045113250613212585, -0.04797598719596863, 0.00610164413228631, -0.01683126762509346, 0.016208264976739883, 0.0007917892071418464, -0.020047390833497047, 0.03334219008684158, 0.0028075992595404387, 0.00011297674791421741, 0.038649603724479675, 0.04492589831352234, -0.008753583766520023, -0.03877972438931465, 0.0029594632796943188, -0.00013724352174904197, 0.021602047607302666, -0.08472326397895813, -0.002608796814456582, -0.031691960990428925, 0.02726483717560768, 0.04709027335047722, -0.023461366072297096, -0.014229211024940014, -0.05265466496348381, 0.008911446668207645, 0.03813821077346802, -0.04454837366938591, 0.022928738966584206, -0.007242377381771803, -0.0522640198469162, -0.02292821742594242, -0.047854870557785034, 0.043989431113004684, 0.004345941822975874, -0.014535399153828621, 0.00842647347599268, -0.017594484612345695, -0.03365409001708031, -0.0197572261095047, 0.007699447218328714, -0.004183706361800432, 6.772620987838179e-33, 0.005790724419057369, -0.006632697768509388, 0.007392189931124449, 0.034700892865657806, -0.0036328614223748446, -0.0339491106569767, 0.034368984401226044, 0.007855496369302273, -0.03354986011981964, 0.04351256787776947, -0.0034008920192718506, 0.007841601967811584, -0.033127203583717346, 0.049413397908210754, 0.11216244846582413, 0.016953149810433388, -0.01888129487633705, -0.01676965318620205, 0.018277602270245552, 0.002353852614760399, 0.01316069159656763, 0.012192532420158386, -0.031492993235588074, 0.019930606707930565, 0.03045872040092945, 0.036077216267585754, 0.027237534523010254, 0.023947829380631447, 0.015090428292751312, 0.011018678545951843, 0.003525627078488469, 0.0213509202003479, -0.030724015086889267, -0.015478944405913353, -0.04365789145231247, 0.026048967614769936, 0.05688933655619621, 0.03950729966163635, -0.01109379343688488, 0.004465119447559118, 0.05841216444969177, -0.019696883857250214, 0.007634509354829788, 0.027887240052223206, -0.02612766996026039, -0.0046854824759066105, 0.016203006729483604, 0.006404625717550516, 0.011617479845881462, -0.00007431366248056293, -0.01553428266197443, -0.01505331415683031, 0.028275398537516594, -0.019179975613951683, -0.010711515322327614, -0.04357532411813736, -0.00021835842926520854, 0.02425016649067402, -0.06112883985042572, -0.012382948771119118, -0.035448215901851654, -0.017352495342493057, 0.014409800060093403, -0.006040302570909262, -0.03176775202155113, -0.029413336887955666, -0.05362812802195549, -0.029717404395341873, 0.01435723528265953, -0.028021855279803276, 0.006573171820491552, -0.021853158250451088, -0.0245056189596653, 0.009032653644680977, 0.007314939517527819, 0.026867901906371117, -0.058584779500961304, -0.06427014619112015, 0.005591900087893009, -0.004407413303852081, -0.00622823229059577, 0.0260101817548275, 0.0300812479108572, 0.010265869088470936, -0.0038924168329685926, -0.046756595373153687, -0.023387346416711807, 0.031032821163535118, 0.05573982745409012, -0.0009404775919392705, 0.014203724451363087, 0.008619924075901508, 0.008078863844275475, 0.016632432118058205, -0.018011292442679405, -1.2593225129364782e-8, -0.022283317521214485, -0.012782272882759571, -0.002448487328365445, 0.05547994747757912, -0.038322847336530685, -0.009872007183730602, -0.03280201554298401, 0.010155445896089077, -0.009959287941455841, -0.04504455253481865, 0.0335119366645813, -0.01085112988948822, -0.03671684488654137, -0.007429190445691347, 0.015224749222397804, -0.03536579757928848, -0.005941163282841444, -0.001092915772460401, -0.005139798391610384, -0.007992202416062355, -0.02019733190536499, 0.03510100767016411, -0.01673858053982258, -0.001201764913275838, -0.03240615874528885, 0.006627484690397978, 0.05460910126566887, -0.07250189781188965, -0.0375077985227108, 0.022626632824540138, 0.054380498826503754, -0.029633058235049248, -0.06198706105351448, 0.025276508182287216, -0.030668610706925392, -0.051601070910692215, -0.01849849335849285, 0.026156753301620483, 0.045632414519786835, -0.00657502468675375, 0.024618646129965782, 0.012755895033478737, -0.019880298525094986, -0.024260148406028748, -0.018462812528014183, -0.013741705566644669, -0.0486350916326046, 0.0027547040954232216, 0.035182055085897446, 0.008700522594153881, -0.018634360283613205, 0.003246342996135354, -0.014203573577105999, 0.04779229313135147, 0.019710877910256386, -0.014056744053959846, -0.03728451207280159, -0.034367144107818604, -0.04359155893325806, -0.02586245909333229, 0.014389359392225742, 0.015025868080556393, 0.0012088714865967631, -0.042979467660188675 ]
langchain-validation-error-llmchain-value-not-valid-dict
https://markhneedham.com/blog/2023/06/23/langchain-validation-error-llmchain-value-not-valid-dict
false
2023-06-12 02:44:37
GitHub: Get a CSV containing my pull requests (PRs)
[ "github", "til" ]
[ "TIL" ]
:icons: font I wanted to get a list of my GitHub pull requests (PRs) and commits, which was surprisingly difficult to figure out how to do. I'm sure it must be possible to get this data from the API, but it was a lot easier to figure out how to do so with the https://github.com/cli/cli[GitHub CLI^]. [NOTE] ==== This blog post explains how to use the GitHub CLI on the Mac OS terminal. If you're trying to do this on Windows, see https://reshmeeauckloo.com/posts/github_retrieve_all_prs_githubcli/[Get a CSV of all my pull requests from Github using Github CLI and PowerShell^]. ==== So I installed that and it had to be authorised via the GitHub website the first time. I could then get a list of my PRs by running the following command: [source, bash] ---- gh search prs \ --author=@me \ --limit 10 \ --json title,repository,closedAt,url | jq -c '.[]' ---- .Output [source, json] ---- {"closedAt":"2023-06-12T13:09:43Z","repository":{"name":"dev.startree.ai","nameWithOwner":"startreedata/dev.startree.ai"},"title":"RT data ingestion explanation","url":"https://github.com/startreedata/dev.startree.ai/pull/173"} {"closedAt":"0001-01-01T00:00:00Z","repository":{"name":"sourcegraph","nameWithOwner":"sourcegraph/sourcegraph"},"title":"Small typo","url":"https://github.com/sourcegraph/sourcegraph/pull/52604"} {"closedAt":"2023-05-13T16:40:59Z","repository":{"name":"venkat","nameWithOwner":"mneedham/venkat"},"title":"pull out language","url":"https://github.com/mneedham/venkat/pull/3"} {"closedAt":"2023-05-05T06:00:29Z","repository":{"name":"dev.startree.ai","nameWithOwner":"startreedata/dev.startree.ai"},"title":"Update README.md","url":"https://github.com/startreedata/dev.startree.ai/pull/149"} {"closedAt":"2023-05-10T01:22:35Z","repository":{"name":"risingwave-docs","nameWithOwner":"risingwavelabs/risingwave-docs"},"title":"Update risingwave-kubernetes.md","url":"https://github.com/risingwavelabs/risingwave-docs/pull/792"} {"closedAt":"2023-04-04T13:08:18Z","repository":{"name":"pinot-recipes","nameWithOwner":"startreedata/pinot-recipes"},"title":"Update README.md","url":"https://github.com/startreedata/pinot-recipes/pull/10"} {"closedAt":"2023-03-30T10:07:52Z","repository":{"name":"pinot-recipes","nameWithOwner":"startreedata/pinot-recipes"},"title":"Update README.md","url":"https://github.com/startreedata/pinot-recipes/pull/8"} {"closedAt":"2023-03-30T10:07:13Z","repository":{"name":"pinot-recipes","nameWithOwner":"startreedata/pinot-recipes"},"title":"Update README.md","url":"https://github.com/startreedata/pinot-recipes/pull/7"} {"closedAt":"0001-01-01T00:00:00Z","repository":{"name":"pinot","nameWithOwner":"apache/pinot"},"title":"Consumer lag unknown","url":"https://github.com/apache/pinot/pull/10310"} {"closedAt":"2023-02-13T23:30:29Z","repository":{"name":"pinot","nameWithOwner":"apache/pinot"},"title":"Bug with time based segment relocator on real-time segments","url":"https://github.com/apache/pinot/pull/10272"} ---- I want those in CSV format though, which we can do by putting all the values into an array and then calling `@csv`: [source, bash] ---- gh search prs \ --author=@me \ --limit 10 \ --json title,repository,closedAt,url | jq -r '.[]| [.title, .url, .repository.nameWithOwner, .closedAt] | @csv' ---- .Output |=== |RT data ingestion explanation |https://github.com/startreedata/dev.startree.ai/pull/173 |startreedata/dev.startree.ai |2023-06-12T13:09:43Z |Small typo |https://github.com/sourcegraph/sourcegraph/pull/52604 |sourcegraph/sourcegraph |0001-01-01T00:00:00Z |Pull out language |https://github.com/mneedham/venkat/pull/3 |mneedham/venkat |2023-05-13T16:40:59Z |Update README.md |https://github.com/startreedata/dev.startree.ai/pull/149 |startreedata/dev.startree.ai |2023-05-05T06:00:29Z |Update risingwave-kubernetes.md |https://github.com/risingwavelabs/risingwave-docs/pull/792 |risingwavelabs/risingwave-docs |2023-05-10T01:22:35Z |Update README.md |https://github.com/startreedata/pinot-recipes/pull/10 |startreedata/pinot-recipes |2023-04-04T13:08:18Z |Update README.md |https://github.com/startreedata/pinot-recipes/pull/8 |startreedata/pinot-recipes |2023-03-30T10:07:52Z |Update README.md |https://github.com/startreedata/pinot-recipes/pull/7 |startreedata/pinot-recipes |2023-03-30T10:07:13Z |Consumer lag unknown |https://github.com/apache/pinot/pull/10310 |apache/pinot |0001-01-01T00:00:00Z |Bug with time based segment relocator on real-time segments |https://github.com/apache/pinot/pull/10272 |apache/pinot |2023-02-13T23:30:29Z |=== You can see that I don't actually create that many pull requests as I tend to commit things straight to main! As a bonus, let's have a look at my commits as well: [source, bash] ---- gh search commits \ --author=@me --limit 1 \ --author-date=">2022-01-01" --order desc --sort author-date \ --visibility public --json repository,sha,commit | jq '.[]' ---- .Output [source, json] ---- { "commit": { "author": { "date": "2023-06-12T10:59:13+01:00", "email": "m.h.needham@gmail.com", "name": "Mark Needham" }, "comment_count": 0, "committer": { "date": "2023-06-12T10:59:13+01:00", "email": "m.h.needham@gmail.com", "name": "Mark Needham" }, "message": "Merge branch 'main' of github.com:startreedata/pinot-recipes", "tree": { "sha": "71da7e300e8ed035c6877422e8dd30266d7abc2c" } }, "repository": { "description": "This repository contains recipes for Apache Pinot.", "fullName": "startreedata/pinot-recipes", "id": "R_kgDOGdrbcQ", "isFork": false, "isPrivate": false, "name": "pinot-recipes", "owner": { "id": "MDEyOk9yZ2FuaXphdGlvbjc2NjAxMzMz", "is_bot": false, "login": "startreedata", "type": "Organization", "url": "https://github.com/startreedata" }, "url": "https://github.com/startreedata/pinot-recipes" }, "sha": "373dc891a04ecb9dba009394ce9266a07d8ac9c0" } ---- Let's pull out just the bits we want: [source, bash] ---- gh search commits \ --author=@me --limit 10 \ --author-date=">2022-01-01" --order desc --sort author-date \ --visibility public --json repository,sha,commit | jq -r '.[] | [.commit.author.date, .commit.message, .repository.fullName] | @csv' ---- .Output |=== |2023-06-12T10:59:13+01:00 |Merge branch 'main' of github.com:startreedata/pinot-recipes |startreedata/pinot-recipes |2023-06-12T10:59:01+01:00 |fixed host |startreedata/pinot-recipes |2023-06-09T09:30:53+01:00 |update |mneedham/hugo-blog |2023-06-09T07:48:13+01:00 |updates |mneedham/mneedham.github.io |2023-06-09T07:40:23+01:00 |linkedin |mneedham/mneedham.github.io |2023-06-09T07:03:28+01:00 |updates |mneedham/hugo-blog |2023-06-09T06:56:00+01:00 |duckdb |mneedham/mneedham.github.io |2023-06-06T16:46:23+01:00 |Update README.md |startreedata/pinot-recipes |2023-06-06T16:45:41+01:00 |Update README.md |startreedata/pinot-recipes |2023-06-06T16:45:22+01:00 |Update README.md |startreedata/pinot-recipes |===
In this post we'll learn how to get a list of our latest PRs using the GitHub CLI tool.
uploads/2023/05/git-prs-banner.png
[ 0.02033161371946335, -0.001640196074731648, -0.0035010376013815403, 0.013817595317959785, 0.07670383900403976, 0.05449898913502693, 0.014567733742296696, 0.046781718730926514, -0.02817421592772007, -0.006957787089049816, -0.021257752552628517, -0.009598687291145325, -0.08380289375782013, 0.0070557561703026295, 0.004432122688740492, 0.055696405470371246, 0.06526075303554535, 0.01036242488771677, 0.010428044013679028, 0.008276761509478092, 0.024226738139986992, 0.0750364437699318, -0.03377433493733406, 0.032170213758945465, 0.01784651167690754, 0.0008688773959875107, 0.02619801089167595, 0.001148282433860004, -0.0480211079120636, -0.03479912877082825, 0.04039478302001953, -0.021254561841487885, 0.005778750404715538, -0.0234838854521513, 0.002738018985837698, -0.012570273131132126, -0.04356471449136734, 0.007718986365944147, 0.012586708180606365, 0.02033727988600731, -0.0676584392786026, 0.014658689498901367, -0.017559785395860672, 0.0042884149588644505, -0.03269915282726288, 0.031143764033913612, -0.083256796002388, 0.027355054393410683, -0.006698263343423605, 0.0018839752301573753, -0.06763170659542084, 0.02683575265109539, -0.03700902685523033, -0.025032659992575645, 0.0005566470790654421, 0.0401013009250164, 0.01750512607395649, -0.07808346301317215, 0.020238716155290604, -0.03796933591365814, 0.009542831219732761, -0.011572462506592274, 0.05453287810087204, 0.05469499155879021, 0.00014314668078441173, -0.03630392253398895, 0.018786342814564705, 0.056325577199459076, -0.032559528946876526, -0.013541283085942268, -0.005233380012214184, -0.004944160580635071, -0.04677966982126236, 0.0061320094391703606, 0.027613261714577675, -0.06226790323853493, -0.011822384782135487, 0.06408700346946716, 0.019203245639801025, 0.05716564133763313, -0.02393118105828762, 0.0271756649017334, 0.01725637912750244, 0.013718676753342152, 0.01365293562412262, -0.04129937291145325, -0.05906164273619652, -0.0288293045014143, -0.06449326872825623, 0.04109771177172661, 0.00407387176528573, -0.054301660507917404, 0.005743422545492649, 0.00894242525100708, 0.00753004988655448, 0.015139897353947163, 0.01724935695528984, 0.008852540515363216, -0.008677087724208832, -0.018858570605516434, -0.05487598106265068, -0.009256650693714619, 0.023663129657506943, 0.03310900181531906, -0.06325402110815048, -0.010263925418257713, 0.006194188259541988, -0.008570061065256596, -0.006237378343939781, -0.025725720450282097, -0.00042239739559590816, 0.008927461691200733, -0.03582030162215233, 0.014076647348701954, -0.059794310480356216, 0.07791759818792343, 0.0165297482162714, -0.060674380511045456, -0.02337603271007538, 0.02961527369916439, 0.03875116631388664, 0.039293911308050156, 0.014302106574177742, 0.07382649928331375, 0.004934628959745169, 0.05851856619119644, -0.019161060452461243, 0.026780812069773674, -0.017065318301320076, -0.07347887009382248, -0.021329758688807487, 0.08082114160060883, -0.0171218141913414, -0.01050403993576765, 0.008849355392158031, -0.02342507801949978, 0.008428629487752914, 0.006512423511594534, 0.043251555413007736, 0.004043221473693848, -0.004066164139658213, -0.029501408338546753, -0.013261913321912289, -0.0082229720428586, 0.009972953237593174, 0.028509007766842842, -0.007914016023278236, -0.04323456808924675, -0.05625046044588089, 0.03710329160094261, 0.012112215161323547, -0.004746835213154554, 0.06473153829574585, -0.02278311364352703, 0.0010696274694055319, 0.09519874304533005, 0.033285532146692276, 0.008886083960533142, -0.01095026358962059, 0.0076051140204072, 0.03650911897420883, 0.04912986978888512, -0.009825902059674263, 0.050517428666353226, -0.008858179673552513, -0.04555865749716759, 0.005273321643471718, 0.02425331063568592, -0.03658679500222206, -0.010549107566475868, -0.05353912338614464, -0.07354286313056946, 0.06314339488744736, -0.038053933531045914, -0.00933616328984499, 0.04793529585003853, 0.08148973435163498, 0.01760554313659668, 0.02618762105703354, 0.018006617203354836, -0.08402848243713379, 0.05059982091188431, 0.014746283181011677, 0.0009018887649290264, 0.01372893899679184, -0.0293566957116127, 0.10146339982748032, -0.003725892398506403, 0.03899583965539932, 0.0122483866289258, -0.07265807688236237, -0.04820869117975235, -0.03605712205171585, 0.010477605275809765, 0.059710677713155746, -0.04671930894255638, -0.009778860956430435, 0.0553307868540287, 0.024712195619940758, 0.03679227456450462, -0.008875224739313126, -0.03250182420015335, 0.030551141127943993, -0.07020056992769241, -0.0608503594994545, 0.028885643929243088, 0.02786368504166603, -0.0101998932659626, -0.010633661411702633, 0.01840485818684101, -0.013468385674059391, 0.010177758522331715, 0.037007372826337814, -0.045630209147930145, 0.025801410898566246, 0.002217896282672882, 0.010625630617141724, -0.030599558725953102, 0.02668576128780842, -0.05577325075864792, 0.03201954811811447, 0.01791161298751831, 0.015579374507069588, -0.02076674811542034, 0.003272089408710599, 0.1141989454627037, 0.06842465698719025, -0.020068692043423653, -0.024924524128437042, 0.03665674850344658, 0.007347870618104935, -0.032341666519641876, 0.004034362733364105, -0.04778477922081947, -0.04013340175151825, -0.009403577074408531, -0.04829512909054756, -0.02942998707294464, 0.0002766167453955859, -0.04039768502116203, 0.031098054721951485, 0.06087228283286095, -0.0076248436234891415, 0.05875029042363167, 0.01415341254323721, -0.05854033678770065, -0.004077011253684759, -0.03667318448424339, -0.06287869065999985, 0.015716396272182465, 0.02073940634727478, -0.007095851004123688, 0.03182366490364075, -0.034587375819683075, -0.03246775269508362, -0.015019279904663563, -0.017933553084731102, 0.02417345531284809, 0.0158673282712698, 0.08954133093357086, -0.012994930148124695, 0.014265509322285652, -0.03860214725136757, 0.04560603201389313, -0.005009790416806936, -0.036573197692632675, -0.019491281360387802, -0.03009866178035736, 0.022638268768787384, 0.028782673180103302, 0.021649183705449104, 0.02481178008019924, 0.018631651997566223, -0.007259199395775795, 0.007745538838207722, 0.0067748758010566235, 0.03363926708698273, 0.0007401892798952758, -0.018020249903202057, -0.05356412008404732, -0.028084563091397285, 0.04910273849964142, -0.04028372839093208, -0.039047155529260635, -0.006207659840583801, -0.07543676346540451, 0.07156580686569214, -0.05126362293958664, -0.023518409579992294, -0.023637164384126663, 0.007537952624261379, 0.06952306628227234, -0.0021941610611975193, 0.017260074615478516, 0.04082686826586723, 0.006077790632843971, 0.042562417685985565, 0.027650779113173485, 0.004275910556316376, 0.05360895022749901, -0.0063491091132164, 0.017229001969099045, 0.055875491350889206, -0.010379944927990437, 0.013814928941428661, -0.03945465385913849, 0.029290897771716118, -0.02808062732219696, -0.2603452205657959, 0.01685885712504387, -0.013434244319796562, -0.03170917183160782, 0.01633681170642376, 0.0022572348825633526, 0.02012479305267334, -0.044440578669309616, -0.003896352369338274, 0.014266167767345905, 0.011590361595153809, -0.023313362151384354, -0.022786056622862816, 0.03536692634224892, -0.002059356775134802, 0.019218971952795982, 0.02825811319053173, -0.054284676909446716, -0.007779102772474289, 0.04311443492770195, -0.01339159905910492, -0.046988386660814285, 0.005725596100091934, 0.05232326313853264, 0.01982380822300911, 0.039034225046634674, -0.08329226076602936, 0.03749125078320503, -0.045948345214128494, -0.024012651294469833, 0.012648028321564198, -0.0074777863919734955, -0.0075906808488070965, 0.005836063995957375, -0.015299567952752113, -0.02050890028476715, 0.02898113615810871, -0.012171178124845028, 0.013185596093535423, 0.009590032510459423, 0.0002838753571268171, -0.018716994673013687, -0.021803589537739754, -0.012848582118749619, 0.07153122127056122, 0.007451486308127642, -0.06624750792980194, 0.0003139633627142757, -0.04369531199336052, 0.10724432021379471, -0.03465866297483444, -0.023622604086995125, -0.0197029709815979, 0.021289950236678123, 0.024006115272641182, -0.03053274191915989, -0.02358841709792614, 0.019566889852285385, -0.06566786020994186, -0.0269134733825922, -0.0011663994519039989, -0.01703939028084278, -0.01376495510339737, -0.04905349388718605, -0.02615702897310257, -0.08743788301944733, -0.034467604011297226, -0.02196490578353405, 0.059571754187345505, 0.012968972325325012, -0.054898861795663834, 0.006798018701374531, -0.011099575087428093, -0.10298674553632736, -0.0029972176998853683, -0.040037572383880615, -0.03844299167394638, 0.0192356426268816, -0.010153813287615776, 0.037914205342531204, -0.04173128306865692, -0.043388593941926956, 0.0042478227987885475, 0.02456088177859783, -0.016249673441052437, 0.031355421990156174, 0.031343769282102585, -0.024539334699511528, -0.01667620614171028, 0.011398933827877045, 0.05811596289277077, -0.03440237417817116, -0.024399908259510994, -0.004193998407572508, -0.00319701642729342, 0.005233092699199915, 0.031097112223505974, 0.016111155971884727, 0.024685228243470192, 0.05900139361619949, 0.04188209027051926, -0.04485577344894409, -0.013805011287331581, -0.042246263474226, -0.016989203169941902, -0.004201925825327635, -0.06959227472543716, 0.02168450690805912, 0.03586538881063461, -0.0043310909532010555, -0.006144549697637558, -0.053137701004743576, 0.035723354667425156, -0.09265618026256561, -0.03404916450381279, -0.025532541796565056, 0.02648147940635681, 0.03409675508737564, 0.00609154999256134, -0.006039041560143232, -0.054995447397232056, 0.016921790316700935, 0.004691764712333679, -0.020785940811038017, -0.0689043402671814, -0.042120762169361115, 0.00024488350027240813, -0.01536732167005539, 0.01388977374881506, 0.024716759100556374, -0.0061201052740216255, 0.031603410840034485, 0.02328534983098507, -0.037230927497148514, 0.012038826942443848, -0.007013608235865831, -0.014456421136856079, -0.020673254504799843, 0.01885819621384144, 0.0028601880185306072, -0.03138162940740585, 0.027030326426029205, -0.008012210950255394, 0.02783154509961605, 0.05034565180540085, -0.0040544169023633, 0.014835684560239315, 0.007704630959779024, 0.002392936497926712, -0.0075286757200956345, 0.001007653889246285, -0.03805689141154289, 0.013657188974320889, -0.025895794853568077, -0.014114275574684143, -0.024319231510162354, 0.018427405506372452, -0.015860257670283318, -0.04036402329802513, -0.0397627055644989, 0.029404416680336, -0.05427312105894089, 0.01157773844897747, 0.004871672485023737, -0.024504603818058968, 0.023886788636446, 0.02025429531931877, 0.022430751472711563, -0.012216764502227306, -0.032996829599142075, 0.029429204761981964, 0.004822826012969017, -0.0049714501947164536, 0.0010549519211053848, -0.008848865516483784, 0.00942199770361185, 0.013253328390419483, 0.03380057215690613, 0.046446092426776886, 0.013100702315568924, -0.0192131157964468, -0.024037839844822884, 0.007815797813236713, 0.013844975270330906, 0.021847397089004517, 0.04002711921930313, -0.005751373711973429, -0.019300352782011032, -0.011871344409883022, -0.017103109508752823, -0.011811915785074234, -0.017246738076210022, -0.005132268648594618, -0.019285904243588448, -0.022143006324768066, -0.08077029138803482, 0.01701939105987549, 0.005249782465398312, 0.034173134714365005, 0.017128748819231987, -0.019828885793685913, 0.0349043533205986, -0.058530379086732864, 0.02171379141509533, 0.04791044816374779, -0.049899715930223465, -0.017822690308094025, 0.03670051321387291, 0.028222475200891495, -0.024470625445246696, 0.002322600921615958, -0.06703069806098938, -0.030680717900395393, 0.0035262347664684057, 0.009987165220081806, -0.016562018543481827, -0.021734269335865974, -0.02481015957891941, 0.006081027444452047, -0.007189158350229263, -0.002799815032631159, 0.0082068657502532, -0.007851106114685535, 0.009241228923201561, 0.0027201951015740633, 0.018315711989998817, -0.010836824774742126, -0.004518677014857531, 0.025706108659505844, -0.017066065222024918, 0.025070512667298317, -0.01573801599442959, 0.06887837499380112, 0.00884974468499422, -0.014031532220542431, 0.023550286889076233, -0.07111424207687378, -0.012629440985620022, -0.015031697228550911, 0.03809951990842819, -0.0063191610388457775, 0.021406130865216255, -0.05392494052648544, -0.0211331769824028, -0.010018816217780113, -0.014587643556296825, -0.006244943477213383, -0.02024480141699314, 0.01985996775329113, 0.04816840961575508, 0.030305374413728714, 0.013546363450586796, -0.018645474687218666, -0.028837071731686592, 0.06384854763746262, -0.0394633449614048, -0.0492824986577034, -0.00683338288217783, -0.0297259371727705, 0.03476367145776749, 0.021793995052576065, 0.03147256374359131, -0.05121699720621109, 0.04327496886253357, 0.02370796911418438, 0.024494344368577003, 0.027006471529603004, -0.01677430234849453, 0.016106560826301575, -0.011203732341527939, -0.0008619485888630152, -0.06966535747051239, 0.026601538062095642, 0.027053892612457275, -0.0648120790719986, -0.0068093761801719666, 0.021684911102056503, -0.03641179949045181, 0.026912659406661987, -0.0632796660065651, -0.01318380143493414, 0.07031131535768509, 0.002214939333498478, -0.0019687775056809187, 0.03312533721327782, -0.07157096266746521, 0.024774862453341484, 0.07739228755235672, -0.04876134172081947, -0.0021105301566421986, -0.0060556139796972275, 0.07774164527654648, -0.00811718963086605, 0.05144944787025452, -0.02470933459699154, -0.014194038696587086, 0.05263197794556618, 0.03315224498510361, 0.007708341348916292, 0.0669875293970108, -0.025813831016421318, 0.020349865779280663, 0.028367822989821434, -0.020934073254466057, -0.01368714775890112, 0.05433684587478638, -0.019492056220769882, -0.04242884740233421, 0.032030943781137466, 0.0010945550166070461, -0.022876514121890068, -0.05540934577584267, 0.07287505269050598, 0.013918545097112656, -0.05274684354662895, -0.04877539724111557, 0.03657565265893936, -0.05470723658800125, -0.00599394366145134, -0.017268506810069084, -0.011243839748203754, -0.018879344686865807, 0.059783127158880234, 0.0011380222858861089, 0.03277264162898064, 0.07001189142465591, -0.011387761682271957, 0.003376427572220564, -0.008785397745668888, 0.06399508565664291, 0.09648434072732925, 0.04718156158924103, 0.01858358271420002, 0.05519990250468254, 0.01752442866563797, -0.05754612758755684, 0.017598066478967667, -0.015327777713537216, -0.008228195831179619, -0.017269562929868698, -0.01776772364974022, 0.05575159192085266, -0.023063933476805687, 0.048015281558036804, -0.022905638441443443, -0.006264498922973871, -0.023610461503267288, 0.00471907015889883, 0.013462360017001629, 0.05707044154405594, -0.010143532417714596, 0.020138239488005638, -0.012726405635476112, -0.005978550296276808, 0.030111145228147507, -0.04090850055217743, -0.011794126592576504, 0.03610473498702049, -0.02862120047211647, 0.01792670600116253, 0.03280024603009224, 0.030109023675322533, 0.07661967724561691, -0.04452192410826683, -0.006251243408769369, -0.0158559437841177, 0.053135551512241364, 0.031160932034254074, 0.011016537435352802, 0.005996123421937227, -0.009734896942973137, 0.003911223262548447, -0.028932487592101097, 0.008137713186442852, -0.02725185640156269, -0.02078157104551792, 0.07527610659599304, -0.011629617772996426, 0.016767717897892, 0.013948243111371994, -0.036747951060533524, -0.021435024216771126, -0.03656208515167236, -0.06102599948644638, -0.05166292563080788, -0.043212465941905975, -0.03525375947356224, 0.0044966270215809345, 0.006001136265695095, -0.04911264777183533, -0.03588031977415085, -0.01119871623814106, 0.005716527346521616, 0.015716342255473137, -0.049476660788059235, -0.016500776633620262, 0.012017748318612576, 0.013591877184808254, -0.012555263005197048, 0.011429470963776112, 0.07264772057533264, 0.008868924342095852, -0.02960357442498207, -0.04274030402302742, 0.03712522238492966, 0.05239798128604889, 0.013202458620071411, 0.006673889234662056, -0.06680162250995636, 0.017262276262044907, -0.015180093236267567, 0.00012489192886278033, -0.07318487018346786, 0.025871995836496353, 0.03002137690782547, 0.020819123834371567, 0.056442465633153915, 0.019367052242159843, -0.005240669474005699, -0.02415665052831173, -0.004576849285513163, -0.0065827867947518826, -0.002627127803862095, 0.047997426241636276, -0.0040970160625875, 0.09630642086267471, 0.031328558921813965, 0.008061118423938751, -0.03564337641000748, -0.008954589255154133, -0.012256124056875706, -0.005485062953084707, -0.06320887804031372, -0.014026416465640068, -0.0330963097512722, -0.08006171137094498, -0.017942963168025017, 0.003599720075726509, -0.01622926816344261, -0.05378666892647743, -0.007371082901954651, -0.013842517510056496, -0.020283116027712822, 0.04194215312600136, -0.04689827933907509, 0.012083637528121471, -0.0014303509378805757, -0.0214956384152174, -0.027911262586712837, 0.027579719200730324, 0.004874548874795437, 0.011178623884916306, 0.03321591019630432, -0.03770919889211655, -0.012067911215126514, -0.003942186012864113, 0.01820935495197773, 0.04402628540992737, -0.004069854039698839, -0.005649610422551632 ]
[ -0.07928665727376938, -0.007700697518885136, -0.024812065064907074, -0.008709079585969448, 0.08472252637147903, -0.08346520364284515, 0.006688178051263094, -0.0064787487499415874, 0.00002304882582393475, -0.012952202931046486, 0.0048578898422420025, -0.04291596636176109, 0.010510492138564587, -0.048056814819574356, 0.08670050650835037, 0.007550826761871576, -0.009312046691775322, -0.05820537358522415, -0.026739634573459625, 0.038919612765312195, 0.009597701951861382, -0.027385078370571136, -0.02459656447172165, -0.01807621866464615, -0.022720012813806534, 0.05179793760180473, 0.004821199923753738, -0.06746433675289154, -0.0031633717007935047, -0.1799188107252121, -0.00572593417018652, -0.011723925359547138, 0.04160497710108757, -0.00463710306212306, 0.05576696991920471, 0.07170815020799637, -0.004498458933085203, 0.023681042715907097, -0.018935246393084526, 0.04747634008526802, 0.0642731711268425, 0.011547964997589588, -0.0683521255850792, -0.011213553138077259, 0.05587289482355118, -0.02711148001253605, -0.020199935883283615, -0.029218869283795357, 0.015005850233137608, 0.02644803375005722, -0.008513736538589, 0.02427528239786625, 0.021542087197303772, 0.009429795667529106, -0.013638747856020927, 0.01705123670399189, 0.06177445128560066, 0.06035162881016731, 0.010419792495667934, 0.030668877065181732, 0.023880720138549805, -0.007375986315310001, -0.1288176029920578, 0.08250971883535385, 0.020766057074069977, 0.045121949166059494, -0.020599815994501114, 0.0005649987142533064, 0.0022320884745568037, 0.04446016997098923, -0.0005595953552983701, -0.035871002823114395, -0.042340267449617386, 0.03301849216222763, -0.001200730912387371, -0.06146723031997681, 0.024234594777226448, 0.053080346435308456, 0.037408992648124695, -0.050564222037792206, -0.08719679713249207, 0.04417940974235535, -0.019698981195688248, 0.007053102366626263, -0.020068839192390442, 0.01692068949341774, -0.015407632105052471, 0.08829856663942337, 0.04931630194187164, 0.025333382189273834, 0.0006305049173533916, -0.04371875524520874, 0.08994698524475098, 0.0006111503462307155, -0.0944666713476181, -0.009691527113318443, 0.01106786448508501, 0.0065406919457018375, -0.023698359727859497, 0.39879336953163147, -0.0185660719871521, -0.012156089767813683, 0.032016560435295105, 0.03932565823197365, 0.05087912082672119, -0.012659084983170033, 0.029099678620696068, -0.02555600181221962, -0.004033304285258055, -0.032019052654504776, 0.02562459371984005, -0.012427221983671188, 0.06074368581175804, -0.0896342322230339, 0.011701495386660099, -0.048471998423337936, -0.0036894704680889845, 0.025652004405856133, -0.03463338688015938, 0.036700453609228134, -0.022055326029658318, -0.0019986785482615232, 0.050896141678094864, -0.011206262744963169, -0.010982517153024673, 0.03188693895936012, 0.016096921637654305, 0.01978565752506256, 0.034886978566646576, 0.04510840028524399, 0.027319716289639473, 0.012934146448969841, -0.07038946449756622, -0.015233149752020836, -0.003502977080643177, 0.030983520671725273, 0.029978418722748756, -0.04193255677819252, -0.019351201131939888, -0.008684768341481686, -0.005853879265487194, -0.009195992723107338, 0.03735098987817764, -0.017505602911114693, -0.05060506612062454, 0.09350947290658951, -0.0194927379488945, 0.03678927943110466, -0.05358517915010452, -0.08360645174980164, -0.0039056623354554176, 0.019138824194669724, 0.00978368055075407, -0.019257862120866776, 0.0059381634928286076, 0.020255137234926224, 0.07738266885280609, 0.005216722376644611, -0.02918282337486744, 0.007600953336805105, 0.005817503202706575, -0.07892008125782013, -0.004774461500346661, 0.014044729992747307, 0.060169219970703125, -0.11276106536388397, -0.010037464089691639, 0.032727669924497604, -0.015973558649420738, -0.03945108503103256, -0.009440643712878227, 0.04356315732002258, 0.002456323942169547, -0.034045323729515076, 0.05520275607705116, -0.014969727955758572, 0.03913368657231331, 0.0015023924643173814, 0.07746558636426926, 0.02759845182299614, -0.05506192147731781, -0.0002997838018927723, -0.01987348683178425, 0.031105775386095047, -0.0004420133773237467, -0.06082195043563843, -0.06416071951389313, -0.022133255377411842, -0.039182908833026886, -0.0018537864089012146, -0.02259739115834236, -0.049364663660526276, -0.09065288305282593, 0.06453772634267807, -0.023522885516285896, 0.0016688206233084202, 0.006726440042257309, 0.01044832356274128, 0.009614676237106323, -0.004646813962608576, -0.00652261171489954, 0.020025044679641724, -0.025810537859797478, 0.007838672026991844, -0.0647084042429924, 0.012271123938262463, 0.044802673161029816, -0.02382560819387436, 0.05502866208553314, 0.006703627295792103, -0.06669273227453232, 0.0243338905274868, 0.03635462746024132, 0.00031604181276634336, -0.0071407887153327465, -0.057227782905101776, -0.009861820377409458, -0.0024674050509929657, 0.02037990652024746, 0.04323829710483551, -0.036514926701784134, -0.024223754182457924, -0.04827478528022766, -0.3513457179069519, -0.022221453487873077, -0.02395101822912693, 0.0022484215442091227, 0.010130585171282291, -0.08977977931499481, 0.021807795390486717, -0.029957495629787445, -0.0036604679189622402, 0.05000806972384453, 0.13549688458442688, 0.0007144874543882906, 0.003297114046290517, -0.08780163526535034, 0.007212153635919094, 0.03106648474931717, -0.012156452983617783, -0.046836137771606445, -0.018932834267616272, 0.0027569772209972143, 0.032999616116285324, -0.06111437454819679, -0.02042846754193306, -0.03590145707130432, -0.01887495256960392, -0.012224315665662289, 0.06946977227926254, 0.056376807391643524, 0.011418605223298073, -0.060562849044799805, 0.042098622769117355, 0.010879985056817532, 0.015253612771630287, -0.13799627125263214, 0.022100504487752914, -0.023576507344841957, -0.03521733358502388, 0.031466834247112274, 0.04107794538140297, -0.0265947338193655, -0.05092795565724373, 0.030270900577306747, -0.052079904824495316, -0.026856865733861923, 0.004112402908504009, -0.03213407099246979, -0.004202496260404587, -0.059281107038259506, -0.01512924861162901, 0.06423540413379669, -0.012648156844079494, 0.03530913591384888, 0.028325863182544708, 0.012454038485884666, 0.008814593777060509, -0.00904307421296835, -0.04568132013082504, -0.033229123800992966, 0.01907539740204811, -0.06458443403244019, 0.013132828287780285, 0.014087221585214138, 0.032323554158210754, -0.09406579285860062, -0.010329759679734707, 0.0009759334498085082, -0.04146416857838631, 0.026600254699587822, 0.04050984978675842, -0.01597536727786064, -0.02021298184990883, 0.07998016476631165, -0.0040674046613276005, 0.017073053866624832, 0.036188822239637375, 0.03526105731725693, -0.004183303564786911, -0.00855109840631485, 0.012025484815239906, -0.03040436841547489, 0.01753489300608635, 0.013195919804275036, 0.03097868710756302, -0.05170723795890808, -0.0263679102063179, 0.08436552435159683, -0.008234484121203423, -0.05185975879430771, 0.05162019655108452, 0.021054290235042572, 0.02770070917904377, 0.015187818557024002, 0.010481521487236023, -0.046837031841278076, 0.07166025787591934, 0.0378291942179203, -0.2059384137392044, 0.045855410397052765, 0.08218710124492645, 0.041376542299985886, 0.004865228198468685, 0.0046732304617762566, 0.0480019636452198, -0.10022487491369247, -0.025662772357463837, 0.0381656214594841, 0.04676956310868263, 0.06547830998897552, -0.004053651820868254, -0.05276036262512207, 0.00486738933250308, 0.016171587631106377, 0.057101570069789886, 0.0030909378547221422, -0.03404567763209343, -0.006694830488413572, 0.0029476038180291653, -0.06433683633804321, 0.1648799329996109, 0.031657684594392776, -0.011576313525438309, -0.004048563539981842, 0.002026693196967244, 0.0017794982995837927, 0.06665589660406113, 0.014887958765029907, 0.036709025502204895, -0.020936569198966026, 0.033036280423402786, 0.020989201962947845, 0.0413067601621151, 0.011622576043009758, -0.009282620623707771, 0.04785040020942688, -0.004063052590936422, -0.010137729346752167, -0.02585269697010517, 0.044168926775455475, -0.04808751866221428, 0.0017215944826602936, 0.059771131724119186, -0.03748002275824547, -0.009039252996444702, -0.02107219025492668, -0.019280318170785904, 0.010849864222109318, -0.04950714856386185, -0.06856370717287064, -0.03429360315203667, -0.018147466704249382, 0.02770731784403324, 0.06853984296321869, 0.0029299326706677675, -0.01645037718117237, 0.03262645751237869, 0.03770746663212776, 0.01508848462253809, -0.048961181193590164, 0.10113580524921417, -0.004430144559592009, 0.02960902266204357 ]
[ -0.004410579800605774, 0.039697155356407166, -0.04918438941240311, 0.030195176601409912, 0.02339816652238369, -0.022902071475982666, -0.003407514188438654, 0.006984027102589607, 0.0019515764433890581, 0.028507474809885025, 0.011023495346307755, -0.02278326079249382, 0.0475822314620018, -0.012012869119644165, 0.028494086116552353, 0.02442021109163761, -0.013224661350250244, -0.004774384666234255, 0.0260561965405941, -0.010256325826048851, -0.028429392725229263, 0.06972724944353104, 0.0068465000949800014, -0.009793942794203758, 0.0016173252370208502, -0.016420111060142517, -0.062366414815187454, 0.022502636536955833, 0.02849016897380352, -0.07929383218288422, -0.022463485598564148, -0.031114328652620316, -0.010585439391434193, 0.0027210614643990993, 0.028724517673254013, 0.03450484946370125, 0.001218631281517446, -0.007189138326793909, 0.010552282445132732, 0.04517460614442825, 0.032841429114341736, 0.011145931668579578, -0.017856262624263763, -0.018208501860499382, -0.008737126365303993, -0.03171105310320854, -0.019558534026145935, -0.024695172905921936, 0.007385049946606159, 0.015089424327015877, -0.04092571884393692, -0.05246508866548538, -0.02042766846716404, -0.00386769138276577, 0.011459785513579845, -0.0384078323841095, -0.00296571827493608, -0.012752323411405087, 0.04382386803627014, -0.03371506556868553, 0.034606415778398514, -0.03524985909461975, -0.07953177392482758, -0.03527938947081566, -0.0006005120812915266, -0.02352087013423443, -0.027287349104881287, -0.006351969204843044, 0.004309379495680332, -0.012563989497721195, 0.008560470305383205, 0.005334923043847084, -0.07262517511844635, -0.03653712570667267, -0.03077990747988224, -0.005012570880353451, 0.009740912355482578, 0.019127845764160156, -0.034882210195064545, -0.011277392506599426, -0.029250524938106537, 0.0036944737657904625, 0.002449674066156149, 0.029444683343172073, -0.02807364985346794, 0.06002921238541603, 0.007699060719460249, 0.049732137471437454, 0.0010194310452789068, 0.014663110487163067, 0.02157154306769371, -0.013395103625953197, 0.026294443756341934, 0.034528277814388275, -0.07495392858982086, -0.0006711187888868153, 0.005876981653273106, -0.05468915030360222, -0.02372383140027523, 0.8129931688308716, -0.00809428095817566, -0.006169451866298914, 0.027775967493653297, -0.02560253068804741, 0.0014315723674371839, 0.022245753556489944, 0.010348215699195862, 0.0021560972090810537, -0.0014050573809072375, -0.019357876852154732, 0.024917392060160637, -0.006230621598660946, 0.004540000576525927, 0.009941053576767445, 0.026463184505701065, 0.047477103769779205, 0.0016526919789612293, 0.020770804956555367, -0.007073108106851578, 0.014203672297298908, 0.061327915638685226, 0.004319639410823584, -0.036267854273319244, 0.0005232085823081434, -0.010438380762934685, -0.16607247292995453, 0.012357999570667744, -6.439311034030458e-33, 0.0643027201294899, -0.008862514048814774, 0.02176612988114357, -0.008114509284496307, 0.012483196333050728, -0.010706845670938492, -0.03157677873969078, -0.01467127911746502, -0.011411194689571857, -0.0021901451982557774, 0.017779160290956497, 0.0038349402602761984, -0.01946883834898472, -0.008223769254982471, -0.0021263619419187307, -0.028614988550543785, 0.02084541693329811, 0.048196062445640564, -0.0029066428542137146, 0.03883998468518257, 0.014841721393167973, 0.0318925678730011, 0.015158919617533684, 0.02404063567519188, 0.019492989405989647, 0.00974294077605009, 0.014807557687163353, -0.005065688863396645, 0.0060380189679563046, -0.054556794464588165, -0.01936773955821991, 0.033250268548727036, -0.0017087418818846345, -0.019611595198512077, -0.0064073726534843445, -0.08225148916244507, -0.0025703434366732836, -0.006427114829421043, -0.013095183297991753, -0.07341974228620529, 0.006838059518486261, 0.027568677440285683, -0.030900252982974052, -0.023525824770331383, 0.014934537000954151, -0.03405797481536865, 0.023947425186634064, -0.018852991983294487, 0.012731445021927357, 0.02743702195584774, 0.012046780437231064, 0.0295130405575037, -0.00967961922287941, 0.03536548465490341, -0.01685330644249916, 0.0110362209379673, 0.015906142070889473, 0.018000034615397453, -0.007745745591819286, -0.007438666187226772, 0.012345526367425919, 0.015307524241507053, 0.03041759878396988, 0.03253024443984032, -0.0032109396997839212, 0.011368927545845509, -0.0471104271709919, 0.032760776579380035, 0.014190047048032284, 0.0575861893594265, -0.04338744655251503, 0.04722007364034653, -0.018285976722836494, -0.050090301781892776, 0.02313643880188465, -0.023570097982883453, 0.0012099025771021843, 0.014305335469543934, 0.004596914630383253, 0.05021284893155098, 0.008678281679749489, -0.009941885247826576, -0.03734175115823746, -0.0027276736218482256, -0.0385880172252655, 0.05090218037366867, 0.01922377571463585, 0.019993098452687263, -0.01636168733239174, 0.007283471524715424, 0.02776322513818741, 0.045511770993471146, -0.009715242311358452, -0.009288329631090164, -0.07009393721818924, 6.620336429373121e-33, -0.02359183505177498, -0.03732876107096672, 0.029222045093774796, -0.004326424095779657, 0.008869205601513386, -0.012817458249628544, -0.03175821155309677, -0.025549553334712982, -0.012849506922066212, 0.026085179299116135, -0.008710323832929134, 0.04317710921168327, -0.05414517596364021, 0.008485744707286358, 0.09031681716442108, -0.01551410835236311, 0.014796956442296505, 0.011060338467359543, 0.01607537269592285, -0.001585808815434575, 0.0171972643584013, 0.01603504829108715, 0.004380843136459589, 0.010227842256426811, 0.03980167210102081, 0.01918059028685093, -0.03205482289195061, 0.0021809302270412445, 0.01980001851916313, -0.009706346318125725, 0.009769491851329803, -0.022597771137952805, -0.013096524402499199, -0.02368338033556938, -0.024010038003325462, 0.022487863898277283, -0.017918210476636887, 0.034878090023994446, 0.02304920367896557, 0.02650401182472706, 0.014911100268363953, 0.0033364580012857914, -0.022325268015265465, 0.01610700599849224, 0.01159780751913786, 0.0005014293128624558, -0.01112077385187149, -0.002793957944959402, -0.013364889658987522, 0.019291820004582405, 0.02387489378452301, 0.0337318517267704, 0.041008248925209045, 0.0018293560715392232, 0.0267295204102993, -0.04308396577835083, -0.0102327736094594, 0.04843022674322128, -0.026454996317625046, -0.03701076656579971, -0.025453850626945496, 0.014051835052669048, -0.025357337668538094, 0.010214381851255894, -0.044231951236724854, -0.013078813441097736, -0.049392107874155045, -0.02482733316719532, -0.010635089129209518, 0.041894085705280304, 0.038716334849596024, 0.0035777189768850803, -0.02979421615600586, -0.011763056740164757, 0.016808925196528435, -0.0164315365254879, -0.006954198703169823, -0.02098712883889675, -0.026346562430262566, 0.05102335289120674, 0.005065717734396458, 0.02691112831234932, 0.005903637036681175, 0.01587459072470665, 0.014611556194722652, 0.020788757130503654, -0.05079197511076927, -0.020351959392428398, 0.07947837561368942, 0.0073547069914639, -0.010059733875095844, -0.06476782262325287, 0.02395092323422432, 0.02791632153093815, -0.02975519560277462, -1.2313938313468498e-8, -0.022324608638882637, -0.005581309553235769, -0.043282199651002884, 0.034108005464076996, -0.006841702852398157, -0.013376914896070957, -0.008914143778383732, -0.007633594796061516, -0.015118202194571495, 0.006370594725012779, 0.0575193390250206, -0.00779242068529129, 0.031055724248290062, 0.014206381514668465, 0.019232789054512978, -0.02624426782131195, 0.05440519377589226, -0.03346392884850502, 0.04910142347216606, -0.03908737376332283, 0.012208733707666397, 0.00728479353711009, 0.01008407399058342, 0.006440236698836088, -0.0407339446246624, -0.02210717648267746, 0.015494127757847309, -0.07086378335952759, -0.052060239017009735, 0.0053330715745687485, 0.04092054441571236, -0.030203748494386673, -0.05132197216153145, -0.005837410222738981, 0.004060772713273764, -0.009747330099344254, 0.02116331458091736, -0.0007104263640940189, 0.03737380728125572, 0.0193233173340559, 0.00464599160477519, -0.021064486354589462, -0.002649495145305991, -0.02641707845032215, -0.07630320638418198, -0.014361931011080742, 0.004591299220919609, -0.0024364041164517403, 0.02987121418118477, -0.06236371025443077, 0.03894731029868126, -0.015120583586394787, -0.019465835765004158, 0.020982416346669197, 0.014000147581100464, 0.03231767192482948, 0.03499623388051987, -0.01950286515057087, -0.04775460064411163, 0.003885240526869893, 0.02368738315999508, -0.0022682936396449804, -0.024615822359919548, -0.0281959380954504 ]
github-list-pull-requests-csv
https://markhneedham.com/blog/2023/06/12/github-list-pull-requests-csv
false
2023-06-13 02:44:37
DuckDB/SQL: Transpose columns to rows with UNPIVOT
[ "duckdb", "til" ]
[ "TIL" ]
:icons: font I've been playing around with the https://www.kaggle.com/datasets/hugomathien/soccer[Kaggle European Soccer dataset^], which contains, amongst other things, players and their stats in the FIFA video game. I wanted to compare the stats of Ronaldo and Messi, which is where this story begins. [NOTE] ==== I've created a video showing how to do this on https://www.youtube.com/@learndatawithmark[my YouTube channel, Learn Data with Mark^], so if you prefer to consume content through that medium, I've embedded it below: ++++ <iframe width="560" height="315" src="https://www.youtube.com/embed/zhVSXLzy8EY" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen></iframe> ++++ ==== We will of course be using DuckDB and since the dataset is a SQLite database, we'll need to install the SQLite extension" [source, sql] ---- INSTALL sqlite; LOAD sqlite; ---- Next, let's create tables for `Player` and `Player_Attribute`: [source, sql] ---- CREATE OR REPLACE TABLE Player ( id BIGINT, player_api_id BIGINT, player_name VARCHAR, player_fifa_api_id BIGINT, birthday VARCHAR, height float, weight BIGINT ); INSERT INTO Player FROM sqlite_scan('database.sqlite', 'Player'); CREATE OR REPLACE TABLE Player_Attributes AS FROM sqlite_scan('database.sqlite', 'Player_Attributes'); ---- I want to join these two tables together and get the latest stat for each player, which we can do by creating the following view that uses a window function: [source, sql] ---- CREATE OR REPLACE VIEW PlayerStats AS FROM Player JOIN ( select *, ROW_NUMBER() OVER (partition by player_api_id ORDER BY date DESC) rn FROM Player_Attributes ) AS attrs ON attrs.player_api_id = Player.player_api_id AND rn = 1 SELECT * EXCLUDE(rn, id, player_api_id, player_fifa_api_id); ---- If we want to find the stats for one player, we can write a query like this: [source, sql] ---- FROM PlayerStats WHERE player_name = 'Cristiano Ronaldo'; ---- .Output [options="header"] |=== |Player Name |Birthday |Height |Weight |... |GK Handling |GK Kicking |GK Positioning |GK Reflexes |Cristiano Ronaldo |1985-02-05 00:00:00 |185.42 |176 |... |11 |15 |14 |11 |=== We can see from the `...` that some of the columns have been truncated. This table has only 9 columns, but there are more than 30 different stats for each player. We'd need a very wide monitor to be able to see all of those in one go. Alternatively, we could display the stats vertically, which is where the `UNPIVOT` function comes in. We can write the following query to see Ronaldo's stats as rows instead of columns: [source, sql] ---- UNPIVOT (FROM PlayerStats WHERE player_name = 'Cristiano Ronaldo') ON COLUMNS (*) INTO NAME stat1 VALUE "Cristiano Ronaldo"; ---- .Output [options="header"] |========================================== | stat1 | Cristiano Ronaldo | player_name | Cristiano Ronaldo | birthday | 1985-02-05 00:00:00 | height | 185.42 | weight | 176 | date | 2015-10-16 00:00:00 | overall_rating | 93 | potential | 93 | preferred_foot | right | attacking_work_rate | high | defensive_work_rate | low | crossing | 82 | finishing | 95 | heading_accuracy | 86 | short_passing | 81 | volleys | 87 | dribbling | 93 | curve | 88 | free_kick_accuracy | 77 | long_passing | 72 | ball_control | 91 | acceleration | 91 | sprint_speed | 93 | agility | 90 | reactions | 92 | balance | 62 | shot_power | 94 | jumping | 94 | stamina | 90 | strength | 79 | long_shots | 93 | aggression | 62 | interceptions | 29 | positioning | 93 | vision | 81 | penalties | 85 | marking | 22 | standing_tackle | 31 | sliding_tackle | 23 | gk_diving | 7 | gk_handling | 11 | gk_kicking | 15 | gk_positioning | 14 | gk_reflexes | 11 |========================================== That's much easier to read. And if we want to compare Ronaldo's stats against another play, say, Lionel Messi, we can JOIN `UNPIVOT` clauses together: [source, sql] ---- FROM ( UNPIVOT (FROM PlayerStats WHERE player_name = 'Cristiano Ronaldo') ON COLUMNS (*) INTO NAME stat1 VALUE "Cristiano Ronaldo" ) p1 JOIN ( UNPIVOT (FROM PlayerStats WHERE player_name = 'Lionel Messi') ON COLUMNS (*) INTO NAME stat2 VALUE "Lionel Messi" ) p2 ON p1.stat1 = p2.stat2 SELECT stat1 AS stat, * EXCLUDE(stat1, stat2); ---- .Output [options="header"] |================================================================ | stat | Cristiano Ronaldo | Lionel Messi | player_name | Cristiano Ronaldo | Lionel Messi | birthday | 1985-02-05 00:00:00 | 1987-06-24 00:00:00 | height | 185.42 | 170.18 | weight | 176 | 159 | date | 2015-10-16 00:00:00 | 2015-12-17 00:00:00 | overall_rating | 93 | 94 | potential | 93 | 94 | preferred_foot | right | left | attacking_work_rate | high | medium | defensive_work_rate | low | low | crossing | 82 | 80 | finishing | 95 | 93 | heading_accuracy | 86 | 71 | short_passing | 81 | 88 | volleys | 87 | 85 | dribbling | 93 | 96 | curve | 88 | 89 | free_kick_accuracy | 77 | 90 | ball_control | 91 | 96 | acceleration | 91 | 95 | sprint_speed | 93 | 90 | agility | 90 | 92 | reactions | 92 | 92 | balance | 62 | 95 | shot_power | 94 | 80 | jumping | 94 | 68 | stamina | 90 | 75 | strength | 79 | 59 | long_shots | 93 | 88 | aggression | 62 | 48 | interceptions | 29 | 22 | positioning | 93 | 90 | vision | 81 | 90 | penalties | 85 | 74 | marking | 22 | 13 | standing_tackle | 31 | 23 | sliding_tackle | 23 | 21 | gk_diving | 7 | 6 | gk_handling | 11 | 11 | gk_kicking | 15 | 15 | gk_positioning | 14 | 14 | gk_reflexes | 11 | 8 | long_passing | 72 | 79 |================================================================
In this post we'll learn how to transpose columns to rows using DuckDB's UNPIVOT function.
uploads/2023/06/duckdb-transpose-banner.png
[ -0.004661703482270241, 0.026497574523091316, 0.016051195561885834, 0.04526742175221443, 0.0807686448097229, 0.010874567553400993, 0.020763838663697243, 0.0267685204744339, -0.0008691777475178242, -0.026874585077166557, 0.008327371440827847, -0.01095263846218586, -0.0702400654554367, -0.003463524393737316, -0.007128388155251741, 0.07933353632688522, 0.06176921725273132, 0.04767313227057457, 0.02783927135169506, -0.013612540438771248, 0.021510867401957512, 0.07173025608062744, 0.01879119873046875, 0.05757323279976845, 0.02445392496883869, 0.03653280809521675, 0.03741217404603958, 0.000439080671640113, -0.046354133635759354, -0.004765353165566921, 0.04091709479689598, -0.019986378028988838, 0.0050636339001357555, -0.03769782930612564, 0.013345289044082165, -0.019127709791064262, -0.004618165083229542, 0.0316137969493866, 0.010657299309968948, 0.0014497586525976658, -0.06081325188279152, 0.008507183752954006, -0.012837151065468788, 0.028311830013990402, -0.02622872032225132, 0.010853377170860767, -0.035184673964977264, 0.023681025952100754, 0.007629250641912222, 0.0023327376693487167, -0.05537242069840431, 0.05506294220685959, -0.0236816443502903, 0.010015308856964111, -0.0014286731602624059, 0.04086160287261009, 0.015258025377988815, -0.057408928871154785, -0.003308089915663004, -0.06504298001527786, 0.01776926778256893, 0.01694578118622303, 0.0158276055008173, -0.012549975886940956, 0.0034982527140527964, -0.004423053469508886, -0.0046722074039280415, 0.04822196066379547, -0.04355645924806595, 0.0016901831841096282, -0.01955808326601982, -0.03411644324660301, -0.04216465726494789, -0.02134929783642292, 0.03128606081008911, -0.04514925926923752, -0.023188797757029533, 0.05564992502331734, 0.04606279358267784, 0.04178806394338608, 0.0026652950327843428, -0.024955276399850845, 0.03872768208384514, 0.03805099427700043, -0.02174135483801365, -0.04995302855968475, -0.019838333129882812, -0.043540552258491516, -0.04558371379971504, 0.036604754626750946, -0.008777408860623837, -0.05017995089292526, 0.03373546898365021, 0.030802860856056213, -0.018794884905219078, 0.0036688675172626972, 0.018742766231298447, -0.01284860447049141, -0.0049836779944598675, -0.019523335620760918, -0.01941607892513275, -0.04777854308485985, 0.031245127320289612, 0.025666290894150734, -0.0987912192940712, 0.013946248218417168, -0.04740449786186218, 0.020094027742743492, 0.005919579416513443, 0.007784462533891201, -0.005573948845267296, -0.011841823346912861, -0.01156941894441843, -0.01726001687347889, -0.060268595814704895, 0.06458590924739838, 0.05387348309159279, 0.006158188916742802, -0.003713053883984685, 0.04918016120791435, 0.05336152762174606, 0.004638150800019503, -0.020324096083641052, 0.05707508325576782, 0.001847810228355229, 0.0357058122754097, 0.0175472479313612, 0.044951409101486206, 0.00691082002595067, -0.061756398528814316, 0.0029346011579036713, 0.04496366158127785, -0.016468076035380363, 0.016854161396622658, 0.015260186046361923, -0.04387649893760681, 0.0035101957619190216, -0.021746452897787094, 0.058142054826021194, 0.006772502325475216, 0.0018560524331405759, -0.026655040681362152, -0.012517397291958332, 0.028869524598121643, 0.03838801756501198, -0.006385880056768656, -0.0006064583430998027, -0.03609367460012436, 0.0079694464802742, 0.03690793737769127, 0.012869596481323242, -0.011891529895365238, 0.07638601958751678, -0.024858703836798668, -0.011808729730546474, 0.09813117235898972, 0.03195253759622574, -0.037786487489938736, 0.0007883828366175294, 0.0251273475587368, 0.04530461132526398, 0.019384581595659256, 0.004175614565610886, -0.004306817892938852, 0.010797755792737007, -0.012338995933532715, -0.0008390223374590278, 0.03997984528541565, -0.032140836119651794, 0.009524263441562653, -0.05324434116482735, -0.048094604164361954, 0.06827797740697861, -0.02163536660373211, -0.027051439508795738, 0.05829821154475212, 0.07057464867830276, 0.02987735904753208, 0.02904142439365387, 0.02074570395052433, -0.08505236357450485, 0.007930186577141285, 0.014458181336522102, 0.014026451855897903, 0.03668762743473053, 0.0010436681332066655, 0.09961787611246109, 0.0260081235319376, 0.004522251430898905, 0.06184936314821243, -0.0627036914229393, -0.05865570530295372, -0.03369595482945442, -0.0008434760384261608, 0.05546440929174423, -0.05317750573158264, 0.013035038486123085, 0.048510558903217316, 0.015685737133026123, 0.022475820034742355, -0.009177818894386292, 0.0048438915982842445, 0.019569741562008858, -0.025347335264086723, -0.05247948691248894, 0.022481299936771393, 0.03052614815533161, -0.009341489523649216, -0.030134426429867744, 0.020242268219590187, -0.0240315068513155, -0.011806332506239414, 0.023980362340807915, -0.01391556765884161, 0.029213767498731613, -0.01178591139614582, 0.02400786243379116, 0.0027960368897765875, 0.0362359844148159, -0.06062236800789833, 0.029336269944906235, 0.030877145007252693, -0.036610979586839676, -0.011653696186840534, 0.007048740051686764, 0.12695187330245972, 0.05136376991868019, -0.031301286071538925, -0.05933216214179993, 0.013612489216029644, 0.007193242199718952, -0.03882158547639847, 0.03633994981646538, 0.007417242508381605, -0.004982076119631529, -0.005506542511284351, -0.030034266412258148, -0.042306236922740936, -0.00465557212010026, -0.0518394410610199, -0.009514679200947285, 0.06981560587882996, -0.011359652504324913, 0.03064030595123768, 0.0024951875675469637, -0.03124113380908966, 0.002849126234650612, -0.01949191465973854, -0.055044595152139664, 0.002494813408702612, 0.042413100600242615, -0.013414795510470867, 0.015841396525502205, -0.005754478741437197, -0.0019722941797226667, -0.05123423412442207, -0.032206304371356964, 0.04552742838859558, 0.055280741304159164, 0.05127802863717079, -0.0011790281860157847, -0.01258917711675167, -0.017142506316304207, 0.007361275609582663, -0.04421761631965637, -0.04339858144521713, -0.025416506454348564, -0.03755328804254532, -0.004592917859554291, 0.01587080955505371, 0.018990533426404, 0.030761905014514923, 0.0090331444516778, 0.014696680009365082, 0.007236722856760025, 0.030060337856411934, 0.01756594330072403, -0.006098362151533365, -0.003441553795710206, -0.03572103753685951, -0.0012936005368828773, 0.06134984269738197, -0.02902783825993538, -0.051304638385772705, -0.006454275455325842, -0.07080763578414917, 0.007207893300801516, -0.06158890202641487, -0.0254089143127203, 0.00342348194681108, 0.015069764107465744, 0.021174317225813866, 0.024401789531111717, -0.007251582574099302, 0.06157941371202469, -0.012638998217880726, 0.0017868990544229746, 0.04109371826052666, -0.011411627754569054, 0.04260190948843956, -0.02590366080403328, 0.03838134929537773, 0.04285048320889473, -0.01963384822010994, 0.015432631596922874, -0.05994294583797455, 0.02043876051902771, -0.026467250660061836, -0.2805810570716858, 0.03443460911512375, -0.007318870164453983, -0.03146548941731453, 0.03471225127577782, -0.035099681466817856, 0.0052278907969594, -0.045030295848846436, -0.01886720210313797, 0.037017807364463806, -0.026979593560099602, -0.009995621629059315, -0.04409228265285492, 0.034286536276340485, 0.025382287800312042, 0.01718107983469963, 0.006794451270252466, -0.016644146293401718, -0.02240592986345291, 0.05597597360610962, 0.011493858881294727, -0.05721186846494675, -0.007267407141625881, 0.03159826621413231, 0.04423507675528526, 0.045249417424201965, -0.05216395854949951, 0.00037043780321255326, -0.04483675956726074, -0.027790766209363937, 0.02154139243066311, -0.0050646099261939526, 0.018898509442806244, -0.016676023602485657, -0.02453715167939663, -0.00995154120028019, 0.044619351625442505, 0.0199526809155941, 0.015416544862091541, -0.0168844535946846, -0.039282094687223434, -0.035498570650815964, -0.00013507279800251126, -0.005261530634015799, 0.10230889171361923, -0.008181088604032993, -0.09719493985176086, 0.01742316037416458, -0.0542609766125679, 0.06541278958320618, -0.016678325831890106, -0.0648726299405098, -0.009507283568382263, 0.04413760080933571, -0.005922203883528709, 0.01157174352556467, 0.03848715126514435, 0.005914837121963501, -0.03495737165212631, -0.042197518050670624, 0.008100475184619427, -0.031798105686903, -0.01603914424777031, -0.009762882255017757, -0.0005883049452677369, -0.0997946560382843, -0.011679594404995441, -0.012727445922791958, 0.04972274973988533, 0.06518011540174484, -0.04257526993751526, -0.008044572547078133, -0.025499455630779266, -0.09665584564208984, -0.01674020104110241, -0.01583266071975231, 0.0058437529951334, -0.011050567030906677, -0.03876900672912598, 0.05515411123633385, -0.010993518866598606, -0.02824893780052662, 0.03242340311408043, 0.011259269900619984, 0.013225768692791462, -0.009586398489773273, 0.03978608921170235, 0.014290809631347656, 0.0016650860197842121, 0.00526448292657733, 0.0698300153017044, -0.05128539726138115, -0.001754492986947298, 0.014548654668033123, -0.03277742862701416, 0.021242011338472366, 0.0036068325862288475, 0.0027756541967391968, 0.008313901722431183, 0.023126568645238876, 0.005051896441727877, -0.04818056523799896, -0.021957719698548317, -0.01641608588397503, 0.00007591285248054191, 0.0066905030980706215, -0.05858781933784485, 0.0028065675869584084, 0.01569741778075695, 0.024767305701971054, -0.00475902296602726, -0.03735540062189102, 0.0006335402722470462, -0.039654165506362915, -0.030442191287875175, -0.046103160828351974, 0.03386714309453964, 0.0074522956274449825, 0.00856415182352066, -0.020560353994369507, -0.06616905331611633, 0.015203340910375118, -0.0074008917436003685, -0.017212416976690292, -0.050192154943943024, -0.02775486186146736, -0.004380211699754, -0.03757893666625023, -0.015171162784099579, -0.013829313218593597, -0.019093260169029236, 0.014962943270802498, 0.042145077139139175, -0.02573518268764019, 0.04435430094599724, -0.02324788086116314, -0.055577509105205536, -0.036562830209732056, 0.003065431024879217, -0.023597564548254013, -0.011972548440098763, 0.009770059958100319, 0.01757356896996498, 0.019831279292702675, 0.06383727490901947, -0.00029220720170997083, 0.004968599881976843, -0.011147710494697094, -0.004593886900693178, 0.036364033818244934, 0.0105470335111022, -0.028761431574821472, 0.041000183671712875, -0.04321448877453804, -0.018463844433426857, -0.02003871276974678, 0.032418109476566315, -0.0041183289140462875, 0.0033820790704339743, -0.05336495116353035, 0.019129475578665733, -0.053213369101285934, -0.03182529658079147, -0.010446828790009022, 0.029556123539805412, 0.06022525206208229, 0.016210690140724182, -0.005586925428360701, 0.015691598877310753, 0.005618013441562653, 0.010068364441394806, -0.02393665909767151, -0.0638873279094696, -0.0052271028980612755, -0.0018792016198858619, -0.03440042585134506, -0.00737588619813323, 0.02853616140782833, 0.015457643195986748, 0.014203554019331932, -0.005413451697677374, -0.0018413212383165956, 0.021605530753731728, -0.00900315586477518, 0.04398949444293976, 0.05558938533067703, -0.04067441448569298, -0.02382318116724491, -0.0027030901983380318, -0.03488350659608841, -0.015267129056155682, 0.011759559623897076, -0.014308699406683445, -0.002749356208369136, -0.03542555496096611, -0.07230804860591888, 0.006356202065944672, 0.01348931435495615, -0.0034086336381733418, 0.014883667230606079, -0.008149960078299046, -0.02450009249150753, -0.025578774511814117, 0.05524769052863121, 0.07553296536207199, -0.0698574036359787, 0.0187293142080307, -0.003159372601658106, -0.010807068087160587, -0.0023481743410229683, 0.01540626585483551, -0.049523867666721344, -0.004289606586098671, -0.01760844886302948, 0.04014421999454498, -0.023921117186546326, 0.01690010167658329, -0.02801366150379181, 0.005661086644977331, 0.0033941236324608326, 0.011240515857934952, -0.02116704359650612, -0.005059471353888512, -0.017423776909708977, -0.009845077060163021, 0.005732041317969561, -0.009803520515561104, 0.011992564424872398, 0.037242501974105835, -0.026266004890203476, 0.028452686965465546, -0.03514944389462471, 0.020345445722341537, 0.03916294127702713, 0.0030121966265141964, -0.009873968549072742, -0.04748651012778282, 0.0009237421327270567, 0.058370769023895264, 0.035683948546648026, -0.016830142587423325, -0.018967991694808006, -0.0212518610060215, 0.011762530542910099, -0.00673922523856163, 0.01962205581367016, -0.026631277054548264, -0.020434165373444557, 0.04198339208960533, 0.03766714036464691, -0.006562483962625265, -0.009939208626747131, -0.009193654172122478, -0.03730485588312149, 0.06106569617986679, -0.04454207047820091, -0.03885181248188019, -0.014296586625277996, -0.03477006405591965, 0.03571105748414993, 0.005309944972395897, 0.013526814989745617, -0.04744148999452591, 0.0467197522521019, 0.02457021363079548, -0.0010721508879214525, 0.06473252177238464, 0.022950610145926476, 0.038917407393455505, -0.04313455894589424, -0.03416428342461586, -0.08878745883703232, -0.01224812027066946, 0.02118612267076969, -0.00811261497437954, -0.029301801696419716, 0.00027171109104529023, -0.04141498729586601, 0.029542433097958565, -0.0678086057305336, -0.03590632975101471, 0.02078992873430252, 0.0033228315878659487, 0.004700623918324709, 0.018915284425020218, -0.053068049252033234, 0.003916366491466761, 0.034891191869974136, -0.03130684792995453, -0.007457870990037918, -0.0426914319396019, 0.08329613506793976, -0.011520368047058582, 0.020329110324382782, -0.0031092562712728977, -0.03291034325957298, 0.07298556715250015, 0.027769723907113075, 0.03817209228873253, 0.040227703750133514, -0.013974813744425774, 0.05672750994563103, 0.019086282700300217, -0.0019370712107047439, 0.025454122573137283, 0.02720942720770836, 0.00011119443661300465, -0.06756535172462463, 0.013316215015947819, 0.013379241339862347, 0.005741115193814039, -0.08293827623128891, 0.06587927043437958, 0.009179387241601944, -0.03913908451795578, -0.03122721239924431, 0.00946581456810236, -0.022614721208810806, -0.024033429101109505, -0.010194198228418827, -0.012667892500758171, -0.06836511939764023, 0.06965861469507217, 0.0010913497535511851, 0.02023860067129135, 0.051189716905355453, 0.01265918742865324, -0.016752541065216064, -0.011590919457376003, 0.10193915665149689, 0.07003545761108398, 0.038629092276096344, 0.005439316388219595, 0.0874914824962616, -0.0056487275287508965, -0.05214274674654007, 0.017533980309963226, 0.0015846049645915627, -0.030413301661610603, -0.014814500696957111, 0.018798578530550003, 0.07302150875329971, -0.02732565440237522, 0.05675633251667023, -0.01373223215341568, -0.039905715733766556, 0.0061444793827831745, -0.012419622391462326, 0.024983195587992668, 0.03806439787149429, -0.010293757542967796, 0.03629356622695923, -0.008662665262818336, -0.01368639338761568, 0.02135676145553589, -0.0130181098356843, 0.0011758545879274607, 0.005742116831243038, -0.03683103993535042, 0.04300618916749954, 0.002876835875213146, 0.01610776036977768, 0.08427752554416656, -0.036959946155548096, -0.006980878300964832, -0.01986183598637581, 0.01994207873940468, 0.002067567314952612, 0.029109563678503036, -0.01694297417998314, 0.006679224316030741, -0.021440818905830383, -0.041471559554338455, -0.008192474022507668, -0.028819995000958443, -0.024407828226685524, 0.016102973371744156, -0.014596899971365929, 0.001636831439100206, 0.043551769107580185, -0.0005949164042249322, -0.057002536952495575, -0.05555877834558487, -0.05085468664765358, -0.04526706039905548, -0.08205822855234146, -0.005730898585170507, 0.021373305469751358, -0.0005970922065898776, -0.050589632242918015, -0.02037803828716278, -0.023968776687979698, 0.0011403870303183794, 0.00766323646530509, -0.038094017654657364, -0.04294393211603165, 0.025224050506949425, 0.03917532414197922, 0.03779067099094391, 0.018131760880351067, 0.06945206224918365, 0.0037624479737132788, -0.0073850639164447784, -0.04017344117164612, 0.012071684934198856, 0.05020548775792122, 0.010530038736760616, 0.012432808056473732, -0.08493542671203613, 0.0042585586197674274, 0.020605826750397682, -0.04741945117712021, -0.06571459025144577, 0.02903893031179905, 0.0402379035949707, -0.004565168637782335, 0.06031757593154907, -0.052610721439123154, -0.011632265523076057, -0.056580428034067154, -0.007896273396909237, -0.026080993935465813, 0.01154675055295229, 0.03204241767525673, -0.060763776302337646, 0.07816679030656815, 0.028321286663413048, -0.00812236312776804, -0.054046135395765305, -0.010024962946772575, -0.018592720851302147, 0.013604323379695415, -0.030552484095096588, -0.007691782899200916, -0.049358218908309937, -0.10383980721235275, -0.015729758888483047, 0.03615422919392586, -0.033260080963373184, -0.04563332349061966, -0.017668303102254868, 0.0397685244679451, -0.006146949715912342, 0.026642411947250366, -0.056200798600912094, 0.008305342867970467, -0.04575631022453308, 0.0006987183587625623, -0.020658474415540695, 0.035091206431388855, 0.006458374671638012, 0.009357141330838203, 0.023408763110637665, -0.05564258620142937, 0.010222182609140873, -0.028026621788740158, 0.005725016351789236, 0.025085074827075005, 0.015086528845131397, 0.029580634087324142 ]
[ -0.055035315454006195, -0.011647914536297321, -0.013171583414077759, -0.049024827778339386, 0.07666876167058945, -0.008608989417552948, 0.02267582342028618, 0.0036074065137654543, 0.05557011440396309, 0.004812036175280809, -0.008345545269548893, -0.0744217187166214, -0.020351728424429893, -0.013123370707035065, 0.05392124131321907, -0.02143845520913601, -0.01440275739878416, -0.077072873711586, -0.05055584758520126, 0.03451833873987198, -0.02530388906598091, -0.0026974438223987818, -0.02288568764925003, -0.03747250512242317, -0.0015894471434876323, 0.012496941722929478, 0.034887708723545074, -0.04318544268608093, -0.019552653655409813, -0.21829639375209808, 0.0025974304880946875, -0.023753713816404343, 0.04020797088742256, -0.014579512178897858, -0.0142630310729146, -0.017951613292098045, 0.0008653858094476163, 0.032481200993061066, 0.01959397830069065, 0.00980654451996088, 0.00908010546118021, 0.00487854890525341, -0.04023890569806099, -0.030172936618328094, 0.07531813532114029, 0.009384583681821823, -0.013634667731821537, 0.00765741802752018, 0.042912814766168594, 0.04208492115139961, -0.02561778761446476, 0.03156909719109535, -0.01755673997104168, -0.005910432431846857, -0.002956541022285819, 0.03530464321374893, 0.04186496138572693, 0.05088818445801735, 0.04546332731842995, 0.0836920365691185, 0.055556390434503555, -0.000682164856698364, -0.131430983543396, 0.09932716935873032, -0.02053452841937542, 0.029032990336418152, -0.023348193615674973, -0.014720173552632332, -0.010098477825522423, 0.06246698647737503, -0.005892890505492687, -0.042591433972120285, 0.0014679355081170797, 0.051477283239364624, 0.02551223151385784, -0.034583888947963715, -0.008800370618700981, -0.006788825150579214, -0.013959616422653198, 0.006910809315741062, -0.04915841668844223, 0.000919169862754643, -0.03189852461218834, -0.051241908222436905, -0.02774948626756668, 0.01061711274087429, -0.037457093596458435, 0.055256035178899765, -0.031172536313533783, 0.027683455497026443, 0.0005878995871171355, 0.03417261689901352, 0.03339169919490814, 0.019428394734859467, -0.10146810859441757, -0.04813264682888985, -0.02780306339263916, -0.0059164538979530334, -0.019389672204852104, 0.40128186345100403, -0.022310715168714523, -0.016186539083719254, 0.03686504438519478, 0.04061037302017212, 0.007741348817944527, -0.0076964013278484344, 0.016544390469789505, -0.02683219127357006, 0.015880092978477478, 0.004303828347474337, -0.012644237838685513, -0.0037753568030893803, 0.032813675701618195, -0.0181485153734684, -0.013780677691102028, 0.028636379167437553, -0.01336385402828455, 0.040155038237571716, 0.03305979445576668, 0.021377447992563248, -0.01393379271030426, -0.016832200810313225, 0.009134911000728607, 0.006289348006248474, 0.02995547465980053, 0.01536770910024643, 0.016904162243008614, 0.07165807485580444, 0.07163061946630478, 0.02140216901898384, 0.03847295045852661, -0.0022856174036860466, -0.0964762344956398, -0.009585186839103699, -0.01523896399885416, 0.0046355039812624454, 0.026745252311229706, -0.015935152769088745, 0.01278578769415617, 0.0077708871103823185, -0.003974263556301594, -0.05723586305975914, 0.09821146726608276, -0.025169838219881058, -0.06338712573051453, 0.09546779096126556, 0.009380665607750416, -0.016596945002675056, 0.0005222521140240133, -0.04671616852283478, 0.007421580608934164, 0.011963087134063244, 0.004071149975061417, -0.0029715734999626875, -0.06827294081449509, 0.022709453478455544, 0.07434884458780289, -0.05097516253590584, -0.0779779851436615, -0.0345660038292408, -0.04034774377942085, -0.073227159678936, -0.029699236154556274, 0.04758899658918381, 0.03972836956381798, -0.14453957974910736, -0.04596482217311859, 0.01091452781111002, -0.017337258905172348, -0.0524856336414814, 0.015627816319465637, -0.009433602914214134, -0.05608748644590378, 0.03129597753286362, 0.07910463958978653, 0.015616490505635738, -0.0001243175647687167, -0.005679660011082888, 0.04872088506817818, -0.004269550088793039, 0.02094883657991886, -0.023541856557130814, -0.0616929717361927, -0.007692617829889059, -0.06781139969825745, -0.0568954199552536, -0.04667053744196892, 0.010835612192749977, 0.018336331471800804, -0.008274173364043236, -0.007975754328072071, -0.005896449089050293, -0.07702456414699554, 0.059133823961019516, -0.025577714666724205, 0.016465354710817337, 0.010130801238119602, -0.017399387434124947, 0.008466377854347229, -0.041888728737831116, -0.026720287278294563, -0.021243421360850334, -0.013682669959962368, 0.014872366562485695, -0.037995945662260056, 0.041635699570178986, 0.03278476744890213, -0.03837791085243225, 0.09164372086524963, -0.01177528128027916, -0.0204683355987072, -0.028716804459691048, -0.0526178739964962, 0.006076317746192217, -0.0126851387321949, 0.0003190042625647038, -0.018290745094418526, 0.011081652715802193, -0.01168098021298647, 0.07281715422868729, -0.020524488762021065, -0.020486917346715927, 0.01638437993824482, -0.3443019390106201, -0.026909518986940384, -0.05673965439200401, 0.01757596805691719, 0.0004181033873464912, -0.008702362887561321, 0.012034539133310318, -0.01535477302968502, 0.04981672018766403, 0.06578677892684937, 0.08265578001737595, -0.000007571826245111879, -0.03620724007487297, -0.07377882301807404, -0.037087928503751755, -0.002780493116006255, -0.029043424874544144, -0.0321897491812706, -0.03492828831076622, 0.012451762333512306, 0.03322526440024376, 0.000586469832342118, -0.03310466185212135, -0.023653771728277206, 0.01640894077718258, -0.07534195482730865, 0.12591111660003662, 0.06394220143556595, 0.03523002937436104, -0.07491526752710342, 0.04779265820980072, 0.05027756094932556, -0.030985962599515915, -0.08290567994117737, 0.03305171802639961, -0.04230042174458504, 0.015945661813020706, -0.02324015460908413, 0.01471333485096693, -0.05817252770066261, -0.04841288551688194, 0.026950182393193245, -0.009752255864441395, -0.07311899960041046, -0.015665704384446144, 0.029789060354232788, 0.012575914151966572, -0.043820273131132126, -0.025713972747325897, 0.08136462420225143, 0.018529852852225304, 0.01860486902296543, 0.06405475735664368, -0.005851995199918747, 0.0312972366809845, -0.03922077640891075, -0.06884640455245972, -0.005530510563403368, -0.007476700469851494, 0.015290899202227592, 0.03036491386592388, -0.017912454903125763, 0.04713372141122818, -0.07614880055189133, 0.003379855304956436, 0.028920168057084084, 0.026942897588014603, -0.015752339735627174, 0.04795593023300171, -0.016168974339962006, -0.022417251020669937, 0.06786736845970154, -0.006777308415621519, 0.03196738287806511, 0.06402035802602768, 0.04568566754460335, 0.0616687536239624, 0.0035509346053004265, 0.03543911129236221, 0.03326214849948883, 0.02386735938489437, 0.017856745049357414, 0.017225366085767746, -0.031165380030870438, 0.02293233387172222, 0.022733589634299278, 0.02665414661169052, -0.016639892011880875, 0.047198351472616196, -0.0012294076150283217, 0.03502320498228073, 0.011946775019168854, -0.02674204483628273, -0.020806556567549706, 0.009202850051224232, -0.012298800982534885, -0.23798342049121857, 0.034068766981363297, 0.06292316317558289, 0.05032999441027641, 0.01178956963121891, -0.039645034819841385, 0.022531947121024132, -0.05714308097958565, -0.03528878465294838, -0.014106402173638344, 0.014429861679673195, 0.01927942782640457, 0.026382144540548325, -0.003303640754893422, -0.01756843738257885, -0.021654462441802025, 0.05060455575585365, 0.009148557670414448, 0.06267818063497543, 0.03271351754665375, 0.05225404351949692, -0.04461866617202759, 0.16641338169574738, -0.0051581887528300285, 0.028517305850982666, 0.04709313064813614, -0.01710166037082672, -0.057220954447984695, 0.05130095034837723, 0.03648567199707031, -0.025398166850209236, 0.005657387897372246, 0.07735123485326767, 0.06465628743171692, 0.018738960847258568, -0.0005699191824533045, -0.012125352397561073, 0.08955289423465729, -0.04907543957233429, -0.03296564146876335, -0.006329906173050404, 0.049295246601104736, -0.056207939982414246, 0.02462850511074066, 0.04514263570308685, 0.02327946573495865, 0.022941291332244873, -0.008036186918616295, -0.05714917555451393, -0.02323932945728302, -0.03744363784790039, -0.053448427468538284, -0.027581529691815376, -0.01785971224308014, -0.006689876783639193, 0.03956274315714836, 0.02029377594590187, -0.006124303676187992, 0.07099972665309906, 0.015413759276270866, -0.013756120577454567, -0.0009433843079023063, 0.04415858909487724, 0.02189430594444275, -0.0020064744167029858 ]
[ 0.023156307637691498, -0.030352840200066566, -0.023089781403541565, -0.010792245157063007, 0.018319351598620415, 0.0509469211101532, 0.04913760721683502, 0.029588419944047928, -0.01834745705127716, 0.007780068553984165, -0.024921009317040443, -0.015362991020083427, 0.015336137264966965, -0.005850153975188732, 0.029506342485547066, -0.010836631990969181, 0.0022015171125531197, -0.02035527303814888, -0.005812053568661213, 0.010923533700406551, -0.04002755880355835, -0.00834475364536047, 0.04080621898174286, 0.017041075974702835, -0.009872013702988625, 0.01911577582359314, -0.012669496238231659, 0.01656155101954937, 0.030975164845585823, -0.11595398187637329, -0.011015226133167744, -0.05433840677142143, -0.005957265850156546, 0.02790633589029312, -0.0764751061797142, -0.048636313527822495, -0.030471133068203926, -0.022381775081157684, -0.024486828595399857, -0.03451353311538696, -0.021444400772452354, -0.044690363109111786, -0.02160019613802433, 0.046876512467861176, -0.007878189906477928, -0.009192200377583504, -0.06319146603345871, -0.00694857444614172, -0.0039734444580972195, 0.04111511632800102, -0.07275937497615814, 0.0034779894631356, 0.005039950367063284, 0.005029917228966951, 0.008953661657869816, 0.015101036056876183, -0.015644507482647896, 0.03827592730522156, 0.025159668177366257, 0.034899525344371796, 0.01760990172624588, -0.023937808349728584, 0.018328988924622536, -0.013049223460257053, 0.01183544471859932, -0.037425119429826736, -0.028171222656965256, -0.0027519636787474155, -0.004911321215331554, 0.031068384647369385, -0.01802501641213894, 0.008431372232735157, -0.03566678240895271, 0.008145024068653584, -0.0573001354932785, -0.02094098925590515, -0.017611704766750336, -0.017351826652884483, 0.0011561369756236672, -0.0022072941064834595, -0.009645549580454826, 0.0029593089129775763, 0.001335923676379025, 0.011024455539882183, 0.044046320021152496, -0.014019547961652279, 0.017643170431256294, -0.00436791218817234, -0.0255469661206007, -0.014694930985569954, -0.06390562653541565, 0.038491714745759964, 0.02980363368988037, 0.03903916850686073, -0.07835357636213303, 0.024570714682340622, -0.018173517659306526, -0.03822043538093567, -0.005050077568739653, 0.8284719586372375, -0.015094306319952011, 0.02497040294110775, 0.007382458541542292, 0.045174743980169296, -0.022705089300870895, -0.046103253960609436, 0.02011912129819393, 0.0074501605704426765, 0.004705463536083698, -0.035356562584638596, 0.01809198223054409, 0.03483641892671585, 0.014384184032678604, 0.01126550417393446, -0.010042855516076088, 0.03452099859714508, -0.0033970868680626154, 0.012516013346612453, 0.008920934051275253, 0.030929723754525185, 0.03529223054647446, -0.008919933810830116, -0.019495176151394844, 0.02924150414764881, 0.007512797601521015, -0.15928398072719574, 0.03626382723450661, -6.981231562174795e-33, 0.029926596209406853, -0.054695360362529755, 0.022645888850092888, -0.0014170694630593061, 0.024451587349176407, 0.020863158628344536, -0.014294309541583061, 0.03264378383755684, -0.008326079696416855, -0.03663254156708717, 0.03848673775792122, -0.008999058976769447, -0.01251208782196045, 0.007205543573945761, 0.05346314236521721, 0.010708632878959179, -0.009811130352318287, 0.032376017421483994, 0.006528908386826515, -0.005671660881489515, 0.02289419434964657, 0.041288428008556366, 0.03451932966709137, 0.03474662825465202, -0.009244893677532673, 0.045926425606012344, 0.0007556558703072369, 0.008270391263067722, 0.0018886580364778638, -0.04139871150255203, -0.029631953686475754, -0.04519501328468323, -0.03290080651640892, -0.05319688841700554, 0.035882141441106796, -0.051277030259370804, -0.05741462484002113, 0.01531949546188116, -0.03552102670073509, -0.0044130305759608746, -0.012452146038413048, 0.003707890398800373, -0.04930400103330612, -0.04143484681844711, -0.05518607050180435, 0.005267172586172819, 0.01585199497640133, 0.02139590121805668, -0.032119136303663254, -0.015113887377083302, 0.01698937825858593, 0.0023105344735085964, -0.009087888523936272, -0.026525618508458138, 0.006182113196700811, 0.022619929164648056, -0.005598230753093958, -0.0018357340013608336, -0.007691754959523678, -0.022063925862312317, 0.0130003048107028, -0.031185435131192207, 0.037332937121391296, 0.022533858194947243, -0.011917931027710438, 0.0360255166888237, 0.04541131854057312, -0.020866449922323227, 0.0564977303147316, -0.0049393679946660995, -0.030843444168567657, 0.04972577840089798, -0.010017196647822857, -0.03243468701839447, 0.005365898832678795, -0.024037305265665054, -0.026537250727415085, -0.02382243424654007, -0.0033377138897776604, 0.046947166323661804, 0.02507060207426548, 0.0032850259449332952, -0.01308608241379261, -0.032110124826431274, -0.03376314043998718, -0.033669669181108475, 0.005631520412862301, -0.012464028783142567, -0.035887110978364944, 0.004130552522838116, 0.04538143798708916, 0.05785999447107315, -0.002592082368209958, -0.041110146790742874, -0.007519885897636414, 6.939037927135998e-33, -0.0008379605133086443, 0.03465142101049423, 0.0010355835547670722, -0.0005994991515763104, 0.04766630008816719, -0.03245949745178223, 0.03939749673008919, 0.040285710245370865, -0.012833494693040848, 0.016995808109641075, -0.009125963784754276, -0.03791685402393341, -0.042470306158065796, -0.004582475870847702, 0.04318223148584366, 0.009314590133726597, 0.011658373288810253, -0.005155562423169613, 0.0012656920589506626, 0.003026562975719571, 0.03261661157011986, 0.02316378988325596, 0.03879464045166969, 0.019368911162018776, -0.0015910181682556868, 0.031398043036460876, 0.009366960264742374, -0.010977420024573803, -0.011308682151138783, 0.021672379225492477, 0.022179048508405685, -0.011460374109447002, -0.01934458501636982, -0.045400477945804596, -0.018690427765250206, 0.023021282628178596, 0.014729591086506844, -0.003002246143296361, -0.018544798716902733, -0.012275958433747292, 0.02026895433664322, 0.006299434695392847, 0.006712414789944887, 0.014917366206645966, 0.00011612626985879615, 0.004559974651783705, 0.0074203358963131905, -0.0053309784270823, -0.027410179376602173, -0.010704120621085167, 0.040035150945186615, 0.001424972782842815, -0.01156807504594326, 0.0302506722509861, 0.020177457481622696, -0.011728912591934204, -0.04462262988090515, 0.024447210133075714, -0.025181366130709648, -0.0228049885481596, 0.006172563415020704, 0.026560448110103607, -0.025466276332736015, 0.0062285494059324265, 0.0026690619997680187, -0.0046433694660663605, -0.04040863737463951, 0.039999984204769135, -0.041528042405843735, 0.008081152103841305, 0.005961036309599876, -0.020048175007104874, 0.026318524032831192, 0.07142097502946854, 0.004602827597409487, 0.01698099635541439, -0.015385744161903858, 0.02425440400838852, -0.014138728380203247, 0.029201574623584747, 0.016383806243538857, -0.002887704875320196, 0.02115991897881031, -0.04451863095164299, 0.009121181443333626, 0.03775439038872719, -0.016452603042125702, -0.022817444056272507, -0.017285985872149467, 0.027638088911771774, 0.0005715774605050683, -0.012793364934623241, -0.0034561825450509787, -0.007660898845642805, 0.00881718285381794, -1.2501744528492509e-8, -0.04439522698521614, -0.0072751836851239204, -0.031288959085941315, 0.027997182682156563, 0.0029709807131439447, 0.008842403069138527, -0.026123259216547012, 0.0009695918415673077, 0.028171494603157043, -0.01659407652914524, 0.032246578484773636, 0.0007040302734822035, 0.046984512358903885, 0.02917644940316677, -0.014668610878288746, -0.052489835768938065, -0.00798888225108385, -0.026944274082779884, 0.02296910248696804, 0.029128151014447212, -0.010285761207342148, 0.05127556994557381, 0.010800596326589584, -0.025129780173301697, 0.010116825811564922, 0.016352901235222816, -0.008442184887826443, -0.07554855942726135, -0.02043020911514759, 0.0008252408006228507, 0.028310468420386314, -0.02646658383309841, 0.014413182623684406, -0.0407605916261673, 0.013725011609494686, -0.03470911830663681, 0.030503345653414726, -0.007718523032963276, -0.006281898356974125, -0.006460729520767927, -0.004727108869701624, -0.02235737070441246, 0.022602759301662445, -0.02196597494184971, -0.01951201818883419, -0.004293035715818405, -0.02536843530833721, 0.006931463722139597, 0.03326201066374779, -0.0214882493019104, 0.005324563942849636, -0.03214725852012634, -0.011809412389993668, 0.007317427080124617, 0.03591766580939293, 0.01648031361401081, 0.025543605908751488, 0.03230210393667221, -0.015705155208706856, -0.0032866117544472218, 0.03330017626285553, 0.007863558828830719, -0.0008306109812110662, -0.007162905763834715 ]
duckdb-sql-transpose-columns-to-rows-unpivot
https://markhneedham.com/blog/2023/06/13/duckdb-sql-transpose-columns-to-rows-unpivot
false
2023-06-22 04:44:37
GPT4All/LangChain: Model.__init__() got an unexpected keyword argument 'ggml_model' (type=type_error)
[ "gpt4all", "langchain", "til", "generative-ai" ]
[ "TIL" ]
I'm starting to realise that things move insanely fast in the world of LLMs (Large Language Models) and you will run into issues because you aren't using the latest version of libraries. I say this because I've been following Sami Maameri's blog post which explains how to run an https://betterprogramming.pub/private-llms-on-local-and-in-the-cloud-with-langchain-gpt4all-and-cerebrium-6dade79f45f6[LLM on your own machine^] and ran into an error, which we'll explore in this blog post. Sami's post is based around a library called GPT4All, but he also uses LangChain to glue things together. I first installed the following libraries: [source, bash] ---- pip install gpt4all langchain pyllamacpp ---- And then launched a Python REPL, into which I pasted the following code: [source, python] ---- from langchain.llms import GPT4All llm = GPT4All(model='/Users/markhneedham/Library/Application Support/nomic.ai/GPT4All/ggml-gpt4all-j-v1.3-groovy.bin') ---- The model path that I've used is the location where the GPT4All app downloaded the model, but you can choose to put it elsewhere. When that second line of code ran, I got the following exception: [source, output] ---- Exception ignored in: <function Model.__del__ at 0x10ab2b7e0> Traceback (most recent call last): File "/Users/markhneedham/projects/docs-bot/env/lib/python3.11/site-packages/pyllamacpp/model.py", line 402, in __del__ if self._ctx: ^^^^^^^^^ AttributeError: 'Model' object has no attribute '_ctx' Traceback (most recent call last): File "<stdin>", line 1, in <module> File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__ pydantic.error_wrappers.ValidationError: 1 validation error for GPT4All __root__ Model.__init__() got an unexpected keyword argument 'ggml_model' (type=type_error) ---- After a bit of exploration, I came across https://github.com/hwchase17/langchain/issues/3839[this GitHub thread^], which suggests that the GPT4All code had changed and LangChain was passing in the wrong parameters. I also learnt that it's been fixed for https://github.com/hwchase17/langchain/pull/4567[about a month^], so my version of LangChain was clearly lagging. Let's check my version: [source, bash] ---- pip freeze | grep langchain ---- .Output [source, text] ---- langchain==0.0.142 ---- From searching the ttps://pypi.org/project/langchain/#history[release history of LangChain^], I discovered that I installed it on 17th April, since when there have been more than 60 releases! I updated by running `pip install langchain -U` and now I'm up to date (at least for now!): .Output [source, text] ---- langchain==0.0.208 langchainplus-sdk==0.0.16 ---- I'm also able to run the example from Sami's blog post: [source, python] ---- llm(""" You are a friendly chatbot assistant that responds in a conversational manner to users questions. Keep the answers short, unless specifically asked by the user to elaborate on something. Question: Where is Paris? Answer:""") ---- .Output [source, text] ---- ' The capital city of France and Europe located at 47°23′N 8°54″W' ----
In this post we'll learn about an error message when using GPT4All with LangChain.
uploads/2023/06/gpt4all-langchain-banner.png
[ -0.011150968261063099, -0.006278729997575283, -0.026030700653791428, 0.013405212201178074, 0.07449657469987869, 0.008243860676884651, 0.008262288756668568, 0.04038425534963608, 0.0018878082046285272, 0.006792120635509491, -0.024135729297995567, 0.006855574436485767, -0.08103872090578079, 0.03734537586569786, -0.0003013121313415468, 0.08152651786804199, 0.08698243647813797, -0.013910572975873947, 0.01718059927225113, 0.029101494699716568, 0.023912325501441956, 0.07310732454061508, 0.0003041957097593695, 0.032154638320207596, -0.017865309491753578, 0.013749328441917896, 0.03757774829864502, 0.010509563609957695, -0.058542702347040176, -0.018589626997709274, 0.034531619399785995, 0.0012313227634876966, 0.03300846368074417, 0.01527712494134903, 0.029178453609347343, 0.022833701223134995, -0.032312992960214615, 0.02343095652759075, 0.008854301646351814, 0.030444609001278877, -0.049074478447437286, 0.03450891003012657, -0.020704250782728195, 0.005990680307149887, -0.05706365406513214, 0.006845680996775627, -0.037483539432287216, 0.026496101170778275, 0.010449922643601894, -0.0364195741713047, -0.07163500040769577, 0.025878189131617546, -0.040579792112112045, -0.016521180048584938, 0.006503269542008638, 0.010734986513853073, 0.0010619546519592404, -0.10198180377483368, 0.032022710889577866, -0.007259461097419262, -0.020831545814871788, -0.006327533628791571, -0.008465342223644257, 0.022362276911735535, 0.015736375004053116, -0.03370766341686249, -0.0011244831839576364, 0.03227294608950615, -0.06336376070976257, -0.027174903079867363, -0.005874901078641415, 0.018910598009824753, -0.04423104599118233, -0.029894061386585236, 0.01764947734773159, -0.04361676052212715, -0.012356196530163288, 0.05556170269846916, 0.011176305823028088, 0.05650680139660835, -0.029031088575720787, -0.0014958742540329695, 0.029215440154075623, 0.04066456854343414, 0.015711864456534386, -0.01791483350098133, -0.007976360619068146, 0.003385573159903288, -0.05843452364206314, 0.05900796130299568, 0.03742283955216408, -0.06116444990038872, -0.0031778456177562475, 0.02219589613378048, 0.017365239560604095, -0.010464549995958805, -0.004634268116205931, 0.008041690103709698, -0.007477618288248777, -0.018023977056145668, -0.012459881603717804, -0.01460192073136568, -0.001232678652741015, 0.008199394680559635, -0.07754644006490707, -0.020497547462582588, -0.029149461537599564, -0.016462227329611778, -0.04000328481197357, -0.008774666115641594, -0.016305437311530113, 0.005943498108536005, -0.045069899410009384, -0.014441213570535183, -0.07120005786418915, 0.08048847317695618, 0.002091545145958662, -0.04585140570998192, -0.0005532735958695412, 0.02501721680164337, 0.060154348611831665, 0.031207283958792686, -0.012093611992895603, 0.07247719168663025, 0.010485430248081684, 0.042842473834753036, -0.016647953540086746, 0.04441050812602043, -0.01775372587144375, -0.06676571071147919, 0.005269634537398815, 0.06746334582567215, -0.015184842981398106, 0.009138868190348148, 0.002232504775747657, 0.0005549996858462691, -0.03346903249621391, 0.0244448222219944, 0.05187273025512695, 0.02750316448509693, 0.0022975269239395857, -0.016640707850456238, 0.010845747776329517, 0.015090390108525753, 0.009167377837002277, 0.044613391160964966, -0.02374323271214962, -0.03055807575583458, -0.04900272563099861, -0.008842980489134789, 0.016353467479348183, 0.062072958797216415, 0.033555276691913605, -0.02797364629805088, 0.03804032877087593, 0.10542833805084229, 0.03040388971567154, 0.016994409263134003, -0.040161632001399994, 0.0009832294890657067, 0.022436778992414474, 0.03533768653869629, -0.01249183714389801, 0.04730412736535072, 0.022311847656965256, -0.019157640635967255, -0.006866869982331991, 0.02750762365758419, -0.002230220241472125, -0.009491010569036007, -0.061412811279296875, -0.05154489353299141, 0.054862864315509796, -0.04255228862166405, -0.030798550695180893, 0.006526413839310408, 0.10394323617219925, 0.02275446057319641, 0.044615719467401505, 0.014099269174039364, -0.07981626689434052, 0.01737982966005802, 0.010060799308121204, 0.01335885003209114, 0.034920141100883484, 0.007859639823436737, 0.09652014076709747, -0.01285886112600565, -0.012506883591413498, 0.010231781750917435, -0.06830467283725739, -0.03294997289776802, -0.0067493547685444355, -0.005360109265893698, 0.07212038338184357, -0.01758003979921341, -0.004424192477017641, 0.07544481009244919, 0.04091176390647888, 0.032648611813783646, 0.019343901425600052, -0.0023105295840650797, -0.014684672467410564, -0.043720874935388565, -0.055336352437734604, 0.021158557385206223, 0.0398070365190506, -0.013193252496421337, -0.03583779186010361, 0.0025803649332374334, -0.019442325457930565, -0.018719704821705818, 0.04617082700133324, -0.011874794028699398, 0.04650313779711723, 0.0037355253007262945, 0.02722654864192009, -0.041281770914793015, 0.04242890328168869, -0.03493504971265793, 0.01362532190978527, 0.00022563782113138586, -0.030640827491879463, -0.028336424380540848, 0.006798697169870138, 0.11228715628385544, 0.056408774107694626, -0.007736042141914368, -0.05885692313313484, 0.04380515217781067, 0.034824371337890625, -0.06529246270656586, 0.009432757273316383, -0.0319296270608902, -0.01025368645787239, -0.027411898598074913, -0.03580790385603905, -0.029398437589406967, -0.004953170660883188, -0.026755521073937416, -0.021668706089258194, 0.0834311991930008, -0.027091456577181816, 0.05439028516411781, -0.0032621140126138926, -0.021915456280112267, -0.013173659332096577, -0.035990551114082336, -0.06490527093410492, 0.00014642511087004095, 0.013094881549477577, -0.008461941964924335, 0.04441950470209122, -0.007837275974452496, -0.065851129591465, -0.050390761345624924, -0.059683606028556824, 0.02711154893040657, 0.017636394128203392, 0.07215096801519394, -0.011534308083355427, 0.06551434844732285, -0.000018845938029699028, 0.028174979612231255, -0.02614877186715603, -0.051451727747917175, -0.038456737995147705, -0.023613756522536278, 0.023730222135782242, 0.021173864603042603, 0.027847113087773323, 0.02630116604268551, -0.011805501766502857, -0.010901736095547676, 0.013004880398511887, 0.01236645970493555, 0.030582407489418983, -0.009506664238870144, -0.02876286208629608, -0.040118809789419174, -0.017310142517089844, 0.04395313933491707, -0.04983014613389969, -0.03108157217502594, -0.0006073075346648693, -0.06848762184381485, 0.028177503496408463, -0.08573773503303528, -0.018243081867694855, 0.0008703535422682762, 0.00676465081050992, 0.03631272166967392, -0.006394288036972284, 0.019104810431599617, 0.04482324421405792, 0.02390240505337715, 0.011416022665798664, 0.011117174290120602, 0.000008268302735814359, 0.06369706243276596, 0.003543014172464609, 0.01618213951587677, 0.02630908228456974, 0.023635728284716606, -0.012110776267945766, -0.043441273272037506, 0.012599067762494087, -0.03426804766058922, -0.28438979387283325, 0.01433081179857254, 0.0011446045245975256, -0.052307892590761185, 0.020484110340476036, -0.005555835552513599, 0.005181474611163139, -0.041697464883327484, -0.016523238271474838, 0.0005169713986106217, -0.024845054373145103, -0.03839833661913872, -0.010633221827447414, 0.031209394335746765, 0.02994774840772152, 0.03138590231537819, 0.0022482224740087986, -0.03647760674357414, 0.03063035197556019, 0.06098318099975586, 0.0036516522523015738, -0.04059666022658348, -0.00012962381879333407, 0.04721677675843239, 0.011531773023307323, 0.030455108731985092, -0.05594711750745773, 0.04771285876631737, -0.06271564215421677, -0.0169100072234869, 0.002853365847840905, -0.030434083193540573, -0.021716661751270294, 0.002043750137090683, -0.008485334925353527, -0.021722862496972084, 0.02067980170249939, 0.023566408082842827, 0.027384702116250992, 0.0027813652995973825, -0.019045580178499222, -0.03181416541337967, -0.0027495159301906824, -0.009093007072806358, 0.07870740443468094, -0.010807821527123451, -0.10307669639587402, -0.020559852942824364, -0.03806999698281288, 0.07865916937589645, -0.04307842627167702, -0.025456789880990982, -0.010949901305139065, 0.03856649622321129, -0.005089187063276768, -0.016667893156409264, -0.024602001532912254, -0.02283865213394165, -0.03653579577803612, -0.02041502110660076, -0.011742527596652508, -0.043729785829782486, -0.02510790154337883, -0.05215143412351608, -0.015827002003788948, -0.042213063687086105, -0.03962819278240204, -0.04069948568940163, 0.07408429682254791, 0.03354410454630852, -0.045232124626636505, -0.02446017600595951, -0.021185941994190216, -0.1034194603562355, -0.007119082845747471, -0.04591519758105278, -0.02831033244729042, 0.019271984696388245, 0.004413175396621227, 0.019846618175506592, -0.05685627833008766, -0.0480315238237381, 0.01650751568377018, 0.0017578466795384884, 0.01958988420665264, -0.017739346250891685, 0.0033920202404260635, -0.018007511273026466, -0.013162986375391483, 0.004365339409559965, 0.04434614256024361, -0.010777737945318222, -0.020348139107227325, -0.010707434266805649, -0.011069553904235363, -0.007858216762542725, 0.010065638460218906, 0.03362352401018143, 0.022432077676057816, 0.02767758257687092, 0.026181060820817947, -0.06028871610760689, -0.0025673871859908104, -0.019522644579410553, -0.005138396751135588, -0.00021727634884882718, -0.03892075642943382, -0.02616889588534832, 0.044122520834207535, 0.018039444461464882, -0.008677837438881397, -0.02307218872010708, 0.0384691022336483, -0.054263390600681305, -0.037913065403699875, -0.004904122557491064, 0.007213259115815163, 0.029774492606520653, 0.03453265503048897, -0.02509172074496746, -0.08582428097724915, 0.034292709082365036, 0.01756005734205246, -0.007925016805529594, -0.029485823586583138, -0.012810097075998783, -0.02183743752539158, -0.022925488650798798, -0.004371708258986473, 0.004650502000004053, -0.04351631924510002, 0.012568864040076733, 0.044719915837049484, -0.042871490120887756, 0.02130889520049095, -0.019598331302404404, -0.03242866322398186, -0.034575775265693665, 0.015877775847911835, -0.003657095367088914, 0.007743668742477894, 0.022439926862716675, 0.012438427656888962, 0.009512313641607761, 0.047427356243133545, 0.002802732866257429, 0.06553825736045837, 0.011032719165086746, -0.0040108440443873405, 0.012646579183638096, 0.03206004574894905, -0.04571298137307167, 0.05652504041790962, -0.011286898516118526, -0.01873539201915264, -0.013247981667518616, 0.027416158467531204, -0.006684336345642805, -0.003808446228504181, -0.04924175888299942, 0.02427605912089348, -0.019548485055565834, -0.01166426669806242, 0.004250184167176485, 0.007615541107952595, 0.05180725082755089, 0.01071434747427702, 0.0288299061357975, 0.0003663678071461618, -0.002637838711962104, 0.014075969345867634, -0.0018089504446834326, -0.022167455404996872, 0.00202939216978848, -0.006452773232012987, 0.019172590225934982, 0.01968257501721382, 0.012969923205673695, 0.014268076047301292, 0.018008874729275703, -0.0210976954549551, -0.05072622001171112, 0.017085863277316093, 0.01787799596786499, 0.020885517820715904, 0.023520221933722496, -0.01786407083272934, 0.0024016662500798702, -0.0055375294759869576, -0.022569652646780014, -0.005504025612026453, 0.010953743010759354, 0.0029822802171111107, 0.0027948860079050064, -0.023823972791433334, -0.06460298597812653, 0.028694117441773415, 0.02548152767121792, 0.01863689348101616, -0.007712933234870434, -0.027685387060046196, -0.013894209638237953, -0.027811119332909584, 0.046095337718725204, 0.07507215440273285, -0.06062495708465576, -0.0041846297681331635, -0.006193551234900951, 0.018826354295015335, 0.006554357707500458, 0.011817251332104206, -0.03548929840326309, -0.025842661038041115, 0.0005864781560376287, -0.005121173337101936, -0.02235741727054119, -0.02252846397459507, -0.010119705460965633, 0.012151882983744144, 0.008433112874627113, -0.010965472087264061, -0.001020451309159398, -0.008068639785051346, -0.00661090761423111, -0.0359080508351326, 0.007356205023825169, -0.010298913344740868, 0.012544871307909489, 0.01757097616791725, -0.010850746184587479, 0.05047527700662613, -0.06162947416305542, 0.034923724830150604, 0.01882164366543293, -0.006420569494366646, 0.011317368596792221, -0.05165639519691467, -0.013901741243898869, -0.007143959868699312, 0.03036300465464592, 0.021851658821105957, -0.009354275651276112, -0.011015062220394611, -0.0022491668350994587, -0.03363668546080589, 0.007577391806989908, -0.0026564907748252153, -0.008067633956670761, -0.014426839537918568, 0.05707141011953354, 0.0101649584248662, 0.05406402051448822, 0.012137623503804207, -0.004786771256476641, 0.0689602941274643, -0.05943882837891579, -0.04725021868944168, -0.013215978629887104, -0.04667796939611435, 0.028034161776304245, 0.017847660928964615, 0.013236078433692455, -0.08718626946210861, 0.06223079562187195, 0.043793827295303345, 0.03381170704960823, 0.057036224752664566, -0.009599459357559681, 0.03704600781202316, -0.01784006506204605, -0.02247709222137928, -0.08828914165496826, 0.0013197484659031034, 0.01980634592473507, 0.003882794175297022, -0.04192577302455902, -0.009881003759801388, -0.07190726697444916, 0.033476315438747406, -0.050514210015535355, -0.03757600113749504, 0.04388563334941864, 0.019156014546751976, -0.030073925852775574, 0.04206572845578194, -0.03850181773304939, 0.027683572843670845, 0.0377030074596405, -0.03862110525369644, -0.026247186586260796, -0.026507476344704628, 0.05045689269900322, -0.010757094249129295, 0.03818230703473091, -0.01835329458117485, 0.00456044590100646, 0.07599136978387833, 0.04057599604129791, 0.0009965524077415466, 0.0420086570084095, 0.011690725572407246, 0.05535775423049927, 0.03562371805310249, 0.013733088970184326, -0.011088147759437561, 0.002941030077636242, -0.008439721539616585, -0.0645969957113266, 0.05063110589981079, 0.012268772348761559, -0.006949920207262039, -0.018544089049100876, 0.05322706699371338, 0.024127963930368423, -0.034757621586322784, -0.0555310919880867, 0.022263118997216225, -0.07195200771093369, -0.003089021658524871, -0.02613348513841629, -0.005902744363993406, -0.02532316744327545, 0.0541970431804657, -0.023659199476242065, 0.002734042704105377, 0.06818980723619461, 0.01706691086292267, -0.02939969301223755, 0.029391150921583176, 0.0767306312918663, 0.06429601460695267, 0.007300699129700661, 0.0236903615295887, 0.06340374052524567, -0.010471303947269917, -0.046828463673591614, 0.011452527716755867, -0.032758601009845734, -0.024747096002101898, -0.053180988878011703, 0.020305106416344643, 0.06964864581823349, -0.031572967767715454, 0.06771905720233917, -0.016619976609945297, 0.017273519188165665, 0.011847139336168766, 0.016204465180635452, 0.017406726256012917, 0.07119255512952805, 0.0122708510607481, 0.05164886265993118, -0.027899904176592827, -0.037688612937927246, 0.006034277845174074, -0.009639155119657516, -0.017337454482913017, 0.02809201367199421, -0.0203090887516737, 0.007183484733104706, 0.026581475511193275, 0.04125174880027771, 0.09437914192676544, -0.01985960453748703, -0.022785834968090057, -0.020891958847641945, 0.038209401071071625, 0.020360760390758514, 0.014125695452094078, -0.0188179612159729, -0.0350874587893486, -0.002075816038995981, -0.028381960466504097, -0.009834246709942818, -0.0023971220944076777, -0.037990450859069824, 0.04521260783076286, -0.03188939020037651, -0.001919233938679099, 0.032836537808179855, 0.01005593966692686, -0.06167969852685928, -0.03752204775810242, -0.06154676526784897, -0.04493260756134987, -0.06634246557950974, 0.00032416751491837204, 0.002753047039732337, -0.00847453624010086, -0.046746280044317245, -0.017356030642986298, 0.002282139379531145, -0.010522197000682354, 0.003946167882531881, -0.07002914696931839, -0.019266651943325996, 0.0019311838550493121, 0.007935323752462864, -0.0007081953808665276, 0.022300273180007935, 0.06084703654050827, -0.014162338338792324, -0.01232814695686102, -0.015272517688572407, 0.03334416449069977, 0.01479423139244318, 0.00896572507917881, 0.057801853865385056, -0.08235770463943481, 0.021620681509375572, 0.025396982207894325, -0.00940576009452343, -0.06717653572559357, -0.00471722986549139, 0.06340719014406204, -0.019669944420456886, 0.05922778695821762, 0.017020897939801216, 0.006236623506993055, -0.0412428192794323, -0.028487786650657654, -0.027211705222725868, 0.017938558012247086, 0.029292477294802666, 0.009364842437207699, 0.07993189245462418, 0.04764549806714058, -0.0019214829662814736, -0.016439706087112427, -0.018889686092734337, -0.002568307798355818, -0.016374042257666588, -0.04834979027509689, -0.04245026409626007, -0.033407874405384064, -0.06044116988778114, -0.005698270630091429, 0.017112972214818, -0.03963029012084007, -0.01508545782417059, 0.007010146044194698, -0.010593262501060963, -0.02516731433570385, 0.0159798301756382, -0.047296490520238876, -0.0013363964390009642, -0.020890872925519943, -0.013562934473156929, -0.012119456194341183, 0.030873790383338928, 0.03798720985651016, -0.0012612245045602322, 0.03823767974972725, -0.04178016260266304, -0.0032011838629841805, 0.008101603016257286, 0.04233903810381889, 0.018046414479613304, -0.003762987209483981, 0.008810853585600853 ]
[ -0.08690289407968521, -0.016534114256501198, -0.025731084868311882, -0.01974918320775032, 0.04043705016374588, -0.045912664383649826, -0.056731607764959335, 0.02420627884566784, 0.010319209657609463, -0.04982268437743187, 0.01637515425682068, -0.05367453768849373, -0.0026011248119175434, -0.018071778118610382, 0.09220536053180695, -0.0035155457444489002, -0.0010508045088499784, -0.07226403057575226, 0.012107941322028637, 0.003464187029749155, -0.007947690784931183, -0.03128369525074959, -0.026561841368675232, -0.01640114188194275, 0.0028450777754187584, 0.039545804262161255, 0.0331416092813015, -0.002030343748629093, -0.004361182916909456, -0.250926673412323, 0.012481036596000195, 0.0043267374858260155, 0.00991380400955677, -0.02596387080848217, -0.006599898915737867, 0.06297760456800461, -0.0011112448992207646, 0.011073533445596695, 0.009853724390268326, 0.05797303467988968, 0.01762971095740795, 0.03766728565096855, -0.0633169412612915, -0.023051925003528595, 0.06904611736536026, -0.025815963745117188, -0.018205374479293823, 0.0017936751246452332, -0.020424123853445053, -0.020081954076886177, -0.029961340129375458, -0.009310688823461533, -0.013362228870391846, -0.015042439103126526, -0.02465427666902542, 0.03320153430104256, 0.04143784940242767, 0.07659819722175598, 0.018049729987978935, 0.001975178951397538, 0.005518640857189894, -0.002367736306041479, -0.14848586916923523, 0.11345574259757996, -0.006314329337328672, 0.07289658486843109, 0.006443302612751722, -0.03341681882739067, -0.016642339527606964, 0.08551434427499771, -0.014326939359307289, -0.025159619748592377, -0.017817821353673935, 0.05442811921238899, 0.01674497313797474, -0.006573183462023735, 0.020759664475917816, 0.014472690410912037, 0.0486762672662735, -0.02116498164832592, -0.011153283528983593, -0.025653894990682602, -0.01809288002550602, -0.0602417066693306, -0.024396441876888275, 0.004266249015927315, -0.027793345972895622, 0.06621649116277695, -0.012152954936027527, 0.01135532557964325, 0.03075149655342102, -0.027142779901623726, 0.027280552312731743, 0.04759056866168976, -0.0875246450304985, 0.006206511985510588, 0.0061979335732758045, 0.015830490738153458, -0.05344180762767792, 0.46304309368133545, -0.018409231677651405, -0.012559393420815468, 0.060536786913871765, 0.07064614444971085, 0.021642111241817474, 0.020524917170405388, -0.02960813045501709, -0.01058054156601429, 0.003493650583550334, -0.03650643303990364, 0.01921650767326355, 0.006389059592038393, 0.0685286819934845, -0.046458899974823, 0.001817841432057321, -0.019579486921429634, 0.003149369964376092, -0.010539964772760868, -0.03831883519887924, 0.044567544013261795, -0.03951297327876091, 0.013789848424494267, 0.021261610090732574, -0.004100439604371786, -0.006190496031194925, -0.015519723296165466, 0.014898808673024178, 0.04080299288034439, 0.03746546432375908, 0.012572532519698143, 0.026985058560967445, -0.02138209529221058, -0.08931469172239304, -0.014631997793912888, 0.03674039989709854, 0.0008529240731149912, 0.03108159638941288, -0.0442313551902771, 0.015997743234038353, 0.023088641464710236, -0.025072596967220306, -0.045245591551065445, -0.00043129714322276413, 0.0029502343386411667, -0.02176828682422638, 0.10565418750047684, 0.001520837191492319, -0.035557422786951065, -0.026260845363140106, -0.01957518793642521, 0.009278541430830956, 0.04407621547579765, 0.022572007030248642, -0.05427516996860504, 0.03409232944250107, 0.024919508025050163, 0.08005375415086746, -0.003170064650475979, -0.05547403171658516, 0.0005170197691768408, -0.03278469666838646, -0.0512651726603508, -0.04080034792423248, 0.0677429735660553, 0.0037315129302442074, -0.1182224452495575, -0.03464614599943161, -0.005522956606000662, 0.006596451625227928, -0.06712843477725983, 0.002457857131958008, 0.01619289629161358, -0.030636867508292198, -0.004545383621007204, 0.04204060509800911, -0.04354884847998619, -0.02840249612927437, -0.012985614128410816, 0.03424367308616638, 0.029836148023605347, 0.006660630460828543, 0.016658524051308632, -0.024558337405323982, -0.017833372578024864, -0.038783952593803406, -0.07504907995462418, -0.03808845952153206, -0.01889428310096264, -0.004735521040856838, -0.045429326593875885, -0.006650570314377546, 0.01222275197505951, -0.03129607066512108, 0.052378393709659576, -0.03190911188721657, -0.005320702213793993, -0.023224594071507454, -0.016777269542217255, 0.026809461414813995, -0.04409901425242424, -0.0041993786580860615, 0.051748234778642654, 0.003140812274068594, 0.023935873061418533, -0.05977969616651535, 0.03639271482825279, 0.03132648766040802, -0.03816000372171402, 0.050614770501852036, 0.043273795396089554, -0.03238625451922417, -0.00934513472020626, 0.0037402398884296417, -0.004814633633941412, -0.014114262536168098, -0.00011771032586693764, -0.011786899529397488, 0.01871248334646225, 0.008124285377562046, 0.025479815900325775, -0.0384703166782856, -0.006881376262754202, -0.02798669971525669, -0.36142316460609436, -0.017563169822096825, 0.001591132371686399, 0.011713676154613495, 0.005288206040859222, -0.0765049010515213, -0.008175112307071686, -0.009271255694329739, -0.006959399674087763, 0.056220751255750656, 0.09828614443540573, -0.011404605582356453, 0.007925680838525295, -0.06691737473011017, 0.0006700490484945476, 0.039949338883161545, -0.04589271545410156, 0.0007243186119012535, -0.03840341791510582, 0.038979671895504, -0.01060455571860075, -0.017557676881551743, -0.02936665341258049, -0.06058019772171974, -0.02370162308216095, -0.026883171871304512, 0.10249829292297363, -0.005470653995871544, 0.06498111039400101, -0.039909690618515015, 0.049263499677181244, 0.005927737802267075, 0.007011775393038988, -0.0830964744091034, -0.009628773666918278, -0.035201143473386765, 0.020083468407392502, 0.004831423982977867, 0.03132278099656105, -0.013309088535606861, -0.054834067821502686, 0.020555146038532257, -0.038477178663015366, -0.04813595861196518, -0.04031571373343468, 0.03429913893342018, -0.001726332469843328, -0.008397236466407776, -0.036287251859903336, 0.08011630922555923, -0.02022787742316723, 0.029864616692066193, 0.044156476855278015, 0.023560330271720886, -0.0346711128950119, -0.04351738467812538, -0.07959941774606705, -0.002585937036201358, 0.005564848892390728, 0.003904233919456601, 0.022786946967244148, 0.0631813183426857, 0.03503471612930298, -0.03621514141559601, -0.032557059079408646, -0.03386571630835533, -0.0023605169262737036, -0.01405845582485199, 0.047217290848493576, -0.011522511020302773, -0.005508866161108017, 0.08956609666347504, 0.004114858340471983, 0.007967331446707249, 0.00412910059094429, 0.046317171305418015, -0.0045115030370652676, 0.03456920012831688, -0.015630008652806282, 0.005513488780707121, 0.023127131164073944, 0.015382260084152222, 0.0348806157708168, -0.03852236643433571, -0.017051691189408302, 0.018544653430581093, -0.03507866710424423, 0.010754255577921867, 0.0425063893198967, 0.020225131884217262, -0.026623524725437164, 0.0001198517347802408, -0.0077157472260296345, -0.040156569331884384, 0.07016442716121674, 0.0029696854762732983, -0.2202475219964981, 0.02375582605600357, 0.05864566192030907, 0.0713123083114624, -0.013976200483739376, 0.02241051383316517, 0.014016693457961082, -0.04956468939781189, 0.021135883405804634, 0.02200186438858509, 0.027126140892505646, 0.03379756584763527, 0.017502551898360252, -0.009089686907827854, 0.03137228637933731, -0.053416457027196884, 0.05686388909816742, 0.0027064497116953135, 0.02707189880311489, 0.02668631076812744, 0.005811391863971949, -0.008168463595211506, 0.1418790966272354, 0.01846955716609955, 0.0030328205320984125, 0.04408019408583641, -0.012147207744419575, 0.02876528725028038, 0.05029457435011864, 0.039303336292505264, -0.009822321124374866, 0.02844705991446972, 0.04928543418645859, -0.001894718618132174, 0.03076270781457424, -0.04322272539138794, -0.01643010973930359, 0.0237672571092844, 0.03898759186267853, 0.002085357904434204, -0.0015104349004104733, 0.03613874316215515, -0.037497617304325104, 0.017994243651628494, 0.057138241827487946, -0.001214788993820548, -0.0041269720532000065, -0.00966713111847639, -0.04888688400387764, 0.01891423389315605, -0.020153168588876724, -0.05828465521335602, -0.017816701903939247, 0.020535975694656372, 0.009488271549344063, 0.06393080204725266, 0.03152976930141449, -0.011531027033925056, -0.006249578669667244, 0.002844890346750617, 0.010574043728411198, -0.047887369990348816, 0.11655185371637344, -0.00146134861279279, 0.01785081997513771 ]
[ 0.021767493337392807, -0.0251654963940382, -0.019089343026280403, 0.001228876761160791, 0.004985525272786617, -0.009488503448665142, -0.0035553579218685627, 0.028373081237077713, 0.009461399167776108, -0.0058888839557766914, 0.00037602279917337, 0.020990312099456787, 0.033068008720874786, 0.0002282232599100098, 0.00966014713048935, -0.019819702953100204, 0.019489437341690063, 0.035545043647289276, 0.02169279009103775, -0.0030729656573385, -0.03684404119849205, 0.018841365352272987, 0.03099965676665306, 0.042388562113046646, -0.010489732958376408, -0.011714978143572807, -0.01176032517105341, 0.00889106746762991, 0.0251239575445652, -0.09439237415790558, -0.0025152359157800674, -0.026717811822891235, -0.018839573487639427, 0.014964444562792778, 0.004018065985292196, 0.033730167895555496, -0.010286821983754635, -0.02106572687625885, -0.026501983404159546, 0.0017341027269139886, 0.03300433233380318, -0.032478783279657364, 0.008325752802193165, 0.006551169790327549, 0.011398101225495338, -0.006439566612243652, -0.011538569815456867, -0.013459155336022377, -0.022227581590414047, -0.03582686558365822, -0.007149963639676571, -0.009430501610040665, -0.023433949798345566, -0.02659805491566658, -0.0203702412545681, 0.0023945567663758993, -0.00020518161181826144, -0.030151870101690292, 0.020540155470371246, -0.008883758448064327, 0.016196422278881073, -0.00008671601244714111, -0.053604185581207275, -0.012181089259684086, -0.012831886298954487, 0.021456776186823845, -0.002154821064323187, 0.019921796396374702, -0.0007553414325229824, 0.016817564144730568, -0.016218924894928932, 0.019794603809714317, -0.03402812033891678, 0.00032046259730122983, -0.01729973405599594, -0.03465011343359947, 0.03881417587399483, -0.013196554034948349, 0.02520645782351494, -0.0051837158389389515, -0.0023492106702178717, 0.01778520829975605, 0.027448566630482674, -0.016193851828575134, -0.026795174926519394, -0.036769576370716095, 0.020366275683045387, 0.022010475397109985, 0.022749748080968857, -0.045916683971881866, -0.0052910312078893185, 0.008270028047263622, -0.018621573224663734, -0.0033686354290694, -0.0805363804101944, -0.04845453426241875, -0.009073073044419289, -0.02626069076359272, -0.028920287266373634, 0.8264228105545044, -0.006074965000152588, 0.01836390048265457, 0.016556521877646446, 0.009242885746061802, -0.012278106063604355, 0.05359217897057533, -0.03310669586062431, 0.008105264976620674, -0.029031721875071526, -0.01791769079864025, 0.024717072024941444, -0.0011232710676267743, 0.029401998966932297, 0.03328337520360947, 0.033027421683073044, 0.008870105259120464, 0.00001617724228708539, 0.01825275644659996, -0.019874785095453262, 0.07027843594551086, -0.0449475459754467, -0.009138360619544983, 0.05011514201760292, -0.008665203116834164, -0.01038357987999916, -0.1566484421491623, 0.0029548637103289366, -6.939572042381653e-33, 0.04902025684714317, -0.03333784639835358, 0.004844082985073328, 0.018345803022384644, 0.06685476005077362, 0.025637175887823105, 0.02149658091366291, -0.007370019797235727, -0.025327540934085846, -0.04237651452422142, -0.016744446009397507, 0.000056821889302227646, -0.023034410551190376, -0.026780519634485245, 0.04049883037805557, 0.013987948186695576, 0.01974058896303177, 0.050677962601184845, -0.006112110335379839, 0.03752024099230766, 0.00799264945089817, 0.06034405529499054, 0.03706228733062744, 0.0189590472728014, 0.00755828432738781, 0.06390140950679779, 0.036570917814970016, 0.0027612510602921247, 0.035861533135175705, -0.03012605756521225, -0.050995368510484695, -0.02388448268175125, -0.009681709110736847, -0.021846430376172066, 0.006645501125603914, -0.045672375708818436, -0.05388747900724411, 0.015506812371313572, 0.0074728080071508884, -0.012247083708643913, -0.0006846617325209081, -0.0019187424331903458, -0.004301648121327162, -0.0648161917924881, -0.026245158165693283, 0.015552053228020668, 0.016600335016846657, 0.07812930643558502, -0.012433943338692188, 0.029574433341622353, 0.030534137040376663, 0.024603797122836113, -0.045235998928546906, 0.03734884038567543, -0.057469941675662994, 0.007355634123086929, -0.012528748251497746, 0.018137911334633827, 0.015184919349849224, -0.011827058158814907, 0.02658032812178135, 0.0016879955073818564, 0.00527550745755434, 0.027447065338492393, 0.03915470093488693, -0.015060408040881157, -0.03405405580997467, 0.009680580347776413, -0.0050573828630149364, 0.03202600032091141, -0.07314823567867279, -0.0034190781880170107, -0.014164662919938564, 0.01813078299164772, 0.05087607726454735, -0.03073231689631939, -0.01117362454533577, -0.024793339893221855, 0.011080480180680752, 0.03301839530467987, -0.02559303306043148, 0.01568470150232315, -0.0017694972921162844, -0.06241155043244362, -0.022098662331700325, -0.023538991808891296, 0.03083539381623268, -0.004562400747090578, -0.03581911697983742, 0.012175069190561771, 0.0004268718184903264, -0.04013646021485329, -0.006062677595764399, 0.0024971645325422287, -0.0033355329651385546, 6.804988224788071e-33, 0.015651414170861244, -0.03453299403190613, 0.009222842752933502, 0.050321441143751144, 0.004782740958034992, -0.03953010216355324, 0.038301732391119, -0.0002480423718225211, -0.030033571645617485, 0.03955570235848427, 0.002833291655406356, 0.004066943656653166, -0.021781044080853462, 0.03251238539814949, 0.10599355399608612, -0.018274081870913506, -0.0033134028781205416, -0.02288191393017769, 0.005410936661064625, 0.01741957850754261, -0.004927526693791151, 0.002899550599977374, -0.018816843628883362, 0.03573564067482948, 0.028752554208040237, 0.049006108194589615, 0.01784384623169899, 0.00913397129625082, 0.007644624449312687, 0.020354239270091057, 0.01715562306344509, 0.009429587982594967, -0.027057932689785957, -0.019920717924833298, -0.04758932814002037, 0.033338721841573715, 0.025647234171628952, 0.03929392620921135, 0.007533882278949022, 0.010061683133244514, 0.048190947622060776, -0.007856900803744793, 0.0015720478259027004, 0.02259824238717556, -0.0010686191963031888, 0.007024828810244799, -0.0072675407864153385, 0.013687278144061565, -0.0008706406224519014, -0.011593458242714405, -0.002563298447057605, -0.014609825797379017, 0.025039950385689735, -0.007672495674341917, -0.015231817960739136, -0.03135073184967041, -0.005561746656894684, 0.03764290362596512, -0.05465298146009445, -0.020403821021318436, -0.04038945958018303, -0.014119704253971577, -0.004423849750310183, -0.0010085169924423099, -0.025674810633063316, -0.032170917838811874, -0.04903342202305794, -0.03858532756567001, 0.01796363666653633, -0.026943331584334373, -0.009196709841489792, -0.02464742586016655, -0.026015078648924828, 0.01708679273724556, 0.004214111249893904, 0.03420092165470123, -0.04760637506842613, -0.03472975268959999, 0.011293476447463036, 0.022480038926005363, 0.003702356945723295, 0.009692507795989513, 0.02774789370596409, 0.010421019047498703, 0.004471347201615572, -0.04142369329929352, -0.024675991386175156, 0.040181875228881836, 0.04731987044215202, -0.019314538687467575, 0.0016334176762029529, 0.008182782679796219, 0.013620881363749504, 0.002634870819747448, -0.0019297339022159576, -1.2301689444882413e-8, -0.007196140009909868, -0.012565500102937222, -0.0034988517872989178, 0.047637939453125, -0.024777904152870178, 0.0038171145133674145, -0.02284201979637146, 0.014417794533073902, 0.008797755464911461, -0.02062699943780899, 0.03460429236292839, -0.020364506170153618, -0.03902895748615265, 0.01504883449524641, 0.003999488428235054, -0.0238060150295496, 0.000206879383767955, 0.016564199700951576, 0.009461617097258568, -0.02811315841972828, -0.019571909680962563, 0.026371851563453674, 0.0013701585121452808, -0.01005243044346571, 0.0016174116171896458, -0.0075132292695343494, 0.060345448553562164, -0.071296326816082, -0.026637990027666092, 0.026348726823925972, 0.03748074546456337, -0.052003733813762665, -0.06312692910432816, 0.029457511380314827, -0.011769245378673077, -0.03494088724255562, 0.021291548386216164, 0.0326010063290596, 0.06289541721343994, -0.008134582079946995, 0.019991081207990646, 0.017974242568016052, -0.014707908034324646, -0.02875819243490696, -0.03210130333900452, 0.006738197058439255, -0.034055523574352264, 0.007436533458530903, 0.019542613998055458, 0.02261337637901306, -0.0006335172220133245, 0.009550693444907665, -0.03239324316382408, 0.03969581797719002, 0.009647375904023647, -0.0055610002018511295, -0.03273283317685127, -0.04933794587850571, -0.033105943351984024, -0.012949496507644653, 0.003472178243100643, 0.00703419977799058, -0.003561545629054308, -0.03712461516261101 ]
gpt4all-langchain-unexpected-keyword-ggml_model
https://markhneedham.com/blog/2023/06/22/gpt4all-langchain-unexpected-keyword-ggml_model
false
2023-06-22 02:44:37
Chroma/LangChain: 'NoneType' object has no attribute 'info'
[ "chroma", "chromadb", "langchain", "til", "generative-ai" ]
[ "TIL" ]
Following on from https://www.markhneedham.com/blog/2023/06/21/chroma-index-not-found-create-instance-querying/[a blog post that I wrote yesterday^] about doing similarity search with ChromaDB, I noticed an odd error message being printed as the script was exiting. In this blog post, we'll explore what was going on. To recap, I have the following code to find chunks of YouTube transcripts that are most similar to an input query: .test_chroma.py [source, python] ---- from langchain.embeddings import HuggingFaceEmbeddings from langchain.vectorstores import Chroma hf_embeddings = HuggingFaceEmbeddings(model_name='sentence-transformers/all-MiniLM-L6-v2') store = Chroma(collection_name="transcript", persist_directory="db", embedding_function=hf_embeddings) result = store.similarity_search("Who is Tim Berglund?", top_n=2) for row in result: print(row) ---- When I run this script by typing `python test_chroma.py`, after the similar documents are printed, I get the following exception: .Output [source, text] ---- Exception ignored in: <function PersistentDuckDB.__del__ at 0x2abfe39c0> Traceback (most recent call last): File "/Users/markhneedham/projects/docs-bot/env/lib/python3.11/site-packages/chromadb/db/duckdb.py", line 445, in __del__ AttributeError: 'NoneType' object has no attribute 'info' ---- I came across the following https://github.com/chroma-core/chroma/issues/364[GitHub thread^] that was discussing the issue and one suggested fix was to set `store = None` at the end of the script: [source, python] ---- store = None ---- This did indeed work, but further down the thread it was suggested that the bug is fixed in the latest version of Chroma. I checked my version: [source, bash] ---- pip freeze | grep chroma ---- .Output [source, text] ---- chromadb==0.3.21 ---- A https://pypi.org/project/chromadb/[quick check on PyPi^] revealed that the latest version is actually 0.3.26, so let's update our version: [source, bash] ---- pip install --upgrade chromadb ---- Let's check our version: [source, bash] ---- pip freeze | grep chroma ---- .Output [source, text] ---- chromadb==0.3.26 ---- If I delete the `store = None` line and re-run the script again, the issue has been fixed and I don't get an error message.
In this post we'll learn about an error message when using the Chroma database.
uploads/2023/06/chroma-nonetype-banner.png
[ -0.005906309466809034, -0.006964352913200855, -0.013746364042162895, 0.03338699787855148, 0.08602949231863022, 0.02653144672513008, 0.004636713303625584, 0.04436198249459267, -0.0015353017952293158, -0.01397113036364317, -0.031497225165367126, 0.0019375947304069996, -0.08792028576135635, 0.026225000619888306, -0.017511563375592232, 0.08828286826610565, 0.09065382182598114, 0.018321679905056953, 0.048912450671195984, 0.003806460415944457, 0.02326243184506893, 0.06199914589524269, -0.014259359799325466, 0.024124382063746452, 0.0198178980499506, 0.010862420313060284, 0.0027410073671489954, 0.014429883100092411, -0.07343872636556625, 0.004738178104162216, 0.023317422717809677, -0.0023571683559566736, 0.02413990907371044, -0.03331974521279335, 0.06212977319955826, 0.02734803780913353, -0.03818933665752411, 0.03810890018939972, 0.00945200864225626, 0.02914200723171234, -0.07436127960681915, 0.01272529736161232, -0.0347149632871151, 0.02275284007191658, -0.039382800459861755, 0.03949051350355148, -0.04970855265855789, 0.0214498583227396, 0.032522283494472504, 0.009273526258766651, -0.059873081743717194, 0.04002554714679718, -0.006359182298183441, -0.009692752733826637, -0.007234947755932808, 0.06390652060508728, 0.02162734977900982, -0.0949857234954834, 0.028530467301607132, -0.03024320863187313, 0.004058058839291334, -0.019373096525669098, -0.020423023030161858, 0.039546020328998566, 0.006543552968651056, 0.0000347281493304763, -0.01130731776356697, 0.056147489696741104, -0.05419130250811577, -0.01319630816578865, 0.02472355030477047, 0.009048533625900745, -0.026914501562714577, 0.009995752945542336, -0.008373253978788853, -0.018522627651691437, -0.03366760164499283, 0.03077060915529728, 0.03595416247844696, 0.05768785625696182, -0.016257235780358315, 0.004428165033459663, 0.04661765322089195, 0.041591838002204895, -0.014277509413659573, -0.020045654848217964, -0.04271390289068222, -0.031214023008942604, -0.050093814730644226, 0.012788155116140842, -0.009928509593009949, -0.05684390291571617, 0.012721188366413116, 0.03191833943128586, -0.03445990011096001, -0.017311353236436844, 0.013570941053330898, 0.004619018640369177, -0.0076111736707389355, -0.027878865599632263, -0.06311236321926117, -0.008406801149249077, 0.004545378033071756, 0.024056509137153625, -0.08182551711797714, -0.005606684368103743, -0.028149083256721497, -0.024899648502469063, 0.0019672554917633533, 0.007638209033757448, -0.03891715407371521, 0.03831581398844719, -0.0054805646650493145, -0.008855725638568401, -0.08998633921146393, 0.07453092187643051, 0.006145476829260588, -0.028448818251490593, -0.010701505467295647, 0.020322469994425774, 0.04647771269083023, 0.04506197199225426, 0.011637349613010883, 0.07865501940250397, -0.008165129460394382, 0.049493055790662766, 0.002261999063193798, 0.041723910719156265, -0.02030530385673046, -0.054334770888090134, 0.0024915148969739676, 0.05565512925386429, -0.014853482134640217, 0.026204809546470642, 0.0010155716445297003, -0.007534688338637352, -0.03700539469718933, -0.007157735992223024, 0.061527736485004425, 0.0334506593644619, 0.025700317695736885, -0.0303366556763649, -0.008603399619460106, 0.009962084703147411, 0.03433625400066376, -0.002963681472465396, -0.011962010525166988, -0.03630310297012329, -0.04709651321172714, 0.011245337314903736, -0.0004014340811409056, 0.015474545769393444, 0.05898989737033844, -0.04366453364491463, 0.021394073963165283, 0.07816921919584274, 0.01532081887125969, 0.022681664675474167, -0.01089050155133009, 0.018337925896048546, 0.03465506061911583, 0.03839883208274841, -0.03296348452568054, 0.04757722094655037, -0.0029440007638186216, -0.004859871231019497, -0.010576125234365463, 0.049295198172330856, -0.010979153215885162, -0.0047478084452450275, -0.06099482253193855, -0.06963950395584106, 0.07140404731035233, -0.01811605505645275, -0.028003936633467674, 0.0355071984231472, 0.09319298714399338, 0.063682921230793, 0.01680653914809227, 0.01191443670541048, -0.07335664331912994, 0.047719717025756836, -0.0012988406233489513, 0.016897983849048615, 0.015039373189210892, -0.01266452670097351, 0.08241666853427887, 0.010750634595751762, -0.010474370792508125, 0.042365312576293945, -0.08119051158428192, -0.07106334716081619, -0.029330691322684288, 0.0000372735048586037, 0.05626373738050461, -0.04294712096452713, -0.010287954472005367, 0.05251127481460571, 0.022290952503681183, 0.04876626655459404, -0.0256345272064209, -0.00318289827555418, -0.025102125480771065, -0.03546637296676636, -0.06600846350193024, 0.02171684056520462, 0.038848623633384705, -0.0022868046071380377, -0.03221882879734039, -0.003858671523630619, 0.014099800027906895, 0.01925613172352314, 0.00558097381144762, -0.029437221586704254, 0.046657495200634, 0.032518740743398666, 0.04624643921852112, -0.03533168509602547, 0.03381530940532684, -0.042625054717063904, 0.017320973798632622, -0.010743712075054646, -0.027151037007570267, -0.011492610909044743, -0.008462733589112759, 0.12717625498771667, 0.0549788624048233, -0.039464596658945084, -0.06523223966360092, 0.03378606215119362, 0.0033566011115908623, -0.04846564680337906, -0.007203149143606424, -0.03381860628724098, -0.04623841121792793, -0.001037841895595193, -0.03846548870205879, -0.03079341910779476, 0.014005916193127632, -0.03996375575661659, -0.009342506527900696, 0.0537315234541893, -0.025790799409151077, 0.038649782538414, -0.005635618697851896, -0.015494265593588352, 0.00495065376162529, 0.007037847302854061, -0.0575895756483078, 0.0014411885058507323, 0.017380062490701675, 0.00310124340467155, 0.01796492002904415, -0.04013702645897865, -0.024456586688756943, -0.018399624153971672, -0.05084088817238808, 0.02807055599987507, 0.05064524710178375, 0.05843845382332802, 0.002591616241261363, 0.05325797200202942, -0.02122470550239086, 0.013782192952930927, -0.021494416519999504, -0.04276593029499054, -0.04378310590982437, -0.015449044294655323, 0.006566551048308611, 0.05390353500843048, 0.009539440274238586, 0.03871442377567291, -0.017892424017190933, -0.006410669069737196, 0.016608307138085365, 0.02635852061212063, 0.04139973595738411, -0.018141116946935654, 0.007810437586158514, -0.01689244620501995, -0.009116046130657196, 0.04488110914826393, -0.05478144809603691, -0.03322898596525192, 0.009896433912217617, -0.06620676815509796, -0.006729512009769678, -0.04392293840646744, -0.041317425668239594, 0.03928013890981674, 0.0126859862357378, 0.06231534108519554, 0.0015505499904975295, 0.0016527710249647498, 0.054145462810993195, 0.022527258843183517, 0.017584634944796562, 0.022664379328489304, 0.00023632944794371724, 0.04279308393597603, -0.01354912482202053, -0.0011502798879519105, 0.048600923269987106, -0.008012056350708008, -0.00577550521120429, -0.04236661642789841, 0.021081209182739258, -0.03494678810238838, -0.2933351993560791, 0.019347935914993286, 0.011902812868356705, -0.007221455220133066, 0.024600554257631302, -0.018066847696900368, -0.02011200599372387, -0.03852140158414841, -0.0053153024055063725, 0.018035294488072395, -0.027680529281497, -0.03046966902911663, -0.04261970520019531, 0.050545018166303635, 0.008687452413141727, 0.01648886315524578, -0.016237519681453705, -0.005590044893324375, 0.011143871583044529, 0.050641980022192, -0.017278194427490234, -0.04116914048790932, -0.023682333528995514, 0.04564227908849716, 0.006597692146897316, 0.024485820904374123, -0.07448510825634003, 0.017128659412264824, -0.04902014881372452, -0.0393703430891037, 0.03442823886871338, -0.012671500444412231, -0.02483782172203064, 0.0025165919214487076, -0.009938405826687813, -0.018643217161297798, 0.025786686688661575, -0.013818811625242233, -0.014594548381865025, 0.0321514867246151, -0.029007624834775925, -0.025800088420510292, -0.013346142135560513, 0.005339959170669317, 0.06613538414239883, -0.010715259239077568, -0.07592545449733734, 0.01312923338264227, -0.031124981120228767, 0.06520799547433853, -0.039971206337213516, -0.051436543464660645, -0.026501376181840897, 0.04602653905749321, 0.003261442296206951, 0.015920346602797508, -0.01354458462446928, -0.02905486524105072, -0.029135476797819138, -0.026637762784957886, -0.008992576971650124, -0.0513879731297493, -0.03897884115576744, -0.05887381359934807, -0.020359961315989494, -0.05873173847794533, -0.03528061509132385, -0.0301071647554636, 0.061706773936748505, 0.04721136763691902, -0.056223489344120026, 0.013071984983980656, -0.022345077246427536, -0.11287993937730789, 0.002562606241554022, -0.03517400473356247, -0.019076013937592506, -0.0002195078122895211, -0.002514768159016967, 0.03543274849653244, -0.026760831475257874, -0.06975529342889786, 0.03864233195781708, -0.015610252507030964, 0.004432498477399349, -0.021620778366923332, 0.02393539994955063, -0.016093390062451363, -0.007287916727364063, -0.0159581508487463, 0.04455135017633438, -0.036890238523483276, -0.03904406353831291, -0.027498964220285416, -0.03133226931095123, 0.002577459206804633, 0.010833756998181343, 0.0024977491702884436, 0.014094682410359383, 0.0618092343211174, 0.011087778955698013, -0.07068555802106857, -0.004058468621224165, -0.038593973964452744, -0.020318206399679184, -0.0011088406899943948, -0.04757531359791756, 0.0022241403348743916, 0.025614585727453232, 0.026026207953691483, -0.018479736521840096, -0.026711370795965195, 0.020779654383659363, -0.031149841845035553, -0.0002933898940682411, -0.023380642756819725, 0.03530061990022659, 0.01948646642267704, -0.0013638465898111463, -0.025046128779649734, -0.049333494156599045, 0.009674054570496082, -0.00070693384623155, 0.0009718546061776578, -0.05695103853940964, -0.008636214770376682, 0.000601026404183358, -0.001205723499879241, 0.01812979392707348, 0.011675305664539337, -0.0011870920425280929, 0.004815048072487116, 0.011512757278978825, -0.007962467148900032, 0.0550013892352581, -0.06345079839229584, -0.030511261895298958, -0.007934524677693844, 0.011575575917959213, 0.011147000826895237, 0.0072349137626588345, -0.017498264089226723, 0.010476985014975071, 0.043137937784194946, 0.06741068512201309, 0.006786743178963661, 0.047220975160598755, 0.004115820862352848, 0.0026961867697536945, 0.020498866215348244, 0.03715268149971962, -0.05769963189959526, 0.035376664251089096, -0.02175157703459263, -0.041456859558820724, 0.0011893060291185975, 0.026268240064382553, 0.029498962685465813, -0.01642139069736004, -0.049944404512643814, 0.04253050684928894, -0.02369423769414425, 0.0009872812079265714, 0.008097968064248562, -0.005380016751587391, 0.015861639752984047, 0.0035841770004481077, 0.046027541160583496, -0.0004101888043805957, -0.008790533989667892, -0.029867444187402725, 0.019474010914564133, -0.03380176052451134, 0.00330199021846056, 0.01578984223306179, 0.014113537035882473, 0.006298813037574291, 0.026356911286711693, 0.012337500229477882, 0.030849458649754524, -0.005728196352720261, -0.034002188593149185, 0.02326759323477745, 0.022904053330421448, 0.042911916971206665, 0.004935723263770342, -0.012895699590444565, -0.01996907778084278, 0.0014693917473778129, -0.046151500195264816, -0.03267025575041771, 0.013992059044539928, -0.014145933091640472, -0.01771104335784912, -0.012446526437997818, -0.07615318149328232, 0.03250524774193764, -0.00873712357133627, 0.02330338954925537, -0.007594226859509945, -0.02861586958169937, 0.023428505286574364, -0.05373562499880791, 0.04579588398337364, 0.04891114681959152, -0.0557628832757473, 0.009903661906719208, -0.013822302222251892, -0.04123830795288086, -0.003597650909796357, 0.03232225775718689, -0.038219500333070755, -0.04587525129318237, -0.012064946815371513, 0.008804848417639732, -0.014561077579855919, -0.01574581488966942, -0.016446299850940704, 0.03995366767048836, -0.007135012187063694, 0.0015610988484695554, -0.02017269842326641, 0.0069421264342963696, 0.012145085260272026, -0.01015691552311182, -0.0205531008541584, -0.013135961256921291, 0.015907736495137215, 0.012624647468328476, 0.00008734008588362485, 0.04326947405934334, -0.03895764425396919, 0.05278263986110687, 0.0279534999281168, -0.01535077579319477, -0.013359804637730122, -0.056386370211839676, -0.0055908155627548695, 0.008406189270317554, 0.01963617652654648, 0.022428644821047783, -0.014130678027868271, -0.013466711156070232, 0.03465549647808075, -0.018391674384474754, 0.03576746955513954, -0.012192931957542896, -0.03476717323064804, 0.008336865343153477, 0.04535085707902908, 0.00573014747351408, 0.03434193134307861, -0.017521943897008896, -0.030890047550201416, 0.04020290821790695, -0.03556853532791138, -0.012863914482295513, -0.02726726233959198, -0.049537088721990585, 0.05098196491599083, 0.012027280405163765, 0.01949206180870533, -0.055358562618494034, 0.04273892566561699, 0.0213179849088192, 0.029782116413116455, 0.04024654999375343, 0.010300342924892902, 0.03568745031952858, -0.03521493449807167, -0.008237825706601143, -0.06624391674995422, 0.002344538224861026, 0.04507743567228317, 0.003722204826772213, 0.008852499537169933, -0.002697833813726902, -0.0400436706840992, 0.010894336737692356, -0.06396681070327759, -0.03483527526259422, 0.0289367213845253, -0.015029346570372581, 0.015915032476186752, 0.032558076083660126, -0.03884581848978996, 0.028678303584456444, 0.0371541902422905, -0.017376383766531944, -0.047306183725595474, -0.011629436165094376, 0.0724911168217659, 0.009741230867803097, 0.02416601963341236, -0.018221015110611916, 0.0011595343239605427, 0.07353139668703079, 0.005406899843364954, 0.033063553273677826, 0.028157908469438553, 0.00646660290658474, 0.031214768067002296, 0.06751187145709991, -0.013658714480698109, 0.02740204706788063, 0.03228474780917168, -0.025922343134880066, -0.07059186697006226, 0.02895098552107811, 0.02334011346101761, 0.004576178267598152, -0.030126061290502548, 0.05124145746231079, 0.020127054303884506, -0.03668574243783951, -0.03740423917770386, 0.017702220007777214, -0.04512228071689606, -0.00010709033813327551, -0.050225116312503815, -0.01540691964328289, -0.03149436414241791, 0.05800909548997879, 0.0049415999092161655, 0.015495969913899899, 0.06801087409257889, -0.000014965802620281465, 0.033594757318496704, 0.022557087242603302, 0.06952426582574844, 0.07390888780355453, 0.032136689871549606, 0.028110025450587273, 0.05173797160387039, -0.033576320856809616, -0.030624160543084145, 0.009475279599428177, -0.03143143653869629, -0.019366050139069557, -0.030463652685284615, 0.00565492594614625, 0.07087435573339462, -0.012115463614463806, 0.0694773867726326, -0.011646720580756664, 0.0015578593593090773, -0.026639128103852272, 0.003352962899953127, 0.025245117023587227, 0.04911870136857033, -0.006476148497313261, 0.02283366583287716, -0.03748726472258568, -0.027885206043720245, 0.020475799217820168, 0.005343511700630188, -0.0066683473996818066, 0.024400942027568817, -0.004748629871755838, 0.03518185392022133, -0.013117298483848572, 0.038811832666397095, 0.07212547212839127, -0.006325910333544016, -0.025939660146832466, -0.013096557930111885, 0.014982255175709724, 0.011865141801536083, 0.05936398729681969, -0.030960526317358017, -0.03254411369562149, 0.0036736815236508846, -0.06157616153359413, 0.010233983397483826, -0.026772409677505493, -0.06161070615053177, 0.044512100517749786, -0.044806480407714844, -0.027166031301021576, 0.030638089403510094, 0.005625562742352486, -0.059935588389635086, -0.02679549902677536, -0.04231478273868561, -0.03438406065106392, -0.048705749213695526, -0.024709004908800125, 0.0026779386680573225, -0.010563268326222897, -0.03879280760884285, -0.03991749510169029, -0.021637219935655594, 0.0034644801635295153, 0.02236715704202652, -0.060389820486307144, -0.021929027512669563, 0.01727510243654251, 0.03194088488817215, -0.0015675212489441037, 0.027994947507977486, 0.06804850697517395, 0.012405270710587502, -0.02621345780789852, 0.02500913292169571, 0.020326856523752213, 0.024787835776805878, -0.018508857116103172, 0.006191022228449583, -0.08825258910655975, 0.010173427872359753, -0.010666335932910442, -0.010442319326102734, -0.06443016231060028, 0.0052733104676008224, 0.06816686689853668, -0.031959179788827896, 0.056482210755348206, -0.011700809001922607, 0.004032428376376629, -0.04411804676055908, -0.026066068559885025, -0.023836649954319, 0.009734747931361198, 0.04506842419505119, 0.0006022764137014747, 0.06667812168598175, 0.039402835071086884, 0.003128036390990019, -0.016478292644023895, -0.018817482516169548, -0.02232438512146473, 0.027012363076210022, -0.03963183984160423, -0.062261004000902176, -0.04789753630757332, -0.0703800693154335, -0.037093911319971085, 0.03318915516138077, -0.02099412865936756, -0.03409203514456749, 0.016248011961579323, 0.03205380216240883, -0.006728554610162973, 0.05115634202957153, -0.05078931525349617, -0.007268724497407675, -0.03505096584558487, -0.01591639593243599, -0.02491631917655468, 0.024835150688886642, 0.0009019370190799236, -0.02350567653775215, 0.030644111335277557, -0.04566096514463425, 0.018062448129057884, -0.0068972171284258366, 0.009555848315358162, 0.04852740094065666, -0.013791305013000965, -0.0047997706569731236 ]
[ -0.11172918975353241, -0.004065411165356636, -0.05884339287877083, 0.0003932765102945268, 0.03493255749344826, -0.043033991008996964, -0.025302419438958168, 0.020603707060217857, 0.0037296400405466557, -0.0017324156360700727, 0.012978748418390751, -0.08024446666240692, 0.01187083125114441, -0.0007408235687762499, 0.058229751884937286, 0.00711115263402462, -0.016154974699020386, -0.041851114481687546, -0.0032259365543723106, 0.01233514305204153, -0.006029116455465555, -0.018873684108257294, -0.0014949236065149307, -0.021383129060268402, -0.010462476871907711, 0.07514529675245285, 0.017054902389645576, -0.01401421707123518, 0.02977265790104866, -0.2567100524902344, 0.0032684195321053267, -0.024248916655778885, 0.04861374571919441, -0.042289383709430695, 0.054221946746110916, 0.04696669429540634, 0.020820464938879013, 0.006350107491016388, 0.003296922892332077, 0.05957496166229248, 0.019359104335308075, 0.005028683692216873, -0.05117613822221756, -0.026509298011660576, 0.06461536139249802, 0.005736352875828743, -0.004536363296210766, -0.0071889604441821575, -0.013202263973653316, 0.0007525623077526689, -0.027849247679114342, -0.019305936992168427, -0.03311772644519806, -0.026694281026721, -0.02924337610602379, 0.040166325867176056, 0.036626044660806656, 0.08907997608184814, -0.008720002137124538, 0.03967415541410446, 0.05105563998222351, -0.02458883821964264, -0.12199273705482483, 0.10209167748689651, 0.0011774345766752958, 0.06800111383199692, -0.03844930976629257, -0.033406343311071396, -0.033280882984399796, 0.07055913656949997, -0.018969230353832245, -0.024240506812930107, -0.01033416111022234, 0.05566667392849922, 0.036231670528650284, -0.015306254848837852, 0.024628538638353348, 0.009570466354489326, 0.021262994036078453, -0.03744753450155258, -0.050391070544719696, -0.001880439231172204, -0.009020728059113026, -0.01676727458834648, -0.0013376461574807763, 0.027593905106186867, 0.0018343772972002625, 0.03052879124879837, -0.012211102992296219, 0.002411679830402136, 0.017407216131687164, -0.03595444932579994, 0.0695347860455513, 0.0011879268568009138, -0.09577128291130066, -0.0377919040620327, 0.010723438113927841, 0.008642204105854034, -0.006583033129572868, 0.4121818244457245, -0.0064201694913208485, 0.019728362560272217, 0.022065622732043266, 0.034827858209609985, 0.01853979006409645, -0.010690840892493725, 0.008188613690435886, -0.006265268661081791, 0.009618985466659069, -0.05156058445572853, 0.01819358952343464, -0.034559931606054306, 0.06402338296175003, -0.0741935446858406, -0.024833975359797478, -0.009038976393640041, 0.0048831189051270485, 0.015786604955792427, -0.01620289497077465, 0.02689240127801895, -0.047683265060186386, -0.041633132845163345, 0.047732964158058167, -0.00007052765431581065, 0.005281137302517891, 0.0546392984688282, 0.050750795751810074, 0.05970660224556923, 0.02941714972257614, -0.01582624576985836, 0.026345839723944664, -0.008603271096944809, -0.08086854219436646, 0.025413036346435547, -0.011224187910556793, 0.04172658547759056, 0.015935048460960388, -0.04635968059301376, 0.0012164051877334714, -0.028469271957874298, 0.02449210174381733, -0.062242500483989716, 0.03241388499736786, 0.06561876833438873, -0.08707357943058014, 0.10376234352588654, -0.021914929151535034, -0.007091347593814135, -0.04908834770321846, -0.010965087451040745, -0.023364925757050514, 0.04115764796733856, -0.0027810721658170223, -0.01454190257936716, -0.002213479718193412, 0.05230524390935898, 0.10179297626018524, 0.002391415648162365, -0.045226775109767914, -0.010886076837778091, -0.012216536328196526, -0.03165606036782265, -0.00867187138646841, 0.03980999439954758, 0.009114294312894344, -0.11647436022758484, 0.019620031118392944, 0.018828611820936203, 0.008776931092143059, -0.06399055570363998, 0.011934644542634487, 0.007139324676245451, -0.06396884471178055, 0.019377294927835464, 0.020186934620141983, -0.060618333518505096, -0.04539938271045685, 0.015442424453794956, 0.0657549574971199, 0.060413070023059845, -0.0025873188860714436, -0.002966908970847726, -0.01690523512661457, -0.0017398413037881255, -0.055693864822387695, -0.10188976675271988, -0.02293551154434681, -0.008182124234735966, 0.008455304428935051, -0.007047208026051521, -0.01980096660554409, -0.06068802252411842, -0.03289968520402908, 0.04402856528759003, -0.01449598278850317, -0.006827947683632374, 0.005906546954065561, -0.018983980640769005, 0.002729605184867978, -0.026789046823978424, 0.041284117847681046, 0.0793868899345398, -0.01016953680664301, 0.019260672852396965, -0.055300213396549225, 0.04859001561999321, 0.03739377483725548, -0.057660844177007675, 0.04504631087183952, -0.01477938424795866, -0.014593031257390976, -0.001524228835478425, -0.05478723347187042, 0.02153121307492256, -0.013512320816516876, -0.02739512361586094, 0.0021299952641129494, -0.005991786252707243, 0.04996936768293381, 0.029701486229896545, -0.03753004968166351, -0.06839681416749954, -0.048096101731061935, -0.3503342568874359, -0.03704211488366127, -0.03176502138376236, 0.03174291551113129, -0.040041159838438034, -0.0538024865090847, -0.00824680458754301, 0.036836400628089905, -0.009899490512907505, 0.034526314586400986, 0.051453910768032074, 0.011881777085363865, -0.008814261294901371, -0.0831335037946701, 0.006776703055948019, 0.03212413564324379, -0.0023072510957717896, 0.014648868702352047, -0.002072752919048071, 0.025127477943897247, 0.002032568445429206, -0.03602977469563484, -0.0013014932628720999, -0.03925791755318642, 0.006290939170867205, -0.027572890743613243, 0.1210370659828186, 0.0485355518758297, 0.03890812397003174, -0.061509549617767334, 0.03914240747690201, 0.03206338733434677, -0.046600453555583954, -0.08802302181720734, -0.005489072762429714, -0.0301861222833395, -0.009085921570658684, 0.011254444718360901, 0.03057255409657955, -0.03595846891403198, -0.04285058751702309, 0.027400385588407516, -0.010671836324036121, -0.024834701791405678, -0.03788416087627411, 0.006667055189609528, -0.010531668551266193, 0.004540896974503994, -0.03421907126903534, 0.08287835121154785, -0.03312603756785393, 0.024272559210658073, 0.03145357966423035, 0.04432561621069908, -0.024568947032094002, 0.01401014905422926, -0.04739859700202942, -0.024316899478435516, -0.0025641564279794693, 0.0026971627958118916, 0.0168536938726902, 0.004198618233203888, 0.06995754688978195, -0.0527832917869091, -0.017472123727202415, -0.023974057286977768, 0.03330448269844055, -0.004849850665777922, 0.05216701701283455, -0.019364478066563606, -0.01475907489657402, 0.1194748654961586, -0.023930199444293976, 0.04608091711997986, 0.007483855355530977, 0.051341887563467026, -0.006067685782909393, -0.024001650512218475, -0.015465250238776207, 0.014327004551887512, 0.01307888887822628, -0.024379320442676544, 0.07001760601997375, -0.04541666805744171, 0.01819493994116783, 0.04935493692755699, 0.021249838173389435, -0.010193483904004097, 0.07895640283823013, -0.006955784745514393, 0.005854216869920492, -0.036854855716228485, -0.023610524833202362, -0.036676276475191116, 0.0448615700006485, -0.01771470531821251, -0.23780030012130737, 0.005809127353131771, 0.037364110350608826, 0.022090177983045578, 0.024374650791287422, 0.022498948499560356, 0.02534220740199089, -0.07490609586238861, 0.022826863452792168, -0.017714520916342735, 0.02373715117573738, 0.03943200781941414, 0.015278908424079418, -0.03383263945579529, -0.036359675228595734, 0.03146078437566757, 0.04071526974439621, 0.0012520583113655448, 0.027657225728034973, -0.0012081956956535578, 0.02266080118715763, -0.023983972147107124, 0.15953893959522247, 0.007221352308988571, -0.01397114247083664, -0.049661558121442795, 0.009390649385750294, 0.01413621287792921, 0.060206569731235504, 0.02226799540221691, -0.014981782995164394, 0.019659606739878654, 0.0874655693769455, 0.00634530745446682, 0.02814214490354061, -0.035790398716926575, 0.018769139423966408, 0.028254196047782898, 0.008480257354676723, -0.01912744902074337, -0.007243012078106403, 0.00030008016619831324, -0.04287220165133476, 0.04077226296067238, 0.03625836223363876, 0.02061966247856617, 0.004975155461579561, -0.016597088426351547, -0.05656562000513077, -0.008490203879773617, -0.025471342727541924, -0.01757221855223179, -0.01260110642760992, -0.009803217835724354, 0.018035762012004852, 0.07414074242115021, -0.016591835767030716, 0.014658642932772636, 0.0034962380304932594, -0.009342201054096222, -0.006777515634894371, -0.019369201734662056, 0.10701493918895721, 0.031068509444594383, 0.021909460425376892 ]
[ -0.023338239639997482, 0.003962004091590643, -0.03285275772213936, 0.02967451885342598, -0.0010287781478837132, 0.046113789081573486, -0.016471093520522118, 0.04926445335149765, -0.03138445317745209, -0.038709115236997604, -0.021792294457554817, -0.0071855578571558, 0.03694642335176468, -0.031013881787657738, -0.00815463438630104, 0.010398666374385357, -0.02216741442680359, -0.01587645895779133, 0.023530809208750725, -0.010736579075455666, -0.04577993229031563, 0.013042369857430458, 0.022399241104722023, 0.010326755233108997, -0.0163410734385252, 0.010991348884999752, -0.07621704041957855, -0.009845566935837269, 0.0548681803047657, -0.11341137439012527, -0.009794955141842365, -0.007122053299099207, 0.012248429469764233, 0.020073601976037025, 0.026441341266036034, 0.0603538416326046, -0.01314473059028387, -0.04278302565217018, -0.03333378583192825, -0.004177086055278778, 0.019772596657276154, 0.01272102165967226, -0.045267798006534576, 0.021631363779306412, -0.03888803347945213, -0.0507412888109684, -0.04154634475708008, 0.01362074539065361, -0.01526100654155016, -0.028951821848750114, -0.047599274665117264, 0.013653761707246304, -0.004273968283087015, 0.021845094859600067, -0.02217842824757099, 0.04785332828760147, -0.003521725069731474, 0.005242304876446724, 0.06465485692024231, -0.013540098443627357, 0.00408489815890789, -0.002457395428791642, 0.008210217580199242, -0.018940532580018044, -0.006074297241866589, -0.020111994817852974, -0.00453862315043807, -0.0016164282569661736, 0.021670321002602577, 0.015584667213261127, -0.026103319600224495, 0.03971283510327339, -0.07083219289779663, -0.01221601665019989, 0.010676463134586811, -0.033742133527994156, 0.037149857729673386, -0.03510142117738724, -0.024472035467624664, 0.006222587078809738, -0.04155127331614494, -0.011492903344333172, 0.009280864149332047, 0.00036472821375355124, 0.010313541628420353, -0.03866954147815704, -0.010914991609752178, -0.01239018514752388, 0.0032741264440119267, -0.0018041810253635049, -0.022663559764623642, 0.014657380059361458, 0.00035294421832077205, 0.007340089417994022, -0.096318818628788, -0.004996313713490963, 0.012437270022928715, -0.0006205211393535137, -0.010394380427896976, 0.8338413238525391, 0.023522473871707916, 0.0055496771819889545, 0.02129402384161949, -0.007937743328511715, 0.020508233457803726, -0.017559921368956566, -0.02310890331864357, -0.009962022304534912, -0.002986499108374119, -0.02846417762339115, -0.0071909017860889435, 0.006284484174102545, 0.028257975354790688, 0.012853270396590233, 0.03206563740968704, 0.019185995683073997, 0.022103462368249893, -0.018937822431325912, 0.00664861686527729, 0.05738968402147293, 0.029759127646684647, -0.00280884001404047, 0.0034092178102582693, -0.02157721109688282, -0.0070315152406692505, -0.16929379105567932, 0.010410375893115997, -6.450961652415045e-33, 0.04001208394765854, -0.008223962970077991, 0.026467781513929367, -0.013712971471250057, 0.01282873097807169, 0.013635612092912197, -0.012815900146961212, 0.04706171900033951, -0.03008688986301422, -0.01809159480035305, 0.015540817752480507, 0.016050511971116066, -0.022360909730196, -0.024303019046783447, 0.02326928824186325, 0.005707149859517813, -0.013942934572696686, 0.046884313225746155, 0.015332020819187164, 0.004268687684088945, 0.013021324761211872, 0.05351916328072548, 0.02803225629031658, 0.007644541561603546, -0.0414997898042202, -0.00040647562127560377, 0.02534770965576172, -0.01299101859331131, -0.002536370186135173, -0.04897136241197586, -0.05879645794630051, -0.011136172339320183, 0.006707408931106329, -0.04227747395634651, -0.014333702623844147, -0.0494360625743866, -0.04228910431265831, -0.002606573747470975, -0.0648929551243782, -0.013490774668753147, -0.020952343940734863, 0.015530168078839779, -0.04235886409878731, -0.04270053282380104, -0.017023468390107155, -0.0017680368619039655, 0.011846286244690418, 0.00800788402557373, -0.010950845666229725, 0.02500402182340622, 0.023312607780098915, 0.014170946553349495, -0.010771499015390873, 0.0012951265089213848, 0.015902170911431313, 0.007521515712141991, 0.014206445775926113, -0.010225757956504822, 0.020975923165678978, -0.009821421466767788, 0.022418411448597908, -0.040305305272340775, 0.0223768949508667, 0.028991952538490295, 0.019140440970659256, -0.055000994354486465, 0.023381518200039864, 0.0027241145726293325, -0.002636226825416088, 0.005566852632910013, -0.041939638555049896, -0.0008579468703828752, -0.014436239376664162, -0.023048384115099907, 0.06029120087623596, -0.04729422926902771, -0.0066321734338998795, -0.02178007736802101, 0.028691677376627922, 0.036634933203458786, 0.016913285478949547, -0.027840416878461838, 0.020438959822058678, -0.04853202402591705, -0.0462656170129776, -0.045689888298511505, 0.04446053504943848, -0.011869583278894424, -0.010252993553876877, 0.004811557941138744, 0.03135458379983902, 0.04325772449374199, 0.028146831318736076, -0.034238602966070175, -0.001584826153703034, 6.548656253227917e-33, -0.027836117893457413, -0.006632523145526648, -0.010754793882369995, -0.005900957155972719, 0.009736720472574234, -0.004160987213253975, 0.029231984168291092, 0.05100196599960327, -0.028316587209701538, 0.025859786197543144, -0.022789467126131058, -0.022947808727622032, -0.031207244843244553, 0.02841200679540634, 0.03944263607263565, 0.03658184036612511, 0.014567211270332336, 0.005071083549410105, 0.0026096031069755554, 0.0026620333082973957, -0.008816351182758808, -0.00005016175055061467, -0.005842139478772879, 0.07418685406446457, 0.012921028770506382, 0.04466216266155243, -0.016113294288516045, -0.009298876859247684, 0.002893836237490177, 0.007350360043346882, 0.0038827103562653065, -0.005399222951382399, -0.0194197129458189, 0.012623467482626438, -0.01586095057427883, 0.0036277074832469225, 0.002604131121188402, -0.0016375996638089418, 0.025948191061615944, -0.008655314333736897, 0.016032544896006584, 0.05028507113456726, -0.015375984832644463, 0.023979363963007927, -0.007019635755568743, 0.023400316014885902, 0.002847245428711176, 0.0035015081521123648, 0.0022447716910392046, 0.00520107289776206, -0.010909968987107277, 0.02782464027404785, 0.030654199421405792, -0.008013756014406681, 0.019756343215703964, -0.023996595293283463, -0.03661361336708069, 0.020942922681570053, -0.014141623862087727, -0.012233540415763855, 0.0065765236504375935, -0.011420384980738163, -0.02744571678340435, -0.0009463083697482944, -0.03730471059679985, -0.029123902320861816, -0.01974518410861492, 0.025529146194458008, -0.017300890758633614, -0.014622505754232407, -0.01042601652443409, 0.012515338137745857, 0.02296198159456253, 0.04419229179620743, 0.012883267365396023, 0.031154466792941093, 0.010440297424793243, -0.036232005804777145, -0.009771842509508133, -0.0027524831239134073, 0.026064442470669746, 0.021128756925463676, 0.04318344220519066, -0.02157064713537693, -0.02966758981347084, -0.0031147790141403675, -0.016357693821191788, 0.015357800759375095, 0.03280895575881004, 0.013534617610275745, -0.006411499343812466, -0.01054177712649107, -0.014505612663924694, 0.005259343422949314, 0.029589643701910973, -1.2401509152937251e-8, -0.008714135736227036, -0.030402861535549164, -0.015137343667447567, 0.024729305878281593, 0.002367191482335329, -0.0009722206741571426, -0.03588595241308212, 0.009241290390491486, -0.0030937660485506058, 0.004529592581093311, 0.02708742581307888, -0.001491171307861805, 0.02312329411506653, 0.05382119491696358, 0.010237468406558037, -0.007818346843123436, 0.019227461889386177, -0.019668281078338623, 0.03454010933637619, -0.0005104950396344066, -0.020577091723680496, 0.059163786470890045, 0.027780922129750252, -0.017788957804441452, -0.007906336337327957, 0.0012653620215132833, 0.0351579450070858, -0.05159055441617966, -0.021905113011598587, -0.0000721691467333585, 0.015102173201739788, -0.014551118016242981, -0.05303869768977165, -0.021863117814064026, -0.005156844388693571, 0.01923060417175293, 0.03694281354546547, -0.0015308032743632793, -0.025646990165114403, -0.0032840860076248646, 0.007532497402280569, 0.0031072215642780066, -0.025255054235458374, -0.03469524532556534, 0.004639404360204935, -0.015261081978678703, -0.004356097895652056, 0.045119281858205795, 0.05146605148911476, -0.017915984615683556, 0.014278431423008442, -0.06707795709371567, -0.011043580248951912, 0.0061416830867528915, 0.05695882439613342, -0.01734575815498829, -0.03164079412817955, 0.0013906604144722223, -0.0014780870405957103, -0.031177397817373276, 0.018208127468824387, 0.025000007823109627, 0.0320802740752697, -0.01742166467010975 ]
chroma-nonetype-object-no-attribute-info
https://markhneedham.com/blog/2023/06/22/chroma-nonetype-object-no-attribute-info
false
2023-12-04 00:44:37
ClickHouse: Tuples - Code: 47. DB::Exception: Missing columns: while processing query:
[ "clickhouse", "til" ]
[ "TIL" ]
:icons: font I've been playing around with the https://www.markhneedham.com/blog/2023/11/15/clickhouse-summing-columns-remote-files/[Mid Journey Parquet metadata that I wrote about in my last blog post^] and struggled quite a bit to get the query to do what I wanted. Come along on a journey with me and we'll figure it out together. We're querying the metadata of a Parquet file that contains the metadata (I know!) of images created by the Mid Journey generative AI service. The following query gets us the columns: [source, sql] ---- FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT columns SETTINGS max_http_get_redirects=1 Format Vertical; ---- .Output [source, text] ---- Row 1: ────── columns: [('id','id',1,0,'BYTE_ARRAY','String','SNAPPY',23093988,13133418,'43.13%',['PLAIN','RLE','RLE_DICTIONARY']),('channel_id','channel_id',1,0,'BYTE_ARRAY','String','SNAPPY',112,116,'-3.571%',['PLAIN','RLE','RLE_DICTIONARY']),('content','content',1,0,'BYTE_ARRAY','String','SNAPPY',208657682,46191873,'77.86%',['PLAIN','RLE','RLE_DICTIONARY']),('timestamp','timestamp',1,0,'BYTE_ARRAY','String','SNAPPY',36052113,9046231,'74.91%',['PLAIN','RLE','RLE_DICTIONARY']),('image_id','image_id',1,0,'BYTE_ARRAY','String','SNAPPY',23093988,13118570,'43.19%',['PLAIN','RLE','RLE_DICTIONARY']),('height','height',1,0,'INT64','None','SNAPPY',915584,498549,'45.55%',['PLAIN','RLE','RLE_DICTIONARY']),('width','width',1,0,'INT64','None','SNAPPY',916607,496767,'45.8%',['PLAIN','RLE','RLE_DICTIONARY']),('url','url',1,0,'BYTE_ARRAY','String','SNAPPY',180090922,71430496,'60.34%',['PLAIN','RLE','RLE_DICTIONARY']),('size','size',1,0,'INT64','None','SNAPPY',8286381,5392260,'34.93%',['PLAIN','RLE','RLE_DICTIONARY'])] ---- This isn't that readable, but we can sort that out by using the `arrayJoin` function to pull each column out into its own row. The metadata about each column is stored in a tuple, so we're also going to use the `toTypeName` function to return the names of each element in the tuple: [source, sql] ---- FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT arrayJoin(columns) AS md, toTypeName(md) SETTINGS max_http_get_redirects=1 Format Vertical; ---- .Output [source, text] ---- Row 1: ────── md: ('id','id',1,0,'BYTE_ARRAY','String','SNAPPY',23093988,13133418,'43.13%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 2: ────── md: ('channel_id','channel_id',1,0,'BYTE_ARRAY','String','SNAPPY',112,116,'-3.571%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 3: ────── md: ('content','content',1,0,'BYTE_ARRAY','String','SNAPPY',208657682,46191873,'77.86%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 4: ────── md: ('timestamp','timestamp',1,0,'BYTE_ARRAY','String','SNAPPY',36052113,9046231,'74.91%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 5: ────── md: ('image_id','image_id',1,0,'BYTE_ARRAY','String','SNAPPY',23093988,13118570,'43.19%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 6: ────── md: ('height','height',1,0,'INT64','None','SNAPPY',915584,498549,'45.55%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 7: ────── md: ('width','width',1,0,'INT64','None','SNAPPY',916607,496767,'45.8%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 8: ────── md: ('url','url',1,0,'BYTE_ARRAY','String','SNAPPY',180090922,71430496,'60.34%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) Row 9: ─────── md: ('size','size',1,0,'INT64','None','SNAPPY',8286381,5392260,'34.93%',['PLAIN','RLE','RLE_DICTIONARY']) toTypeName(arrayJoin(columns)): Tuple(name String, path String, max_definition_level UInt64, max_repetition_level UInt64, physical_type String, logical_type String, compression String, total_uncompressed_size UInt64, total_compressed_size UInt64, space_saved String, encodings Array(String)) ---- We can explode these tuples so that each element in the tuple has its own column by using the `untuple` function: [source, sql] ---- FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT untuple(arrayJoin(columns)) AS md LIMIT 1 SETTINGS max_http_get_redirects=1 Format Vertical; ---- [source, text] ---- Row 1: ────── md.name: id md.path: id md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 23093988 md.total_compressed_size: 13133418 md.space_saved: 43.13% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] ---- So far, so good. But what about if we want to filter the data so that we say only return the columns that have a `logical_type` of `STRING`? I tried to do this in a few different ways: [source, sql] ---- FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT untuple(arrayJoin(columns)) AS md WHERE md.logical_type = 'STRING' SETTINGS max_http_get_redirects=1 Format Vertical; ---- .Output [source, text] ---- Received exception: Code: 47. DB::Exception: Missing columns: 'md.logical_type' while processing query: 'SELECT untuple(arrayJoin(columns)) AS md FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) WHERE md.logical_type = 'STRING' SETTINGS max_http_get_redirects = 1', required columns: 'md.logical_type' 'columns', maybe you meant: 'columns'. (UNKNOWN_IDENTIFIER) ---- [source, sql] ---- FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT untuple(arrayJoin(columns)) AS md WHERE "md.logical_type" = 'STRING' SETTINGS max_http_get_redirects=1 Format Vertical; ---- .Output [source, text] ---- Received exception: Code: 47. DB::Exception: Missing columns: 'md.logical_type' while processing query: 'SELECT untuple(arrayJoin(columns)) AS md FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) WHERE `md.logical_type` = 'STRING' SETTINGS max_http_get_redirects = 1', required columns: 'md.logical_type' 'columns', maybe you meant: 'columns'. (UNKNOWN_IDENTIFIER) ---- [source, sql] ---- WITH columns AS ( FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT untuple(arrayJoin(columns)) AS md SETTINGS max_http_get_redirects=1 ) FROM columns SELECT * WHERE "md.logical_type" = 'STRING' Format Vertical; ---- .Output [source, text] ---- Received exception: Code: 47. DB::Exception: Missing columns: 'md.logical_type' while processing query: 'SELECT untuple(arrayJoin(columns)) AS md FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) WHERE `md.logical_type` = 'STRING' SETTINGS max_http_get_redirects = 1', required columns: 'md.logical_type' 'columns', maybe you meant: 'columns'. (UNKNOWN_IDENTIFIER) ---- But no luck - it doesn't seem to recognise the columns created by the `untuple` function. So my next move was to try filtering on the tuple before I called `untuple`. [source, sql] ---- WITH columns AS ( FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT arrayJoin(columns) AS col SETTINGS max_http_get_redirects=1 ) FROM columns SELECT untuple(col) AS md WHERE col.'logical_type' = 'String' Format Vertical; ---- .Output [source, text] ---- Row 1: ────── md.name: id md.path: id md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 23093988 md.total_compressed_size: 13133418 md.space_saved: 43.13% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] Row 2: ────── md.name: channel_id md.path: channel_id md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 112 md.total_compressed_size: 116 md.space_saved: -3.571% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] Row 3: ────── md.name: content md.path: content md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 208657682 md.total_compressed_size: 46191873 md.space_saved: 77.86% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] Row 4: ────── md.name: timestamp md.path: timestamp md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 36052113 md.total_compressed_size: 9046231 md.space_saved: 74.91% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] Row 5: ────── md.name: image_id md.path: image_id md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 23093988 md.total_compressed_size: 13118570 md.space_saved: 43.19% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] Row 6: ────── md.name: url md.path: url md.max_definition_level: 1 md.max_repetition_level: 0 md.physical_type: BYTE_ARRAY md.logical_type: String md.compression: SNAPPY md.total_uncompressed_size: 180090922 md.total_compressed_size: 71430496 md.space_saved: 60.34% md.encodings: ['PLAIN','RLE','RLE_DICTIONARY'] ---- That's better. But let's say we only want to return a subset of the columns rather than all of them. We can do that by running the following query: [source, sql] ---- WITH columns AS ( FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) SELECT arrayJoin(columns) AS col SETTINGS max_http_get_redirects=1 ) FROM columns SELECT col.'name' AS name, col.'physical_type' AS physical_type, col.'logical_type' AS logical_type, col.'compression' AS compression WHERE col.'logical_type' = 'String'; ---- .Output [source, text] ---- ┌─name───────┬─physical_type─┬─logical_type─┬─compression─┐ │ id │ BYTE_ARRAY │ String │ SNAPPY │ │ channel_id │ BYTE_ARRAY │ String │ SNAPPY │ │ content │ BYTE_ARRAY │ String │ SNAPPY │ │ timestamp │ BYTE_ARRAY │ String │ SNAPPY │ │ image_id │ BYTE_ARRAY │ String │ SNAPPY │ │ url │ BYTE_ARRAY │ String │ SNAPPY │ └────────────┴───────────────┴──────────────┴─────────────┘ ---- Nice! Alternatively, we can use the `ARRAY JOIN` clause instead of the `arrayJoin` function, which I think is a better choice for this problem. [source, sql] ---- SELECT col.name, col.physical_type, col.logical_type, col.compression FROM url('https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet', ParquetMetadata) ARRAY JOIN columns AS col WHERE col.logical_type = 'String' SETTINGS max_http_get_redirects=1; ---- .Output [source, text] ---- ┌─col.name───┬─col.physical_type─┬─col.logical_type─┬─col.compression─┐ │ id │ BYTE_ARRAY │ String │ SNAPPY │ │ channel_id │ BYTE_ARRAY │ String │ SNAPPY │ │ content │ BYTE_ARRAY │ String │ SNAPPY │ │ timestamp │ BYTE_ARRAY │ String │ SNAPPY │ │ image_id │ BYTE_ARRAY │ String │ SNAPPY │ │ url │ BYTE_ARRAY │ String │ SNAPPY │ └────────────┴───────────────────┴──────────────────┴─────────────────┘ ----
In this post, we'll learn how to filter on tuples using ClickHouse.
uploads/2023/12/clickhouse-tuples.png
[ -0.001632970874197781, -0.001785792177543044, 0.013385002501308918, 0.04134441539645195, 0.08734691143035889, 0.01973867043852806, 0.03604105859994888, 0.03077002614736557, -0.014733606018126011, -0.02543013170361519, -0.020403575152158737, -0.023348623886704445, -0.07659213989973068, 0.022568706423044205, -0.027237964794039726, 0.10102161765098572, 0.07010316103696823, 0.017515698447823524, 0.03452982380986214, -0.0191014613956213, 0.035254426300525665, 0.04372017830610275, -0.000748978927731514, 0.030665380880236626, 0.004971245303750038, 0.019495682790875435, -0.0016198224620893598, -0.011084970086812973, -0.05156836658716202, -0.015557950362563133, 0.016221951693296432, -0.03015461005270481, 0.014154165983200073, 0.004828381352126598, 0.02447659522294998, -0.0003300630778539926, -0.01769319176673889, 0.008944444358348846, 0.016440052539110184, -0.0012481932062655687, -0.06803816556930542, 0.0224527046084404, 0.017355775460600853, 0.024604422971606255, -0.007500221021473408, 0.004816937725991011, -0.0734734758734703, 0.011837400496006012, -0.022885983809828758, -0.008235858753323555, -0.038641296327114105, 0.060682397335767746, -0.01189878024160862, -0.004761794116348028, -0.013023645617067814, 0.03729955852031708, 0.020126501098275185, -0.050447165966033936, 0.02196679636836052, -0.04211604595184326, -0.006554753985255957, 0.006600996013730764, 0.007323651574552059, 0.03292447701096535, 0.025564484298229218, -0.023556655272841454, 0.011319771409034729, 0.05792779102921486, -0.03992760181427002, -0.004163386765867472, -0.0015922829043120146, 0.005258430261164904, 0.0009209076524712145, -0.016367128118872643, 0.00772180687636137, -0.03758497163653374, -0.010691611096262932, 0.027134766802191734, 0.036385927349328995, 0.057408690452575684, -0.02846864052116871, 0.001715125166811049, 0.033245522528886795, 0.01698189228773117, 0.0035696271806955338, -0.06352207809686661, -0.0631113052368164, -0.010853374376893044, -0.04705513268709183, 0.05495550483465195, 0.0208878256380558, -0.06442302465438843, 0.012974042445421219, 0.03559974208474159, -0.005571488291025162, -0.005887789651751518, -0.01013164222240448, -0.014173748902976513, -0.012223541736602783, -0.007823551073670387, -0.04860377684235573, -0.011141820810735226, 0.03835791349411011, 0.02084043063223362, -0.08734292536973953, -0.013162022456526756, -0.07075424492359161, -0.02531897835433483, 0.022317521274089813, 0.021153630688786507, -0.016856631264090538, -0.012970538809895515, -0.012093368917703629, -0.0024391876067966223, -0.0658857449889183, 0.0687696635723114, 0.023760326206684113, -0.026286521926522255, 0.011591881513595581, 0.02712412364780903, 0.05095463618636131, 0.021592993289232254, -0.018940234556794167, 0.04803311452269554, 0.008478756062686443, 0.046949367970228195, 0.021411873400211334, 0.038259539753198624, -0.01699194498360157, -0.03045216016471386, -0.020323356613516808, 0.06669457256793976, 0.00016473711002618074, -0.002607898321002722, -0.003145784605294466, -0.015419816598296165, 0.005732884630560875, 0.01202129852026701, 0.0661400780081749, 0.022306425496935844, -0.0028955615125596523, -0.02910074219107628, -0.010598409920930862, 0.01492286752909422, 0.05569477379322052, 0.038521137088537216, 0.007286162115633488, -0.05931103229522705, -0.041314370930194855, 0.01785329356789589, 0.025000140070915222, 0.020815350115299225, 0.07223278284072876, -0.02186194621026516, 0.004146258812397718, 0.08928277343511581, 0.024101272225379944, -0.007749140728265047, -0.001652612816542387, -0.021259639412164688, 0.031009728088974953, 0.03246910497546196, 0.02761906199157238, 0.020373739302158356, 0.0024188177194446325, -0.01583419367671013, -0.00011269786773482338, 0.03441428020596504, -0.0099539365619421, -0.014166191220283508, -0.0480077788233757, -0.08521895110607147, 0.07043543457984924, -0.006124807987362146, -0.012391616590321064, 0.03307466208934784, 0.12314805388450623, 0.06379558891057968, 0.033714503049850464, 0.009060726501047611, -0.09736371785402298, 0.059567246586084366, -0.018273038789629936, -0.0036448652390390635, 0.03602425754070282, -0.011307971552014351, 0.06523675471544266, 0.011949854902923107, 0.0054012080654501915, 0.03328176960349083, -0.04752151295542717, -0.07334692031145096, -0.02907933108508587, -0.0417490191757679, 0.06612537056207657, -0.06405539065599442, 0.02426924742758274, 0.0446426086127758, 0.029793985188007355, 0.032190632075071335, -0.0055339401587843895, 0.023049505427479744, 0.012783387675881386, -0.04104895517230034, -0.04512176290154457, 0.02387973479926586, 0.0416678711771965, -0.004922591149806976, -0.025480827316641808, 0.019166355952620506, -0.03057735040783882, -0.0032420612405985594, 0.013857541605830193, 0.006554598920047283, 0.04476946219801903, -0.012957758270204067, 0.04308396205306053, -0.014876124449074268, 0.025424012914299965, -0.05870026722550392, 0.023081794381141663, 0.03399910032749176, -0.020689699798822403, -0.01734800450503826, -0.012527027167379856, 0.11825662851333618, 0.07252009212970734, -0.014565929770469666, -0.03877369686961174, 0.020624583587050438, 0.00835553091019392, -0.050929173827171326, 0.0036914751399308443, -0.044414881616830826, -0.03593726456165314, -0.0019314700039103627, -0.020298827439546585, -0.02921256609261036, -0.0016253944486379623, -0.04398422688245773, -0.013602059334516525, 0.05718756467103958, -0.002587726805359125, 0.02833474427461624, 0.02936653420329094, -0.04342353343963623, -0.009064808487892151, -0.02799917571246624, -0.06821916997432709, 0.008476050570607185, 0.0067061795853078365, -0.017923999577760696, 0.022452635690569878, -0.05420457571744919, -0.016299419105052948, -0.03965284302830696, -0.05601418390870094, 0.03499981015920639, 0.016099566593766212, 0.08977191895246506, -0.020092546939849854, 0.049268390983343124, -0.021102197468280792, -0.014830860309302807, -0.0329120010137558, -0.036519113928079605, -0.022165309637784958, -0.0034376592375338078, 0.037623241543769836, 0.012337181717157364, 0.02221083827316761, 0.04009662941098213, 0.015884598717093468, -0.013277051970362663, 0.007402021903544664, 0.007489039562642574, 0.030765365809202194, 0.0047086384147405624, 0.005291617941111326, -0.013387145474553108, -0.010717067867517471, 0.05781000852584839, -0.04122219607234001, -0.04036577045917511, 0.0009151219855993986, -0.062066685408353806, 0.03256462141871452, -0.05157143250107765, -0.023199783638119698, -0.0224458035081625, 0.02116202935576439, 0.033296775072813034, 0.005893573630601168, -0.007661509793251753, 0.04981635510921478, 0.014065171591937542, 0.00781243247911334, 0.019906988367438316, -0.0243337694555521, 0.03386371582746506, -0.0022476885933429003, 0.0003556650481186807, 0.057666976004838943, -0.0014606596669182181, 0.022775080054998398, -0.07178433984518051, -0.008139219135046005, -0.024163253605365753, -0.277424693107605, 0.03125777095556259, -0.015537848696112633, -0.027664557099342346, 0.01690557226538658, -0.006766205653548241, 0.0023430564906448126, -0.0193229541182518, -0.009697075933218002, 0.006227706093341112, -0.010789378546178341, -0.023288298398256302, -0.01445650216192007, 0.031357064843177795, 0.018642840906977654, 0.017318880185484886, -0.006576229352504015, -0.03544574975967407, -0.01167187187820673, 0.017309706658124924, 0.0070638107135891914, -0.06640422344207764, 0.020511223003268242, 0.051235541701316833, 0.03423060476779938, 0.04880921170115471, -0.05251428484916687, 0.00034844057518057525, -0.03097250871360302, -0.013387261889874935, 0.02791937254369259, -0.0225480105727911, 0.00204062950797379, -0.013823089189827442, -0.008310048840939999, -0.0015372748021036386, 0.04811248555779457, -0.015637846663594246, 0.025461865589022636, -0.005882102530449629, -0.02415050007402897, -0.012237104587256908, -0.00043548987014219165, -0.001137718209065497, 0.08708048611879349, -0.011091554537415504, -0.07664739340543747, 0.0008707749075256288, -0.019907072186470032, 0.06534474343061447, -0.03383450582623482, -0.03939604014158249, -0.04411398619413376, 0.032605692744255066, 0.0026465565897524357, -0.011540887877345085, -0.003218248253688216, -0.030496705323457718, -0.03846106305718422, -0.052105966955423355, 0.03539246320724487, -0.047695599496364594, -0.021788502112030983, -0.023221034556627274, -0.010308193042874336, -0.06746331602334976, -0.06534341722726822, -0.025103570893406868, 0.05824282765388489, 0.020441347733139992, -0.042924750596284866, -0.016383208334445953, 0.0011132159270346165, -0.11092980206012726, -0.02421388030052185, -0.0011495986254885793, -0.025826063007116318, 0.004505951888859272, -0.04435892403125763, 0.04154510796070099, -0.049526654183864594, -0.033510662615299225, 0.039525214582681656, 0.01545773446559906, 0.006473294459283352, -0.03764514997601509, 0.005467107053846121, 0.0037810748908668756, -0.01945072039961815, 0.010733449831604958, 0.04606106877326965, -0.06660312414169312, -0.013273851945996284, -0.006130100227892399, -0.01826128177344799, 0.011274547316133976, 0.033780552446842194, 0.006676861550658941, 0.03172707557678223, 0.03565475344657898, 0.011829661205410957, -0.06790546327829361, 0.02517102286219597, -0.031386617571115494, -0.010298685170710087, -0.014382862485945225, -0.039638541638851166, 0.012885977514088154, 0.05309909209609032, 0.008574024774134159, -0.008639615960419178, -0.043446868658065796, 0.0008024040726013482, -0.07638641446828842, -0.013243161141872406, -0.0217349324375391, 0.017699120566248894, 0.028919849544763565, 0.025997668504714966, -0.023967070505023003, -0.061216454952955246, 0.0391315296292305, -0.004788012243807316, 0.007963728159666061, -0.0473688580095768, -0.003971029072999954, -0.01655384711921215, -0.01859896630048752, 0.006656762212514877, 0.02545199729502201, -0.023770324885845184, 0.004294492769986391, 0.04736613482236862, -0.02601385861635208, 0.03744630515575409, -0.027498964220285416, -0.044725675135850906, -0.027739159762859344, 0.01722981035709381, -0.027631964534521103, -0.004914799239486456, -0.0006265582051128149, 0.020740332081913948, 0.029964212328195572, 0.04218224063515663, 0.015732629224658012, 0.021303903311491013, -0.006089638918638229, 0.04083307087421417, -0.000338440528139472, -0.004830611404031515, -0.03788231313228607, 0.013410478830337524, -0.04974999278783798, -0.017983483150601387, -0.020828984677791595, -0.0014399327337741852, -0.024160180240869522, 0.0021886727772653103, -0.03133361041545868, -0.0141605781391263, -0.051535144448280334, 0.0017522684065625072, -0.005830068606883287, -0.006248244550079107, 0.042600952088832855, 0.026980945840477943, 0.013670727610588074, -0.030017824843525887, -0.007423123344779015, 0.013176090084016323, 0.007073117420077324, -0.011026331223547459, 0.028143201023340225, -0.018285954371094704, -0.013930030167102814, 0.0367572121322155, 0.030454257503151894, 0.029153861105442047, 0.03506878390908241, -0.012463499791920185, -0.006051036529242992, 0.031005196273326874, 0.019324766471982002, 0.01661313883960247, 0.05662563815712929, -0.016989698633551598, -0.034284744411706924, -0.04553646594285965, -0.03202769532799721, -0.018010953441262245, 0.00923569779843092, -0.047541793435811996, -0.015323725529015064, -0.04041561856865883, -0.0849800705909729, 0.03212957829236984, 0.013724138028919697, 0.00873310025781393, 0.03341756761074066, -0.012314824387431145, 0.0003758850216399878, -0.010709304362535477, 0.04412661865353584, 0.06606180965900421, -0.06217750534415245, 0.004682124592363834, -0.0009261243394576013, -0.022672312334179878, -0.02809343859553337, 0.03390634432435036, -0.030533188953995705, -0.034359969198703766, -0.004562002141028643, 0.013052473776042461, -0.04936794936656952, -0.0005536238313652575, -0.019178355112671852, 0.020412396639585495, -0.001854617497883737, 0.022215398028492928, 0.019196240231394768, 0.000691085762809962, -0.025175411254167557, 0.003830013098195195, 0.03891269862651825, 0.008838203735649586, -0.021606789901852608, 0.026281077414751053, -0.0045233131386339664, -0.00009092128311749548, -0.060999173671007156, 0.005927398335188627, 0.038752079010009766, -0.017920058220624924, -0.02354513294994831, -0.02719535306096077, -0.029656462371349335, -0.00724563654512167, 0.06275343894958496, 0.004149655345827341, -0.003113918472081423, -0.008388915099203587, 0.007611457258462906, -0.012879500165581703, 0.022096149623394012, -0.006484338082373142, -0.024741385132074356, 0.02755887433886528, 0.02666771039366722, 0.006556497421115637, -0.010439358651638031, -0.040242090821266174, -0.04508407413959503, 0.06177715212106705, -0.029786108061671257, -0.038340531289577484, 0.012906577438116074, -0.07758740335702896, 0.019716085866093636, 0.018183037638664246, 0.0036181246396154165, -0.03785296529531479, 0.0493563711643219, 0.0337049774825573, 0.007674071006476879, 0.05134037137031555, 0.014922482892870903, 0.022417981177568436, -0.021154507994651794, -0.026249481365084648, -0.07470660656690598, 0.005476173013448715, 0.018938012421131134, -0.01693044789135456, -0.034408241510391235, -0.022703954949975014, -0.06854444742202759, 0.04531645402312279, -0.07466775923967361, -0.03646118938922882, 0.0440632626414299, -0.009974912740290165, 0.019580570980906487, 0.03219401836395264, -0.05289335921406746, 0.03452453017234802, 0.03119828924536705, -0.024953408166766167, -0.024171605706214905, 0.0033824052661657333, 0.052167486399412155, 0.008048570714890957, 0.04349561035633087, -0.018302520737051964, -0.02621498331427574, 0.058396708220243454, 0.020639261230826378, -0.015019821003079414, 0.060856979340314865, -0.03319898992776871, 0.05878615006804466, 0.0021572685800492764, -0.0014564875746145844, 0.03163411468267441, 0.04285184666514397, -0.017652321606874466, -0.04841223359107971, 0.017024395987391472, 0.013360409066081047, 0.01123383641242981, -0.060836970806121826, 0.06201914697885513, 0.005021835211664438, -0.016185550019145012, -0.07839056104421616, 0.026813624426722527, -0.049539241939783096, -0.001975452294573188, -0.01483093574643135, 0.001418981235474348, -0.038526929914951324, 0.06451505422592163, -0.007708557415753603, 0.03235786408185959, 0.07064010202884674, -0.007155149709433317, 0.0016753830714151263, 0.007997606880962849, 0.09517736732959747, 0.09495852142572403, 0.02566988207399845, 0.015380090102553368, 0.0665503665804863, -0.011393843218684196, -0.038396552205085754, -0.002812838414683938, -0.014440448954701424, -0.00938219390809536, -0.010575313121080399, 0.007739926688373089, 0.09031093865633011, -0.01566297374665737, 0.05573144182562828, -0.04487159475684166, -0.014573370106518269, -0.0005890456959605217, -0.007150813937187195, 0.01803402230143547, 0.02046019956469536, 0.00030521093867719173, 0.03621930629014969, -0.03006373532116413, -0.017527207732200623, 0.021004684269428253, 0.0010545960394665599, -0.018479706719517708, 0.035054706037044525, -0.026244649663567543, 0.025294842198491096, -0.009929393418133259, 0.01931806094944477, 0.08124161511659622, -0.02017497643828392, -0.01920916512608528, 0.0094040771946311, 0.029510391876101494, 0.0017489406745880842, 0.0315508097410202, -0.014539703726768494, -0.02328742854297161, 0.0018771206960082054, -0.03270406648516655, 0.009318727999925613, -0.019633647054433823, -0.025463826954364777, 0.02958369441330433, -0.01898888871073723, 0.019536787644028664, 0.04113617166876793, 0.006168562453240156, -0.07357564568519592, -0.04134973883628845, -0.08110274374485016, -0.018359821289777756, -0.08493686467409134, 0.010705849155783653, 0.008604349568486214, -0.025582607835531235, -0.05561636760830879, -0.027211198583245277, -0.027754459530115128, -0.01480821892619133, 0.008650506846606731, -0.03027583658695221, -0.04666829854249954, 0.02766985073685646, 0.04618871212005615, 0.0034893827978521585, 0.030136162415146828, 0.06630223989486694, 0.022170843556523323, 0.0012575319269672036, -0.02734970860183239, 0.007814140990376472, 0.06549931317567825, -0.001772078569047153, 0.013260635547339916, -0.07518450170755386, 0.026590174064040184, 0.03621479123830795, -0.013653439469635487, -0.0727333128452301, 0.021277738735079765, 0.04847563058137894, -0.02247205190360546, 0.048625294119119644, -0.010458202101290226, 0.02307409793138504, -0.04509551450610161, -0.024361418560147285, -0.006151165813207626, 0.013087339699268341, 0.04291025921702385, -0.034534186124801636, 0.06841394305229187, 0.0417809896171093, -0.025223681703209877, -0.03761131316423416, 0.0024016890674829483, 0.010039434768259525, 0.015471774153411388, -0.05135268718004227, -0.0358414500951767, -0.043477047234773636, -0.06844688206911087, -0.049239594489336014, 0.022457489743828773, -0.01785791851580143, -0.03427774831652641, -0.008982647210359573, 0.02285604365170002, -0.029493670910596848, 0.02623100019991398, -0.05489339679479599, 0.023412728682160378, -0.02755502238869667, -0.028841422870755196, -0.04448794946074486, 0.04641779512166977, 0.033237308263778687, 0.012734904885292053, 0.008786244317889214, -0.04619821161031723, 0.029770052060484886, -0.02144291065633297, 0.019312649965286255, 0.05317007377743721, 0.0259723961353302, -0.003300271462649107 ]
[ -0.06779307872056961, -0.03657989576458931, -0.019916914403438568, -0.04917948693037033, 0.04820108413696289, -0.03837967664003372, -0.045348796993494034, -0.010079437866806984, -0.012596727348864079, -0.007253318093717098, 0.032483361661434174, -0.04794466122984886, 0.016329042613506317, -0.032982200384140015, 0.06774651259183884, 0.0029838040936738253, 0.019777171313762665, -0.07509505748748779, -0.03503338247537613, 0.05027378350496292, -0.016411306336522102, -0.03354925289750099, -0.03585726395249367, -0.04530502110719681, -0.0005635220441035926, 0.05490836501121521, 0.037546876817941666, -0.05355724319815636, -0.01344761811196804, -0.21485242247581482, 0.0153073500841856, 0.0014588310150429606, 0.006611338816583157, -0.03169924393296242, 0.020043179392814636, 0.019479000940918922, 0.006091116927564144, 0.007551528047770262, 0.027404392138123512, 0.01611456461250782, 0.01197383925318718, -0.006650111638009548, -0.0588088221848011, 0.013225165195763111, 0.03726719319820404, -0.024925818666815758, -0.022264845669269562, -0.009272824972867966, -0.004088717978447676, 0.005728712305426598, -0.08570846170186996, 0.045769527554512024, -0.021784719079732895, 0.004223572090268135, -0.012822935357689857, 0.04054347425699234, 0.0485851876437664, 0.04785006120800972, 0.03373946249485016, 0.016282591968774796, 0.008946184068918228, -0.019525351002812386, -0.13054674863815308, 0.12118155509233475, 0.025845706462860107, 0.04345262050628662, -0.018786385655403137, -0.02039140835404396, -0.0009195997845381498, 0.04122469946742058, -0.01293711643666029, -0.01676158420741558, -0.03566475212574005, 0.04391217976808548, 0.03071501851081848, -0.032082732766866684, -0.020784657448530197, 0.013512184843420982, 0.00513269379734993, -0.03985675796866417, -0.06395053118467331, 0.0031511588022112846, -0.036254286766052246, -0.0098871486261487, -0.02998976595699787, 0.013335331343114376, -0.038207706063985825, 0.020758500322699547, 0.034779734909534454, 0.005337676964700222, 0.044173408299684525, -0.011331192217767239, 0.010161223821341991, 0.028369829058647156, -0.13465650379657745, -0.01175233069807291, -0.021370353177189827, 0.027754655107855797, -0.005795774981379509, 0.4232350289821625, -0.006160244345664978, -0.014926545321941376, 0.06323427706956863, 0.03416572883725166, 0.015211907215416431, -0.020761243999004364, 0.013346793130040169, -0.019777819514274597, 0.02893766202032566, -0.02471577189862728, -0.004801895935088396, -0.022259555757045746, 0.056388046592473984, -0.07214200496673584, -0.0048485673032701015, -0.0005040381220169365, -0.002632889663800597, 0.006761537864804268, -0.026296304538846016, -0.007574309594929218, -0.04203101992607117, 0.00888416450470686, 0.03159875050187111, 0.000906941422726959, -0.006489444524049759, 0.02473418042063713, 0.0414254367351532, 0.04843912646174431, 0.04561130329966545, 0.03849285840988159, 0.044394101947546005, -0.004404375329613686, -0.05142982676625252, 0.009072260931134224, 0.007721141912043095, 0.036355022341012955, 0.05677695572376251, -0.05023716762661934, 0.015098849311470985, 0.014247559942305088, -0.04121134802699089, -0.050574176013469696, 0.04129570350050926, -0.01337585411965847, -0.03555351495742798, 0.129148468375206, 0.011107554659247398, -0.019752439111471176, -0.017780726775527, -0.03649935498833656, -0.011763092130422592, 0.03613739460706711, 0.010243989527225494, -0.0350264310836792, -0.016362708061933517, 0.024645555764436722, 0.07976982742547989, -0.013717791065573692, -0.08341389894485474, -0.03103848733007908, 0.004617671482264996, -0.07494622468948364, -0.02538141794502735, 0.0783916488289833, -0.00008491957851219922, -0.13096700608730316, -0.02967102639377117, 0.016563283279538155, -0.017258010804653168, -0.05309250205755234, 0.017663443461060524, -0.00015086853818502277, -0.02803867682814598, 0.0051996177062392235, 0.02556700073182583, -0.014994710683822632, -0.030154770240187645, 0.004786329809576273, 0.050265975296497345, -0.0014779878547415137, -0.03774423152208328, -0.013353447429835796, 0.005796799436211586, 0.016104383394122124, -0.05264182388782501, -0.06979350745677948, -0.04352033883333206, -0.007725412026047707, 0.01255347952246666, -0.06041591614484787, 0.017964962869882584, -0.02517305128276348, -0.02539462223649025, 0.09080097824335098, -0.01205999031662941, 0.0035377510357648134, 0.023692917078733444, 0.01242910698056221, -0.007552161347121, -0.047767654061317444, 0.05127763748168945, -0.007876203395426273, 0.004538314882665873, 0.011026017367839813, -0.019976241514086723, 0.04498351737856865, 0.03737366944551468, -0.02334887720644474, 0.07039638608694077, 0.018397467210888863, -0.03501524403691292, 0.02101130224764347, -0.0015479660360142589, 0.0260258037596941, -0.02113187499344349, 0.006974259857088327, 0.005704935640096664, -0.014785340055823326, 0.03675541281700134, 0.06360732018947601, -0.024078896269202232, -0.04455004632472992, -0.04898364841938019, -0.34663185477256775, -0.013531859964132309, -0.003602466778829694, -0.0239789467304945, -0.027227606624364853, -0.056968800723552704, 0.016660397872328758, 0.01420559361577034, 0.011407680809497833, 0.04041454941034317, 0.10570767521858215, -0.016899829730391502, 0.021026551723480225, -0.08055461198091507, -0.018183942884206772, -0.0009539165184833109, -0.015841573476791382, -0.012383668683469296, -0.019635722041130066, 0.0025202068500220776, 0.039181530475616455, -0.015589035116136074, -0.04936433956027031, -0.04961448907852173, 0.014330504462122917, 0.0018569420790299773, 0.13061189651489258, 0.03390371799468994, 0.0449095256626606, -0.07905880361795425, 0.060065384954214096, 0.034359145909547806, -0.0011931868502870202, -0.06256651133298874, -0.017763342708349228, -0.06305999308824539, 0.015646830201148987, 0.015360916033387184, 0.005566142965108156, -0.017871221527457237, -0.06586501747369766, 0.00663116667419672, -0.025493565946817398, -0.05704878270626068, 0.008822072297334671, 0.016421955078840256, -0.005042683333158493, -0.012777185067534447, -0.024251341819763184, 0.0879632830619812, 0.040603820234537125, 0.006745230872184038, 0.010114009492099285, 0.02790047414600849, 0.019638989120721817, -0.01215521339327097, -0.060451749712228775, -0.02801661752164364, 0.005813029129058123, -0.021879490464925766, 0.03494289517402649, 0.024539243429899216, 0.03657521307468414, -0.08010473102331161, 0.01213129423558712, 0.0030343919061124325, -0.007126574404537678, -0.0015693020541220903, 0.033977311104536057, -0.040473803877830505, -0.03857044130563736, 0.0847807303071022, 0.00837832223623991, 0.04419754445552826, 0.0434766560792923, 0.05585912987589836, 0.006545582786202431, 0.0373130664229393, 0.0006203169468790293, -0.011345790699124336, 0.03630802780389786, 0.030289407819509506, 0.03673180192708969, -0.04785674437880516, 0.016613127663731575, 0.03880457952618599, -0.0015373739879578352, -0.03359489142894745, 0.06583601236343384, 0.012841788120567799, -0.020393943414092064, -0.008327100425958633, -0.017959805205464363, -0.0497264601290226, 0.0650169625878334, 0.007590394467115402, -0.2561343312263489, 0.0590815544128418, 0.054415181279182434, 0.08185955882072449, -0.004916715435683727, 0.0016112816520035267, 0.02826079912483692, -0.06426651030778885, 0.008549121208488941, -0.00006612905417568982, 0.012167482636868954, 0.05017837882041931, 0.014166419394314289, -0.019283965229988098, 0.0071992469020187855, -0.034931354224681854, 0.037210628390312195, 0.022620031610131264, 0.003078695386648178, -0.011191575787961483, 0.008980270475149155, -0.04137101024389267, 0.18080800771713257, 0.04766388610005379, -0.029797568917274475, 0.00033221952617168427, 0.008897301740944386, -0.021781625226140022, 0.028791991993784904, 0.0410897359251976, 0.0050019770860672, 0.0016067448304966092, 0.025297263637185097, 0.034595318138599396, 0.04897380992770195, -0.032890886068344116, -0.033386968076229095, 0.05745885521173477, -0.017459070309996605, -0.015208900906145573, 0.0006928222137503326, 0.05276405066251755, -0.033731959760189056, 0.022289426997303963, 0.054904185235500336, -0.030211012810468674, -0.0038192765787243843, 0.01527290791273117, -0.02845103107392788, -0.004509919323027134, -0.016305604949593544, -0.04253152757883072, -0.03523515537381172, -0.012663347646594048, -0.008320474065840244, 0.05414626747369766, 0.023559315130114555, -0.0028194887563586235, 0.053342945873737335, 0.029020247980952263, -0.010281694121658802, -0.04935194551944733, 0.09763039648532867, 0.013031287118792534, 0.03208019584417343 ]
[ 0.022915111854672432, -0.0049002887681126595, -0.027196772396564484, -0.00039471540367230773, -0.011883900500833988, -0.01353372260928154, 0.015343858860433102, 0.024579672142863274, -0.05410612002015114, 0.0020837511401623487, -0.029498538002371788, 0.02439640834927559, 0.023325571790337563, -0.01901070401072502, -0.02017979510128498, -0.008623633533716202, 0.023612715303897858, -0.010588525794446468, 0.027978861704468727, 0.01705860160291195, -0.03859678655862808, 0.02645137533545494, 0.023732906207442284, 0.009726042859256268, -0.044272422790527344, 0.03344769775867462, -0.023190230131149292, 0.02752411551773548, 0.021929839625954628, -0.1015782356262207, -0.014595218002796173, -0.036519214510917664, -0.02427668496966362, -0.013922624289989471, -0.022703412920236588, 0.030542433261871338, -0.01644243113696575, -0.028278304263949394, 0.00797450914978981, -0.009005893021821976, 0.014030128717422485, -0.07844829559326172, -0.06953880190849304, 0.026700234040617943, -0.005880533251911402, -0.03117344155907631, -0.01667157933115959, -0.012226342223584652, -0.0004252994549460709, 0.0008865869021974504, -0.08593425899744034, 0.018009625375270844, -0.02318992279469967, 0.012297136709094048, -0.006640000268816948, -0.017529726028442383, -0.06376031786203384, 0.03171106055378914, -0.020746715366840363, 0.004970678593963385, -0.011293217539787292, -0.021645214408636093, -0.033097296953201294, -0.03392190486192703, -0.001805496634915471, -0.03011137805879116, -0.0377303808927536, 0.00037502110353671014, 0.002527181524783373, 0.0006868706550449133, 0.03785732388496399, 0.011434122920036316, -0.053427789360284805, 0.015177092514932156, -0.00803048349916935, 0.0219578854739666, 0.020768774673342705, 0.010957594029605389, 0.005336835514754057, -0.014933615922927856, -0.016895251348614693, -0.0010927009861916304, -0.006103781517595053, 0.07337701320648193, 0.020417658612132072, -0.0808090940117836, 0.017826810479164124, 0.006274117156863213, -0.0004670812631957233, -0.030141443014144897, 0.006846139207482338, -0.028535371646285057, 0.018977029249072075, 0.026702987030148506, -0.1236203983426094, 0.02777940034866333, -0.02970111556351185, 0.007057298440486193, 0.006005981471389532, 0.7973634004592896, -0.005494241137057543, 0.014746451750397682, 0.00843063648790121, 0.04626009613275528, -0.024119015783071518, -0.011339390650391579, 0.03683977574110031, 0.013030395843088627, 0.022864598780870438, -0.029412543401122093, 0.017824845388531685, 0.005550981033593416, 0.017950955778360367, 0.007971151731908321, -0.015161893330514431, 0.027342509478330612, -0.008874010294675827, 0.027813833206892014, -0.008798438124358654, 0.016885122284293175, -0.0030163873452693224, -0.04408349469304085, 0.028605403378605843, 0.017799613997340202, 0.02741064690053463, -0.17284752428531647, 0.01770397275686264, -6.469749725561032e-33, 0.007558087818324566, -0.006295904517173767, 0.0348370261490345, -0.014392148703336716, 0.02929752878844738, -0.015047824941575527, -0.02997707948088646, 0.0054368614219129086, -0.011038597673177719, -0.03741304576396942, 0.033349502831697464, -0.0012369052274152637, -0.02317909523844719, -0.015998274087905884, 0.012181885540485382, -0.011927193030714989, 0.003863321617245674, 0.0343954935669899, 0.002725502010434866, -0.017263764515519142, 0.0644202008843422, 0.004699979443103075, 0.03652307391166687, 0.024243004620075226, 0.010123933665454388, 0.02397475205361843, 0.02583981305360794, -0.018709052354097366, 0.007494813296943903, -0.021167054772377014, -0.017159976065158844, -0.0044195447117090225, 0.0014107665047049522, -0.01702733524143696, -0.019805336371064186, -0.031917255371809006, -0.052035003900527954, 0.02142801508307457, -0.019068077206611633, 0.009570191614329815, -0.040155623108148575, -0.019202910363674164, -0.025520084425807, -0.031964585185050964, -0.07408688217401505, -0.006621550302952528, 0.005156450904905796, 0.02734365314245224, 0.0042854356579482555, 0.015159673988819122, 0.023390445858240128, -0.03747202455997467, 0.01666443981230259, 0.015319899655878544, -0.008823036216199398, 0.035678546875715256, 0.00026899692602455616, 0.008310009725391865, -0.00799818616360426, -0.02992388978600502, 0.03334512561559677, -0.022946037352085114, 0.055975720286369324, 0.04103628545999527, 0.02920285053551197, 0.01127935852855444, 0.03952778875827789, 0.020758699625730515, 0.035443857312202454, 0.024246487766504288, -0.053045500069856644, 0.036858562380075455, 0.00006789074541302398, -0.05988924950361252, 0.04510107636451721, -0.05034427344799042, -0.004375797230750322, -0.020404621958732605, 0.0017000541556626558, 0.020517835393548012, -0.024132225662469864, 0.018556060269474983, -0.021917222067713737, 0.0033120184671133757, -0.03013012930750847, -0.02046102099120617, 0.023304348811507225, 0.024269578978419304, -0.04797802492976189, -0.006435828283429146, 0.019140033051371574, 0.057260602712631226, -0.0017721871845424175, -0.013795030303299427, -0.030889129266142845, 7.128124274989425e-33, 0.030102789402008057, 0.008198710158467293, -0.010669411160051823, 0.011653989553451538, 0.03287734463810921, -0.03924005851149559, 0.09407182037830353, 0.07354653626680374, 0.004341430496424437, 0.0541185699403286, -0.004860304296016693, 0.0015137294540181756, -0.014446633867919445, 0.0006982174818404019, 0.039509739726781845, -0.02231702022254467, 0.04488546401262283, -0.015091626904904842, 0.004930895287543535, 0.010339854285120964, -0.047704439610242844, 0.003906916826963425, 0.023402728140354156, 0.0315600261092186, 0.03591545671224594, 0.054222773760557175, 0.029176807031035423, 0.01590183563530445, -0.03749875724315643, -0.022918041795492172, 0.033938515931367874, 0.0035707661882042885, 0.008498618379235268, -0.03701385483145714, -0.013365363702178001, 0.08622068166732788, 0.012725521810352802, 0.027753299102187157, -0.031657624989748, -0.001486663124524057, 0.06492526084184647, -0.0037592242006212473, 0.00994354858994484, 0.02917034737765789, 0.0036203821655362844, -0.03744880110025406, 0.011076469905674458, 0.02159697748720646, -0.017223037779331207, 0.006996761076152325, 0.024078048765659332, 0.041438616812229156, -0.018025238066911697, 0.048648055642843246, 0.04281800985336304, -0.01562916859984398, -0.028172267600893974, 0.02589631825685501, -0.052787844091653824, -0.0018241240177303553, -0.02151985466480255, -0.011370424181222916, -0.04135015606880188, 0.024422822520136833, -0.012387723661959171, -0.021306978538632393, -0.04586968943476677, -0.023042934015393257, -0.032762106508016586, -0.0038786393124610186, 0.02195097878575325, -0.015850242227315903, 0.00030216557206586003, 0.04427362605929375, 0.04573138430714607, -0.034545306116342545, -0.0015794382197782397, 0.012671771459281445, -0.015043672174215317, 0.022736717015504837, 0.04820535331964493, -0.030951309949159622, 0.005428794305771589, -0.009033900685608387, -0.007396419532597065, -0.0014564173761755228, -0.05294463038444519, 0.010795178823173046, -0.008564187213778496, 0.00569737097248435, 0.01630680076777935, -0.03855239599943161, -0.018457399681210518, -0.0033386859577149153, -0.026851516216993332, -1.2273845939603234e-8, -0.014645503833889961, 0.0101123983040452, -0.016666501760482788, 0.02124258689582348, 0.051611609756946564, -0.014163943938910961, -0.018836621195077896, 0.015803074464201927, -0.0017273412086069584, 0.028994660824537277, 0.048782896250486374, -0.03118380345404148, -0.0009977578883990645, 0.033983733505010605, -0.000440446863649413, -0.01518710795789957, 0.008089580573141575, 0.00550031429156661, 0.006250772625207901, -0.02593681402504444, -0.0014189141802489758, 0.03663381189107895, -0.012783867307007313, -0.01459098607301712, 0.01874598301947117, -0.0028977447655051947, -0.029456181451678276, -0.1246308907866478, -0.004886537790298462, -0.020741142332553864, 0.009230087511241436, -0.017319386824965477, 0.012190336361527443, 0.022258954122662544, -0.0377737432718277, -0.039396755397319794, 0.023937102407217026, 0.033183589577674866, -0.002643454587087035, 0.023933561518788338, 0.006107771303504705, 0.03229726105928421, -0.01638994738459587, -0.029413599520921707, -0.035195693373680115, 0.03563752770423889, -0.0466657318174839, 0.05260653421282768, 0.012145348824560642, 0.015599693171679974, 0.006953527685254812, -0.03069463185966015, 0.02612944506108761, -0.012185933068394661, 0.01142207346856594, 0.004962200298905373, 0.027308642864227295, -0.01783459447324276, -0.006657443009316921, 0.025496868416666985, 0.015838705003261566, 0.029520751908421516, -0.025838052853941917, -0.01940406672656536 ]
clickhouse-tuples-missing-columns
https://markhneedham.com/blog/2023/12/04/clickhouse-tuples-missing-columns
false
2023-12-11 00:44:37
Dask: Parallelising file downloads
[ "dask", "python", "til" ]
[ "TIL" ]
:icons: font Before a recent meetup talk that I did showing https://speakerdeck.com/markhneedham/analytics-on-your-laptop-with-clickhouse-local[how to do analytics on your laptop with ClickHouse Local^] at https://www.meetup.com/uk-open-source-data-infrastructure-meetup/events/297395569/[Aiven's Open Source Data Infrastructure Meetup^], I needed to download a bunch of Parquet files from https://huggingface.co/datasets/vivym/midjourney-messages[Hugging Face's midjourney-messages dataset^]. I alternate between using `wget`/`curl` or a Python script to do this type of work. This time I used Python's `requests` library and I had the following script which downloads the Parquet files that I haven't already downloaded. .download_parquet_files.py [source, python] ---- import requests import os import shutil import time from tqdm import tqdm def download_file(url, local_filename): with requests.get(url, stream=True, allow_redirects=True) as r: r.raise_for_status() total_length = int(r.headers.get('content-length', 0)) chunk_size = 1024 with open(local_filename, 'wb') as f: for chunk in tqdm(r.iter_content(chunk_size), total=total_length/chunk_size, desc=local_filename): if chunk: f.write(chunk) return local_filename def download(file): url = f"https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/{file}?download=true" print(f"Downloading {url}") local_filename = download_file(url, f"data/{file}") return local_filename files_to_download = [f"0000{index:0>2}.parquet" for index in range(0, 56)] for file in files_to_download: if not os.path.isfile(f"data/{file}"): download(file) else: print(f"File {file} already exists") ---- If we run this script, it downloads each file sequentially. The output will look like the following: .Output [source, text] ---- Downloading https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet?download=true data/000000.parquet: 155582it [00:14, 10577.06it/s] Downloading https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000001.parquet?download=true data/000001.parquet: 154888it [00:14, 10625.43it/s] Downloading https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000002.parquet?download=true data/000002.parquet: 147923it [00:13, 11228.27it/s] 5.42s user 1.40s system 15% cpu 43.926 total ---- It's pretty fast considering I haven't got my ethernet cable connected, but I was curious whether parallelising the downloads would speed things up. I've previously done this using the https://docs.python.org/3/library/multiprocessing.html[multiprocessing^] library, but I found it quite fiddly to set up. I'd heard about a library called https://www.dask.org/[dask^] on a few podcasts and although it's overkill to use it for this problem, I wanted to see if I could do it. I didn't have to make too many changes to my script to get it working. I had to add the following import [source, python] ---- import dask ---- And update my for loop to use the `dask.delayed` function: [source, python] ---- lazy_results = [] for file in files_to_download: if not os.path.isfile(f"data/{file}"): result = dask.delayed(download)(file) lazy_results.append(result) else: print(f"File {file} already exists") dask.persist(*lazy_results) ---- I deleted a few of the Parquet files from my machine and then gave it a try: [source, python] ---- time poetry run python download_parquet_files.py ---- .Output [source, text] ---- .... Downloading https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000000.parquet?download=true Downloading https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000001.parquet?download=true Downloading https://huggingface.co/datasets/vivym/midjourney-messages/resolve/main/data/000002.parquet?download=true data/000002.parquet: 147923it [00:47, 3084.88it/s] data/000001.parquet: 154888it [00:48, 3221.52it/s] data/000000.parquet: 155582it [00:50, 3088.57it/s] 7.27s user 2.52s system 19% cpu 51.266 total ---- Well, that's no good - I made it slower! So a good lesson for me that parallelising doesn't always make things faster, but along the way, I learnt that dask is very easy to configure. Now I need to give it a try on some other tasks that can easily be parallelised to see if it fares better on those.
In this post, we'll learn how to use dask to parallelise the download of Parquet files from Hugging Face.
uploads/2023/12/dask-banner.png
[ -0.008169743232429028, -0.022063270211219788, -0.01170521043241024, 0.03495822474360466, 0.08201601356267929, 0.03985587880015373, 0.01043870858848095, 0.028995705768465996, -0.013949152082204819, -0.016294214874505997, -0.031162597239017487, -0.012529964558780193, -0.07478132843971252, 0.026481224223971367, -0.02044936642050743, 0.08291929960250854, 0.0823812410235405, 0.011357797309756279, 0.031391751021146774, 0.0029359806794673204, 0.028447329998016357, 0.08396421372890472, -0.022442704066634178, 0.05010082200169563, 0.024396860972046852, 0.00608794717118144, 0.014541583135724068, -0.014780416153371334, -0.03922782093286514, -0.016517022624611855, 0.031573113054037094, -0.0073285894468426704, 0.017446350306272507, 0.00037262693513184786, 0.030445845797657967, -0.016497349366545677, -0.005117984488606453, 0.018513459712266922, -0.001261516590602696, 0.021968698129057884, -0.06280174851417542, 0.039231278002262115, -0.009175693616271019, 0.009778023697435856, -0.037719257175922394, 0.017668209969997406, -0.036846283823251724, 0.03100571408867836, -0.005965646356344223, 0.00291100493632257, -0.053578268736600876, 0.042055074125528336, -0.02534448727965355, -0.001540923723950982, -0.00839763879776001, 0.03636167198419571, 0.03652290254831314, -0.0714501366019249, 0.025049839168787003, -0.03764130547642708, -0.0022048894315958023, -0.0033142257016152143, 0.01940704509615898, 0.030477505177259445, 0.007846340537071228, -0.013381765224039555, 0.0016711754724383354, 0.03702711686491966, -0.05161035433411598, -0.028095189481973648, -0.0024956983979791403, 0.016694124788045883, -0.0446135476231575, -0.00552611006423831, 0.008247530087828636, -0.04685515537858009, -0.012198362499475479, 0.023418713361024857, 0.030302133411169052, 0.061056505888700485, -0.01717888005077839, -0.004549662582576275, 0.014429026283323765, 0.03955589234828949, 0.010815154761075974, -0.04932217299938202, -0.06460286676883698, -0.01545344851911068, -0.05676430091261864, 0.05325302109122276, 0.013623017817735672, -0.05761542171239853, 0.018920525908470154, 0.027900531888008118, -0.004590151831507683, 0.010177837684750557, 0.00483923964202404, -0.014732247218489647, 0.011988718993961811, -0.006022945512086153, -0.049911979585886, -0.01042342558503151, 0.02542286552488804, 0.030327921733260155, -0.08261309564113617, 0.0013735522516071796, -0.01898040436208248, -0.024278797209262848, 0.011114935390651226, -0.020203784108161926, 0.012972204945981503, -0.025217583402991295, -0.02349039912223816, 0.006517784669995308, -0.06887198984622955, 0.08183789998292923, 0.028384801000356674, -0.03596680983901024, -0.004735360853374004, 0.02083848975598812, 0.04273980110883713, 0.04599423334002495, -0.015996431931853294, 0.08270908147096634, -0.003429972566664219, 0.04997579753398895, 0.008496711030602455, 0.05309218540787697, 0.009811080060899258, -0.04331693798303604, -0.006721290294080973, 0.07731367647647858, -0.0012992712436243892, -0.007648178841918707, -0.0007948289276100695, -0.01117895357310772, 0.015514099039137363, 0.005017012823373079, 0.07189037650823593, 0.009432515129446983, 0.024391721934080124, -0.015954701229929924, -0.0012131824623793364, 0.023129038512706757, 0.04702119901776314, 0.02013268508017063, -0.014799500815570354, -0.057936836034059525, -0.03495848923921585, 0.014853326603770256, 0.012560456059873104, 0.012677187100052834, 0.05436968430876732, -0.027467161417007446, 0.025436988100409508, 0.11010324954986572, 0.04396306723356247, 0.017734717577695847, -0.0032515041530132294, -0.006011313293129206, 0.023011580109596252, 0.05018306523561478, -0.0015539565356448293, 0.04400487244129181, 0.0003375256492290646, -0.0198211669921875, -0.0072758994065225124, 0.03907141834497452, -0.027256382629275322, -0.0002812364837154746, -0.06049328297376633, -0.061018530279397964, 0.06129083409905434, -0.019863618537783623, -0.01016276702284813, 0.04576074331998825, 0.11106415092945099, 0.053590867668390274, 0.013271508738398552, 0.025438303127884865, -0.08893438428640366, 0.037553396075963974, 0.008067643269896507, 0.0067179836332798, 0.04182251915335655, -0.013132955878973007, 0.07945125550031662, 0.02382742054760456, -0.009293369017541409, 0.039142124354839325, -0.06220356002449989, -0.06545738875865936, -0.028244227170944214, -0.011867246590554714, 0.0453340969979763, -0.07384226471185684, 0.02785755693912506, 0.051974739879369736, 0.028912412002682686, 0.03090861812233925, -0.018603328615427017, 0.007977301254868507, 0.0155945410951972, -0.04720231518149376, -0.07156393676996231, 0.028198260813951492, 0.021330857649445534, 0.0026908565778285265, -0.031767308712005615, 0.004794024862349033, -0.014485009014606476, 0.007454784587025642, 0.031708378344774246, -0.008615139871835709, 0.047155655920505524, -0.003681851550936699, 0.030548997223377228, -0.0035041077062487602, 0.03536691889166832, -0.05555463209748268, 0.03370378538966179, 0.006750269792973995, -0.01687110774219036, -0.013552063144743443, -0.002064079511910677, 0.11266335099935532, 0.07544676214456558, -0.012601898051798344, -0.04546496272087097, 0.03702515736222267, -0.015995042398571968, -0.048832137137651443, -0.008380313403904438, -0.02632690966129303, -0.019889630377292633, 0.015342606231570244, -0.02102198265492916, -0.05212239548563957, -0.0015294819604605436, -0.050199881196022034, -0.008036400191485882, 0.05610672011971474, -0.011004287749528885, 0.04790979251265526, 0.017797376960515976, -0.02569439448416233, -0.0033866954036056995, -0.034075502306222916, -0.044583190232515335, 0.007865248247981071, -0.005491526331752539, -0.007835092954337597, 0.02905767224729061, -0.04633814096450806, -0.020707039162516594, -0.02754058875143528, -0.028971463441848755, 0.054676927626132965, 0.0353536456823349, 0.07553483545780182, -0.020844249054789543, 0.021857067942619324, -0.023414624854922295, 0.0007884327787905931, -0.01636916771531105, -0.03982285410165787, -0.025123262777924538, -0.015487593598663807, 0.029149847105145454, -0.00460457568988204, 0.03150829300284386, 0.024560580030083656, 0.012585888616740704, -0.005408058874309063, 0.010631436482071877, -0.010732578113675117, 0.050448931753635406, -0.0013750956859439611, -0.010580423288047314, -0.05172514542937279, 0.0013533429009839892, 0.04736150801181793, -0.039428774267435074, -0.03069259412586689, 0.01136917993426323, -0.055613379925489426, 0.03070288896560669, -0.06666339933872223, -0.04320470988750458, -0.026900919154286385, 0.016102632507681847, 0.021260464563965797, -0.0006481957971118391, -0.013747376389801502, 0.04898921400308609, 0.023467017337679863, -0.0001873941655503586, 0.02265149913728237, -0.014409022405743599, 0.01993965171277523, 0.010624048300087452, 0.030586767941713333, 0.04086041450500488, -0.005228999070823193, -0.0009058779687620699, -0.08146236091852188, 0.0001633531937841326, -0.04765348136425018, -0.2676841616630554, 0.03915839269757271, 0.01625852845609188, -0.04016897827386856, 0.012679529376327991, -0.03656092658638954, 0.0016641103429719806, -0.041850924491882324, -0.021614354103803635, 0.001982728950679302, -0.04512996971607208, -0.03997195512056351, -0.011111936531960964, 0.03404509276151657, 0.010780162177979946, 0.043083179742097855, 0.0018778230296447873, -0.0439523383975029, 0.029089737683534622, 0.02909519150853157, -0.008834497071802616, -0.051985278725624084, -0.0004323910688981414, 0.05192366614937782, 0.011784946545958519, 0.04468346759676933, -0.05312585458159447, -0.012213646434247494, -0.048821110278367996, -0.027952488511800766, 0.034233301877975464, -0.01878189481794834, 0.009998708963394165, -0.007998237386345863, -0.0026693101972341537, -0.02001902274787426, 0.060993775725364685, -0.006407782435417175, 0.018317125737667084, 0.013014080934226513, 0.0005285143852233887, -0.006146000232547522, 0.0020665577612817287, -0.009458166547119617, 0.07225378602743149, 0.004169821739196777, -0.08067373931407928, -0.013101833872497082, -0.03179464861750603, 0.05864538624882698, -0.028921768069267273, -0.05255076661705971, -0.03474847972393036, 0.025751853361725807, -0.008427365683019161, -0.0051417276263237, -0.00955080147832632, -0.01236438937485218, -0.04956590011715889, -0.03761034458875656, -0.00024213515280280262, -0.027957379817962646, -0.03460274636745453, -0.04929018020629883, -0.011385293677449226, -0.07086427509784698, -0.07188349217176437, -0.03453025594353676, 0.05384194850921631, 0.044484276324510574, -0.026352576911449432, -0.004738101735711098, -0.006755813956260681, -0.10163643211126328, -0.017946859821677208, -0.010430031456053257, -0.017801692709326744, 0.011466389521956444, -0.005129750818014145, 0.07397431880235672, -0.05269988626241684, -0.05461910739541054, 0.040883518755435944, -0.000805617542937398, -0.003445115638896823, -0.023814739659428596, 0.02722351625561714, -0.007730002515017986, -0.024969277903437614, -0.0009897931013256311, 0.036951545625925064, -0.04750165343284607, -0.03221067413687706, -0.009598981589078903, -0.03269655257463455, 0.015237778425216675, 0.00026127861929126084, 0.01753542572259903, 0.02318844199180603, 0.03079582005739212, -0.0068726507015526295, -0.06555432081222534, 0.00018517253920435905, -0.03189392387866974, 0.009322036989033222, -0.0032720575109124184, -0.046417828649282455, 0.022852959111332893, 0.05889032781124115, 0.01528236735612154, 0.007036046124994755, -0.03994224965572357, 0.03232888877391815, -0.07419566065073013, -0.00879668164998293, -0.035601790994405746, 0.013541786931455135, 0.02444368414580822, 0.023603128269314766, -0.03105160780251026, -0.06121230870485306, 0.017590058967471123, 0.016843918710947037, -0.024875888600945473, -0.0460175946354866, -0.023361466825008392, -0.009913093410432339, -0.019349250942468643, 0.0146244578063488, 0.02019808627665043, -0.04281466081738472, 0.027451971545815468, 0.052744556218385696, -0.04662850871682167, 0.01945112831890583, -0.04126128554344177, -0.05329586938023567, -0.03581976890563965, -0.002419567434117198, 0.0021896264515817165, -0.00571694690734148, 0.01888432167470455, 0.0010190950706601143, 0.012661824002861977, 0.0652068480849266, 0.027210526168346405, 0.013575251214206219, 0.002171178814023733, 0.02105088345706463, -0.008545982651412487, 0.0019649479072541, -0.027570268139243126, 0.02233576960861683, -0.0199237409979105, -0.028708776459097862, -0.02425535023212433, 0.015338342636823654, -0.002878822386264801, 0.00037773794610984623, -0.028146499767899513, 0.008855965919792652, -0.04202786087989807, -0.020850906148552895, 0.005023456644266844, 0.010055147111415863, 0.04733807221055031, 0.02587565779685974, 0.010543005540966988, -0.017582548782229424, -0.01817290112376213, 0.016430184245109558, 0.02039484493434429, -0.004830092657357454, 0.012110943906009197, -0.016476185992360115, -0.008400222286581993, 0.039223115891218185, 0.024729344993829727, 0.015186361037194729, 0.02969903126358986, -0.010585075244307518, -0.02111908793449402, 0.03523828461766243, -0.0010989111615344882, 0.03945256769657135, 0.04737631604075432, -0.035870909690856934, 0.008462591096758842, -0.02246035821735859, -0.02188657969236374, -0.02594013884663582, -0.014242748729884624, -0.015170876868069172, -0.010202182456851006, -0.019923986867070198, -0.08710172772407532, 0.047650858759880066, -0.008862162940204144, 0.0026955134235322475, 0.019094208255410194, -0.032207589596509933, 0.0015029361238703132, -0.021365102380514145, 0.031346071511507034, 0.040185198187828064, -0.06751856952905655, -0.004447725135833025, -0.003784480970352888, 0.003785330569371581, -0.01643596962094307, 0.017960067838430405, -0.053686462342739105, -0.01782265678048134, -0.0005234151030890644, 0.02309931255877018, -0.03241899609565735, -0.01679188758134842, -0.03669590875506401, 0.023581061512231827, -0.03854120150208473, 0.015475757420063019, 0.006757369264960289, -0.01603422686457634, -0.019366543740034103, -0.0045089018531143665, 0.026494115591049194, 0.0035706856288015842, -0.01873387210071087, 0.029752513393759727, -0.0010064803063869476, -0.003931374289095402, -0.037811700254678726, 0.027008766308426857, 0.030324662104249, -0.02680768445134163, -0.01093549095094204, -0.03412901237607002, -0.01753091998398304, 0.02075081132352352, 0.039532143622636795, 0.0067507619969546795, 0.016001228243112564, -0.027302540838718414, 0.006146751344203949, -0.01228975411504507, 0.010309942997992039, -0.018024656921625137, -0.020278312265872955, 0.019799252972006798, 0.03341994807124138, -0.00468474579975009, -0.0042555611580610275, -0.014173314906656742, -0.04627883806824684, 0.04232078790664673, -0.03733488544821739, -0.06308222562074661, -0.0009936430724337697, -0.05611689016222954, 0.025888608768582344, 0.0032830601558089256, 0.017552070319652557, -0.04589495435357094, 0.037430476397275925, 0.014446936547756195, 0.027977537363767624, 0.06963594257831573, 0.010883206501603127, 0.03347829356789589, -0.015194883570075035, -0.019220566377043724, -0.08772798627614975, -0.02171597070991993, 0.018382353708148003, -0.027860602363944054, -0.036376066505908966, -0.005164049100130796, -0.04267287254333496, 0.05581088364124298, -0.08298158645629883, -0.02718917652964592, 0.05292288213968277, -0.006940741091966629, 0.026941722258925438, 0.041896335780620575, -0.045450322329998016, 0.03272944688796997, 0.04342003911733627, -0.05071895197033882, -0.016336914151906967, 0.00487197982147336, 0.04720231890678406, 0.01810400001704693, 0.0361587256193161, -0.034682225435972214, -0.013874181546270847, 0.07927938550710678, 0.01040408294647932, -0.004810886457562447, 0.03765425458550453, -0.011515427380800247, 0.05503164231777191, 0.00012319060624577105, -0.046270836144685745, 0.013289464637637138, 0.04390958696603775, -0.001238400349393487, -0.055842842906713486, 0.01889462023973465, -0.00774298794567585, 0.0003456099075265229, -0.04859131574630737, 0.06774089485406876, 0.010424829088151455, -0.021278394386172295, -0.0550454817712307, 0.03465986251831055, -0.044726062566041946, 0.008001303300261497, -0.022881003096699715, -0.019984852522611618, -0.02942359820008278, 0.058632273226976395, -0.014164996333420277, 0.03222273662686348, 0.06531719118356705, 0.0012951563112437725, 0.015706980600953102, 0.0029300651513040066, 0.08830257505178452, 0.09299294650554657, 0.02587050385773182, 0.022500520572066307, 0.06354892253875732, -0.009844675660133362, -0.04458702728152275, -0.014013280160725117, -0.025861598551273346, -0.03365544229745865, -0.027545219287276268, 0.02031588740646839, 0.08428550511598587, 0.001755565986968577, 0.05641789361834526, -0.04346000403165817, -0.003479883074760437, -0.01047003734856844, 0.029815267771482468, 0.03773822635412216, 0.024180525913834572, -0.004445221740752459, 0.033112477511167526, -0.037951137870550156, -0.018675221130251884, 0.049931418150663376, 0.008694385178387165, -0.03060656413435936, 0.021565046161413193, -0.010366502217948437, 0.006647520232945681, 0.02180168405175209, 0.0524691566824913, 0.08331145346164703, -0.013061859644949436, -0.01541019044816494, -0.003312537679448724, 0.03168142959475517, 0.02481555938720703, 0.016462499275803566, -0.009851760230958462, -0.018210221081972122, 0.004440686199814081, -0.029182765632867813, -0.017610033974051476, -0.04111737012863159, -0.03690602630376816, 0.028053300455212593, -0.01978684589266777, 0.023460136726498604, 0.01576205901801586, -0.014417474158108234, -0.050393953919410706, -0.030895516276359558, -0.05202935263514519, -0.021075444296002388, -0.05873844400048256, -0.005900128278881311, 0.016499897465109825, -0.007135337218642235, -0.04573243856430054, -0.0322268009185791, -0.02227802574634552, -0.015940669924020767, -0.006749140098690987, -0.0646100714802742, -0.022989582270383835, 0.0053413924761116505, 0.025027377530932426, 0.018013084307312965, 0.017551757395267487, 0.06678818166255951, 0.01781006157398224, -0.017519474029541016, -0.033166635781526566, 0.03630554676055908, 0.05457432195544243, 0.020320521667599678, 0.014023992232978344, -0.08581356704235077, 0.029288943856954575, 0.03128201887011528, -0.042192745953798294, -0.07480666041374207, 0.04420362040400505, 0.06434337049722672, 0.004425731021910906, 0.05340619012713432, -0.0013072638539597392, -0.018616538494825363, -0.0544198639690876, -0.026272056624293327, -0.005458695814013481, 0.01420024037361145, 0.052613675594329834, -0.0034593050368130207, 0.07649635523557663, 0.03836364299058914, -0.01163370069116354, -0.04665910452604294, -0.007148278411477804, -0.0034335777163505554, 0.032803554087877274, -0.045051708817481995, -0.04026860371232033, -0.051145754754543304, -0.09448166936635971, -0.04350319504737854, 0.037640031427145004, -0.016359776258468628, -0.025942740961909294, 0.003162688110023737, 0.011821487918496132, -0.03292539343237877, 0.041756466031074524, -0.05796375498175621, -0.002316713333129883, -0.018349071964621544, -0.022289300337433815, -0.017725912854075432, 0.049835070967674255, 0.01355032343417406, -0.006145506165921688, 0.0292761642485857, -0.03855820372700691, -0.000793148938100785, -0.029251424595713615, 0.03287822753190994, 0.048306554555892944, -0.009388146921992302, -0.004016182851046324 ]
[ -0.07295666635036469, -0.013319560326635838, -0.013233672827482224, -0.03759986534714699, 0.06558340042829514, -0.06894174218177795, -0.047589074820280075, -0.012076766230165958, -0.02654443308711052, -0.06582995504140854, 0.02780310995876789, -0.07073811441659927, 0.008897466585040092, -0.045553360134363174, 0.08308710902929306, 0.011743292212486267, 0.0153916971758008, -0.09881541877985, -0.028786545619368553, 0.06267982721328735, -0.04240857809782028, -0.03152037784457207, -0.04283678159117699, -0.029260318726301193, -0.004373114090412855, 0.05486612021923065, 0.028138410300016403, -0.043788883835077286, 0.006017998792231083, -0.15900349617004395, 0.006344580557197332, -0.006233725696802139, 0.012797800824046135, 0.003894542809575796, 0.030434435233473778, 0.028405914083123207, 0.050277240574359894, -0.004148715175688267, 0.0187663771212101, 0.011426262557506561, 0.004801291506737471, 0.01953483559191227, -0.06253940612077713, 0.020867351442575455, 0.04676513001322746, 0.008729379624128342, -0.007801865693181753, 0.000533841026481241, -0.01650344766676426, 0.0002365128166275099, -0.044069282710552216, 0.05395251512527466, -0.012185322120785713, -0.03543636202812195, -0.028317393735051155, 0.05233031511306763, 0.05834760144352913, 0.015689006075263023, 0.015781642869114876, 0.012958995066583157, -0.01221624854952097, 0.0030066531617194414, -0.15471534430980682, 0.12899912893772125, 0.008241729810833931, -0.0020588727202266455, -0.020142294466495514, 0.026135094463825226, 0.011116470210254192, 0.06695149093866348, -0.03402608633041382, -0.03437354415655136, -0.01817435771226883, 0.024791670963168144, 0.01857122965157032, -0.037856049835681915, 0.010949339717626572, 0.026572806760668755, 0.0202176496386528, -0.01882857084274292, -0.04170561581850052, 0.011207416653633118, -0.018378041684627533, -0.03510390967130661, -0.0477326475083828, -0.021786527708172798, -0.020553166046738625, 0.06965562701225281, 0.022496389225125313, -0.006775540765374899, 0.010588958859443665, -0.01243817899376154, 0.002494493732228875, -0.004266704898327589, -0.09614937752485275, -0.019856827333569527, -0.005573437549173832, 0.04318040609359741, -0.014289939776062965, 0.4238748252391815, -0.040017273277044296, 0.030855875462293625, 0.03801894187927246, 0.042272794991731644, -0.006294409744441509, -0.038329705595970154, 0.007773153018206358, -0.031211091205477715, 0.03957511484622955, -0.014127478003501892, -0.010382408276200294, -0.022736256942152977, 0.07561144977807999, -0.08548253774642944, 0.01602996326982975, 0.009751250967383385, -0.010155173018574715, -0.00010154060873901471, -0.020429471507668495, 0.00010014573490479961, -0.036804359406232834, -0.006245484109967947, 0.09287791699171066, 0.0035843136720359325, 0.03973247855901718, 0.03640293702483177, 0.0338616743683815, 0.03611515834927559, 0.06049435958266258, 0.011715345084667206, 0.03116215392947197, -0.02170656993985176, -0.04656895250082016, 0.007939420640468597, 0.013833075761795044, 0.023371238261461258, 0.04047979786992073, -0.03485565260052681, -0.012465544044971466, 0.0020514156203716993, 0.022570181638002396, -0.049077555537223816, 0.04967251047492027, -0.03066980466246605, -0.007231414318084717, 0.13492964208126068, 0.013349877670407295, -0.009298681281507015, -0.015639979392290115, -0.06364243477582932, -0.0020186775363981724, 0.01968265138566494, -0.011694833636283875, -0.025856219232082367, -0.013572861440479755, -0.02059221640229225, 0.1158239021897316, -0.010952531360089779, -0.06239008530974388, -0.006240297574549913, 0.0009469287469983101, -0.07479529827833176, -0.005660508293658495, 0.036348868161439896, 0.043058667331933975, -0.13646671175956726, -0.025037158280611038, -0.0007904653321020305, 0.0011575402459129691, -0.05447424203157425, 0.011649535037577152, -0.008483166806399822, -0.0019912279676645994, 0.028831729665398598, 0.04727070778608322, -0.011765026487410069, -0.027211647480726242, 0.0049480777233839035, 0.040940068662166595, -0.0052922386676073074, -0.031984128057956696, -0.007359383627772331, -0.00372135522775352, 0.010502711869776249, -0.03930794820189476, -0.06393032521009445, -0.044660113751888275, -0.010585286654531956, -0.0029340169858187437, -0.021913738921284676, -0.008415451273322105, -0.033608585596084595, -0.008984008803963661, 0.03140803426504135, -0.02328166924417019, 0.015558182261884212, -0.0033230578992515802, 0.0058517856523394585, -0.022511877119541168, -0.055889200419187546, 0.052735283970832825, 0.00454354751855135, -0.018405120819807053, 0.011830635368824005, -0.02671753615140915, 0.06879764795303345, 0.0391639843583107, -0.03594271093606949, 0.07328854501247406, 0.0015935200499370694, -0.03088221698999405, -0.003974266350269318, 0.03554543852806091, 0.023443184792995453, -0.013635524548590183, -0.022901713848114014, 0.04301583394408226, -0.010203909128904343, -0.008092417381703854, 0.05374933034181595, -0.014146065339446068, -0.05961599946022034, -0.04758324474096298, -0.35671326518058777, 0.0032168831676244736, -0.0073533193208277225, 0.018093721941113472, 0.0020597365219146013, -0.05186646059155464, 0.050098489969968796, -0.004389620386064053, 0.03646790608763695, 0.056514937430620193, 0.11878839135169983, 0.0029935294296592474, -0.0007557866629213095, -0.0711435079574585, -0.01810603402554989, 0.018323438242077827, -0.005122859496623278, 0.009843296371400356, -0.029948288574814796, 0.01201496459543705, 0.0005611451924778521, -0.03446608781814575, -0.09201163798570633, -0.03498572111129761, 0.01172360498458147, -0.025866972282528877, 0.11874806135892868, 0.04878268018364906, 0.02331359125673771, -0.06502941250801086, 0.05061446875333786, 0.06410883367061615, -0.0038799182511866093, -0.12230874598026276, -0.0002946624008473009, -0.04876125976443291, 0.022821413353085518, 0.004123152233660221, 0.04567983001470566, -0.018112201243638992, -0.0632268637418747, 0.04428628832101822, -0.015029583126306534, -0.04165958613157272, -0.020908182486891747, -0.011932842433452606, 0.009938790462911129, -0.027628043666481972, -0.03589862957596779, 0.03474021330475807, 0.021429583430290222, -0.013760808855295181, 0.04265992343425751, 0.010018473491072655, 0.017151998355984688, -0.018769918009638786, -0.03797435760498047, -0.030129561200737953, 0.000520639936439693, -0.028382688760757446, 0.0032901973463594913, 0.023171814158558846, 0.03883485496044159, -0.06590016186237335, -0.009827475994825363, 0.020121552050113678, 0.009715261869132519, -0.01956154592335224, 0.05214633792638779, 0.009610513225197792, -0.005795825272798538, 0.07700985670089722, -0.024172326549887657, 0.005028011742979288, 0.02539254166185856, 0.03448862209916115, 0.008582128211855888, 0.0555596686899662, 0.010085787624120712, -0.01639290153980255, 0.03363792970776558, 0.030286721885204315, 0.040525276213884354, -0.03266114369034767, -0.01720096357166767, 0.02955743297934532, -0.0016842953627929091, 0.0034907739609479904, 0.07715032249689102, 0.028768567368388176, 0.0010286440374329686, -0.005123624112457037, -0.01685315929353237, -0.04729196056723595, 0.06273452192544937, 0.00882642064243555, -0.2670373320579529, 0.04468267038464546, 0.047942399978637695, 0.03526633232831955, -0.016751836985349655, -0.012402587570250034, 0.025647012516856194, -0.045624058693647385, -0.007720226421952248, 0.006603459361940622, 0.0013507511466741562, 0.0060729687102139, -0.016904035583138466, -0.008579823188483715, 0.035475682467222214, -0.00564585579559207, 0.034124162048101425, 0.04541226848959923, -0.013070542365312576, -0.01692785881459713, 0.0017797141335904598, -0.0564928874373436, 0.18024520576000214, 0.009960208088159561, 0.004192347638309002, 0.03128873556852341, 0.026323530822992325, -0.004107666201889515, 0.04401954635977745, 0.017205024138092995, -0.00767061673104763, -0.015776703134179115, 0.01950659230351448, -0.007708417251706123, 0.0325884148478508, -0.043951958417892456, -0.04435387998819351, 0.04198233038187027, 0.02114943414926529, -0.0009133177809417248, 0.007517983205616474, 0.03667578473687172, -0.04536789283156395, 0.04077903553843498, 0.025956138968467712, -0.027367981150746346, -0.002142632845789194, -0.03159250319004059, -0.03255826607346535, 0.02812233380973339, -0.00800107978284359, -0.05106727033853531, -0.01770884543657303, -0.0255137886852026, 0.009493008255958557, 0.06294963508844376, 0.014962773770093918, -0.01074214931577444, 0.01871832273900509, 0.04102310910820961, -0.0023670613300055265, -0.03873509168624878, 0.09703287482261658, 0.007475868333131075, 0.038206979632377625 ]
[ -0.020743591710925102, 0.044131096452474594, -0.009884021244943142, 0.012122590094804764, -0.00912842620164156, -0.005925681907683611, 0.015612801536917686, -0.0002276845625601709, -0.019564129412174225, -0.009395219385623932, 0.0009802381973713636, 0.010001026093959808, 0.028787771239876747, -0.025617700070142746, 0.016509713605046272, -0.03335493057966232, 0.013973467983305454, -0.04965480789542198, 0.05576677992939949, 0.033106520771980286, -0.05019550025463104, 0.04933394864201546, 0.03528333082795143, -0.012486307881772518, -0.037563908845186234, 0.00016504013910889626, -0.019650446251034737, 0.024401674047112465, 0.03357655927538872, -0.08878561854362488, -0.011875459924340248, 0.001973259961232543, 0.0005314700538292527, -0.014265048317611217, 0.0005887890001758933, 0.01607176661491394, 0.02204601839184761, 0.010537116788327694, -0.02766275592148304, 0.005693553946912289, -0.033082831650972366, -0.03416353091597557, 0.02310393750667572, 0.01863883249461651, -0.006093828473240137, -0.018377872183918953, -0.03393310308456421, 0.013077618554234505, -0.028932146728038788, -0.012302430346608162, -0.035647302865982056, 0.011183779686689377, -0.009531695395708084, -0.001817291253246367, -0.008305069990456104, 0.005697883665561676, -0.047073666006326675, -0.0011517720995470881, -0.011032997630536556, 0.014434892684221268, -0.015576875768601894, -0.021027276292443275, -0.049890320748090744, -0.02602193132042885, 0.010654664598405361, -0.007890374399721622, -0.022924575954675674, 0.03881193324923515, -0.007056214846670628, 0.018261300399899483, -0.02514905482530594, 0.022057699039578438, -0.04713468253612518, -0.0265180841088295, -0.013150308281183243, -0.016199413686990738, -0.022211549803614616, -0.027782971039414406, 0.016171708703041077, -0.014036283828318119, -0.04701804369688034, -0.02784358710050583, 0.041642192751169205, 0.015019422397017479, 0.020421963185071945, -0.053142521530389786, 0.006227890029549599, 0.0010055009042844176, -0.042698297649621964, -0.029904190450906754, -0.016298409551382065, 0.029377011582255363, -0.0026084505952894688, 0.047526102513074875, -0.1101260557770729, -0.0017981913406401873, -0.0004962680395692587, 0.01229692343622446, -0.0002809168363455683, 0.842680811882019, -0.010970660485327244, 0.0076861088164150715, 0.04584125429391861, 0.018530908972024918, -0.01600019261240959, -0.03685256093740463, 0.02051626518368721, 0.005420916713774204, 0.02449188567698002, -0.030654625967144966, -0.0025521705392748117, -0.0054479376412928104, 0.0028096302412450314, -0.02034255489706993, 0.022383205592632294, 0.03825617954134941, -0.0221689622849226, 0.039268288761377335, 0.006952542811632156, 0.02386458031833172, 0.017482584342360497, -0.006885722745209932, 0.005659374874085188, -0.010461379773914814, 0.005788545124232769, -0.16450291872024536, 0.04555954039096832, -6.672654744192344e-33, 0.0468725822865963, -0.014536733739078045, -0.02772161364555359, -0.0021726188715547323, 0.02926092967391014, 0.011724201031029224, -0.04470960050821304, -0.01331262569874525, -0.02869013510644436, -0.025067120790481567, 0.01612544059753418, 0.0005734742735512555, 0.025045737624168396, -0.014505058526992798, 0.03959812596440315, 0.000025351453587063588, 0.01707194186747074, 0.05750845745205879, 0.007885247468948364, -0.005238184705376625, 0.057729125022888184, 0.010012896731495857, 0.05464102700352669, 0.020236123353242874, -0.015232345089316368, 0.05477308854460716, 0.012362916022539139, 0.01627691276371479, 0.010757135227322578, -0.04295876994729042, -0.02143743261694908, 0.006064508110284805, 0.02702069841325283, -0.04949551448225975, -0.0013444196665659547, -0.05322395637631416, -0.04745382443070412, -0.003210307564586401, -0.037676356732845306, -0.008326290175318718, -0.01457881834357977, 0.003656456246972084, -0.04238951951265335, -0.04360610991716385, -0.048142995685338974, 0.008893024176359177, -0.01259264163672924, 0.01850423961877823, -0.0019153491593897343, -0.00025941073545254767, -0.005228862632066011, -0.02450420893728733, -0.006960809696465731, 0.028192799538373947, -0.03232203423976898, 0.03089235909283161, 0.013047104701399803, 0.01663607731461525, 0.021858811378479004, -0.010538019239902496, 0.021042311564087868, -0.021581098437309265, 0.03357257694005966, 0.025172937661409378, -0.003976431675255299, -0.008875058963894844, 0.025495050475001335, 0.018837017938494682, -0.0049069905653595924, 0.030054043978452682, -0.04090915620326996, 0.035925254225730896, -0.01837918534874916, -0.012100119143724442, 0.04996083676815033, -0.028087064623832703, 0.016027022153139114, 0.002767307450994849, 0.010880129411816597, 0.03239217773079872, 0.006903498433530331, -0.006396022159606218, -0.0010871554259210825, -0.045393798500299454, -0.022285498678684235, -0.018508149310946465, 0.024627894163131714, -0.03516778722405434, -0.029728299006819725, 0.012373371981084347, -0.008965746499598026, 0.04679825156927109, 0.0023620210122317076, -0.030078262090682983, -0.016389282420277596, 6.366478873421448e-33, 0.0324908085167408, 0.003397299675270915, -0.006328200455754995, -0.012866843491792679, 0.06394942104816437, 0.01595834083855152, 0.0732414647936821, 0.03432009369134903, -0.0014009810984134674, 0.03694025054574013, -0.024765903130173683, -0.01049907598644495, -0.017942233011126518, -0.0053115119226276875, 0.03230605646967888, 0.010491803288459778, 0.0459730438888073, -0.008683416061103344, 0.015524744987487793, -0.006739340256899595, -0.046136777848005295, -0.018442828208208084, 0.016604777425527573, 0.008780214935541153, 0.025403495877981186, 0.025938326492905617, -0.008749498054385185, -0.015307756140828133, -0.020221611484885216, 0.015101765282452106, 0.016573768109083176, -0.020883215591311455, -0.0281575508415699, 0.017143864184617996, 0.01601657085120678, 0.06337601691484451, 0.011500480584800243, 0.008948324248194695, -0.0122357914224267, 0.005768341012299061, 0.06338890641927719, 0.015160491690039635, -0.023773208260536194, 0.021273862570524216, 0.025447029620409012, -0.006904519163072109, -0.01906808279454708, 0.009437390603125095, -0.07487578690052032, -0.011244826018810272, 0.014373225159943104, 0.03884223476052284, 0.01270176563411951, 0.004498001653701067, 0.0005003063706681132, -0.012534892186522484, 0.0009444713359698653, 0.02021760679781437, -0.042142316699028015, -0.009551012888550758, -0.016768820583820343, -0.018605826422572136, -0.05343441292643547, 0.03552921861410141, -0.010625703260302544, -0.00717727467417717, -0.03434839844703674, 0.007829871959984303, 0.0006006018375046551, 0.0022382205352187157, -0.018567340448498726, -0.03140101209282875, -0.014866653829813004, 0.018797755241394043, -0.005026988685131073, 0.01424975972622633, -0.008559629321098328, -0.009263933636248112, -0.007699909619987011, 0.011288433335721493, 0.021177275106310844, 0.02185027301311493, 0.005975757259875536, -0.015230290591716766, -0.006876888684928417, 0.02264285832643509, -0.03372778370976448, 0.010593976825475693, 0.039470791816711426, -0.013060716912150383, 0.007893714122474194, -0.03850984945893288, 0.009091817773878574, 0.0036356612108647823, 0.017150741070508957, -1.25950698759425e-8, -0.041247278451919556, 0.0015809540636837482, -0.013148078694939613, 0.002580286469310522, 0.013478362932801247, 0.0031515646260231733, -0.026575101539492607, -0.007642762269824743, 0.005970143713057041, 0.013652765192091465, 0.0526861809194088, -0.0314335823059082, -0.0032479288056492805, 0.03165874257683754, -0.0020868247374892235, -0.048190515488386154, 0.01600334234535694, 0.006515147630125284, 0.005770354997366667, 0.012999101541936398, 0.03428810462355614, 0.0235399529337883, 0.02014128305017948, -0.010839591734111309, -0.0026285124476999044, 0.004112134221941233, 0.00412270100787282, -0.08271946758031845, -0.02475621923804283, -0.0388706810772419, 0.013246686197817326, -0.0276904609054327, -0.04102811962366104, 0.0007893790025264025, -0.0168682299554348, -0.014610648155212402, 0.005341627169400454, 0.024711498990654945, 0.01411435566842556, 0.030232714489102364, 0.026519937440752983, -0.009112115018069744, -0.011343862861394882, -0.028406597673892975, -0.03867119550704956, 0.00888228788971901, -0.03903825953602791, 0.005219967570155859, 0.023968173190951347, 0.004110334906727076, -0.007166962139308453, -0.016417916864156723, 0.006163433659821749, 0.014692101627588272, 0.01035549957305193, -0.006515783723443747, 0.012471300549805164, 0.008280296809971333, -0.003986218944191933, 0.005630399100482464, 0.012631774879992008, 0.011496171355247498, -0.017291216179728508, -0.029582971706986427 ]
dash-parallelise-file-downloads
https://markhneedham.com/blog/2023/12/11/dash-parallelise-file-downloads
false
2023-12-23 00:44:37
Experimenting with insanely-fast-whisper
[ "whisper", "openai", "til" ]
[ "TIL" ]
:icons: font I recently came across https://github.com/Vaibhavs10/insanely-fast-whisper[insanely-fast-whisper^], a CLI tool that you can use to transcribe audio files using https://huggingface.co/openai/whisper-large-v3[OpenAI's whisper-large-v3 model^] or other smaller models. In this blog post, I'll summarise my experience using it to transcribe one of Scott Galloway's podcast episodes. I listen to podcasts on Player.FM and we'll use the https://player.fm/series/the-prof-g-pod-with-scott-galloway/prof-g-markets-scotts-nine-businesses[Prof G Markets: Scott’s Nine Businesses^] episode. If we append `.json` to the URL, we'll get the https://player.fm/series/the-prof-g-pod-with-scott-galloway/prof-g-markets-scotts-nine-businesses.json[JSON metadata^] for the podcast. [source, bash] ---- curl \ -H "Accept: application/json" \ --compressed \ https://player.fm/series/the-prof-g-pod-with-scott-galloway/prof-g-markets-scotts-nine-businesses.json 2>/dev/null ---- .Output [source, json] ---- { "type": "episode", "id": 386048284, "slug": "prof-g-markets-scotts-nine-businesses", "explicit": false, "mediaType": "audio/mpeg", "rawTitle": "prof g market scott s busi", "title": "Prof G Markets: Scott’s Nine Businesses", "url": "https://www.podtrac.com/pts/redirect.mp3/pdst.fm/e/chrt.fm/track/524GE/traffic.megaphone.fm/VMP5922871816.mp3?updated=1701050904", "publishedAt": 1701075600, "lookup": "https://player.fm/series/2629939/386048284.json", "share": "https://player.fm/1Balmje", "size": 0, "duration": 3256, "description": "<p>Scott tells the story of his career in entrepreneurship, from starting a video rental company before business school, to going public with Red Envelope, to founding Prof G Media. He shares what was most meaningful about those experiences, and what was most surprising.</p><p>Learn more about your ad choices. Visit <a href=\"https://podcastchoices.com/adchoices\">podcastchoices.com/adchoices</a></p>", "image": { "url": "https://megaphone.imgix.net/podcasts/6769b2f4-3513-11ed-80e4-f37d796024b6/image/3e611f.png?ixlib=rails-4.3.1&max-w=3000&max-h=3000&fit=crop&auto=format,compress", "type": "image" }, "series": { "type": "series", "id": 2629939, "slug": "the-prof-g-pod-with-scott-galloway", "access": "public", "currentURL": "https://feeds.megaphone.fm/WWO6655869236", "url": "https://feeds.megaphone.fm/WWO6655869236", "author": "Vox Media Podcast Network", "mediaKind": "audio", "updatedAt": 1703149585, "fingerprint": "OfxuCQYPnerfKAGIJams50OQEFXQ,Ufh9dcOyNk_0eM", "descriptionFingerprint": "xN61CKwuMT87BElgYpgS5gqzI5xnI50UvHDxPiKe_9g", "title": "The Prof G Pod with Scott Galloway", "home": "https://podcasts.voxmedia.com/show/the-prof-g-show-with-scott-galloway", "language": "en", "imageURL": "https://megaphone.imgix.net/podcasts/e36115c4-4db6-11ea-be1c-87cdcc67bd9e/image/Tile.png?ixlib=rails-4.3.1&max-w=3000&max-h=3000&fit=crop&auto=format,compress", "fetch": {"status": "ok", "confidence": 9}, "fetchStatus": "ok", "lookup": "https://player.fm/series/2629939.json", "latestLookup": "https://player.fm/series/2629939/at/1703149585.json", "relatedLookup": "https://player.fm/related-to/the-prof-g-pod-with-scott-galloway.json", "share": "https://player.fm/series/the-prof-g-pod-with-scott-galloway", "stats": { "numberOfSubscriptions": 1558, "numberOfEpisodes": 486, "averageDuration": 2112, "averageInterval": 144514, "earliestPublishedAt": 1581525840, "latestPublishedAt": 1703149200, "manualSubscriptionsCentile": 0.985, "shortTrendCentile": 0.12, "longTrendCentile": 0.99 }, "tags": [ { "type": "tag", "id": 506, "title": "Careers", "rawTitle": "career", "language": "en", "polar": 0.5, "topic": {"id": 658, "owner": {"id": 3}, "title": "Careers"}, "ancestors": null, "series": {"amount": 17308, "centile": 0.991}, "sources": ["categories"] }, { "type": "tag", "id": 1218967, "title": "Section 4 / Westwood One Podcast Network", "rawTitle": "section-4-westwood-network", "language": "en", "polar": 0.5, "sources": ["owner"] }, { "type": "tag", "id": 225, "title": "Business Trends", "rawTitle": "busi-trend", "language": "en", "polar": 0.7, "topic": { "id": 1695746, "owner": {"id": 3}, "title": "Business Trends" }, "ancestors": null, "series": {"amount": 114, "centile": 0.941}, "sources": ["featured"] }, { "type": "tag", "id": 125, "title": "Business", "rawTitle": "busi", "language": "en", "polar": 0.5, "topic": {"id": 932129, "owner": {"id": 3}, "title": "Business"}, "ancestors": null, "series": {"amount": 112273, "centile": 0.997}, "sources": ["featured"] }, { "type": "tag", "id": 256, "title": "Entrepreneur", "rawTitle": "entrepreneur", "language": "en", "polar": 0.5, "topic": {"id": 17993, "owner": {"id": 3}, "title": "Entrepreneur"}, "ancestors": null, "series": {"amount": 25242, "centile": 0.991}, "sources": ["featured"] } ], "image": { "type": "image", "id": 26431330, "url": "https://megaphone.imgix.net/podcasts/e36115c4-4db6-11ea-be1c-87cdcc67bd9e/image/Tile.png?ixlib=rails-4.3.1&max-w=3000&max-h=3000&fit=crop&auto=format,compress", "urlBase": "https://cdn.player.fm/images/26431330/series/u3mGVUW4HakPKQ0o", "palette": ["4eafb8", "091011"], "suffix": "jpg" }, "description": "Bestselling author, professor and entrepreneur Scott Galloway combines business insight and analysis with provocative life and career advice. On Mondays, Prof G Markets breaks down what’s moving the capital markets, teaching the basics of financial literacy so you can build economic security. Wednesdays, during Office Hours, Scott answers your questions about business, career, and life. Thursdays, Scott has a conversation with a blue-flame thinker in the innovation economy. And Scott closes the week on Saturdays with his Webby Award–winning newsletter, No Mercy / No Malice, as read by actor and raconteur George Hahn. To resist is futile… Want to get in touch? Email us, officehours@profgmedia.com", "backgroundColor": "#D81422", "network": {"name": "Vox Media Podcast Network"} }, "versionInfo": "1.1.0" } ---- We're mostly interested in the `url`, so let's update the command to extract that using `jq`: [source, bash] ---- curl \ -H "Accept: application/json" \ --compressed \ https://player.fm/series/the-prof-g-pod-with-scott-galloway/prof-g-markets-scotts-nine-businesses.json 2>/dev/null | jq '.url' ---- [source, text] ---- "https://www.podtrac.com/pts/redirect.mp3/pdst.fm/e/chrt.fm/track/524GE/traffic.megaphone.fm/VMP5922871816.mp3?updated=1701050904" ---- I downloaded that to my machine and then installed insanely-fast-whisper: [source, bash] ---- pipx install insanely-fast-whisper==0.0.12 ---- Once that was installed, I ran it using the `openai/whisper-large-v3` model [source, bash] ---- insanely-fast-whisper \ --file-name VMP5922871816.mp3 \ --device-id mps \ --model-name openai/whisper-large-v3 \ --batch-size 4 \ --transcript-path profg.jsons ---- .Output [source, text] ---- 🤗 Transcribing... ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0:13:37 Voila!✨ Your file has been transcribed go check it out over here 👉 profg.json ---- You can see from the output that it took just over 13 minutes to transcribe this file, which is 54 minutes long. This is nowhere near as fast as Vaibhav Srivastav (the author) was able to achieve on a Nvidia A100 - 80GB. He later posted a LinkedIn message where he showed how to use the tool with the https://huggingface.co/distil-whisper/distil-small.en[distil-whisper/distil-small.en^] model. ++++ <iframe src="https://www.linkedin.com/embed/feed/update/urn:li:ugcPost:7139995906757537792" height="914" width="504" frameborder="0" allowfullscreen="" title="Embedded post"></iframe> ++++ This is a small model and the Hugging Face says the following: [blockquote] ____ Distil-Whisper was proposed in the paper Robust Knowledge Distillation via Large-Scale Pseudo Labelling. It is a distilled version of the Whisper model that is 6 times faster, 49% smaller, and performs within 1% WER on out-of-distribution evaluation sets. This is the repository for distil-small.en, a distilled variant of Whisper small.en. It is the smallest Distil-Whisper checkpoint, with just 166M parameters, making it the ideal choice for memory constrained applications (e.g. on-device). ____ I gave this a try by running the following command: [source, bash] ---- insanely-fast-whisper \ --file-name VMP5922871816.mp3 \ --device-id mps \ --model-name distil-whisper/distil-small.en \ --batch-size 4 \ --transcript-path profg-small.json ---- I'm using an Apple M1 Max with 64GB RAM and below is the amount of time that it took for various batch sizes: [options="header"] |=== | Batch Size | Time |1 |08:54 | 2 | 06:50 |3 | 06:57 |4 | 06:40 |5 | 07:15 | 6 | 07:26 | 8 | 07:30 | 12 | 08:42 |=== And if we want to do this directly in code, we can run the following script: [source, python] ---- import torch from transformers import pipeline import time pipe = pipeline( "automatic-speech-recognition", model="distil-whisper/distil-small.en", torch_dtype=torch.float16, device="mps", model_kwargs={"use_flash_attention_2": False}, ) start = time.time() outputs = pipe( "VMP5922871816.mp3", chunk_length_s=30, batch_size=4, return_timestamps=True ) end = time.time() print(outputs) print(end - start) ----
In this post, we'll learn how to use insanely-fast-whisper to generate a transcript for one of Scott Galloway's podcast episodes.
uploads/2023/12/whisper-banner.png
[ -0.005841398146003485, -0.00046521949116140604, -0.0015155504224821925, 0.041772857308387756, 0.095832459628582, 0.03452040255069733, 0.04448774456977844, 0.05296279862523079, -0.006742758676409721, -0.03219005465507507, 0.0031558319460600615, 0.023769646883010864, -0.062132466584444046, 0.020583858713507652, -0.010351764038205147, 0.0746905654668808, 0.04929199814796448, 0.008900757879018784, 0.017737332731485367, 0.011543206870555878, 0.04444441199302673, 0.06752972304821014, 0.023225681856274605, 0.04083019867539406, 0.010589051991701126, 0.012602684088051319, -0.004171315114945173, 0.016758035868406296, -0.06477099657058716, -0.011108716018497944, 0.030261585488915443, -0.016900207847356796, 0.006508932448923588, 0.00026073362096212804, 0.015884000808000565, 0.003892934648320079, -0.010153929702937603, 0.005870000459253788, 0.0015925143379718065, 0.017994262278079987, -0.07035937160253525, 0.006793339271098375, -0.0030862600542604923, 0.0044300751760602, -0.051242321729660034, 0.0047639221884310246, -0.06296485662460327, 0.015627242624759674, -0.008654923178255558, 0.003967829514294863, -0.051794711500406265, 0.036672815680503845, -0.007414838764816523, -0.014049045741558075, -0.0023533604107797146, 0.03525511547923088, 0.016375545412302017, -0.060167182236909866, 0.00042941607534885406, -0.04660565033555031, 0.007687729317694902, -0.02415900118649006, 0.0037516667507588863, 0.0019904361106455326, 0.009252030402421951, -0.037397563457489014, -0.011817766353487968, 0.06154625490307808, -0.05218880623579025, -0.0342230349779129, -0.022327685728669167, 0.025391394272446632, -0.004073710646480322, -0.02713344246149063, 0.03292233869433403, -0.06373923271894455, 0.0028486100491136312, 0.06585626304149628, 0.02595919743180275, 0.05728154629468918, -0.022903071716427803, 0.024217514321208, 0.011958339251577854, 0.03723667189478874, -0.02539689838886261, -0.06865754723548889, -0.022435056045651436, -0.0035929365549236536, -0.07258263230323792, 0.05034921318292618, 0.005884713493287563, -0.06871794164180756, 0.01606179028749466, 0.027005814015865326, -0.00315868784673512, 0.011388758197426796, 0.018074296414852142, -0.01118011400103569, -0.029779385775327682, 0.008428932167589664, -0.047695424407720566, -0.01649070531129837, 0.03473713621497154, 0.028741465881466866, -0.08318803459405899, 0.006244988646358252, -0.01246015727519989, -0.0005596188129857183, -0.005354816559702158, 0.006615184713155031, 0.009347663260996342, -0.0014065109426155686, -0.011422006413340569, 0.00398773979395628, -0.06100902333855629, 0.08057112246751785, 0.039350226521492004, -0.04424338787794113, 0.0023589679040014744, 0.02852647192776203, 0.0499979630112648, 0.03703133389353752, -0.035664379596710205, 0.08444227278232574, 0.017096849158406258, -0.0030962228775024414, -0.01782079041004181, 0.045088864862918854, -0.014030744321644306, -0.04377337917685509, -0.018483266234397888, 0.06224390119314194, 0.0005177915445528924, 0.023999135941267014, -0.0015641662757843733, -0.008120927959680557, 0.003276275936514139, 0.005304749123752117, 0.03278174623847008, 0.019426068291068077, -0.00800458062440157, -0.008338290266692638, -0.01409186515957117, 0.008758659474551678, 0.03370383381843567, -0.011513635516166687, -0.031958889216184616, -0.048779625445604324, -0.030557725578546524, 0.00597426388412714, -0.01666586473584175, 0.0015468377387151122, 0.07315578311681747, -0.04221794009208679, 0.0006766417063772678, 0.0909491628408432, 0.039433058351278305, 0.005318228155374527, -0.004441081080585718, 0.00564410537481308, 0.0370149165391922, 0.035319458693265915, -0.009957858361303806, 0.01801821030676365, 0.007363278418779373, -0.02141888625919819, -0.0061921169981360435, 0.051513977348804474, -0.022882623597979546, 0.0054639726877212524, -0.043932702392339706, -0.032282546162605286, 0.06619692593812943, -0.0047135790809988976, -0.024516597390174866, 0.05353144183754921, 0.09362984448671341, 0.04325992614030838, 0.02743111550807953, 0.014114714227616787, -0.10130125284194946, 0.02741217613220215, 0.023441331461071968, 0.015692569315433502, 0.032377198338508606, -0.012341740541160107, 0.07166550308465958, 0.021462658420205116, 0.03502564877271652, 0.06034611910581589, -0.05712978541851044, -0.07122798264026642, -0.007059447932988405, -0.006266688462346792, 0.05644315108656883, -0.027768362313508987, 0.01771138794720173, 0.06137664616107941, 0.020939676091074944, 0.03777375817298889, 0.027901066467165947, -0.0031451694667339325, 0.02306571789085865, -0.055043354630470276, -0.05759426951408386, 0.04815864562988281, 0.029062556102871895, -0.017576176673173904, -0.01457317266613245, 0.01868683472275734, -0.03092036023736, 0.005683174356818199, 0.0567898228764534, -0.005577910225838423, 0.029102185741066933, -0.026551704853773117, 0.04891342669725418, -0.029065387323498726, 0.015826568007469177, -0.053854770958423615, 0.016686296090483665, -0.0018235475290566683, -0.013670812360942364, 0.020807217806577682, -0.024514762684702873, 0.1278817355632782, 0.06772249191999435, -0.03750219941139221, -0.03202016279101372, 0.017622586339712143, 0.010536696761846542, -0.026458891108632088, -0.014465291053056717, -0.028197335079312325, -0.004246800672262907, 0.017471587285399437, -0.05216560140252113, -0.030577125027775764, 0.01093347743153572, -0.048912566155195236, 0.015840861946344376, 0.05133061483502388, -0.01961999386548996, 0.06037323921918869, 0.013715551234781742, -0.0012819550465792418, -0.007987556047737598, -0.030753890052437782, -0.035192448645830154, -0.018317213281989098, 0.0018716041231527925, -0.007341010496020317, 0.027517171576619148, -0.041464436799287796, 0.0029653790406882763, -0.034591931849718094, -0.023912813514471054, 0.033909790217876434, 0.048619478940963745, 0.043532732874155045, -0.016133220866322517, 0.0378463938832283, -0.013285764493048191, 0.004527484532445669, -0.009125400334596634, -0.0502336360514164, -0.019558172672986984, -0.025202684104442596, 0.005161449313163757, -0.011929993517696857, 0.01889246329665184, 0.037374645471572876, 0.007925286889076233, 0.017496541142463684, 0.029256772249937057, -0.002439480973407626, 0.049148157238960266, 0.000884579261764884, 0.01012814324349165, -0.010753311216831207, -0.017804600298404694, 0.04942848160862923, -0.039147429168224335, -0.03258606418967247, -0.004281922243535519, -0.07093892246484756, 0.002630300121381879, -0.044677734375, -0.025661692023277283, -0.01014429610222578, -0.021716283634305, 0.025564605370163918, 0.01564742997288704, 0.02578534185886383, 0.034874819219112396, 0.0001428996038157493, 0.01987035758793354, 0.011402836069464684, -0.010560408234596252, 0.038222458213567734, -0.00020913692424073815, 0.01699063554406166, 0.060246169567108154, 0.00622703367844224, -0.025983499363064766, -0.06895924359560013, 0.025666112080216408, -0.05875805392861366, -0.28576892614364624, 0.03312230482697487, -0.006067206617444754, -0.055512115359306335, 0.021314548328518867, -0.003827652195468545, 0.014755738899111748, -0.06072699651122093, -0.011630343273282051, 0.02667282149195671, -0.028780845925211906, -0.022220531478524208, -0.02320827916264534, 0.01907000131905079, 0.01571318693459034, -0.0023084133863449097, -0.02988927625119686, -0.036272745579481125, -0.004215732682496309, 0.02905573509633541, -0.00006715616473229602, -0.055100876837968826, 0.006855370942503214, 0.042769573628902435, 0.041233595460653305, 0.05216958001255989, -0.07645031064748764, 0.014810125343501568, -0.026891864836215973, -0.018347403034567833, 0.025789164006710052, -0.023755373433232307, 0.0028420842718333006, 0.011830460280179977, -0.013171377591788769, -0.03462687134742737, 0.03645886480808258, -0.006410353351384401, 0.02362971380352974, -0.013227659277617931, -0.009717198088765144, -0.0179792158305645, 0.013340095058083534, 0.00427697878330946, 0.08429323136806488, -0.0003059440350625664, -0.055475421249866486, 0.009818071499466896, -0.048794351518154144, 0.08152163028717041, -0.026675213128328323, -0.03538506478071213, -0.04292107746005058, 0.02028103731572628, 0.014516589231789112, -0.010349350050091743, 0.0007653626380488276, 0.0015157172456383705, -0.03424904868006706, -0.025246500968933105, 0.011350534856319427, -0.03231361508369446, -0.03933529928326607, -0.04214068129658699, -0.0133383609354496, -0.07869895547628403, -0.05929488316178322, -0.004549441393464804, 0.10100162029266357, 0.033336035907268524, -0.04403258487582207, -0.0007925219833850861, 0.010717454366385937, -0.10026708990335464, -0.00018805627769324929, -0.022611618041992188, -0.03444645553827286, 0.034071557223796844, -0.013430335558950901, 0.06184800714254379, -0.04808535426855087, -0.028215697035193443, 0.021349932998418808, 0.009820476174354553, 0.0007651183987036347, -0.026987140998244286, 0.010210628621280193, 0.012564076110720634, -0.004906650632619858, -0.004043960012495518, 0.06285013258457184, -0.0444677397608757, -0.03214086964726448, -0.00697970250621438, 0.006646729540079832, -0.004307033494114876, 0.015739846974611282, 0.008716108277440071, 0.028392644599080086, 0.04458325356245041, 0.011728954501450062, -0.07448086142539978, -0.00012267689453437924, -0.04957981035113335, 0.002591413911432028, 0.0058099012821912766, -0.06139582023024559, -0.0028682921547442675, 0.035295818001031876, 0.0074179694056510925, -0.008552782237529755, -0.025707485154271126, 0.015606929548084736, -0.060434818267822266, -0.030469248071312904, -0.021072151139378548, 0.028253942728042603, 0.06403059512376785, 0.02707613632082939, -0.04086562246084213, -0.019922945648431778, 0.024027783423662186, -0.009981638751924038, -0.02278030849993229, -0.059289805591106415, 0.0012941684108227491, 0.00013513994053937495, 0.0016893333522602916, 0.0012204174418002367, 0.0038963952101767063, -0.01911698468029499, -0.005140945315361023, 0.012090185657143593, -0.03237311914563179, 0.043942149728536606, -0.01574290730059147, -0.03935501351952553, -0.034653838723897934, 0.021276550367474556, 0.015553344041109085, 0.0002821410307660699, -0.002320896601304412, 0.00890512578189373, 0.0033640097826719284, 0.04619491472840309, 0.003966646734625101, 0.011730791069567204, -0.022202972322702408, -0.004159776493906975, -0.010210101492702961, 0.023890754207968712, -0.04256407916545868, 0.009809300303459167, -0.03223505988717079, -0.01095422450453043, -0.003509112633764744, 0.03854360058903694, -0.016574516892433167, -0.01381449680775404, -0.03728308156132698, 0.03623918816447258, -0.042796917259693146, -0.022389303892850876, 0.0025412598624825478, 0.00544809689745307, 0.05097576603293419, -0.008636601269245148, 0.012414397671818733, 0.009197669103741646, -0.004401166923344135, 0.012049290351569653, -0.007530559320002794, -0.03520795330405235, 0.00755473505705595, 0.006772748194634914, -0.024635067209601402, -0.000413381407270208, 0.016077984124422073, 0.04472289979457855, 0.06210308521986008, 0.014349582605063915, -0.0239133071154356, 0.00007088528946042061, 0.016121119260787964, 0.06918786466121674, 0.016432611271739006, -0.03157037869095802, -0.01158833410590887, -0.0161521565169096, -0.03211226314306259, -0.039893005043268204, -0.011633099988102913, -0.009443108923733234, -0.020325856283307076, -0.02334122359752655, -0.08803539723157883, 0.029499836266040802, 0.006123359780758619, 0.010922476649284363, 0.01675410568714142, -0.049651943147182465, 0.01538216881453991, -0.028360625728964806, 0.012350001372396946, 0.03734661638736725, -0.07678734511137009, 0.0098840007558465, -0.018028028309345245, -0.01053863950073719, -0.006149371154606342, 0.014942195266485214, -0.050397876650094986, -0.02518116869032383, 0.0026187163311988115, 0.014781520701944828, -0.05634183809161186, -0.03838473558425903, -0.012680944055318832, 0.022632809355854988, -0.010838144458830357, 0.0025066339876502752, -0.03496754169464111, -0.012457909993827343, 0.003227818990126252, -0.025062233209609985, 0.00487891398370266, -0.035201121121644974, 0.004847400356084108, 0.02068905718624592, -0.02947399765253067, 0.022216439247131348, -0.04506371542811394, 0.0243526641279459, 0.036096639931201935, -0.010071014985442162, 0.0007856580778025091, -0.038054678589105606, -0.009231251664459705, -0.010877168737351894, 0.08192374557256699, 0.0390661247074604, -0.006916783284395933, -0.042987022548913956, 0.005893796216696501, -0.027054179459810257, 0.030031468719244003, 0.006872938014566898, -0.004256815183907747, 0.01810435578227043, 0.05876322463154793, 0.012552677653729916, 0.009647438302636147, -0.044467613101005554, -0.03148782253265381, 0.062231481075286865, -0.08178509771823883, -0.015554222278296947, 0.01710652932524681, -0.05477964133024216, 0.027038978412747383, 0.026083320379257202, 0.026082007214426994, -0.03866364434361458, 0.027109747752547264, 0.041400425136089325, 0.018640652298927307, 0.012462693266570568, 0.0034735086373984814, 0.02313515916466713, -0.02312399260699749, 0.009673606604337692, -0.0821739062666893, 0.014750338159501553, 0.013410530984401703, -0.0016810905653983355, -0.009735039435327053, 0.0448559932410717, -0.026348046958446503, 0.03677772358059883, -0.06302956491708755, -0.025168271735310555, 0.022933771833777428, -0.029993820935487747, -0.012945822440087795, 0.0323263481259346, -0.05785239487886429, 0.04062458127737045, 0.021657481789588928, -0.03915141522884369, -0.011633197776973248, 0.0003258798969909549, 0.06226847320795059, 0.01105548720806837, 0.05277625098824501, -0.024969233199954033, -0.034978222101926804, 0.06376427412033081, 0.001553777721710503, 0.011622468940913677, 0.039261456578969955, -0.00471988832578063, 0.04657820984721184, 0.03158493712544441, -0.013155315071344376, 0.028647124767303467, 0.002742469310760498, -0.017003467306494713, -0.07914415001869202, 0.0217030830681324, -0.01103297621011734, -0.027884382754564285, -0.04299970716238022, 0.06304671615362167, 0.029505111277103424, -0.00807267427444458, -0.07676775753498077, 0.026770496740937233, -0.036289032548666, -0.009655813686549664, 0.0009903468890115619, -0.002866920083761215, -0.06157407909631729, 0.04904964938759804, -0.0015622366918250918, 0.02364024706184864, 0.06252644211053848, 0.0029797113966196775, -0.008310548961162567, -0.008005824871361256, 0.08683957904577255, 0.06485261023044586, 0.04993138462305069, -0.008933503180742264, 0.07376866787672043, -0.05061342567205429, -0.04275839030742645, -0.0007155317580327392, 0.02613176964223385, -0.012799717485904694, -0.005072901491075754, 0.002526950789615512, 0.0791497528553009, -0.02492658980190754, 0.08403029292821884, -0.029286624863743782, -0.03283839300274849, -0.0202652495354414, 0.00026498129591345787, 0.019417786970734596, 0.020474636927247047, 0.005035868845880032, 0.026612717658281326, -0.021326322108507156, -0.042087748646736145, 0.044093057513237, 0.005895608104765415, -0.013713977299630642, 0.023360831663012505, -0.026002299040555954, 0.06270092725753784, -0.007407222408801317, 0.019490981474518776, 0.0795622244477272, -0.041326090693473816, 0.006975916214287281, -0.0037699067033827305, 0.024875175207853317, 0.007255028933286667, 0.03506488725543022, -0.010928919538855553, -0.010521728545427322, -0.007249888963997364, -0.027608616277575493, -0.01787390373647213, -0.020673776045441628, -0.0061123124323785305, 0.027009090408682823, -0.002109125955030322, 0.02127787470817566, 0.047057878226041794, -0.0018120394088327885, -0.038929667323827744, -0.05233092978596687, -0.05162954702973366, -0.0627414882183075, -0.04082443565130234, -0.022384436801075935, -0.007487185299396515, -0.021608516573905945, -0.07295387238264084, -0.022921636700630188, -0.04260098189115524, -0.006705951876938343, 0.014952536672353745, -0.05347723513841629, -0.05683290958404541, 0.028886426240205765, 0.00992469023913145, 0.011589479632675648, 0.0003113940474577248, 0.06100637465715408, -0.005540618672966957, -0.039490602910518646, -0.02525988407433033, 0.010586618445813656, 0.03761577233672142, 0.009550479240715504, 0.018338849768042564, -0.08086453378200531, 0.019269848242402077, 0.023927930742502213, -0.01519937627017498, -0.07128754258155823, 0.016751635819673538, 0.02597116120159626, -0.004197720903903246, 0.06602729856967926, 0.013665935024619102, 0.01859470270574093, -0.05300087109208107, -0.02486972138285637, 0.002594504039734602, -0.008679916150867939, 0.03687366098165512, -0.01582162268459797, 0.11373012512922287, 0.034869302064180374, -0.0033030735794454813, -0.05786334350705147, -0.00911774393171072, 0.0061865742318332195, 0.017129793763160706, -0.03427046537399292, -0.0328349806368351, -0.027828983962535858, -0.08651885390281677, -0.03508109971880913, 0.006663787178695202, -0.012322571128606796, -0.049523722380399704, 0.03304225951433182, -0.0014315330190584064, -0.020672673359513283, 0.025573905557394028, -0.0716085433959961, -0.00027454853989183903, 0.01058894582092762, -0.0029420095961540937, -0.029057111591100693, 0.026865731924772263, -0.008418907411396503, -0.013205495662987232, 0.03643617779016495, -0.048599112778902054, 0.01432104967534542, -0.003919895272701979, 0.022671803832054138, 0.054520249366760254, 0.013076680712401867, -0.026315374299883842 ]
[ -0.07184455543756485, -0.038321517407894135, -0.03651868924498558, -0.04096350073814392, 0.062372684478759766, -0.03628768026828766, -0.020908787846565247, 0.013625475578010082, -0.0039942278526723385, -0.012309584766626358, -0.01402826514095068, -0.017600391060113907, -0.0037271007895469666, -0.01132433395832777, 0.11533480882644653, -0.0015379971591755748, 0.04210434481501579, -0.06913258880376816, -0.006833513732999563, 0.03899499401450157, 0.012854975648224354, -0.008782637305557728, -0.01649894379079342, -0.026440126821398735, -0.030238738283514977, 0.0009784139692783356, 0.05540580675005913, -0.027874326333403587, -0.0004882591892965138, -0.19892093539237976, 0.009770071133971214, -0.0011629571672528982, 0.05213850364089012, -0.02188955433666706, -0.007849625311791897, 0.043912287801504135, -0.006952371448278427, 0.017279982566833496, -0.015334634110331535, 0.035431962460279465, 0.045413900166749954, 0.022893432527780533, -0.05378265306353569, -0.031147770583629608, 0.06470558792352676, -0.01953555829823017, -0.00764046935364604, -0.009894153103232384, -0.003579320153221488, 0.0207815058529377, -0.05903283506631851, 0.011127769947052002, -0.0016734887612983584, -0.010841761715710163, -0.01790958270430565, 0.0018996350700035691, 0.07056368887424469, 0.052220746874809265, 0.02854214236140251, 0.013591299764811993, 0.0004130388260819018, -0.006829380989074707, -0.1291341483592987, 0.13832853734493256, -0.006546211428940296, 0.04655321314930916, -0.0029259182047098875, -0.006839616224169731, -0.016303181648254395, 0.05727795511484146, 0.017434565350413322, -0.0390927717089653, -0.02943110652267933, 0.0065131597220897675, 0.014068139716982841, -0.01868133433163166, 0.029708299785852432, 0.03656022250652313, -0.0012434732634574175, -0.04100248962640762, -0.05507540702819824, 0.007085695397108793, -0.03243115171790123, -0.04261021316051483, -0.037566155195236206, 0.00002705314545892179, -0.003859005169942975, 0.0408402718603611, -0.018194058910012245, -0.017375759780406952, 0.0030699744820594788, -0.0101808812469244, 0.06383180618286133, 0.019213909283280373, -0.1049642562866211, -0.015501921065151691, -0.019922714680433273, 0.02653510868549347, -0.03452355042099953, 0.4529397487640381, -0.004193259868770838, -0.038016125559806824, 0.04463393613696098, 0.013525177724659443, 0.045144807547330856, -0.005035767797380686, -0.002077571814879775, -0.03273923322558403, 0.021320434287190437, 0.02014964446425438, -0.0015823851572349668, -0.0007583005353808403, 0.07273455709218979, -0.0327715128660202, 0.015843311324715614, 0.03895072638988495, 0.018008943647146225, 0.03735194355249405, -0.03229321539402008, -0.003015724243596196, -0.013546728529036045, 0.018933650106191635, 0.005604797042906284, -0.01633037067949772, 0.01364131085574627, -0.038349077105522156, 0.039612069725990295, 0.018487509340047836, 0.04884552210569382, 0.046455394476652145, 0.024787187576293945, 0.004705277271568775, -0.05909509211778641, -0.005198669154196978, 0.03460949286818504, 0.012748782522976398, 0.012097636237740517, -0.048128627240657806, -0.008918415755033493, 0.05353248119354248, -0.021883685141801834, -0.03552951291203499, 0.010265693068504333, 0.003911716863512993, -0.021539727225899696, 0.09660377353429794, 0.010102272033691406, -0.03523004800081253, -0.060971301048994064, -0.02604948729276657, 0.003037072718143463, 0.0238596610724926, 0.014435283839702606, -0.01367180049419403, -0.006251757964491844, 0.00779469171538949, 0.13186919689178467, -0.012823971919715405, -0.044578149914741516, -0.012192534282803535, -0.009183778427541256, -0.05694296583533287, -0.0013243694556877017, 0.029722796753048897, 0.04083576798439026, -0.11682728677988052, -0.0443800613284111, 0.013160867616534233, -0.009258135221898556, -0.06849057972431183, -0.009525153785943985, 0.0070620933547616005, -0.006544985342770815, 0.007921005599200726, 0.03778936713933945, -0.01575491949915886, -0.025509115308523178, -0.005787931382656097, 0.04675046354532242, 0.005355075001716614, -0.028949769213795662, -0.015301469713449478, -0.03358782082796097, -0.006447067018598318, -0.06301167607307434, -0.0657324269413948, -0.04841269180178642, -0.018043404445052147, -0.014135937206447124, 0.0016119990032166243, 0.027566425502300262, -0.015808679163455963, -0.05433414503931999, 0.08597546815872192, -0.034904345870018005, -0.0015259792562574148, -0.011747968383133411, 0.009248163551092148, -0.013989007100462914, -0.034250032156705856, -0.004265268798917532, -0.0036356293130666018, -0.01618131436407566, 0.031106770038604736, -0.04975821450352669, 0.02856047824025154, 0.037803344428539276, -0.0353420190513134, 0.06643453985452652, 0.02271018736064434, -0.03983660414814949, 0.020440516993403435, 0.03485974669456482, 0.03312229365110397, 0.002803718438372016, -0.02415458671748638, -0.0002513530489522964, 0.030391225591301918, 0.013815075159072876, 0.021090175956487656, -0.04695833474397659, -0.047761399298906326, -0.07447347044944763, -0.3469102680683136, -0.019541312009096146, -0.019796211272478104, 0.02177947200834751, 0.02192135713994503, -0.09265593439340591, 0.03951328620314598, -0.0011131791397929192, 0.056062664836645126, 0.051608454436063766, 0.07976000010967255, -0.01672346144914627, 0.013553104363381863, -0.06894495338201523, 0.026997258886694908, 0.03967718407511711, -0.02711651474237442, -0.016704929992556572, -0.021164026111364365, 0.03323206678032875, 0.03933680057525635, -0.021791741251945496, -0.07103575021028519, -0.054084863513708115, 0.005475055892020464, -0.0010787049541249871, 0.10516627877950668, 0.03148196265101433, 0.06493593007326126, -0.02598738484084606, 0.03914254903793335, 0.007571828085929155, 0.009930962696671486, -0.12140841782093048, -0.02431800216436386, 0.009370892308652401, 0.036037568002939224, 0.003774907672777772, 0.029753077775239944, -0.036615319550037384, -0.0930028036236763, 0.022751664742827415, -0.05930100753903389, -0.04527320712804794, -0.02753065712749958, 0.003183509688824415, -0.016743328422307968, -0.04199214652180672, -0.025530297309160233, 0.08351165801286697, 0.033750902861356735, 0.02295939065515995, 0.014405894093215466, 0.01372584793716669, -0.005283377133309841, -0.06344067305326462, -0.05655115842819214, -0.03687482327222824, 0.019261864945292473, -0.05183500424027443, 0.03158247843384743, 0.027590258046984673, 0.047207996249198914, -0.07048444449901581, -0.012783126905560493, 0.03614772483706474, 0.0064482418820261955, 0.020344281569123268, 0.03651684522628784, -0.02136162854731083, -0.03035145066678524, 0.07794754952192307, -0.0002606184280011803, 0.0246347114443779, 0.03204457089304924, 0.03649485111236572, 0.009450692683458328, -0.011605096980929375, 0.006511245388537645, -0.01634257286787033, 0.024359727278351784, 0.028181521221995354, 0.04373905435204506, -0.04277228191494942, 0.004996101837605238, 0.05915641784667969, 0.012317145243287086, -0.049515314400196075, 0.06214050203561783, 0.024276429787278175, -0.006288501899689436, 0.008537820540368557, -0.008382066152989864, -0.06303559988737106, 0.07159295678138733, -0.001723483786918223, -0.23882891237735748, 0.026539886370301247, 0.0981486439704895, 0.06713729351758957, -0.011375980451703072, 0.015014060772955418, 0.00784390326589346, -0.07012000679969788, -0.03450700268149376, 0.031016986817121506, 0.01246547419577837, 0.016920214518904686, 0.009535329416394234, -0.01529692206531763, 0.015263690613210201, 0.010862198658287525, 0.040598537772893906, 0.0017073032213374972, -0.0028131480794399977, 0.012451139278709888, -0.0190653745085001, -0.025898445397615433, 0.15560799837112427, 0.04634962975978851, -0.008568154647946358, 0.0006072215037420392, 0.006044632755219936, -0.019815711304545403, 0.037940625101327896, 0.0032979417592287064, 0.01526680588722229, -0.009619617834687233, 0.007442273665219545, -0.00041368123493157327, 0.01334090530872345, -0.06154990196228027, -0.04094868525862694, 0.07175794988870621, -0.011564991436898708, 0.0005857212236151099, 0.030848698690533638, 0.02765594981610775, -0.03404246270656586, 0.021647363901138306, 0.01897405833005905, -0.02114000730216503, -0.005379088222980499, 0.007856722921133041, -0.04894855245947838, 0.01330832950770855, -0.008153689093887806, -0.05201209709048271, -0.00794374942779541, 0.0030296160839498043, -0.0023059581872075796, 0.08431407809257507, 0.00719754584133625, -0.030252592638134956, 0.031853411346673965, 0.009688924066722393, -0.01168398093432188, -0.03886529803276062, 0.07043999433517456, 0.013481509871780872, 0.04012839123606682 ]
[ -0.006255408748984337, -0.0023098140954971313, -0.00813321117311716, -0.019341737031936646, 0.008994259871542454, 0.04379500448703766, 0.028644662350416183, 0.004595757462084293, 0.004297479521483183, -0.02024916559457779, 0.0010669155744835734, 0.03532817214727402, -0.020082227885723114, -0.02950347028672695, 0.0310068279504776, -0.06431864202022552, 0.02172882668673992, -0.01083348784595728, 0.011586369946599007, -0.001062938361428678, -0.012627198360860348, 0.05199095606803894, 0.0010474103037267923, -0.0045120795257389545, 0.015186948701739311, 0.000986509257927537, -0.044075481593608856, -0.00005922815398662351, 0.030857713893055916, -0.11329945921897888, -0.021232496947050095, -0.004365452099591494, 0.03648143634200096, 0.010107888840138912, 0.04553334414958954, -0.008222377859055996, -0.016619736328721046, 0.004435329232364893, 0.00981668196618557, 0.019051898270845413, 0.05695582181215286, -0.02350897528231144, -0.024030406028032303, -0.04616304486989975, -0.04093511402606964, -0.045047782361507416, -0.016785383224487305, 0.0007291934452950954, 0.03695085644721985, 0.020574383437633514, -0.0647122710943222, -0.02127993106842041, -0.005221761297434568, 0.03259687125682831, -0.0072698756121098995, 0.003283997066318989, -0.016614126041531563, 0.010497590526938438, 0.03920917585492134, -0.015990257263183594, 0.017245061695575714, -0.021013405174016953, -0.01647566445171833, -0.02224399894475937, -0.006538614630699158, -0.015660319477319717, -0.0522148422896862, 0.00045286669046618044, -0.05219852924346924, 0.005187710747122765, 0.03410625830292702, -0.0072985137812793255, -0.055772993713617325, -0.029125679284334183, -0.03480900451540947, -0.010920947417616844, 0.01882837899029255, -0.02804727479815483, -0.014136125333607197, 0.01144882757216692, -0.038135826587677, -0.011539975181221962, 0.0018707683775573969, -0.019512992352247238, -0.059354472905397415, -0.005931471940129995, 0.016487861052155495, -0.017422934994101524, 0.0041369227692484856, -0.006463595665991306, -0.010066457092761993, -0.0005589121137745678, 0.015954097732901573, -0.009839518927037716, -0.0633227676153183, -0.0040073334239423275, 0.004218967631459236, -0.030220819637179375, -0.01822129264473915, 0.8370043039321899, 0.001590598956681788, 0.005892353598028421, 0.015599662438035011, -0.02624218538403511, 0.0017885530833154917, -0.02797180414199829, -0.004091125447303057, 0.024108052253723145, -0.0006538107409141958, -0.024290064349770546, 0.008181653916835785, 0.018025461584329605, 0.018616653978824615, 0.011092616245150566, 0.006215421017259359, 0.036186233162879944, -0.00717272749170661, 0.0016835646238178015, 0.011075814254581928, 0.04834384471178055, 0.0461159348487854, 0.010661544278264046, -0.0008896708604879677, 0.013058659620583057, -0.012779445387423038, -0.14061912894248962, -0.007728439290076494, -6.908048222628476e-33, -0.0025507218670099974, -0.0027843874413520098, 0.012937349267303944, 0.0047600651159882545, 0.0008635738049633801, 0.008818423375487328, -0.014004459604620934, 0.029449762776494026, -0.01712908037006855, 0.0017154666129499674, 0.007832039147615433, 0.013199994340538979, -0.020622577518224716, -0.0021477241534739733, -0.0018912667874246836, -0.017257297411561012, -0.015633603557944298, 0.035710860043764114, 0.0023542100097984076, -0.039388541132211685, 0.04823027178645134, 0.017202556133270264, 0.025902610272169113, 0.026800336316227913, 0.007258400321006775, 0.018822191283106804, 0.0014026579447090626, -0.053673844784498215, 0.02918284572660923, -0.03104007989168167, -0.008187890984117985, 0.005308626219630241, 0.012160676531493664, -0.0450940802693367, -0.03309081494808197, -0.04591380059719086, -0.04945366829633713, -0.008954321965575218, -0.011629443615674973, -0.0439772829413414, -0.0414276085793972, -0.01731450855731964, -0.03275216743350029, -0.03347702696919441, -0.02943059802055359, 0.04801170900464058, -0.0020422853995114565, 0.008375036530196667, -0.0028310739435255527, 0.042686864733695984, 0.02480175532400608, -0.004221821203827858, -0.018803223967552185, 0.014791661873459816, 0.02910546213388443, -0.028583569452166557, 0.04950667917728424, -0.01594429835677147, -0.020670965313911438, -0.026773683726787567, 0.0352366641163826, -0.00011957818787777796, 0.01797010377049446, 0.02805165760219097, -0.015878193080425262, 0.029085570946335793, 0.0076674409210681915, 0.01184984389692545, 0.017212027683854103, 0.028052864596247673, -0.04925738647580147, 0.0028768249321728945, 0.007617751136422157, -0.006139892619103193, 0.007529335096478462, -0.030918965116143227, -0.0018378895474597812, 0.04641374945640564, 0.013277558609843254, 0.0366394929587841, 0.0011894188355654478, 0.024745801463723183, 0.008777618408203125, 0.009205161593854427, -0.009340042248368263, -0.006607013754546642, 0.019014373421669006, -0.030607841908931732, -0.01340099610388279, -0.003986024763435125, 0.020507924258708954, 0.093765988945961, -0.03205392509698868, -0.000981731340289116, -0.03288940340280533, 6.561292817499256e-33, -0.0033292409498244524, -0.029574619606137276, 0.018111011013388634, -0.018020810559391975, 0.005415452178567648, -0.01470655482262373, 0.01192788127809763, 0.01607956923544407, -0.015045669861137867, 0.03482557833194733, -0.04237158223986626, -0.039068758487701416, -0.034594155848026276, 0.0002639128651935607, 0.028168944641947746, -0.04134378954768181, 0.061695680022239685, -0.019688008353114128, 0.0007985178963281214, 0.017185237258672714, 0.019728530198335648, 0.01334854681044817, 0.026385819539427757, 0.03702138364315033, 0.008797396905720234, -0.006596988532692194, -0.006813532207161188, 0.02065962366759777, -0.0336027517914772, 0.014319146052002907, -0.006930082570761442, 0.008225982077419758, -0.026774967089295387, -0.0009061986347660422, -0.0009304937557317317, 0.03332716226577759, 0.00751926563680172, 0.013923196122050285, 0.016461385414004326, -0.0415119007229805, 0.04453487694263458, -0.00800770241767168, 0.02406376786530018, 0.006018586456775665, -0.01773785427212715, -0.0403127446770668, 0.017290759831666946, -0.018147092312574387, 0.028965486213564873, 0.014888585545122623, 0.036842554807662964, 0.02602839283645153, 0.028614388778805733, 0.035813041031360626, -0.018308699131011963, -0.004377714823931456, -0.011894119903445244, -0.0016861424082890153, -0.04426923021674156, 0.015780027955770493, -0.01898452453315258, -0.004664241801947355, 0.002854009158909321, -0.0034796169493347406, -0.02795521914958954, -0.02495194599032402, -0.0041556875221431255, -0.05063324794173241, 0.022529779002070427, -0.02709934301674366, 0.00045222078915685415, -0.05437702313065529, 0.017119435593485832, 0.04709912836551666, -0.02203754149377346, 0.01932833343744278, -0.016285426914691925, -0.011982806026935577, -0.014905954711139202, 0.02183445915579796, 0.01765904203057289, 0.030882736667990685, 0.0038970133755356073, 0.015890764072537422, 0.034918442368507385, 0.054261818528175354, -0.0153209762647748, -0.021803732961416245, 0.05289367586374283, 0.022739971056580544, 0.004016796592622995, -0.03818704932928085, 0.027682889252901077, 0.024664297699928284, -0.029277518391609192, -1.285763406855267e-8, -0.038076575845479965, -0.0013707132311537862, 0.0005218518199399114, -0.00040052671101875603, 0.005713092628866434, 0.002683185273781419, -0.006589953321963549, -0.03277632221579552, -0.011556301265954971, 0.029523734003305435, 0.021576521918177605, -0.029769446700811386, -0.01927308738231659, 0.054567255079746246, 0.016607876867055893, -0.051250215619802475, -0.007837102748453617, -0.00036693672882393, 0.024764306843280792, -0.023778747767210007, 0.03912893310189247, 0.09192104637622833, 0.04717414081096649, -0.005862017627805471, 0.019825689494609833, -0.014507866464555264, 0.009612034074962139, -0.08130266517400742, 0.003992855548858643, 0.0008011675672605634, 0.033637113869190216, -0.010908270254731178, -0.06765668094158173, 0.004736997652798891, -0.03786948323249817, -0.03439215570688248, 0.029825877398252487, 0.04047299176454544, -0.04015066474676132, 0.01986854337155819, -0.019334809854626656, 0.01969487965106964, -0.021509388461709023, -0.044425591826438904, -0.04547188803553581, -0.00652658985927701, -0.022768501192331314, 0.012607777491211891, 0.01972334459424019, -0.016250159591436386, 0.0025511765852570534, 0.004134094342589378, 0.012893930077552795, 0.005960122682154179, 0.016422852873802185, -0.022362833842635155, 0.016311438754200935, -0.011167610995471478, -0.04971962794661522, -0.013963885605335236, 0.015992408618330956, -0.0068929847329854965, 0.008306961506605148, -0.005803407169878483 ]
insanely-fast-whisper-experiments
https://markhneedham.com/blog/2023/12/23/insanely-fast-whisper-experiments
false
2023-12-13 00:44:37
ClickHouse: S3Queue Table Engine - DB::Exception: There is no Zookeeper configuration in server config
[ "clickhouse", "til" ]
[ "TIL" ]
:icons: font This week I've been making a video showing how to use ClickHouse's https://clickhouse.com/docs/en/engines/table-engines/integrations/s3queue[S3Queue table engine^], which allows streaming import of files in an S3 bucket. The S3Queue table engine was released in version 23.8, but only received 'production-ready' status in version 23.11. In this blog post, we'll walk through the steps to getting this to work locally and the mistakes that I made along the way. I configured an S3 bucket, added 10 files containing 100,000 rows of JSON each, and made sure that I'd set the `AWS_PROFILE` environment variable so that ClickHouse Server could read from the bucket. I then started the ClickHouse Server: [source, bash] ---- ./clickhouse server ---- Connected to that server using the ClickHouse client: [source, bash] ---- ./clickhouse client -m ---- And tried to configure an S3Queue table engine based on my S3 bucket: [source, sql] ---- CREATE TABLE ordersQueue ( orderDate DateTime, gender String, customerId UUID, cost Float32, name String, creditCardNumber String, address String, orderId UUID ) ENGINE = S3Queue( 'https://s3queue.clickhouse.com.s3.eu-north-1.amazonaws.com/data/*.json', JSONEachRow ) SETTINGS mode = 'ordered', s3queue_enable_logging_to_s3queue_log = 1; ---- When I ran this query, I got the following error: .Output [source, text] ---- Received exception from server (version 23.12.1): Code: 139. DB::Exception: Received from localhost:9000. DB::Exception: There is no Zookeeper configuration in server config. (NO_ELEMENTS_IN_CONFIG) ---- The mistake I made was not configuring ClickHouse Keeper in the ClickHouse Server config. ClickHouse Server uses ClickHouse Keeper to keep track of the files that have already been processed. When running ClickHouse from the binary executable it picks up any XML or YAML config files under the `config.d` directory (relative to where it's run) and then merges them into its global configuration file during the startup process. So to enable ClickHouse Keeper, we will add the following config: ..config.d/config.yaml [source, yaml] ---- keeper_server: tcp_port: 2181 server_id: 1 log_storage_path: 'keeper/coordination/log' snapshot_storage_path: 'keeper/coordination/snapshots' coordination_settings: operation_timeout_ms: 10000 session_timeout_ms: 30000 raft_logs_level: warning raft_configuration: server: id: 1 hostname: '127.0.0.1' port: 9444 s3queue_log: database: system table: s3queue_log logger: level: debug console: true ---- We can then restart the server: [source, bash] ---- ./clickhouse server ---- And if we re-run the `CREATE TABLE` command, it will succeed. The next step is to create a table to store the data in ClickHouse. The query to create that table is similar to the previous one, but we use the `MergeTree` engine instead of `S3Queue`: [source, sql] ---- CREATE TABLE orders ( orderDate DateTime, gender String, customerId UUID, cost Float32, name String, creditCardNumber String, address String, orderId UUID ) ENGINE = MergeTree ORDER BY (customerId, orderDate); ---- The final piece that glues these two tables together is a materialised view. The materialised view processes rows coming in from S3 files and then writes them into the table: [source, sql] ---- CREATE MATERIALIZED VIEW ordersConsumer TO orders AS SELECT * FROM ordersQueue; ---- We can then query the `orders` table to check that data is being ingested: [source, sql] ---- FROM orders SELECT count() ---- One thing I found confusing is that this query returned 0 for what seemed like ages and then suddenly the count went up to 1 million in one go. I learnt that this happens because the materialised view only flushes the data once it's reached a certain number of rows, which is determined by the config properties `min_insert_block_size_rows_for_materialized_views` and `min_insert_block_size_bytes_for_materialized_views`. If those properties aren't configured, their values default to `min_insert_block_size_rows` and `min_insert_block_size_bytes` respectively. The default values of `min_insert_block_size_rows` and `min_insert_block_size_bytes` are as follows: .Output [source, text] ---- Row 1: ────── name: min_insert_block_size_bytes type: UInt64 value: 268402944 Row 2: ────── name: min_insert_block_size_rows type: UInt64 value: 1048449 ---- So, by default, the materialised view was only getting flushed once it had just over 1 million rows! We can, however, configure this property at the server level, the same way that we configured ClickHouse Keeper. I added the following config file and restarted ClickHouse Server: ..config.d/profiles.yaml [source.yaml] ---- profiles: default: min_insert_block_size_rows_for_materialized_views: 1000 min_insert_block_size_bytes_for_materialized_views: 2000 ---- I then removed the tables and materialised view and recreated everything. And this time I could see the data being ingested immediately!
In this post, we'll learn how to ingest data from S3 into ClickHouse.
uploads/2023/12/clickhouse-s3queue.png
[ 0.014792661182582378, 0.013721936382353306, -0.021553289145231247, 0.022852033376693726, 0.08505205810070038, 0.02252916432917118, 0.021574687212705612, 0.05555722489953041, -0.051006779074668884, 0.0053413547575473785, 0.027383413165807724, -0.027511438354849815, -0.08134356141090393, 0.025299983099102974, -0.028964992612600327, 0.0593380369246006, 0.08895326405763626, 0.02180272527039051, 0.02004345692694187, -0.0070014637894928455, 0.00964188389480114, 0.06368662416934967, 0.006277536042034626, 0.04798911139369011, 0.03658777102828026, 0.027261458337306976, 0.0007698346162214875, -0.01982050947844982, -0.040193621069192886, -0.005408453289419413, 0.04710453748703003, -0.011914529837667942, 0.008276019245386124, -0.010503953322768211, 0.009428493678569794, -0.02632935345172882, -0.015987839549779892, -0.007629083935171366, -0.01651436649262905, 0.025451358407735825, -0.07128789275884628, 0.028584493324160576, -0.007544410414993763, 0.005760709289461374, -0.016323426738381386, -0.003961504902690649, -0.04674160107970238, 0.019743729382753372, -0.0034334780648350716, 0.009320855140686035, -0.07029832899570465, 0.05356752872467041, -0.03822516277432442, -0.03295808285474777, -0.0041690729558467865, 0.024685855954885483, 0.03907093405723572, -0.043771881610155106, 0.01773717813193798, -0.04894138127565384, -0.014855382032692432, -0.005483327899128199, 0.02999381721019745, 0.041234150528907776, -0.007515908684581518, -0.014194873161613941, -0.00358336023055017, 0.05689522996544838, -0.04192771017551422, -0.007368893828243017, 0.014131263829767704, -0.0005217129946686327, -0.0455799326300621, -0.010829612612724304, 0.01330927386879921, -0.05982028692960739, -0.05023694410920143, 0.04583216831088066, 0.044439248740673065, 0.05376019328832626, -0.010759653523564339, -0.017998863011598587, 0.029990529641509056, 0.030924614518880844, 0.03550238907337189, -0.04476092383265495, -0.0392548069357872, -0.015184750780463219, -0.0489489808678627, 0.054665546864271164, 0.017280299216508865, -0.051432445645332336, 0.015904763713479042, 0.03536316379904747, -0.017691245302557945, 0.024185067042708397, -0.003432377241551876, -0.014871115796267986, 0.020601918920874596, -0.001727137598209083, -0.05567771941423416, 0.009936611168086529, 0.05212580785155296, 0.0063335951417684555, -0.07824262231588364, 0.013670275919139385, -0.021055592224001884, -0.022703327238559723, 0.007916868664324284, 0.014017026871442795, 0.01159043237566948, -0.0032332069240510464, -0.042423926293849945, 0.013031994923949242, -0.06864997744560242, 0.08074762672185898, 0.006341131869703531, -0.007807278539985418, -0.005838029086589813, 0.006343941204249859, 0.06274987012147903, 0.007231125608086586, -0.05036655440926552, 0.07081016898155212, -0.0019205512944608927, 0.0440954715013504, -0.014775126241147518, 0.023969288915395737, 0.009871911257505417, -0.07622633874416351, -0.020865939557552338, 0.049603529274463654, 0.011083816178143024, 0.01519511453807354, -0.013090324588119984, -0.005716764368116856, 0.00313066435046494, -0.00879249069839716, 0.05936548486351967, 0.03070409782230854, -0.0004559688095469028, -0.020901406183838844, 0.022749708965420723, 0.0020910874009132385, 0.04495875537395477, 0.012189253233373165, 0.02229275554418564, -0.07172967493534088, -0.037169139832258224, 0.01415019016712904, 0.01278803963214159, 0.0325331911444664, 0.05588322505354881, -0.03190762922167778, 0.01465807668864727, 0.10371715575456619, 0.01919943280518055, -0.012920829467475414, 0.010684478096663952, -0.02116493321955204, 0.03946036845445633, 0.01134541817009449, -0.0018409419571980834, 0.011188261210918427, 0.0011936923256143928, -0.022901954129338264, -0.02834722213447094, 0.03186605125665665, -0.03811769187450409, -0.01742134988307953, -0.0565180666744709, -0.06061399728059769, 0.07368253171443939, -0.025950457900762558, 0.020686164498329163, 0.034924477338790894, 0.09736917167901993, 0.021225502714514732, 0.02323862537741661, 0.048577431589365005, -0.08302474021911621, 0.034432366490364075, -0.010887662880122662, -0.021616965532302856, 0.04109884798526764, -0.00745287025347352, 0.07594610005617142, 0.014396660029888153, -0.012786339968442917, 0.029447142034769058, -0.06151780113577843, -0.08180363476276398, -0.031227707862854004, -0.0040427204221487045, 0.07906537503004074, -0.03486698120832443, 0.02660231664776802, 0.06847245246171951, 0.02876647561788559, 0.043485306203365326, -0.013467102311551571, -0.012342249043285847, 0.012135565280914307, -0.04925241693854332, -0.08630088716745377, 0.013046976178884506, 0.04178672656416893, -0.011240048334002495, -0.008539942093193531, 0.0023825885728001595, -0.011928723193705082, -0.00370415230281651, 0.0319795161485672, -0.008331122808158398, 0.053316354751586914, -0.0006717910291627049, 0.023036716505885124, -0.0310569629073143, 0.03861315920948982, -0.05831415578722954, 0.024478433653712273, 0.013412888161838055, 0.0015958083095028996, -0.03358209878206253, -0.003581341588869691, 0.10119165480136871, 0.04865434393286705, -0.011719469912350178, -0.05607426539063454, 0.0405309684574604, 0.021522149443626404, -0.03257250785827637, 0.028360066935420036, -0.04307418316602707, -0.004664039704948664, 0.010111578740179539, -0.028943313285708427, -0.019757505506277084, -0.013920885510742664, -0.04391461983323097, 0.018008437007665634, 0.06228305399417877, -0.018011024221777916, 0.02862883172929287, 0.04191657155752182, -0.036261480301618576, 0.002011137316003442, -0.04728825017809868, -0.049454763531684875, 0.0033543771132826805, 0.03141293302178383, -0.01983107626438141, 0.02976849116384983, -0.056350599974393845, -0.019060226157307625, -0.034118976444005966, -0.03792888671159744, 0.036599524319171906, 0.01963486336171627, 0.06576768308877945, -0.023348966613411903, 0.04055042192339897, -0.025265390053391457, -0.011382401920855045, -0.0022651590406894684, -0.0315873846411705, -0.025606557726860046, -0.026193879544734955, 0.0019544537644833326, 0.018053442239761353, 0.020840080454945564, 0.0034746811725199223, 0.030372662469744682, -0.019606469199061394, 0.030843697488307953, 0.0016199375968426466, 0.0467509850859642, -0.007737832609564066, 0.020524948835372925, -0.027914389967918396, -0.014264842495322227, 0.05885421112179756, -0.02888166904449463, -0.0313178226351738, -0.013110624626278877, -0.053509671241045, 0.016149865463376045, -0.08748549222946167, -0.03790469467639923, -0.026975322514772415, 0.037671662867069244, 0.03631162270903587, 0.020212559029459953, -0.011806241236627102, 0.05076737701892853, 0.008499065414071083, 0.013203753158450127, -0.00280131958425045, -0.007523272652179003, 0.0343204028904438, -0.005062344018369913, 0.017010768875479698, 0.04016679525375366, 0.006510732229799032, 0.012186179868876934, -0.0633992999792099, 0.013699058443307877, -0.03809824585914612, -0.2675231695175171, 0.02953687682747841, 0.013352388516068459, -0.052187204360961914, 0.03087693452835083, -0.004461620002985001, 0.020689431577920914, -0.03229181095957756, 0.009660492651164532, 0.05044635385274887, -0.007083648815751076, -0.00835275836288929, -0.007360897492617369, 0.019414804875850677, 0.014316930435597897, 0.014136428944766521, 0.0014158172998577356, -0.0327853225171566, -0.005801444407552481, 0.022172890603542328, -0.03932622820138931, -0.03458429127931595, -0.0072992765344679356, 0.030084798112511635, 0.029841192066669464, 0.0540178045630455, -0.05802006274461746, 0.019412478432059288, -0.03625059500336647, -0.030655788257718086, 0.023913919925689697, -0.007690181490033865, -0.003623340278863907, -0.002401583595201373, -0.004868699703365564, 0.005658974405378103, 0.04956550523638725, -0.0039673964492976665, 0.01904940791428089, 0.00026839558267965913, -0.02145746909081936, -0.009466198273003101, 0.009728566743433475, 0.027346016839146614, 0.07064997404813766, -0.018637819215655327, -0.05894092470407486, 0.004225912503898144, -0.06258559226989746, 0.08392045646905899, -0.03141229972243309, -0.035412777215242386, -0.024134168401360512, 0.056146733462810516, 0.004126903135329485, 0.015576056204736233, 0.0009168165852315724, 0.01961527392268181, -0.011190375313162804, -0.043054159730672836, -0.007538690697401762, -0.03682725504040718, -0.030143683776259422, -0.010416851378977299, -0.012697172351181507, -0.06961551308631897, -0.04168711230158806, -0.0074983458034694195, 0.05607523396611214, 0.022886238992214203, -0.02005142718553543, 0.025324445217847824, -0.013973782770335674, -0.11131385713815689, -0.01365270372480154, -0.02237955667078495, -0.003657108638435602, -0.0008966673049144447, -0.03154943138360977, 0.05275185406208038, -0.028825189918279648, -0.028849594295024872, 0.0428113229572773, 0.028308149427175522, 0.02167440392076969, -0.006540415342897177, 0.021177664399147034, -0.006795380264520645, -0.022456908598542213, -0.012476089410483837, 0.048950694501399994, -0.03636811301112175, -0.012296101078391075, -0.008008372038602829, -0.028862619772553444, 0.04024901241064072, -0.0027784889098256826, 0.0071537378244102, -0.001623195712454617, 0.013574499636888504, 0.03620635345578194, -0.04448871314525604, 0.02661564201116562, -0.03667726740241051, 0.020932037383317947, -0.003647295758128166, -0.04873862490057945, 0.005271834321320057, 0.01610710285604, 0.027239257469773293, 0.00933743268251419, -0.03804571554064751, 0.0285185556858778, -0.0634043887257576, -0.0027821811381727457, -0.0017998763360083103, 0.019618645310401917, 0.03346635401248932, 0.01692250743508339, -0.002168119652196765, -0.07894045114517212, 0.03215959668159485, 0.009219935163855553, -0.018022093921899796, -0.0454929880797863, -0.021184764802455902, -0.0008372691227123141, -0.00018099531007464975, 0.009604078717529774, -0.012088313698768616, -0.0005130774225108325, 0.019957570359110832, 0.03306650370359421, -0.04798419401049614, 0.03634680062532425, -0.04003910720348358, -0.03767557814717293, -0.015142714604735374, 0.006991293281316757, -0.0012981618056073785, -0.032698456197977066, -0.008899291977286339, 0.016680682078003883, 0.016784874722361565, 0.05359792709350586, 0.0017390507273375988, 0.0216422900557518, 0.012209228239953518, 0.020239513367414474, 0.004643034655600786, -0.013726171106100082, -0.04706402122974396, 0.009886692278087139, -0.04636561870574951, -0.037344299256801605, -0.05081774294376373, 0.003403259674087167, -0.0195755697786808, -0.016278771683573723, -0.034305963665246964, -0.02517048455774784, -0.06036558747291565, 0.003169760573655367, -0.008868538774549961, 0.0299941785633564, 0.058969780802726746, 0.03945494070649147, 0.024255475029349327, -0.016843512654304504, -0.020548706874251366, 0.01785844750702381, 0.007713730446994305, -0.040911965072155, 0.004186653066426516, 0.020799115300178528, -0.038022588938474655, 0.022510327398777008, 0.009922969155013561, 0.007090345025062561, 0.033615194261074066, -0.0025651627220213413, -0.015498800203204155, 0.02984107844531536, 0.015189196914434433, 0.02784854732453823, 0.012878602370619774, -0.03213838115334511, 0.01205371506512165, -0.016534900292754173, -0.03644543141126633, -0.01634950377047062, 0.000617962155956775, -0.019640950486063957, -0.011223016306757927, -0.027411803603172302, -0.07171125710010529, 0.01898372918367386, 0.026567911729216576, 0.02470097877085209, 0.0025913501158356667, -0.02148181013762951, 0.004722949583083391, -0.04381527751684189, 0.041179537773132324, 0.07729361206293106, -0.07027419656515121, 0.014446841552853584, -0.015531918033957481, 0.01953904703259468, -0.005428834818303585, 0.02981683239340782, -0.06392447650432587, -0.015220786444842815, -0.005657942499965429, 0.04071708023548126, -0.033510465174913406, -0.033233337104320526, -0.040834248065948486, 0.03364245593547821, -0.008327883668243885, -0.002367021283134818, 0.005085490178316832, -0.008264566771686077, -0.02357013151049614, -0.015340627171099186, 0.02121381089091301, -0.02550945058465004, -0.014778198674321175, 0.02909916266798973, -0.015536247752606869, -0.007092214655131102, -0.03052799217402935, 0.03127137944102287, 0.02348897233605385, -0.025633959099650383, -0.01716233603656292, -0.04289912059903145, -0.007996678352355957, 0.02292323112487793, 0.0484023354947567, 0.011689960956573486, 0.03119259513914585, -0.0005885494174435735, 0.004376502241939306, -0.017144476994872093, 0.003379995469003916, -0.02257830835878849, -0.027026260271668434, 0.03476932644844055, 0.042417339980602264, 0.007007879205048084, -0.0044356160797178745, -0.00390429375693202, -0.016776546835899353, 0.05308230593800545, -0.06860146671533585, -0.013984201475977898, 0.021112661808729172, -0.074319988489151, 0.034429583698511124, -0.011936386115849018, 0.016711154952645302, -0.059070028364658356, 0.04182492196559906, 0.03972285985946655, 0.02235669642686844, 0.019341353327035904, -0.012395661324262619, 0.036033932119607925, -0.02539963461458683, -0.02611362375319004, -0.07111797481775284, -0.01012035645544529, -0.0066909631714224815, -0.016245486214756966, -0.007329826708883047, -0.010206017643213272, -0.029033200815320015, 0.03843099623918533, -0.06766477227210999, -0.024521328508853912, 0.061650898307561874, -0.00705288490280509, 0.005281301215291023, 0.012538660317659378, -0.021295109763741493, 0.04687131568789482, 0.019460435956716537, -0.015033788047730923, -0.022097449749708176, -0.005229739472270012, 0.05825906991958618, 0.022514453157782555, 0.015096943825483322, -0.03254728019237518, -0.03958984464406967, 0.08182951807975769, 0.005082043819129467, -0.01020351517945528, 0.06161362677812576, -0.03253287449479103, 0.05001388117671013, -0.010814565233886242, -0.005472635384649038, 0.0192859023809433, 0.031244799494743347, -0.02560645528137684, -0.05322881415486336, 0.01496139820665121, 0.026669280603528023, -0.012791982851922512, -0.08878172934055328, 0.04931456968188286, 0.004826032090932131, -0.015571210533380508, -0.06813524663448334, 0.0184454508125782, -0.04942094162106514, -0.01388727966696024, -0.030650373548269272, 0.003838815726339817, -0.04150049760937691, 0.0715625062584877, -0.0015528337098658085, 0.02766617387533188, 0.07116585224866867, -0.00589875178411603, 0.02375207282602787, 0.015243996866047382, 0.07584592700004578, 0.0938815325498581, 0.019759828224778175, 0.007527547888457775, 0.07952551543712616, -0.011758477427065372, -0.04289912059903145, -0.01386181265115738, -0.0411517359316349, -0.03793996199965477, -0.05336730554699898, 0.003223215229809284, 0.07311044633388519, 0.014118860475718975, 0.03998459130525589, -0.030004078522324562, -0.02580108493566513, -0.009849661029875278, 0.001164287910796702, 0.03434488922357559, 0.02753465063869953, 0.02285870350897312, 0.015318108722567558, -0.010052064433693886, -0.007147204130887985, 0.017013758420944214, 0.006100993603467941, -0.03389308974146843, 0.014602530747652054, -0.016067584976553917, 0.009500223211944103, 0.042381905019283295, 0.009818652644753456, 0.07406654208898544, -0.021819034591317177, 0.015382988378405571, -0.02785089612007141, 0.03847089409828186, 0.0036705867387354374, 0.024274149909615517, -0.02262568101286888, -0.027005674317479134, -0.0360824391245842, -0.01680026389658451, -0.0033789558801800013, -0.020701954141259193, -0.024204088374972343, 0.05255405232310295, -0.026093116030097008, 0.006978372111916542, 0.02272377349436283, -0.008882594294846058, -0.034581542015075684, -0.02535739727318287, -0.04913618415594101, -0.04883364960551262, -0.0576067678630352, -0.00957452692091465, 0.0032205008901655674, -0.03437625244259834, -0.03332523629069328, -0.04630018025636673, 0.008828449063003063, -0.0023524854332208633, -0.006664181128144264, -0.07180563360452652, -0.05533859506249428, 0.01610644720494747, 0.017035897821187973, 0.0025623140390962362, 0.05175074189901352, 0.06935524940490723, -0.012072497978806496, -0.020259816199541092, -0.042355895042419434, 0.026932964101433754, 0.040887631475925446, -0.0033511361107230186, 0.056549690663814545, -0.061344847083091736, 0.03884485736489296, 0.016012068837881088, -0.0037952351849526167, -0.07011547684669495, 0.023612111806869507, 0.05106739327311516, 0.00951411947607994, 0.07177162170410156, 0.01466850470751524, 0.02202664688229561, -0.06780049949884415, -0.04074482619762421, -0.015358869917690754, 0.017668481916189194, 0.05336490646004677, -0.03516705334186554, 0.09410436451435089, 0.03792803734540939, -0.024391110986471176, -0.04410574957728386, 0.024835500866174698, -0.0057101924903690815, 0.02101835422217846, -0.03263689950108528, -0.07501587271690369, -0.0467362105846405, -0.09926964342594147, -0.05352137237787247, 0.004076124634593725, -0.019379163160920143, -0.02361295185983181, -0.015775926411151886, 0.017907746136188507, -0.06176837161183357, 0.016492579132318497, -0.05087767913937569, 0.013779409229755402, -0.018245665356516838, -0.01892341859638691, -0.0011477564694359899, 0.016946416348218918, 0.012333030812442303, -0.029245525598526, 0.03309040889143944, -0.036032743752002716, 0.02574726566672325, -0.0584571398794651, 0.019984006881713867, 0.03643648326396942, 0.025178933516144753, 0.02281969040632248 ]
[ -0.05817846208810806, -0.07929296046495438, -0.04326179623603821, -0.05459323897957802, 0.04315415024757385, -0.07273776084184647, -0.03370604291558266, -0.05644582584500313, -0.001063829055055976, 0.0030726976692676544, 0.03995084762573242, 0.003541543148458004, -0.009585386142134666, -0.04955841973423958, 0.0785500556230545, 0.01518271118402481, -0.032843202352523804, -0.03919614106416702, -0.02737252414226532, 0.013724107295274734, -0.02621668577194214, -0.024214833974838257, -0.032903362065553665, -0.018516823649406433, 0.003670067060738802, 0.03693718463182449, 0.03436298295855522, -0.052528172731399536, -0.038337599486112595, -0.19488807022571564, 0.05310668796300888, -0.06300826370716095, -0.023490378633141518, -0.02664867602288723, 0.013271803967654705, -0.006198523566126823, 0.04031961038708687, -0.0037196471821516752, 0.023249173536896706, 0.02705281414091587, 0.005460717715322971, 0.07195929437875748, -0.0642450675368309, -0.023561770096421242, 0.0043107494711875916, -0.02195371873676777, 0.04050424322485924, 0.017972616478800774, -0.004857355263084173, -0.026533346623182297, -0.048645928502082825, -0.00927816703915596, -0.010850097984075546, -0.01631941832602024, 0.0038306654896587133, 0.038436245173215866, 0.047157224267721176, 0.07582855224609375, -0.018243437632918358, -0.014663982205092907, 0.019792675971984863, 0.028787555173039436, -0.12348657846450806, 0.1340157836675644, 0.009806375950574875, 0.0456608310341835, -0.017786646261811256, -0.011222884058952332, -0.022092431783676147, 0.0820145383477211, -0.030580785125494003, -0.030834071338176727, -0.002152511151507497, 0.06226911395788193, 0.03182601556181908, -0.013806179165840149, -0.01879795826971531, 0.009176276624202728, 0.03630474582314491, -0.022545645013451576, -0.05410747230052948, -0.06148448586463928, -0.0037883901968598366, -0.013210889883339405, -0.0025014453567564487, 0.005414402112364769, -0.018614767119288445, 0.06088022142648697, 0.004415303468704224, -0.0042577991262078285, 0.004128402564674616, -0.03581557795405388, 0.04647853970527649, -0.015948841348290443, -0.07904194295406342, 0.05388123542070389, -0.047575127333402634, 0.004801120609045029, -0.05426887795329094, 0.37739232182502747, 0.013991697691380978, 0.01063548680394888, 0.013493578881025314, 0.015810541808605194, -0.007815247401595116, -0.010916155762970448, -0.035872504115104675, -0.034246690571308136, -0.001319224014878273, 0.009991806000471115, -0.012194806709885597, -0.011075361631810665, 0.04067688435316086, -0.06753449887037277, 0.021267060190439224, 0.030095087364315987, -0.019805721938610077, -0.010421087965369225, 0.011217537336051464, 0.012567717581987381, 0.0032055785413831472, 0.0017782183131203055, 0.04915887117385864, 0.0050239781849086285, 0.020163582637906075, 0.029972286894917488, 0.060698505491018295, 0.056477468460798264, 0.035992302000522614, 0.01966354250907898, -0.012396383099257946, -0.04985281080007553, -0.06497539579868317, 0.02205519936978817, 0.0077932002022862434, 0.018839877098798752, 0.017304036766290665, -0.03888991102576256, 0.0019208898302167654, -0.04182291403412819, -0.011503228917717934, -0.04739794135093689, 0.05643201619386673, -0.03787868469953537, -0.020802753046154976, 0.09136759489774704, 0.004973683971911669, -0.02798927202820778, -0.04242667555809021, -0.032948728650808334, -0.0033821940887719393, 0.041599251329898834, 0.006766690406948328, -0.01526509877294302, -0.024615414440631866, 0.01579422689974308, 0.04781189560890198, 0.031408075243234634, -0.05234898626804352, -0.035092685371637344, -0.014922868460416794, -0.044525474309921265, -0.030008412897586823, 0.024845492094755173, 0.0006842878065072, -0.1745397448539734, -0.04452809318900108, 0.007647411897778511, -0.027100052684545517, -0.030153632164001465, -0.01666858047246933, 0.05496465042233467, -0.07124872505664825, 0.025526776909828186, 0.035428401082754135, -0.004465336445719004, -0.012768860906362534, 0.006674444302916527, 0.06590939313173294, 0.03233032301068306, 0.005250863265246153, -0.0059579964727163315, 0.0164948757737875, -0.012584717012941837, -0.055840715765953064, -0.09151116013526917, -0.03840187191963196, 0.025094877928495407, -0.01774943619966507, -0.02130185440182686, -0.009014545008540154, -0.018523523584008217, -0.044826939702034, 0.041313111782073975, 0.01712988317012787, 0.006534880958497524, 0.03982463851571083, -0.011399575509130955, 0.028478415682911873, -0.03408316150307655, 0.05315001308917999, -0.0057863350957632065, 0.005272469483315945, 0.0428246445953846, -0.02162211947143078, 0.03542901203036308, 0.0315576046705246, -0.04993649572134018, 0.08632709830999374, 0.015225022099912167, -0.08184591680765152, 0.04671075567603111, -0.03656718134880066, -0.0057151103392243385, 0.002090759575366974, 0.04873521253466606, -0.012554810382425785, -0.031401269137859344, 0.041121434420347214, 0.012880638241767883, -0.024706903845071793, 0.01413669902831316, -0.050481513142585754, -0.3258201777935028, -0.025893278419971466, -0.008538268506526947, -0.015733398497104645, -0.032059863209724426, -0.035295963287353516, -0.001530741690658033, -0.005816526245325804, -0.0026045909617096186, 0.021820563822984695, 0.13831354677677155, -0.005427077878266573, 0.026454420760273933, -0.07618061453104019, -0.02187449112534523, 0.01322118379175663, -0.03189127519726753, -0.04328346252441406, -0.052026282995939255, 0.04236613214015961, 0.030515942722558975, -0.024342546239495277, -0.011823928914964199, -0.050347886979579926, 0.06077207252383232, -0.03236720710992813, 0.11639581620693207, -0.014400569722056389, 0.06937150657176971, -0.0838128998875618, 0.02630305290222168, 0.023594345897436142, -0.0016576566267758608, -0.059957798570394516, -0.008646085858345032, -0.0012147031957283616, 0.010282249189913273, 0.002235121326521039, 0.021314071491360664, 0.003457744838669896, -0.10889939963817596, 0.07334490120410919, -0.04377198591828346, -0.10129129141569138, 0.029142269864678383, -0.046026427298784256, 0.009283301420509815, 0.012239870615303516, -0.006064334884285927, 0.06534407287836075, 0.05503365024924278, -0.0013009489048272371, 0.0016110113356262445, 0.042703039944171906, 0.014504609629511833, 0.013059381395578384, -0.015134390443563461, -0.016417546197772026, -0.0019435860449448228, 0.015182552859187126, 0.016346169635653496, 0.02078358642756939, 0.037609800696372986, -0.021618535742163658, 0.014135465025901794, -0.0248777624219656, -0.01816459745168686, 0.007047807797789574, 0.059305984526872635, -0.03144153580069542, -0.06560015678405762, 0.06210361793637276, 0.003737921128049493, 0.0632283166050911, 0.05191978067159653, 0.015071365982294083, 0.006771506275981665, -0.010362795554101467, 0.0032164801377803087, -0.02537110075354576, 0.04426548629999161, 0.005228713154792786, 0.08712807297706604, -0.015417106449604034, 0.06257268041372299, 0.07891348749399185, -0.013667575083673, 0.004357586149126291, 0.022522401064634323, 0.003584981895983219, -0.014917531982064247, -0.018262533470988274, -0.024702973663806915, -0.08974631130695343, 0.061870720237493515, 0.0027662308420985937, -0.24044200778007507, 0.05026499181985855, 0.04241706430912018, 0.08747606724500656, -0.0030936524271965027, -0.0037134611047804356, 0.0037825200706720352, -0.05865601450204849, 0.03271625190973282, 0.005767396651208401, 0.027132969349622726, 0.03093360923230648, -0.004005196038633585, 0.01855730265378952, 0.06141359731554985, -0.008498599752783775, 0.013864831067621708, 0.039661116898059845, 0.0413082018494606, -0.0060233683325350285, 0.01050359383225441, -0.01704639010131359, 0.18785437941551208, 0.08442220091819763, -0.00980404019355774, 0.014014190062880516, 0.013383169658482075, 0.0040282090194523335, 0.02890218421816826, 0.037335604429244995, -0.003102392191067338, -0.027371730655431747, 0.0814734548330307, -0.0017686019418761134, 0.04887135326862335, -0.051636308431625366, -0.03093859739601612, 0.01869088225066662, -0.017855282872915268, -0.0014868347207084298, -0.05907747894525528, 0.05355248227715492, -0.01780625618994236, 0.028705602511763573, 0.03519345447421074, -0.0382872149348259, -0.029396221041679382, -0.057175882160663605, -0.02196010947227478, 0.016016239300370216, -0.03873825445771217, -0.06204645708203316, 0.010094759054481983, -0.013788585551083088, -0.013819029554724693, 0.07523481547832489, 0.051048312336206436, 0.03255835920572281, -0.02134954184293747, 0.04822724312543869, 0.021257760003209114, -0.034944772720336914, 0.0761139839887619, 0.033055379986763, 0.04502048343420029 ]
[ 0.0012338284868746996, -0.024804003536701202, -0.06915313005447388, -0.006431872025132179, 0.03033134900033474, 0.046877771615982056, 0.011761564761400223, -0.02797519415616989, -0.009553889743983746, -0.038905076682567596, -0.007275283802300692, -0.017181720584630966, 0.04003264755010605, -0.03210261091589928, 0.05868237838149071, -0.07318774610757828, 0.01689191348850727, -0.0033444210421293974, 0.009974531829357147, -0.026369549334049225, -0.00531004648655653, -0.0074130878783762455, 0.01840679720044136, 0.017202338203787804, 0.01169764157384634, -0.007076831068843603, -0.05560439079999924, -0.008913455531001091, 0.0007866143132559955, -0.10933168977499008, 0.022100048139691353, -0.027962757274508476, 0.00013369879161473364, -0.015585149638354778, 0.042018089443445206, -0.01218330953270197, -0.01077602431178093, 0.01448266301304102, -0.026256324723362923, 0.02221596986055374, 0.026489388197660446, -0.02443820796906948, -0.01570115238428116, -0.07819797843694687, -0.0051879906095564365, 0.020539160817861557, -0.042905353009700775, -0.06805990636348724, -0.010096000507473946, -0.0015295206103473902, -0.027543112635612488, -0.021819742396473885, -0.0014244072372093797, -0.03757808730006218, -0.013470868580043316, 0.0032240727450698614, -0.010730251669883728, 0.02379646524786949, -0.003927774261683226, -0.012689500115811825, 0.00890797283500433, -0.019823092967271805, -0.0020835367031395435, -0.007858135737478733, 0.04748549684882164, -0.024827314540743828, -0.04770709574222565, -0.04365288093686104, -0.018587486818432808, 0.028288541361689568, 0.004752347711473703, -0.04451870918273926, -0.03994395211338997, 0.0026629820931702852, -0.05355554819107056, -0.0010608563898131251, 0.045124489814043045, -0.00015908494242466986, 0.009164583869278431, 0.005632653366774321, -0.02690327726304531, -0.03420161455869675, -0.042969681322574615, 0.07053575664758682, -0.042919598519802094, -0.04288701340556145, -0.02965528704226017, -0.00954808946698904, -0.04600950703024864, 0.0068936035968363285, -0.03593160957098007, -0.02435835264623165, -0.00308255129493773, 0.025843439623713493, -0.04832354933023453, 0.008210728876292706, -0.023694491013884544, -0.05576144531369209, -0.00032517241197638214, 0.7790336012840271, 0.008436708711087704, 0.05926378443837166, 0.04975185915827751, 0.01935720257461071, 0.005000466015189886, 0.04464060068130493, -0.056996025145053864, 0.026790961623191833, -0.052771829068660736, -0.01682768017053604, 0.021700039505958557, 0.00031953235156834126, 0.02701243758201599, -0.018143100664019585, 0.00963007751852274, 0.021680597215890884, -0.017272252589464188, -0.04594385251402855, 0.01666596718132496, 0.045889705419540405, 0.08071128278970718, -0.02979264408349991, 0.0017914861673489213, -0.012387669645249844, 0.04839072376489639, -0.15610583126544952, 0.033494360744953156, -6.670923828760758e-33, 0.021391889080405235, -0.04630997031927109, -0.006967038847506046, 0.030725397169589996, 0.06835342943668365, 0.025539511814713478, 0.01116859633475542, 0.03145671635866165, -0.012781276367604733, -0.005285345483571291, 0.012581676244735718, 0.011495493352413177, -0.04547715559601784, -0.04769553616642952, -0.03239806368947029, 0.03015369549393654, -0.029306508600711823, 0.023986931890249252, -0.020099466666579247, -0.0037171475123614073, 0.050100721418857574, 0.027112610638141632, 0.01697339117527008, 0.047184113413095474, 0.01682400144636631, -0.012194724753499031, -0.002441470278427005, -0.030147861689329147, 0.017210720106959343, -0.021013304591178894, 0.03644658252596855, 0.023033970966935158, -0.017051011323928833, -0.025270657613873482, -0.0023286771029233932, -0.04886319488286972, -0.06390167027711868, -0.016357097774744034, -0.04270840436220169, 0.04789987951517105, -0.00943367462605238, -0.022844916209578514, 0.0010619198437780142, -0.022933034226298332, -0.06383223086595535, 0.042917054146528244, 0.054450470954179764, -0.013255336321890354, -0.01239155326038599, 0.016425825655460358, 0.023356370627880096, -0.036945607513189316, 0.024216311052441597, 0.038408033549785614, 0.008542426861822605, 0.013875446282327175, 0.02497870661318302, 0.04076686128973961, -0.010047538205981255, -0.006224681623280048, -0.030147207900881767, -0.017643708735704422, -0.0016511721769347787, 0.0016172933392226696, 0.02525445446372032, 0.027166804298758507, 0.013125409372150898, 0.04213360697031021, 0.01556068193167448, 0.00034974957816302776, -0.014693389646708965, 0.03904082253575325, -0.0006286497227847576, 0.016904469579458237, 0.05905435234308243, -0.046344123780727386, -0.033061373978853226, 0.031235162168741226, 0.020139310508966446, 0.01430798601359129, 0.031396668404340744, 0.012403740547597408, -0.03839177265763283, 0.025303034111857414, -0.05641155689954758, -0.05458807572722435, 0.01535109058022499, 0.0014803524827584624, -0.02231893688440323, -0.015816418454051018, 0.020750010386109352, 0.010404156520962715, 0.04642267897725105, -0.006200361996889114, -0.03798221796751022, 6.263825155816045e-33, -0.03170724958181381, -0.03291107714176178, -0.019885193556547165, 0.01759270578622818, 0.04185379296541214, 0.0308856088668108, 0.023531535640358925, 0.044108401983976364, -0.017358873039484024, 0.03401108458638191, -0.06603924185037613, -0.0008642692700959742, 0.002066102111712098, -0.04789008945226669, 0.034709226340055466, -0.009319819509983063, 0.018314728513360023, -0.07474382221698761, -0.01725161448121071, 0.0038076285272836685, 0.0470866933465004, 0.011573255062103271, 0.02126574143767357, 0.05975322425365448, -0.003833432449027896, 0.025553734973073006, 0.0032739860471338034, -0.0038146679289638996, -0.018554795533418655, 0.03527117520570755, 0.005794198252260685, -0.018405571579933167, 0.005345503333956003, -0.030193869024515152, -0.036059025675058365, -0.003962100949138403, 0.032510094344615936, 0.046219948679208755, -0.016078203916549683, -0.015138054266571999, 0.051224835216999054, 0.0013866693479940295, -0.0027386995498090982, 0.038910046219825745, 0.043641187250614166, 0.05476366728544235, -0.01361249852925539, -0.013729223981499672, 0.026092292740941048, 0.06483197212219238, -0.01715066470205784, -0.029677748680114746, 0.025035567581653595, 0.006663281936198473, 0.029129665344953537, -0.007785433903336525, -0.012358060106635094, -0.02305327169597149, -0.010267513804137707, 0.0036434971261769533, -0.03342058137059212, 0.013086413964629173, 0.018321197479963303, 0.03380526602268219, -0.05516384541988373, -0.0058762128464877605, -0.06995728611946106, 0.008241130970418453, 0.03313025087118149, -0.0077109928242862225, -0.032668355852365494, -0.05059937760233879, -0.0010402016341686249, 0.020753655582666397, 0.0005987100885249674, -0.009539659135043621, -0.021547969430685043, 0.023321302607655525, 0.036542609333992004, 0.013425619341433048, 0.02799958921968937, 0.03971998766064644, 0.016187595203518867, 0.020857922732830048, 0.047435540705919266, 0.004424049984663725, -0.05350590869784355, 0.02982306107878685, 0.014846356585621834, -0.007789304479956627, -0.02207118086516857, 0.003072876250371337, -0.031208869069814682, -0.0025042889174073935, 0.0001645261509111151, -1.199278010233229e-8, -0.01908217929303646, -0.0007938897470012307, -0.012233266606926918, 0.048822470009326935, 0.0472177229821682, -0.003498814068734646, 0.005834056530147791, 0.05924311652779579, 0.0031156488694250584, -0.016639912500977516, 0.037423815578222275, -0.03552250191569328, 0.017889389768242836, -0.008069117553532124, 0.031155820935964584, -0.040501728653907776, 0.025680257007479668, 0.0035743066109716892, 0.007847030647099018, 0.010293178260326385, -0.010602091439068317, 0.0412694588303566, 0.012303652241826057, -0.02135399542748928, 0.012149829417467117, 0.03724691644310951, -0.010386960580945015, -0.06754204630851746, -0.036645226180553436, 0.007650258485227823, -0.005266768857836723, -0.037563785910606384, -0.035425592213869095, 0.022713759914040565, -0.03984558954834938, -0.050818268209695816, 0.0005384646938182414, 0.00326008559204638, 0.02410595491528511, -0.02225983515381813, 0.008337176404893398, 0.02735733799636364, -0.0166474636644125, -0.014036105945706367, -0.010746282525360584, -0.01200584415346384, -0.03247328847646713, 0.05995314568281174, 0.01149388775229454, -0.03885730728507042, -0.04859275370836258, -0.040514200925827026, -0.0034564577508717775, 0.03088354878127575, 0.06286367028951645, -0.030728863552212715, 0.0379694439470768, -0.020928598940372467, 0.03490355238318443, 0.018062550574541092, 0.044633250683546066, -0.013268481008708477, -0.009149397723376751, -0.007287361193448305 ]
clickhouse-s3queue-no-zookeeper-configuration
https://markhneedham.com/blog/2023/12/13/clickhouse-s3queue-no-zookeeper-configuration
false
2023-12-14 00:44:37
litellm and llamafile - APIError: OpenAIException - File Not Found
[ "llamafile", "litellm", "til" ]
[ "TIL" ]
:icons: font I wanted to get two of my favourite tools in the LLM world - https://docs.litellm.ai/docs/[llmlite^] and https://github.com/Mozilla-Ocho/llamafile[llamafile^] - to play nicely and ran into an issue that I'll explain in this blog post. This should be helpful if you're trying to wire up other LLM servers to llmlite, it's not specific to llamafile. == Setting up llamafile In case you want to follow along, I https://github.com/Mozilla-Ocho/llamafile/releases[downloaded llamafile^] and MistralAI 7B weights from https://huggingface.co/TheBloke/Mistral-7B-v0.1-GGUF[TheBloke/Mistral-7B-v0.1-GGUF^]. I then started the llamafile server like this: [source, bash] ---- ./llamafile-server-0.3 -m models/mistral-7b-instruct-v0.1.Q4_K_M.gguf --nobrowser ---- == Installing litellm Let's install litellm, a library that lets you call many different LLMs as if they had the OpenAI API. [source, bash] ---- poetry add litellm ---- or [source, bash] ---- pip install litellm ---- == Calling llamafile from litellm Right, now we need to figure out how to call llamafile from litellm. There isn't currently a documentation page for llamafile, but we can follow the instructions for creating https://docs.litellm.ai/docs/providers/custom_openai_proxy[a Custom API Server^], since llamafile provides an Open AI compatible endpoint. [source, python] ---- import os from litellm import completion os.environ["OPENAI_API_KEY"] = "i-am-not-used-but-must-be-here" messages = [{"content": "Write a limerick about ClickHouse", "role": "user"}] response = completion( model="command-nightly", messages=messages, api_base="http://localhost:8080/", custom_llm_provider="openai" ) ---- I ran this code and got the following error: [source, python] ---- File ~/Library/Caches/pypoetry/virtualenvs/llamafile-playground-PMlWj0HV-py3.11/lib/python3.11/site-packages/litellm/utils.py:4192, in exception_type(model, original_exception, custom_llm_provider, completion_kwargs) 4190 else: 4191 exception_mapping_worked = True -> 4192 raise APIError( 4193 status_code=original_exception.status_code, 4194 message=f"OpenAIException - {original_exception.message}", 4195 llm_provider="openai", 4196 model=model, 4197 request=original_exception.request 4198 ) 4199 else: 4200 # if no status code then it is an APIConnectionError: https://github.com/openai/openai-python#handling-errors 4201 raise APIConnectionError( 4202 __cause__=original_exception.__cause__, 4203 llm_provider=custom_llm_provider, 4204 model=model, 4205 request=original_exception.request 4206 ) APIError: OpenAIException - File Not Found ---- I couldn't make much sense of the stack trace - I'm not sure why it's mentioning trying to find a file to start with, so I turned on debug mode so that I could see the HTTP requests that were being made. [source, python] ---- import litellm litellm.set_verbose = True ---- If we re-run the completion function above, we'll see something like the following output: [source, bash] ---- POST Request Sent from LiteLLM: curl -X POST \ http://localhost:8080 \ -d '{'model': 'command-nightly', 'messages': [{'content': 'Write a limerick about ClickHouse', 'role': 'user'}]}' RAW RESPONSE: File Not Found ---- The debug output doesn't seem quite right to me as I think it's actually appending `/chat/completion` to the base URI, which would mean the request was made to `http://localhost:8080/chat/completion`. I had a look in the llamafile logs to see if it had registered a request: [source, bash] ---- {"timestamp":1702535457,"level":"INFO","function":"log_server_request","line":2593,"message":"request","remote_addr":"127.0.0.1","remote_port":50193,"status":404,"method":"POST","path":"/chat/completions","params":{}} ---- The 'File Not Found' message makes more sense now since it was saying that it was getting a 404 when trying to call llamafile. The mistake I'd made is not including the `v1` suffix in the `api_base` property. Let's fix that: [source, python] ---- response = completion( model="command-nightly", messages=messages, api_base="http://localhost:8080/v1", custom_llm_provider="openai" ) ---- If we run it this time, we'll see the following debug output: [source, bash] ---- POST Request Sent from LiteLLM: curl -X POST \ http://localhost:8080/v1 \ -d '{'model': 'command-nightly', 'messages': [{'content': 'Write a limerick about ClickHouse', 'role': 'user'}]}' RAW RESPONSE: {"id":"chatcmpl-b5Q6ctuTXM9xgHJPyH7q8oqw5OL1FScH","choices":[{"finish_reason":"stop","index":0,"message":{"content":"There once was a database named ClickHouse\nIt could handle all sorts of data, no doubt\nWith its speed and its might\nIt could handle all queries in sight\nAnd its users were never left in a drought\n","role":"assistant","function_call":null,"tool_calls":null}}],"created":1702536234,"model":"gpt-3.5-turbo-0613","object":"chat.completion","system_fingerprint":null,"usage":{"completion_tokens":53,"prompt_tokens":37,"total_tokens":90}} ---- And let's print out the limerick: [source, python] ---- print(response.choices[0].message.content) ---- .Output [source, text] ---- There once was a database named ClickHouse It could handle all sorts of data, no doubt With its speed and its might It could handle all queries in sight And its users were never left in a drought ----
In this post, we'll learn how to get litellm and llamafile playing nicely together.
uploads/2023/12/litellm-llamafile.png
[ 0.004274768754839897, 0.005193162709474564, -0.0066509488970041275, 0.0188295915722847, 0.08518249541521072, 0.027408529072999954, 0.01234513707458973, 0.04084061086177826, -0.019664645195007324, -0.002643229439854622, -0.017692118883132935, 0.020099230110645294, -0.06402314454317093, 0.005070496816188097, -0.025243233889341354, 0.07341589778661728, 0.07413779199123383, 0.011171977035701275, 0.0015069099608808756, 0.02186368778347969, 0.03847877308726311, 0.06041358783841133, -0.007549552712589502, 0.03908444568514824, 0.001911774044856429, 0.027222542092204094, 0.020226042717695236, -0.005264642648398876, -0.07256379723548889, -0.016299614682793617, 0.03319559246301651, -0.018532777205109596, 0.011327982880175114, -0.01193319447338581, 0.026589874178171158, -0.008706245571374893, -0.03034849278628826, 0.007674035616219044, 0.016817186027765274, 0.029901446774601936, -0.04366377368569374, 0.03206300735473633, -0.006227435078471899, 0.011765851639211178, -0.03886549547314644, 0.00864324625581503, -0.06574445962905884, 0.0029511803295463324, 0.00748948659747839, 0.006082045845687389, -0.07779377698898315, 0.0353778675198555, -0.05125924572348595, -0.014745260588824749, -0.00034110352862626314, 0.04404326155781746, -0.002630951115861535, -0.07540981471538544, 0.013373972848057747, -0.022941643372178078, -0.030564595013856888, -0.003051275620236993, 0.02616393193602562, 0.017879631370306015, -0.0022293126676231623, -0.02477150782942772, -0.004824203904718161, 0.029039794579148293, -0.07951503992080688, -0.045192934572696686, -0.006646164692938328, 0.017809737473726273, -0.04553471505641937, -0.026077888906002045, 0.0446164608001709, -0.04786692559719086, -0.03791647031903267, 0.054659031331539154, 0.01863148808479309, 0.047553274780511856, -0.03266320377588272, 0.005247094668447971, 0.05149402841925621, 0.04140906408429146, -0.012645859271287918, -0.028008639812469482, -0.030930915847420692, -0.0026361087802797556, -0.04167421907186508, 0.06919997185468674, 0.030896464362740517, -0.07551591843366623, 0.030884169042110443, 0.01802740804851055, 0.020030226558446884, -0.003064068267121911, 0.007449235301464796, 0.0031663698609918356, -0.002370295347645879, 0.011001655831933022, -0.02127702161669731, -0.0265734251588583, 0.01693723350763321, 0.023053059354424477, -0.06910104304552078, 0.0019904582295566797, -0.04393889755010605, -0.006085623055696487, -0.006801096256822348, 0.002248257864266634, -0.003104729810729623, -0.006054821889847517, -0.02878241240978241, 0.005945293232798576, -0.053225327283144, 0.07381545752286911, 0.02712097205221653, -0.03222787007689476, -0.005335144232958555, 0.0456710122525692, 0.05801016837358475, 0.03532978519797325, -0.031175602227449417, 0.07285339385271072, 0.003427237505093217, 0.049620818346738815, -0.014146105386316776, 0.05957573652267456, -0.004654381889849901, -0.05254751071333885, -0.001959738088771701, 0.05532914027571678, -0.006071716081351042, 0.013390063308179379, 0.013300338760018349, -0.018289605155587196, -0.01669028215110302, -0.0014015062479302287, 0.05739424005150795, 0.004451341927051544, -0.0031149631831794977, -0.00484360009431839, -0.020066428929567337, 0.0011238213628530502, 0.03413935750722885, 0.011954043991863728, -0.0008439190569333732, -0.05056057125329971, -0.04345140978693962, 0.003236706368625164, 0.026534609496593475, 0.026997849345207214, 0.04100268334150314, -0.02791638672351837, 0.015113347209990025, 0.07902748137712479, 0.04249604046344757, -0.019514622166752815, -0.009701361879706383, 0.014493783004581928, 0.017346937209367752, 0.028924189507961273, 0.008652488701045513, 0.03751498460769653, -0.0027303132228553295, -0.022159166634082794, 0.0020990094635635614, 0.03517023101449013, 0.002136828610673547, 0.01397821493446827, -0.07273373752832413, -0.06785125285387039, 0.06006241217255592, -0.029492774978280067, -0.02199084497988224, 0.03201767057180405, 0.11565980315208435, 0.04886723682284355, 0.033266838639974594, 0.042616378515958786, -0.08279425650835037, 0.002525225281715393, 0.006449903827160597, 0.01201265025883913, 0.041721194982528687, -0.01240233238786459, 0.09706194698810577, -0.0012442984152585268, 0.016505448147654533, 0.014397142454981804, -0.060188114643096924, -0.037005212157964706, -0.024206319823861122, 0.007092694751918316, 0.06794305145740509, -0.020352991297841072, -0.014900349080562592, 0.056569285690784454, 0.03278251364827156, 0.050250064581632614, 0.017519425600767136, 0.000025538332920405082, 0.019328728318214417, -0.06798917800188065, -0.07235913723707199, 0.029600810259580612, 0.043381087481975555, -0.007703442592173815, -0.01753818243741989, 0.00367628107778728, -0.04211036488413811, 0.00831170380115509, 0.04599301517009735, 0.0029128994792699814, 0.03620630130171776, -0.015619062818586826, 0.03711259737610817, -0.043270692229270935, 0.04931998625397682, -0.047285765409469604, 0.013584780506789684, 0.005066108424216509, -0.009818511083722115, -0.011787711642682552, -0.0019923432264477015, 0.11895415186882019, 0.05423100292682648, -0.04730254039168358, -0.037539951503276825, 0.008065388537943363, 0.020380834117531776, -0.0644632950425148, 0.011689559556543827, -0.007971073500812054, -0.008321872912347317, -0.009660955518484116, -0.023124350234866142, -0.04988391697406769, 0.00512084923684597, -0.036368004977703094, -0.0019504863303154707, 0.06760545074939728, -0.003845514263957739, 0.05271793156862259, 0.01147426851093769, -0.01812533289194107, -0.018657216802239418, -0.047119349241256714, -0.061302173882722855, 0.023638226091861725, 0.03291015326976776, -0.013718299567699432, 0.03252984210848808, -0.01879815384745598, -0.02302343025803566, -0.033010873943567276, -0.06077658757567406, 0.03390287235379219, 0.0350806787610054, 0.06249367073178291, -0.027405714616179466, 0.03248431533575058, -0.001810512156225741, 0.015382490120828152, -0.007631365675479174, -0.05035915598273277, -0.021946534514427185, -0.011987663805484772, -0.006207452155649662, 0.022364715114235878, 0.02743113785982132, 0.035154182463884354, 0.0068289488554000854, -0.001744749490171671, 0.02481350675225258, 0.015065396204590797, 0.05371955409646034, 0.003027397906407714, -0.013944457285106182, -0.04993915930390358, -0.016667595133185387, 0.06799337267875671, -0.03286496177315712, -0.04177229851484299, -0.03386634215712547, -0.05614021420478821, 0.04525145888328552, -0.0879693552851677, -0.03637101501226425, -0.034668050706386566, -0.00046229915460571647, 0.03085630014538765, 0.027136176824569702, 0.014874443411827087, 0.006226666271686554, 0.003092263825237751, 0.006220540963113308, 0.021512236446142197, -0.017572177574038506, 0.02987685054540634, -0.0037638808134943247, 0.011300160549581051, 0.05949607864022255, 0.001888257684186101, 0.004769881721585989, -0.03817756101489067, 0.025102507323026657, -0.02779572084546089, -0.26813915371894836, 0.03162315860390663, 0.01575763337314129, -0.052482739090919495, 0.005294665694236755, -0.003902358002960682, -0.00542475376278162, -0.051256213337183, 0.003603242104873061, -0.00383919314481318, -0.014125500805675983, -0.023804057389497757, -0.011080502532422543, 0.015797346830368042, -0.0005217475700192153, 0.015836136415600777, -0.007757917977869511, -0.03069975972175598, -0.002697115996852517, 0.0368071012198925, -0.008589762263000011, -0.050336141139268875, 0.008340181782841682, 0.0660753846168518, 0.020053895190358162, 0.047537822276353836, -0.03577436879277229, 0.04410971701145172, -0.04294247552752495, -0.016077570617198944, 0.005693419370800257, -0.0028080404736101627, -0.009630112908780575, -0.001407549367286265, -0.026743287220597267, -0.015029978938400745, 0.07118155062198639, 0.01573910005390644, 0.031601160764694214, -0.0024921775329858065, -0.00427964236587286, -0.039577119052410126, 0.004488226491957903, -0.014941643923521042, 0.08586609363555908, -0.010656826198101044, -0.09692580997943878, -0.018697205930948257, -0.04961446300148964, 0.08003629744052887, -0.05114450305700302, -0.06274386495351791, -0.02921629697084427, 0.054405778646469116, 0.03479628637433052, 0.002007425529882312, -0.01579822413623333, -0.023326149210333824, -0.06547234207391739, -0.027295181527733803, -0.014276050962507725, -0.04430517926812172, -0.05690676346421242, -0.060454145073890686, -0.022498691454529762, -0.06880376487970352, -0.04093584790825844, -0.022184712812304497, 0.08563637733459473, 0.03355347365140915, -0.03492052108049393, -0.02541697397828102, -0.036845579743385315, -0.09484729915857315, -0.001527651445940137, -0.019535863772034645, -0.030354749411344528, -0.017649438232183456, -0.032245658338069916, 0.05206967145204544, -0.039821479469537735, -0.04067341238260269, 0.022459544241428375, 0.005408036056905985, -0.01432215329259634, -0.0044836499728262424, 0.009086854755878448, -0.002636129967868328, -0.002867156872525811, -0.008379842154681683, 0.061748310923576355, 0.005398275796324015, -0.04104303568601608, -0.019088713452219963, -0.00438319006934762, -0.022715119644999504, 0.0291182491928339, 0.016730966046452522, 0.012324359267950058, 0.07363764196634293, 0.033878788352012634, -0.05540848895907402, 0.004775027744472027, -0.020816318690776825, -0.0059228092432022095, 0.01976964622735977, -0.05504142493009567, 0.005963290575891733, 0.04124042019248009, -0.01237140130251646, -0.023341068997979164, -0.05136029049754143, 0.02077069692313671, -0.0515902079641819, -0.05896320194005966, -0.03991801291704178, 0.027213290333747864, 0.04609313979744911, 0.0288255475461483, 0.0024580766912549734, -0.04585663229227066, 0.025599027052521706, 0.026296496391296387, -0.050420891493558884, -0.043124955147504807, -0.021337678655982018, 0.0015511547680944204, 0.0023387866094708443, 0.006736679933965206, 0.010190603323280811, -0.02307724766433239, 0.015412592329084873, 0.030183954164385796, -0.06238453462719917, 0.0231003500521183, -0.03177662193775177, -0.03900501877069473, -0.017166312783956528, 0.023009004071354866, -0.009627367369830608, -0.008855080232024193, -0.0032747099176049232, 0.011885709129273891, 0.01175147294998169, 0.06003440171480179, -0.005858762189745903, 0.016376260668039322, -0.02394474484026432, -0.021702781319618225, 0.020012246444821358, 0.007366819307208061, -0.01871298812329769, 0.025643961504101753, -0.029535891488194466, 0.00243028299883008, -0.019834095612168312, -0.004720441065728664, -0.009859820827841759, -0.00766395591199398, -0.03280555084347725, 0.0072615426033735275, -0.031338199973106384, -0.015837786719202995, -0.006290566176176071, -0.006965216714888811, 0.030700551345944405, 0.004025468602776527, 0.020807357504963875, 0.009187059476971626, 0.01135239191353321, 0.04161366447806358, 0.004889003466814756, -0.028235452249646187, 0.011754716746509075, -0.017194373533129692, 0.003863989608362317, 0.00001853461071732454, 0.012359841726720333, 0.019643180072307587, 0.024511829018592834, -0.01627155765891075, -0.04443119093775749, 0.03749179467558861, -0.004450877662748098, 0.03269831836223602, 0.011725912801921368, -0.027366453781723976, -0.026135453954339027, -0.02184128575026989, -0.01860126107931137, -0.023474914953112602, 0.018380209803581238, -0.009595843032002449, 0.00790084432810545, -0.04102226346731186, -0.09744510799646378, 0.029611172154545784, 0.009322883561253548, 0.040244102478027344, -0.004661450162529945, -0.032130949199199677, 0.0019663022831082344, -0.05938052013516426, 0.017680160701274872, 0.04001370817422867, -0.08014615625143051, 0.018153607845306396, -0.008628963492810726, -0.016270890831947327, -0.005970056634396315, 0.025352302938699722, -0.04940585792064667, -0.0016464439686387777, 0.007977711036801338, 0.032889824360609055, -0.04916032776236534, -0.03752898797392845, -0.015280935913324356, 0.012524943798780441, -0.012985600158572197, 0.011998594738543034, -0.014890845865011215, -0.020598752424120903, 0.0014312922721728683, -0.037020642310380936, 0.02408258430659771, -0.01728883758187294, -0.013566149398684502, 0.04242316633462906, -0.026761610060930252, 0.053159601986408234, -0.050771314650774, 0.039458587765693665, 0.03348305821418762, -0.008736780844628811, 0.02469150349497795, -0.053424980491399765, -0.022449638694524765, -0.005320450756698847, 0.041846394538879395, 0.025295602157711983, 0.016532303765416145, -0.03646298497915268, -0.01804446242749691, -0.02684272639453411, 0.02698337659239769, -0.029128996655344963, -0.017368854954838753, 0.003740341402590275, 0.0661616250872612, -0.018905626609921455, -0.0019009214593097568, -0.008841479197144508, -0.011735688894987106, 0.06596074253320694, -0.05457914620637894, -0.028283925727009773, 0.014309132471680641, -0.051164112985134125, 0.03655204176902771, 0.03043791465461254, 0.01509775873273611, -0.06313499063253403, 0.03997054323554039, 0.03904726356267929, 0.01704477146267891, 0.05117375776171684, -0.01839747652411461, 0.03648552671074867, -0.027298180386424065, -0.019831212237477303, -0.07520429790019989, 0.0023065097630023956, -0.0039058681577444077, -0.020993517711758614, -0.038867417722940445, 0.005349450279027224, -0.06547094136476517, 0.05831156671047211, -0.06794583797454834, -0.020464502274990082, 0.05014457553625107, 0.008320384658873081, 0.005860747303813696, 0.04198244959115982, -0.04882758483290672, 0.049793243408203125, 0.04678616300225258, -0.04707993566989899, -0.004744898993521929, -0.019799377769231796, 0.06835532188415527, -0.00009010146459331736, 0.022456228733062744, 0.01061385776847601, -0.005315924063324928, 0.0530753955245018, 0.02384994365274906, 0.0003814284282270819, 0.03969259932637215, -0.009555201046168804, 0.06388037651777267, 0.0202013086527586, 0.0074799638241529465, 0.0038594743236899376, 0.010654930025339127, -0.02011982351541519, -0.05328471586108208, 0.038308531045913696, -0.01310011837631464, -0.031248148530721664, -0.05276528000831604, 0.05303182452917099, 0.021154064685106277, -0.001747266622260213, -0.04819706827402115, 0.01640588603913784, -0.04991461709141731, 0.001400530687533319, -0.019712181761860847, 0.0064655933529138565, -0.04077514261007309, 0.04902168735861778, -0.014999675564467907, 0.026578450575470924, 0.06875818222761154, -0.008891267701983452, -0.010403724387288094, 0.023578593507409096, 0.0785873755812645, 0.07230191677808762, 0.0371890626847744, 0.02106640301644802, 0.06748263537883759, -0.025434551760554314, -0.053524527698755264, -0.0028901740442961454, -0.0036891582421958447, -0.013356441631913185, -0.018544768914580345, 0.05375053733587265, 0.0721929743885994, -0.015276116319000721, 0.06025001034140587, -0.016234761103987694, -0.018964137881994247, -0.00038028613198548555, 0.0028338285628706217, 0.022523334249854088, 0.04198947548866272, 0.000324318534694612, 0.0130320368334651, -0.007173594087362289, -0.02841266803443432, 0.043062660843133926, -0.016587698832154274, -0.01786426454782486, 0.02925121784210205, -0.021241633221507072, 0.015748120844364166, -0.008872290141880512, 0.06184264272451401, 0.07181306928396225, -0.014061965048313141, -0.0162313561886549, 0.000085855157522019, 0.02235272526741028, 0.03709812089800835, 0.010659024119377136, -0.014326038770377636, -0.018263166770339012, -0.00364835187792778, -0.013928581960499287, 0.006070380564779043, -0.011364982463419437, -0.004235187545418739, 0.05558858439326286, -0.029404252767562866, -0.0060313669964671135, 0.031321801245212555, 0.012420176528394222, -0.056249748915433884, -0.02458196133375168, -0.06808467209339142, -0.03247612342238426, -0.06074996292591095, 0.009748422540724277, -0.0005350903957150877, 0.014667362906038761, -0.05365052446722984, -0.03544101119041443, -0.012903114780783653, 0.008497125469148159, 0.006273834500461817, -0.05973335728049278, -0.023701192811131477, 0.026100285351276398, 0.025479434058070183, -0.024284332990646362, 0.005610345862805843, 0.0707421749830246, 0.0011961199343204498, -0.016417384147644043, -0.04182976484298706, 0.00948560331016779, 0.03816690668463707, 0.00663516391068697, 0.031112702563405037, -0.07476780563592911, 0.026200802996754646, 0.03518343344330788, 0.009404659271240234, -0.06848837435245514, 0.01295330747961998, 0.04282147064805031, -0.016179943457245827, 0.06269942224025726, -0.018738936632871628, -0.004185165744274855, -0.030221033841371536, -0.03540778532624245, -0.02565568871796131, 0.013674135319888592, 0.05915561690926552, 0.007665657438337803, 0.0738959088921547, 0.028382712975144386, 0.006023712921887636, -0.04479587823152542, -0.013650387525558472, 0.003623762633651495, 0.009061898104846478, -0.05210619419813156, -0.013673710636794567, -0.02511690743267536, -0.06571663916110992, -0.025232413783669472, 0.027301136404275894, -0.021152779459953308, -0.025432229042053223, 0.006006511393934488, -0.00017053363262675703, -0.054153572767972946, 0.04142352193593979, -0.03961235284805298, -0.015266827307641506, -0.024637190625071526, -0.01024655532091856, -0.010168498381972313, 0.04556337371468544, 0.023120151832699776, 0.004954752512276173, 0.03361921384930611, -0.039126377552747726, -0.001054239459335804, -0.0032083233818411827, 0.02514435537159443, 0.0331774465739727, -0.0063028354197740555, 0.003939950373023748 ]
[ -0.08526282757520676, -0.024359386414289474, -0.011365198530256748, -0.025736583396792412, 0.05650177225470543, -0.06160964444279671, -0.041983623057603836, 0.014330237172544003, -0.02805492840707302, -0.04206175357103348, -0.02329113706946373, -0.015107301063835621, 0.027081536129117012, -0.02539111115038395, 0.0925050899386406, 0.013291888870298862, 0.009848099201917648, -0.04994349554181099, -0.04624790698289871, 0.022227818146348, 0.024686580523848534, 0.009211761876940727, -0.010918631218373775, -0.0077372160740196705, -0.00034354932722635567, 0.048289600759744644, 0.03146064281463623, -0.023830581456422806, 0.025747306644916534, -0.19352026283740997, 0.015414414927363396, 0.011350811459124088, 0.030794518068432808, -0.021452924236655235, -0.027792613953351974, 0.055679161101579666, -0.010230773128569126, -0.013490051962435246, -0.000704136211425066, 0.034849729388952255, 0.03572692349553108, 0.0016095043392851949, -0.05438102409243584, 0.006952723953872919, 0.05824698507785797, -0.04882068186998367, -0.020966950803995132, -0.02188953571021557, -0.021525004878640175, 0.0030241585336625576, -0.018923461437225342, -0.006891316268593073, -0.013134573586285114, 0.0039532920345664024, -0.019951576367020607, 0.00044427686952985823, 0.029931120574474335, 0.05121700465679169, 0.02687566727399826, 0.04400985315442085, 0.010101276449859142, -0.0015782570699229836, -0.12232960760593414, 0.14326076209545135, -0.028210489079356194, 0.04941659793257713, -0.031127918511629105, -0.02128218673169613, -0.015329645946621895, 0.07248929888010025, 0.016656972467899323, -0.021689504384994507, -0.010118313133716583, 0.025268642231822014, 0.026193326339125633, 0.00012408308975864202, 0.012901349924504757, 0.028703300282359123, 0.02687343955039978, -0.03261997550725937, -0.04429710656404495, -0.012337946332991123, -0.028486372902989388, -0.04314978048205376, -0.01873568817973137, 0.0017561528366059065, -0.02566519007086754, 0.07796718925237656, 0.005832268390804529, 0.00582042196765542, 0.014030923135578632, -0.023772308602929115, 0.03426751866936684, 0.03474690765142441, -0.1302952915430069, -0.004576453939080238, -0.03000175766646862, 0.01901664212346077, -0.06496994197368622, 0.44061052799224854, -0.03297136351466179, -0.005531223490834236, 0.040552057325839996, 0.026286281645298004, 0.03701140731573105, 0.009594123810529709, -0.02749704010784626, -0.028366124257445335, -0.0002389924047747627, 0.0009188228868879378, 0.014830198138952255, 0.011765990406274796, 0.035466041415929794, -0.04886025935411453, -0.013442284427583218, -0.00657663494348526, 0.0032527174334973097, 0.00920175015926361, 0.0014007211429998279, 0.012320068664848804, -0.0351707860827446, -0.0009410179918631911, 0.0033946235198527575, 0.0034230579622089863, 0.014526932500302792, -0.003922421019524336, 0.030526697635650635, 0.018125735223293304, 0.060147278010845184, 0.01842874102294445, 0.024837668985128403, -0.016012540087103844, -0.053865909576416016, -0.024360857903957367, 0.04029953479766846, 0.03738735243678093, 0.029923947528004646, -0.06288208812475204, -0.0004190234176348895, 0.018203595653176308, -0.026937564834952354, -0.03576463460922241, 0.04398497939109802, -0.001876220223493874, -0.01675780862569809, 0.06411207467317581, 0.02338576689362526, -0.02459952048957348, -0.045702334493398666, -0.03552453964948654, -0.02188541740179062, 0.03287047520279884, 0.0022059697657823563, -0.001742181135341525, 0.05018865317106247, 0.014630365185439587, 0.08357468247413635, 0.017423855140805244, -0.04649796336889267, 0.015273350290954113, 0.008349104784429073, -0.02183903194963932, -0.002400133293122053, 0.027483804151415825, -0.0020246373023837805, -0.122735895216465, -0.06273210048675537, 0.017824187874794006, -0.018145281821489334, -0.06817576289176941, -0.00005261789556243457, 0.058599770069122314, -0.0435100682079792, -0.002251387806609273, 0.05929390713572502, 0.020484915003180504, -0.026119763031601906, -0.020515572279691696, 0.015788981691002846, 0.01281557697802782, -0.026664434000849724, -0.008209126070141792, -0.033629920333623886, -0.0019439943134784698, -0.05549092963337898, -0.07188547402620316, -0.038292258977890015, -0.046827998012304306, -0.021027980372309685, -0.08531302958726883, 0.012608758173882961, 0.020816702395677567, -0.014226533472537994, 0.062451526522636414, 0.0021150035317987204, -0.013975988142192364, -0.027096839621663094, -0.013971631415188313, 0.02564319781959057, -0.05011952295899391, 0.02621963620185852, 0.025537578389048576, 0.00199289433658123, 0.02096070721745491, -0.014903225935995579, 0.03148222342133522, 0.04711311310529709, -0.03852718323469162, 0.080340176820755, 0.031369734555482864, -0.05892707034945488, 0.012075716629624367, 0.020725976675748825, 0.02497534453868866, 0.004393762908875942, 0.007980681024491787, 0.021847331896424294, 0.01213142741471529, 0.0022161519154906273, 0.023808553814888, -0.012277578935027122, -0.04300576448440552, -0.0778493732213974, -0.35206538438796997, -0.023259436711668968, -0.017778191715478897, -0.009212670847773552, -0.006721143145114183, -0.09425495564937592, 0.02075703628361225, -0.009539108723402023, 0.023158658295869827, 0.037215545773506165, 0.11320856958627701, -0.0060692885890603065, 0.00790700875222683, -0.09915265440940857, -0.003792727831751108, 0.04675745964050293, -0.01744282804429531, -0.020873984321951866, -0.0064978874288499355, 0.04931167513132095, 0.016957717016339302, -0.02933342568576336, -0.04783764109015465, -0.04122176393866539, -0.002838132670149207, -0.014009262435138226, 0.09392085671424866, 0.01765238679945469, 0.04383894428610802, -0.06854277104139328, 0.0333750881254673, 0.00026617772527970374, 0.007378675974905491, -0.08477791398763657, -0.01193525642156601, -0.04869440943002701, 0.02252824790775776, -0.007455558516085148, 0.04356173798441887, -0.022330543026328087, -0.046672381460666656, 0.028311394155025482, -0.05078331008553505, -0.05927341431379318, -0.016068974509835243, -0.0019558880012482405, 0.0008601053268648684, -0.02602057345211506, -0.020542412996292114, 0.05209624767303467, -0.006128828506916761, 0.033389315009117126, 0.025278132408857346, 0.03447413444519043, -0.025911903008818626, -0.016193125396966934, -0.07747802883386612, -0.0322534404695034, 0.011620879173278809, -0.06080830097198486, 0.028021488338708878, 0.04507886618375778, 0.024834327399730682, -0.08375567942857742, 0.007413713727146387, 0.011501108296215534, 0.0027477573603391647, 0.0024696856271475554, 0.06069597229361534, -0.03890532627701759, -0.02044018730521202, 0.0613144151866436, -0.005941690877079964, 0.01518461387604475, 0.03414314240217209, 0.06146443635225296, 0.023507876321673393, 0.040703464299440384, 0.022323550656437874, -0.01380827184766531, 0.021816443651914597, 0.03516319394111633, 0.013506988063454628, -0.04473014548420906, -0.03323124349117279, 0.06136951968073845, -0.047179605811834335, -0.0256270170211792, 0.04969137907028198, 0.02109762839972973, 0.0006214185850694776, -0.005531336646527052, 0.03210483118891716, -0.05182820186018944, 0.052793655544519424, 0.01569979637861252, -0.21285024285316467, 0.04284951090812683, 0.12143895030021667, 0.0900089219212532, -0.028289424255490303, 0.003601635340601206, 0.02098175883293152, -0.06734984368085861, 0.016218911856412888, 0.026503639295697212, 0.01212507113814354, 0.024230893701314926, -0.01497876737266779, -0.031281352043151855, 0.04826868698000908, -0.04780277982354164, 0.059778425842523575, 0.005625997669994831, 0.0070547256618738174, -0.014311213977634907, -0.013253334909677505, -0.033238355070352554, 0.17542342841625214, 0.01821793057024479, -0.04546884819865227, 0.05281931161880493, 0.023072101175785065, 0.00852709449827671, 0.012680924497544765, 0.0547182634472847, 0.05226203426718712, 0.014308023266494274, 0.049598127603530884, 0.017993248999118805, 0.030614705756306648, -0.044226229190826416, -0.054238542914390564, 0.0315987654030323, 0.014743473380804062, 0.014847013168036938, 0.009962481446564198, 0.05128265917301178, -0.06531862169504166, 0.027558235451579094, 0.05695938691496849, -0.009053991176187992, -0.011135497130453587, 0.03007807582616806, -0.030142106115818024, -0.004182588309049606, -0.04140418767929077, -0.06231411173939705, -0.055322691798210144, 0.01111613865941763, -0.009333765134215355, 0.0277554988861084, 0.010356925427913666, -0.01498758140951395, 0.025021206587553024, 0.014470410533249378, 0.014910620637238026, -0.055820416659116745, 0.11289319396018982, -0.005074222572147846, 0.051833681762218475 ]
[ 0.005190398544073105, 0.014602597802877426, -0.015554171055555344, 0.0011725923977792263, -0.008464198559522629, 0.017733987420797348, -0.00035698298597708344, 0.01777867041528225, 0.014033909887075424, -0.00018109646043740213, -0.024488545954227448, -0.008439124561846256, 0.049443021416664124, -0.029310856014490128, 0.04494256526231766, 0.00885207112878561, 0.00253164186142385, -0.014753329567611217, 0.021533584222197533, 0.010128805413842201, 0.012676920741796494, 0.0025203388649970293, 0.012393760494887829, -0.010355590842664242, 0.011154763400554657, 0.02896728925406933, -0.03759051114320755, 0.021169539541006088, 0.023076333105564117, -0.1310230791568756, -0.012712943367660046, -0.0008618401479907334, -0.03548585996031761, -0.014189059846103191, -0.0293254591524601, 0.012890540063381195, -0.00882362574338913, 0.010957096703350544, -0.03505609929561615, 0.0016125330002978444, 0.029162965714931488, -0.019283132627606392, 0.014865530654788017, -0.00036009549512527883, -0.035678185522556305, -0.022366909310221672, -0.016992248594760895, -0.033745672553777695, -0.04397089034318924, 0.00605727406218648, -0.0312229935079813, -0.02682061865925789, -0.011649972759187222, 0.014209931716322899, 0.0013747914927080274, -0.020837852731347084, 0.009295118041336536, 0.006601459346711636, 0.006346055306494236, -0.025192545726895332, -0.01709410548210144, -0.01363012008368969, -0.01843249425292015, -0.015113011002540588, 0.00959519762545824, -0.012067874893546104, -0.04488428682088852, 0.000664263847284019, -0.004565050359815359, -0.029650026932358742, 0.004864365793764591, -0.03194022178649902, 0.0022030281834304333, 0.007203510496765375, -0.024526989087462425, 0.007484135217964649, 0.03971024602651596, 0.014111495576798916, -0.0006120690959505737, -0.0011132352519780397, -0.005658126436173916, 0.03303593769669533, -0.00006194590969244018, 0.046438444405794144, 0.02428348921239376, 0.0018390336772426963, -0.0046785795129835606, 0.015458391979336739, 0.026030227541923523, -0.0028832033276557922, 0.004572293255478144, 0.01581818237900734, -0.030720103532075882, 0.0520828515291214, -0.06106036528944969, -0.009124021977186203, 0.015467902645468712, -0.02836855873465538, -0.041657693684101105, 0.85628741979599, -0.004305680748075247, 0.0096507603302598, 0.008945262059569359, 0.03418642282485962, 0.014941100962460041, -0.01220809668302536, 0.0019883529748767614, -0.026856649667024612, -0.010854755528271198, -0.04657081887125969, 0.055940985679626465, -0.018980560824275017, 0.04451580345630646, 0.037031788378953934, 0.038423389196395874, -0.001126609044149518, 0.045249093323946, 0.02715109847486019, -0.002184335608035326, 0.03394550085067749, -0.009118694812059402, -0.02774154394865036, 0.01729470305144787, 0.01586301252245903, 0.019425498321652412, -0.16597096621990204, 0.004013370722532272, -6.343215105534705e-33, 0.03832808509469032, -0.02057826891541481, -0.011208048090338707, 0.018827976658940315, 0.028635554015636444, -0.022251415997743607, 0.022386930882930756, 0.05042198300361633, -0.03109562024474144, -0.03404802083969116, -0.021001998335123062, 0.010547572746872902, -0.02173660509288311, -0.005317586474120617, 0.014713995158672333, -0.024844856932759285, 0.014005430974066257, 0.02897273562848568, 0.007741193752735853, -0.033270757645368576, 0.007804230321198702, 0.02431461401283741, 0.019575145095586777, -0.014352191239595413, -0.03871496394276619, 0.07026967406272888, 0.04531719535589218, -0.02110748365521431, 0.013220855966210365, -0.03542819991707802, -0.0033869571052491665, 0.000058591616834746674, 0.029448790475726128, -0.03963519260287285, -0.009130437858402729, -0.028806721791625023, -0.06225777044892311, 0.02439986728131771, -0.02455378696322441, -0.03642156720161438, -0.0223124697804451, 0.0153528843075037, -0.03346755728125572, -0.01966887153685093, -0.029018182307481766, -0.014890427701175213, -0.030726358294487, 0.038797229528427124, 0.014309195801615715, -0.004824550356715918, 0.030620437115430832, -0.0038940238300710917, -0.045993126928806305, 0.002984394319355488, -0.0013467728858813643, 0.014224132522940636, -0.054088324308395386, 0.035953812301158905, 0.02514844946563244, 0.0005189659423194826, 0.005546046886593103, -0.015372276306152344, 0.004346449393779039, 0.021839134395122528, 0.02473601885139942, -0.009864713996648788, -0.020436761900782585, -0.004977340344339609, 0.014213544316589832, 0.004062877502292395, -0.0310138538479805, 0.004909413866698742, -0.005633469205349684, -0.0034760001581162214, 0.014355589635670185, -0.030371828004717827, 0.0172792449593544, -0.02707098238170147, 0.0308767631649971, 0.02889453060925007, 0.026724930852651596, 0.006345267873257399, -0.009684806689620018, -0.03270474076271057, -0.023587429895997047, -0.03804905340075493, 0.025884663686156273, -0.029726840555667877, -0.0590999610722065, 0.022245634347200394, 0.012632795609533787, 0.03725237771868706, -0.008455474860966206, -0.00460006995126605, -0.03157665207982063, 7.067185913158828e-33, 0.002634416799992323, -0.02279159612953663, -0.00484989071264863, 0.0056189135648310184, 0.013985760509967804, -0.022940561175346375, 0.008205750957131386, 0.00422796793282032, -0.02577456459403038, 0.057531170547008514, -0.013678337447345257, 0.026140917092561722, -0.03449959307909012, -0.002682367106899619, 0.04255043715238571, -0.03668345510959625, 0.023930931463837624, -0.0050712209194898605, 0.044806502759456635, -0.007767728995531797, -0.011652971617877483, 0.004545159637928009, -0.007173092570155859, 0.0030335376504808664, -0.004659711383283138, 0.047668032348155975, -0.008644664660096169, 0.025509854778647423, -0.03292165696620941, -0.013593515381217003, 0.04594438895583153, -0.016445623710751534, -0.019625913351774216, -0.009536129422485828, -0.002758045680820942, 0.044624220579862595, 0.003359996946528554, 0.015685666352510452, 0.007105758413672447, 0.000017277536244364455, 0.04629860818386078, -0.025539729744195938, -0.004839228466153145, -0.011698494665324688, -0.01216750405728817, -0.0246164221316576, -0.028139745816588402, -0.02206890471279621, 0.033269234001636505, 0.005092117004096508, 0.032042186707258224, -0.022101039066910744, 0.021329479292035103, 0.016280001029372215, -0.012322226539254189, -0.02522313967347145, -0.004582573659718037, 0.01562904752790928, -0.03789399191737175, -0.03126049414277077, -0.013416890986263752, -0.008246609941124916, 0.005906360223889351, -0.023153632879257202, -0.030861055478453636, 0.030758751556277275, -0.03528490662574768, -0.0009503383189439774, -0.006975778844207525, 0.01055412832647562, 0.010714429430663586, 0.0013314002426341176, -0.005552114453166723, 0.017178788781166077, 0.018187658861279488, 0.0058745420537889, -0.01305505633354187, 0.0007767374627292156, -0.0238077063113451, -0.010280734859406948, -0.004877018742263317, -0.0018768960144370794, -0.009164446033537388, 0.004332541022449732, -0.013746286742389202, 0.00025525985984131694, 0.0075064292177557945, 0.03846447914838791, 0.01668967679142952, 0.01954563520848751, 0.0007981142261996865, -0.001569149550050497, -0.0005785387475043535, -0.0017175419488921762, 0.05072470381855965, -1.2699703511032112e-8, -0.03694482520222664, -0.027958331629633904, -0.009174467995762825, 0.04653633013367653, -0.007973344065248966, 0.022630492225289345, -0.01652221567928791, -0.02048013173043728, 0.030722960829734802, -0.004608629271388054, 0.06189288944005966, -0.01975596323609352, -0.002577791456133127, 0.011315974406898022, 0.02318389341235161, -0.017671233043074608, 0.006951516959816217, 0.003143243957310915, 0.01652892306447029, -0.022882143035531044, 0.01506324578076601, 0.03704245015978813, 0.046960555016994476, -0.019847754389047623, 0.010059680789709091, -0.007947086356580257, -0.021602043882012367, -0.08403606712818146, -0.042876917868852615, 0.03316671401262283, 0.02917899191379547, -0.04690222069621086, -0.0150589095428586, 0.03127723187208176, -0.025981104001402855, 0.000886858906596899, 0.018072687089443207, -0.02335415408015251, 0.021194234490394592, -0.020670413970947266, 0.023097248747944832, 0.011015301570296288, 0.007993914186954498, -0.021961744874715805, -0.015267706476151943, -0.01796255074441433, -0.014660556800663471, 0.013464056886732578, 0.017151562497019768, 0.004203926771879196, 0.024103378877043724, -0.009789944626390934, 0.006451960187405348, 0.012192227877676487, 0.0015298477374017239, -0.004211613908410072, 0.01270818617194891, 0.003571852808818221, -0.018992844969034195, 0.029992535710334778, 0.032232750207185745, 0.024772191420197487, -0.002544896909967065, -0.01675463654100895 ]
litellm-apierror-openaiexception-file-not-found
https://markhneedham.com/blog/2023/12/14/litellm-apierror-openaiexception-file-not-found
false
2023-12-22 00:44:37
Generating sample JSON data in S3 with shadowtraffic.io
[ "s3", "til" ]
[ "TIL" ]
:icons: font I needed to quickly generate some data to write to S3 for a https://www.youtube.com/watch?v=lnbWFjfZxZ4&t=4s[recent video on the ClickHouse YouTube channel^] and it seemed like a good opportunity to try out https://shadowtraffic.io/[ShadowTraffic]. ShadowTraffic is a tool being built by Michael Drogalis and it simulates production traffic based on a JSON file that you provide. Michael is documenting the process of building ShadowTraffic on https://michaeldrogalis.substack.com/[his Substack newsletter^]. [NOTE] ==== Michael gave me a free license to use for a few months as a 'thank you' for giving him some feedback on the product, but there is also a free version of the tool. ==== The first thing we need to do is create a JSON file that describes the data that we'd like to generate. I've adapted the sample e-commerce example to include orders and customer details in the same file. You can see my file below: .orders.json [source, json] ---- { "generators": [ { "table": "orders", "row": { "customerId": {"_gen": "uuid"}, "name": {"_gen": "string", "expr": "#{Name.full_name}"}, "gender": { "_gen": "weightedOneOf", "choices": [ {"weight": 49, "value": "male"}, {"weight": 49, "value": "female"}, {"weight": 1, "value": "non-binary"} ] }, "address": {"_gen": "string", "expr": "#{Address.full_address}"}, "membership": { "_gen": "oneOf", "choices": ["bronze", "silver", "gold"] }, "orderId": {"_gen": "uuid"}, "orderDate": {"_gen": "now"}, "cost": { "_gen": "number", "n": {"_gen": "normalDistribution", "mean": 50, "sd": 20} }, "creditCardNumber": {"_gen": "string", "expr": "#{Finance.credit_card}"} } } ], "connections": { "pg": { "kind": "postgres", "connectionConfigs": { "host": "localhost", "port": 5432, "username": "postgres", "password": "postgres", "db": "mydb" } } } } ---- You need to provide a connection to either Postgres or Kafka, so I had to provide something even though I'm not planning to use either tool. We can then call ShadowTraffic in Dry-Run mode by passing the `--stdout` parameter and have it generate a single record by passing `--sample 1`. [source, bash] ---- docker run \ --env-file license.env \ -v ./orders.json:/home/config.json \ shadowtraffic/shadowtraffic:latest \ --config /home/config.json \ -q --stdout --sample 1 ---- .Output [source, json] ---- { "table" : "orders", "row" : { "membership" : "gold", "gender" : "female", "customerId" : "2aad62a4-0cd7-4e44-b64f-bb2d0561e8b1", "cost" : 17.29207782281643, "name" : "Silas Homenick", "creditCardNumber" : "6771575378399757", "address" : "Apt. 604 974 Simon Lakes, New Austinside, PA 21990-2886", "orderId" : "f147c2ac-0b82-474a-af2d-67c79a3dd0b4", "orderDate" : 1703266786651 } } ---- The bit of JSON that we're interested in is under the `row` property, so we're going to filter that using the `jq` tool. We'll pass in the `-c` flag so that we get the JSON on a single line: [source, bash] ---- docker run \ --env-file license.env \ -v ./orders.json:/home/config.json \ shadowtraffic/shadowtraffic:latest \ --config /home/config.json \ -q --stdout --sample 1 | jq -c '.row' ---- .Output [source, json] ---- {"membership":"gold","gender":"female","customerId":"266422b6-8abd-4b3c-a293-0461c0d45ab8","cost":37.02247112428602,"name":"Tristan Block","creditCardNumber":"3528-7302-3997-0048","address":"Apt. 817 623 Odilia Way, Predovicshire, MD 95620-9365","orderId":"d54ec3e5-5956-4915-b410-dbbe74a98a83","orderDate":1703266858589} ---- If we remove `--sample 1` it will generate infinite JSON messages for us. I then wrote the following script which reads messages from `stdin` and writes them to S3 every 100,000 messages. .upload_s3.py [source, python] ---- import sys import boto3 from datetime import datetime def upload_to_s3(file_name, bucket_name, object_name=None): if object_name is None: object_name = file_name s3_client = boto3.client('s3') try: print(f"Uploading {file_name} to {bucket_name}") s3_client.upload_file(file_name, bucket_name, object_name) print(f"Uploaded {file_name} to {bucket_name}") except Exception as e: print(f"Error uploading file: {e}") def main(): max_entries = 100_000 entries = [] for line in sys.stdin: entries.append(line) if len(entries) >= max_entries: file_name = f"data/batch_{datetime.now().strftime('%Y%m%d%H%M%S')}.json" with open(file_name, 'w') as file: for entry in entries: file.write(entry) upload_to_s3(file_name, 's3queue.clickhouse.com') entries = [] if __name__ == "__main__": main() ---- We can then pipe the messages into `upload_s3.py` by piping the previous command into this script. [NOTE] ==== Make sure you setup your AWS credentials that have write access to an S3 bucket. I think the easiest way to do this is with an AWS profile, which you con configure like this: [source, bash] ---- export AWS_PROFILE="<your-profile>" ---- ==== The final code looks like this: [source, bash] ---- docker run \ --env-file license.env \ -v ./orders.json:/home/config.json \ shadowtraffic/shadowtraffic:latest \ --config /home/config.json \ -q --stdout | jq -c '.row' | poetry run python upload_s3.py ---- I found this generated 100,000 messages roughly every 15 seconds, which is pretty neat and more than enough data for my use case.
In this post, we'll learn how to generate sample data in an S3 bucket with shadowtraffic.io.
uploads/2023/12/shadowtraffic-banner.png
[ 0.026312151923775673, -0.009971888735890388, 0.02212444134056568, 0.06165478751063347, 0.09760173410177231, 0.03708707168698311, 0.01020438689738512, 0.04846350848674774, -0.030118778347969055, -0.024567320942878723, 0.010928360745310783, -0.025633489713072777, -0.08043333142995834, 0.014775152318179607, -0.02594582550227642, 0.06883201748132706, 0.0741104781627655, 0.022545160725712776, 0.00032364431535825133, 0.005688038654625416, 0.02694782428443432, 0.059714511036872864, 0.011153235100209713, 0.038088735193014145, 0.030201857909560204, 0.023165984079241753, 0.006952740252017975, -0.009037221781909466, -0.05851328745484352, 0.0033753742463886738, 0.026237525045871735, -0.005101866088807583, 0.00978282280266285, -0.0012780147371813655, 0.0008151414222083986, -0.009231406264007092, -0.023896226659417152, 0.0013682603603228927, -0.007643958553671837, 0.02200731448829174, -0.07405488193035126, 0.016616541892290115, -0.0014605226460844278, 0.010738104581832886, -0.022190820425748825, 0.004522042348980904, -0.05695943534374237, 0.007670457009226084, -0.009684949181973934, 0.002836296334862709, -0.06130450963973999, 0.0453050397336483, -0.03625042736530304, -0.008976130746304989, 0.0006043100147508085, 0.05348508805036545, 0.02180793508887291, -0.06936608254909515, 0.021308040246367455, -0.06529275327920914, 0.008444500155746937, -0.0015063881874084473, 0.016927381977438927, 0.02179267816245556, 0.011830772273242474, -0.01963111013174057, 0.01331433467566967, 0.059115394949913025, -0.04119150713086128, -0.02737806923687458, 0.014550337567925453, -0.0017486317083239555, -0.017305830493569374, -0.016028456389904022, 0.015405520796775818, -0.051664456725120544, -0.030895115807652473, 0.05169057846069336, 0.02235492132604122, 0.052753377705812454, -0.015051287598907948, 0.008460038341581821, 0.03192974999547005, 0.028194420039653778, -0.011722357012331486, -0.056426238268613815, -0.03526434302330017, -0.0017576244426891208, -0.04384242743253708, 0.0671793594956398, 0.024767449125647545, -0.042467013001441956, 0.037261392921209335, 0.022363433614373207, 0.0013886484084650874, -0.0032349408138543367, 0.001010562409646809, -0.017384853214025497, -0.01750061847269535, 0.0012943377951160073, -0.05076827481389046, -0.017744330689311028, 0.018266381695866585, 0.004750694148242474, -0.0776214748620987, -0.003167905379086733, -0.027362635359168053, -0.012692471034824848, 0.023875294253230095, 0.005319393239915371, -0.0030976550187915564, -0.005768896080553532, -0.02794097177684307, 0.0020321598276495934, -0.0589652843773365, 0.07950761169195175, 0.01896652765572071, -0.02812829613685608, -0.009671656414866447, 0.02389347180724144, 0.09189806133508682, 0.0073158023878932, -0.03172720968723297, 0.07120773941278458, 0.031493283808231354, 0.018742302432656288, 0.012365280650556087, 0.04603036865592003, 0.012222588062286377, -0.05653829127550125, -0.01980472542345524, 0.06790552288293839, -0.010420428588986397, 0.02366344816982746, 0.009752608835697174, -0.034569401293992996, -0.004380929749459028, -0.006689374800771475, 0.06290290504693985, 0.0049126711674034595, -0.01198697742074728, -0.0071656065993011, -0.0010452070273458958, -0.009192005731165409, 0.03078141249716282, 0.0001365453499602154, 0.012906225398182869, -0.06186913698911667, -0.0452282540500164, 0.027926145121455193, 0.004126792773604393, 0.014186871238052845, 0.05384861305356026, -0.024913368746638298, -0.002923934254795313, 0.0956743061542511, 0.047581978142261505, 0.012279875576496124, -0.014088532887399197, 0.0036658006720244884, 0.058823876082897186, 0.03944152593612671, 0.008637698367238045, 0.02751132659614086, -0.003721266519278288, -0.0210491381585598, 0.004626987501978874, 0.036829039454460144, -0.017627958208322525, -0.018186118453741074, -0.05543636903166771, -0.0461178719997406, 0.07986808568239212, -0.02095452882349491, 0.003079902846366167, 0.05636344850063324, 0.07138489931821823, 0.034522645175457, 0.023438934236764908, 0.022656403481960297, -0.0926186814904213, 0.04787313565611839, 0.030436716973781586, 0.0037005681078881025, 0.02523546852171421, -0.026616295799613, 0.08131540566682816, 0.02912551537156105, 0.007599399425089359, 0.04962046816945076, -0.065264493227005, -0.09693998098373413, -0.01415320299565792, 0.0010373463155701756, 0.04797414317727089, -0.052402425557374954, 0.007957901805639267, 0.04699224978685379, 0.024496035650372505, 0.04655991122126579, 0.005600000265985727, -0.02918621152639389, 0.011796549893915653, -0.04650885611772537, -0.056660424917936325, 0.008295544423162937, 0.04466671869158745, -0.0037963499780744314, -0.028359495103359222, 0.024515682831406593, -0.017038654536008835, -0.01075928658246994, 0.03454071283340454, -0.01965353824198246, 0.030237115919589996, 0.007061748765408993, 0.013464093208312988, -0.0038805666845291853, 0.03993327543139458, -0.044077470898628235, 0.039779182523489, 0.003644865471869707, -0.018037863075733185, -0.010417596437036991, -0.012742256745696068, 0.1329949051141739, 0.059538859874010086, -0.031793564558029175, -0.03975005820393562, 0.033991072326898575, 0.0022863855119794607, -0.04068822041153908, 0.004530842881649733, -0.0188433937728405, -0.028658641502261162, 0.016272492706775665, -0.04188000410795212, -0.02655371092259884, 0.0318661592900753, -0.06432750821113586, 0.02733447402715683, 0.05427611246705055, -0.039075817912817, 0.05022028833627701, 0.017059452831745148, -0.011285727843642235, -0.013652533292770386, -0.0367150753736496, -0.060742925852537155, 0.0023495559580624104, 0.0022033408749848604, -0.004893948324024677, 0.037781499326229095, -0.03128378093242645, -0.02323681116104126, -0.022389892488718033, -0.03136617690324783, 0.044958390295505524, 0.04600745812058449, 0.0660117045044899, -0.027378106489777565, 0.022288113832473755, -0.011103516444563866, 0.02001205086708069, -0.023854438215494156, -0.05305105820298195, -0.035056423395872116, -0.018273862078785896, 0.011689521372318268, 0.022870521992444992, 0.03345254063606262, 0.0070853387005627155, -0.008953707292675972, 0.00007589415326947346, 0.03470771387219429, -0.0019040531478822231, 0.03039609082043171, -0.0074744196608662605, 0.00037939337198622525, -0.026356086134910583, -0.03257765620946884, 0.07297878712415695, -0.03522346541285515, -0.024159008637070656, 0.0037969048134982586, -0.060594867914915085, 0.022925980389118195, -0.05929010733962059, -0.03818894550204277, -0.02090168185532093, -0.0061449347995221615, 0.02543182298541069, -0.0031448081135749817, 0.002211549086496234, 0.05351792648434639, 0.010719012469053268, 0.002061569131910801, 0.005207163281738758, -0.01583576388657093, 0.03549410402774811, 0.0027583178598433733, 0.016858140006661415, 0.044762905687093735, 0.0020912059117108583, -0.00013250358460936695, -0.0536532998085022, 0.02086559310555458, -0.02346147410571575, -0.2881409227848053, 0.0180794820189476, -0.007446774747222662, -0.042349204421043396, 0.011555491015315056, -0.01336982473731041, -0.0036234413273632526, -0.05238352343440056, 0.00624039163812995, 0.012794853188097477, -0.013887348584830761, -0.05409330129623413, -0.025573642924427986, 0.038666289299726486, 0.007952925749123096, 0.007231466472148895, 0.0044216192327439785, -0.029251663014292717, 0.01470852643251419, 0.017624549567699432, -0.012712480500340462, -0.07187625765800476, 0.004767314530909061, 0.06836585700511932, 0.04968921095132828, 0.062466882169246674, -0.077518530189991, 0.001392511767335236, -0.04866732284426689, -0.023857565596699715, 0.02240617945790291, -0.00820651650428772, 0.0024597954470664263, -0.02775713801383972, -0.00812261551618576, -0.024387463927268982, 0.052896566689014435, 0.0070941089652478695, 0.022767584770917892, -0.017664674669504166, -0.008440818637609482, -0.024025933817029, -0.017826469615101814, 0.01527082547545433, 0.1076957955956459, -0.0050481706857681274, -0.07757160067558289, 0.013335411436855793, -0.05064539983868599, 0.09455808252096176, -0.023905271664261818, -0.041938282549381256, -0.04673861712217331, 0.026603179052472115, -0.006471293978393078, 0.0018846512539312243, -0.010890237055718899, -0.004776943475008011, -0.03815330192446709, -0.02057505212724209, 0.015935823321342468, -0.022737104445695877, -0.03185669332742691, -0.017396047711372375, -0.011395438574254513, -0.06541251391172409, -0.0633130893111229, -0.01485126931220293, 0.08126997947692871, 0.019267695024609566, -0.025782251730561256, 0.007565964944660664, -0.009427410550415516, -0.10998106747865677, 0.00769363809376955, -0.02013004571199417, -0.01698514074087143, 0.0029133250936865807, -0.016781141981482506, 0.06794245541095734, -0.024755652993917465, -0.04945838078856468, 0.019575223326683044, 0.008789045736193657, -0.007889341562986374, -0.0078028300777077675, 0.023332424461841583, -0.002265574876219034, 0.005648727063089609, -0.0058944085612893105, 0.08041013777256012, -0.04909041151404381, -0.01458494458347559, -0.024064797908067703, 0.007279090583324432, 0.025585951283574104, 0.027712436392903328, -0.016823353245854378, 0.00989445298910141, 0.03118184208869934, 0.03091755509376526, -0.06459572911262512, 0.014940045773983002, -0.04379698261618614, 0.008419747464358807, -0.013653639703989029, -0.04718594625592232, 0.02026166394352913, 0.0091215455904603, 0.006273834966123104, 0.0017004207475110888, -0.035811200737953186, 0.007255410775542259, -0.05618326738476753, -0.028671111911535263, -0.024027423933148384, 0.017054157331585884, 0.0440402589738369, 0.03407963737845421, -0.013433700427412987, -0.05354488641023636, 0.04270797222852707, 0.0015448547201231122, -0.035403672605752945, -0.05677737295627594, -0.03092990256845951, -0.009133661165833473, 0.013002404943108559, 0.007218297105282545, 0.0068193762563169, -0.0050314804539084435, 0.023876264691352844, 0.008433829993009567, -0.046658892184495926, 0.02447018027305603, -0.013628066517412663, -0.06093217059969902, -0.039768122136592865, 0.021315669640898705, 0.009791512973606586, -0.004981338046491146, 0.008659006096422672, 0.00950965378433466, 0.008466636762022972, 0.0704534500837326, 0.004616593010723591, 0.04874088242650032, -0.00546976737678051, 0.0018962285248562694, -0.012664473615586758, 0.0015630829147994518, -0.05143551528453827, 0.015884101390838623, -0.04507031291723251, -0.019355662167072296, -0.03329864516854286, 0.03390383720397949, -0.006682609207928181, -0.022262725979089737, -0.020901082083582878, 0.02921031229197979, -0.07115509361028671, -0.0007872873684391379, -0.0038338243030011654, -0.003325938479974866, 0.04109637439250946, 0.00976999569684267, 0.010636386461555958, -0.005997610744088888, 0.01582665741443634, 0.04410985857248306, 0.0004437388270162046, -0.047934453934431076, 0.01754365861415863, -0.003448756644502282, -0.02842235378921032, -0.008517290465533733, -0.0043500266037881374, 0.024211419746279716, 0.032646264880895615, -0.01722254604101181, 0.003626653691753745, 0.0012658886844292283, 0.014767502434551716, 0.0554393045604229, 0.025244252756237984, -0.03370818868279457, -0.01979578658938408, -0.018106453120708466, -0.009271759539842606, -0.020223287865519524, -0.019259706139564514, -0.008893204852938652, -0.025526758283376694, -0.01685384102165699, -0.07905712723731995, 0.016873659566044807, 0.025500617921352386, 0.023537158966064453, 0.022557126358151436, -0.01825837977230549, -0.000639485428109765, -0.03450695425271988, 0.027589226141572, 0.04568103700876236, -0.07200292497873306, 0.011630291119217873, 0.004557850770652294, 0.006846824195235968, 0.002144918078556657, 0.03513669595122337, -0.03976288437843323, -0.03950413689017296, -0.009433665312826633, 0.019482331350445747, -0.035978518426418304, -0.01825706847012043, -0.03551950678229332, 0.0193558968603611, -0.010722847655415535, -0.003743292298167944, -0.007358113303780556, -0.022585002705454826, 0.003111790167167783, -0.011870323680341244, 0.02534334361553192, -0.025035476312041283, -0.007325057405978441, 0.022215602919459343, -0.00744626997038722, 0.009351416490972042, -0.0336565300822258, 0.017973318696022034, 0.03778747096657753, -0.008702998049557209, -0.013659942895174026, -0.03863462805747986, -0.016835222020745277, 0.02732253074645996, 0.048270437866449356, -0.0057089002802968025, -0.008604326285421848, -0.04351982846856117, -0.00006134235445642844, -0.014135811477899551, 0.008485602214932442, -0.021712204441428185, -0.027819378301501274, 0.04464397206902504, 0.049837157130241394, 0.01346314512193203, -0.004516757093369961, -0.029644114896655083, -0.027960125356912613, 0.06365835666656494, -0.08138193935155869, -0.0270816832780838, -0.009344855323433876, -0.03796380013227463, 0.029302947223186493, 0.0012345932191237807, 0.016030367463827133, -0.04469185322523117, 0.019902609288692474, 0.035111553966999054, 0.019383640959858894, 0.03366773948073387, -0.015455791726708412, 0.02696043811738491, -0.051016680896282196, 0.007930372841656208, -0.07806619256734848, 0.01455942913889885, 0.034255705773830414, -0.017133034765720367, -0.016601769253611565, 0.01678996905684471, -0.06611116230487823, 0.01977986842393875, -0.07351595163345337, -0.029953371733427048, 0.06360398232936859, -0.0036056546960026026, 0.00460370909422636, 0.005235514137893915, -0.05933546647429466, 0.03365107998251915, 0.044060949236154556, -0.03303389996290207, 0.013273780234158039, -0.0014266961952671409, 0.06031512841582298, 0.004318032879382372, 0.016675526276230812, -0.02233237400650978, -0.012907196767628193, 0.059119611978530884, 0.009748042561113834, -0.0008616086561232805, 0.058323416858911514, -0.03224747255444527, 0.034948620945215225, 0.026831163093447685, -0.028790775686502457, 0.026545865461230278, 0.03260502591729164, -0.01491512916982174, -0.06607581675052643, 0.03550195321440697, 0.008409034460783005, -0.032463401556015015, -0.07043058425188065, 0.05957235395908356, 0.007887179963290691, -0.030999550595879555, -0.062365997582674026, 0.028234174475073814, -0.04493975266814232, -0.00712981354445219, -0.013326907530426979, 0.009603825397789478, -0.03162342309951782, 0.059505801647901535, -0.004653113428503275, 0.0050331405363976955, 0.08360002189874649, 0.0059304921887815, 0.016944296658039093, -0.032639604061841965, 0.07479342073202133, 0.06807398051023483, 0.0361269935965538, -0.0037833191454410553, 0.07280650734901428, -0.022117845714092255, -0.045338768512010574, -0.002918918151408434, 0.002307110233232379, -0.016670173034071922, -0.008214575238525867, 0.005848611705005169, 0.08361309766769409, -0.003436268540099263, 0.07055655866861343, -0.029560977593064308, -0.01787327043712139, -0.010232998989522457, 0.014087319374084473, 0.008231930434703827, 0.043341733515262604, -0.004814894404262304, 0.01209933776408434, -0.00637295376509428, -0.022003525868058205, 0.033606912940740585, -0.00450287526473403, -0.0289172176271677, 0.02902638167142868, -0.027516158297657967, 0.01676960103213787, 0.010558209381997585, 0.0282126571983099, 0.07728459686040878, -0.044970545917749405, -0.0010673361830413342, 0.0014533533249050379, 0.03465721011161804, 0.006702732760459185, 0.03057814948260784, -0.014478347264230251, -0.007124411873519421, -0.009650502353906631, -0.0314217247068882, -0.011995219625532627, -0.037438977509737015, 0.015009417198598385, 0.0573490634560585, -0.014643016271293163, 0.004214696120470762, 0.029750004410743713, -0.02438185177743435, -0.03354556858539581, -0.044164493680000305, -0.039078276604413986, -0.055466342717409134, -0.0662621483206749, 0.0009353341883979738, -0.006060890853404999, -0.021903008222579956, -0.04099678993225098, -0.029433704912662506, -0.019420582801103592, 0.017700225114822388, 0.028549745678901672, -0.05195465683937073, -0.03288627788424492, 0.04095854610204697, 0.018012410029768944, 0.0005858016083948314, 0.008413094095885754, 0.04738340154290199, 0.01815330982208252, -0.02331865206360817, -0.031752727925777435, 0.0041842893697321415, 0.03302012011408806, 0.019901160150766373, 0.02501966431736946, -0.07568777352571487, 0.02828477881848812, 0.015354217030107975, -0.025243809446692467, -0.06420139223337173, 0.03943849354982376, 0.025367023423314095, -0.0029767260421067476, 0.07349710166454315, -0.009126192890107632, 0.0037080245092511177, -0.04526538774371147, -0.03641226142644882, 0.017953842878341675, 0.015155472792685032, 0.055154696106910706, -0.0238176379352808, 0.08979156613349915, 0.03485273942351341, -0.01843024045228958, -0.030313054099678993, -0.0023996310774236917, -0.013535808771848679, -0.0083879129961133, -0.029510851949453354, -0.018920201808214188, -0.028302205726504326, -0.08741407096385956, -0.028612645342946053, 0.010289186611771584, -0.03117786906659603, -0.04029187932610512, 0.008963227272033691, 0.011324645951390266, -0.01332476083189249, 0.0276613961905241, -0.046518176794052124, 0.022004321217536926, -0.026280153542757034, -0.006704450584948063, -0.039209723472595215, 0.023710336536169052, 0.0032049224246293306, -0.008779551833868027, 0.0348627045750618, -0.0621010921895504, 0.024163270369172096, -0.00883507076650858, 0.018324797973036766, 0.02992662787437439, -0.012697449885308743, 0.007626011501997709 ]
[ -0.06367727369070053, -0.018828226253390312, -0.009367558173835278, -0.029001517221331596, 0.059194259345531464, -0.041287411004304886, -0.03409643471240997, 0.0053685675375163555, -0.006745344027876854, -0.01569671556353569, 0.03876512497663498, -0.025449343025684357, -0.0037732578348368406, -0.0375245101749897, 0.10450392961502075, 0.005691058002412319, 0.015354079194366932, -0.07993175089359283, -0.04051368683576584, 0.049592506140470505, 0.022314179688692093, -0.03255319967865944, -0.05439985916018486, -0.03330966457724571, 0.012141729705035686, 0.007843054831027985, 0.05342304706573486, -0.03631655126810074, -0.017949433997273445, -0.18481914699077606, 0.025425981730222702, -0.013257015496492386, 0.048920731991529465, 0.0022755968384444714, 0.0036816063802689314, 0.031399257481098175, 0.001847338629886508, 0.02747008204460144, -0.025903481990098953, 0.02845890261232853, 0.012992293573915958, 0.01067583728581667, -0.07592492550611496, -0.012254057452082634, 0.015189770609140396, -0.01095071155577898, -0.0022093993611633778, -0.007272699847817421, -0.011431494727730751, 0.02766101248562336, -0.06165049225091934, -0.00691369129344821, 0.004464710131287575, -0.0065390984527766705, -0.028568297624588013, -0.005482664797455072, 0.053158827126026154, 0.03324318304657936, 0.019429532811045647, 0.02233188971877098, 0.021962421014904976, -0.0062391976825892925, -0.11837621033191681, 0.1123223677277565, 0.00737792020663619, 0.04421259090304375, -0.0358811654150486, -0.02218574658036232, -0.03372839838266373, 0.07601115107536316, 0.00029254070250317454, -0.03380230814218521, -0.04623944312334061, 0.06186533719301224, 0.030573077499866486, -0.0001701213332125917, -0.004864100366830826, 0.015885496512055397, 0.01778511516749859, -0.03546637296676636, -0.08179593086242676, -0.007695011328905821, -0.02246374636888504, -0.008796468377113342, -0.04068353399634361, 0.018557177856564522, -0.004771312233060598, 0.07025615125894547, 0.007200285792350769, 0.03859825059771538, 0.03229697793722153, -0.0030315506737679243, 0.028470786288380623, 0.0002774170134216547, -0.11565136909484863, -0.03706509619951248, -0.0310621690005064, 0.006098543293774128, -0.039293285459280014, 0.4466336667537689, 0.00030684410012327135, -0.02688831277191639, 0.05334557592868805, 0.00021752507018391043, 0.020301423966884613, 0.007366054225713015, 0.013198116794228554, -0.0263898354023695, 0.02390735223889351, -0.00989166833460331, -0.018826493993401527, 0.0169475469738245, 0.029955390840768814, -0.07233349978923798, 0.000991511857137084, 0.01193783525377512, -0.01521423738449812, 0.022680306807160378, -0.030718985944986343, 0.003593544941395521, -0.00615911278873682, 0.015249856747686863, 0.03485599532723427, -0.02719743736088276, 0.02420489862561226, -0.011824525892734528, 0.07409357279539108, 0.0351581908762455, 0.05710911005735397, 0.05589433014392853, 0.03463694080710411, -0.007264428772032261, -0.07719141989946365, 0.009080637246370316, -0.0071713244542479515, 0.008283606730401516, -0.004403085447847843, -0.03383466601371765, -0.022883925586938858, 0.014124086126685143, -0.027060531079769135, -0.010636060498654842, 0.04712296277284622, -0.018274730071425438, 0.0008850397425703704, 0.07767602801322937, 0.02515813149511814, -0.02258574776351452, -0.00522596063092351, -0.03200077638030052, -0.004773372318595648, 0.040412601083517075, 0.030918864533305168, -0.036441996693611145, -0.0013335749972611666, 0.03818776458501816, 0.09447037428617477, -0.03973280265927315, -0.045297250151634216, 0.005305041093379259, 0.011804220266640186, -0.04066147282719612, -0.02252969704568386, 0.028348134830594063, 0.032318588346242905, -0.16252419352531433, -0.023204637691378593, 0.05085160210728645, -0.0002589679788798094, -0.056264910846948624, -0.0023591371718794107, 0.03305356949567795, -0.04758746922016144, -0.020026229321956635, 0.04674737900495529, 0.0033815044444054365, -0.039439745247364044, -0.00646175816655159, 0.031900011003017426, 0.024310283362865448, -0.012693820521235466, 0.005480021703988314, -0.028073398396372795, 0.0004592393524944782, -0.08073332905769348, -0.090508371591568, -0.04172646626830101, 0.01426370907574892, -0.036989644169807434, -0.017022257670760155, 0.018304672092199326, -0.022904925048351288, -0.07238200306892395, 0.08236439526081085, -0.024244217202067375, 0.011523242108523846, -0.0063178339041769505, -0.00986457522958517, -0.015598496422171593, -0.05080080032348633, 0.025435108691453934, 0.0008596685365773737, 0.0022405737545341253, 0.01755663938820362, -0.046880390495061874, 0.05973023921251297, 0.056069515645504, -0.040726304054260254, 0.06304691731929779, -0.0027238810434937477, -0.051922593265771866, 0.018265552818775177, 0.016787854954600334, 0.018214808776974678, -0.002500385046005249, -0.0124101173132658, -0.018905295059084892, -0.01501108705997467, 0.03473101556301117, 0.013716911897063255, -0.04792541638016701, -0.019808722659945488, -0.025610024109482765, -0.331098347902298, -0.02029661275446415, -0.0059454068541526794, 0.033897437155246735, -0.033367060124874115, -0.05960189923644066, 0.03084266185760498, 0.012668773531913757, 0.018564915284514427, 0.01796163059771061, 0.11986842751502991, -0.018829116597771645, 0.0342404842376709, -0.08990374207496643, -0.009419919922947884, 0.018377983942627907, -0.038975514471530914, -0.023946139961481094, -0.006739429198205471, 0.013329043984413147, -0.011111867614090443, -0.02026759460568428, -0.011813010089099407, -0.07047763466835022, 0.0027984182815998793, -0.017607348039746284, 0.1184244379401207, 0.028519414365291595, 0.04049161076545715, -0.0922347828745842, 0.07059774547815323, 0.0011360510252416134, 0.0029327915981411934, -0.06857899576425552, -0.0012117661535739899, -0.04233327507972717, 0.035349130630493164, -0.0021941503509879112, 0.01807105913758278, -0.008418614976108074, -0.07432278245687485, 0.03619346395134926, -0.046967778354883194, -0.042421843856573105, 0.00027218234026804566, -0.019875124096870422, -0.010773519054055214, -0.017605192959308624, -0.005247840657830238, 0.10209465026855469, 0.01754477061331272, -0.010206326842308044, 0.031048782169818878, 0.029245827347040176, 0.012151749804615974, -0.030249115079641342, -0.04601866751909256, -0.010269572027027607, -0.0010819357121363282, -0.014869614504277706, 0.020118553191423416, 0.03692614287137985, 0.040979914367198944, -0.052827831357717514, -0.002190020401030779, 0.03653210401535034, -0.0005855633062310517, -0.0019257239764556289, 0.02952439896762371, -0.02475569397211075, -0.039869360625743866, 0.08245205134153366, -0.008244982920587063, 0.00896411668509245, 0.0562853068113327, 0.053851932287216187, -0.017367735505104065, 0.011967208236455917, 0.006915727164596319, 0.0010765951592475176, 0.0359681062400341, 0.012662485241889954, 0.034750137478113174, -0.03513886779546738, -0.009348045103251934, 0.06847459077835083, -0.011361946351826191, -0.05547298491001129, 0.05489605665206909, 0.006719312630593777, -0.020951541140675545, -0.013183907605707645, -0.01750580593943596, -0.06100226938724518, 0.06641295552253723, -0.0013198377564549446, -0.24443559348583221, 0.017391234636306763, 0.033446524292230606, 0.0836389809846878, 0.015305810607969761, -0.006605849601328373, 0.03333311900496483, -0.060742586851119995, -0.03221035376191139, 0.02186507359147072, 0.03284579887986183, 0.026753628626465797, 0.01865447498857975, 0.000983410980552435, 0.026368115097284317, -0.004795755725353956, 0.04801648110151291, 0.008439373224973679, 0.014049693010747433, -0.01485624723136425, 0.008873829618096352, -0.04154015704989433, 0.18052682280540466, 0.05379347503185272, -0.04441642761230469, 0.02320653758943081, 0.016182994470000267, 0.00540431123226881, 0.0593072772026062, 0.01907600276172161, 0.014881757088005543, 0.01732059195637703, 0.036919258534908295, 0.04847799986600876, 0.04552314430475235, -0.07984186708927155, -0.03224479407072067, 0.043082162737846375, -0.0092034712433815, 0.010094801895320415, 0.019429825246334076, 0.03465816378593445, -0.03871064633131027, 0.02410023845732212, 0.04586096853017807, -0.025113234296441078, 0.001344867399893701, 0.0015476421685889363, -0.04816218093037605, 0.004417197313159704, -0.03733718767762184, -0.030910542234778404, -0.04491793364286423, -0.014103446155786514, -0.008660010993480682, 0.08018623292446136, -0.0049760290421545506, -0.02145530842244625, 0.04199723154306412, 0.02557945065200329, -0.03728923574090004, -0.020092841237783432, 0.08117492496967316, 0.0195603109896183, 0.02643316611647606 ]
[ 0.004195231478661299, 0.011956138536334038, -0.031752850860357285, 0.033820681273937225, 0.02002902515232563, 0.02869323268532753, 0.008732465095818043, -0.03392146900296211, -0.003281131386756897, -0.020360173657536507, 0.016174359247088432, 0.007252227049320936, 0.0035622455179691315, -0.049536608159542084, 0.057366251945495605, -0.02124510332942009, 0.057327136397361755, -0.002325058216229081, 0.01365401316434145, -0.020985998213291168, -0.014237807132303715, -0.013238111510872841, 0.005156638100743294, 0.0016094135353341699, -0.01068420335650444, 0.013761820271611214, -0.04916932433843613, 0.029575228691101074, 0.029605397954583168, -0.1387997716665268, 0.013379460200667381, -0.03519558906555176, 0.008047831244766712, 0.01649535819888115, -0.007906707003712654, -0.04105056822299957, 0.014984244480729103, -0.02261870540678501, -0.00507753249257803, -0.005418481305241585, 0.011446719989180565, -0.036921191960573196, -0.02094726264476776, -0.012649009935557842, -0.011234304867684841, -0.01899302378296852, -0.025131583213806152, -0.0026985208969563246, -0.003681387286633253, 0.01575712114572525, -0.0228403490036726, -0.028556017205119133, 0.014197040349245071, 0.010409565642476082, -0.0235182773321867, -0.024370891973376274, -0.029213640838861465, -0.00015368648746516556, 0.002208072692155838, -0.006787281483411789, 0.025256959721446037, -0.026807140558958054, -0.018136128783226013, -0.011868602596223354, 0.014815480448305607, -0.013941526412963867, -0.0464220754802227, -0.02140437439084053, -0.03170303627848625, 0.017386432737112045, -0.009982068091630936, -0.01037979032844305, -0.06023120507597923, 0.038460176438093185, -0.02996404655277729, -0.0039534918032586575, 0.030876249074935913, -0.03950202465057373, -0.005973639898002148, -0.00863476749509573, -0.030479004606604576, 0.004506116267293692, -0.024889998137950897, 0.0421917624771595, -0.01389558520168066, -0.03642895817756653, -0.0062623959966003895, 0.0034342962317168713, -0.016628673300147057, 0.01132169645279646, -0.04444281756877899, 0.006624928209930658, -0.0147795295342803, 0.004932193085551262, -0.07858482003211975, 0.0021181637421250343, -0.012554347515106201, -0.03694716468453407, -0.040165070444345474, 0.8458749651908875, 0.002089074347168207, 0.027243880555033684, 0.03722446784377098, 0.02622886560857296, 0.024280531331896782, 0.01619574800133705, -0.018792491406202316, 0.022991735488176346, -0.026602569967508316, -0.017086094245314598, -0.005189330317080021, 0.01099802739918232, 0.002664305502548814, 0.007386697456240654, -0.001753864111378789, 0.03332149609923363, -0.0048450748436152935, -0.004144034814089537, -0.015386168844997883, 0.028072865679860115, 0.04334793984889984, 0.01112330425530672, 0.002244069240987301, -0.017546819522976875, 0.019760126248002052, -0.18807661533355713, 0.03005203604698181, -6.586119258188623e-33, 0.004524711053818464, 0.014360901899635792, 0.00844621006399393, 0.012910587713122368, 0.05427468940615654, 0.013886399567127228, 0.04279537871479988, 0.024775587022304535, -0.018546367064118385, -0.0209327582269907, 0.024902809411287308, -0.00024116362328641117, 0.018187128007411957, -0.008468612097203732, -0.003263959428295493, -0.016033219173550606, 0.014813922345638275, 0.020069478079676628, 0.015989430248737335, -0.029261542484164238, 0.04104474186897278, 0.018671611323952675, 0.03630462661385536, 0.03231784328818321, -0.02735019102692604, 0.018718305975198746, -0.008806263096630573, 0.013455955311655998, 0.011543821543455124, -0.03609360009431839, 0.010056964121758938, 0.0263681560754776, 0.018587462604045868, -0.006679930724203587, 0.011356029659509659, -0.0487152561545372, -0.03549767658114433, -0.017180627211928368, -0.006621816661208868, -0.022672001272439957, -0.03801894932985306, 0.012987551279366016, -0.0279160737991333, -0.019577180966734886, -0.08495192974805832, 0.020177440717816353, 0.034640517085790634, 0.0011526093585416675, 0.007054045330733061, 0.006235853768885136, 0.026736866682767868, -0.013500635512173176, -0.010551009327173233, 0.027500063180923462, 0.005349666345864534, 0.016674576327204704, -0.0018619190668687224, 0.008115378208458424, 0.004643606022000313, -0.0458948016166687, -0.00698857894167304, -0.022265762090682983, 0.008612280711531639, 0.026338616386055946, 0.010977494530379772, 0.010633091442286968, 0.011059805750846863, -0.025426166132092476, 0.001268667634576559, 0.006194287911057472, -0.02925901859998703, 0.040854521095752716, -0.013685152865946293, 0.013010872527956963, 0.03415899723768234, -0.03794817626476288, -0.007713802624493837, 0.019259890541434288, 0.029658978804945946, 0.02214476279914379, -0.0021640060003846884, 0.01258007250726223, 0.020949825644493103, -0.013356547802686691, -0.027590936049818993, -0.022462965920567513, 0.027854006737470627, 0.004959711339324713, -0.0024854708462953568, -0.017578497529029846, 0.023613309487700462, 0.0529642254114151, -0.011854379437863827, -0.019431406632065773, 0.011971717700362206, 6.383538969871725e-33, -0.01227144431322813, -0.010235474444925785, -0.014106393791735172, 0.027012234553694725, 0.02890840172767639, 0.008799298666417599, 0.006938791833817959, 0.04201986640691757, -0.004777802620083094, 0.05584723502397537, -0.021047309041023254, -0.031594738364219666, -0.03246840462088585, -0.010622303001582623, 0.06400900334119797, -0.03247258812189102, 0.013142617419362068, -0.0434381440281868, 0.03316264972090721, 0.003637105692178011, 0.0007249783375300467, 0.040725309401750565, 0.010391168296337128, 0.035195160657167435, -0.018350649625062943, 0.014804250560700893, 0.0058632660657167435, 0.008040781132876873, -0.01724172942340374, 0.008165717124938965, 0.009163722395896912, -0.022192146629095078, -0.003004740457981825, -0.01322777010500431, -0.003410060191527009, 0.0063247415237128735, 0.00019291724311187863, 0.03831753134727478, 0.036041922867298126, -0.005215563345700502, 0.02868451178073883, 0.022451251745224, -0.003292153123766184, 0.009769626893103123, 0.027465658262372017, 0.014980483800172806, -0.020870905369520187, 0.00228496384806931, 0.00786085706204176, 0.005299022886902094, -0.0002296777383890003, 0.020306169986724854, -0.012058942578732967, 0.05297679081559181, -0.018627846613526344, -0.002112759044393897, -0.005655280314385891, -0.014480650424957275, -0.00913303904235363, -0.011186228133738041, -0.05164417251944542, 0.029977988451719284, 0.012027769349515438, 0.01889130100607872, -0.01140588242560625, -0.023944539949297905, -0.023734206333756447, -0.001352825085632503, 0.028090445324778557, -0.005848511587828398, -0.004764472600072622, -0.05540337413549423, -0.008937414735555649, 0.023628905415534973, 0.019944792613387108, -0.008066648617386818, -0.0046384925954043865, 0.029072914272546768, -0.020872311666607857, 0.0027836672961711884, 0.0333009697496891, -0.005256934557110071, 0.041295137256383896, -0.002342152176424861, 0.014510889537632465, 0.03128919377923012, -0.023239627480506897, 0.015980510041117668, 0.022522928193211555, 0.004639722406864166, 0.013270389288663864, -0.040025532245635986, 0.001678895903751254, 0.025229748338460922, 0.01880517788231373, -1.2445256380999581e-8, -0.05074075981974602, 0.01529028732329607, -0.004009927622973919, 0.02731340005993843, 0.011402719654142857, 0.001145833870396018, 0.002792015438899398, -0.017442570999264717, 0.015170316211879253, 0.0037189724389463663, 0.022003766149282455, -0.02414563298225403, -0.01560233999043703, 0.0031106844544410706, 0.016697116196155548, -0.03377772867679596, 0.013168323785066605, -0.013027632609009743, 0.02522730454802513, 0.019362397491931915, 0.02561628818511963, 0.0583905428647995, 0.020846690982580185, -0.03342379629611969, 0.03478119894862175, 0.019113115966320038, 0.005537169519811869, -0.08659063279628754, -0.02816852182149887, 0.013448212295770645, 0.020512178540229797, -0.016186200082302094, -0.0145600326359272, 0.001112134661525488, -0.045908451080322266, -0.03366978466510773, 0.008792782202363014, -0.012785498984158039, 0.009302891790866852, -0.0010323161259293556, 0.007166930008679628, 0.02073519118130207, -0.02211115136742592, -0.04849385470151901, -0.02920483611524105, 0.010861487127840519, -0.03124217502772808, 0.006091179791837931, 0.01137455552816391, -0.044539060443639755, -0.03514475375413895, -0.02763320691883564, -0.0002771312138065696, 0.008194595575332642, 0.021115217357873917, -0.013957646675407887, 0.026699895039200783, -0.05107579752802849, -0.010063123889267445, -0.00993013009428978, 0.045177657157182693, -0.03306474909186363, -0.027698224410414696, -0.013818287290632725 ]
sample-data-s3-shadowtraffic
https://markhneedham.com/blog/2023/12/22/sample-data-s3-shadowtraffic
false
2015-03-05 08:52:22
Python: scikit-learn/lda: Extracting topics from QCon talk abstracts
[ "python" ]
[ "Machine Learning", "Python" ]
Following on from http://blog.bruggen.com/2015/02/the-qcon-graph.html[Rik van Bruggen's blog post on a QCon graph he's created] ahead of http://qconlondon.com/schedule[this week's conference], I was curious whether we could extract any interesting relationships between talks based on their abstracts. Talks are already grouped by their hosting track but there's likely to be some overlap in topics even for talks on different tracks. I therefore wanted to extract topics and connect each talk to the topic that describes it best. My first attempt was following http://scikit-learn.org/stable/auto_examples/applications/topics_extraction_with_nmf.html[an example which uses Non-Negative Matrix factorization] which worked very well for extracting topics but didn't seem to provide an obvious way to work out how to link those topics to individual talks. Instead I ended up looking at the https://pypi.python.org/pypi/lda[lda library] which uses Latent Dirichlet Allocation and allowed me to achieve both goals. I already had some code to run TF/IDF over each of the talks so I thought I'd be able to feed the matrix output from that into the LDA function. This is what I started with: [source,python] ---- import csv from sklearn.feature_extraction.text import TfidfVectorizer, CountVectorizer from sklearn.decomposition import NMF from collections import defaultdict from bs4 import BeautifulSoup, NavigableString from soupselect import select def uri_to_file_name(uri): return uri.replace("/", "-") sessions = {} with open("data/sessions.csv", "r") as sessions_file: reader = csv.reader(sessions_file, delimiter = ",") reader.next() # header for row in reader: session_id = int(row[0]) filename = "data/sessions/" + uri_to_file_name(row[4]) page = open(filename).read() soup = BeautifulSoup(page) abstract = select(soup, "div.brenham-main-content p") if abstract: sessions[session_id] = {"abstract" : abstract[0].text, "title": row[3] } else: abstract = select(soup, "div.pane-content p") sessions[session_id] = {"abstract" : abstract[0].text, "title": row[3] } corpus = [] titles = [] for id, session in sorted(sessions.iteritems(), key=lambda t: int(t[0])): corpus.append(session["abstract"]) titles.append(session["title"]) n_topics = 15 n_top_words = 50 n_features = 6000 vectorizer = TfidfVectorizer(analyzer='word', ngram_range=(1,1), min_df = 0, stop_words = 'english') matrix = vectorizer.fit_transform(corpus) feature_names = vectorizer.get_feature_names() import lda import numpy as np vocab = feature_names model = lda.LDA(n_topics=20, n_iter=500, random_state=1) model.fit(matrix) topic_word = model.topic_word_ n_top_words = 20 for i, topic_dist in enumerate(topic_word): topic_words = np.array(vocab)[np.argsort(topic_dist)][:-n_top_words:-1] print('Topic {}: {}'.format(i, ' '.join(topic_words))) ---- And if we run it? [source,bash] ---- Topic 0: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 1: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 2: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 3: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 4: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 5: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 6: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 7: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 8: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 9: 10 faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 10: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 11: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 12: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 13: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 14: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 15: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 16: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 17: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 18: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure Topic 19: zoosk faced exposing expression external externally extra extraordinary extreme extremes face facebook facilitates faster factor factors fail failed failure ---- As you can see, every topic has the same set of words which isn't what we want. Let's switch out our TF/IDF vectorizer for a simpler count based one: [source,python] ---- vectorizer = CountVectorizer(analyzer='word', ngram_range=(1,1), min_df = 0, stop_words = 'english') ---- The rest of the code stays the same and these are the topics that get extracted: [source,bash] ---- Topic 0: time people company did writing real way used let cassandra soundcloud successful know web organization audio lives swift stuck Topic 1: process development delivery platform developer continuous testing rapidly deployment implementing release demonstrate paas advice hard light predictable radically introduce Topic 2: way open space kind people change meetings ll lead powerful practice times everyday simple qconlondon organization unconference track extraordinary Topic 3: apache apis processing open spark distributed leading making environments solr cases brooklyn components existing ingestion contributing data target evolved Topic 4: management million effective cost halo gameplay player billion ad catastrophic store microsoft final music influence information launch research purchased Topic 5: product look like use talk problems working analysis projects challenges 2011 functionality useful spread business deep inside happens sensemaker Topic 6: ll computers started principles free focus face smaller atlas control uses products avoid computing ground billions mean volume consistently Topic 7: code end users developers just application way line apps mobile features sites hours issues applications write faster game better Topic 8: ve development teams use things world like time learned lessons think methods multiple story say customer developer experiences organisations Topic 9: software building docker built challenges monitoring gilt application discuss solution decision talk download source center critical decisions bintray customers Topic 10: years infrastructure tools language different service lot devops talk adoption scala popular clojure advantages introduced effectively looking wasn includes Topic 11: high does latency session requirements functional performance real world questions problem second engineering patterns gravity explain discuss expected time Topic 12: business make build technology technologies help trying developers parts want interfaces small best centres implementations critical moo databases going Topic 13: need design systems large driven scale software applications slow protocol change needs approach gets new contracts solutions complicated distributed Topic 14: architecture service micro architectures increasing talk microservices order market value values new present presents services scalable trading practices today Topic 15: java using fast robovm lmax ios presentation really jvm native best exchange azul hardware started project slowdowns goal bring Topic 16: data services using traditional create ways support uk large user person complex systems production impact art organizations accessing mirage Topic 17: agile team experience don work doing processes based key reach extra defined pressure machines nightmare practices learn goals guidance Topic 18: internet new devices programming things iot big number deliver day connected performing growing got state thing provided times automated Topic 19: cloud including deploy session api government security culture software type attack techniques environment digital secure microservice better creation interaction ---- Some of the groupings seem to make sense e.g. Topic 11 contains words related to high performance code with low latency; Topic 15 covers Java, the JVM and other related words; but others are more difficult to decipher e.g. both Topic 14 and Topic 19 talk about micro services but the latter mentions 'government' and 'security' so perhaps the talks linked to that topic come at micro services from a different angle altogether. Next let's see which topics a talk is most likely to be about. We'll look at the first ten: [source,python] ---- doc_topic = model.doc_topic_ for i in range(0, 10): print("{} (top topic: {})".format(titles[i], doc_topic[i].argmax())) print(doc_topic[i].argsort()[::-1][:3]) To the Moon (top topic: 8) [ 8 0 11] Evolutionary Architecture and Micro-Services - A Match Enabled by Continuous Delivery (top topic: 14) [14 19 16] How SoundCloud uses Cassandra (top topic: 0) [0 6 5] DevOps and the Need for Speed (top topic: 18) [18 5 16] Neuro-diversity and agile (top topic: 7) [17 7 2] Java 8 in Anger (top topic: 7) [ 7 15 12] APIs that Change Lifestyles (top topic: 9) [ 9 6 19] Elasticsearch powers the Citizen Advice Bureau (CAB) to monitor trends in society before they become issues (top topic: 16) [16 12 19] Architecture Open Space (top topic: 2) [ 2 19 18] Don’t let Data Gravity crush your infrastructure (top topic: 11) [11 16 3] ---- So our third talk on the list 'How SoundCloud uses Cassandra' does end up being tagged with topic 0 which mentions SoundCloud so that's good! [source,text] ---- Topic 0: time people company did writing real way used let cassandra soundcloud successful know web organization audio lives swift stuck ---- It's next two topics are 5 & 6 which contain the following words\... [source,text] ---- Topic 5: product look like use talk problems working analysis projects challenges 2011 functionality useful spread business deep inside happens sensemaker Topic 6: ll computers started principles free focus face smaller atlas control uses products avoid computing ground billions mean volume consistently ---- \...which are not as intuitive. What about Java 8 in Anger? It's been tagged with topics 7, 15 and 12: [source,text] ---- Topic 7: code end users developers just application way line apps mobile features sites hours issues applications write faster game better Topic 15: java using fast robovm lmax ios presentation really jvm native best exchange azul hardware started project slowdowns goal bring Topic 12: business make build technology technologies help trying developers parts want interfaces small best centres implementations critical moo databases going ---- 15 makes sense since that mentions Java and perhaps 12 and 7 do as well as they both mention developers. So while the topics pulled out are not horrendous I don't think they're particularly useful yet either. These are some of the areas I need to do some more research around: * How do you measure the success of topic modelling? I've been eyeballing the output of the algorithm but I imagine there's an automated way to do that. * How do you determine the right number of topics? I found http://blog.cigrainger.com/2014/07/lda-number.html#fn:fn-1[an article written by Christophe Grainger] which explains a way of doing that which I need to look at in more detail. * It feels like I would be able to pull out better topics if I had an ontology of computer science/software words and then ran the words through that to derive topics. * Another approach suggested by https://twitter.com/mesirii[Michael] is to find the most popular words using the +++<cite>+++CountVectorizer+++</cite>+++ and tag talks with those instead. If you have any suggestions let me know. The https://github.com/mneedham/neo4j-qcon/blob/master/topics.py[full code is on github] if you want to play around with it.
null
null
[ -0.018325135111808777, -0.03714974597096443, -0.0362982377409935, 0.01658022776246071, 0.060886137187480927, -0.01566045731306076, 0.004192029591649771, 0.04219423234462738, 0.032316867262125015, -0.027682339772582054, -0.037432730197906494, 0.0062513346783816814, -0.09180239588022232, 0.021867815405130386, 0.014496288262307644, 0.07052981853485107, 0.06442998349666595, -0.009777138940989971, 0.014265704900026321, 0.0010197960073128343, 0.020715059712529182, 0.07300956547260284, -0.01568819396197796, 0.02062937803566456, 0.025809118524193764, 0.005394661333411932, 0.02565661631524563, 0.024543778970837593, -0.021586287766695023, 0.0018764127744361758, 0.03451570123434067, -0.015217369422316551, 0.017629342153668404, -0.015212506987154484, 0.05044932663440704, 0.024362919852137566, -0.009308570995926857, 0.0217844620347023, 0.01886407658457756, 0.014643947593867779, -0.0336088091135025, 0.03563808649778366, -0.013761374168097973, 0.023493222892284393, -0.02793297916650772, 0.021861350163817406, -0.03272686526179314, 0.02525267004966736, 0.010644030757248402, -0.0217888243496418, -0.07458634674549103, 0.03549066558480263, -0.005829547997564077, 0.0006677167839370668, 0.007270044647157192, 0.06494917720556259, 0.014149265363812447, -0.060221582651138306, 0.009116576053202152, -0.03075731173157692, -0.006602531298995018, -0.019029751420021057, -0.012134082615375519, 0.04550163820385933, 0.0014438119251281023, -0.018188096582889557, -0.01708800345659256, 0.04391631484031677, -0.03814689442515373, -0.0410449393093586, 0.0006220347713679075, 0.036370862275362015, -0.04743490368127823, 0.043162763118743896, 0.02202768065035343, 0.00309433089569211, -0.0007799197919666767, 0.025263726711273193, 0.033269885927438736, 0.03682760149240494, 0.0019586472772061825, 0.0036901237908750772, 0.003514376236125827, 0.02849937416613102, 0.0032985154539346695, -0.0513741672039032, -0.037363890558481216, -0.009110251441597939, -0.07092491537332535, 0.03240690380334854, -0.0020530768670141697, -0.04670325294137001, 0.016257695853710175, 0.0040480950847268105, -0.01650264859199524, -0.00016839847376104444, 0.03954634070396423, -0.01429879479110241, 0.002639216370880604, -0.003090976970270276, -0.047604482620954514, -0.02052890695631504, 0.0066943359561264515, 0.028146488592028618, -0.07984773069620132, 0.014111412689089775, -0.0029655254911631346, -0.022445926442742348, -0.0063262395560741425, -0.0074301487766206264, -0.018180202692747116, 0.004897135775536299, -0.02308421954512596, -0.00052116863662377, -0.08246548473834991, 0.0475805439054966, 0.01289247814565897, -0.027776386588811874, -0.0011528031900525093, 0.003434969112277031, 0.036141905933618546, 0.05530187487602234, 0.003969299141317606, 0.07381220161914825, -0.015552597120404243, -0.012326430529356003, 0.02146281860768795, 0.06098515912890434, -0.02202296443283558, -0.048995550721883774, 0.02792307175695896, 0.032050713896751404, -0.006430037785321474, -0.007293509319424629, -0.008125852793455124, -0.019394228234887123, 0.0034793445374816656, 0.008896281942725182, 0.06852922588586807, 0.049654122442007065, 0.02389879710972309, -0.03150441125035286, 0.02795260027050972, 0.020572392269968987, 0.040743786841630936, 0.013630103319883347, -0.017280666157603264, -0.022732127457857132, -0.02837204933166504, 0.015000368468463421, 0.029966603964567184, 0.023967983201146126, 0.0373246893286705, -0.03867078572511673, -0.0037880504969507456, 0.08311031013727188, 0.04569593071937561, 0.02910548821091652, -0.007148304022848606, 0.01779717020690441, 0.05637609586119652, 0.04336715489625931, -0.028961457312107086, 0.0014326400123536587, -0.02393176034092903, -0.045250389724969864, -0.021958764642477036, 0.03441788628697395, -0.0423114150762558, -0.0019773009698837996, -0.0327579602599144, -0.03152374178171158, 0.04893201217055321, -0.050298061221838, -0.03679213672876358, 0.008986305445432663, 0.04382606968283653, 0.014202486723661423, 0.051855891942977905, -0.00823522824794054, -0.07124101370573044, 0.010735263116657734, -0.0272835586220026, 0.0038712704554200172, 0.04782292991876602, -0.030099060386419296, 0.1047205999493599, 0.03405018895864487, -0.0361761748790741, 0.052041877061128616, -0.08274496346712112, -0.043928518891334534, -0.04821786656975746, 0.022582558915019035, 0.05691193416714668, -0.0478363111615181, 0.004355777986347675, 0.10100771486759186, 0.045445892959833145, 0.02659168839454651, 0.04284920170903206, 0.010746259242296219, 0.001376732368953526, -0.052041828632354736, -0.06233880668878555, 0.023950573056936264, 0.04409184679389, -0.035730570554733276, -0.03554299473762512, 0.005006489809602499, -0.03334186598658562, 0.031080307438969612, 0.00008275030995719135, -0.03722752258181572, 0.030477875843644142, 0.028135422617197037, 0.02176530659198761, -0.013565469533205032, 0.04472025856375694, -0.03863586112856865, 0.05558611825108528, -0.003630013670772314, 0.0020490498282015324, -0.04376503452658653, -0.010148728266358376, 0.13797344267368317, 0.04623051732778549, 0.010920197702944279, -0.056755609810352325, 0.03020690754055977, -0.012178970500826836, 0.012302461080253124, 0.010331742465496063, -0.048494547605514526, -0.010844317264854908, -0.0024524633772671223, -0.026320746168494225, -0.04537922516465187, 0.03098182938992977, -0.012904557399451733, -0.01494442019611597, 0.043100547045469284, -0.03868807107210159, 0.029725754633545876, 0.017768854275345802, 0.028158940374851227, 0.0021188505925238132, -0.04289695993065834, -0.03522508591413498, -0.02188364416360855, 0.0037896158173680305, 0.0051258523017168045, -0.00951969251036644, -0.031508080661296844, 0.0010996817145496607, -0.0013488892000168562, -0.0540657564997673, -0.0013700743438676, 0.07355496287345886, 0.040438950061798096, -0.029239704832434654, 0.07534980028867722, 0.005337989889085293, -0.007540618069469929, -0.02020048350095749, -0.0634162575006485, -0.040755175054073334, -0.06430018693208694, 0.034903384745121, 0.01957167126238346, 0.061850905418395996, 0.002426393795758486, -0.013535303995013237, 0.024128682911396027, -0.008009551092982292, 0.005845288280397654, 0.03317191079258919, -0.014034248888492584, 0.022321803495287895, -0.040467966347932816, -0.02065778337419033, 0.017338000237941742, -0.046885982155799866, -0.03198585286736488, -0.01722152903676033, -0.06348804384469986, 0.0009943637996912003, -0.018957816064357758, -0.033402830362319946, 0.002121857600286603, -0.00145930505823344, 0.023534433916211128, 0.04646720364689827, -0.01979970745742321, 0.043796882033348083, 0.021889152005314827, 0.025671055540442467, -0.009080770425498486, -0.01755274273455143, 0.025629667565226555, -0.014763381332159042, -0.0056061712093651295, 0.06279303133487701, -0.024099262431263924, 0.006387175526469946, -0.02822166122496128, -0.00787930004298687, -0.04403508082032204, -0.29319509863853455, 0.013375438749790192, -0.002089332789182663, -0.024506129324436188, 0.03084227442741394, -0.034438107162714005, -0.0011593677336350083, -0.06319005787372589, -0.023308411240577698, -0.0155927250161767, -0.05022559314966202, -0.03534458577632904, -0.017635589465498924, 0.05670144781470299, 0.002435881644487381, 0.028931204229593277, -0.032941803336143494, -0.06291697174310684, 0.03376970440149307, 0.051710035651922226, 0.0154976611956954, -0.018758991733193398, -0.052974212914705276, 0.03404036909341812, -0.007783035282045603, 0.03912234306335449, -0.07251811027526855, -0.0036051981151103973, -0.04999588057398796, -0.023895129561424255, 0.00161876087076962, -0.04236060753464699, 0.006753101479262114, -0.013361835852265358, 0.009812921285629272, -0.041073162108659744, 0.05551046133041382, 0.014456582255661488, -0.001164848799817264, 0.012222434394061565, -0.03414196893572807, -0.012910214252769947, -0.0013036433374509215, -0.035960543900728226, 0.06724139302968979, 0.015940135344862938, -0.03979344666004181, 0.004468675237149, -0.019299326464533806, 0.04737192764878273, -0.02903735637664795, -0.016005316749215126, -0.012520905584096909, 0.017186105251312256, -0.01069428026676178, -0.029763318598270416, -0.02505652979016304, -0.002437056740745902, -0.027350984513759613, -0.04673101007938385, 0.0030685600358992815, -0.03962736576795578, 0.006029040087014437, -0.08214310556650162, -0.024242622777819633, -0.03780169039964676, -0.04357649385929108, -0.028311900794506073, 0.05518466606736183, 0.0688266009092331, -0.03125813230872154, 0.009161965921521187, -0.015972932800650597, -0.10260581225156784, 0.026370150968432426, -0.013864527456462383, -0.0034644990228116512, -0.02847520262002945, 0.01863894797861576, 0.06957809627056122, -0.046829331666231155, -0.05329286679625511, 0.03214583545923233, -0.0080327820032835, 0.012890771962702274, -0.04359065741300583, 0.021869143471121788, 0.007291322108358145, -0.03955550119280815, -0.04186755418777466, 0.05691355839371681, -0.020574890077114105, 0.012741710059344769, -0.00808622408658266, -0.002569295233115554, 0.04307709261775017, 0.01562812738120556, 0.014702101238071918, 0.003988153301179409, 0.04119926691055298, 0.031427137553691864, -0.0427134670317173, -0.044026006013154984, -0.03368842601776123, -0.002544769551604986, 0.004260292276740074, -0.058944765478372574, 0.010435262694954872, 0.03454530984163284, 0.03178480267524719, -0.016159845516085625, -0.02810714580118656, 0.025581499561667442, -0.006552483886480331, 0.01947646774351597, -0.03550001233816147, 0.006424763239920139, 0.033370595425367355, -0.005356125067919493, -0.013211783953011036, -0.06122478470206261, 0.010196186602115631, -0.00190909078810364, -0.029201727360486984, -0.04270893335342407, -0.029454058036208153, 0.014764432795345783, -0.017593136057257652, -0.0024438006803393364, 0.009070111438632011, -0.03781430050730705, 0.014347132295370102, 0.013876098208129406, -0.007127672899514437, 0.0366213284432888, -0.07126166671514511, -0.02917003259062767, -0.0345677025616169, 0.007269802503287792, 0.03101280890405178, 0.022720960900187492, -0.004762293770909309, 0.016847893595695496, 0.008382138796150684, 0.038845956325531006, 0.03562035784125328, 0.009571216069161892, 0.04280328005552292, -0.0025330022908747196, -0.012498048134148121, 0.015127472579479218, 0.011268530040979385, -0.009586341679096222, 0.02405204437673092, -0.047646164894104004, 0.009629175998270512, 0.04044514149427414, 0.02482403628528118, 0.01307984534651041, -0.03558675944805145, 0.05308759585022926, -0.04781018942594528, 0.016095098108053207, 0.003448260948061943, -0.00970487017184496, 0.017512615770101547, 0.0026210525538772345, 0.05847703665494919, 0.0002636418503243476, -0.01368509978055954, -0.005257642827928066, 0.00437825545668602, -0.03457483649253845, 0.014170709997415543, 0.0032547577284276485, -0.010095368139445782, 0.046910740435123444, -0.004031605552881956, -0.021549327298998833, 0.024685421958565712, -0.03597458824515343, -0.034043893218040466, 0.000738381000701338, 0.003256400814279914, 0.05795706808567047, 0.036027465015649796, -0.0018974117701873183, 0.002347578527405858, -0.01918172836303711, 0.001587782404385507, -0.012314372695982456, 0.014538010582327843, -0.04026372730731964, -0.007174121215939522, -0.015626035630702972, -0.08172827959060669, 0.04339514672756195, -0.006124626379460096, -0.024405891075730324, -0.005440793465822935, -0.027004610747098923, -0.02331102080643177, -0.0220765620470047, 0.051128871738910675, 0.03186555951833725, -0.054715998470783234, -0.015624696388840675, -0.01727275736629963, -0.014340119436383247, 0.020449254661798477, -0.000030144303309498355, -0.08430667966604233, -0.000053916548495180905, -0.022266507148742676, 0.02661636658012867, 0.0184195414185524, -0.04605051875114441, -0.055797260254621506, 0.029115714132785797, -0.007044093683362007, 0.055258434265851974, -0.03498455882072449, 0.002514046849682927, -0.022989468649029732, -0.01383986696600914, 0.006257368251681328, 0.008944293484091759, -0.0003320482501294464, -0.010157819837331772, -0.01666097715497017, 0.004490419290959835, -0.023855391889810562, 0.03694893419742584, 0.02067345753312111, -0.005198721773922443, 0.016312193125486374, -0.058542970567941666, 0.03962288051843643, 0.033541977405548096, 0.035509079694747925, 0.043395187705755234, -0.008920491673052311, -0.018197452649474144, -0.013420441187918186, -0.024772915989160538, 0.026856934651732445, 0.0036284022498875856, -0.00125967210624367, 0.024382060393691063, 0.03633231297135353, 0.019754638895392418, 0.004652018658816814, -0.004359996411949396, -0.05788387358188629, 0.06026715412735939, -0.01985248550772667, -0.049205489456653595, -0.035516686737537384, -0.05450493469834328, 0.0012134199496358633, 0.0069943442940711975, 0.02182779833674431, -0.047924961894750595, 0.03224678337574005, 0.02686813659965992, 0.036295365542173386, 0.04208310693502426, 0.011265059001743793, 0.047466740012168884, -0.0020288112573325634, 0.009961241856217384, -0.10604100674390793, -0.03680761530995369, 0.07963037490844727, -0.013381937518715858, -0.016728749498724937, -0.01576083153486252, -0.0027577891014516354, 0.030789924785494804, -0.06045437604188919, -0.057228654623031616, 0.029287394136190414, -0.045905616134405136, 0.0114927152171731, 0.03523192182183266, -0.04136618599295616, -0.001592949964106083, 0.03513878211379051, -0.010608313605189323, -0.012519070878624916, -0.026928352192044258, 0.04747452586889267, -0.025537284091114998, -0.00843153428286314, -0.0003453312092460692, 0.0065248096361756325, 0.0663328468799591, 0.03005344234406948, 0.022342942655086517, 0.034353792667388916, -0.025306461378932, 0.028947575017809868, 0.040608275681734085, -0.028331898152828217, 0.025477640330791473, 0.028978796675801277, 0.013116024434566498, -0.05092468485236168, 0.05359804257750511, 0.043785374611616135, 0.007117907050997019, -0.04149748757481575, 0.05667682737112045, 0.00529354065656662, -0.05895709618926048, -0.04482879117131233, 0.002006069291383028, -0.032303452491760254, 0.025736790150403976, 0.010048755444586277, 0.009432386606931686, -0.014444250613451004, 0.04109794646501541, -0.0024346192367374897, 0.01746632531285286, 0.07733471691608429, 0.007199169136583805, -0.026299776509404182, 0.004687685053795576, 0.06742564588785172, 0.07974211871623993, 0.046841323375701904, 0.019585521891713142, 0.06014033034443855, -0.02457398921251297, -0.06683861464262009, -0.01078025158494711, -0.023593079298734665, 0.026464760303497314, -0.022402329370379448, 0.0064631132408976555, 0.04019467532634735, -0.005204338114708662, 0.06737947463989258, -0.04084599018096924, 0.009816612116992474, -0.007716906722635031, 0.03136520832777023, 0.02644295245409012, 0.022334503009915352, -0.005383856128901243, 0.02734105847775936, -0.03378772735595703, -0.020582571625709534, 0.03170860931277275, 0.017515797168016434, -0.027447590604424477, 0.044063013046979904, -0.006206727586686611, 0.02277999557554722, 0.038666076958179474, 0.09415773302316666, 0.0780516117811203, -0.034197673201560974, -0.013193211518228054, -0.008149635046720505, -0.020097656175494194, 0.008974877186119556, 0.039930470287799835, 0.0072419410571455956, -0.037805743515491486, -0.0026512048207223415, -0.061636101454496384, -0.03543820232152939, -0.018618769943714142, -0.012989926151931286, 0.02288786694407463, -0.02441241778433323, -0.005297240801155567, 0.02941242977976799, 0.038718100637197495, -0.043233808130025864, -0.0654505044221878, -0.04183565452694893, -0.027651149779558182, -0.051313359290361404, -0.030741525813937187, 0.03870198875665665, -0.0037387425545603037, -0.007150732446461916, -0.02097252756357193, -0.014529075473546982, 0.026952525600790977, -0.00212328159250319, -0.0622447170317173, -0.005526496563106775, 0.0034152891021221876, 0.031109066680073738, 0.026249617338180542, 0.010018609464168549, 0.0402708575129509, -0.008141342550516129, 0.011300936341285706, 0.021057872101664543, 0.04592885449528694, 0.033387135714292526, -0.01634855754673481, 0.009877132251858711, -0.10662995278835297, 0.006049291230738163, -0.02002733014523983, -0.018918808549642563, -0.0745789110660553, 0.019556282088160515, 0.07819148898124695, 0.027981068938970566, 0.031155608594417572, 0.02315845526754856, -0.025464804843068123, -0.02985074743628502, -0.04496915265917778, -0.003408675780519843, 0.018286721780896187, 0.043307114392519, -0.04001317545771599, 0.0636347308754921, 0.043388981372117996, -0.00006576418672921136, -0.03236544504761696, -0.020618923008441925, -0.015210895799100399, 0.011582697741687298, -0.02021648921072483, -0.03711395710706711, -0.07119396328926086, -0.06797822564840317, -0.04327011480927467, 0.03089541755616665, -0.024916065856814384, -0.021110456436872482, -0.002863706322386861, 0.02825530618429184, -0.02330823801457882, 0.029184015467762947, -0.02711046300828457, -0.01925559900701046, -0.01749068684875965, -0.043092917650938034, -0.035968881100416183, 0.04691670462489128, 0.019191645085811615, 0.0003840622375719249, -0.02109275944530964, -0.04677819088101387, -0.008556269109249115, -0.04629617556929588, 0.01959238201379776, 0.05499858036637306, -0.02255069836974144, -0.031444430351257324 ]
[ -0.0751364603638649, 0.007351910229772329, -0.0658111423254013, -0.004006840754300356, 0.050898533314466476, -0.044503942131996155, -0.02028285153210163, -0.003901225281879306, 0.004364722408354282, -0.02620059996843338, -0.007893715985119343, -0.035822898149490356, 0.03188954293727875, -0.0007593607297167182, 0.10105153173208237, 0.016528021544218063, 0.010949640534818172, -0.05065806582570076, -0.03741442784667015, 0.04758371412754059, -0.027172623202204704, -0.06584272533655167, -0.02026253566145897, -0.024886447936296463, -0.0002662486513145268, 0.04155862703919411, 0.03908485174179077, -0.08976106345653534, -0.005447326228022575, -0.21554450690746307, -0.042056143283843994, 0.025023605674505234, 0.029706690460443497, -0.009441413916647434, 0.009989442303776741, 0.06125089153647423, 0.037657730281353, -0.0003119570028502494, 0.007409095764160156, 0.03272319212555885, 0.035029955208301544, -0.000948255299590528, -0.04903630167245865, -0.008184701204299927, 0.02931845933198929, -0.02692227251827717, -0.04248125106096268, -0.008159124292433262, -0.04025105759501457, 0.008508284576237202, -0.03691638261079788, -0.031041234731674194, -0.0031864019110798836, -0.008881673216819763, -0.028141647577285767, 0.05454535409808159, 0.04205349087715149, 0.036144696176052094, 0.017505774274468422, 0.050944920629262924, 0.010185674764215946, 0.02376774325966835, -0.1748323142528534, 0.13963429629802704, 0.02420985698699951, 0.016702620312571526, -0.05216619744896889, 0.01188955083489418, 0.012733000330626965, 0.07271653413772583, -0.012959761545062065, -0.022347616031765938, -0.0019239595858380198, -0.00031645025592297316, 0.03727167099714279, -0.029461340978741646, 0.0037172387819737196, 0.04825310409069061, 0.047123972326517105, -0.04121134802699089, -0.037796199321746826, 0.039285097271203995, -0.03648757189512253, -0.0055158487521111965, -0.013299522921442986, 0.03314182162284851, 0.002801916329190135, 0.04920858517289162, -0.019102489575743675, 0.012237058021128178, 0.000307597714709118, -0.026171142235398293, 0.026785220950841904, 0.012250985018908978, -0.06359965354204178, -0.022194193676114082, 0.0334291085600853, -0.012267586775124073, 0.003266632091253996, 0.34709373116493225, -0.018261533230543137, -0.009863780811429024, 0.01798267289996147, 0.04970293492078781, -0.02569306455552578, -0.027203872799873352, -0.0034555522724986076, -0.08299902081489563, 0.027511073276400566, -0.028411075472831726, 0.012036431580781937, -0.021760430186986923, 0.0539189912378788, -0.08285213261842728, 0.05352383106946945, -0.010245507583022118, 0.05238913372159004, 0.053072910755872726, -0.004048413597047329, 0.0039312089793384075, 0.0031702970154583454, -0.025424210354685783, 0.028533363714814186, -0.002276203129440546, -0.0018973168917000294, 0.017021620646119118, 0.008295138366520405, 0.040544796735048294, 0.0716996118426323, -0.029012657701969147, 0.10358447581529617, -0.012286113575100899, -0.07323724776506424, -0.009628409519791603, 0.03085581213235855, 0.009869626723229885, 0.026388220489025116, -0.04086737334728241, -0.007868308573961258, 0.04005591571331024, 0.022278759628534317, -0.01842828094959259, 0.007255545351654291, -0.0010337014682590961, -0.05589680001139641, 0.15147069096565247, -0.008153460919857025, -0.0550987608730793, -0.031781647354364395, -0.04235502704977989, 0.017450202256441116, 0.02620694227516651, 0.024967774748802185, -0.05888529121875763, 0.02700013853609562, 0.014001941308379173, 0.09357438236474991, -0.0014769913395866752, -0.06293836236000061, -0.00012560427421703935, -0.01941833645105362, -0.045815471559762955, -0.03167282044887543, 0.12363018840551376, 0.05532098188996315, -0.11067793518304825, -0.01629612408578396, -0.0024316865019500256, 0.0013831208925694227, -0.07791665941476822, 0.009039734490215778, 0.019251659512519836, -0.015223878435790539, 0.025247573852539062, 0.049704939126968384, -0.028946438804268837, -0.04857725650072098, -0.007764550391584635, 0.07772770524024963, 0.020288648083806038, 0.0024637465830892324, -0.008002263493835926, -0.06415074318647385, 0.026015382260084152, -0.04562845081090927, -0.08605651557445526, -0.035024020820856094, -0.003713758196681738, -0.020008990541100502, -0.014210590161383152, -0.03268861398100853, -0.016484662890434265, -0.023341672495007515, 0.07069224864244461, -0.044228170067071915, 0.0033995285630226135, 0.004847301170229912, -0.0205722376704216, -0.04808170348405838, -0.04315021261572838, -0.017639297991991043, 0.01203562319278717, -0.061602264642715454, 0.04977521672844887, -0.06486248970031738, 0.004139479715377092, -0.006140235811471939, -0.012965049594640732, 0.07159171253442764, -0.0017738016322255135, -0.015302233397960663, -0.006346600130200386, -0.014746218919754028, -0.01373677421361208, -0.01848241314291954, -0.02178274095058441, 0.030236614868044853, 0.0028943209908902645, -0.0042782314121723175, 0.061764057725667953, -0.03030935674905777, -0.03917428106069565, -0.044498927891254425, -0.36202844977378845, -0.03973667696118355, -0.015789326280355453, -0.006971812807023525, 0.01246930193156004, -0.04157135635614395, 0.0138980932533741, 0.014970777556300163, 0.012307372875511646, 0.10043197870254517, 0.07532453536987305, 0.055261772125959396, -0.007908059284090996, -0.08611331135034561, -0.001125622307881713, 0.03994816169142723, 0.0019155318150296807, 0.0323849655687809, -0.006829994730651379, 0.022708220407366753, -0.0034808239433914423, -0.010679207742214203, -0.019427862018346786, -0.04567048326134682, 0.005849161650985479, -0.002315550111234188, 0.11883112788200378, 0.01772313565015793, 0.007902304641902447, -0.035694099962711334, 0.04596539959311485, 0.04683270305395126, -0.01635647565126419, -0.107158362865448, 0.01953311450779438, -0.023636091500520706, 0.0011067191371694207, 0.03523244708776474, 0.026229582726955414, -0.040641140192747116, -0.028071679174900055, 0.02722681500017643, -0.01104064006358385, -0.0386173389852047, -0.06558127701282501, 0.006181970238685608, -0.01735500432550907, -0.04005731642246246, -0.04266569763422012, 0.058359500020742416, 0.006833214312791824, 0.02041599527001381, 0.015787236392498016, 0.025727156549692154, -0.03606244549155235, 0.005164305213838816, -0.058699145913124084, -0.005291380453854799, -0.034617576748132706, -0.02923709712922573, -0.007195412181317806, 0.04300030320882797, 0.057763468474149704, -0.04659906402230263, 0.011699947528541088, 0.021143542602658272, 0.03356023505330086, 0.03351866826415062, 0.05141395330429077, 0.004365300759673119, -0.03243923932313919, 0.0725063905119896, -0.005091113969683647, 0.026280531659722328, 0.046941086649894714, 0.003245006548240781, 0.002588678151369095, 0.0034446585923433304, 0.012811273336410522, 0.023055005818605423, 0.050575610250234604, -0.015471750870347023, 0.03692156448960304, -0.02054196037352085, -0.0035126220900565386, 0.015445955097675323, 0.02607548050582409, -0.013302565552294254, 0.03956862539052963, 0.006199835799634457, -0.017812246456742287, 0.013611995615065098, -0.026455899700522423, -0.03267911821603775, 0.03809399902820587, 0.008972937241196632, -0.2679378092288971, 0.019076503813266754, 0.08126793056726456, 0.03871104493737221, 0.011368063278496265, 0.00018689823627937585, 0.05055443197488785, -0.06596555560827255, -0.02270304597914219, 0.000006928009952389402, 0.03544997051358223, 0.03687950596213341, -0.009640590287744999, -0.019334904849529266, -0.012487939558923244, 0.012234398163855076, 0.04330485314130783, 0.02645835280418396, -0.02985290065407753, 0.00021556972933467478, -0.002062838291749358, -0.04023553058505058, 0.16572003066539764, 0.013756180182099342, 0.04777207970619202, -0.0015640993369743228, -0.016531076282262802, -0.038132477551698685, 0.05053356662392616, 0.011026496067643166, -0.007771208882331848, -0.035595037043094635, 0.04935102164745331, -0.01086419727653265, 0.03589373826980591, -0.05480435863137245, -0.014521715231239796, 0.04173775389790535, 0.027285262942314148, -0.011030258610844612, 0.0064778560772538185, 0.008692028932273388, -0.056153543293476105, -0.006787448190152645, 0.06006811931729317, 0.008788621984422207, 0.026502834632992744, -0.05330406501889229, -0.05612146854400635, -0.005018843337893486, -0.01367565244436264, -0.027226373553276062, 0.00002434430098219309, -0.009014484472572803, 0.009999995119869709, 0.08294929563999176, 0.06049207225441933, -0.01682521030306816, 0.039772871881723404, 0.03269931674003601, 0.011661840602755547, -0.05493861064314842, 0.07427529245615005, 0.0168466679751873, 0.015926826745271683 ]
[ -0.015826260671019554, 0.008588808588683605, -0.03213994950056076, 0.022215092554688454, -0.02634267322719097, 0.020674975588917732, 0.0004467181279323995, 0.0032922986429184675, 0.0190020389854908, 0.0010533868335187435, 0.007163584232330322, 0.008514348417520523, 0.013722964562475681, 0.02725927159190178, 0.016418611630797386, 0.03417038917541504, 0.013400442898273468, -0.0072151245549321175, 0.006466485559940338, -0.021960079669952393, -0.06391852349042892, 0.04068960249423981, 0.034576088190078735, 0.024359436705708504, -0.011979121714830399, -0.005603301804512739, -0.026433074846863747, 0.016157783567905426, 0.04245555028319359, -0.0837208703160286, 0.011177662760019302, 0.00511162867769599, 0.0060601974837481976, 0.006403914652764797, 0.017733348533511162, 0.0021573614794760942, -0.028575310483574867, 0.008385206572711468, 0.01770622655749321, 0.028629330918192863, -0.006908751558512449, 0.025830665603280067, 0.019069699570536613, 0.0009874029783532023, 0.014985865913331509, -0.015060662291944027, -0.04542944207787514, 0.015968212857842445, 0.014196423813700676, -0.036225639283657074, -0.014932312071323395, 0.0013984082033857703, 0.0015372743364423513, 0.012021456845104694, -0.0015309836016967893, -0.0017015516059473157, -0.007282623555511236, -0.013429895043373108, 0.018275616690516472, 0.0033012516796588898, 0.000656665361020714, -0.031544074416160583, -0.025397537276148796, -0.03586730360984802, 0.01068237703293562, -0.0008934644865803421, -0.044968534260988235, 0.049753282219171524, -0.013934151269495487, 0.010157190263271332, -0.05441909283399582, 0.020795708522200584, -0.056632887572050095, -0.02771288901567459, -0.011058071628212929, -0.013209104537963867, -0.0037350885104388, -0.0012395457597449422, 0.024073541164398193, -0.02656634710729122, -0.021578682586550713, -0.0050127808935940266, -0.009662454016506672, 0.00839029811322689, 0.00877102930098772, -0.03633883222937584, -0.0009117682348005474, -0.006892701145261526, -0.012384196743369102, -0.005403881426900625, -0.0557703971862793, 0.010164237581193447, 0.02213278040289879, -0.01973232813179493, -0.07351145148277283, 0.012861771509051323, 0.02452746033668518, -0.008673249743878841, 0.024383362382650375, 0.8446411490440369, 0.018491266295313835, -0.009480655193328857, 0.001009987317956984, -0.010718422010540962, 0.006793535780161619, -0.007773238234221935, 0.016293799504637718, 0.01887144334614277, 0.01963859796524048, -0.024362409487366676, -0.028354523703455925, 0.009558567777276039, 0.021531006321310997, 0.010618288069963455, 0.029122380539774895, 0.04402809962630272, 0.04103947430849075, 0.04802076146006584, -0.00875008013099432, 0.016043052077293396, -0.011827579699456692, -0.009955103509128094, 0.0010414443677291274, -0.014879408292472363, -0.033601291477680206, -0.18344378471374512, 0.010916614904999733, -6.598963738023264e-33, 0.07433009147644043, -0.02420780248939991, 0.0035153955686837435, 0.009636071510612965, 0.0078601548448205, 0.013841348700225353, -0.02011881396174431, -0.03415389358997345, -0.013086418621242046, -0.03264443948864937, -0.013044506311416626, 0.0003131309349555522, 0.017602961510419846, -0.036708664149045944, 0.0016970657743513584, -0.00841352716088295, -0.03335556015372276, 0.028654154390096664, -0.014925554394721985, -0.025741254910826683, 0.030810348689556122, 0.02453826740384102, -0.010386919602751732, 0.008633230812847614, 0.0449935682117939, 0.017154226079583168, 0.016521919518709183, 0.00364473182708025, -0.013336277566850185, -0.058082204312086105, -0.060539502650499344, 0.041825804859399796, -0.004600553773343563, -0.04545142129063606, 0.006709401495754719, -0.050170302391052246, -0.016296207904815674, 0.001977564999833703, 0.010258140973746777, -0.06126464158296585, -0.021189581602811813, -0.00605321628972888, -0.022637102752923965, -0.06374312937259674, -0.026762019842863083, 0.011939743533730507, 0.006224264390766621, 0.0017110605258494616, -0.008507802151143551, -0.008783308789134026, 0.0009224863606505096, -0.007691826671361923, -0.01073325052857399, 0.00012112617696402594, -0.01310237031430006, -0.02842477709054947, 0.044628217816352844, 0.017258280888199806, 0.03147263824939728, 0.007480337750166655, 0.01002177968621254, -0.004927005153149366, -0.024956554174423218, 0.024173540994524956, 0.011410890147089958, 0.014579510316252708, -0.013044508174061775, 0.021644974127411842, 0.006183259654790163, -0.006998410914093256, -0.048645660281181335, 0.04022419825196266, -0.03193748742341995, -0.03203735128045082, 0.02646959386765957, -0.013717134483158588, -0.014945154078304768, -0.004418834578245878, 0.011617249809205532, 0.05421655625104904, -0.018132872879505157, -0.01934615522623062, 0.017406294122338295, -0.017538905143737793, -0.03981602191925049, -0.03930693119764328, 0.026192178949713707, -0.015997150912880898, -0.0021342879626899958, 0.0031323593575507402, 0.028849652037024498, 0.027276277542114258, 0.01680954359471798, 0.00726888095960021, 0.003863062709569931, 6.351449443462215e-33, 0.02154058963060379, 0.027034493163228035, 0.016362423077225685, -0.025326432660222054, 0.04581395536661148, -0.0061402833089232445, 0.01811116933822632, 0.017325768247246742, -0.033887431025505066, 0.028403595089912415, -0.020408613607287407, -0.02021363563835621, -0.03520890697836876, 0.015418977476656437, 0.07539187371730804, 0.020636091008782387, -0.0008933725766837597, -0.0008302857750095427, -0.013275448232889175, 0.010745596140623093, -0.008155083283782005, 0.008909466676414013, 0.002446501748636365, 0.0011561164865270257, 0.05160195380449295, 0.013703263364732265, 0.012750196270644665, -0.010142899118363857, 0.0009415720123797655, 0.01607058383524418, -0.016586821526288986, -0.057395000010728836, -0.03805932402610779, -0.026106469333171844, 0.02112179808318615, 0.024692194536328316, -0.006263019051402807, -0.020386407151818275, -0.0024599942844361067, -0.009921696037054062, 0.030273951590061188, 0.0283332709223032, -0.02756820246577263, 0.047768186777830124, 0.00873127393424511, 0.041364531964063644, -0.02056107483804226, -0.016344955191016197, -0.02654171735048294, 0.007465405389666557, 0.019132500514388084, 0.02090870961546898, 0.03668668493628502, 0.012841332703828812, -0.0020516410004347563, -0.024446692317724228, -0.00915487390011549, 0.013716382905840874, -0.025807727128267288, -0.01720334403216839, -0.038667358458042145, 0.009350786916911602, -0.036025311797857285, -0.023697858676314354, -0.028051210567355156, -0.033439770340919495, -0.08196572214365005, 0.031799983233213425, 0.018657220527529716, 0.0031685882713645697, -0.008720765821635723, -0.04318446293473244, -0.005328175611793995, 0.02092832513153553, 0.032114651054143906, 0.01497483067214489, -0.009570267051458359, 0.008774062618613243, 0.004165222402662039, 0.023414121940732002, 0.012023870833218098, 0.03877658024430275, 0.02959682047367096, -0.014495722949504852, 0.012913933955132961, 0.027922039851546288, -0.028913626447319984, 0.013267405331134796, 0.01867709308862686, 0.007056694943457842, 0.017796071246266365, -0.0610312893986702, 0.023290980607271194, 0.03387342020869255, -0.00019548318232409656, -1.2574904673101628e-8, -0.06587987393140793, 0.0014245091006159782, -0.01874503679573536, 0.0013772116508334875, 0.025904567912220955, 0.006881857290863991, 0.014863057993352413, -0.0022774410899728537, 0.00010145140549866483, 0.03689778223633766, 0.031470343470573425, -0.01675512082874775, -0.019861457869410515, 0.012157564982771873, -0.00636874046176672, -0.018343834206461906, -0.019478950649499893, 0.010887202806770802, 0.046615567058324814, 0.006033000536262989, 0.052262213081121445, 0.013082703575491905, -0.010400746949017048, 0.018046611919999123, 0.0010576656786724925, -0.00836579967290163, -0.00048509170301258564, -0.07965736836194992, -0.005218989215791225, -0.0055559538304805756, 0.03817906603217125, -0.03831525892019272, -0.054198168218135834, 0.024481475353240967, -0.024441344663500786, -0.0072822775691747665, -0.0041291359812021255, -0.00020773932919837534, 0.01026507094502449, 0.028143709525465965, -0.004386315122246742, -0.0010001295013353229, -0.034719474613666534, -0.03888481855392456, -0.0251897145062685, 0.013031031005084515, -0.024551361799240112, 0.0073196617886424065, 0.000513786799274385, -0.02248469740152359, -0.016054918989539146, -0.026726752519607544, 0.02788427099585533, 0.02249331586062908, 0.03709835186600685, 0.03232147544622421, 0.01923549920320511, -0.009469603188335896, -0.02127726934850216, -0.03874511271715164, 0.019226660951972008, 0.037304893136024475, -0.0032179122790694237, -0.01674119010567665 ]
python-scikit-learnlda-extracting-topics-from-qcon-talk-abstracts
https://markhneedham.com/blog/2015/03/05/python-scikit-learnlda-extracting-topics-from-qcon-talk-abstracts
false
2015-03-02 07:48:24
Python: scikit-learn - Training a classifier with non numeric features
[ "python" ]
[ "Data Science", "Python" ]
Following on from my http://www.markhneedham.com/blog/2015/02/20/pythonscikit-learn-detecting-which-sentences-in-a-transcript-contain-a-speaker/[previous] http://www.markhneedham.com/blog/2015/02/24/pythonnltk-naive-vs-naive-bayes-vs-decision-tree/[posts] on http://www.markhneedham.com/blog/2015/03/01/python-detecting-the-speaker-in-himym-using-parts-of-speech-pos-tagging/[training a classifier] to pick out the speaker in sentences of http://en.wikipedia.org/wiki/How_I_Met_Your_Mother[HIMYM] transcripts the next thing to do was train a random forest of decision trees to see how that fared. I've http://www.markhneedham.com/blog/2013/11/09/python-making-scikit-learn-and-pandas-play-nice/[used scikit-learn for this before] so I decided to use that. However, before building a random forest I wanted to check that I could build an equivalent http://scikit-learn.org/stable/modules/tree.html[decision tree]. I initially thought that scikit-learn's DecisionTree classifier would take in data in the same format as nltk's so I started out with the following code: [source,python] ---- import json import nltk import collections from himymutil.ml import pos_features from sklearn import tree from sklearn.cross_validation import train_test_split with open("data/import/trained_sentences.json", "r") as json_file: json_data = json.load(json_file) tagged_sents = [] for sentence in json_data: tagged_sents.append([(word["word"], word["speaker"]) for word in sentence["words"]]) featuresets = [] for tagged_sent in tagged_sents: untagged_sent = nltk.tag.untag(tagged_sent) sentence_pos = nltk.pos_tag(untagged_sent) for i, (word, tag) in enumerate(tagged_sent): featuresets.append((pos_features(untagged_sent, sentence_pos, i), tag) ) clf = tree.DecisionTreeClassifier() train_data, test_data = train_test_split(featuresets, test_size=0.20, train_size=0.80) >>> train_data[1] ({'word': u'your', 'word-pos': 'PRP$', 'next-word-pos': 'NN', 'prev-word-pos': 'VB', 'prev-word': u'throw', 'next-word': u'body'}, False) >>> clf.fit([item[0] for item in train_data], [item[1] for item in train_data]) Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/markneedham/projects/neo4j-himym/himym/lib/python2.7/site-packages/sklearn/tree/tree.py", line 137, in fit X, = check_arrays(X, dtype=DTYPE, sparse_format="dense") File "/Users/markneedham/projects/neo4j-himym/himym/lib/python2.7/site-packages/sklearn/utils/validation.py", line 281, in check_arrays array = np.asarray(array, dtype=dtype) File "/Users/markneedham/projects/neo4j-himym/himym/lib/python2.7/site-packages/numpy/core/numeric.py", line 460, in asarray return array(a, dtype, copy=False, order=order) TypeError: float() argument must be a string or a number ---- In fact, the classifier can only deal with numeric features so we need to http://scikit-learn.org/dev/modules/feature_extraction.html#loading-features-from-dicts[translate our features into that format using DictVectorizer]. [source,python] ---- from sklearn.feature_extraction import DictVectorizer vec = DictVectorizer() X = vec.fit_transform([item[0] for item in featuresets]).toarray() >>> len(X) 13016 >>> len(X[0]) 7302 >>> vec.get_feature_names()[10:15] ['next-word-pos=EX', 'next-word-pos=IN', 'next-word-pos=JJ', 'next-word-pos=JJR', 'next-word-pos=JJS'] ---- We end up with one feature for every key/value combination that exists in +++<cite>+++featuresets+++</cite>+++. I was initially confused about how to split up http://scikit-learn.org/stable/modules/generated/sklearn.cross_validation.train_test_split.html[training and test data sets] but it's actually fairly easy - +++<cite>+++train_test_split+++</cite>+++ allows us to pass in multiple lists which it splits along the same seam: [source,python] ---- vec = DictVectorizer() X = vec.fit_transform([item[0] for item in featuresets]).toarray() Y = [item[1] for item in featuresets] X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size=0.20, train_size=0.80) ---- Next we want to train the classifier which is a couple of lines of code: [source,python] ---- clf = tree.DecisionTreeClassifier() clf = clf.fit(X_train, Y_train) ---- I wrote the following function to assess the classifier: [source,python] ---- import collections import nltk def assess(text, predictions_actual): refsets = collections.defaultdict(set) testsets = collections.defaultdict(set) for i, (prediction, actual) in enumerate(predictions_actual): refsets[actual].add(i) testsets[prediction].add(i) speaker_precision = nltk.metrics.precision(refsets[True], testsets[True]) speaker_recall = nltk.metrics.recall(refsets[True], testsets[True]) non_speaker_precision = nltk.metrics.precision(refsets[False], testsets[False]) non_speaker_recall = nltk.metrics.recall(refsets[False], testsets[False]) return [text, speaker_precision, speaker_recall, non_speaker_precision, non_speaker_recall] ---- We can call it like so: [source,python] ---- predictions = clf.predict(X_test) assessment = assess("Decision Tree", zip(predictions, Y_test)) >>> assessment ['Decision Tree', 0.9459459459459459, 0.9210526315789473, 0.9970134395221503, 0.9980069755854509] ---- Those values are in the same ball park as we've seen with the nltk classifier so I'm happy it's all wired up correctly. The last thing I wanted to do was http://stackoverflow.com/questions/23557545/how-to-explain-the-decision-tree-from-scikit-learn[visualise the decision tree] that had been created and the easiest way to do that is http://scikit-learn.org/stable/modules/generated/sklearn.tree.export_graphviz.html[export the classifier to DOT format] and then use graphviz to create an image: [source,python] ---- with open("/tmp/decisionTree.dot", 'w') as file: tree.export_graphviz(clf, out_file = file, feature_names = vec.get_feature_names()) ---- [source,bash] ---- dot -Tpng /tmp/decisionTree.dot -o /tmp/decisionTree.png ---- The decision tree is quite a few levels deep so here's part of it: image::{{<siteurl>}}/uploads/2015/03/decisionTreeSection.png[DecisionTreeSection,600] The https://github.com/mneedham/neo4j-himym/blob/master/scripts/scikit_dt.py[full script is on github] if you want to play around with it.
null
null
[ 0.0011727404780685902, -0.03714625537395477, -0.005994769278913736, 0.02384226955473423, 0.05709218606352806, 0.03688734397292137, 0.030040957033634186, 0.03263411298394203, -0.016660356894135475, 0.009516564197838306, -0.003882751567289233, 0.0034260153770446777, -0.07662994414567947, -0.018388984724879265, -0.0030353511683642864, 0.044445425271987915, 0.06206860393285751, 0.005089949816465378, 0.02190672792494297, 0.009442240931093693, 0.027203112840652466, 0.06236597150564194, 0.028455771505832672, 0.031105346977710724, 0.04582529515028, 0.0068949805572628975, 0.0012287456775084138, 0.004864352755248547, -0.056396275758743286, -0.0142529821023345, 0.034016918390989304, -0.022129561752080917, -0.019343337044119835, 0.00037534337025135756, 0.019524788483977318, 0.03688683733344078, -0.04377209022641182, -0.01607551798224449, 0.01699148677289486, 0.02206239104270935, -0.04675617814064026, 0.04055412858724594, -0.011903442442417145, 0.024974919855594635, -0.05385458096861839, 0.01694975420832634, -0.053077615797519684, 0.024358166381716728, 0.01717396266758442, -0.009164759889245033, -0.06522174179553986, 0.04779329523444176, -0.007827255874872208, -0.04301537945866585, 0.009897538460791111, 0.0731097012758255, 0.03259881213307381, -0.0698612630367279, 0.010918820276856422, -0.009268403984606266, -0.014429854229092598, -0.029050350189208984, -0.004750613588839769, 0.016242615878582, 0.027197740972042084, -0.03712023049592972, -0.01702749915421009, 0.050484318286180496, -0.05437035858631134, 0.001622271491214633, -0.03525693714618683, 0.03379425033926964, -0.042426180094480515, 0.016337934881448746, 0.0012854713713750243, -0.03884798660874367, -0.0222164299339056, 0.06438284367322922, 0.021818671375513077, 0.03406081348657608, 0.00024057953851297498, 0.015817472711205482, 0.010116091929376125, 0.03383849188685417, -0.011012953706085682, -0.029906392097473145, -0.05737623944878578, -0.026920847594738007, -0.08293506503105164, 0.028409570455551147, 0.03453437238931656, -0.027185650542378426, 0.031394802033901215, 0.032169222831726074, -0.00474934047088027, 0.010720749385654926, 0.0003544637584127486, 0.0028409406077116728, -0.04812632501125336, -0.02329506166279316, -0.0761718675494194, -0.028902221471071243, 0.029614543542265892, 0.01490130927413702, -0.08024076372385025, -0.001527230953797698, 0.0024451413191854954, 0.0013653644127771258, -0.010430071502923965, 0.002862714696675539, -0.016028430312871933, -0.005589388310909271, 0.0055875154212117195, -0.024898692965507507, -0.07882554084062576, 0.05331394448876381, -0.0034891890827566385, -0.029532186686992645, -0.03829159587621689, -0.0036181197501719, 0.02261269837617874, 0.023392176255583763, -0.01705596223473549, 0.05566111207008362, 0.001880836091004312, 0.005862437188625336, -0.008063540793955326, 0.05824901908636093, -0.007734860293567181, -0.08199739456176758, -0.015040569938719273, 0.03584049269556999, -0.011944702826440334, 0.043692149221897125, -0.02098216861486435, -0.008571668528020382, -0.02860027365386486, 0.02104191482067108, 0.08071532100439072, 0.04362891986966133, 0.008403355255723, -0.02956681326031685, 0.03527200594544411, 0.01893020235002041, 0.017885664477944374, -0.005926377605646849, -0.019588835537433624, -0.023152992129325867, -0.038265906274318695, 0.01791381649672985, -0.0010630041360855103, -0.007168150041252375, 0.0523110069334507, -0.022251581773161888, 0.013986472971737385, 0.08191195130348206, 0.04368731006979942, 0.026173559948801994, 0.0035428840201348066, 0.026456113904714584, 0.045067496597766876, 0.06241976097226143, 0.000981426564976573, 0.018466318026185036, -0.0234103724360466, -0.053286660462617874, -0.007677488494664431, 0.028261259198188782, -0.024297630414366722, 0.01101661752909422, -0.005932061932981014, -0.06174233555793762, 0.07478070259094238, -0.03238747641444206, -0.013175814412534237, 0.013855780474841595, 0.04006946086883545, 0.030097300186753273, 0.020216079428792, 0.014886051416397095, -0.07184088975191116, 0.06219935417175293, 0.01654152013361454, 0.013747015967965126, 0.03980719670653343, 0.007716731168329716, 0.07458575069904327, 0.017647257074713707, -0.0030149922240525484, 0.013073400594294071, -0.06643315404653549, -0.07164379954338074, -0.017809920012950897, -0.015128868632018566, 0.06324206292629242, -0.051107257604599, 0.01121507491916418, 0.055042482912540436, 0.01407448761165142, 0.04165968671441078, 0.034335315227508545, -0.03797787427902222, -0.013650469481945038, -0.033229246735572815, -0.05409152805805206, 0.04148579761385918, 0.03808809444308281, -0.03912847116589546, -0.022884663194417953, 0.00473486864939332, -0.0168569665402174, -0.03284182399511337, 0.04617834836244583, -0.023467838764190674, 0.028464678674936295, 0.03527579456567764, 0.0634908601641655, -0.003270472167059779, 0.045428577810525894, -0.05336641147732735, 0.01395797822624445, -0.010952078737318516, -0.015266019850969315, -0.04691246524453163, -0.00902539398521185, 0.10774128884077072, 0.05197132006287575, 0.003632195992395282, -0.06550297886133194, -0.0013937362236902118, -0.02075698971748352, -0.021981609985232353, 0.008177169598639011, 0.016909731552004814, -0.02394685335457325, -0.010157759301364422, -0.06741116940975189, -0.04787573963403702, -0.0005974381347186863, -0.02453279122710228, -0.009519307874143124, 0.06986772269010544, -0.060071490705013275, 0.02974889986217022, 0.03423123434185982, 0.0029853228479623795, -0.00187022949103266, -0.030894631519913673, -0.03949293866753578, 0.009508554823696613, 0.012070084922015667, -0.0027491471264511347, 0.029651841148734093, -0.031429722905159, -0.010624260641634464, -0.00967553723603487, -0.04830310121178627, 0.02405884489417076, 0.06432655453681946, 0.03174823895096779, -0.01434452272951603, 0.040631283074617386, -0.03188318386673927, -0.001323383767157793, -0.014731062576174736, -0.03949994221329689, -0.018378034234046936, -0.021661851555109024, 0.016138141974806786, 0.05050729960203171, 0.025042584165930748, -0.03449069708585739, 0.01281785685569048, 0.010464604012668133, -0.0014754986623302102, -0.0035853004083037376, 0.04469146579504013, -0.006327354349195957, 0.0000032208185984927695, -0.037916772067546844, -0.021134302020072937, 0.04600970074534416, -0.030546652153134346, -0.01589246839284897, -0.00473361648619175, -0.0680231973528862, -0.006211705505847931, -0.0675574243068695, -0.021141445264220238, 0.028110822662711143, -0.003278764896094799, 0.04462281987071037, 0.01216797437518835, -0.01118694432079792, 0.07422700524330139, 0.03306588530540466, 0.010714508593082428, 0.03500274196267128, 0.008971324190497398, 0.04962167516350746, -0.016649875789880753, 0.02824321761727333, 0.03469884395599365, 0.004760175012052059, 0.00043718155939131975, -0.03172814100980759, 0.02509940043091774, -0.02065770886838436, -0.28315746784210205, 0.016650624573230743, 0.01806090958416462, -0.05621656775474548, 0.009294167160987854, -0.0039684828370809555, 0.016695361584424973, -0.029609525576233864, -0.02220345102250576, 0.041870009154081345, -0.03579859063029289, -0.03807877004146576, -0.0057646241039037704, 0.03964575007557869, 0.01282342616468668, -0.004719975870102644, -0.020350763574242592, -0.010683233849704266, 0.01988046057522297, 0.07618113607168198, 0.0032605251763015985, -0.0413045696914196, -0.03520635887980461, 0.06305499374866486, 0.009978203102946281, 0.06910128146409988, -0.06461495161056519, 0.014059795998036861, -0.05931691825389862, -0.022393466904759407, 0.01601877622306347, -0.03703209385275841, 0.016174187883734703, -0.02272344008088112, -0.005492950323969126, -0.04438232630491257, 0.04876469448208809, 0.026746539399027824, -0.027632443234324455, 0.03449888154864311, -0.03567926585674286, -0.049006760120391846, -0.009381952695548534, -0.016022616997361183, 0.08323433995246887, 0.004752858076244593, -0.06705569475889206, -0.01248999871313572, -0.046858079731464386, 0.06502892076969147, -0.00351154338568449, -0.0345785953104496, -0.026438038796186447, 0.00954913254827261, 0.004801739007234573, -0.025670692324638367, 0.0393979512155056, -0.01173420250415802, -0.03602622449398041, -0.025923393666744232, -0.027164563536643982, -0.03197887912392616, -0.010643218643963337, -0.03842796012759209, -0.01965189538896084, -0.04328829050064087, -0.05729776993393898, -0.015883786603808403, 0.054424867033958435, 0.021797198802232742, -0.03868432343006134, 0.01447056420147419, -0.025488145649433136, -0.11196025460958481, 0.011282873339951038, 0.004064308013767004, -0.027594858780503273, 0.007645469158887863, 0.023934591561555862, 0.05323397368192673, -0.05852232500910759, -0.05595222860574722, 0.037864550948143005, -0.009890716522932053, -0.0013213480124250054, 0.018673289567232132, 0.025900883600115776, 0.014807015657424927, -0.000940980389714241, -0.020459232851862907, 0.020828116685152054, -0.020318491384387016, -0.030353674665093422, 0.02157190814614296, -0.004258161410689354, 0.06258333474397659, -0.020178092643618584, -0.01332868356257677, 0.020263683050870895, 0.017973288893699646, -0.001413429039530456, -0.01690835878252983, -0.021024560555815697, -0.0068282815627753735, 0.005982646252959967, -0.01511494629085064, -0.07472868263721466, -0.011464850977063179, 0.010487927123904228, 0.017566855996847153, -0.0013103426899760962, -0.007463900838047266, -0.0016571831656619906, -0.005183744709938765, 0.016694610938429832, 0.003801654325798154, 0.0029212567023932934, -0.00399672519415617, 0.03318840637803078, -0.034878917038440704, -0.06924621015787125, -0.008376555517315865, -0.004198362119495869, -0.02024524286389351, -0.022651469334959984, -0.04385577514767647, 0.013505187816917896, -0.01041259802877903, -0.06244374066591263, -0.042622264474630356, -0.0324145182967186, 0.014649538323283195, 0.04237667843699455, 0.002003113739192486, 0.04906550422310829, -0.04474344104528427, -0.026653660461306572, -0.011227942071855068, 0.0393722802400589, -0.004640941042453051, -0.02204502746462822, -0.008105447515845299, 0.014704329892992973, 0.03463324159383774, 0.04598083719611168, 0.018903907388448715, 0.010179543867707253, 0.02267732471227646, 0.02424062229692936, -0.036571551114320755, 0.021258721128106117, -0.026104407384991646, -0.005554486066102982, -0.016087479889392853, -0.018145659938454628, -0.002917410572990775, 0.034262515604496, 0.006037479266524315, -0.021224617958068848, -0.06341929733753204, 0.025199228897690773, -0.03671177104115486, 0.02738885022699833, -0.028362875804305077, 0.04608243703842163, 0.03931508585810661, -0.024412162601947784, 0.036636777222156525, -0.014872956089675426, -0.006653695832937956, 0.01793075166642666, -0.024978723376989365, -0.05380978062748909, 0.035705771297216415, -0.021757397800683975, -0.029356399551033974, 0.04219979792833328, 0.019839592278003693, -0.010989914648234844, 0.01593073084950447, -0.006725831422954798, 0.0009298144723288715, -0.0076990881934762, 0.01174488291144371, 0.06152687221765518, 0.05972616374492645, -0.014797206968069077, 0.006231947802007198, -0.01954076811671257, -0.025882426649332047, -0.03436782956123352, 0.006441628560423851, 0.01775188371539116, -0.010498255491256714, -0.03462912514805794, -0.07051011919975281, -0.0042957644909620285, -0.03275175392627716, -0.005654874723404646, 0.026693368330597878, -0.051567524671554565, -0.010687727481126785, 0.0003544916689861566, 0.02704750746488571, 0.0751882940530777, -0.07576289772987366, -0.031188329681754112, 0.007989066652953625, 0.004217927344143391, 0.006643491797149181, -0.0003902606258634478, -0.04726561903953552, -0.026892349123954773, -0.025135694071650505, 0.004487788770347834, -0.025869855657219887, -0.05499228462576866, -0.02857794798910618, 0.014665070921182632, -0.0129998242482543, 0.01481749676167965, -0.015527970157563686, -0.010444906540215015, -0.023620225489139557, -0.022233188152313232, 0.04629816487431526, -0.018258601427078247, 0.008931934833526611, 0.017505217343568802, -0.04417086020112038, 0.015118272043764591, -0.049978699535131454, 0.03458547592163086, 0.058763887733221054, -0.019601969048380852, -0.015939580276608467, -0.03983335196971893, 0.022562237456440926, 0.011658317409455776, 0.06276695430278778, 0.027075421065092087, 0.022868115454912186, -0.03416493907570839, 0.022173143923282623, -0.04331689327955246, 0.021936319768428802, -0.0030988785438239574, -0.030389627441763878, 0.0008612695382907987, 0.05652080103754997, -0.001487799803726375, 0.03619963303208351, -0.013243351131677628, -0.03870172053575516, 0.04083913564682007, -0.022730106487870216, -0.06469764560461044, -0.023325107991695404, -0.0441519059240818, 0.021165382117033005, 0.012787258252501488, 0.04627453163266182, -0.04193508252501488, 0.05551452562212944, 0.029075564816594124, 0.053781528025865555, 0.019249919801950455, 0.0150389913469553, 0.029928987845778465, -0.028690403327345848, -0.0282306931912899, -0.09580928087234497, -0.014200838282704353, 0.05455274134874344, -0.003821547143161297, -0.011167851276695728, -0.021829605102539062, -0.025598794221878052, 0.02799304947257042, -0.030506299808621407, -0.031211383640766144, 0.06474896520376205, -0.014036992564797401, -0.0027106832712888718, -0.0036076793912798166, -0.03830132633447647, 0.029979968443512917, 0.03854208067059517, -0.01709921471774578, -0.01976884715259075, -0.050616372376680374, 0.07951764017343521, -0.017145639285445213, 0.025646470487117767, 0.017155872657895088, -0.013324991799890995, 0.04674246534705162, 0.023127499967813492, 0.03441908583045006, 0.024228280410170555, -0.03651106730103493, 0.00609568739309907, 0.03768618777394295, -0.018344327807426453, -0.017843224108219147, 0.042115628719329834, 0.01362807210534811, -0.07056687772274017, 0.07313438504934311, 0.011186308227479458, 0.002576215425506234, 0.0005930562037974596, 0.06437091529369354, 0.02115735225379467, -0.034692149609327316, -0.05751299485564232, 0.018295660614967346, -0.0586143434047699, 0.005715321283787489, -0.0249637458473444, 0.012838605791330338, -0.049987129867076874, 0.05159413069486618, -0.005687025375664234, -0.0037663804832845926, 0.07532670348882675, -0.026247134432196617, -0.016123037785291672, 0.02606024034321308, 0.07656453549861908, 0.08033070713281631, 0.051599111407995224, 0.02399921603500843, 0.07022618502378464, -0.032545097172260284, -0.03951345756649971, -0.00695419916883111, -0.03386445716023445, -0.01063595898449421, -0.021254362538456917, 0.017626270651817322, 0.0516321063041687, -0.008769246749579906, 0.060053031891584396, -0.05503533035516739, 0.0002117264230037108, 0.011770335026085377, 0.027238361537456512, 0.017163999378681183, 0.058615781366825104, 0.011318854987621307, 0.0446416512131691, -0.0319015234708786, -0.054759543389081955, 0.04028063639998436, -0.0041686599142849445, -0.036596547812223434, 0.030585184693336487, -0.04000157490372658, 0.014135148376226425, 0.02965908870100975, 0.08531435579061508, 0.08206192404031754, -0.012426206842064857, -0.013814390636980534, -0.012378944084048271, 0.026764268055558205, 0.020024191588163376, 0.05294657126069069, 0.007720116060227156, 0.004390248097479343, 0.007851332426071167, -0.04335484281182289, -0.0020030050072818995, -0.03966397047042847, -0.010410064831376076, 0.03280123323202133, -0.027413884177803993, -0.022103680297732353, 0.016600485891103745, 0.013941377401351929, -0.01224049087613821, -0.030457759276032448, -0.02544642984867096, -0.027963928878307343, -0.06025269255042076, -0.053126972168684006, 0.02856307663023472, 0.006687719374895096, 0.01031353510916233, -0.01272906456142664, -0.008250498212873936, 0.015511870384216309, 0.008235469460487366, -0.06581183522939682, 0.0027124243788421154, 0.02598901279270649, 0.008182077668607235, 0.0006489393417723477, 0.031758371740579605, 0.04237685725092888, 0.00934075191617012, -0.039839912205934525, 0.0016066771931946278, 0.03311426192522049, 0.07305679470300674, 0.04714193567633629, 0.02468988113105297, -0.051612552255392075, -0.01484644040465355, 0.005104026757180691, 0.0052594589069485664, -0.06202621012926102, -0.015285324305295944, 0.04606122151017189, 0.035251930356025696, 0.018717994913458824, 0.04231780767440796, -0.01749410666525364, -0.0204683355987072, -0.027306003496050835, -0.014971678145229816, 0.01660817489027977, 0.027939852327108383, -0.01989474706351757, 0.08334819227457047, 0.04057731106877327, -0.0332416333258152, -0.03855905681848526, -0.026160618290305138, 0.01542156096547842, -0.011973006650805473, -0.038121163845062256, -0.05907941237092018, -0.023554440587759018, -0.0712788924574852, -0.0352010615170002, 0.0264288317412138, -0.037618912756443024, -0.039624568074941635, 0.0006649723509326577, -0.010342166759073734, -0.0004401134210638702, 0.04205148294568062, -0.06417649239301682, 0.005121252033859491, -0.012299355119466782, -0.03237998113036156, -0.011109663173556328, 0.023289088159799576, -0.031653109937906265, -0.0046516163274645805, -0.0016666247975081205, -0.024253789335489273, -0.012941351160407066, -0.006426440551877022, 0.028255725279450417, 0.06712304055690765, -0.03515970706939697, -0.02831348031759262 ]
[ -0.06376787275075912, 0.00031432975083589554, -0.019761953502893448, -0.04167693108320236, 0.05414241552352905, -0.0425339974462986, 0.02754068188369274, 0.018388859927654266, 0.004115783143788576, -0.01731172949075699, -0.005871355999261141, -0.06551533192396164, -0.005566180683672428, -0.016220979392528534, 0.10253944993019104, 0.033295612782239914, 0.00962633267045021, -0.053144585341215134, -0.03230642154812813, 0.03507302328944206, 0.008622090332210064, -0.0034682671539485455, -0.035504888743162155, -0.04245351627469063, 0.014185190200805664, 0.025370800867676735, 0.03754522278904915, -0.045993559062480927, -0.008007046766579151, -0.1920502781867981, 0.041671834886074066, -0.014197261072695255, 0.07039786875247955, -0.023864660412073135, -0.0019759940914809704, 0.04508059844374657, 0.028858480975031853, 0.00491398386657238, -0.024479983374476433, 0.03384079784154892, -0.007290081586688757, -0.019655143842101097, -0.032861653715372086, -0.02575070969760418, 0.05893895402550697, -0.020493406802415848, -0.00981060229241848, -0.07106264680624008, -0.05097236856818199, 0.0068385060876607895, -0.061968330293893814, -0.05640184506773949, 0.00880411360412836, -0.03640836849808693, -0.02505360171198845, 0.000993407447822392, 0.04535053297877312, 0.07855101674795151, 0.05416209623217583, 0.018906764686107635, -0.013478617183864117, 0.004118827637284994, -0.15665818750858307, 0.0946521908044815, 0.006433400325477123, 0.06642839312553406, -0.041644252836704254, -0.024607254192233086, 0.007009682711213827, 0.10049199312925339, 0.02158234640955925, -0.016839202493429184, -0.006418916862457991, 0.0355202779173851, -0.019761517643928528, -0.01088861282914877, 0.04119925573468208, 0.011521434411406517, 0.07323997467756271, -0.013358620926737785, -0.05119243264198303, 0.03121921233832836, -0.008819427341222763, -0.030251191928982735, -0.00029967474984005094, -0.0188957117497921, -0.030142152681946754, 0.017383979633450508, -0.008268160745501518, 0.02398589998483658, 0.025056758895516396, -0.011340294033288956, 0.01676877588033676, 0.023958716541528702, -0.0747549906373024, -0.04188791289925575, 0.0309669841080904, 0.007866120897233486, -0.030842352658510208, 0.3746502101421356, -0.024695226922631264, -0.007479296997189522, 0.024955328553915024, 0.03119371086359024, -0.010830827988684177, -0.04460132122039795, -0.037772517651319504, -0.05441636964678764, 0.01004796102643013, -0.04134312644600868, 0.025328192859888077, -0.03123394399881363, 0.04545261338353157, -0.030518529936671257, 0.021612899377942085, 0.007953515276312828, 0.051516443490982056, 0.047772761434316635, 0.008969136513769627, 0.020805833861231804, -0.008057125844061375, -0.02359968051314354, 0.02148895524442196, -0.036131542176008224, 0.033934276551008224, 0.02060599811375141, 0.03669210523366928, 0.07235785573720932, 0.04292718321084976, 0.026220889762043953, 0.05468761920928955, -0.049518294632434845, -0.07316466420888901, 0.017334016039967537, 0.017288465052843094, 0.005641913507133722, 0.033946726471185684, -0.0035891872830688953, 0.0035720495507121086, 0.01389805506914854, -0.0018652721773833036, -0.062969870865345, 0.014577827416360378, 0.04141094535589218, -0.062232404947280884, 0.11033456772565842, -0.04037659615278244, -0.02888546511530876, -0.047166068106889725, -0.02782490849494934, 0.021090777590870857, 0.041600052267313004, 0.028843386098742485, -0.09834697842597961, 0.022230494767427444, 0.02907012589275837, 0.1196092963218689, -0.02436814084649086, -0.056752633303403854, -0.005543763283640146, -0.004776814952492714, -0.05168382078409195, -0.007973642088472843, 0.015808137133717537, 0.048535414040088654, -0.11453260481357574, -0.03186556324362755, 0.009769555181264877, 0.02288295328617096, -0.08325905352830887, 0.0319039523601532, 0.026112226769328117, -0.036433782428503036, 0.013526445254683495, -0.02661711908876896, -0.06357540935277939, -0.04732886701822281, 0.027792861685156822, 0.06188870966434479, 0.006321626715362072, -0.005092571955174208, -0.009065106511116028, -0.028768550604581833, 0.016682647168636322, -0.04289067164063454, -0.07031699270009995, -0.028678327798843384, -0.033702101558446884, 0.004623252432793379, -0.016723308712244034, -0.0029894630424678326, -0.02226840704679489, -0.05794772133231163, 0.022712208330631256, -0.036303211003541946, -0.0063942507840693, 0.0372186042368412, -0.00943733099848032, -0.04525115340948105, 0.014285127632319927, -0.049531541764736176, 0.026673737913370132, -0.026633020490407944, 0.028388336300849915, -0.06464909762144089, 0.020834684371948242, 0.03301575034856796, -0.03663753718137741, 0.09228473156690598, 0.005666072480380535, -0.007203882094472647, -0.011422042734920979, -0.00807118695229292, 0.025065625086426735, -0.04140010103583336, -0.027718668803572655, -0.020793914794921875, 0.017653582617640495, 0.01479269564151764, 0.04696066305041313, -0.06436087936162949, -0.029633278027176857, -0.039811376482248306, -0.3583162724971771, -0.04740090295672417, 0.020789559930562973, 0.02490254119038582, 0.0021541009191423655, -0.08530112355947495, 0.01974552683532238, -0.013765356503427029, 0.0060648489743471146, 0.040389422327280045, 0.06291969865560532, -0.0024840175174176693, 0.05011814460158348, -0.09344407916069031, 0.01606900431215763, 0.04199323430657387, -0.013257203623652458, -0.029814982786774635, -0.017615921795368195, 0.04995394125580788, -0.0017192403320223093, -0.0027911686338484287, 0.0007286012405529618, -0.07700689136981964, -0.030308056622743607, -0.03393825888633728, 0.11150579154491425, 0.04662543162703514, 0.08616353571414948, -0.025020375847816467, 0.04841607064008713, 0.004217593465000391, 0.012598925270140171, -0.09792066365480423, 0.023077918216586113, -0.004267571493983269, -0.002558650216087699, 0.0008507915772497654, 0.00892183929681778, -0.030688157305121422, -0.01866629533469677, 0.0355142280459404, -0.03861788660287857, -0.03199943155050278, -0.07844031602144241, 0.021735744550824165, -0.034068409353494644, -0.026526274159550667, -0.01940026320517063, 0.05249479040503502, 0.018218526616692543, 0.04395356774330139, 0.024744205176830292, 0.004550264682620764, -0.029145140200853348, -0.005107392091304064, -0.09712353348731995, -0.0025533924344927073, -0.03494469076395035, 0.0029175563249737024, 0.012935897335410118, 0.04395222291350365, 0.017119763419032097, -0.06130858138203621, -0.022057758644223213, -0.01327294111251831, 0.01007900945842266, -0.0067364489659667015, 0.03469274565577507, 0.002037745900452137, -0.023773016408085823, 0.1003074124455452, -0.008825843222439289, 0.0007193881319835782, 0.054495662450790405, 0.06104358658194542, -0.0017023393884301186, 0.000411235581850633, 0.016133785247802734, -0.015584010630846024, 0.047298725694417953, 0.00861554965376854, 0.051159828901290894, -0.0018047727644443512, 0.02250691130757332, 0.021164607256650925, 0.02310219407081604, 0.0030590612441301346, 0.07697441428899765, 0.03084358386695385, -0.008048882707953453, 0.029044410213828087, 0.00008472798072034493, -0.03728640079498291, 0.09041982144117355, 0.013483230955898762, -0.24464978277683258, 0.03654646500945091, 0.05186421424150467, 0.06757095456123352, 0.03413696214556694, -0.006693868897855282, 0.03095070645213127, -0.0820966437458992, -0.00530754029750824, 0.00415682652965188, 0.006816784385591745, 0.018751436844468117, -0.005375216249376535, 0.0020083924755454063, -0.01641227677464485, 0.007944372482597828, 0.09572859108448029, 0.013195110484957695, -0.013447925448417664, 0.0028075024019926786, 0.02631121128797531, -0.0033222688362002373, 0.13762247562408447, 0.019057469442486763, 0.012201085686683655, -0.027011459693312645, -0.016850704327225685, -0.03295106440782547, 0.07265080511569977, -0.014165045693516731, 0.005380300804972649, -0.011065353639423847, 0.04602864384651184, -0.0018387539312243462, 0.012850427068769932, -0.027852104976773262, -0.023380441591143608, 0.01694239303469658, 0.035379454493522644, -0.030361710116267204, 0.006329389754682779, -0.011428926140069962, -0.047845885157585144, -0.014616570435464382, 0.06906579434871674, -0.0026053960900753736, 0.048903122544288635, -0.035065002739429474, -0.046562839299440384, 0.007526618894189596, 0.0029895638581365347, -0.024687569588422775, -0.01886933669447899, -0.01265664305537939, 0.029401538893580437, 0.10846783965826035, 0.03615397587418556, -0.018011707812547684, -0.010397153906524181, -0.01716567389667034, -0.019880957901477814, -0.03352224454283714, 0.11668483167886734, 0.024142790585756302, 0.039472755044698715 ]
[ 0.013378778472542763, 0.015556700527668, -0.009884392842650414, 0.017331663519144058, 0.014150812290608883, -0.025364680215716362, 0.0033524828031659126, -0.001812177593819797, -0.013544798828661442, -0.006857268046587706, -0.018444722518324852, 0.014841382391750813, 0.007820028811693192, -0.016142280772328377, 0.023264797404408455, 0.00632143672555685, -0.014651668258011341, 0.009911433793604374, 0.031582459807395935, -0.019002042710781097, -0.024565134197473526, 0.05681297555565834, 0.013289368711411953, 0.006172114983201027, -0.030557744204998016, -0.012181805446743965, -0.027853330597281456, 0.017503872513771057, 0.020379947498440742, -0.1147657036781311, -0.031540002673864365, -0.03607134521007538, 0.02015392668545246, 0.0039849914610385895, -0.034973494708538055, -0.011099204421043396, -0.0025035168509930372, -0.003216223558411002, 0.011601115576922894, 0.036794330924749374, -0.022497327998280525, 0.001887067104689777, -0.005308434832841158, 0.012828262522816658, -0.020574046298861504, 0.0010642163688316941, -0.07106442749500275, 0.0008859866647981107, 0.0016935019521042705, -0.02610122598707676, -0.032633718103170395, -0.024827221408486366, 0.014745314605534077, 0.03699006140232086, -0.020124157890677452, 0.003984055481851101, -0.006237740162760019, -0.002784659853205085, 0.018732521682977676, -0.021506577730178833, -0.01332124788314104, -0.008124163374304771, -0.02983637899160385, -0.03200463205575943, -0.02889559231698513, -0.011139425449073315, -0.039662957191467285, 0.03306889161467552, 0.035555239766836166, 0.015033524483442307, 0.005029966589063406, 0.022379741072654724, -0.002911696210503578, -0.012647614814341068, 0.010999500751495361, -0.028306210413575172, 0.026041585952043533, -0.02781013585627079, 0.0476389043033123, 0.017056742683053017, -0.06209864467382431, 0.01838820055127144, 0.01027730107307434, -0.01959330588579178, -0.004255412146449089, -0.04721813648939133, -0.014641381800174713, 0.02807299792766571, -0.0317852757871151, -0.0022684962023049593, -0.045752979815006256, -0.016937198117375374, -0.011938541196286678, 0.009291336871683598, -0.09134683758020401, 0.03518187999725342, -0.004494016524404287, -0.02868034504354, -0.005521730519831181, 0.8418452739715576, 0.010790219530463219, -0.005678664892911911, 0.020960334688425064, -0.009588576853275299, 0.016984842717647552, -0.011906715109944344, -0.03174400329589844, -0.020468631759285927, 0.05936014652252197, -0.037792056798934937, -0.013736375607550144, 0.0022928963880985975, 0.012902799993753433, 0.053531162440776825, 0.02097470499575138, 0.03986018896102905, -0.019027339294552803, 0.03335351496934891, -0.010333459824323654, 0.008518878370523453, -0.007577736862003803, 0.013970901258289814, -0.013734785839915276, -0.004265888128429651, 0.0023202975280582905, -0.1897997111082077, 0.019562814384698868, -7.922690865220119e-33, 0.03401189297437668, -0.025715719908475876, 0.009530512616038322, -0.00776738952845335, -0.0017975468654185534, 0.0010433158604428172, -0.0042127580381929874, -0.015921570360660553, 0.0032543756533414125, -0.030909406021237373, 0.003227386623620987, -0.0034343430306762457, 0.02035870961844921, -0.033387698233127594, 0.037122707813978195, 0.001424909452907741, -0.03365873545408249, 0.029464472085237503, 0.0017124137375503778, 0.03295861929655075, 0.06339295208454132, 0.04895811155438423, 0.006127249915152788, 0.004468285944312811, 0.023183491080999374, -0.0027827045414596796, -0.0014053590130060911, -0.009552584029734135, 0.000584445777349174, -0.028967684134840965, -0.055432796478271484, 0.025729091838002205, 0.019644349813461304, -0.029211895540356636, 0.004598681349307299, -0.05631503462791443, -0.02408408932387829, 0.006691191345453262, -0.02393016777932644, -0.05962026119232178, -0.016699260100722313, 0.0027679468039423227, 0.013863311149179935, -0.023972846567630768, -0.032440852373838425, 0.02263736166059971, -0.008525734767317772, 0.027112875133752823, 0.0014779269695281982, 0.02197464555501938, 0.0077595459297299385, -0.021683283150196075, 0.0012806474696844816, 0.012640620581805706, -0.009692896157503128, 0.035617318004369736, 0.038960736244916916, 0.017993194982409477, 0.04018021747469902, -0.03009355627000332, 0.009902426972985268, -0.04505828022956848, 0.025420458987355232, 0.018225351348519325, 0.01325315237045288, -0.005058529786765575, -0.011876256205141544, 0.0002994314709212631, 0.012767751701176167, -0.02216820977628231, -0.03618987277150154, 0.00796293094754219, -0.044490862637758255, -0.011884504929184914, -0.011049982160329819, -0.01842159777879715, 0.021810349076986313, -0.015473776496946812, -0.0012102131731808186, 0.06179707497358322, 0.017345529049634933, -0.006905342917889357, -0.023091033101081848, -0.04067941755056381, 0.013888265937566757, -0.03594205528497696, 0.024103663861751556, -0.02207433059811592, 0.0045278724282979965, 0.032654378563165665, 0.0035118088126182556, 0.07428991049528122, -0.0271194726228714, -0.0067319488152861595, 0.028105484321713448, 7.297724599926065e-33, 0.005395202897489071, 0.0053505985997617245, -0.005834705196321011, -0.01075121108442545, 0.014892937615513802, -0.013453809544444084, 0.022959817200899124, 0.04181838035583496, -0.04186726361513138, 0.014181463979184628, -0.04479435831308365, -0.016468456014990807, -0.016979843378067017, 0.00013868187670595944, 0.03691403940320015, 0.009197467006742954, 0.0029024004470556974, 0.06428888440132141, 0.030544036999344826, 0.024800989776849747, 0.01700829342007637, 0.03820197284221649, 0.0010607052827253938, 0.026235975325107574, -0.000339410180458799, -0.0074930135160684586, -0.013340701349079609, 0.008073701523244381, 0.005308487452566624, 0.01319876965135336, 0.008877490647137165, -0.007642455864697695, -0.008146712556481361, 0.0022803035099059343, -0.005126776173710823, 0.013506577350199223, 0.007871981710195541, -0.0457005649805069, 0.0301059540361166, 0.0009554896969348192, 0.04171111062169075, 0.03421109542250633, -0.018474312499165535, 0.013070347718894482, 0.03080044873058796, 0.017179260030388832, -0.01720030978322029, 0.004399292636662722, 0.015851007774472237, 0.0023095111828297377, -0.03133983537554741, 0.00996545422822237, 0.015356013551354408, 0.029066935181617737, -0.00005431060344562866, -0.017471415922045708, 0.007464401889592409, 0.028809303417801857, -0.02781982719898224, 0.0020693091209977865, -0.047244593501091, -0.016533372923731804, -0.0377349928021431, -0.025255657732486725, -0.02938511036336422, -0.022342700511217117, -0.05605119839310646, 0.016183562576770782, 0.022713234648108482, -0.019773755222558975, -0.037411756813526154, -0.016530171036720276, 0.012503446079790592, 0.034299787133932114, 0.006958897691220045, 0.01762486808001995, -0.03635811805725098, 0.0067902798764407635, -0.027320722118020058, 0.01925745978951454, 0.011410471051931381, 0.016684670001268387, 0.014711323194205761, -0.00005367043922888115, 0.022952526807785034, 0.021045248955488205, 0.004324408248066902, 0.005234535783529282, 0.027018997818231583, -0.021435167640447617, 0.034584302455186844, 0.0337347537279129, 0.015676314011216164, 0.019718440249562263, -0.02373015694320202, -1.3292199341208288e-8, -0.04917087405920029, 0.006454621907323599, -0.0016201457474380732, 0.0340350866317749, 0.01339257974177599, 0.007730529643595219, -0.0043790144845843315, -0.016998494043946266, -0.034781768918037415, 0.001706029288470745, 0.0645466148853302, 0.0014495470095425844, -0.012704201973974705, -0.005154475104063749, 0.008444858714938164, -0.0199302788823843, -0.020436657592654228, -0.00018051383085548878, 0.03845912590622902, 0.00222761114127934, 0.05326930060982704, 0.014956320635974407, 0.029586289077997208, 0.0296485535800457, -0.015810472890734673, -0.023625599220395088, 0.014710614457726479, -0.07305758446455002, -0.022589977830648422, -0.012503217905759811, 0.006637175567448139, -0.023241112008690834, -0.05819570645689964, 0.01914580725133419, 0.002167679835110903, 0.006621915847063065, -0.02699974924325943, -0.019348639994859695, 0.014021950773894787, 0.017764901742339134, 0.010076751001179218, -0.017426377162337303, -0.026272615417838097, -0.03818075358867645, -0.014034540392458439, -0.00598114961758256, -0.013165382668375969, -0.0037156972102820873, 0.04144947975873947, -0.02098514884710312, -0.013453541323542595, -0.006814512889832258, -0.00640066247433424, -0.023519501090049744, 0.05581898242235184, 0.011840997263789177, 0.0029442927334457636, -0.02031145803630352, -0.027824949473142624, -0.01973150111734867, 0.04336646571755409, 0.030956128612160683, -0.020659055560827255, -0.014073004014790058 ]
python-scikit-learn-training-a-classifier-with-non-numeric-features
https://markhneedham.com/blog/2015/03/02/python-scikit-learn-training-a-classifier-with-non-numeric-features
false
2015-03-20 07:30:55
Badass: Making users awesome - Kathy Sierra: Book Review
[ "books", "book-review", "users" ]
[ "Books" ]
I started reading Kathy Sierra's new book 'http://www.amazon.co.uk/Badass-Making-Awesome-Kathy-Sierra/dp/1491919019/ref=sr_1_1?ie=UTF8&qid=1426809815&sr=8-1&keywords=kathy+sierra[Badass: Making users awesome]' a couple of weeks ago and with the gift of flights to/from Stockholm this week I've got through the rest of it. I really enjoyed the book and have found myself returning to it almost every day to check up exactly what was said on a particular topic. There were a few things that I've taken away and have been going on about to anyone who will listen. image::{{<siteurl>}}/uploads/2015/03/2015-03-20_06-52-51.png[2015 03 20 06 52 51,217] Paraphrasing, '*help users acquire skills, don't throw knowledge at them*.' I found this advice helpful both in my own learning of new things as well as for thinking how to help users of Neo4j get up and running faster. Whether we're doing a talk, workshop or online training, the goal isn't to teach the user a bunch of information/facts but rather to help them learn skills which they can use to achieve their '*compelling context*'. Having said that, it's very easy to fall into the information/facts trap as that type of information is much easier to prepare and present. You don't have to spend much time thinking about how the user is going to use, rather you hope that if you throw enough information at them some of it will stick. A user's compelling context the problem they're trying to solve regardless of the tools they use to solve it. The repeated example of this is a camera - we don't buy a camera because we want to buy a camera, we buy it because we want to *take great photographs*. image::{{<siteurl>}}/uploads/2015/03/2015-03-17_23-49-25.png[2015 03 17 23 49 25,238] There's a really interesting section in the middle of the book which talks about expert performance and skill acquisition and how we can achieve this through deliberate practice. My main take away here is that we have only mastered a skill if we can achieve 95% reliability in repeating the task within 1-3 45-90 minute sessions. If we can't achieve this then the typical reaction is to either give up or keep trying to achieve the goal for many more hours. Neither of these is considered a useful approach. Instead we should realise that if we can't do the skill it's probably because there's a small sub skill that we need to master first. So our next step is to break this skill down into its components, master those and then try the original skill again. Amy Hoy's 'http://files.alexpcoleman.com/newsletter/2014/04/The%2030x500%20Guide%20to%20Doing%20It%20Backwards.pdf[doing it backwards]' guide is very helpful for doing the skill breakdown as it makes you ask the question '*can I do it tomorrow?*' or is there something else that I need to do (learn) first. I've been trying to apply this approach to my machine learning adventures which most recently has involved various topic modelling attempts on a How I met your mother data set. I'd heard good things about the http://mallet.cs.umass.edu/[MALLET] open source library but having never used it before sketched out the goals/skills I wanted to achieve: ~~~text Extract topics for HIMYM corpus \-> Train a topic model with mallet \-> Tweak an existing topic model that uses mallet \-> Run an existing topic model that uses mallet \-> Install mallet ~~~ image::{{<siteurl>}}/uploads/2015/03/2015-03-20_00-11-48.png[2015 03 20 00 11 48,300] The idea is that you then start from the last action and work your way back up the chain - it should also act as a nice deterrent for http://www.markhneedham.com/blog/2011/12/31/yak-shaving-tracking-the-yak-stack/[yak shaving]. While learning about mallet I came across http://mimno.infosci.cornell.edu/topics.html[several] http://dsl.richmond.edu/dispatch/Topics[more] http://www.perseus.tufts.edu/publications/02-jocch-mimno.pdf[articles] that I should read about topic modelling and while these don't directly contribute to learning a skill I think they will give me good background to help pick up some of the intuition behind topic modelling. My take away about gaining knowledge on a skill is that when we're getting started we should spend more time gaining practical knowledge rather than only reading but once we get more into it we'll naturally become more curious and do the background reading. I often find myself just reading non stop about things but never completely understanding them because I don't go hands on so this was a good reminder. One of the next things I'm working on is a similar skill break down for people learning Neo4j and then we'll look to apply this to make our http://www.meetup.com/graphdb-london/[meetup sessions] more effective - should be fun! The other awesome thing about this book is that I've come away with a bunch of other books to read as well: * http://www.amazon.co.uk/Cambridge-Expertise-Performance-Handbooks-Psychology/dp/0521600812/ref=sr_1_1?ie=UTF8&qid=1426836426&sr=8-1&keywords=the+cambridge+handbook+of+expertise+and+expert+performance[The Cambridge Handbook of Expertise and Expert Performance] * http://www.amazon.co.uk/Mindset-How-Fulfil-Your-Potential/dp/1780332009/ref=sr_1_1?ie=UTF8&qid=1426836461&sr=8-1&keywords=mindset[Mindset: How you can fulfil your potential] * http://www.amazon.co.uk/Power-Habit-Why-What-Change/dp/1847946240/ref=sr_1_1?ie=UTF8&qid=1426836485&sr=8-1&keywords=the+power+of+habit[The power of habit] In summary, if learning is your thing get yourself a copy of the book and read it over a few times - so many great tips, I've only covered a few.
null
null
[ 0.02525288052856922, -0.007095778826624155, 0.005555605050176382, 0.03526928648352623, 0.09502095729112625, -0.011367695406079292, 0.03414447605609894, 0.02787165902554989, 0.00844808854162693, -0.005340744275599718, -0.024830766022205353, 0.017027875408530235, -0.04488782957196236, 0.0031629526056349277, -0.03984804078936577, 0.0596308596432209, 0.05779336765408516, 0.03521404415369034, 0.002937611425295472, -0.0018367214361205697, 0.030241109430789948, 0.0505894273519516, 0.04070219025015831, 0.03286632150411606, 0.026493003591895103, -0.014541842974722385, 0.03170240670442581, -0.008007192052900791, -0.06072866916656494, -0.008881495334208012, 0.029536956921219826, -0.013593968003988266, 0.005991530604660511, 0.005988922901451588, 0.026605945080518723, -0.0023163538426160812, -0.009063445031642914, 0.009050069376826286, 0.0042495885863900185, 0.010222508572041988, -0.0792260691523552, 0.03822490572929382, -0.03107248805463314, 0.013512372970581055, -0.04615575820207596, -0.011320129036903381, -0.027354031801223755, 0.027844276279211044, 0.02945519983768463, 0.0004989904700778425, -0.07294999808073044, 0.05238941311836243, -0.008188099600374699, 0.021430272608995438, -0.005879169795662165, 0.05638641119003296, 0.008325187489390373, -0.05621759593486786, 0.004212898202240467, -0.03629279136657715, -0.017052054405212402, 0.00015852213255129755, 0.006014295853674412, 0.023119112476706505, 0.02339610643684864, -0.04077200964093208, 0.0030744201503694057, 0.05049224942922592, -0.023194268345832825, 0.001661002403125167, -0.037645310163497925, 0.017347194254398346, -0.013280898332595825, 0.0007839268655516207, 0.002710935892537236, -0.04291713982820511, 0.017734529450535774, 0.052597351372241974, 0.02762853540480137, 0.04193592444062233, -0.019727004691958427, 0.032657358795404434, 0.0009184422669932246, 0.02745630033314228, -0.02209346927702427, -0.04497862979769707, -0.008956307545304298, -0.03333669155836105, -0.05365223065018654, 0.04711701720952988, 0.014420323073863983, -0.06942693889141083, 0.014784494414925575, 0.03941377252340317, 0.003779904218390584, 0.013834038749337196, 0.02573251910507679, -0.013610546477138996, -0.016416208818554878, -0.023549463599920273, -0.010602351278066635, -0.0333307683467865, -0.004315371159464121, 0.01218565646559, -0.07942219823598862, -0.0072003561072051525, -0.02808375097811222, -0.0044746994972229, 0.01524647232145071, -0.003877611830830574, -0.014812661334872246, 0.015709063038229942, -0.025012005120515823, -0.0035360355395823717, -0.07237641513347626, 0.06157638877630234, 0.012821742333471775, -0.02806929312646389, -0.02605777233839035, 0.003310608910396695, 0.049465570598840714, 0.04296373575925827, -0.007170061580836773, 0.0688253864645958, 0.0009118340094573796, 0.005109965335577726, -0.0016178195364773273, 0.053213246166706085, -0.022048406302928925, -0.04478957876563072, -0.014712294563651085, 0.032802093774080276, -0.027148500084877014, -0.002469240454956889, 0.0007489725248888135, -0.03111499734222889, 0.01668011210858822, -0.0058056325651705265, 0.03436186909675598, 0.03624264523386955, 0.012103233486413956, -0.03256598860025406, 0.005221367347985506, 0.0044771297834813595, 0.05053875967860222, -0.012466161511838436, 0.01671978458762169, -0.01666061207652092, -0.04279911518096924, -0.023084308952093124, 0.012477266602218151, -0.00464364280924201, 0.015444480814039707, -0.0438644103705883, 0.006520804483443499, 0.06909290701150894, 0.03237674757838249, 0.018399978056550026, -0.021068209782242775, 0.03360340744256973, 0.05116930976510048, 0.028704781085252762, 0.012640035711228848, 0.024504078552126884, -0.010758048854768276, -0.018781274557113647, -0.02131740003824234, 0.07544562965631485, 0.009154529310762882, 0.013394651003181934, -0.05028916895389557, -0.043778032064437866, 0.05226035416126251, -0.031497132033109665, -0.03813893347978592, 0.06718815863132477, 0.08788339793682098, 0.040890708565711975, 0.0337044782936573, 0.008911517448723316, -0.08238731324672699, 0.04534171149134636, 0.020287536084651947, 0.012628386728465557, 0.009447169490158558, -0.02265808917582035, 0.07071663439273834, 0.03261615335941315, 0.022713888436555862, 0.05181170254945755, -0.07552926987409592, -0.08303488045930862, -0.02441290020942688, -0.015915125608444214, 0.05841577425599098, -0.027208643034100533, 0.03783614933490753, 0.06164764612913132, -0.0037697043735533953, 0.05434057489037514, 0.013181225396692753, -0.018672646954655647, 0.018690703436732292, -0.03545542061328888, -0.04401092231273651, 0.04908846691250801, 0.029227642342448235, -0.01895991712808609, -0.027058474719524384, 0.0270187146961689, -0.0262196883559227, 0.004288133233785629, 0.0508013553917408, 0.01658780314028263, 0.016270959749817848, 0.011190850287675858, 0.04934270307421684, -0.025558143854141235, 0.02774902433156967, -0.025796476751565933, 0.012849381193518639, 0.012258653528988361, -0.02476421184837818, 0.01869012601673603, 0.015208142809569836, 0.10128306597471237, 0.05260787159204483, -0.027371516451239586, -0.04272076487541199, 0.007093378342688084, 0.0031237697694450617, -0.039598047733306885, 0.0005494537763297558, -0.0015290037263184786, 0.009097379632294178, -0.01149903517216444, -0.04179314896464348, -0.009336327202618122, 0.027596693485975266, -0.050379425287246704, -0.007997998036444187, 0.05372069776058197, -0.0015827674651518464, 0.06964918971061707, -0.004830431193113327, 0.010247758589684963, -0.013568929396569729, -0.0076456558890640736, -0.04559871181845665, 0.0038162486162036657, 0.025633275508880615, -0.006010356359183788, 0.045080412179231644, -0.014961962588131428, -0.014744281768798828, -0.03773346170783043, -0.043963007628917694, 0.041678477078676224, 0.07057564705610275, 0.07250291854143143, 0.004654957912862301, 0.06627359241247177, -0.030319690704345703, 0.055369749665260315, -0.003984672017395496, -0.0402379147708416, -0.03511844947934151, -0.07356659322977066, 0.012758473865687847, 0.02819930948317051, 0.021074390038847923, 0.017677152529358864, 0.03894728794693947, 0.019896188750863075, 0.012054279446601868, -0.014121423475444317, 0.05266596004366875, 0.015169637277722359, 0.0010547928977757692, -0.027677567675709724, -0.03251640871167183, 0.06284358352422714, -0.03165488690137863, -0.023538267239928246, 0.007624127436429262, -0.08492637425661087, 0.04865660518407822, -0.04707929864525795, -0.04960116744041443, 0.009794977493584156, 0.015039072372019291, 0.04688066244125366, 0.06205166503787041, 0.005302791949361563, 0.06481549143791199, 0.019878312945365906, 0.004962243605405092, -0.008888422511518002, -0.02536443993449211, 0.0427725724875927, -0.022287042811512947, 0.007239823695272207, 0.05107588320970535, 0.002656456083059311, 0.018643096089363098, -0.03198910132050514, 0.03831033781170845, -0.03689084202051163, -0.2927098572254181, 0.039668843150138855, 0.01306235883384943, -0.05478934198617935, 0.012713373638689518, -0.043603867292404175, -0.015132461674511433, -0.05801289528608322, -0.02800465002655983, 0.03568978235125542, -0.009219319559633732, -0.03368319943547249, -0.034833863377571106, 0.031718507409095764, 0.018533891066908836, 0.017770538106560707, 0.018767163157463074, -0.032211095094680786, -0.007998182438313961, 0.05096385255455971, -0.000267169380094856, -0.0610964260995388, -0.00010009764082496986, 0.04525662958621979, 0.03623295575380325, 0.057199958711862564, -0.06422442942857742, 0.004001747816801071, -0.05953165143728256, -0.024775071069598198, 0.01896846853196621, -0.013947304338216782, 0.017467228695750237, -0.003274809569120407, -0.010087813250720501, -0.016471419483423233, 0.07216762751340866, 0.016515398398041725, -0.009150833822786808, -0.020128047093749046, -0.011489536613225937, -0.0350722037255764, -0.009991735219955444, 0.005990396253764629, 0.08566233515739441, -0.004411670845001936, -0.08831445872783661, -0.019179079681634903, -0.029587730765342712, 0.06476829946041107, -0.04659983515739441, -0.04857639968395233, -0.02530185878276825, 0.043306078761816025, -0.00026614023954607546, -0.020977463573217392, -0.0002949442423414439, -0.024067416787147522, -0.038110993802547455, -0.04611346870660782, -0.018743379041552544, -0.03656651824712753, -0.02169603854417801, -0.04548635706305504, -0.01370045356452465, -0.0716748908162117, -0.07500613480806351, -0.03713211417198181, 0.06773833930492401, 0.01783197931945324, -0.04081414267420769, 0.027308357879519463, -0.009624011814594269, -0.09733758866786957, -0.019603196531534195, -0.017374824732542038, -0.026603884994983673, 0.005523580592125654, 0.004920749459415674, 0.055765751749277115, -0.034250810742378235, -0.058456674218177795, 0.02757139317691326, 0.004729457199573517, 0.031977202743291855, -0.04163188114762306, 0.02840622328221798, 0.00445022014901042, -0.013437961228191853, 0.00985729694366455, 0.08648757636547089, -0.007159193512052298, -0.02897034026682377, -0.008582246489822865, 0.0062936218455433846, 0.010546626523137093, 0.02436547912657261, -0.014489680528640747, 0.021628806367516518, 0.04074946790933609, -0.008179849945008755, -0.051920805126428604, 0.024889621883630753, -0.02555837109684944, -0.028351835906505585, -0.008869960904121399, -0.035944823175668716, 0.016266675665974617, 0.04123698174953461, -0.007130992133170366, -0.007971740327775478, -0.026041237637400627, 0.025768166407942772, -0.04219376668334007, -0.03687835484743118, -0.011432332918047905, 0.029794981703162193, 0.04661782458424568, 0.012046190910041332, -0.012025751173496246, -0.05814741924405098, 0.011128325946629047, -0.002458763075992465, -0.022733312100172043, -0.05347315967082977, -0.03274311497807503, -0.02404557354748249, -0.024140650406479836, -0.01646914705634117, 0.012259789742529392, -0.021631361916661263, -0.00016265716112684458, 0.02799864485859871, -0.027384912595152855, 0.03152398765087128, -0.044534604996442795, -0.06547074764966965, -0.05074368417263031, 0.030277647078037262, 0.009468534961342812, -0.032425206154584885, 0.03810042515397072, -0.03485485166311264, 0.019094176590442657, 0.04056297242641449, 0.01790405623614788, 0.009527799673378468, 0.00580426724627614, 0.0015182227361947298, 0.01300907414406538, -0.017326558008790016, -0.04653904214501381, 0.0038775259163230658, -0.017574120312929153, -0.021458206698298454, -0.010585660114884377, 0.032946839928627014, -0.029141003265976906, -0.023463772609829903, -0.0010689800838008523, 0.006048787385225296, -0.06638403981924057, -0.025001000612974167, -0.01651831343770027, 0.015602611005306244, 0.05023884028196335, -0.015041997656226158, 0.0012192644644528627, 0.00023068804875947535, -0.0024816631339490414, 0.033764906227588654, 0.0033689916599541903, -0.047262076288461685, 0.000364634528523311, 0.007797179743647575, 0.0032974991481751204, -0.0054950411431491375, 0.02407735399901867, 0.052402984350919724, 0.00784582830965519, -0.025540819391608238, -0.039787352085113525, 0.018371889367699623, 0.0038802684284746647, 0.05743807926774025, 0.03185490891337395, -0.029319077730178833, -0.012484290637075901, -0.02791040763258934, -0.025613421574234962, -0.014600720256567001, 0.0014410127187147737, -0.016044633463025093, 0.0008579744026064873, -0.031107038259506226, -0.07381043583154678, 0.05446011573076248, -0.01102539710700512, -0.0011729099787771702, 0.04948536306619644, -0.01140395738184452, -0.006523543037474155, -0.020510220900177956, 0.038562558591365814, 0.02517608553171158, -0.0697387158870697, 0.000008681425242684782, -0.003949127625674009, -0.009933952242136002, 0.016019828617572784, -0.010527502745389938, -0.0447927825152874, -0.02034778706729412, -0.02122780866920948, 0.018722621724009514, -0.061962127685546875, -0.03605007007718086, -0.03416787460446358, 0.006222591735422611, -0.003542580408975482, 0.014147315174341202, -0.011999567970633507, -0.037285856902599335, -0.03229588642716408, -0.013960891403257847, 0.04378260299563408, -0.05162264034152031, -0.01672203280031681, 0.015054580755531788, -0.05711939558386803, -0.006682584527879953, -0.019941287115216255, 0.025075925514101982, 0.025100311264395714, -0.02634749561548233, 0.010627690702676773, -0.035743534564971924, 0.01062880177050829, 0.004915508441627026, 0.061907410621643066, -0.011467273347079754, -0.015831438824534416, -0.0512489452958107, 0.0033202487975358963, -0.04162748530507088, 0.035023659467697144, -0.029472295194864273, -0.001742097781971097, 0.03962749242782593, 0.048448070883750916, 0.012333696708083153, 0.008156315423548222, -0.012768327258527279, -0.018805429339408875, 0.039919063448905945, -0.07009512186050415, -0.013210718519985676, -0.019878430292010307, -0.0462879054248333, 0.010848299600183964, 0.028046227991580963, 0.012347660027444363, -0.041416577994823456, 0.051691170781850815, 0.03055795095860958, 0.01712191104888916, 0.02429228089749813, 0.004571439232677221, 0.0236451867967844, -0.016687339171767235, -0.009934158064424992, -0.0896192342042923, -0.012314088642597198, 0.040125660598278046, -0.002513245679438114, -0.02524738945066929, -0.0005427966825664043, -0.015882551670074463, 0.03916911408305168, -0.0709359273314476, -0.01944361813366413, 0.028279226273298264, -0.020984308794140816, -0.022064125165343285, 0.0010963010136038065, -0.0608895868062973, 0.026485079899430275, 0.028693605214357376, -0.04262848198413849, -0.0072821155190467834, -0.02847910113632679, 0.06058744341135025, -0.013285011984407902, 0.03242882341146469, -0.008831005543470383, -0.0051952325738966465, 0.08270329982042313, 0.022652091458439827, 0.009346624836325645, 0.04261380434036255, -0.01037586573511362, 0.03067810647189617, 0.023300539702177048, 0.01659834198653698, -0.0016406922368332744, 0.018858090043067932, -0.013250417076051235, -0.07090917229652405, 0.031084340065717697, -0.0024882382713258266, -0.029806505888700485, -0.04388640448451042, 0.06926193088293076, 0.016571076586842537, -0.009784874506294727, -0.06465553492307663, 0.04620584845542908, -0.05190742760896683, -0.015431775711476803, -0.03832683339715004, -0.006791598629206419, -0.040247250348329544, 0.03950587287545204, -0.010520204901695251, 0.008158711716532707, 0.066312275826931, -0.023928634822368622, -0.01820116490125656, -0.02097425051033497, 0.0910181775689125, 0.07896492630243301, 0.07815679162740707, 0.006726356223225594, 0.08923445641994476, 0.009447760879993439, -0.048137884587049484, 0.01106475479900837, -0.0062321629375219345, -0.02647680789232254, -0.04174049198627472, 0.008837215602397919, 0.05354400351643562, -0.004795975051820278, 0.064729705452919, -0.026904571801424026, -0.03749200701713562, 0.007031864952296019, 0.043135032057762146, 0.0245750080794096, 0.03728418052196503, 0.02030458301305771, 0.03735723719000816, -0.030886832624673843, -0.06897538900375366, 0.048787858337163925, -0.01193840242922306, -0.017460592091083527, 0.016450684517621994, -0.021778695285320282, 0.018348515033721924, 0.0036349864676594734, 0.046425122767686844, 0.07210589945316315, -0.03658118098974228, 0.019597478210926056, -0.00019870715914294124, 0.026723330840468407, 0.00831235758960247, 0.033632174134254456, -0.013195703737437725, 0.0006929493974894285, 0.0037052093539386988, -0.042035214602947235, -0.020160764455795288, -0.012103823944926262, -0.018998611718416214, 0.013546480797231197, -0.047707557678222656, -0.005779520608484745, 0.024484943598508835, -0.01731014996767044, -0.025567997246980667, -0.0546119250357151, -0.027970386669039726, -0.028211766853928566, -0.05690143257379532, 0.0052809566259384155, -0.002891829703003168, 0.009423267096281052, -0.04738200828433037, -0.006123044993728399, -0.02108507975935936, -0.03784982115030289, 0.06510120630264282, -0.06423120200634003, -0.0010817910078912973, 0.00859056320041418, 0.029088951647281647, 0.009757613763213158, 0.020245712250471115, 0.037429455667734146, 0.017442675307393074, -0.007250226568430662, 0.0026030654553323984, 0.017110679298639297, 0.04024800658226013, -0.005438930820673704, -0.003279108786955476, -0.09984468668699265, -0.006178091745823622, 0.0253827515989542, -0.006132571958005428, -0.05782349780201912, 0.01531221903860569, 0.0436314232647419, 0.02415301464498043, 0.05880940705537796, 0.0016054263105615973, 0.0003113127895630896, -0.04554934799671173, -0.002523129340261221, -0.017477180808782578, 0.007549775764346123, 0.050538577139377594, -0.01745327189564705, 0.08465820550918579, 0.008557558991014957, -0.010334711521863937, -0.04367503523826599, -0.0279128085821867, 0.01289347093552351, 0.018499551340937614, -0.021246546879410744, -0.0036685066297650337, -0.02466564066708088, -0.10378427058458328, -0.03457803651690483, 0.03405653312802315, -0.015946265310049057, -0.02820914052426815, 0.007180460263043642, 0.024744069203734398, 0.004385594744235277, 0.019738882780075073, -0.02897036261856556, 0.02897605672478676, -0.030005287379026413, -0.009942475706338882, -0.011380817741155624, 0.009806584566831589, -0.016389284282922745, -0.0013942138757556677, 0.010486024431884289, -0.0507148876786232, -0.009279918856918812, -0.019230248406529427, 0.031027745455503464, 0.020618494600057602, 0.023655928671360016, -0.033913832157850266 ]
[ -0.05198686569929123, -0.010739410296082497, -0.007914776913821697, -0.01733815297484398, 0.04559684544801712, -0.01731310598552227, -0.009286349639296532, 0.029188575223088264, -0.018200427293777466, -0.017665309831500053, 0.01393945887684822, -0.024367736652493477, -0.004201970994472504, 0.01562577299773693, 0.08336930721998215, 0.029989780858159065, 0.03388797864317894, -0.1171097680926323, -0.011639682576060295, 0.034384943544864655, -0.012868833728134632, -0.03621508181095123, -0.00213539763353765, -0.017713796347379684, 0.011417858302593231, 0.007236742880195379, 0.04665286839008331, -0.02287769690155983, -0.007604173384606838, -0.1738300770521164, -0.004586872644722462, 0.03151446208357811, 0.04811355471611023, 0.003715214319527149, -0.03931637480854988, 0.03712015226483345, 0.02852567285299301, 0.0028439888264983892, -0.0006479347357526422, 0.030757354572415352, 0.013464654795825481, 0.006888574920594692, -0.02426893264055252, -0.006388727575540543, 0.059635791927576065, 0.021323587745428085, -0.0015700551448389888, -0.03330596908926964, -0.007548359222710133, -0.003439311869442463, -0.08884063363075256, -0.042421791702508926, -0.005741470959037542, -0.021259600296616554, 0.0026921292301267385, 0.014552769251167774, 0.0283502284437418, 0.07314858585596085, 0.01651415228843689, 0.016681155189871788, 0.017238756641745567, 0.004207502584904432, -0.13224637508392334, 0.09583128988742828, 0.009463254362344742, 0.02167532779276371, -0.039106108248233795, 0.0018688049167394638, -0.0050675529055297375, 0.056195907294750214, 0.024929938837885857, -0.003845993196591735, -0.021284839138388634, 0.0444486029446125, 0.015427825972437859, 0.009705968201160431, 0.011688963510096073, 0.03367074951529503, -0.003553948597982526, -0.0603535994887352, -0.0035771920811384916, 0.03242899477481842, 0.007019956596195698, -0.012677439488470554, -0.05538409948348999, 0.027047913521528244, -0.010821457020938396, 0.028334666043519974, 0.012945129536092281, 0.02775486558675766, 0.0292825847864151, 0.00603359704837203, 0.022959670051932335, 0.016844192519783974, -0.09954456984996796, -0.050225723534822464, -0.001838968601077795, 0.03400518372654915, -0.0345306359231472, 0.46991094946861267, 0.0026421863585710526, -0.006139469798654318, 0.07814645767211914, 0.034860268235206604, -0.008511844091117382, -0.011127562262117863, 0.02713829092681408, -0.0561751052737236, 0.01810286194086075, -0.007839265279471874, 0.02416042611002922, 0.011685200966894627, 0.04966133460402489, -0.04669563099741936, 0.03562047705054283, 0.032571252435445786, 0.08105753362178802, 0.0251989234238863, 0.013651847839355469, -0.030775418505072594, -0.04003870114684105, 0.004977071192115545, 0.021598661318421364, 0.0017889444716274738, -0.009705962613224983, -0.07557408511638641, 0.029156284406781197, 0.05706450343132019, 0.03548149764537811, 0.012901779264211655, 0.057142939418554306, -0.019149430096149445, -0.07331883907318115, -0.0027345020789653063, 0.0034356035757809877, 0.009215989150106907, 0.021184587851166725, -0.030606158077716827, 0.026323383674025536, 0.04323336482048035, 0.01916389726102352, 0.015696972608566284, 0.009008953347802162, -0.0067297350615262985, -0.03652584180235863, 0.11813444644212723, 0.04361608996987343, -0.028511475771665573, -0.005216863937675953, -0.046718232333660126, 0.031914353370666504, 0.018588101491332054, 0.008127407170832157, -0.06649056077003479, 0.020110029727220535, 0.0004136530915275216, 0.1189369261264801, -0.02944205142557621, -0.09555353224277496, -0.014094454236328602, -0.010392647236585617, -0.03195219114422798, -0.05924088880419731, 0.024506358429789543, 0.06632471829652786, -0.08864374458789825, -0.014179825782775879, 0.006905296351760626, 0.015933189541101456, -0.06801058351993561, -0.005268519278615713, -0.0124034583568573, -0.04744185879826546, 0.000470783474156633, 0.06748836487531662, -0.017230944707989693, -0.06213650852441788, 0.001400240696966648, 0.015068701468408108, 0.01646723970770836, -0.012102755717933178, -0.028872236609458923, -0.033165376633405685, 0.008977559395134449, -0.06292454898357391, -0.0567672960460186, -0.04327801614999771, -0.008770023472607136, -0.00618673674762249, 0.007741054520010948, -0.0030007236637175083, -0.014729336835443974, -0.08508317172527313, 0.08073312789201736, -0.050840333104133606, -0.023982051759958267, -0.012998775579035282, 0.014177314005792141, -0.05203237384557724, -0.021828528493642807, -0.04438668489456177, -0.007771797478199005, -0.0494600385427475, 0.0195529256016016, -0.037524666637182236, 0.04287208244204521, 0.050460830330848694, -0.043259743601083755, 0.10830112546682358, 0.06200946494936943, -0.02279582992196083, -0.040900424122810364, -0.001830936991609633, 0.01745212823152542, -0.006015121936798096, -0.029606159776449203, 0.016885489225387573, -0.0029124205466359854, -0.01381002925336361, 0.018825344741344452, -0.032056406140327454, -0.021281983703374863, -0.03821135684847832, -0.32886597514152527, -0.03126204386353493, -0.027477961033582687, 0.00007394739805022255, 0.020920850336551666, -0.06488259881734848, 0.037222594022750854, -0.012036125175654888, 0.02102634124457836, 0.02959941141307354, 0.07026619464159012, -0.03472971171140671, 0.017652947455644608, -0.08398297429084778, 0.013279428705573082, 0.027810942381620407, -0.03220529109239578, -0.009312881156802177, -0.03116070292890072, -0.006137506570667028, 0.0027000075206160545, 0.006889217533171177, -0.01102709025144577, -0.057679805904626846, -0.01407406572252512, -0.021257199347019196, 0.09241443127393723, 0.034633465111255646, 0.045710474252700806, -0.025225551798939705, 0.038248222321271896, 0.016334950923919678, 0.005023391451686621, -0.11781727522611618, -0.018514906987547874, -0.004100238438695669, 0.040035516023635864, -0.02626935765147209, -0.0032592802308499813, -0.04157191142439842, -0.04334859922528267, 0.01634177379310131, -0.046972550451755524, -0.036193426698446274, -0.0924052968621254, 0.032567098736763, -0.027990002185106277, -0.0025100966449826956, -0.021585160866379738, 0.0708652064204216, 0.020420312881469727, -0.009398320689797401, -0.019358843564987183, 0.004045315086841583, -0.01788395084440708, -0.027804888784885406, -0.09519611299037933, 0.007278149481862783, 0.0013852246338501573, 0.032155007123947144, 0.018562329933047295, 0.04810183122754097, 0.021411344408988953, -0.10515552759170532, 0.023466110229492188, -0.009205779992043972, -0.029167253524065018, 0.035298559814691544, 0.04137319698929787, -0.017674095928668976, -0.02846902795135975, 0.07562454789876938, 0.007592196110635996, 0.012841756455600262, 0.039364103227853775, 0.03752053901553154, -0.011363737285137177, 0.023025764152407646, -0.0033872260246425867, 0.0022933681029826403, 0.023211561143398285, -0.015575293451547623, 0.03819332271814346, -0.01805092766880989, -0.01533588021993637, 0.02153329737484455, 0.01701403595507145, -0.07374226301908493, 0.06800869107246399, 0.02828509546816349, -0.04125204309821129, 0.01512038055807352, -0.039151426404714584, -0.06546329706907272, 0.07305190712213516, 0.0012052577221766114, -0.2466893345117569, 0.005390365608036518, 0.048633698374032974, 0.07078155875205994, 0.010386756621301174, 0.025496041402220726, 0.03494485840201378, -0.04653533175587654, 0.022791560739278793, 0.02031468041241169, 0.04716303572058678, 0.026196923106908798, -0.014019731432199478, 0.002786634024232626, 0.015190071426331997, -0.00832061842083931, 0.013761972077190876, 0.015585144981741905, 0.014235680922865868, 0.021243371069431305, 0.01660432480275631, -0.005730040837079287, 0.1368183195590973, 0.036754757165908813, -0.00806143507361412, 0.011943028308451176, -0.005048069171607494, -0.0003494746924843639, 0.04641016200184822, -0.01137430127710104, 0.005369025748223066, -0.000388354150345549, 0.0022186178248375654, 0.051580674946308136, 0.021259784698486328, -0.07326644659042358, -0.04348231106996536, 0.03375408798456192, 0.014213554561138153, -0.015030394308269024, 0.025245781987905502, 0.01838376186788082, -0.01678389310836792, 0.031469348818063736, 0.0758311003446579, -0.008720638230443, 0.02884136326611042, -0.031739939004182816, -0.07650607824325562, -0.0368497371673584, -0.012782721780240536, -0.042441196739673615, -0.0008104369626380503, -0.0013216467341408134, 0.013999741524457932, 0.07520662993192673, 0.02486908622086048, -0.026066141203045845, 0.012892262078821659, 0.0001300569565501064, -0.0038655567914247513, -0.030261989682912827, 0.0825665295124054, 0.018836714327335358, 0.030143044888973236 ]
[ 0.014735924080014229, 0.026034733280539513, 0.010782556608319283, 0.00822676345705986, 0.02130642905831337, -0.02555970661342144, 0.017400700598955154, 0.0011675790883600712, -0.010768796317279339, 0.022646568715572357, 0.00844526756554842, 0.024512920528650284, 0.036018311977386475, 0.023621849715709686, 0.03344611078500748, 0.010950573720037937, -0.007655981928110123, -0.004630764946341515, -0.0042417882941663265, -0.005175600294023752, 0.0038454928435385227, 0.0010602151742205024, 0.03258867561817169, 0.0034515445586293936, -0.03153553605079651, 0.0402391143143177, -0.0014313030987977982, -0.024838097393512726, 0.0276124719530344, -0.14873355627059937, -0.027549657970666885, -0.03187737241387367, -0.01663217321038246, 0.0028752856887876987, -0.009538245387375355, 0.011483743786811829, 0.010229969397187233, 0.00261509558185935, -0.01052252110093832, -0.01575593836605549, -0.03481479361653328, -0.017962556332349777, -0.0030497948173433542, 0.012948310934007168, 0.023727092891931534, 0.021937455981969833, 0.009151826612651348, -0.02440076880156994, 0.02193867415189743, -0.0376429408788681, -0.040332209318876266, -0.033336568623781204, -0.038567230105400085, -0.005901629570871592, -0.0017294281860813498, -0.0016385929193347692, -0.01291121356189251, 0.0036843621637672186, 0.009938542731106281, -0.0142563721165061, 0.0003101839974988252, -0.02657840959727764, -0.050487712025642395, -0.012649495154619217, 0.0024216971360147, 0.0050857034511864185, -0.006314146798104048, -0.004402375780045986, -0.037442032247781754, 0.013040951453149319, -0.007732640020549297, 0.04568898677825928, -0.02238929457962513, -0.0209665410220623, 0.002718400675803423, -0.01190096139907837, 0.01185587141662836, -0.029957717284560204, 0.012119604274630547, 0.006401102524250746, 0.022487159818410873, 0.02320445328950882, -0.005077993497252464, -0.0281851664185524, 0.01077224686741829, -0.020542161539196968, -0.0011948622995987535, -0.029890026897192, 0.01750783808529377, -0.016322458162903786, -0.01943482831120491, -0.028664320707321167, -0.006533198524266481, 0.011579069308936596, -0.10457875579595566, -0.01872515305876732, -0.01424979604780674, -0.0027108166832476854, -0.023919258266687393, 0.8628982901573181, 0.004634862765669823, -0.0058792526833713055, 0.01673952303826809, -0.007562083657830954, 0.003348106052726507, 0.007106909994035959, 0.024464445188641548, 0.01758621074259281, 0.01696610078215599, -0.021428856998682022, -0.019488753750920296, 0.03287723287940025, 0.003487952286377549, 0.0004859005566686392, 0.00997982732951641, 0.026929490268230438, 0.010387449525296688, -0.019569307565689087, -0.02690497599542141, 0.002333640353754163, 0.008759843185544014, 0.022080186754465103, 0.013636655174195766, 0.021514656022191048, 0.010738812386989594, -0.18658189475536346, -0.0016349444631487131, -7.499173474930296e-33, 0.06710858643054962, 0.00604005204513669, 0.013632714748382568, 0.0170188769698143, -0.009156529791653156, -0.008653867989778519, 0.024188967421650887, 0.0037096452433615923, -0.024543138220906258, -0.027561696246266365, -0.0005250140093266964, -0.01547512598335743, -0.005807721056044102, 0.0015864777378737926, 0.05440107360482216, 0.01286922674626112, -0.009672608226537704, 0.0016024804208427668, -0.0005128802149556577, 0.02104969136416912, 0.004005864262580872, 0.012575195170938969, -0.01888986863195896, 0.01855863630771637, 0.018556810915470123, 0.019822102040052414, 0.03449885919690132, 0.006401581224054098, -0.019316188991069794, -0.03988941013813019, -0.04473238065838814, 0.008614232763648033, -0.01462821289896965, -0.02715865708887577, 0.004867597483098507, -0.042570628225803375, -0.022488148882985115, 0.015110770240426064, -0.0016183966072276235, -0.026320533826947212, -0.028935683891177177, -0.01285734586417675, -0.04003830626606941, -0.00885644182562828, -0.011963860131800175, 0.0023724606726318598, 0.009706217795610428, 0.01901458390057087, -0.004592034500092268, 0.02579948492348194, -0.010194465517997742, 0.013014497235417366, 0.007968942634761333, 0.02246159315109253, 0.0031674758065491915, -0.004322323482483625, -0.006029949523508549, -0.0037131996359676123, -0.01819266751408577, 0.01800522580742836, 0.058073900640010834, 0.009890247136354446, -0.013878004625439644, 0.04855426028370857, 0.0017601295839995146, -0.003149269847199321, 0.026247961446642876, 0.016849815845489502, 0.028581902384757996, -0.0029721444007009268, -0.054075539112091064, 0.02862350083887577, -0.011082978919148445, -0.03397425636649132, -0.002425314160063863, -0.02734103612601757, -0.01881559193134308, 0.017342127859592438, -0.0010421229526400566, 0.0608370341360569, 0.0018194167641922832, -0.01293900702148676, 0.012200843542814255, -0.04087363928556442, -0.03369733691215515, 0.010916555300354958, 0.03981335833668709, -0.017845654860138893, -0.002082513179630041, 0.009138274006545544, 0.024471251294016838, 0.01783774420619011, -0.019659973680973053, 0.001722589717246592, -0.018699027597904205, 7.14423883317126e-33, 0.04364708065986633, -0.00844113714993, -0.03196830302476883, 0.011013315059244633, 0.02146313525736332, -0.01843731477856636, 0.02497330866754055, 0.016827814280986786, -0.046113088726997375, 0.005043980199843645, -0.022650182247161865, -0.010183270089328289, -0.012620687484741211, -0.008708843030035496, 0.05243154615163803, -0.03708771616220474, -0.00641062343493104, -0.02261044830083847, 0.007329128682613373, 0.005780583713203669, -0.006755762733519077, 0.015166250057518482, 0.00956979114562273, -0.012646707706153393, 0.020274387672543526, 0.04460536316037178, 0.0032922374084591866, 0.024577392265200615, -0.021071670576930046, 0.008521350100636482, 0.006031070835888386, -0.02879340760409832, 0.009748286567628384, -0.004839242901653051, -0.026609929278492928, 0.016732679679989815, -0.0025563151575624943, 0.009938686154782772, -0.0020322883501648903, 0.013244803063571453, 0.04660102352499962, 0.019505484029650688, 0.005475837271660566, 0.031190350651741028, -0.022476615384221077, -0.011538738384842873, -0.014284120872616768, -0.026227472350001335, 0.0004105221596546471, -0.01150837354362011, -0.0032582420390099287, -0.006754553411155939, -0.008120426908135414, -0.0023668548092246056, 0.0010063661029562354, -0.021178249269723892, -0.031331416219472885, 0.006143088918179274, 0.018589098006486893, 0.019261375069618225, -0.018988346680998802, -0.005833611823618412, -0.04174956679344177, 0.0026049797888845205, -0.019861917942762375, -0.02536090835928917, -0.018486708402633667, 0.00007832758274162188, -0.0024673251900821924, 0.02967921458184719, -0.017692213878035545, 0.02003311924636364, 0.006332338787615299, 0.023894838988780975, 0.00884490180760622, -0.020912211388349533, -0.0192659180611372, 0.029000746086239815, -0.014970561489462852, 0.014898455701768398, 0.013731610961258411, -0.005110589787364006, 0.029495110735297203, 0.007440339773893356, -0.01684081368148327, 0.04920247197151184, -0.02376057207584381, 0.011311696842312813, -0.023715045303106308, -0.02961779572069645, -0.001484136562794447, -0.03315579146146774, -0.0024870657362043858, 0.011336981318891048, -0.011701385490596294, -1.3360422101982294e-8, -0.03606409579515457, 0.025394942611455917, -0.021539581939578056, 0.012644270434975624, 0.021770969033241272, 0.027321383357048035, -0.016451159492135048, 0.020245814695954323, -0.024542003870010376, 0.015148808248341084, 0.043043576180934906, -0.02687670849263668, -0.009644517675042152, -0.00945962406694889, 0.004155851434916258, -0.028792791068553925, -0.001090283622033894, 0.0354975201189518, 0.03248456493020058, 0.0029308972880244255, 0.05031195282936096, 0.02403279021382332, -0.0017936702352017164, 0.010371588170528412, -0.008828096091747284, 0.018104249611496925, -0.009657710790634155, -0.0766424834728241, 0.010046016424894333, 0.0052794464863836765, -0.0022976419422775507, -0.02989518828690052, 0.004831687547266483, 0.017225444316864014, 0.008413302712142467, -0.05599227175116539, -0.018176725134253502, 0.016912488266825676, -0.01386404037475586, 0.0022433230187743902, -0.03305014595389366, 0.0061950162053108215, -0.001084925839677453, -0.019265538081526756, -0.019050119444727898, 0.020552504807710648, -0.019373906776309013, -0.03439154475927353, 0.010792084969580173, -0.005974939092993736, 0.007366520818322897, -0.032221470028162, 0.03126122057437897, 0.06366188824176788, 0.033318087458610535, -0.024609966203570366, 0.03340611234307289, -0.038759976625442505, -0.04475861415266991, 0.01805240288376808, 0.024460505694150925, 0.022346779704093933, -0.03584194555878639, 0.00909875426441431 ]
badass-making-users-awesome-kathy-sierra-book-review
https://markhneedham.com/blog/2015/03/20/badass-making-users-awesome-kathy-sierra-book-review
false
2015-03-27 06:59:02
Neo4j: Generating real time recommendations with Cypher
[ "neo4j" ]
[ "neo4j" ]
One of the most common uses of Neo4j is for building real time recommendation engines and a common theme is that they make use of lots of different bits of data to come up with an interesting recommendation. For example https://vimeo.com/86754045[in this video] https://twitter.com/pandamonial[Amanda] shows how dating websites build real time recommendation engines by starting with social connections and then introducing passions, location and a few other things. Graph Aware have a https://github.com/graphaware/neo4j-reco#using-graphaware-neo4j-recommendation-engine[neat framework] that helps you to build your own recommendation engine using Java and I was curious what a Cypher version would look like. This is the sample graph: [source,cypher] ---- CREATE (m:Person:Male {name:'Michal', age:30}), (d:Person:Female {name:'Daniela', age:20}), (v:Person:Male {name:'Vince', age:40}), (a:Person:Male {name:'Adam', age:30}), (l:Person:Female {name:'Luanne', age:25}), (c:Person:Male {name:'Christophe', age:60}), (lon:City {name:'London'}), (mum:City {name:'Mumbai'}), (m)-[:FRIEND_OF]->(d), (m)-[:FRIEND_OF]->(l), (m)-[:FRIEND_OF]->(a), (m)-[:FRIEND_OF]->(v), (d)-[:FRIEND_OF]->(v), (c)-[:FRIEND_OF]->(v), (d)-[:LIVES_IN]->(lon), (v)-[:LIVES_IN]->(lon), (m)-[:LIVES_IN]->(lon), (l)-[:LIVES_IN]->(mum); ---- We want to recommend some potential friends to 'Adam' so the first layer of our query is to find his friends of friends as there are bound to be some potential friends amongst them: [source,cypher] ---- MATCH (me:Person {name: "Adam"}) MATCH (me)-[:FRIEND_OF]-()-[:FRIEND_OF]-(potentialFriend) RETURN me, potentialFriend, COUNT(*) AS friendsInCommon ==> +--------------------------------------------------------------------------------------+ ==> | me | potentialFriend | friendsInCommon | ==> +--------------------------------------------------------------------------------------+ ==> | Node[1007]{name:"Adam",age:30} | Node[1006]{name:"Vince",age:40} | 1 | ==> | Node[1007]{name:"Adam",age:30} | Node[1005]{name:"Daniela",age:20} | 1 | ==> | Node[1007]{name:"Adam",age:30} | Node[1008]{name:"Luanne",age:25} | 1 | ==> +--------------------------------------------------------------------------------------+ ==> 3 rows ---- This query gives us back a list of potential friends and how many friends we have in common. Now that we've got some potential friends let's start building a ranking for each of them. One indicator which could weigh in favour of a potential friend is if they live in the same location as us so let's add that to our query: [source,cypher] ---- MATCH (me:Person {name: "Adam"}) MATCH (me)-[:FRIEND_OF]-()-[:FRIEND_OF]-(potentialFriend) WITH me, potentialFriend, COUNT(*) AS friendsInCommon RETURN me, potentialFriend, SIZE((potentialFriend)-[:LIVES_IN]->()<-[:LIVES_IN]-(me)) AS sameLocation ==> +-----------------------------------------------------------------------------------+ ==> | me | potentialFriend | sameLocation | ==> +-----------------------------------------------------------------------------------+ ==> | Node[1007]{name:"Adam",age:30} | Node[1006]{name:"Vince",age:40} | 0 | ==> | Node[1007]{name:"Adam",age:30} | Node[1005]{name:"Daniela",age:20} | 0 | ==> | Node[1007]{name:"Adam",age:30} | Node[1008]{name:"Luanne",age:25} | 0 | ==> +-----------------------------------------------------------------------------------+ ==> 3 rows ---- Next we'll check whether Adams' potential friends have the same gender as him by comparing the labels each node has. We've got 'Male' and 'Female' labels which indicate gender. [source,cypher] ---- MATCH (me:Person {name: "Adam"}) MATCH (me)-[:FRIEND_OF]-()-[:FRIEND_OF]-(potentialFriend) WITH me, potentialFriend, COUNT(*) AS friendsInCommon RETURN me, potentialFriend, SIZE((potentialFriend)-[:LIVES_IN]->()<-[:LIVES_IN]-(me)) AS sameLocation, LABELS(me) = LABELS(potentialFriend) AS gender ==> +--------------------------------------------------------------------------------------------+ ==> | me | potentialFriend | sameLocation | gender | ==> +--------------------------------------------------------------------------------------------+ ==> | Node[1007]{name:"Adam",age:30} | Node[1006]{name:"Vince",age:40} | 0 | true | ==> | Node[1007]{name:"Adam",age:30} | Node[1005]{name:"Daniela",age:20} | 0 | false | ==> | Node[1007]{name:"Adam",age:30} | Node[1008]{name:"Luanne",age:25} | 0 | false | ==> +--------------------------------------------------------------------------------------------+ ==> 3 rows ---- Next up let's calculate the age different between Adam and his potential friends: [source,cypher] ---- MATCH (me:Person {name: "Adam"}) MATCH (me)-[:FRIEND_OF]-()-[:FRIEND_OF]-(potentialFriend) WITH me, potentialFriend, COUNT(*) AS friendsInCommon RETURN me, potentialFriend, SIZE((potentialFriend)-[:LIVES_IN]->()<-[:LIVES_IN]-(me)) AS sameLocation, abs( me.age - potentialFriend.age) AS ageDifference, LABELS(me) = LABELS(potentialFriend) AS gender, friendsInCommon ==> +------------------------------------------------------------------------------------------------------------------------------+ ==> | me | potentialFriend | sameLocation | ageDifference | gender | friendsInCommon | ==> +------------------------------------------------------------------------------------------------------------------------------+ ==> | Node[1007]{name:"Adam",age:30} | Node[1006]{name:"Vince",age:40} | 0 | 10.0 | true | 1 | ==> | Node[1007]{name:"Adam",age:30} | Node[1005]{name:"Daniela",age:20} | 0 | 10.0 | false | 1 | ==> | Node[1007]{name:"Adam",age:30} | Node[1008]{name:"Luanne",age:25} | 0 | 5.0 | false | 1 | ==> +------------------------------------------------------------------------------------------------------------------------------+ ==> 3 rows ---- Now let's do some filtering to get rid of people that Adam is already friends with - there wouldn't be much point in recommending those people! [source,cypher] ---- MATCH (me:Person {name: "Adam"}) MATCH (me)-[:FRIEND_OF]-()-[:FRIEND_OF]-(potentialFriend) WITH me, potentialFriend, COUNT(*) AS friendsInCommon WITH me, potentialFriend, SIZE((potentialFriend)-[:LIVES_IN]->()<-[:LIVES_IN]-(me)) AS sameLocation, abs( me.age - potentialFriend.age) AS ageDifference, LABELS(me) = LABELS(potentialFriend) AS gender, friendsInCommon WHERE NOT (me)-[:FRIEND_OF]-(potentialFriend) RETURN me, potentialFriend, SIZE((potentialFriend)-[:LIVES_IN]->()<-[:LIVES_IN]-(me)) AS sameLocation, abs( me.age - potentialFriend.age) AS ageDifference, LABELS(me) = LABELS(potentialFriend) AS gender, friendsInCommon ==> +------------------------------------------------------------------------------------------------------------------------------+ ==> | me | potentialFriend | sameLocation | ageDifference | gender | friendsInCommon | ==> +------------------------------------------------------------------------------------------------------------------------------+ ==> | Node[1007]{name:"Adam",age:30} | Node[1006]{name:"Vince",age:40} | 0 | 10.0 | true | 1 | ==> | Node[1007]{name:"Adam",age:30} | Node[1005]{name:"Daniela",age:20} | 0 | 10.0 | false | 1 | ==> | Node[1007]{name:"Adam",age:30} | Node[1008]{name:"Luanne",age:25} | 0 | 5.0 | false | 1 | ==> +------------------------------------------------------------------------------------------------------------------------------+ ==> 3 rows ---- In this case we haven't actually filtered anyone out but for some of the other people we would see a reduction in the number of potential friends. Our final step is to come up with a score for each of the features that we've identified as being important for making a friend suggestion. We'll assign a score of 10 if the people live in the same location or have the same gender as Adam and 0 if not. For the ageDifference and friendsInCommon we'll apply apply a log curve so that those values don't have a disproportional effect on our final score. We'll use the formula defined in the +++<cite>+++https://github.com/graphaware/neo4j-reco/blob/master/src/main/java/com/graphaware/reco/generic/transform/ParetoScoreTransformer.java#L64[ParetoScoreTransfomer]+++</cite>+++ to do this: [source,java] ---- public <OUT> float transform(OUT item, float score) { if (score < minimumThreshold) { return 0; } double alpha = Math.log((double) 5) / eightyPercentLevel; double exp = Math.exp(-alpha * score); return new Double(maxScore * (1 - exp)).floatValue(); } ---- And now for our completed recommendation query: [source,cypher] ---- MATCH (me:Person {name: "Adam"}) MATCH (me)-[:FRIEND_OF]-()-[:FRIEND_OF]-(potentialFriend) WITH me, potentialFriend, COUNT(*) AS friendsInCommon WITH me, potentialFriend, SIZE((potentialFriend)-[:LIVES_IN]->()<-[:LIVES_IN]-(me)) AS sameLocation, abs( me.age - potentialFriend.age) AS ageDifference, LABELS(me) = LABELS(potentialFriend) AS gender, friendsInCommon WHERE NOT (me)-[:FRIEND_OF]-(potentialFriend) WITH potentialFriend, // 100 -> maxScore, 10 -> eightyPercentLevel, friendsInCommon -> score (from the formula above) 100 * (1 - exp((-1.0 * (log(5.0) / 10)) * friendsInCommon)) AS friendsInCommon, sameLocation * 10 AS sameLocation, -1 * (10 * (1 - exp((-1.0 * (log(5.0) / 20)) * ageDifference))) AS ageDifference, CASE WHEN gender THEN 10 ELSE 0 END as sameGender RETURN potentialFriend, {friendsInCommon: friendsInCommon, sameLocation: sameLocation, ageDifference:ageDifference, sameGender: sameGender} AS parts, friendsInCommon + sameLocation + ageDifference + sameGender AS score ORDER BY score DESC ==> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | potentialFriend | parts | score | ==> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | Node[1006]{name:"Vince",age:40} | {friendsInCommon -> 14.86600774792154, sameLocation -> 0, ageDifference -> -5.52786404500042, sameGender -> 10} | 19.33814370292112 | ==> | Node[1008]{name:"Luanne",age:25} | {friendsInCommon -> 14.86600774792154, sameLocation -> 0, ageDifference -> -3.312596950235779, sameGender -> 0} | 11.55341079768576 | ==> | Node[1005]{name:"Daniela",age:20} | {friendsInCommon -> 14.86600774792154, sameLocation -> 0, ageDifference -> -5.52786404500042, sameGender -> 0} | 9.33814370292112 | ==> +-------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ---- The final query isn't too bad - the only really complex bit is the log curve calculation. This is where user defined functions will come into their own in the future. The nice thing about this approach is that we don't have to step outside of cypher so if you're not comfortable with Java you can still do real time recommendations! On the other hand, the different parts of the recommendation engine all get mixed up so it's not as easy to see the whole pipeline as if you use the graph aware framework. The next step is to apply this to the http://www.markhneedham.com/blog/2015/03/11/pythonneo4j-finding-interesting-computer-sciency-people-to-follow-on-twitter/[Twitter graph] and come up with follower recommendations on there.
null
null
[ 0.047745853662490845, 0.004005057737231255, 0.011683350428938866, 0.04792146757245064, 0.08601230382919312, 0.009524336084723473, 0.03576052561402321, 0.03485571965575218, 0.03585520759224892, -0.008802177384495735, -0.00972266960889101, -0.006620170548558235, -0.05949316918849945, 0.01843775250017643, -0.029679490253329277, 0.054019760340452194, 0.06044134870171547, 0.02774977497756481, 0.021170610561966896, -0.007789031136780977, 0.024158628657460213, 0.050494689494371414, 0.01604449190199375, 0.056574929505586624, 0.04481494054198265, 0.008677462115883827, 0.009647832252085209, 0.010191102512180805, -0.031021447852253914, 0.010319034568965435, 0.04963573440909386, 0.017813824117183685, 0.0025601647794246674, -0.010951464995741844, 0.022493664175271988, -0.030627988278865814, -0.05481046810746193, 0.0009527083020657301, -0.010736278258264065, 0.021665353327989578, -0.06006331741809845, 0.027991613373160362, -0.0055613163858652115, 0.016525208950042725, -0.04809146374464035, -0.007132700644433498, -0.06265678256750107, 0.05215540528297424, 0.03732962906360626, 0.011592107824981213, -0.07646992802619934, 0.03372373431921005, -0.010229342617094517, 0.009900668635964394, -0.015015378594398499, 0.03502379730343819, 0.049184706062078476, -0.061084501445293427, 0.03843477740883827, -0.01606130227446556, 0.010491798631846905, -0.00018674797320272774, 0.015299529768526554, 0.01737307198345661, -0.00486554391682148, -0.04956257343292236, -0.008654015138745308, 0.0564437210559845, -0.029827715829014778, 0.0001326210767729208, -0.01640637218952179, 0.011232316493988037, -0.025892261415719986, -0.005854935850948095, -0.015372885391116142, -0.029040507972240448, 0.011486065573990345, 0.052721042186021805, 0.025850823149085045, 0.0512394979596138, -0.02239299938082695, 0.02234879694879055, -0.006239538546651602, 0.030459005385637283, -0.01861603744328022, -0.022516056895256042, -0.003342453623190522, -0.03606583550572395, -0.08039297163486481, 0.021960962563753128, -0.01770312711596489, -0.056722380220890045, -0.0019987495616078377, 0.01001038495451212, -0.01751055009663105, 0.009126892313361168, 0.020946111530065536, -0.027153341099619865, 0.02188783511519432, -0.031240927055478096, -0.029888296499848366, -0.02899586223065853, -0.01035017054527998, -0.010192172601819038, -0.08218538016080856, -0.03545543551445007, -0.012615656480193138, -0.010425856336951256, -0.00817553885281086, -0.008847886696457863, -0.020864181220531464, 0.0040048700757324696, -0.009100893512368202, 0.03683057054877281, -0.06831758469343185, 0.06172442436218262, 0.0034171894658356905, -0.014028511010110378, -0.032959576696157455, 0.008221624419093132, 0.04696603864431381, 0.018825845792889595, -0.0076390597969293594, 0.07471057772636414, -0.025498181581497192, 0.038797300308942795, 0.016956934705376625, 0.051774442195892334, -0.01721993088722229, -0.07110702246427536, -0.0102533008903265, 0.045084476470947266, -0.01734786294400692, -0.0019909527618438005, -0.019171414896845818, -0.05462547019124031, -0.014766676351428032, 0.019773274660110474, 0.055739812552928925, 0.02729111909866333, 0.015476866625249386, -0.05955786257982254, 0.03420264273881912, -0.018539179116487503, 0.038234811276197433, 0.0002162364253308624, -0.010132540948688984, -0.03376799449324608, -0.03144561126828194, -0.021061845123767853, 0.019689781591296196, 0.04119369387626648, 0.032807447016239166, -0.039372172206640244, 0.021546658128499985, 0.10995227843523026, 0.021685093641281128, -0.0004598389205057174, -0.006756980903446674, 0.02593335136771202, 0.054176319390535355, 0.014714345335960388, -0.001485228887759149, 0.03484755754470825, 0.01875760219991207, -0.023578397929668427, 0.004832447040826082, 0.07058343291282654, -0.014996994286775589, 0.023716261610388756, -0.045866016298532486, -0.027427855879068375, 0.046761251986026764, -0.048753540962934494, -0.025940630584955215, 0.06375029683113098, 0.06880094110965729, 0.0375128872692585, 0.010778238996863365, 0.011964768171310425, -0.07516974210739136, 0.05188090726733208, 0.01972055435180664, -0.008459914475679398, 0.017449427396059036, 0.020885635167360306, 0.06880863010883331, 0.03290443867444992, -0.014357686042785645, 0.030762314796447754, -0.0708044171333313, -0.06550388783216476, -0.0308496356010437, -0.010602535679936409, 0.06556660681962967, -0.028611740097403526, 0.02753700502216816, 0.0417935773730278, 0.02604912407696247, 0.0311043169349432, 0.008710697293281555, -0.02257537469267845, 0.011353781446814537, -0.021607721224427223, -0.05741092190146446, 0.02634342573583126, 0.021964997053146362, -0.0701991617679596, -0.049590516835451126, 0.016706470400094986, -0.02009108103811741, -0.012082790955901146, 0.027858242392539978, -0.04137960821390152, 0.02144237607717514, 0.023855186998844147, 0.04017195850610733, -0.0029387949034571648, 0.005111847072839737, -0.03037760779261589, 0.021906640380620956, -0.0145528893917799, -0.03139817714691162, -0.0028774726670235395, 0.0040489062666893005, 0.10880747437477112, 0.04817279428243637, -0.04521068558096886, -0.06440481543540955, 0.04946065694093704, 0.01616302691400051, -0.01958843320608139, 0.045408133417367935, -0.01739393174648285, 0.0069306897930800915, -0.010158594697713852, -0.03528837114572525, -0.013696666806936264, 0.016313405707478523, -0.0474574938416481, -0.009285430423915386, 0.06935134530067444, -0.04755748063325882, 0.054105281829833984, -0.0010978723876178265, 0.010107940062880516, 0.008248607628047466, -0.044026702642440796, -0.039863090962171555, 0.04939205199480057, 0.020251439884305, -0.014274416491389275, 0.056952640414237976, -0.023021692410111427, -0.005772711243480444, -0.03843558952212334, -0.00958718080073595, 0.05540483817458153, 0.0531129390001297, 0.044104695320129395, 0.01107105240225792, 0.03903849795460701, -0.04018755629658699, 0.024614179506897926, -0.009206900373101234, -0.05947276949882507, -0.03179250657558441, -0.06715815514326096, 0.006235787644982338, 0.018845826387405396, 0.019346758723258972, -0.02804795280098915, 0.03921113535761833, 0.01806068979203701, 0.023702384904026985, 0.008927995339035988, 0.04036921635270119, 0.012833581306040287, 0.0008488221210427582, -0.03324849158525467, -0.02873842604458332, 0.07518820464611053, -0.04361174255609512, -0.049112241715192795, -0.026426510885357857, -0.056491319090127945, 0.046489547938108444, -0.027310671284794807, -0.03901468589901924, -0.01233131717890501, 0.019071798771619797, 0.04255244508385658, 0.016718672588467598, 0.006462849676609039, 0.06158839166164398, 0.012564529664814472, 0.025641804561018944, 0.02560238353908062, -0.014852223917841911, 0.0429997444152832, -0.030104100704193115, 0.05558579042553902, 0.05441984534263611, -0.0284461360424757, 0.004576432518661022, 0.0016422637272626162, 0.035639677196741104, -0.015497224405407906, -0.2633315324783325, 0.033101677894592285, -0.023111015558242798, -0.05187441408634186, 0.01091593224555254, -0.032045669853687286, 0.011173814535140991, -0.031135184690356255, -0.01998673938214779, -0.00004765660924022086, -0.008620727807283401, -0.02445104718208313, -0.03039216250181198, 0.030227309092879295, 0.00033713190350681543, 0.011407321318984032, -0.017803747206926346, -0.05552088841795921, -0.0036394824273884296, 0.04011289402842522, -0.0006519879098050296, -0.04286058992147446, -0.03974536433815956, 0.024128640070557594, 0.00826897844672203, 0.027714183554053307, -0.0941261276602745, 0.006814280059188604, -0.05861395224928856, -0.01854810304939747, -0.005076033063232899, -0.021851014345884323, 0.012401252053678036, 0.007933557964861393, -0.013418657705187798, -0.02315487712621689, 0.06679884344339371, -0.001977253705263138, 0.009196442551910877, 0.02040214277803898, -0.044901732355356216, -0.03258982300758362, -0.027589203789830208, 0.009673823602497578, 0.08338987827301025, 0.008977770805358887, -0.0827389508485794, -0.002576542319729924, 0.0007939464994706213, 0.04596979543566704, -0.043280720710754395, -0.03986134007573128, -0.0010732520604506135, 0.035490524023771286, -0.005373341962695122, -0.031216178089380264, 0.009852555580437183, 0.005889160558581352, -0.04877965897321701, -0.05140741541981697, -0.02124667726457119, -0.023851361125707626, 0.02321205846965313, -0.0681995153427124, -0.02165420539677143, -0.06493494659662247, -0.08318235725164413, -0.02952192910015583, 0.04903779923915863, 0.00040169942076317966, -0.03275110945105553, 0.04278747737407684, 0.000035459917853586376, -0.11487226188182831, -0.02157137170433998, -0.034477561712265015, 0.01104629784822464, 0.020462611690163612, -0.004884845577180386, 0.05898285657167435, -0.03585869446396828, -0.0448911115527153, -0.005070587154477835, 0.00805626530200243, 0.026347946375608444, 0.007503288798034191, 0.03272645175457001, -0.0194550734013319, -0.02824856899678707, -0.007145895157009363, 0.07102815061807632, -0.003725762479007244, -0.037989985197782516, -0.010176442563533783, 0.01088207308202982, 0.038198601454496384, -0.00025578378699719906, 0.00781768187880516, 0.014610125683248043, 0.06299500167369843, 0.04905951768159866, -0.02346167340874672, 0.014874858781695366, -0.001962806098163128, -0.00476599158719182, -0.02179422229528427, -0.049182113260030746, 0.023597700521349907, 0.03175756335258484, 0.012521707452833652, 0.009181130677461624, 0.005719982553273439, 0.004578552208840847, -0.04437081143260002, -0.039368197321891785, -0.03258064389228821, 0.012303155846893787, 0.035825733095407486, 0.046313490718603134, -0.01022530347108841, -0.057294901460409164, 0.02921133115887642, 0.017601734027266502, 0.0017992558423429728, -0.07690586894750595, -0.042777907103300095, -0.03863983973860741, -0.032165657728910446, -0.00980415940284729, 0.027477091178297997, -0.020293977111577988, 0.0519208088517189, -0.0013670057523995638, -0.029092682525515556, 0.05035959184169769, -0.009688391350209713, -0.024969620630145073, -0.027012765407562256, 0.025075405836105347, -0.022818518802523613, -0.023080933839082718, 0.013711510226130486, 0.007809886243194342, 0.02591661736369133, 0.03048715367913246, 0.010530426166951656, 0.01935373805463314, 0.011879982426762581, 0.023585807532072067, -0.010397130623459816, -0.017294874414801598, -0.04602613300085068, 0.004297134932130575, -0.02758280374109745, -0.008489630185067654, -0.024968527257442474, 0.05365362763404846, -0.021777009591460228, -0.04334817826747894, -0.019299698993563652, 0.026042761281132698, -0.055840782821178436, 0.005176958162337542, -0.020208513364195824, 0.012770039960741997, 0.06855621188879013, -0.016222435981035233, 0.015360708348453045, -0.017173592001199722, -0.02756740152835846, 0.01714102178812027, 0.013285110704600811, -0.05792982876300812, -0.005976745393127203, 0.013281306251883507, -0.019200412556529045, -0.015024088323116302, 0.033644113689661026, 0.014848745428025723, 0.03086508996784687, -0.019551023840904236, -0.007690778933465481, 0.010091640055179596, -0.0018517086282372475, 0.0475444532930851, 0.03373188152909279, -0.03399943187832832, 0.010235070250928402, -0.024343250319361687, -0.014514777809381485, -0.023540955036878586, 0.012867492623627186, -0.021447215229272842, -0.006160098593682051, -0.03427271917462349, -0.053548045456409454, 0.04903729632496834, -0.007948224432766438, 0.0058143106289207935, 0.03609654679894447, -0.008360303938388824, 0.008014008402824402, -0.03397611901164055, 0.05012604966759682, 0.06251603364944458, -0.05707620084285736, 0.00634921807795763, 0.0000809631310403347, -0.015158065594732761, 0.006055860314518213, 0.015937678515911102, -0.06855791807174683, -0.02066575549542904, -0.03347732126712799, 0.02560589276254177, -0.056849148124456406, -0.05766214430332184, -0.021212933585047722, -0.0017234941478818655, -0.0026662542950361967, 0.035766635090112686, 0.0017697600414976478, -0.0008741146884858608, -0.016463307663798332, -0.013458526693284512, 0.03452073782682419, -0.032392002642154694, 0.012314238585531712, 0.008705834858119488, -0.0367196686565876, 0.00991393718868494, 0.00018321487004868686, 0.007608265150338411, 0.017025019973516464, -0.028597092255949974, -0.004835115280002356, -0.07342425733804703, 0.02561107464134693, 0.03275708854198456, 0.04141279682517052, 0.0029179847333580256, 0.006928483955562115, -0.0664018988609314, -0.0074318586848676205, -0.030290722846984863, 0.014574671164155006, -0.019229084253311157, 0.0021786722354590893, -0.0003037966671399772, 0.015347035601735115, 0.008638209663331509, 0.01818593218922615, -0.014420317485928535, -0.017203127965331078, 0.04974021762609482, -0.05005891993641853, -0.03896482661366463, -0.0155909089371562, -0.05246812477707863, -0.0003886317426804453, 0.021227244287729263, 0.008564543910324574, -0.025444336235523224, 0.045516710728406906, 0.05291757732629776, 0.04148774966597557, 0.015762940049171448, -0.005328400991857052, 0.030140964314341545, -0.021356044337153435, -0.00028449742239899933, -0.06285741925239563, 0.012538759037852287, 0.03761105239391327, 0.009366239421069622, 0.005051172338426113, -0.020111972466111183, -0.002769450657069683, 0.022749297320842743, -0.0711483284831047, -0.02285129763185978, 0.03558184579014778, -0.025869598612189293, 0.007749361451715231, 0.004130428656935692, -0.03700634464621544, 0.00842069461941719, 0.04649879038333893, -0.05501130223274231, -0.01964617893099785, -0.020249390974640846, 0.05929681286215782, -0.034470535814762115, 0.04277416318655014, -0.014507107436656952, -0.017461294308304787, 0.062421612441539764, 0.02931329794228077, 0.017101667821407318, 0.05184127390384674, 0.0023194814566522837, 0.03254207596182823, 0.03532400727272034, 0.006852331571280956, 0.008440926671028137, 0.024069465696811676, 0.002849420066922903, -0.04322628304362297, 0.03342968598008156, -0.0005508516915142536, -0.05149883031845093, -0.05080586299300194, 0.07373084127902985, 0.05330736190080643, -0.04296121373772621, -0.02419940009713173, 0.038393378257751465, -0.014379629865288734, 0.010493829846382141, -0.034282244741916656, 0.006887301802635193, -0.05119127780199051, 0.05679261311888695, -0.021057667210698128, 0.024422796443104744, 0.058280304074287415, -0.014980556443333626, -0.013814781792461872, -0.011279065161943436, 0.1021210327744484, 0.09225893765687943, 0.06438660621643066, 0.005759900435805321, 0.07566258311271667, 0.02499585598707199, -0.04323408380150795, -0.014803234487771988, -0.009117068722844124, -0.023406142368912697, 0.011631703935563564, 0.016571732237935066, 0.0570637471973896, -0.029419055208563805, 0.07088705897331238, -0.015161137096583843, -0.016261650249361992, 0.012590860947966576, -0.006419983226805925, 0.04451256990432739, 0.05095824971795082, 0.0067464616149663925, 0.045707542449235916, -0.04524857550859451, -0.031946972012519836, 0.0138038769364357, -0.012572228908538818, -0.01619478315114975, 0.03601658344268799, -0.012499138712882996, 0.021545784547924995, 0.004364814143627882, 0.053719740360975266, 0.09186559915542603, -0.03194916993379593, 0.01100869569927454, -0.008047972805798054, -0.006657049525529146, -0.028746716678142548, 0.007260272279381752, -0.023305358365178108, -0.015369526110589504, -0.019416673108935356, -0.03875576704740524, -0.03571666032075882, -0.021778730675578117, -0.02853851020336151, -0.01057734526693821, -0.04061216861009598, -0.017968136817216873, -0.012947695329785347, -0.013298858888447285, -0.02801418863236904, -0.03917131572961807, -0.025255007669329643, -0.05766114592552185, -0.08158078789710999, 0.0035625568125396967, 0.015606951899826527, -0.01028361264616251, -0.039684902876615524, 0.005432746838778257, -0.0023986243177205324, -0.01921219751238823, 0.05497131496667862, -0.08081125468015671, -0.006299533881247044, 0.0050468845292925835, 0.019128000363707542, 0.0345110222697258, 0.016485141590237617, 0.035773344337940216, 0.017551640048623085, -0.008452779613435268, -0.009457457810640335, 0.006765633821487427, 0.040207065641880035, 0.018111051991581917, -0.008221657015383244, -0.08593077212572098, -0.020009640604257584, 0.024862617254257202, -0.04930830001831055, -0.08370443433523178, -0.00311879999935627, 0.03458287566900253, 0.03902221843600273, 0.03202072158455849, -0.007330127060413361, -0.02715134061872959, -0.028762707486748695, 0.008996846154332161, 0.008404459804296494, 0.0060500516556203365, 0.028847716748714447, -0.0292290560901165, 0.09361496567726135, 0.02841579169034958, -0.04151471331715584, -0.02846476621925831, -0.016669608652591705, 0.004091647919267416, -0.0024506894405931234, -0.04242886230349541, -0.0321345180273056, -0.02909575216472149, -0.10188311338424683, -0.02662593498826027, 0.01857324317097664, -0.011867184191942215, -0.015886658802628517, 0.00501237390562892, 0.030273541808128357, -0.0004287436022423208, 0.02858543023467064, -0.06826213747262955, 0.038319576531648636, -0.03093511052429676, 0.0037450138479471207, -0.04039851576089859, 0.010641682893037796, -0.015768032521009445, 0.00034822148154489696, -0.0009296010830439627, -0.042081158608198166, -0.012899420224130154, -0.030223645269870758, 0.05264663323760033, 0.0069968621246516705, 0.028897970914840698, 0.013025100342929363 ]
[ -0.05018674582242966, -0.010377833619713783, -0.05486422777175903, -0.029277147725224495, 0.033294111490249634, 0.0017810342833399773, -0.012018687091767788, 0.02471499890089035, 0.005760903004556894, -0.04260600730776787, 0.038942012935876846, -0.022404219955205917, 0.0009498111321590841, 0.016545286402106285, 0.08568353950977325, 0.02800668030977249, 0.008484828285872936, -0.06757337599992752, -0.026011044159531593, 0.03180795907974243, 0.005196838639676571, -0.02559446543455124, -0.02144223265349865, -0.03480419144034386, -0.004476333037018776, 0.0137229785323143, 0.039754778146743774, -0.026221467182040215, -0.026341207325458527, -0.1643202155828476, 0.015484480187296867, 0.04200442507863045, 0.05545955151319504, 0.019295936450362206, -0.024610275402665138, 0.021881291642785072, 0.04656209796667099, -0.003122154390439391, -0.011228913441300392, 0.027419960126280785, 0.008789878338575363, -0.0017456917557865381, -0.01810338906943798, -0.01471687015146017, 0.06857776641845703, 0.04142659902572632, -0.019582856446504593, 0.007786255329847336, -0.05209679901599884, 0.01693739928305149, -0.03113134391605854, -0.03125372529029846, -0.0009448969503864646, 0.007410034537315369, 0.017918797209858894, 0.05130540207028389, 0.05396882817149162, 0.05208390951156616, -0.0074625625275075436, 0.03366624191403389, 0.012057115323841572, -0.0077507998794317245, -0.10231184214353561, 0.06344173848628998, -0.016364334151148796, 0.013620855286717415, -0.05409101024270058, -0.0034828330390155315, -0.037402279675006866, 0.08115524798631668, 0.050115521997213364, -0.0021126221399754286, -0.03642633557319641, 0.040769513696432114, -0.00677269184961915, 0.02704128436744213, 0.0015713938046246767, 0.017124054953455925, 0.01434826198965311, -0.015428392216563225, -0.042210232466459274, 0.03339552879333496, -0.036475688219070435, -0.022438419982790947, -0.03012987971305847, 0.033292051404714584, -0.0006329276948235929, 0.04000696539878845, -0.018506698310375214, 0.029567470774054527, 0.010412165895104408, 0.01877746544778347, 0.022854050621390343, 0.008648838847875595, -0.08321227133274078, -0.03814896196126938, 0.012356783263385296, 0.023649277165532112, -0.015430725179612637, 0.4389275312423706, -0.01125532016158104, 0.007114935200661421, 0.056206945329904556, 0.03993034362792969, -0.03414682298898697, -0.00557703198865056, 0.012696675024926662, -0.08037871867418289, 0.04897552728652954, -0.012421263381838799, -0.018326805904507637, -0.018702076748013496, 0.02487695962190628, -0.0876820981502533, 0.012342450208961964, 0.019941458478569984, 0.051004815846681595, 0.0364222452044487, 0.017833322286605835, -0.018920162692666054, -0.0011957889655604959, 0.014132761396467686, 0.03724479302763939, 0.010144311003386974, 0.011783993802964687, -0.020398570224642754, 0.019775515422225, 0.01883816160261631, 0.0269556175917387, 0.03408549726009369, 0.046944133937358856, 0.02375725470483303, -0.06640675663948059, 0.04145326092839241, -0.019215822219848633, -0.00035860922071151435, 0.004685642197728157, -0.037846747785806656, -0.003886090125888586, 0.021981244906783104, 0.0025383613537997007, -0.011922582052648067, 0.039768751710653305, 0.011556025594472885, -0.014915009029209614, 0.138311967253685, 0.006407602224498987, -0.027464397251605988, -0.015486648306250572, -0.011391007341444492, 0.016617093235254288, 0.03462371602654457, -0.009637118317186832, -0.0735575258731842, 0.002369430148974061, 0.006547361612319946, 0.10085590183734894, -0.043527573347091675, -0.10991998016834259, 0.03344501927495003, 0.008425491861999035, -0.022306963801383972, -0.056639138609170914, 0.04521070793271065, 0.05534261465072632, -0.14285512268543243, -0.027962958440184593, 0.027878902852535248, 0.003625230398029089, -0.05913374945521355, 0.004600448999553919, -0.0010174529161304235, -0.015885012224316597, 0.0008748517720960081, 0.05170564725995064, 0.005538507364690304, -0.042182110249996185, -0.011221283115446568, 0.04693736135959625, 0.005422443617135286, -0.032895710319280624, -0.01837077923119068, -0.03869510814547539, 0.019628172740340233, -0.0915646180510521, -0.053759828209877014, -0.058543238788843155, -0.0012597159948199987, -0.020730815827846527, -0.031863998621702194, -0.014694396406412125, -0.006527729798108339, -0.037971947342157364, 0.08666829019784927, -0.039347607642412186, -0.017472120001912117, -0.025703681632876396, 0.0020478384103626013, -0.04512910172343254, -0.04063170403242111, -0.00893173273652792, 0.02215617522597313, -0.01889129728078842, 0.007275668904185295, -0.05844329297542572, 0.04083007574081421, 0.06825686246156693, -0.06484343856573105, 0.10755954682826996, 0.02303437702357769, -0.03926372900605202, -0.001725252135656774, 0.0035271455999463797, 0.017310937866568565, -0.01897849701344967, -0.003754530567675829, 0.022876262664794922, -0.040918100625276566, 0.04021844267845154, 0.053416941314935684, -0.007773959543555975, 0.009321230463683605, -0.028472507372498512, -0.3504860997200012, -0.030781716108322144, -0.018947849050164223, 0.01430062297731638, 0.030388912186026573, -0.06037027761340141, 0.016598105430603027, -0.03231016546487808, 0.039517566561698914, 0.03919157385826111, 0.05409733206033707, -0.019071295857429504, -0.019757863134145737, -0.061352524906396866, 0.014045354910194874, 0.05255283787846565, -0.0035765920765697956, -0.006813595537096262, -0.005200742278248072, -0.006929757073521614, -0.006109884940087795, -0.015698794275522232, 0.003066504606977105, -0.06579353660345078, -0.0001684357412159443, -0.01670750416815281, 0.10306815803050995, 0.029749426990747452, -0.0029196373652666807, -0.03806336969137192, 0.064095638692379, -0.01457281969487667, -0.017004678025841713, -0.09143037348985672, 0.02227039821445942, -0.034158747643232346, 0.057888831943273544, -0.03386528789997101, -0.017105471342802048, -0.03653166443109512, -0.05509863793849945, -0.027212152257561684, -0.01902257464826107, -0.021311743184924126, -0.0622207336127758, 0.025888031348586082, -0.020886430516839027, -0.005542907398194075, -0.006026051007211208, 0.09306444972753525, 0.00010248697799397632, 0.02227405272424221, 0.0011670152889564633, 0.0037534052971750498, -0.011156910099089146, -0.06323617696762085, -0.06788913905620575, -0.019135160371661186, 0.01067114807665348, 0.034820158034563065, 0.0011370579013600945, 0.041762832552194595, 0.0020068997982889414, -0.10504280030727386, 0.022220581769943237, -0.022312553599476814, -0.03959353640675545, 0.011003173887729645, 0.003540326841175556, -0.016332333907485008, -0.04161598160862923, 0.08913548290729523, -0.009029350243508816, 0.0207376591861248, 0.04711984843015671, -0.0011030470486730337, -0.025273507460951805, 0.013688421808183193, 0.02995271421968937, 0.009336641989648342, 0.04929165169596672, -0.043296974152326584, 0.07394544035196304, -0.031478673219680786, -0.021089060232043266, 0.021451245993375778, 0.011957657523453236, -0.0688275620341301, 0.06072104722261429, 0.029019156470894814, -0.026673823595046997, 0.004699577111750841, -0.016895538195967674, -0.06332018971443176, 0.08899877965450287, -0.04119459167122841, -0.2648434042930603, 0.028768448159098625, 0.016944576054811478, 0.07771919667720795, 0.008002987131476402, -0.006579129956662655, 0.011925705708563328, -0.026096448302268982, 0.013249865733087063, 0.02161668799817562, 0.03274371474981308, 0.04306335374712944, 0.01494111493229866, -0.0026822027284651995, -0.008510746993124485, 0.00105644715949893, 0.00048087199684232473, 0.011567136272788048, 0.02053144946694374, 0.005541944410651922, 0.054343082010746, -0.031305618584156036, 0.18078576028347015, 0.023668929934501648, 0.017737794667482376, 0.033124346286058426, -0.03100787289440632, 0.004635109566152096, 0.037523724138736725, -0.022038599476218224, -0.03188430890440941, 0.023362554609775543, -0.00044812323176302016, 0.02049790695309639, 0.037260547280311584, -0.044508520513772964, -0.02491181157529354, 0.013481310568749905, 0.03310379385948181, -0.008100365288555622, 0.024137908592820168, 0.008456029929220676, -0.037884049117565155, 0.030981620773673058, 0.05515950173139572, -0.008603744208812714, 0.01840321533381939, 0.01289704442024231, -0.07262922823429108, -0.01901170052587986, -0.023880017921328545, -0.05863836035132408, -0.018598029389977455, -0.0038355409633368254, 0.026305770501494408, 0.09023088961839676, 0.016725575551390648, -0.04110846668481827, 0.025847643613815308, 0.012162500992417336, -0.032886750996112823, -0.012458480894565582, 0.10475831478834152, -0.00008394002361455932, 0.010675902478396893 ]
[ 0.017604656517505646, 0.034276872873306274, 0.023449234664440155, 0.010017217136919498, 0.0012028119526803493, 0.02004535309970379, -0.009280906058847904, -0.014365051873028278, -0.030180033296346664, -0.0055883824825286865, -0.007849735207855701, 0.009289794601500034, 0.022821370512247086, -0.0034105752129107714, 0.026234067976474762, 0.01750491000711918, 0.017907723784446716, 0.003399894805625081, 0.033700890839099884, -0.03833277150988579, -0.027575572952628136, -0.0036239386536180973, 0.03275104612112045, -0.04408034309744835, 0.005469609051942825, 0.020040245726704597, -0.0366961807012558, 0.010200791992247105, 0.037184759974479675, -0.08258223533630371, 0.006954940967261791, 0.016610877588391304, -0.021275632083415985, -0.005400730762630701, -0.04600156098604202, 0.0054640378803014755, -0.025247665122151375, 0.027850529178977013, 0.0018869562773033977, 0.04208702594041824, 0.010757648386061192, -0.007304084021598101, -0.006236284971237183, 0.006554227322340012, 0.0037312780041247606, 0.017552319914102554, -0.01786031574010849, -0.022785447537899017, -0.007964194752275944, -0.01218134630471468, -0.06974296271800995, -0.02426009625196457, -0.01174341794103384, 0.014405733905732632, -0.02219287119805813, 0.010731377638876438, -0.0336567685008049, -0.0005952171632088721, 0.009772604331374168, 0.005627138540148735, 0.019869882613420486, 0.0035190300550311804, -0.0504637211561203, -0.022599099203944206, -0.015902694314718246, 0.000008660967068863101, -0.015047558583319187, 0.019569147378206253, 0.014803933911025524, 0.020589981228113174, -0.0035655347164720297, 0.0345020517706871, -0.10119921714067459, -0.0051638903096318245, -0.022735193371772766, 0.008332549594342709, 0.026693183928728104, -0.04448865354061127, 0.016381075605750084, -0.005923053715378046, -0.024394994601607323, -0.0021010988857597113, -0.017984088510274887, -0.01670197769999504, -0.03192852810025215, -0.013166430406272411, 0.027528641745448112, -0.02597915567457676, 0.007974059320986271, 0.04162752628326416, -0.05398525670170784, 0.028505489230155945, 0.002258377382531762, -0.019729139283299446, -0.10640980303287506, 0.014972507022321224, 0.01411412563174963, -0.015221894718706608, 0.016671128571033478, 0.8216035962104797, -0.015683146193623543, -0.0058120908215641975, -0.010585080832242966, 0.02702680602669716, 0.02709890902042389, 0.06123983487486839, -0.012473787181079388, 0.024780288338661194, 0.006709305103868246, 0.0172427985817194, -0.021624932065606117, 0.003981274552643299, 0.008676605299115181, 0.006733657792210579, 0.02299547754228115, 0.007958754897117615, 0.02801787294447422, 0.010767091996967793, 0.023367254063487053, 0.021796654909849167, -0.005481353960931301, -0.003998362459242344, 0.008249892853200436, -0.04509412869811058, -0.027484187856316566, -0.16202107071876526, -0.01288958266377449, -6.47339449273255e-33, 0.05800853297114372, 0.0039047272875905037, 0.05854567512869835, 0.013053988106548786, -0.005910664331167936, 0.016918109729886055, -0.004193545784801245, -0.023841597139835358, -0.04589186981320381, -0.04250611737370491, 0.01827016845345497, -0.00937101524323225, 0.0012184082297608256, -0.0017105028964579105, 0.0006761175463907421, -0.026395658031105995, 0.04261722043156624, 0.006099611055105925, 0.0034710641484707594, -0.002549022203311324, 0.006214432418346405, 0.01061108335852623, -0.03204231336712837, 0.021745553240180016, -0.020972538739442825, 0.01298151258379221, 0.019699256867170334, -0.000003056378318433417, 0.01127779483795166, -0.06411643326282501, -0.05190682411193848, 0.04241771250963211, -0.008386568166315556, -0.03394604101777077, 0.023419389501214027, -0.05256611481308937, -0.04592295363545418, 0.005495636723935604, -0.026868678629398346, -0.052077386528253555, -0.04208016023039818, 0.015299350954592228, -0.01914663426578045, -0.0489325225353241, -0.05748618766665459, 0.0014540355186909437, -0.010652567259967327, 0.00977383367717266, -0.0070138913579285145, 0.03195777162909508, -0.005208778660744429, 0.016443105414509773, -0.021816730499267578, 0.0454728938639164, -0.055906765162944794, 0.013274633325636387, 0.027531027793884277, 0.010410151444375515, -0.016384948045015335, 0.004444430582225323, 0.04534101113677025, -0.02156398631632328, 0.00805353932082653, 0.024361493065953255, 0.008584805764257908, 0.00363515829667449, 0.005863328464329243, -0.023827452212572098, 0.02185903862118721, 0.04083908349275589, -0.050834089517593384, 0.07940959185361862, -0.01649177446961403, -0.03394722938537598, 0.02905753254890442, -0.04435597360134125, -0.027813980355858803, -0.033506765961647034, -0.00043396311230026186, 0.008291656151413918, -0.013467562384903431, 0.006277764681726694, 0.015221182256937027, -0.017350872978568077, 0.005763576366007328, -0.049045972526073456, 0.030641987919807434, 0.013382217846810818, 0.018984299153089523, 0.011523459106683731, 0.04295703396201134, 0.011505188420414925, 0.005454927682876587, -0.0013817214639857411, -0.01120107714086771, 6.492522724556306e-33, -0.01439094077795744, 0.012815504334867, -0.004281674511730671, -0.003884140634909272, 0.05145683512091637, -0.00656574871391058, 0.012482205405831337, 0.008422710932791233, -0.04030779376626015, 0.04445672780275345, -0.01049143634736538, -0.027474278584122658, 0.012513487599790096, 0.032869137823581696, 0.0737554207444191, -0.011087718419730663, 0.007437198422849178, -0.08262447267770767, -0.021559590473771095, 0.014949172735214233, -0.009155327454209328, 0.004337275866419077, -0.025041285902261734, 0.015589236281812191, 0.05101335793733597, 0.0028252662159502506, 0.003952508792281151, 0.019043423235416412, -0.005330327898263931, 0.006521780043840408, 0.013518236577510834, -0.04208316653966904, -0.020871805027127266, -0.010301720350980759, 0.04040658473968506, 0.0155183682218194, 0.0005196058773435652, 0.013867291621863842, 0.02951832488179207, 0.015657301992177963, 0.0038726150523871183, 0.02580505982041359, -0.057773444801568985, 0.05626774579286575, -0.005057050846517086, 0.056989461183547974, -0.0035907693672925234, 0.00003834946983261034, -0.02267300710082054, -0.0008804580429568887, 0.022914577275514603, 0.04420347884297371, -0.040929995477199554, -0.01308759581297636, 0.0011668290244415402, -0.04110128805041313, -0.006619869265705347, 0.0668526366353035, 0.009322745725512505, 0.010087436065077782, -0.02120865322649479, -0.0400136336684227, -0.015462057664990425, 0.03137568011879921, -0.027070527896285057, -0.03407266363501549, -0.0198497511446476, -0.009226802736520767, -0.01047190185636282, -0.00691091688349843, 0.0032003349624574184, -0.0009083554614335299, -0.007506014779210091, 0.01592773199081421, 0.04742617532610893, -0.05150773748755455, 0.0007862605853006244, 0.012073175050318241, -0.015097037889063358, 0.026741860434412956, 0.03231910988688469, 0.031148497015237808, 0.021961422637104988, -0.0005818427307531238, 0.0019323609303683043, -0.000332209951011464, -0.009231451898813248, 0.03178362548351288, -0.011885602958500385, 0.014850092120468616, 0.042643290013074875, -0.017817750573158264, -0.016985315829515457, 0.039006322622299194, -0.031582899391651154, -1.2452831654741203e-8, -0.052685391157865524, 0.012959797866642475, -0.01906450465321541, -0.011844790540635586, 0.01060051005333662, 0.011039777658879757, 0.037301599979400635, 0.004102274309843779, 0.007071218453347683, 0.013839999213814735, 0.03394234552979469, -0.0148090161383152, -0.0058057913556694984, 0.011698522605001926, 0.025852419435977936, -0.046597495675086975, 0.0012358903186395764, -0.0320378802716732, 0.02813115157186985, 0.045066095888614655, 0.03153356537222862, 0.03155500441789627, -0.0637354850769043, 0.020388923585414886, 0.0021602765191346407, -0.007062061689794064, 0.06021140515804291, -0.04652902111411095, -0.007071091327816248, 0.011363234370946884, -0.01680712029337883, -0.00902688130736351, 0.008232632651925087, 0.00893205776810646, -0.03083432838320732, -0.023840801790356636, -0.006475826725363731, 0.03556749224662781, -0.0035578354727476835, 0.02893366850912571, 0.012753897346556187, -0.010414977557957172, -0.044833775609731674, -0.03577008470892906, -0.021118294447660446, 0.03629817068576813, -0.00010436292359372601, -0.03755852207541466, 0.024566583335399628, -0.034018225967884064, -0.03415166586637497, 0.013840222731232643, 0.013555525802075863, 0.024562111124396324, 0.06086220592260361, -0.029053794220089912, 0.01401594839990139, -0.017028355970978737, 0.01582048460841179, -0.05264662951231003, 0.02012617513537407, 0.0021268923301249743, -0.01421118900179863, -0.03132699429988861 ]
neo4j-generating-real-time-recommendations-with-cypher
https://markhneedham.com/blog/2015/03/27/neo4j-generating-real-time-recommendations-with-cypher
false
2015-03-11 21:13:26
Python/Neo4j: Finding interesting computer sciency people to follow on Twitter
[ "neo4j", "python" ]
[ "neo4j", "Python" ]
At the beginning of this year I moved from Neo4j's field team to dev team and since the code we write there is much lower level than I'm used to I thought I should find some people to follow on twitter whom I can learn from. My technique for finding some of those people was to pick a person from the Neo4j kernel team who's very good at systems programming and uses twitter which led me to Mr https://twitter.com/chvest[Chris Vest]. I thought that the people Chris interacts with on twitter are likely to be interested in this type of programming so I manually traversed out to those people and had a look who they interacted with and put them all into a https://twitter.com/markhneedham/lists/comp-science-peoples[list]. This approach has worked well and I've picked up lots of reading material from following these people. It does feel like something that could be automated though and we'll using Python and Neo4j as our tool kit. We need to find a library to connect to the Twitter API. There are a few to choose from but https://github.com/tweepy/tweepy[tweepy] seems simple enough so I started using that. The first thing we need to so is fill in our http://docs.tweepy.org/en/latest/getting_started.html#hello-tweepy[Twitter API auth details]. Since the application is just for me I'm not going to bother with setting up OAuth - instead I'll just create an application on https://apps.twitter.com/[apps.twitter.com] and grab the appropriate tokens: image::{{<siteurl>}}/uploads/2015/03/2015-03-11_01-18-47.png[2015 03 11 01 18 47,492] Once we've done that we can navigate to that app and get a consumer key, consumer secret, access token and access token secret. They all reside on the 'Keys and Access Tokens' tab: image::{{<siteurl>}}/uploads/2015/03/2015-03-11_01-20-17.png[2015 03 11 01 20 17,351] image::{{<siteurl>}}/uploads/2015/03/2015-03-11_01-20-30.png[2015 03 11 01 20 30,438] Now that we've got ourself all auth'd up let's write some code that starts from Chris and goes out and finds his latest tweets and the people he's interacted with in them. We'll write the appropriate information out to a CSV file so that we can import it into Neo4j later on: [source,python] ---- import tweepy import csv from collections import Counter, deque auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth, wait_on_rate_limit = True, wait_on_rate_limit_notify = True) counter = Counter() users_to_process = deque() USERS_TO_PROCESS = 50 def extract_tweet(tweet): user_mentions = ",".join([user["screen_name"].encode("utf-8") for user in tweet.entities["user_mentions"]]) urls = ",".join([url["expanded_url"] for url in tweet.entities["urls"]]) return [tweet.user.screen_name.encode("utf-8"), tweet.id, tweet.text.encode("utf-8"), user_mentions, urls] starting_user = "chvest" with open("tweets.csv", "a") as tweets: writer = csv.writer(tweets, delimiter=",", escapechar="\\", doublequote = False) for tweet in tweepy.Cursor(api.user_timeline, id=starting_user).items(50): writer.writerow(extract_tweet(tweet)) tweets.flush() for user in tweet.entities["user_mentions"]: if not len(users_to_process) > USERS_TO_PROCESS: users_to_process.append(user["screen_name"]) counter[user["screen_name"]] += 1 else: break ---- As well as printing out Chris' tweets I'm also capturing other users who he's had interacted and putting them in a queue that we'll drain later on. We're limiting the number of other users that we'll process to 50 for now but it's easy to change. If we print out the first few lines of 'tweets.csv' this is what we'd see: [source,bash] ---- $ head -n 5 tweets.csv userName,tweetId,contents,usersMentioned,urls chvest,575427045167071233,@shipilev http://t.co/WxqFIsfiSF,shipilev, chvest,575403105174552576,@AlTobey I often use http://t.co/G7Cdn9Udst for small one-off graph diagrams.,AlTobey,http://www.apcjones.com/arrows/ chvest,575337346687766528,RT @theburningmonk: this is why you need composition over inheritance... :s #CompositionOverInheritance http://t.co/aKRwUaZ0qo,theburningmonk, chvest,575269402083459072,@chvest except…? “Each library implementation should therefore be identical with respect to the public API”,chvest, ---- We're capturing the user, tweetId, the tweet itself, any users mentioned in the tweet and any URLs shared in the tweet. Next we want to get some of the tweets of the people Chris has interacted with ~~~python # Grab the code from here too - https://gist.github.com/mneedham/3188c44b2cceb88c6de0 import tweepy import csv from collections import Counter, deque auth = tweepy.OAuthHandler(consumer_key, consumer_secret) auth.set_access_token(access_token, access_token_secret) api = tweepy.API(auth, wait_on_rate_limit = True, wait_on_rate_limit_notify = True) counter = Counter() users_to_process = deque() USERS_TO_PROCESS = 50 def extract_tweet(tweet): user_mentions = ",".join([user["screen_name"].encode("utf-8") for user in tweet.entities["user_mentions"]]) urls = ",".join([url["expanded_url"] for url in tweet.entities["urls"]]) return [tweet.user.screen_name.encode("utf-8"), tweet.id, tweet.text.encode("utf-8"), user_mentions, urls] starting_user = "chvest" with open("tweets.csv", "a") as tweets: writer = csv.writer(tweets, delimiter=",", escapechar="\\", doublequote = False) for tweet in tweepy.Cursor(api.user_timeline, id=starting_user).items(50): writer.writerow(extract_tweet(tweet)) tweets.flush() for user in tweet.entities["user_mentions"]: if not len(users_to_process) > USERS_TO_PROCESS: users_to_process.append(user["screen_name"]) counter[user["screen_name"]] += 1 else: break users_processed = set([starting_user]) while True: if len(users_processed) >= USERS_TO_PROCESS: break else: if len(users_to_process) > 0: next_user = users_to_process.popleft() print next_user if next_user in users_processed: "-- user already processed" else: "-- processing user" users_processed.add(next_user) for tweet in tweepy.Cursor(api.user_timeline, id=next_user).items(10): writer.writerow(extract_tweet(tweet)) tweets.flush() for user_mentioned in tweet.entities["user_mentions"]: if not len(users_processed) > 50: users_to_process.append(user_mentioned["screen_name"]) counter[user_mentioned["screen_name"]] += 1 else: break else: break ~~~ Finally let's take a quick look at the users who show up most frequently: ~~~python >>> for user_name, count in counter.most_common(20): print user_name, count neo4j 13 devnexus 12 AlTobey 11 bitprophet 11 hazelcast 10 chvest 9 shipilev 9 AntoineGrondin 8 gvsmirnov 8 GatlingTool 8 lagergren 7 tomsontom 6 dorkitude 5 noctarius2k 5 DanHeidinga 5 chris_mahan 5 coda 4 mccv 4 gAmUssA 4 jmhodges 4 ~~~ A few of the people on that list are in my list which is a good start. We can explore the data set better once it's in Neo4j though so let's write some Cypher import statements to create our own mini Twitter graph: ~~~cypher // add people LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row MERGE (p:Person {userName: row.userName}); LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row WITH SPLIT(row.usersMentioned, ",") AS users UNWIND users AS user MERGE (p:Person {userName: user}); // add tweets LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row MERGE (t:Tweet {id: row.tweetId}) ON CREATE SET t.contents = row.contents; // add urls LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row WITH SPLIT(row.urls, ",") AS urls UNWIND urls AS url MERGE (:URL {value: url}); // add links LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row MATCH (p:Person {userName: row.userName}) MATCH (t:Tweet {id: row.tweetId}) MERGE (p)-[:TWEETED]\->(t); LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row WITH SPLIT(row.usersMentioned, ",") AS users, row UNWIND users AS user MATCH (p:Person {userName: user}) MATCH (t:Tweet {id: row.tweetId}) MERGE (p)-[:MENTIONED_IN]\->(t); LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-twitter/tweets.csv" AS row WITH SPLIT(row.urls, ",") AS urls, row UNWIND urls AS url MATCH (u:URL {value: url}) MATCH (t:Tweet {id: row.tweetId}) MERGE (t)-[:CONTAINS_LINK]\->(u); ~~~ We can put all those commands in a file and execute them using neo4j-shell: ~~~bash $ ./neo4j-community-2.2.0-RC01/bin/neo4j-shell --file import.cql ~~~ Now let's write some queries against the graph: ~~~cypher // Find the tweets where Chris mentioned himself MATCH path = (n:Person {userName: "chvest"})-[:TWEETED]\->()\<-[:MENTIONED_IN]-(n) RETURN path ~~~ image::{{<siteurl>}}/uploads/2015/03/graph-5.png[Graph 5] ~~~cypher // Find the most popular links shared in the network MATCH (u:URL)\<-[r:CONTAINS_LINK]\->() RETURN u.value, COUNT(*) AS times ORDER BY times DESC LIMIT 10 +-------------------------------------------------------------------------------------------------+ | u.value | times | +-------------------------------------------------------------------------------------------------+ | "http://www.polyglots.dk/" | 4 | | "http://www.java-forum-nord.de/" | 4 | | "http://hirt.se/blog/?p=646" | 3 | | "http://wp.me/p26jdv-Ja" | 3 | | "https://instagram.com/p/0D4I_hH77t/" | 3 | | "https://blogs.oracle.com/java/entry/new_java_champion_tom_chindl" | 3 | | "http://www.kennybastani.com/2015/03/spark-neo4j-tutorial-docker.html" | 2 | | "https://firstlook.org/theintercept/2015/03/10/ispy-cia-campaign-steal-apples-secrets/" | 2 | | "http://buff.ly/1GzZXlo" | 2 | | "http://buff.ly/1BrgtQd" | 2 | +-------------------------------------------------------------------------------------------------+ 10 rows ~~~ The first link is for a programming language meetup in Copenhagen, the second for a Java conference in Hanovier and the third an announcement about the latest version of Java Mission Control. So far so good! A next step in this area would be to run the links through Prismatic's https://github.com/Prismatic/interest-graph[interest graph] so we can model topics in our graph as well. For now let's have a look at the interactions between Chris and others in the graph: ~~~cypher // Find the people who Chris interacts with most often MATCH path = (n:Person {userName: "chvest"})-[:TWEETED]\->()\<-[:MENTIONED_IN]-(other) RETURN other.userName, COUNT(*) AS times ORDER BY times DESC LIMIT 5 +------------------------+ | other.userName | times | +------------------------+ | "gvsmirnov" | 7 | | "shipilev" | 5 | | "nitsanw" | 4 | | "DanHeidinga" | 3 | | "AlTobey" | 3 | +------------------------+ 5 rows ~~~ Let's generalise that to find interactions between any pair of people: ~~~cypher // Find the people who interact most often MATCH (n:Person)-[:TWEETED]\->()\<-[:MENTIONED_IN]-(other) WHERE n <> other RETURN n.userName, other.userName, COUNT(*) AS times ORDER BY times DESC LIMIT 5 +------------------------------------------+ | n.userName | other.userName | times | +------------------------------------------+ | "fbogsany" | "AntoineGrondin" | 8 | | "chvest" | "gvsmirnov" | 7 | | "chris_mahan" | "bitprophet" | 6 | | "maxdemarzi" | "neo4j" | 6 | | "chvest" | "shipilev" | 5 | +------------------------------------------+ 5 rows ~~~ Let's combine a couple of these together to come up with a score for each person: ~~~cypher MATCH (n:Person) // number of mentions OPTIONAL MATCH (n)-[mention:MENTIONED_IN]\->() WITH n, COUNT(mention) AS mentions // number of links shared by someone else OPTIONAL MATCH (n)-[:TWEETED]\->()-[:CONTAINS_LINK]\->(link)\<-[:CONTAINS_LINK]-() WITH n, mentions, COUNT(link) AS links RETURN n.userName, mentions + links AS score, mentions, links ORDER BY score DESC LIMIT 10 +------------------------------------------+ | n.userName | score | mentions | links | +------------------------------------------+ | "chvest" | 17 | 10 | 7 | | "hazelcast" | 16 | 10 | 6 | | "neo4j" | 15 | 13 | 2 | | "noctarius2k" | 14 | 4 | 10 | | "devnexus" | 12 | 12 | 0 | | "polyglotsdk" | 11 | 2 | 9 | | "shipilev" | 11 | 10 | 1 | | "AlTobey" | 11 | 10 | 1 | | "bitprophet" | 10 | 9 | 1 | | "GatlingTool" | 10 | 8 | 2 | +------------------------------------------+ 10 rows ~~~ Amusingly Chris is top of his own network but we also see three accounts which aren't people, but rather products - neo4j, hazelcast and GatlingTool. The rest are legit though That's as far as I've got but to make this more useful I think we need to introduce follower/friend links as well as importing more data. In the mean time I've got a bunch of links to go and read!
null
null
[ 0.06038667634129524, -0.012183421291410923, -0.0028699683025479317, 0.03573846071958542, 0.08565349876880646, 0.025669414550065994, 0.02394254319369793, 0.05338960513472557, 0.02082105353474617, -0.007646121084690094, -0.007184180431067944, -0.009469716809689999, -0.06485530734062195, 0.00635369261726737, -0.03657824173569679, 0.050576865673065186, 0.06004365161061287, 0.004839506931602955, 0.025240283459424973, -0.002346141031011939, 0.022109631448984146, 0.06098395586013794, 0.01620819792151451, 0.02158929966390133, 0.02276264689862728, 0.012858361937105656, 0.01627250574529171, -0.007898382842540741, -0.03132442384958267, -0.011239145882427692, 0.040788888931274414, 0.0003966250515077263, 0.03220116347074509, -0.026141701266169548, 0.013110019266605377, 0.00999319925904274, -0.03907681256532669, 0.019449308514595032, -0.004847839940339327, 0.01395304687321186, -0.06430458277463913, 0.04684361815452576, -0.02752091735601425, 0.018314894288778305, -0.03712771087884903, 0.013061090372502804, -0.03496410697698593, 0.03948485478758812, 0.018823156133294106, -0.008200393989682198, -0.08514651656150818, 0.017156651243567467, -0.008218009024858475, -0.01646602898836136, 0.012981169857084751, 0.045293547213077545, 0.026934538036584854, -0.08175049722194672, 0.020790137350559235, -0.008824783377349377, 0.01056746207177639, -0.014594387263059616, 0.007810888346284628, 0.01600080356001854, 0.005240509752184153, -0.04738394170999527, -0.003161448985338211, 0.06026977300643921, -0.03450680896639824, 0.006098295096307993, 0.009292279370129108, 0.03401745483279228, -0.0397551953792572, -0.015752088278532028, -0.0035945281852036715, -0.052353158593177795, 0.01324054878205061, 0.08987122774124146, 0.03707215189933777, 0.044640231877565384, -0.02877567894756794, 0.011183405295014381, -0.0016289519844576716, 0.046866293996572495, -0.003831573063507676, -0.020320435985922813, -0.01611889898777008, -0.012182005681097507, -0.05735708773136139, 0.04045769199728966, 0.001783721148967743, -0.059702735394239426, 0.002808552235364914, 0.014618109911680222, -0.015203185379505157, 0.029096662998199463, 0.0011710338294506073, 0.01848093792796135, 0.013470175676047802, -0.03373958542943001, -0.03547077625989914, -0.03206341713666916, -0.023332620039582253, 0.011107148602604866, -0.06398823112249374, -0.016359107568860054, -0.019698454067111015, -0.009490801952779293, 0.006649429444223642, -0.013039945624768734, -0.026889124885201454, 0.011905219405889511, -0.02847869321703911, 0.018668491393327713, -0.05311961472034454, 0.06505316495895386, 0.014307172037661076, -0.04293129965662956, -0.035405635833740234, 0.006346865091472864, 0.04642153158783913, 0.0512649342417717, -0.010307696647942066, 0.06946016848087311, -0.019505498930811882, 0.04001328721642494, -0.02072504535317421, 0.03859345242381096, -0.012766284868121147, -0.052227459847927094, -0.025621460750699043, 0.059173718094825745, -0.01762852817773819, 0.0057595279067754745, -0.024863775819540024, -0.036698248237371445, -0.005774680525064468, 0.012860027141869068, 0.03863039240241051, 0.02900678478181362, -0.005724214017391205, -0.04094581678509712, 0.007531283423304558, -0.0019051630515605211, 0.02379545010626316, 0.016060907393693924, -0.02050948515534401, -0.028992105275392532, -0.03526698797941208, 0.009463032707571983, -0.01113069523125887, -0.04164018854498863, 0.022263171151280403, -0.02881900779902935, 0.020643379539251328, 0.07670474797487259, 0.047269709408283234, 0.0067937057465314865, -0.016126524657011032, 0.03216145187616348, 0.04874171316623688, 0.03689125180244446, 0.007682018913328648, 0.045253686606884, 0.01320273894816637, -0.027085261419415474, -0.00071686040610075, 0.06189598888158798, -0.01346956193447113, 0.017368925735354424, -0.03411011025309563, -0.05282478407025337, 0.049409084022045135, -0.03082599863409996, -0.005809994414448738, 0.025062788277864456, 0.05642424896359444, -0.006942255888134241, 0.025161772966384888, 0.01795945130288601, -0.07210352271795273, 0.06656534969806671, 0.04156837984919548, 0.02705308236181736, 0.019892534241080284, -0.011899026110768318, 0.06046281009912491, 0.024553127586841583, 0.013969462364912033, 0.022593211382627487, -0.0722983330488205, -0.06989367306232452, -0.031044671311974525, -0.008825673721730709, 0.06474609673023224, -0.027978332713246346, 0.033546533435583115, 0.04915999248623848, 0.021946320310235023, 0.04590245708823204, 0.01343477237969637, -0.024609049782156944, 0.008747070096433163, -0.04133734479546547, -0.07098881900310516, 0.061036501079797745, 0.03646061196923256, -0.05248591676354408, -0.05603674426674843, 0.02376112900674343, -0.0347907692193985, -0.01711641624569893, 0.03157598525285721, -0.04614996165037155, 0.03161585330963135, 0.027720296755433083, 0.03260607644915581, -0.01487337052822113, 0.03234128654003143, -0.032335665076971054, 0.02266167476773262, -0.0008344812667928636, 0.0012575421715155244, -0.011686500161886215, 0.008200963959097862, 0.10982681065797806, 0.05120842158794403, -0.05801280960440636, -0.056814003735780716, -0.0023058434017002583, 0.016222108155488968, -0.04394516721367836, 0.012704377062618732, -0.023206591606140137, -0.012583575211465359, -0.015663504600524902, -0.06805291026830673, -0.0553162656724453, -0.007212522439658642, -0.03557456657290459, 0.01830645650625229, 0.06546362489461899, -0.04324604198336601, 0.05711675062775612, 0.00005713354403269477, -0.0028807923663407564, -0.004541067872196436, -0.04400578886270523, -0.040008656680583954, 0.03876099735498428, 0.023728590458631516, -0.00779762864112854, 0.06280923634767532, -0.03015298582613468, -0.02994835190474987, -0.019955698400735855, -0.022874515503644943, 0.02891567349433899, 0.034073855727910995, 0.07241971790790558, -0.0025762170553207397, 0.04926220327615738, -0.048908691853284836, 0.029579127207398415, -0.023102648556232452, -0.03609641641378403, -0.039441049098968506, -0.042661312967538834, 0.007920951582491398, 0.01949121430516243, 0.03043474815785885, -0.023065658286213875, 0.030646860599517822, 0.007144954986870289, 0.011297875083982944, -0.015053452923893929, 0.02775580994784832, -0.014939643442630768, 0.0012674260651692748, -0.05523218959569931, -0.039252448827028275, 0.05950701981782913, -0.04985150694847107, -0.028514543548226357, -0.011142258532345295, -0.08042079955339432, 0.057767804712057114, -0.04621073231101036, -0.025494523346424103, -0.0012742206454277039, 0.024657053872942924, 0.043761156499385834, 0.030933022499084473, 0.013499976135790348, 0.06322851032018661, -0.0001883869554148987, 0.019127583131194115, 0.007188315503299236, -0.018705375492572784, 0.052416522055864334, -0.011469858698546886, 0.031894501298666, 0.037901196628808975, -0.012577816843986511, 0.002167866099625826, -0.05547808110713959, 0.032463327050209045, -0.019487986341118813, -0.2806906998157501, 0.07958998531103134, -0.004460952710360289, -0.05392385646700859, 0.015292325988411903, -0.021202586591243744, -0.0027376560028642416, -0.017179328948259354, -0.0036070554051548243, 0.0069495453499257565, -0.011954770423471928, -0.01624760963022709, -0.038730427622795105, 0.010223197750747204, -0.001760345883667469, -0.007717096712440252, -0.001215397845953703, -0.052857063710689545, 0.027447044849395752, 0.047909993678331375, -0.0103072514757514, -0.03627961128950119, -0.006999186705797911, 0.017805086448788643, 0.03388882800936699, 0.038294047117233276, -0.10580560564994812, 0.04019918665289879, -0.046489063650369644, -0.007541236467659473, -0.008263926953077316, -0.018816333264112473, 0.0035176307428628206, 0.007558039855211973, -0.025456897914409637, -0.016174115240573883, 0.041429128497838974, 0.01327633485198021, 0.003951440565288067, 0.020242201164364815, -0.01695896126329899, -0.034641560167074203, -0.04709624499082565, -0.010015822947025299, 0.0919274166226387, 0.008063629269599915, -0.08579862862825394, 0.0029657576233148575, -0.013069026172161102, 0.08005315065383911, -0.04158451408147812, -0.042258527129888535, -0.019468087702989578, 0.00867890752851963, -0.0023359074257314205, -0.03745191916823387, -0.02608644962310791, 0.0034914466086775064, -0.055974893271923065, -0.03666720911860466, -0.010628572665154934, -0.02861008793115616, 0.0214372631162405, -0.062228426337242126, -0.014821456745266914, -0.0621039979159832, -0.0508684441447258, -0.02351904846727848, 0.07202474027872086, 0.004818489775061607, -0.03083455003798008, 0.043313972651958466, -0.02655254863202572, -0.10860785096883774, -0.01829518750309944, -0.023032046854496002, -0.011725401505827904, 0.016725391149520874, 0.022803014144301414, 0.03483516350388527, -0.042431604117155075, -0.06287684291601181, 0.010107767768204212, 0.009319034405052662, 0.01825288124382496, -0.0020281909964978695, 0.028920819982886314, -0.005096178501844406, -0.016284290701150894, 0.02905471995472908, 0.07073785364627838, -0.015999652445316315, -0.042365558445453644, -0.005516931414604187, 0.00965858343988657, 0.02311139740049839, 0.04003417491912842, 0.01641106605529785, -0.012705213390290737, 0.07691749185323715, 0.03298509493470192, -0.03441474586725235, -0.0030893771909177303, -0.020514823496341705, -0.008131446316838264, -0.011324627324938774, -0.053042784333229065, 0.014070727862417698, 0.01071077212691307, 0.043739162385463715, -0.007600084412842989, -0.039438046514987946, -0.002195041161030531, -0.04511941596865654, -0.0314328558743, 0.003739585867151618, 0.014791074208915234, 0.029369793832302094, 0.029236895963549614, -0.004882446490228176, -0.06159397214651108, 0.02073090337216854, 0.033028263598680496, 0.024044593796133995, -0.05514288321137428, -0.05597732588648796, -0.028072675690054893, -0.022552164271473885, 0.022297624498605728, 0.0022317974362522364, -0.0030407016165554523, 0.027970433235168457, 0.010739640332758427, -0.04122324660420418, 0.026873696595430374, -0.008046205155551434, -0.03100430965423584, -0.05658777430653572, 0.03385625779628754, -0.012964393943548203, -0.016284776851534843, 0.026321548968553543, -0.020209936425089836, 0.01566987857222557, 0.042249567806720734, 0.004508518148213625, 0.013463257811963558, 0.0043300059624016285, 0.021746303886175156, 0.0035283879842609167, -0.0001722587476251647, -0.03852451965212822, -0.00007471209391951561, -0.027517056092619896, -0.009895284660160542, -0.023614171892404556, 0.05537746846675873, -0.020241359248757362, -0.016362180933356285, -0.010188625194132328, 0.03009210154414177, -0.058431610465049744, 0.006268764846026897, 0.00004335959965828806, 0.018278958275914192, 0.034106653183698654, -0.042021267116069794, 0.025144800543785095, -0.02852104976773262, -0.0326153002679348, 0.0010722115403041244, 0.03491654619574547, -0.02324146218597889, 0.006522201932966709, -0.0017454719636589289, 0.0018394769867882133, -0.004945183638483286, 0.024646077305078506, 0.026576580479741096, 0.010443205945193768, -0.009232561103999615, -0.009699310176074505, 0.005400065798312426, 0.025943968445062637, 0.058761950582265854, 0.06349200755357742, -0.020525513216853142, 0.004472339991480112, -0.020107004791498184, 0.013460725545883179, -0.02876051515340805, -0.009960967116057873, -0.01596233993768692, 0.021539485082030296, -0.015686538070440292, -0.05822284519672394, 0.048056285828351974, 0.013592316769063473, 0.02246367186307907, 0.03221256285905838, -0.016131853684782982, 0.029369628056883812, -0.023024782538414, 0.05460385978221893, 0.058942291885614395, -0.05389329791069031, -0.017790067940950394, -0.011823334731161594, -0.0065145352855324745, -0.015544701367616653, 0.025970643386244774, -0.056176137179136276, -0.028210515156388283, -0.018311383202672005, 0.006696180906146765, -0.04480323940515518, -0.055514171719551086, -0.010650585405528545, 0.0024278864730149508, 0.001846497762016952, 0.010337297804653645, -0.022581953555345535, -0.0005201218882575631, -0.02127380110323429, -0.014638110995292664, 0.04549788311123848, -0.028722023591399193, 0.00670586759224534, -0.00443348428234458, -0.030964011326432228, 0.0033920917194336653, -0.026639865711331367, 0.02977660298347473, 0.02199660986661911, -0.02431950345635414, 0.012083899229764938, -0.0599883571267128, -0.001836046576499939, -0.01808742620050907, 0.04418276250362396, -0.01734662801027298, -0.02619505301117897, -0.05061925947666168, -0.02265249751508236, -0.037991609424352646, -0.009137910790741444, -0.023202400654554367, 0.02339363470673561, 0.01720266044139862, 0.031559448689222336, 0.04008485749363899, 0.05412864312529564, -0.012679277919232845, -0.00744040310382843, 0.04853956028819084, -0.051926348358392715, -0.03665439039468765, -0.036826882511377335, -0.04141916334629059, -0.008760751225054264, 0.01731502264738083, 0.02247598208487034, -0.04303831607103348, 0.04721327871084213, 0.0331350713968277, 0.018335171043872833, 0.0355304591357708, -0.02127925306558609, 0.045542795211076736, -0.04094240069389343, -0.015084056183695793, -0.0802014097571373, -0.007375059183686972, 0.04803784564137459, -0.02475520595908165, -0.008452363312244415, 0.001875280519016087, -0.015984447672963142, 0.00988287478685379, -0.0644984319806099, -0.027484411373734474, 0.04991941899061203, -0.018608251586556435, 0.016907066106796265, 0.010983319021761417, -0.06432218849658966, 0.03048081323504448, 0.0374191552400589, -0.04329156503081322, -0.022237960249185562, -0.018655838444828987, 0.05926379933953285, -0.025376034900546074, 0.042106129229068756, -0.015345627442002296, -0.05132036656141281, 0.07909256219863892, 0.006987298838794231, 0.01582842320203781, 0.0640101283788681, -0.012199681252241135, 0.023590214550495148, 0.040371526032686234, 0.006084642373025417, 0.012026404030621052, 0.04605846479535103, -0.02144174836575985, -0.06315065175294876, 0.027024777606129646, 0.014306898228824139, -0.044595446437597275, -0.04334539920091629, 0.07414406538009644, 0.01747971586883068, -0.039877135306596756, -0.031134160235524178, 0.03371496871113777, -0.038337238132953644, -0.025172296911478043, -0.06442845612764359, -0.0028752698563039303, -0.046550601720809937, 0.03945664316415787, -0.015449106693267822, -0.0062018693424761295, 0.07509467005729675, 0.0029412535950541496, -0.005450569558888674, -0.02270812727510929, 0.07522810250520706, 0.07598591595888138, 0.06908681988716125, 0.006363109685480595, 0.06884128600358963, 0.010930903255939484, -0.04148317500948906, -0.008532770909368992, -0.003827750450000167, -0.015901613980531693, 0.022267255932092667, 0.01401998195797205, 0.05545280873775482, -0.025724386796355247, 0.08361619710922241, -0.015390411019325256, -0.009081290103495121, -0.019569629803299904, 0.018347103148698807, 0.013418478891253471, 0.06880182772874832, 0.015044108964502811, 0.04663980007171631, -0.04175606742501259, -0.0409821979701519, 0.03453637659549713, -0.017624113708734512, -0.015776606276631355, 0.042884062975645065, -0.0053681666031479836, 0.010011999867856503, 0.032535653561353683, 0.04997943714261055, 0.07737711817026138, -0.05899471789598465, -0.009903340600430965, -0.005900566466152668, 0.02194995991885662, -0.029918266460299492, 0.030134720727801323, -0.009601715952157974, 0.010042119771242142, -0.016823379322886467, -0.042374368757009506, -0.018230015411973, -0.010021154768764973, -0.022182749584317207, 0.03699736297130585, -0.024602841585874557, -0.008167484775185585, -0.00779652688652277, 0.0018654537852853537, -0.023333832621574402, -0.052829716354608536, -0.03131220489740372, -0.061660394072532654, -0.05783833935856819, -0.02328406646847725, 0.024128036573529243, 0.01827908307313919, -0.03325836360454559, -0.0072576869279146194, -0.043677154928445816, -0.007161309011280537, 0.04472334682941437, -0.043024107813835144, -0.00518052326515317, -0.00014869308506604284, 0.02547096461057663, 0.012258028611540794, 0.011689134873449802, 0.05015513673424721, 0.01153333205729723, -0.003482819302007556, -0.031789928674697876, 0.03400476649403572, 0.042958155274391174, 0.03125813230872154, -0.028182728216052055, -0.07911165058612823, -0.0002366334229009226, 0.02315361239016056, -0.0033249647822231054, -0.07238975167274475, 0.008051634766161442, 0.03961712121963501, 0.02648838236927986, 0.03787558898329735, -0.00209289463236928, 0.006217209622263908, -0.031132416799664497, 0.0073855286464095116, -0.008055565878748894, -0.0012263316893950105, 0.03675564005970955, -0.020561767742037773, 0.09197725355625153, 0.01943936012685299, -0.015393134206533432, -0.011720193549990654, -0.024082571268081665, 0.0015896884724497795, -0.013231956399977207, -0.04104370251297951, -0.04508919268846512, -0.04176536947488785, -0.08128384500741959, -0.006379337050020695, 0.01548473909497261, -0.004440885502845049, -0.02943173423409462, 0.03144830837845802, 0.03439627215266228, 0.009857558645308018, 0.04445460066199303, -0.05315960571169853, 0.030095310881733894, -0.006328843999654055, -0.006356355734169483, -0.015658894553780556, -0.01269004587084055, -0.036380939185619354, 0.010394840501248837, 0.003374663647264242, -0.03873607888817787, -0.010755721479654312, -0.016271596774458885, 0.029974626377224922, 0.01777823455631733, -0.0023029539734125137, 0.01661384105682373 ]
[ -0.042963068932294846, -0.04569661617279053, -0.04948080703616142, -0.027794674038887024, 0.053338613361120224, -0.06491978466510773, 0.01686745509505272, 0.05103296786546707, 0.0007068511331453919, -0.026436781510710716, 0.016798676922917366, -0.04102985933423042, -0.0042051030322909355, -0.018259013071656227, 0.0934002622961998, -0.0015780951362103224, -0.007888052612543106, -0.10497986525297165, -0.0167734045535326, 0.02974645048379898, -0.03011615201830864, -0.03447840362787247, -0.007144691422581673, -0.044930629432201385, 0.011342883110046387, 0.01952296309173107, 0.04084372892975807, -0.03934673219919205, -0.016691502183675766, -0.15658091008663177, 0.025411710143089294, 0.008481432683765888, 0.04162817448377609, 0.002779392758384347, 0.017935190349817276, 0.0489368662238121, 0.03438896685838699, -0.021932139992713928, 0.0060440548695623875, 0.052957627922296524, 0.009980385191738605, -0.013414314948022366, -0.06142071262001991, -0.019509049132466316, 0.07747223228216171, 0.016747063025832176, -0.01572391763329506, -0.010503587312996387, -0.04304815083742142, 0.0027066052425652742, -0.035990554839372635, -0.006833706982433796, -0.005792496260255575, 0.0016290986677631736, -0.001441504922695458, 0.04322528466582298, 0.04232678562402725, 0.0759565681219101, 0.02826213836669922, 0.028079386800527573, 0.041839879006147385, 0.00026726245414465666, -0.11925671249628067, 0.08894100785255432, 0.006847985554486513, 0.020916791632771492, -0.04500921443104744, -0.008247178047895432, 0.00017540817498229444, 0.07902227342128754, 0.04884525015950203, 0.0027091337833553553, -0.021016540005803108, 0.0431741401553154, 0.0012261223746463656, 0.03324514627456665, 0.02731730043888092, 0.019835812970995903, 0.018203144893050194, -0.052583880722522736, -0.0259235892444849, 0.025217188522219658, -0.032401859760284424, -0.011900719255208969, -0.0611211396753788, 0.021505562588572502, -0.018064748495817184, 0.07199310511350632, 0.005868021864444017, 0.041318949311971664, 0.04143379256129265, 0.028397023677825928, 0.050839394330978394, 0.007714820094406605, -0.08172322064638138, -0.0442192368209362, 0.014899896457791328, 0.017337974160909653, -0.03288507089018822, 0.42780908942222595, 0.02055034600198269, 0.007460692897439003, 0.06620039790868759, 0.06857797503471375, -0.0012037978740409017, -0.019973572343587875, 0.002066479530185461, -0.08130069077014923, 0.042883798480033875, -0.01919933781027794, 0.0016236917581409216, -0.013313830830156803, 0.04453805461525917, -0.07731805741786957, 0.02169882506132126, 0.004705903586000204, 0.028459923341870308, 0.05010463669896126, -0.013205312192440033, 0.020423516631126404, -0.02082660235464573, 0.01603787951171398, 0.043743543326854706, 0.0009082421311177313, 0.008012519218027592, 0.016402656212449074, 0.017669880762696266, 0.05321117118000984, 0.0274202898144722, 0.03951479494571686, 0.036145854741334915, 0.032654568552970886, -0.09259911626577377, 0.03142784535884857, 0.005367407575249672, 0.00866523664444685, -0.01490433793514967, -0.02335316874086857, -0.03727729991078377, 0.03474125266075134, -0.019257213920354843, -0.025977447628974915, 0.02254738099873066, -0.013576402328908443, -0.03701748326420784, 0.11129242926836014, -0.0033533659297972918, -0.03207913786172867, -0.012122129090130329, -0.02974051795899868, 0.01878378726541996, 0.0459793321788311, -0.014743817038834095, -0.06193864345550537, 0.01000197883695364, 0.004798655863851309, 0.09150862693786621, -0.021034017205238342, -0.0756504088640213, 0.02252470888197422, -0.00013829430099576712, -0.025204671546816826, -0.02857966721057892, 0.0424557588994503, 0.05309721827507019, -0.131448894739151, 0.011823678389191628, 0.009681610390543938, 0.02644970826804638, -0.07435665279626846, 0.02513789013028145, 0.01755799911916256, -0.042158666998147964, -0.026409346610307693, 0.051988255232572556, -0.018437912687659264, -0.024724463000893593, -0.007956165820360184, 0.04443533718585968, 0.01767529547214508, -0.0075020743533968925, -0.021450230851769447, -0.035725660622119904, -0.001178861828520894, -0.07489285618066788, -0.05165674537420273, -0.044527243822813034, -0.0018602806376293302, -0.036146100610494614, -0.020804021507501602, -0.0030601380858570337, 0.010368432849645615, -0.09633107483386993, 0.06036798655986786, -0.035477686673402786, -0.025361480191349983, 0.012948533520102501, -0.009873859584331512, -0.01453135721385479, -0.01123220194131136, -0.036186881363391876, -0.005402726121246815, -0.050789088010787964, 0.03818661719560623, -0.06323927640914917, 0.037876732647418976, 0.06657654792070389, -0.03342427313327789, 0.11832738667726517, 0.03488949313759804, -0.021885335445404053, -0.02120903693139553, -0.00782193336635828, 0.01164776086807251, -0.0118442103266716, -0.01702464185655117, 0.018665147945284843, -0.027393057942390442, 0.01563434489071369, 0.03915609046816826, -0.033332329243421555, 0.013006757944822311, -0.02105855569243431, -0.3476906716823578, -0.0606771744787693, -0.019354285672307014, 0.006929392926394939, 0.003163906978443265, -0.04049030318856239, 0.012830869294703007, -0.044718675315380096, 0.01408862043172121, 0.027138862758874893, 0.10015428066253662, -0.002065117470920086, 0.016785036772489548, -0.08071558177471161, 0.017035899683833122, 0.027454763650894165, -0.026251131668686867, 0.0006286488496698439, 0.015032588504254818, -0.002879478968679905, -0.017565758898854256, -0.05050356313586235, -0.016910364851355553, -0.0604112334549427, 0.005721369292587042, -0.015735000371932983, 0.09845663607120514, 0.05391978845000267, 0.020003153011202812, -0.04146629571914673, 0.03908388689160347, 0.00015220942441374063, -0.005914931185543537, -0.1305484026670456, 0.010773172602057457, -0.00977499783039093, 0.04158388450741768, -0.0016411966644227505, 0.00490133510902524, -0.028303492814302444, -0.04736804962158203, 0.009063909761607647, -0.04493773356080055, -0.04743552207946777, -0.04764150083065033, 0.02060813643038273, -0.04283624887466431, -0.015306609682738781, -0.0015806189039722085, 0.07118385285139084, 0.01681850105524063, 0.005711866542696953, 0.015202981419861317, 0.01331236120313406, -0.015322888270020485, -0.058212026953697205, -0.06947159022092819, 0.0047708796337246895, 0.017873747274279594, 0.04351437836885452, 0.013847891241312027, 0.05046699941158295, 0.020156744867563248, -0.07390405982732773, 0.010553993284702301, -0.0020168013870716095, -0.04769926518201828, 0.008160579949617386, 0.028505144640803337, -0.03731152042746544, -0.02166440151631832, 0.10388236492872238, -0.01164146140217781, 0.05006764084100723, 0.03263523429632187, 0.00461566774174571, -0.01767880842089653, 0.0015844772569835186, 0.02214847318828106, 0.01636369712650776, 0.03507723659276962, -0.041402269154787064, 0.0762760266661644, -0.03366998955607414, -0.04293334111571312, 0.051939137279987335, 0.013621952384710312, -0.05035865306854248, 0.05118958279490471, 0.02147279866039753, -0.015125371515750885, 0.01020992174744606, -0.03485475108027458, -0.06194111704826355, 0.06113574281334877, -0.013813878409564495, -0.23188725113868713, 0.02421104721724987, 0.021821361035108566, 0.0637522041797638, 0.016773678362369537, -0.010370489209890366, 0.04541603475809097, -0.041738320142030716, 0.005494826938956976, -0.008273470215499401, 0.03826745226979256, 0.05354760214686394, 0.0005327293183654547, 0.0010128237772732973, 0.008837501518428326, 0.012683798559010029, 0.005691859405487776, 0.003208731533959508, -0.03591239079833031, 0.015480990521609783, 0.04014890268445015, -0.039929669350385666, 0.16596193611621857, 0.028432602062821388, -0.002151518128812313, 0.030817506834864616, -0.03165961056947708, 0.024805311113595963, 0.06090820953249931, -0.01353542786091566, -0.0205451138317585, 0.01719050109386444, -0.014551441185176373, 0.019670924171805382, 0.03188593313097954, -0.08939942717552185, -0.014133308082818985, 0.009268865920603275, 0.01689416915178299, -0.002623185748234391, -0.00046017655404284596, 0.023326892405748367, -0.025644995272159576, 0.03503281995654106, 0.05348245054483414, -0.02824036031961441, 0.0012793962378054857, -0.028837669640779495, -0.07414379715919495, -0.001070691621862352, -0.04199520871043205, -0.0523657463490963, -0.02822585217654705, 0.012926298193633556, 0.01688367873430252, 0.09158053249120712, 0.015345669351518154, -0.033626582473516464, 0.027842501178383827, -0.003710774937644601, -0.031246742233633995, -0.03728843852877617, 0.07653778791427612, -0.0055425455793738365, 0.04148200526833534 ]
[ 0.0048351590521633625, 0.0637211799621582, -0.013827912509441376, 0.007330162450671196, 0.008354195393621922, -0.015323425643146038, -0.008683430962264538, 0.021938540041446686, 0.001881096512079239, -0.005989369470626116, 0.005424209404736757, 0.014925731346011162, 0.06212664023041725, -0.020176729187369347, 0.019697243347764015, -0.031092926859855652, -0.03311687335371971, -0.006537712644785643, 0.03907128423452377, -0.07866360992193222, -0.04435361176729202, 0.00952930934727192, 0.016696764156222343, 0.022925611585378647, -0.0017833196325227618, -0.01500199269503355, -0.02784784696996212, -0.04225417971611023, 0.017165735363960266, -0.08890978991985321, -0.02607068605720997, -0.03332924842834473, -0.013758625835180283, -0.012979289516806602, -0.04042423143982887, 0.031078055500984192, 0.009152953512966633, 0.01574033498764038, -0.00010970519360853359, 0.02884715236723423, 0.007313703186810017, -0.04173111170530319, -0.045068807899951935, 0.0002436979120830074, -0.03383834287524223, 0.018697191029787064, 0.024546047672629356, -0.04295177757740021, -0.009782024659216404, 0.0010914673330262303, -0.05313143879175186, 0.0008831416489556432, -0.006055857520550489, 0.02554744854569435, -0.04602614417672157, -0.00043130607809871435, -0.02353219874203205, -0.007219448685646057, 0.03093595616519451, -0.010478612966835499, 0.03009205497801304, -0.029761018231511116, 0.001670950441621244, -0.0007419002940878272, 0.0007160318200476468, -0.012599525973200798, -0.01627217046916485, 0.025483660399913788, 0.022824425250291824, -0.006155628710985184, 0.034502577036619186, 0.05755225941538811, -0.023281525820493698, -0.03307076916098595, -0.0293800700455904, -0.007904746569693089, 0.046222586184740067, -0.025901958346366882, 0.003968274220824242, 0.020712127909064293, 0.003371324623003602, 0.003437803126871586, -0.0011642721947282553, 0.007200533989816904, 0.0007806653738953173, 0.027436522766947746, -0.0010696080280467868, -0.0003850320354104042, -0.015471309423446655, 0.03728540614247322, -0.01011585257947445, 0.02882080152630806, 0.002145292703062296, -0.015164751559495926, -0.0890096053481102, 0.015606211498379707, -0.015572943724691868, -0.04656214267015457, -0.025458307936787605, 0.8255258202552795, -0.023924697190523148, -0.03641234338283539, 0.02043733559548855, 0.0013616008218377829, 0.027512598782777786, 0.00017495662905275822, -0.002716897753998637, -0.03966227173805237, 0.04538698121905327, 0.03744601458311081, 0.017629873007535934, 0.03193817287683487, -0.01977960206568241, 0.02177577093243599, 0.028589382767677307, 0.014868875965476036, 0.01316685602068901, 0.033454690128564835, 0.019691554829478264, 0.029975993558764458, 0.03805762156844139, 0.008000368252396584, -0.0028772198129445314, -0.006485342048108578, 0.01605764590203762, -0.12319264560937881, -0.0018939675064757466, -6.668954141039162e-33, 0.06564121693372726, 0.014813680201768875, 0.023693911731243134, 0.017174284905195236, 0.0006443009478971362, -0.0023749773390591145, 0.008555339649319649, -0.01627659611403942, -0.05839008465409279, -0.02889927290380001, -0.023728100582957268, -0.0005349682760424912, 0.025163862854242325, 0.0018316158093512058, 0.008639175444841385, -0.028768382966518402, -0.021419811993837357, 0.032743170857429504, -0.0019637432415038347, -0.0010195887880399823, -0.01948467642068863, 0.027377454563975334, -0.029727047309279442, 0.04498550668358803, -0.011820822954177856, 0.017913086339831352, 0.0016162297688424587, -0.007114554289728403, -0.007833565585315228, -0.03343983367085457, -0.03513477370142937, 0.03750702366232872, -0.0013185295974835753, -0.028445595875382423, 0.05500238388776779, -0.06108750402927399, -0.008389178663492203, 0.00012587498349603266, -0.047894977033138275, -0.06555352360010147, 0.0007147754658944905, 0.02240697667002678, -0.016497902572155, -0.05402397736907005, -0.04257560521364212, -0.010514497756958008, 0.0026591550558805466, 0.0004342193133197725, 0.00011817771883215755, 0.027694106101989746, 0.024724235758185387, 0.0026278728619217873, -0.021042579784989357, -0.0234304778277874, -0.012471475638449192, -0.022956538945436478, -0.03130127489566803, 0.005978480912744999, 0.04631270840764046, -0.014334420673549175, 0.04864436015486717, -0.0038002575747668743, 0.005163209512829781, 0.0347871333360672, 0.02388283796608448, 0.00492952112108469, -0.0002709799155127257, -0.014792028814554214, 0.02601413056254387, -0.0006850906065665185, -0.05616617575287819, 0.03456534445285797, -0.010912972502410412, -0.008933909237384796, 0.010969721712172031, -0.03906306251883507, 0.007878106087446213, -0.018457423895597458, 0.009645032696425915, 0.04344325140118599, 0.026408178731799126, -0.031168317422270775, 0.020958276465535164, -0.04817643761634827, -0.022500259801745415, -0.002516217064112425, 0.030802836641669273, 0.015506891533732414, -0.003450812539085746, 0.023723330348730087, 0.03462578356266022, 0.059598252177238464, -0.0184160303324461, 0.026802897453308105, -0.0679200068116188, 6.391083439552097e-33, -0.0001744418404996395, -0.024344181641936302, -0.01123146153986454, 0.0017835209146142006, 0.03264051675796509, -0.0010869598481804132, 0.00890239980071783, 0.0032465660478919744, -0.019383378326892853, 0.038412418216466904, 0.029905211180448532, -0.031235530972480774, -0.05635194107890129, -0.00931172538548708, 0.08541466295719147, -0.03466320037841797, 0.018164733424782753, -0.03314775228500366, -0.009719868190586567, -0.023018158972263336, -0.032734714448451996, -0.02253761515021324, -0.0025938719045370817, 0.018240582197904587, 0.01621965691447258, 0.03772848844528198, 0.004356207326054573, 0.0064799170941114426, -0.0069471863098442554, -0.0110818175598979, -0.006288251373916864, -0.05639132112264633, 0.0051684207282960415, 0.01896374672651291, 0.013969318941235542, 0.021156392991542816, -0.02151789516210556, 0.0017458004876971245, 0.04530031234025955, -0.018478859215974808, 0.07657501846551895, 0.004614376928657293, 0.016676703467965126, 0.03942916914820671, -0.033185772597789764, -0.001067286473698914, 0.00004237396569806151, -0.013496211729943752, 0.001565821934491396, 0.0395115502178669, 0.03830036148428917, 0.033309295773506165, -0.02634746953845024, 0.0016981150256469846, 0.007349485531449318, -0.030385499820113182, 0.012871512211859226, 0.008824381045997143, -0.04540666565299034, -0.010920054279267788, -0.01879100315272808, -0.031247777864336967, 0.002456693910062313, 0.04432006925344467, -0.037534404546022415, -0.031993139535188675, -0.06384610384702682, 0.01311157364398241, -0.016738632693886757, 0.011006560176610947, 0.012835326604545116, -0.007222181651741266, -0.003472457639873028, 0.0013498037587851286, 0.054811786860227585, -0.05880747362971306, -0.015338067896664143, -0.0027643844950944185, -0.031967077404260635, 0.009315254166722298, 0.00004755734698846936, 0.03388981148600578, 0.032064203172922134, -0.00044471287401393056, -0.009027143009006977, 0.011467593722045422, 0.003923968877643347, 0.052029285579919815, 0.037806082516908646, 0.012483944185078144, 0.028288792818784714, -0.013336126692593098, 0.0029971986077725887, 0.010867155157029629, 0.024779798462986946, -1.2580726682642762e-8, -0.03169786185026169, 0.0036061969585716724, -0.004570262040942907, 0.043357402086257935, -0.010497177951037884, 0.043147169053554535, 0.004080461338162422, -0.004560908768326044, 0.019114382565021515, 0.029485460370779037, 0.007781517691910267, -0.004104385618120432, -0.02122795581817627, 0.00524933123961091, 0.016442032530903816, -0.005169744603335857, -0.06075301393866539, -0.039789583534002304, 0.03215312212705612, 0.008260204456746578, -0.010649105533957481, 0.012676351703703403, -0.005646334961056709, -0.006391255650669336, 0.019131338223814964, 0.017503347247838974, -0.025420011952519417, -0.07626540213823318, -0.018387608230113983, -0.017504896968603134, 0.0016477277968078852, -0.046021491289138794, -0.06790714710950851, -0.001967152114957571, -0.018806781619787216, -0.03410027176141739, -0.005646699108183384, -0.0207852553576231, 0.0011504548601806164, 0.03887705132365227, -0.013609109446406364, 0.03104851208627224, -0.01230256725102663, -0.03983449190855026, -0.038481611758470535, 0.01087944582104683, -0.024993764236569405, 0.004846194759011269, 0.014009485952556133, -0.02715686522424221, -0.02010611817240715, -0.010219733230769634, -0.010960807092487812, 0.04858960211277008, 0.02999432384967804, -0.018265970051288605, 0.025312988087534904, -0.049934033304452896, -0.017057310789823532, -0.0418543703854084, 0.047158628702163696, 0.01994968019425869, -0.027073295786976814, -0.0014879250666126609 ]
pythonneo4j-finding-interesting-computer-sciency-people-to-follow-on-twitter
https://markhneedham.com/blog/2015/03/11/pythonneo4j-finding-interesting-computer-sciency-people-to-follow-on-twitter
false
2015-03-29 00:31:37
InetAddressImpl#lookupAllHostAddr slow/hangs
[ "software-development" ]
[ "Software Development" ]
Since I upgraded to Yosemite I've noticed that attempts to resolve localhost on my home network have been taking ages (sometimes over a minute) so I thought I'd try and work out why. This is what my initial +++<cite>+++/etc/hosts+++</cite>+++ file looked like based on the assumption that my machine's hostname was +++<cite>+++teetotal+++</cite>+++: [source,bash] ---- $ cat /etc/hosts ## # Host Database # # localhost is used to configure the loopback interface # when the system is booting. Do not change this entry. ## 127.0.0.1 localhost 255.255.255.255 broadcasthost ::1 localhost #fe80::1%lo0 localhost 127.0.0.1 wuqour.local 127.0.0.1 teetotal ---- I setup a little test which replicated the problem: [source,java] ---- import java.net.InetAddress; import java.net.UnknownHostException; public class LocalhostResolution { public static void main( String[] args ) throws UnknownHostException { long start = System.currentTimeMillis(); InetAddress localHost = InetAddress.getLocalHost(); System.out.println(localHost); System.out.println(System.currentTimeMillis() - start); } } ---- which has the following output: [source,text] ---- Exception in thread "main" java.net.UnknownHostException: teetotal-2: teetotal-2: nodename nor servname provided, or not known at java.net.InetAddress.getLocalHost(InetAddress.java:1473) at LocalhostResolution.main(LocalhostResolution.java:9) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:606) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:134) Caused by: java.net.UnknownHostException: teetotal-2: nodename nor servname provided, or not known at java.net.Inet6AddressImpl.lookupAllHostAddr(Native Method) at java.net.InetAddress$1.lookupAllHostAddr(InetAddress.java:901) at java.net.InetAddress.getAddressesFromNameService(InetAddress.java:1293) at java.net.InetAddress.getLocalHost(InetAddress.java:1469) ... 6 more ---- Somehow my hostname has changed to +++<cite>+++teetotal-2+++</cite>+++ so I added the following entry to +++<cite>+++/etc/hosts+++</cite>+++: [source,text] ---- 127.0.0.1 teetotal-2 ---- Now if we run the program we see this output instead: [source,text] ---- teetotal-2/127.0.0.1 5011 ---- It's still taking 5 seconds to resolve which is much longer than I'd expect. After break pointing through the code it seems like it's trying to do an IPv6 resolution rather than IPv4 so I added an +++<cite>+++/etc/hosts+++</cite>+++ entry for that too: [source,text] ---- ::1 teetotal-2 ---- Now resolution is much quicker: [source,text] ---- teetotal-2/127.0.0.1 6 ---- Happy days!
null
null
[ -0.00388648291118443, -0.0170857273042202, -0.05407877266407013, 0.012504742480814457, 0.08073064684867859, -0.011292831040918827, 0.04964426904916763, 0.022779343649744987, -0.011331676505506039, -0.039464883506298065, -0.012047585099935532, -0.011707388795912266, -0.06044146418571472, 0.01346833910793066, -0.003527099033817649, 0.07444658875465393, 0.08770711719989777, -0.02435969188809395, 0.00498424656689167, -0.0017177321715280414, 0.006494848523288965, 0.057637669146060944, -0.0017488697776570916, 0.05784084275364876, -0.0003162061329931021, 0.004924790933728218, -0.0023953039199113846, 0.0069687869399785995, -0.066704161465168, 0.006171403918415308, 0.027683312073349953, -0.012225990183651447, 0.029576679691672325, -0.0241687148809433, -0.002958577824756503, -0.006843985989689827, 0.000838684500195086, 0.0096995048224926, 0.018088677898049355, 0.013784493319690228, -0.06352715194225311, 0.029599586501717567, -0.028653863817453384, 0.015120861120522022, -0.021745646372437477, 0.015215493738651276, -0.001162675442174077, 0.012919126078486443, 0.0059354850091040134, 0.021370531991124153, -0.08670789748430252, 0.04040563851594925, -0.030408354476094246, 0.0028034525457769632, 0.018979597836732864, 0.027902089059352875, 0.019158318638801575, -0.09611332416534424, 0.03818929195404053, -0.015632741153240204, -0.005941301118582487, -0.005772410426288843, 0.0019137554336339235, 0.01628459431231022, -0.012507297098636627, -0.0004532736202236265, 0.011618541553616524, 0.0337696447968483, -0.057103127241134644, -0.013141794130206108, -0.02041018009185791, -0.009044254198670387, -0.03108908422291279, -0.02212386019527912, 0.03342648595571518, -0.04078114405274391, -0.007578596938401461, 0.0162145234644413, 0.009245779365301132, 0.060954682528972626, -0.03525684028863907, -0.020048534497618675, 0.038493067026138306, 0.04099666699767113, 0.036418914794921875, -0.04110772907733917, -0.05916798487305641, -0.011967376805841923, -0.06444060057401657, 0.06038721650838852, 0.03800247982144356, -0.03372823819518089, 0.006515843793749809, 0.0021022558212280273, -0.0068859742023050785, 0.0007576296920888126, 0.05259852483868599, -0.005915406160056591, 0.01574195735156536, -0.015276513062417507, -0.03520400822162628, -0.010669379495084286, 0.018771247938275337, 0.05058727785944939, -0.04946480691432953, -0.015521632507443428, -0.011500373482704163, -0.007391253020614386, -0.006904236506670713, -0.020338179543614388, -0.021009499207139015, 0.040076855570077896, -0.010020586661994457, -0.015084484592080116, -0.062495291233062744, 0.07108986377716064, -0.0022613597102463245, -0.05126284062862396, 0.02096143551170826, 0.045940179377794266, 0.014771155081689358, 0.03695238381624222, -0.02066926658153534, 0.06590723991394043, -0.017065536230802536, 0.032350290566682816, 0.011369682848453522, 0.045702386647462845, -0.018358109518885612, -0.05963248759508133, -0.013095015659928322, 0.05878349021077156, 0.04663039743900299, 0.01714695245027542, -0.010108111426234245, -0.011948355473577976, -0.007549777626991272, 0.007754512131214142, 0.023705696687102318, 0.023087501525878906, -0.03808942437171936, -0.053317662328481674, -0.005326167214661837, 0.0265045166015625, 0.009122819639742374, 0.02711193636059761, 0.019599322229623795, -0.043039269745349884, 0.0031700788531452417, 0.029778338968753815, -0.0006053962279111147, 0.044064316898584366, 0.046548087149858475, -0.022102292627096176, -0.01952560991048813, 0.09033793956041336, 0.02332770638167858, 0.02657589502632618, -0.054303742945194244, 0.012479739263653755, 0.03538253903388977, 0.05055534094572067, -0.0026398212648928165, 0.020626891404390335, 0.0347929485142231, 0.016006924211978912, -0.00853362213820219, 0.027737118303775787, 0.053084854036569595, -0.00015063559112604707, -0.06643092632293701, -0.08705097436904907, 0.05803021788597107, -0.017732607200741768, -0.017933348193764687, 0.009112820960581303, 0.08309675753116608, 0.012661543674767017, 0.026105748489499092, 0.011414260603487492, -0.06367045640945435, 0.021264027804136276, -0.016579648479819298, 0.02157844603061676, 0.03323334455490112, 0.0004972760216332972, 0.04991236701607704, 0.010931940749287605, 0.01834738627076149, -0.002701603341847658, -0.06090159714221954, -0.055474653840065, -0.023410333320498466, 0.01542453933507204, 0.03208674490451813, -0.018359027802944183, -0.027760500088334084, 0.06644454598426819, 0.02387170121073723, 0.006148684769868851, 0.022415105253458023, 0.004406915046274662, 0.016298018395900726, -0.07685182243585587, -0.06889545172452927, 0.04673127084970474, 0.004253446124494076, -0.036895789206027985, -0.0006450518267229199, -0.010847467929124832, -0.024690235033631325, -0.002447935752570629, 0.04426299035549164, 0.013139082118868828, 0.04473923146724701, 0.02498815394937992, 0.02457538992166519, -0.049089256674051285, 0.021375097334384918, -0.048398468643426895, 0.017552798613905907, 0.00897526741027832, -0.01819535531103611, -0.0049898819997906685, 0.01839352585375309, 0.11012359708547592, 0.035174570977687836, -0.013228320516645908, -0.052133794873952866, 0.05288805067539215, 0.02294667437672615, -0.05750006437301636, -0.004198055248707533, -0.028034772723913193, 0.012994813732802868, 0.023397354409098625, -0.007947200909256935, -0.013477951288223267, 0.007291542366147041, -0.027910452336072922, -0.004509695339947939, 0.061562780290842056, -0.02685082145035267, 0.05677051097154617, 0.0055708736181259155, -0.05285186693072319, 0.010188260115683079, -0.045448776334524155, -0.05742377042770386, -0.02137712948024273, 0.03062248043715954, -0.018395183607935905, 0.0424419566988945, -0.029688715934753418, -0.03294720500707626, -0.02009758912026882, -0.05745382234454155, 0.05065678060054779, 0.022361885756254196, 0.07105034589767456, -0.01922747492790222, 0.07811512053012848, -0.02182752639055252, -0.01609489880502224, -0.008809194900095463, -0.05746002495288849, -0.00718626007437706, 0.01346202939748764, 0.004694431088864803, -0.007621353026479483, -0.0031484062783420086, -0.004506787750869989, 0.014784930273890495, -0.021985100582242012, 0.0016409152885898948, -0.0022600675001740456, 0.02471626177430153, 0.010624203830957413, -0.0020927637815475464, -0.02379668690264225, -0.03560754284262657, 0.020071515813469887, -0.04233575984835625, -0.03268345817923546, 0.023693837225437164, -0.0634036511182785, 0.041297875344753265, -0.05695732682943344, -0.07078521698713303, -0.006319593638181686, 0.04322817549109459, 0.034288037568330765, 0.015003763139247894, 0.022205648943781853, 0.06392418593168259, 0.012250196188688278, 0.02896261215209961, 0.0373208187520504, -0.008218114264309406, 0.03893051669001579, -0.012041003443300724, -0.009534910321235657, -0.009662573225796223, -0.007111795246601105, -0.028387125581502914, -0.030622918158769608, 0.015440830029547215, -0.03464895859360695, -0.254319429397583, 0.04227973520755768, -0.02014780230820179, -0.06458264589309692, 0.017030585557222366, -0.03333503380417824, 0.015042873099446297, -0.03992515802383423, -0.025117214769124985, 0.03225889429450035, -0.021454503759741783, -0.04159094765782356, -0.006160361226648092, 0.015994323417544365, -0.043968938291072845, 0.013838527724146843, 0.01710091531276703, -0.05043964087963104, -0.016902664676308632, -0.011283274739980698, 0.016150400042533875, -0.052853770554065704, 0.0011391597799956799, 0.06286434084177017, -0.006764410063624382, 0.07957737892866135, -0.027524715289473534, 0.053761329501867294, -0.0127695482224226, 0.01103717926889658, 0.03486355394124985, -0.04137829691171646, 0.003361981827765703, -0.02090565301477909, -0.03594988211989403, -0.0031093901488929987, 0.007205148693174124, -0.005450922530144453, 0.022600317373871803, 0.03371535614132881, -0.05812906473875046, -0.049037616699934006, -0.006534748710691929, -0.005878967233002186, 0.044809792190790176, -0.025452125817537308, -0.05065574496984482, -0.006905311718583107, -0.037673916667699814, 0.08535540103912354, -0.05291815847158432, -0.030585622414946556, 0.029038390144705772, 0.028064604848623276, -0.034494347870349884, -0.04244616627693176, -0.02176911011338234, -0.007348908111453056, -0.03613624721765518, -0.03540576621890068, -0.0012241530930623412, -0.013467829674482346, -0.02773345820605755, -0.05182468891143799, -0.01091685239225626, -0.074831023812294, -0.06215623766183853, 0.00939923245459795, 0.055495575070381165, 0.00296037713997066, -0.02654612436890602, 0.01314604002982378, -0.015576877631247044, -0.12496055662631989, -0.030700258910655975, -0.05440865829586983, -0.07605566829442978, -0.007488366216421127, -0.016669729724526405, 0.01968798041343689, -0.03673413023352623, 0.006631767842918634, -0.018711647018790245, -0.002099717501550913, 0.021617723628878593, -0.015838386490941048, 0.006545982789248228, -0.026942530646920204, -0.018550671637058258, -0.007713079918175936, 0.05699027329683304, -0.033757179975509644, -0.0278788935393095, -0.023212023079395294, 0.009547499939799309, 0.00856225285679102, 0.015571228228509426, 0.013077059760689735, 0.037483036518096924, 0.045047029852867126, 0.04155490919947624, -0.051939304918050766, 0.017228998243808746, -0.05915772542357445, -0.016511183232069016, 0.009035950526595116, -0.04289187863469124, 0.040212202817201614, 0.039678625762462616, 0.01644936017692089, -0.012217236682772636, -0.033146318048238754, 0.031559813767671585, -0.06257419288158417, -0.02857651747763157, -0.013361264020204544, 0.019938204437494278, 0.01186221744865179, 0.03226355463266373, -0.024313854053616524, -0.04249085113406181, 0.008509369567036629, 0.05361625552177429, -0.037496935576200485, -0.03796558082103729, -0.006129850633442402, -0.02589680626988411, 0.002454085974022746, 0.036641307175159454, 0.0013888180255889893, -0.010161181911826134, 0.0178193561732769, 0.05391649901866913, 0.034271445125341415, -0.010645342990756035, -0.015058383345603943, -0.02122357487678528, -0.028796840459108353, -0.011012865230441093, 0.0015178635949268937, -0.023773418739438057, 0.007777131162583828, -0.036409661173820496, 0.030291005969047546, 0.05105850100517273, 0.0035905956756323576, 0.016520977020263672, -0.008184063248336315, -0.005561791360378265, 0.015215122140944004, 0.018896879628300667, -0.05890518054366112, 0.03414744511246681, -0.01902651973068714, -0.049630261957645416, 0.007611645385622978, 0.021641409024596214, -0.012679986655712128, -0.0457281768321991, -0.03125673905014992, 0.039622657001018524, -0.062418218702077866, -0.004086883272975683, 0.006331573240458965, -0.029447030276060104, 0.04844731092453003, -0.008502491749823093, 0.03008595108985901, -0.001752829528413713, -0.032820045948028564, -0.006605473812669516, -0.0023835424799472094, -0.037935059517621994, 0.02494271844625473, 0.01881769299507141, 0.0006831279606558383, 0.0072443378157913685, 0.028151415288448334, 0.04913364723324776, 0.030807361006736755, -0.0038961649406701326, 0.002000895794481039, 0.02898290753364563, 0.018163099884986877, 0.04245168715715408, -0.0345202200114727, -0.025010325014591217, -0.020706776529550552, 0.007313699461519718, -0.026310594752430916, 0.0165586918592453, 0.005597013980150223, -0.011027192696928978, 0.023045994341373444, -0.016023363918066025, -0.08942131698131561, 0.005028814077377319, -0.03238019347190857, -0.005728839430958033, 0.009475148282945156, 0.000991519307717681, 0.004737929906696081, -0.03464895114302635, 0.032387372106313705, 0.05669744685292244, -0.05315820500254631, 0.012600790709257126, -0.0047637345269322395, 0.022567132487893105, 0.023418927565217018, -0.00350759900175035, -0.05131553113460541, 0.002154936082661152, -0.005457685329020023, 0.036286842077970505, -0.03635405749082565, -0.04897214472293854, 0.003933562897145748, 0.004948001820594072, 0.0006050174124538898, 0.020560316741466522, 0.026090241968631744, 0.023644888773560524, -0.015680329874157906, -0.03443940728902817, 0.0019302404252812266, -0.0076102884486317635, 0.004331981763243675, 0.019351163879036903, -0.02867363765835762, 0.01439106184989214, -0.02393667958676815, 0.0767141655087471, 0.0006535336724482477, -0.007051926571875811, -0.02256026118993759, -0.05866684764623642, 0.007408558391034603, 0.010979273356497288, 0.0500839464366436, 0.007053192704916, 0.014540434814989567, -0.028987087309360504, 0.004440797492861748, 0.006261394824832678, 0.017841821536421776, -0.016893435269594193, -0.006231280975043774, 0.0201617069542408, 0.03757665678858757, 0.0009633844019845128, 0.0134980957955122, -0.014405726455152035, 0.011750269681215286, 0.06751208752393723, -0.09436621516942978, -0.057393502444028854, 0.015349555760622025, -0.037129342555999756, 0.02329384721815586, -0.0008896603831090033, 0.016384193673729897, -0.07075723260641098, 0.05024858936667442, 0.03602731600403786, 0.00942980870604515, 0.03468138352036476, -0.004169641062617302, 0.04866249859333038, -0.02364664524793625, -0.05169820040464401, -0.13073143362998962, -0.024710485711693764, 0.0216497965157032, 0.0013494708109647036, 0.00035636324901133776, 0.0011380801443010569, -0.034428857266902924, -0.01096249371767044, -0.06623008102178574, -0.03226196765899658, 0.0034779447596520185, -0.02103920839726925, 0.005357581190764904, 0.017509493976831436, -0.033914364874362946, 0.052242621779441833, 0.01521866675466299, -0.05209926515817642, -0.027476128190755844, -0.05070854723453522, 0.05197710171341896, 0.07035095244646072, 0.02854926697909832, -0.029329249635338783, -0.010784725658595562, 0.088742695748806, 0.04255222901701927, 0.056392569094896317, 0.029386630281805992, -0.019924486055970192, 0.052777644246816635, 0.03879552707076073, -0.015481115318834782, -0.012485837563872337, -0.006414857693016529, -0.017532018944621086, -0.061899106949567795, 0.008757795207202435, -0.007767089176923037, -0.008900033310055733, -0.029486965388059616, 0.06026932969689369, 0.023631863296031952, -0.02856125682592392, -0.0012226622784510255, -0.005199067760258913, -0.04292996600270271, -0.044370803982019424, -0.03156188875436783, 0.007811190560460091, -0.03411879390478134, 0.0699806809425354, 0.014856846071779728, 0.044808268547058105, 0.05682489275932312, -0.013023794628679752, -0.019847270101308823, -0.0077573093585669994, 0.09964704513549805, 0.08997876942157745, -0.008500573225319386, 0.019337961450219154, 0.04924784600734711, 0.009299356490373611, -0.057962566614151, 0.0009335076319985092, -0.042252011597156525, -0.0674937292933464, -0.03777913376688957, 0.006744366139173508, 0.0962492823600769, -0.010329161770641804, 0.0489506758749485, -0.02158646285533905, 0.03417880833148956, 0.03244241327047348, 0.046766042709350586, 0.052873242646455765, 0.011144404299557209, 0.009463857859373093, 0.033960744738578796, 0.020393364131450653, -0.03646153584122658, 0.015028925612568855, 0.004030843731015921, -0.021510517224669456, 0.0045555573888123035, -0.00419731717556715, 0.014893569983541965, 0.03770367428660393, -0.014447074383497238, 0.05660134553909302, -0.002504747360944748, -0.027361802756786346, 0.007392342668026686, 0.07652942836284637, 0.017833199352025986, 0.03594157472252846, -0.012158987112343311, 0.004219535738229752, -0.002038312843069434, -0.03027389943599701, -0.011957610957324505, -0.008196749724447727, -0.03498096764087677, 0.03526831045746803, -0.00850524939596653, 0.031841374933719635, 0.00972584169358015, -0.010998638346791267, -0.03370748087763786, -0.0451868437230587, -0.05766313523054123, -0.017538810148835182, -0.013230914250016212, -0.01588638499379158, 0.008793868124485016, -0.01862935535609722, -0.029405593872070312, -0.0023605881724506617, -0.02696823514997959, -0.018675023689866066, 0.029214533045887947, -0.03296603634953499, -0.01477669458836317, 0.008527392521500587, -0.003946132492274046, 0.051726143807172775, 0.05588344484567642, 0.07307112216949463, -0.027832457795739174, 0.027933254837989807, -0.02496926113963127, -0.01856481097638607, 0.07645527273416519, -0.0018076479900628328, -0.011645679362118244, -0.08030067384243011, 0.02607845887541771, 0.03790561109781265, 0.04039742797613144, -0.031070800498127937, 0.00711392518132925, 0.043682780116796494, -0.007442987523972988, 0.04819519817829132, -0.009049147367477417, 0.008699072524905205, -0.021004466339945793, -0.040250711143016815, -0.018524477258324623, 0.013905846513807774, 0.03492138162255287, 0.011480383574962616, 0.07157544791698456, 0.0371474027633667, -0.00459898030385375, -0.021921977400779724, 0.011152710765600204, 0.006392902694642544, 0.0259664598852396, -0.05054370313882828, -0.03710636869072914, -0.05421265959739685, -0.07467879354953766, -0.006682973820716143, 0.022284995764493942, -0.036794617772102356, -0.02639920823276043, 0.02763403207063675, -0.023344336077570915, -0.08206503838300705, 0.022985776886343956, -0.06021267548203468, -0.011513859033584595, -0.02035573124885559, -0.03732189163565636, 0.0032880001235753298, -0.011010860092937946, -0.0006461497396230698, 0.000688570027705282, 0.041596584022045135, -0.00414238078519702, 0.036165378987789154, -0.0019734043162316084, 0.04244149848818779, 0.04114849492907524, 0.013978138566017151, -0.013462457805871964 ]
[ -0.06357385218143463, -0.024600790813565254, 0.002761614043265581, -0.017781035974621773, 0.05100554600358009, -0.07921544462442398, -0.024452531710267067, 0.019303565844893456, 0.0029765572398900986, -0.03228636085987091, 0.002225428121164441, -0.0443902425467968, 0.004411757458001375, -0.034562136977910995, 0.11155673116445541, 0.02869567461311817, -0.03872464969754219, -0.07092214375734329, 0.012342352420091629, 0.03423552215099335, -0.011756391264498234, -0.03061421401798725, -0.02478952333331108, -0.022339196875691414, 0.008504977449774742, 0.05623231083154678, 0.04734425246715546, -0.0175178125500679, 0.015312207862734795, -0.19014225900173187, -0.001738295191898942, -0.01858419179916382, 0.009135972708463669, -0.0012774138012900949, 0.030762771144509315, 0.04978716000914574, 0.011412746272981167, -0.015745634213089943, -0.014344505965709686, 0.05691685527563095, 0.06311475485563278, 0.04641342908143997, -0.04883323982357979, -0.026824800297617912, 0.005739757791161537, -0.023163795471191406, 0.042444534599781036, -0.020010139793157578, 0.01664160005748272, -0.007498640101402998, -0.052248477935791016, 0.014734473079442978, -0.012091443873941898, -0.03403715044260025, 0.005034280940890312, 0.020935172215104103, 0.07531864941120148, 0.057490501552820206, 0.007203961256891489, 0.04676886647939682, 0.03353104367852211, -0.009375911206007004, -0.1821449249982834, 0.11004846543073654, 0.08785784989595413, 0.03293731436133385, -0.004852112848311663, 0.004176978953182697, -0.03695955127477646, 0.05649934336543083, 0.016355087980628014, -0.0020042136311531067, -0.01136441808193922, 0.07776370644569397, 0.000833974510896951, -0.01858569122850895, 0.017914531752467155, 0.03822695091366768, 0.03535768389701843, -0.051894091069698334, -0.01727559044957161, -0.037689268589019775, -0.027995143085718155, -0.04250948876142502, -0.038423772901296616, 0.00006497993308585137, -0.011099418625235558, 0.070970319211483, 0.008408407680690289, 0.01629391498863697, -0.0011917890515178442, -0.041160471737384796, 0.08193649351596832, 0.010888860560953617, -0.11491752415895462, -0.011706581339240074, 0.005816661287099123, 0.019032811746001244, -0.046017248183488846, 0.3923478126525879, -0.012371594086289406, -0.009327455423772335, 0.037922799587249756, 0.044916149228811264, 0.05424158647656441, -0.012723799794912338, 0.0016028842655941844, -0.010413250885903835, 0.01878456585109234, 0.0003561267803888768, 0.0051034120842814445, -0.001293402398005128, 0.07647047936916351, -0.01139179989695549, -0.009022527374327183, 0.016140928491950035, 0.023608015850186348, 0.007247455418109894, -0.03392169997096062, 0.02601500414311886, -0.012544943951070309, -0.01968485303223133, 0.042316269129514694, 0.00484052998945117, 0.01836954616010189, -0.027736520394682884, 0.01576421782374382, 0.027462048456072807, 0.011014530435204506, -0.004831511061638594, 0.010689462535083294, -0.06805355101823807, -0.03630763664841652, -0.017092928290367126, 0.007527016568928957, 0.04255588352680206, 0.048090700060129166, -0.07636158168315887, -0.025185231119394302, -0.008874806575477123, -0.009717501699924469, -0.029125168919563293, 0.010400108061730862, -0.007458728272467852, -0.04365238919854164, 0.07646705955266953, 0.011970212683081627, -0.008798884227871895, -0.023255951702594757, -0.07989319413900375, -0.03548179566860199, 0.021381666883826256, -0.0014239330776035786, -0.06588118523359299, -0.02082851156592369, 0.022617120295763016, 0.06816288083791733, -0.008548316545784473, -0.04853128269314766, -0.025889815762639046, -0.009512614458799362, -0.02659587375819683, -0.05289532244205475, 0.043819181621074677, 0.07421444356441498, -0.0734943151473999, -0.04167536273598671, 0.022139089182019234, -0.014298290945589542, -0.044643551111221313, -0.023728612810373306, 0.014107761904597282, 0.01293239090591669, -0.0035056995693594217, 0.02822512574493885, -0.0527443028986454, -0.006790073588490486, 0.035457778722047806, 0.0076954057440161705, 0.01782427541911602, -0.004350628703832626, -0.00954477209597826, -0.04082636907696724, 0.007259434089064598, 0.009389842860400677, -0.09290685504674911, -0.07702286541461945, 0.005030806176364422, -0.0002880543761420995, -0.05867578461766243, -0.05628831684589386, -0.07058793306350708, -0.06021551787853241, 0.06383943557739258, 0.03422193229198456, -0.044850658625364304, 0.022407997399568558, 0.005072153173387051, 0.04938444867730141, -0.05915961042046547, 0.058420330286026, 0.07181689143180847, -0.021036837249994278, -0.0009489518706686795, -0.09900302439928055, 0.032053422182798386, 0.024034161120653152, -0.012876410037279129, 0.03118170239031315, 0.0006872866069898009, -0.02647349052131176, 0.029346873983740807, 0.010475060902535915, 0.009549983777105808, 0.00923202745616436, -0.037017595022916794, -0.009457926265895367, 0.016808658838272095, 0.07475844025611877, 0.035479843616485596, -0.014642429538071156, -0.02171175926923752, -0.0126573471352458, -0.3407696783542633, -0.04952592775225639, 0.0012263640528544784, -0.017913896590471268, 0.02105560339987278, -0.061014726758003235, 0.02280636690557003, -0.028108451515436172, -0.00018372201884631068, -0.0003439218271523714, 0.08168455213308334, -0.04855768382549286, 0.03399290144443512, -0.03795123100280762, -0.005437906365841627, 0.013979025185108185, 0.021017011255025864, -0.006111907307058573, -0.018712634220719337, 0.005489565897732973, -0.004157478455454111, -0.02298271656036377, -0.02874521166086197, -0.02140895649790764, -0.021376248449087143, -0.015719113871455193, 0.09704382717609406, 0.022367093712091446, 0.08940178155899048, -0.08531611412763596, 0.0616828091442585, 0.027300501242280006, 0.02917328104376793, -0.13462474942207336, -0.024986261501908302, 0.008909027092158794, 0.018895843997597694, 0.021098285913467407, 0.02597927115857601, 0.003168746130540967, -0.07569236308336258, 0.044895920902490616, -0.05359537899494171, -0.03527652472257614, -0.017322292551398277, -0.027901679277420044, 0.002102645579725504, -0.0508183054625988, -0.031534940004348755, 0.019144834950566292, 0.01299651712179184, -0.007793602533638477, -0.007632710505276918, 0.02890028990805149, 0.051528364419937134, -0.03128918632864952, -0.04169579595327377, -0.014055350795388222, 0.04935259744524956, -0.052573591470718384, 0.057700030505657196, 0.0680868998169899, 0.03443095088005066, -0.06884900480508804, 0.012978045269846916, 0.017426278442144394, -0.01107445452362299, 0.016146672889590263, 0.03760519623756409, -0.03822851926088333, -0.02883915789425373, 0.07224186509847641, 0.01786680705845356, 0.01960952766239643, 0.005316955968737602, 0.004238730762153864, 0.023393014445900917, -0.015866827219724655, 0.008856186643242836, -0.02829376980662346, 0.02175680734217167, -0.012403899803757668, 0.05911174789071083, -0.029236698523163795, -0.01990407146513462, 0.0951545462012291, 0.003034401684999466, 0.033333733677864075, 0.0740433931350708, 0.02008749358355999, -0.013333960436284542, -0.0028637119103223085, -0.00934880506247282, -0.07091652601957321, 0.032351717352867126, 0.0026877576019614935, -0.26043078303337097, 0.03336736559867859, 0.04339570179581642, 0.03335941955447197, -0.011983506381511688, -0.003910519182682037, 0.04163757711648941, -0.0003478179278317839, 0.0018329302547499537, 0.02279643900692463, 0.02713855169713497, 0.007597710937261581, -0.0063315643928945065, -0.013364829123020172, 0.05091453716158867, 0.005858400370925665, 0.01823372393846512, 0.037714093923568726, 0.001965397270396352, -0.059486616402864456, -0.03106679581105709, -0.027467135339975357, 0.1669013500213623, -0.019390800967812538, 0.031558241695165634, 0.04503126069903374, 0.001217025681398809, 0.05521339178085327, 0.04429282620549202, 0.028882170096039772, -0.018162740394473076, -0.024540727958083153, 0.05065266788005829, -0.006859105546027422, 0.028229214251041412, -0.05808774009346962, 0.01510633435100317, 0.014334804378449917, 0.019779259338974953, -0.047951918095350266, -0.04598728567361832, 0.031242674216628075, -0.03745023161172867, 0.05462309345602989, 0.06733597069978714, -0.025224801152944565, -0.007065494079142809, -0.012025539763271809, -0.005651856306940317, 0.006522257812321186, -0.0345548652112484, -0.05581360310316086, 0.004714601673185825, 0.0014549987390637398, 0.031380828469991684, 0.04761776700615883, 0.014353523962199688, -0.020532730966806412, -0.04526085779070854, 0.011423058807849884, 0.02429513819515705, -0.01341265719383955, 0.11438852548599243, -0.0142557043582201, 0.010993823409080505 ]
[ 0.03236306086182594, 0.05035460367798805, 0.05140887573361397, 0.008832995779812336, 0.009587454609572887, -0.019565923139452934, -0.008332549594342709, 0.020657863467931747, -0.02249702252447605, -0.0003261126403231174, -0.02233906462788582, -0.020442970097064972, 0.0074167633429169655, -0.04341009259223938, -0.01962382346391678, -0.028459617868065834, 0.05817783996462822, -0.008746171370148659, 0.052694279700517654, 0.010604350827634335, -0.031512171030044556, 0.022698912769556046, 0.04547696188092232, -0.044434018433094025, 0.028647949919104576, 0.029673263430595398, -0.02474844828248024, 0.009870591573417187, 0.022797146812081337, -0.14209581911563873, -0.0347716361284256, -0.011965010315179825, -0.023495562374591827, 0.008470499888062477, 0.014057966880500317, 0.008484902791678905, 0.04489828646183014, 0.020454948768019676, -0.06212160363793373, 0.01581479050219059, 0.04921074956655502, -0.030074752867221832, 0.022900812327861786, -0.020401181653141975, -0.04553212597966194, -0.03298298269510269, -0.03058888390660286, -0.019832706078886986, -0.012141931802034378, 0.021776899695396423, 0.010676787234842777, -0.010545271448791027, 0.01841759867966175, 0.036133281886577606, 0.047665562480688095, 0.02938198857009411, -0.007089707534760237, 0.006935413461178541, 0.016492584720253944, -0.0016136098420247436, 0.007121021393686533, 0.006842511240392923, -0.05924270674586296, -0.027705542743206024, 0.013061432167887688, -0.033901676535606384, -0.007899527437984943, -0.020123949274420738, -0.021823570132255554, -0.01870003342628479, -0.0018842506688088179, 0.05284789204597473, -0.020954882726073265, 0.02072712779045105, -0.04647695645689964, 0.04695142060518265, 0.057251494377851486, -0.018686693161725998, -0.012671146541833878, -0.009564220905303955, -0.0530492402613163, 0.02272631600499153, -0.0025784207973629236, -0.010577733628451824, -0.02841590903699398, -0.027104666456580162, -0.03130444139242172, 0.021302562206983566, 0.035232849419116974, 0.01150493137538433, -0.041917458176612854, 0.01484336331486702, -0.0070938654243946075, -0.008885535411536694, -0.05880558490753174, -0.012001232244074345, 0.0023441463708877563, -0.010462065227329731, -0.009138502180576324, 0.8205467462539673, 0.0198283102363348, 0.06271716952323914, 0.03749760612845421, 0.04299464821815491, 0.03215635567903519, 0.00017424965335521847, -0.014881237410008907, 0.004331859294325113, -0.0037557778414338827, -0.02090785838663578, 0.03779531270265579, -0.004476978909224272, 0.021451273933053017, 0.027160998433828354, 0.037929683923721313, -0.013547207228839397, 0.06573246419429779, 0.01364781241863966, -0.010043343529105186, -0.023357748985290527, 0.011194013990461826, -0.011918260715901852, -0.005246730055660009, -0.026605097576975822, -0.0020819096826016903, -0.1553167998790741, 0.02335655875504017, -6.540953091810184e-33, 0.037077490240335464, -0.009846719913184643, 0.012678675353527069, -0.0008246178040280938, 0.03278045356273651, -0.03581622987985611, -0.00010851048864424229, 0.043397996574640274, 0.0012391484342515469, -0.056216754019260406, -0.022828346118330956, -0.01346721313893795, 0.030915217474102974, -0.032774411141872406, 0.027106372639536858, 0.008075420744717121, 0.029972853139042854, 0.03197834640741348, 0.01861627958714962, 0.03755621612071991, 0.014467681758105755, 0.013506109826266766, 0.013835619203746319, -0.03113042749464512, 0.005263905972242355, 0.008990755304694176, 0.0349464938044548, -0.010410288348793983, -0.0012086867354810238, -0.046543192118406296, 0.007151209749281406, -0.029479723423719406, 0.005199911072850227, -0.021902315318584442, 0.007355520036071539, -0.05136695131659508, 0.006220017094165087, -0.015249024145305157, -0.04229668900370598, -0.025571422651410103, -0.05795610323548317, 0.0169967208057642, -0.048682842403650284, 0.003571311244741082, -0.022975388914346695, -0.0021930281072854996, 0.0022273052018135786, -0.013011823408305645, -0.006849293131381273, 0.04127456247806549, 0.016222896054387093, 0.013494991697371006, -0.018697572872042656, 0.0032158452086150646, 0.019261155277490616, 0.04477624222636223, 0.0017667972715571523, 0.008335690945386887, -0.03453440964221954, 0.03138811141252518, -0.02915732003748417, -0.03297332301735878, -0.03890502452850342, 0.03329897299408913, 0.01450374536216259, 0.02458113431930542, -0.01091618649661541, 0.00038114108610898256, -0.030430100858211517, 0.00653486605733633, -0.0706474781036377, -0.012600217945873737, -0.018993010744452477, 0.010219707153737545, 0.01179729588329792, 0.014791351743042469, -0.022708965465426445, -0.03486984223127365, -0.025685323402285576, 0.012582693248987198, 0.0013747295597568154, -0.017902523279190063, -0.054242588579654694, -0.004040771164000034, -0.011558243073523045, -0.000735841051209718, 0.024130724370479584, -0.011246826499700546, 0.004324969369918108, 0.0003218711062800139, 0.02857816033065319, 0.05169760063290596, 0.030605895444750786, -0.025798892602324486, -0.07258721441030502, 6.518506292497263e-33, -0.0004922146908938885, -0.024565186351537704, -0.057871848344802856, -0.016021758317947388, -0.002545943483710289, -0.0024049070198088884, 0.013783629983663559, 0.033469006419181824, -0.06132516264915466, -0.008059229701757431, -0.018250221386551857, 0.012979541905224323, -0.00040777362301014364, 0.022587161511182785, 0.025702688843011856, 0.009220793843269348, 0.03464323282241821, 0.025598686188459396, 0.009194186888635159, 0.0173347145318985, 0.021267149597406387, 0.02199416235089302, 0.007726492825895548, -0.0033440503757447004, 0.013205106370151043, 0.035728879272937775, 0.0020235341507941484, 0.018811769783496857, -0.04611803963780403, -0.043505534529685974, 0.04749491810798645, 0.019592737779021263, 0.020009225234389305, -0.03218027949333191, -0.023490730673074722, 0.06251859664916992, 0.0036260138731449842, 0.017256932333111763, 0.01215824019163847, -0.01659518852829933, 0.0170944444835186, -0.008155264891684055, -0.020944977179169655, 0.0118277408182621, -0.032919518649578094, 0.004529894795268774, -0.028250664472579956, 0.00588294817134738, -0.041174907237291336, 0.037424031645059586, -0.01475684903562069, -0.03398790955543518, 0.0221503097563982, 0.02505641244351864, -0.006432192865759134, 0.000353877228917554, 0.0031931884586811066, 0.0096555445343256, -0.01417942252010107, 0.008717633783817291, 0.020700540393590927, -0.015167622826993465, -0.004026441834867001, 0.04612795263528824, -0.022432677447795868, 0.005778804887086153, 0.01117012556642294, -0.001541962381452322, -0.012395869009196758, 0.017972083762288094, -0.011733544990420341, -0.0060688527300953865, -0.04981090500950813, 0.04357870668172836, 0.026554910466074944, 0.008934147655963898, 0.01994076371192932, -0.004181205295026302, -0.047778718173503876, 0.019826678559184074, -0.00015423960576299578, 0.04881272837519646, -0.012960330583155155, -0.02491902932524681, 0.05455300211906433, -0.0071097915060818195, -0.06002914160490036, 0.04607873409986496, 0.010398849844932556, 0.010722150094807148, -0.03231425583362579, 0.02129821479320526, -0.0703059658408165, 0.02918238565325737, -0.025682521983981133, -1.2284179007338025e-8, -0.010212963446974754, -0.03083624690771103, -0.032749392092227936, 0.04405870661139488, -0.01955406554043293, 0.03732224926352501, -0.031372539699077606, -0.03458930179476738, -0.01186930388212204, 0.013436779379844666, -0.006194726563990116, -0.006003922317177057, 0.035675399005413055, 0.01463198009878397, 0.0055513931438326836, -0.023956121876835823, 0.03548220545053482, 0.011496875435113907, 0.020211637020111084, -0.012928071431815624, -0.000026627765691955574, 0.019444463774561882, -0.01488447468727827, 0.0481446273624897, -0.005766544956713915, -0.021090874448418617, 0.044143129140138626, -0.05410139635205269, 0.0056952787563204765, 0.036285318434238434, -0.023203445598483086, 0.006318063475191593, -0.03254164010286331, 0.0033488802146166563, -0.02212999388575554, 0.007546060718595982, 0.008406879380345345, 0.014748216606676579, 0.02039782516658306, 0.010656872764229774, -0.01525997743010521, 0.009427166543900967, -0.011363882571458817, -0.02313452772796154, 0.011346356011927128, -0.01390890870243311, -0.034406423568725586, 0.018575899302959442, 0.02599397674202919, -0.02704571932554245, -0.018540846183896065, -0.018018430098891258, 0.021548941731452942, -0.004670289810746908, 0.01913759671151638, 0.017635947093367577, -0.03210771083831787, -0.01711934618651867, 0.004424567334353924, 0.03863425925374031, 0.019765853881835938, -0.00032957684015855193, -0.04330068826675415, -0.02321939542889595 ]
inetaddressimpllookupallhostaddr-slowhangs
https://markhneedham.com/blog/2015/03/29/inetaddressimpllookupallhostaddr-slowhangs
false
2015-03-17 22:46:13
Neo4j: Detecting potential typos using EXPLAIN
[ "neo4j" ]
[ "neo4j" ]
I've been running a few intro to Neo4j training sessions recently using Neo4j 2.2.0 RC1 and at some stage in every session somebody will make a typo when writing out of the example queries. For example one of the queries that we do about half way finds the actors and directors who have worked together and aggregates the movies they were in. This is the correct query: [source,cypher] ---- MATCH (actor:Person)-[:ACTED_IN]->(movie)<-[:DIRECTED]-(director) RETURN actor.name, director.name, COLLECT(movie.title) AS movies ORDER BY LENGTH(movies) DESC LIMIT 5 ---- which should yield the following results: [source,bash] ---- ==> +-----------------------------------------------------------------------------------------------------------------------+ ==> | actor.name | director.name | movies | ==> +-----------------------------------------------------------------------------------------------------------------------+ ==> | "Hugo Weaving" | "Andy Wachowski" | ["Cloud Atlas","The Matrix Revolutions","The Matrix Reloaded","The Matrix"] | ==> | "Hugo Weaving" | "Lana Wachowski" | ["Cloud Atlas","The Matrix Revolutions","The Matrix Reloaded","The Matrix"] | ==> | "Laurence Fishburne" | "Lana Wachowski" | ["The Matrix Revolutions","The Matrix Reloaded","The Matrix"] | ==> | "Keanu Reeves" | "Lana Wachowski" | ["The Matrix Revolutions","The Matrix Reloaded","The Matrix"] | ==> | "Carrie-Anne Moss" | "Lana Wachowski" | ["The Matrix Revolutions","The Matrix Reloaded","The Matrix"] | ==> +-----------------------------------------------------------------------------------------------------------------------+ ---- However, a common typo is to write 'DIRECTED_IN' instead of 'DIRECTED' in which case we'll see no results: [source,cypher] ---- MATCH (actor:Person)-[:ACTED_IN]->(movie)<-[:DIRECTED_IN]-(director) RETURN actor.name, director.name, COLLECT(movie.title) AS movies ORDER BY LENGTH(movies) DESC LIMIT 5 ==> +-------------------------------------+ ==> | actor.name | director.name | movies | ==> +-------------------------------------+ ==> +-------------------------------------+ ==> 0 row ---- It's not immediately obvious why we aren't seeing any results which can be quite frustrating. However, in Neo4j 2.2 the 'EXPLAIN' keyword has been introduced and we can use this to see what the query planner thinks of the query we want to execute without actually executing it. Instead the planner makes use of knowledge that it has about our schema to come up with a plan that it would run and how much of the graph it thinks that plan would touch: ~~~cypher EXPLAIN MATCH (actor:Person)-[:ACTED_IN]\->(movie)\<-[:DIRECTED_IN]-(director) RETURN actor.name, director.name, COLLECT(movie.title) AS movies ORDER BY LENGTH(movies) DESC LIMIT 5 ~~~ image::{{<siteurl>}}/uploads/2015/03/2015-03-17_23-39-55.png[2015 03 17 23 39 55] The first row of the query plan describes an all nodes scan which tells us that the query will start from the 'director' but it's the second row that's interesting. The estimated rows when expanding the 'DIRECTED_IN' relationship is 0 when we'd expect it to at least be a positive value if there were some instances of that relationship in the database. If we compare this to the plan generated when using the proper 'DIRECTED' relationship we can see the difference: image::{{<siteurl>}}/uploads/2015/03/2015-03-17_23-43-11.png[2015 03 17 23 43 11] Here we see an estimated 44 rows from expanding the 'DIRECTED' relationship so we know there are at least some nodes connected by that relationship type. In summary if you find your query not returning anything when you expect it to, prefix an 'EXPLAIN' and make sure you're not seeing the dreaded '0 expected rows'.
null
null
[ 0.019427282735705376, -0.008581580594182014, -0.01500406488776207, 0.03676101565361023, 0.09732978045940399, -0.008178270421922207, 0.02636776864528656, 0.017163585871458054, 0.007326674647629261, -0.007694933097809553, -0.02074601501226425, 0.028952136635780334, -0.05958545207977295, 0.004827591590583324, -0.019337179139256477, 0.07111718505620956, 0.05129282921552658, 0.03339345380663872, 0.004405780229717493, -0.021476391702890396, 0.0032403580844402313, 0.04982418194413185, 0.009107276797294617, 0.027418196201324463, 0.044737767428159714, 0.026773693040013313, -0.03214775770902634, -0.007317707873880863, -0.05884251743555069, -0.0016006529331207275, 0.050983726978302, -0.010590522550046444, 0.014343314804136753, -0.01912418194115162, 0.030560409650206566, 0.009063747711479664, -0.03371909633278847, 0.004130857530981302, -0.014333241619169712, -0.006770188920199871, -0.05267389863729477, 0.03052624501287937, -0.013024103827774525, -0.004890588112175465, -0.046345360577106476, 0.007440686691552401, -0.06656190752983093, 0.037284255027770996, 0.00299657229334116, -0.019108641892671585, -0.08090513199567795, 0.028355877846479416, -0.01786274090409279, -0.004125816281884909, 0.012373201549053192, 0.043966226279735565, 0.017951318994164467, -0.08509095758199692, 0.052804555743932724, -0.0010430513648316264, -0.01041122991591692, -0.0020389677956700325, -0.006863673683255911, 0.006499955430626869, 0.02001752331852913, -0.03942320495843887, -0.0054001882672309875, 0.06133810430765152, -0.04519404470920563, -0.022882772609591484, 0.006957364268600941, 0.03382863476872444, -0.0030878817196935415, 0.00008817228808766231, 0.0009523649932816625, -0.03953108564019203, 0.021141095086932182, 0.062376879155635834, 0.03460674732923508, 0.050572168081998825, -0.025016969069838524, 0.019591964781284332, 0.018494242802262306, 0.038629353046417236, -0.0009155388688668609, -0.04702378809452057, -0.022606108337640762, -0.03377382457256317, -0.03598492220044136, 0.020988253876566887, 0.019908374175429344, -0.04647160321474075, 0.0003956093860324472, 0.00565516809001565, -0.021932220086455345, 0.012030689045786858, -0.009372101165354252, 0.004703989252448082, 0.030941789969801903, -0.013728558085858822, -0.040842004120349884, -0.03174576908349991, -0.0007705017342232168, 0.0027028988115489483, -0.08316774666309357, -0.03086126782000065, -0.04160822182893753, 0.0077972435392439365, 0.004634417127817869, 0.003695193212479353, -0.03531249612569809, 0.007395434193313122, -0.0079920319840312, 0.011750935576856136, -0.09065884351730347, 0.06328120827674866, 0.005069130565971136, -0.007614480331540108, -0.02421429753303528, 0.029485085979104042, 0.047211598604917526, 0.04210705682635307, 0.0025727455504238605, 0.09201064705848694, -0.021431947126984596, 0.05860092490911484, 0.02001531608402729, 0.04162666201591492, -0.019632386043667793, -0.06231436878442764, -0.012626651674509048, 0.0741501897573471, -0.003530731424689293, 0.02434651553630829, -0.010381055995821953, -0.04192202538251877, -0.01828005164861679, 0.007117358036339283, 0.03622158244252205, 0.02882559970021248, 0.022480439394712448, -0.048275478184223175, 0.01708989031612873, -0.011004170402884483, 0.05856269225478172, 0.028788762167096138, -0.046700455248355865, -0.02999432198703289, -0.006747361738234758, 0.025567708536982536, -0.000066842716478277, 0.019080856814980507, 0.05526197701692581, -0.033278465270996094, 0.013821450993418694, 0.1126486286520958, 0.028760839253664017, 0.016504643484950066, -0.006142083089798689, 0.0034316363744437695, 0.044076938182115555, 0.029214493930339813, 0.013687804341316223, 0.04248315468430519, 0.006013447418808937, -0.029656970873475075, -0.022469401359558105, 0.056784193962812424, -0.0031294850632548332, 0.040688879787921906, -0.042242005467414856, -0.06559190154075623, 0.07599228620529175, -0.04861701279878616, -0.01994648016989231, 0.03707931563258171, 0.0697636604309082, 0.027799682691693306, 0.03065839782357216, 0.0042891292832791805, -0.07662497460842133, 0.062312740832567215, -0.009822534397244453, 0.011823481880128384, 0.006436468567699194, 0.00007991510938154534, 0.07015303522348404, 0.04291265085339546, 0.0330803319811821, 0.04342636093497276, -0.0895395427942276, -0.08169618248939514, -0.013604484498500824, -0.00895982701331377, 0.05841226130723953, -0.014610939659178257, 0.020542215555906296, 0.017254987731575966, -0.000719166302587837, 0.02399505116045475, 0.000915223325137049, -0.007824137806892395, 0.024939751252532005, -0.040452249348163605, -0.05688554421067238, 0.06673769652843475, 0.03420187532901764, -0.05361936241388321, -0.04299141466617584, 0.01888113096356392, -0.020185330882668495, 0.007481631822884083, 0.02812139317393303, -0.005694590974599123, 0.04021481052041054, 0.04062594100832939, 0.025538697838783264, -0.016319306567311287, 0.01720377430319786, -0.0280062984675169, 0.05885278806090355, 0.003845273982733488, -0.05472034588456154, -0.007306535262614489, -0.009744754061102867, 0.12726564705371857, 0.047542423009872437, -0.001645393786020577, -0.06008785218000412, 0.020246658474206924, -0.006000966299325228, -0.017374280840158463, 0.015264029614627361, -0.019103894010186195, -0.018309276551008224, -0.01855415664613247, -0.009080705232918262, -0.0411999374628067, 0.008274833671748638, -0.03796233981847763, -0.00749176787212491, 0.05112212896347046, -0.04354424402117729, 0.05789613351225853, 0.011441788636147976, -0.005037431139498949, -0.003518248675391078, -0.03233985975384712, -0.05349091812968254, 0.02959580533206463, 0.009498385712504387, -0.012930269353091717, 0.04341688007116318, -0.04001294821500778, -0.00477425754070282, -0.021825630217790604, -0.0323302187025547, 0.04709993302822113, 0.06390135735273361, 0.043585970997810364, -0.021386761218309402, 0.06707902252674103, -0.039342693984508514, 0.00855604000389576, -0.008943509310483932, -0.034211743623018265, -0.03622636944055557, -0.0344659797847271, 0.015934623777866364, -0.017985381186008453, 0.02396625280380249, -0.01879253424704075, 0.02393466606736183, 0.016328876838088036, 0.03953744098544121, -0.012680660001933575, 0.035816747695207596, 0.0065705194137990475, -0.017784783616662025, -0.0318673811852932, -0.024634545668959618, 0.0431097038090229, -0.07465055584907532, -0.02360132709145546, -0.006498989183455706, -0.05524662882089615, 0.04667801782488823, -0.029749443754553795, -0.047298613935709, -0.0006605240632779896, 0.008873228915035725, 0.06268986314535141, 0.005695465952157974, -0.004522789269685745, 0.059374045580625534, 0.020317208021879196, 0.018437201157212257, 0.031092040240764618, 0.0004478304763324559, 0.05505099520087242, -0.01156098023056984, 0.0773693397641182, 0.03650093078613281, -0.022867480292916298, -0.010703888721764088, -0.02185979299247265, -0.01443740725517273, -0.014938591979444027, -0.2572089731693268, 0.05369070544838905, -0.022483935579657555, -0.012565713375806808, 0.020977020263671875, -0.038712628185749054, -0.0007504363311454654, -0.028242353349924088, -0.016356954351067543, -0.014242662116885185, -0.012981932610273361, -0.026362106204032898, -0.010781802237033844, 0.04460970684885979, 0.022763682529330254, 0.020943744108080864, -0.017557093873620033, -0.06177035719156265, 0.0025736107490956783, 0.04423603415489197, 0.009259218350052834, -0.03831419721245766, -0.007699464913457632, 0.015470203943550587, 0.026346828788518906, 0.04500684514641762, -0.09857364743947983, 0.027971919625997543, -0.06631989032030106, -0.04111142456531525, -0.009187600575387478, -0.01982947625219822, 0.006413595750927925, 0.007182412315160036, -0.025584207847714424, -0.011260494589805603, 0.036371104419231415, 0.0035803839564323425, 0.008747606538236141, 0.01954597793519497, -0.031586259603500366, -0.04084432125091553, -0.01821703091263771, -0.0020948948804289103, 0.08703974634408951, 0.003220304846763611, -0.07431037724018097, -0.023589378222823143, -0.0005600605509243906, 0.04800603538751602, -0.027299590408802032, -0.04701303690671921, -0.00004228118632454425, 0.019325625151395798, 0.015770960599184036, -0.02028440497815609, 0.009427438490092754, -0.00463103735819459, -0.05313338339328766, -0.0063933408819139, -0.009190179407596588, -0.059502337127923965, 0.009186458773911, -0.047119177877902985, -0.001956402324140072, -0.04448353871703148, -0.06205129623413086, -0.03495108708739281, 0.05339595302939415, 0.017218923196196556, -0.008312499150633812, 0.03829975426197052, -0.021684538573026657, -0.09589147567749023, -0.046273261308670044, -0.042037419974803925, -0.0010146427666768432, 0.0011270336108282208, -0.016565151512622833, 0.02510250359773636, -0.06067322939634323, -0.06635911017656326, -0.007704067509621382, -0.006268441677093506, 0.03121136873960495, -0.001537301461212337, 0.02169598452746868, -0.029988937079906464, -0.024630138650536537, 0.004938135854899883, 0.05787596479058266, -0.016656596213579178, -0.030019300058484077, 0.0043916646391153336, 0.00018874694069381803, 0.04044528305530548, 0.003946562763303518, -0.00008682359475642443, 0.022380918264389038, 0.07143756747245789, 0.04266830161213875, -0.051175765693187714, 0.03418363630771637, -0.04045714810490608, -0.029202336445450783, 0.012373439967632294, -0.03542755916714668, 0.035211753100156784, 0.018988605588674545, 0.007431999780237675, -0.0015876672696322203, 0.006288890261203051, 0.024477282539010048, -0.02529926598072052, -0.03402170538902283, -0.02697221376001835, 0.02151760272681713, 0.02783939614892006, 0.03818846866488457, -0.02476121485233307, -0.059721700847148895, 0.036814697086811066, 0.027806513011455536, -0.0008440831443294883, -0.05127638950943947, -0.042535144835710526, -0.006547110620886087, 0.002299996092915535, -0.008899787440896034, 0.013405614532530308, -0.04524989426136017, 0.03507337346673012, 0.015516434796154499, -0.012602094560861588, 0.06038452312350273, -0.023535283282399178, -0.03761649131774902, -0.01792753115296364, 0.003771783784031868, 0.0015246733091771603, 0.0010064166272059083, -0.009444215334951878, 0.0017031107563525438, 0.055485375225543976, 0.04443465545773506, 0.004561434965580702, -0.010079329833388329, -0.029707295820116997, 0.02281077951192856, 0.005030046682804823, 0.0026033692993223667, -0.026374883949756622, 0.0230936948210001, -0.05392074957489967, -0.006048510782420635, 0.003959441091865301, 0.04927612096071243, -0.0418667234480381, -0.015322769060730934, -0.02294117398560047, 0.04033539444208145, -0.04316098988056183, 0.00701412558555603, -0.006876053288578987, 0.0033685213420540094, 0.03288375586271286, -0.020865583792328835, 0.013733030296862125, -0.03867853805422783, 0.009832934476435184, -0.0030345970299094915, 0.006217385642230511, -0.028449369594454765, 0.009088953025639057, 0.010642662644386292, 0.0022469644900411367, 0.013176360167562962, 0.042426105588674545, 0.033001046627759933, 0.03429502621293068, -0.02483830228447914, 0.003135210834443569, 0.009386938065290451, 0.032775647938251495, 0.054068148136138916, 0.03903808817267418, -0.020458465442061424, -0.009000720456242561, -0.037346143275499344, -0.023960813879966736, 0.006792142055928707, 0.0003922455944120884, -0.014890814200043678, 0.0021356374491006136, -0.034195322543382645, -0.06263621151447296, 0.06344054639339447, 0.012508241459727287, 0.0017910103779286146, 0.03774421662092209, 0.023006901144981384, -0.002865301910787821, -0.020588209852576256, 0.01265557948499918, 0.053149834275245667, -0.06823009997606277, -0.023592030629515648, -0.00932883471250534, -0.015870295464992523, 0.010039452463388443, 0.023105859756469727, -0.07585932314395905, -0.039735205471515656, -0.02696446143090725, 0.018128959462046623, -0.03648402914404869, -0.05566658079624176, -0.004004265181720257, 0.012261884286999702, -0.010915568098425865, 0.03780553489923477, 0.0005002904217690229, 0.026842275634407997, -0.012343606911599636, -0.01337437890470028, 0.04050998389720917, -0.0378018356859684, -0.004427214153110981, 0.002356701996177435, -0.015620152465999126, 0.023381343111395836, -0.03732772171497345, 0.025617236271500587, 0.014801761135458946, -0.0026728275697678328, -0.022885506972670555, -0.05837947130203247, 0.0077371979132294655, -0.0009378703543916345, 0.011398548260331154, 0.013206856325268745, 0.004042340908199549, -0.028090544044971466, 0.00933241005986929, -0.02666223980486393, 0.01875215955078602, 0.004774196073412895, -0.01969066634774208, 0.0013953426387161016, 0.014230526052415371, 0.02552521601319313, 0.06804309040307999, -0.03774217516183853, -0.025929288938641548, 0.059522323310375214, -0.04288650304079056, -0.01821843907237053, -0.024498233571648598, -0.06980424374341965, 0.026460424065589905, 0.0181171502918005, 0.019831975921988487, -0.027442948892712593, 0.0291910283267498, 0.044351208955049515, 0.028441624715924263, 0.03895900398492813, -0.02097085677087307, 0.01281491294503212, -0.015272521413862705, -0.024702299386262894, -0.08049730211496353, -0.007229854818433523, 0.01903623901307583, -0.013932330533862114, -0.020036831498146057, -0.019057497382164, -0.02334805205464363, -0.0021075678523629904, -0.04656321182847023, -0.0349123440682888, 0.020522944629192352, -0.04431011900305748, 0.026051480323076248, 0.015230613760650158, -0.05424868315458298, 0.006976411212235689, 0.04016336798667908, -0.029580896720290184, -0.022687414661049843, -0.04834314435720444, 0.07425050437450409, -0.04663654416799545, 0.036074791103601456, -0.015763694420456886, -0.04188184812664986, 0.0659441277384758, 0.0522015206515789, 0.03174445405602455, 0.04182058945298195, -0.04209352284669876, 0.010281134396791458, 0.057054270058870316, -0.001109046395868063, -0.009724391624331474, 0.043257635086774826, -0.036745473742485046, -0.06534913927316666, 0.013689919374883175, -0.0038795717991888523, -0.02902442403137684, -0.042505353689193726, 0.08006548136472702, 0.012283154763281345, -0.03580738231539726, -0.048105638474226, 0.026403501629829407, -0.018487608060240746, -0.016732335090637207, -0.03530304878950119, 0.027636222541332245, -0.058249011635780334, 0.06342533975839615, -0.016274256631731987, 0.0025640903040766716, 0.07251464575529099, -0.011533387936651707, 0.0026289387606084347, 0.001183228800073266, 0.0797509104013443, 0.0808018371462822, 0.03328907489776611, -0.0011676211142912507, 0.05861344933509827, -0.019553646445274353, -0.0298627857118845, -0.0037275697104632854, -0.0341118685901165, -0.019567951560020447, -0.009145294316112995, 0.003004969097673893, 0.09619505703449249, -0.014814412221312523, 0.07231663167476654, -0.02677089534699917, -0.011934841051697731, -0.009340235963463783, -0.01297866739332676, 0.02290155366063118, 0.03564251586794853, 0.023835107684135437, 0.03899114578962326, -0.037138067185878754, -0.02833271212875843, 0.03701511770486832, 0.017160087823867798, -0.035106733441352844, 0.028050662949681282, -0.03880259767174721, -0.004849093034863472, -0.0017016180790960789, 0.04784472659230232, 0.0922330915927887, -0.007998698391020298, -0.010054124519228935, 0.00589067442342639, 0.02191798947751522, -0.015558641403913498, 0.035134561359882355, -0.015436224639415741, -0.03893711045384407, -0.019162053242325783, -0.06546494364738464, -0.03805512189865112, -0.031441718339920044, -0.05336835980415344, 0.02061053365468979, -0.027149789035320282, -0.022811289876699448, 0.007706150878220797, -0.006675059907138348, 0.006312687881290913, -0.052716273814439774, -0.04441896080970764, -0.04971786588430405, -0.06556251645088196, 0.003608624218031764, -0.013379535637795925, 0.002000480191782117, -0.029478173702955246, 0.0009499553125351667, -0.0327368900179863, -0.008221442811191082, 0.06492232531309128, -0.06452561914920807, 0.01354339998215437, 0.0031966781243681908, 0.029628412798047066, 0.004509167745709419, 0.012986695393919945, 0.04907618835568428, 0.013617627322673798, 0.0238665658980608, 0.014059295877814293, 0.004457342438399792, 0.022287189960479736, 0.005340516101568937, 0.019860759377479553, -0.07344835996627808, -0.007010865956544876, 0.023817777633666992, -0.008708098903298378, -0.07693414390087128, 0.007178287021815777, 0.048266779631376266, -0.012221286073327065, 0.039453767240047455, -0.0016441025072708726, -0.017816079780459404, -0.030476968735456467, 0.014631891623139381, 0.0065233162604272366, 0.0035295370034873486, 0.045751865953207016, -0.02722243033349514, 0.07260525226593018, 0.05218067765235901, -0.03414648026227951, -0.036379117518663406, -0.017462335526943207, -0.004902784712612629, 0.0013842287007719278, -0.045910801738500595, -0.020455773919820786, -0.04411362111568451, -0.10477627068758011, -0.030047163367271423, 0.007542482111603022, -0.014062517322599888, -0.036304034292697906, 0.001636778935790062, 0.015515340492129326, -0.04222862049937248, 0.020858807489275932, -0.021003197878599167, 0.02677863836288452, -0.026401592418551445, -0.02350754477083683, -0.04456517472863197, 0.00841506291180849, -0.006697982549667358, 0.0135287344455719, 0.010087616741657257, -0.04436541721224785, 0.005127206910401583, -0.01186253409832716, 0.025123562663793564, 0.019019832834601402, 0.033765822649002075, 0.02302379719913006 ]
[ -0.0776764526963234, 0.006382629740983248, -0.05385646969079971, -0.010765264742076397, 0.041421737521886826, -0.03761577233672142, 0.002377785975113511, -0.0132864098995924, 0.019072312861680984, -0.04278555512428284, 0.02411193773150444, -0.029371611773967743, -0.005263333208858967, 0.0332384929060936, 0.07914745807647705, -0.016066482290625572, 0.011691215448081493, -0.03914661705493927, -0.035637542605400085, 0.0517638623714447, -0.008334784768521786, -0.0250577162951231, -0.013974213972687721, -0.0320066399872303, 0.008663587272167206, 0.025810005143284798, 0.044195063412189484, -0.022339360788464546, -0.025522375479340553, -0.2214687466621399, -0.012637700885534286, 0.042761385440826416, 0.018974561244249344, 0.01056353747844696, 0.003906982485204935, 0.029999077320098877, 0.008740260265767574, -0.003141646971926093, 0.0014264824567362666, 0.004561275243759155, 0.007002668455243111, -0.003510423470288515, -0.01769670844078064, -0.03278686851263046, 0.03607865422964096, 0.02094622701406479, -0.013536706566810608, -0.01660120114684105, -0.021846061572432518, 0.017000794410705566, -0.04537321999669075, -0.01997024193406105, 0.01604709029197693, 0.00492097157984972, -0.006576779298484325, 0.03771492838859558, 0.04194691777229309, 0.06490632146596909, 0.022130364552140236, 0.04531421512365341, 0.006271917838603258, 0.008716724812984467, -0.11816760897636414, 0.05443451553583145, 0.022591248154640198, 0.018712908029556274, -0.05279485881328583, -0.02505253255367279, -0.02516103908419609, 0.08567383140325546, 0.030896876007318497, 0.003911657724529505, -0.03341549262404442, 0.06493724137544632, -0.01770722307264805, 0.028893936425447464, -0.024643607437610626, 0.012153571471571922, 0.02574792690575123, -0.038214460015296936, -0.046282809227705, 0.003576121525838971, -0.06302913278341293, -0.013833182863891125, -0.037486039102077484, 0.06023503839969635, -0.0031926590017974377, 0.058269351720809937, 0.0069841924123466015, 0.05099663510918617, 0.027300719171762466, 0.04834999144077301, 0.03776680305600166, 0.052179716527462006, -0.08503621071577072, -0.026252808049321175, 0.02646736055612564, 0.02475939318537712, 0.003955754451453686, 0.4000053107738495, 0.0250060074031353, -0.01721324771642685, 0.03504224494099617, 0.0629996582865715, -0.018518388271331787, -0.01957099139690399, -0.019844846799969673, -0.056043777614831924, 0.040857888758182526, -0.03006785176694393, -0.02583765611052513, -0.028117649257183075, 0.05448835715651512, -0.09793577343225479, 0.008882686495780945, 0.02741844393312931, 0.05791212618350983, 0.028193334117531776, -0.02216850221157074, -0.011423635296523571, -0.0003789906913880259, -0.01153414323925972, 0.01766427420079708, 0.0012319270754233003, 0.011366182006895542, 0.0016348008066415787, 0.028809860348701477, 0.046066027134656906, 0.04647938907146454, 0.01475498266518116, 0.05434019863605499, 0.019527271389961243, -0.08887997269630432, 0.032155800610780716, -0.015065626241266727, 0.03193740174174309, 0.022793155163526535, -0.03056798316538334, -0.03140806406736374, 0.007682163733989, -0.005449403543025255, -0.022536221891641617, 0.016865603625774384, 0.02824663184583187, -0.03782346844673157, 0.14021289348602295, -0.030059386044740677, -0.033209264278411865, -0.018199635669589043, -0.04527457058429718, -0.023050108924508095, 0.05695827305316925, -0.000007308064596145414, -0.049229636788368225, -0.03487902507185936, 0.00714634545147419, 0.10617110133171082, -0.02728709951043129, -0.10790938138961792, -0.004379027057439089, -0.022328808903694153, -0.024439547210931778, -0.028424030169844627, 0.08588827401399612, 0.0592682771384716, -0.08048611879348755, -0.022227095440030098, 0.008355089463293552, 0.015484270639717579, -0.08484252542257309, 0.01817137561738491, -0.010759228840470314, -0.04756147786974907, -0.024301564320921898, 0.05817605182528496, -0.020251434296369553, -0.0427083894610405, -0.014352993108332157, 0.030657906085252762, 0.010945584625005722, -0.026142491027712822, -0.011235699988901615, -0.06258822232484818, 0.015776047483086586, -0.0628327950835228, -0.054479073733091354, -0.07683540880680084, 0.013069825246930122, -0.014806181192398071, -0.029179073870182037, -0.013763869181275368, -0.01396366860717535, -0.06123733893036842, 0.0963999480009079, -0.0407896526157856, -0.012426627799868584, -0.0075803822837769985, 0.024928588420152664, -0.04260450229048729, -0.02869914472103119, 0.018996726721525192, 0.028703100979328156, -0.0017741163028404117, 0.011428956873714924, -0.058496467769145966, 0.038444019854068756, 0.0487140454351902, -0.056984663009643555, 0.0627034530043602, 0.03466920927166939, -0.05696365237236023, 0.007935812696814537, -0.023048430681228638, 0.03756934776902199, -0.015856178477406502, -0.00683955755084753, -0.007276223041117191, -0.019351398572325706, 0.03584044426679611, 0.04474540799856186, -0.02616972289979458, -0.010313363745808601, -0.0019549408461898565, -0.3593062162399292, -0.03182584047317505, -0.028401894494891167, -0.013024249114096165, 0.002053075935691595, -0.023595822975039482, 0.0036414973437786102, -0.017878344282507896, 0.02983330376446247, 0.03432007506489754, 0.045987002551555634, -0.0015872596995905042, 0.005455954931676388, -0.09117172658443451, 0.011247471906244755, 0.037158772349357605, 0.0030355665367096663, 0.004378076177090406, -0.012915561906993389, 0.03293880820274353, 0.02277759648859501, -0.06496242433786392, -0.01867048069834709, -0.06456182152032852, -0.012318499386310577, 0.00655055046081543, 0.13192303478717804, 0.05444365739822388, -0.001125821960158646, -0.05636870115995407, 0.06025923788547516, 0.042212557047605515, -0.032977744936943054, -0.04073108360171318, 0.013195974752306938, -0.03876996412873268, 0.03002760000526905, 0.01742618903517723, -0.00309357070364058, -0.0009577064774930477, -0.01420384831726551, -0.02429305948317051, -0.056228797882795334, -0.041668761521577835, -0.03821177780628204, 0.005166483111679554, -0.05881383642554283, -0.010984850116074085, 0.0064137158915400505, 0.07986802607774734, 0.012147445231676102, 0.011170020326972008, -0.007875801995396614, 0.016971668228507042, 0.010284519754350185, -0.0008798953494988382, -0.053078845143318176, -0.024884121492505074, 0.019228128716349602, 0.01235906220972538, 0.00868274737149477, 0.02534146048128605, 0.04407443851232529, -0.0719764456152916, -0.0015636186581104994, -0.003615308552980423, -0.002814723178744316, 0.013324740342795849, 0.028644371777772903, -0.00806752871721983, -0.03945402428507805, 0.08600211143493652, 0.0026364990044385195, 0.020925352349877357, 0.02612576261162758, 0.04320728778839111, -0.015830690041184425, 0.007113487925380468, 0.04697909206151962, 0.009395735338330269, 0.0467941015958786, -0.006757040973752737, 0.058220699429512024, -0.030437953770160675, -0.007338790688663721, 0.044428035616874695, 0.03575862944126129, -0.06735865771770477, 0.059699561446905136, 0.032057248055934906, -0.01923113502562046, 0.011767762713134289, -0.03347301110625267, -0.02417512983083725, 0.06571177393198013, -0.04116589576005936, -0.27506017684936523, 0.047200027853250504, 0.020550305023789406, 0.06509052217006683, 0.012859714217483997, -0.017611782997846603, 0.007545762695372105, -0.05221058800816536, -0.006307564675807953, -0.006228351034224033, 0.052697908133268356, 0.04789793863892555, -0.010783787816762924, -0.02399117313325405, -0.030187487602233887, 0.020142480731010437, 0.03527425229549408, 0.021715091541409492, 0.04002087563276291, 0.005787290167063475, 0.02058953419327736, -0.01180630549788475, 0.17526410520076752, 0.02183065563440323, 0.013966674916446209, 0.01361970603466034, -0.03935785964131355, -0.001253678696230054, 0.03861483559012413, -0.013853098265826702, -0.0047195544466376305, 0.028282472863793373, 0.02963576279580593, 0.03965345397591591, 0.030682850629091263, -0.039936941117048264, -0.009400282055139542, 0.03541207313537598, 0.03776722028851509, -0.0175174567848444, -0.012512024492025375, 0.02442474476993084, -0.029432304203510284, 0.0016676454106345773, 0.06627630442380905, -0.005646685604006052, 0.036726273596286774, 0.01866142451763153, -0.09566424787044525, -0.017555473372340202, -0.06279695779085159, -0.01944594644010067, -0.022245630621910095, -0.008562506176531315, -0.019171426072716713, 0.04189176484942436, 0.015296238474547863, -0.03387468680739403, 0.035548076033592224, 0.03182266652584076, -0.03269496187567711, -0.055147163569927216, 0.10134467482566833, -0.013696784153580666, 0.0023262903559952974 ]
[ 0.04508175700902939, 0.010711321607232094, -0.0164323840290308, 0.018663577735424042, -0.021372467279434204, 0.05218161270022392, -0.01700451411306858, -0.01632668450474739, 0.007664431352168322, 0.006123736500740051, -0.010479990392923355, 0.023857835680246353, 0.038852494210004807, 0.019984902814030647, -0.038045402616262436, -0.02163560874760151, 0.02581324614584446, 0.05059308186173439, 0.02122608758509159, -0.0013639929238706827, -0.04328174516558647, -0.0267074815928936, 0.029986675828695297, -0.028357887640595436, -0.0013830679235979915, 0.009489347226917744, -0.028532516211271286, -0.03216002508997917, 0.014414751902222633, -0.11202261596918106, -0.013315893709659576, 0.004831007216125727, -0.00634531956166029, 0.013174021616578102, -0.005744062829762697, -0.0031695261131972075, -0.001185512519441545, 0.017900565639138222, -0.014284915290772915, 0.00841445941478014, 0.011017851531505585, 0.007676208391785622, -0.005676400847733021, 0.008725879713892937, 0.0411967895925045, -0.04614848643541336, -0.045841217041015625, -0.0383131206035614, 0.03733201324939728, 0.022568002343177795, -0.07289014011621475, 0.0026459686923772097, 0.013257733546197414, -0.013403679244220257, -0.034693215042352676, -0.012454786337912083, 0.001145047484897077, 0.011089702136814594, 0.001650336547754705, 0.004659577738493681, 0.027410075068473816, -0.052686382085084915, -0.055177852511405945, -0.032486435025930405, 0.01009717583656311, -0.022821756079792976, -0.025955423712730408, 0.027467405423521996, -0.024417061358690262, 0.029218008741736412, -0.028231952339410782, -0.0009453148813918233, -0.027163278311491013, -0.027116112411022186, -0.04199192672967911, -0.0198906771838665, 0.012329593300819397, -0.0439472496509552, 0.033826325088739395, -0.012103206478059292, -0.00046633955207653344, 0.011555180884897709, -0.015705697238445282, -0.02108953148126602, -0.029369913041591644, 0.016762075945734978, 0.02509627863764763, 0.00036207083030603826, 0.01151219755411148, 0.009041124023497105, -0.047770190984010696, 0.013093343004584312, 0.003034571884199977, -0.02211502566933632, -0.0770978257060051, 0.004798946436494589, -0.019573451951146126, 0.01797592081129551, 0.028274904936552048, 0.8149544596672058, 0.031171679496765137, -0.00669495016336441, -0.010499601252377033, 0.016923414543271065, -0.036758627742528915, 0.034605223685503006, 0.04354824498295784, 0.019252125173807144, -0.022539179772138596, -0.025474729016423225, -0.004348088521510363, 0.040147535502910614, 0.028268378227949142, 0.001123307622037828, 0.04783007875084877, 0.04986196011304855, 0.028358902782201767, 0.021321425214409828, -0.017899757251143456, 0.026590226218104362, 0.00034881557803601027, -0.006282764952629805, 0.023444149643182755, 0.021086448803544044, 0.003690499346703291, -0.17809748649597168, -0.03831663727760315, -7.138195322840095e-33, 0.039258480072021484, -0.0002909447648562491, 0.07670089602470398, 0.004613389726728201, -0.003256817813962698, 0.01394662819802761, 0.012291398830711842, -0.003929407801479101, -0.005715515464544296, -0.04242004454135895, 0.03182327374815941, -0.015001525171101093, -0.016049183905124664, -0.013027350418269634, -0.015303264372050762, -0.0061920699663460255, 0.018843011930584908, 0.015615684911608696, -0.04512697830796242, -0.03603631630539894, -0.012467211112380028, 0.060922253876924515, -0.03089803270995617, 0.04156147688627243, -0.017147157341241837, 0.01765941083431244, 0.009479057975113392, 0.007474386598914862, 0.010929771699011326, -0.036633193492889404, -0.041504211723804474, 0.040592823177576065, -0.03490573167800903, -0.040653642266988754, 0.025101283565163612, -0.06042046099901199, -0.06701096892356873, 0.01789701357483864, 0.01981312967836857, -0.025238599628210068, -0.046010494232177734, 0.0013591095339506865, -0.042004212737083435, -0.047474998980760574, -0.06546936929225922, -0.004724659025669098, 0.01413799449801445, 0.05935395136475563, -0.021592173725366592, 0.03736799955368042, 0.025288235396146774, 0.017284348607063293, -0.0026073018088936806, -0.00752577930688858, -0.005077198147773743, 0.030117368325591087, 0.017021315172314644, -0.002771573606878519, -0.015999536961317062, 0.01898757368326187, 0.02599269710481167, 0.023059029132127762, -0.036862652748823166, 0.05299406126141548, 0.005741745699197054, 0.014596913009881973, 0.011442974209785461, -0.0005612411769106984, 0.019660532474517822, 0.029377643018960953, -0.05050217732787132, 0.019564911723136902, 0.010671108961105347, -0.00593681912869215, 0.029467903077602386, -0.04870222881436348, -0.018468886613845825, -0.02107285149395466, 0.003940722905099392, 0.049718573689460754, -0.03839784860610962, -0.0001314632099820301, -0.012168144807219505, -0.07358425855636597, -0.0408867709338665, -0.008197459392249584, 0.010185117833316326, 0.0013620506506413221, 0.025401154533028603, 0.04515136778354645, 0.052889831364154816, -0.006188130937516689, -0.0020523008424788713, 0.010646269656717777, -0.021333327516913414, 6.551974820717082e-33, 0.03171592578291893, -0.01384793035686016, -0.030383290722966194, -0.0039119115099310875, 0.02543395757675171, -0.018830878660082817, -0.0010669657494872808, -0.006756027694791555, -0.02451820857822895, 0.033677149564027786, 0.004494409542530775, -0.001579968025907874, -0.019420035183429718, 0.0264251958578825, 0.059639159590005875, 0.0044639199040830135, 0.021266475319862366, -0.05088986083865166, -0.018526822328567505, 0.023569347336888313, -0.0005076985689811409, 0.010558241046965122, 0.0009541952167637646, 0.015515956096351147, 0.025424445047974586, 0.03535948693752289, 0.01494368351995945, 0.03198276832699776, -0.01736786961555481, 0.027086347341537476, -0.008295404724776745, -0.05838749557733536, -0.021892961114645004, 0.009776255115866661, -0.02037547156214714, 0.020366331562399864, 0.00911781471222639, -0.01605428382754326, -0.046100154519081116, 0.030920544639229774, -0.02153930440545082, 0.001617606496438384, -0.02275366149842739, 0.06411420553922653, -0.005144596565514803, -0.013511414639651775, -0.0023311867844313383, 0.01131613552570343, -0.01113587711006403, -0.014099988155066967, -0.026369957253336906, 0.019602762535214424, -0.025525404140353203, 0.0023144520819187164, 0.018286846578121185, -0.05090055987238884, -0.007631837390363216, 0.019352808594703674, -0.0046126046217978, 0.021389059722423553, -0.024556618183851242, -0.01507562305778265, -0.014215611852705479, -0.011706664226949215, -0.005329890176653862, -0.024836285039782524, -0.039327558130025864, 0.030633803457021713, -0.010166752152144909, -0.02119690179824829, 0.01456362009048462, -0.02150358445942402, 0.011954626999795437, 0.03485025838017464, -0.004464694764465094, -0.004611925687640905, -0.04103075712919235, -0.0068175699561834335, -0.01816108264029026, 0.027185318991541862, 0.0035369691904634237, -0.006276409607380629, 0.024866178631782532, 0.011970678344368935, 0.018963970243930817, 0.0338408462703228, 0.00023779219191055745, 0.015153930522501469, 0.0062042768113315105, -0.017977237701416016, 0.06174631044268608, -0.018214043229818344, 0.039906177669763565, 0.03897537663578987, -0.049413926899433136, -1.2494015599884278e-8, -0.057270653545856476, 0.02264479547739029, -0.011569641530513763, 0.0126103600487113, -0.005521527025848627, -0.01270662434399128, -0.021768027916550636, 0.02735017240047455, 0.01904631219804287, 0.03473680466413498, 0.03021264635026455, -0.03894435986876488, 0.027147777378559113, -0.01647273264825344, 0.03952077031135559, -0.03124327026307583, -0.013000472448766232, -0.0013374172849580646, 0.021981585770845413, -0.00048474001232534647, -0.004076681565493345, 0.044903550297021866, -0.03750494495034218, 0.035870157182216644, -0.03167033940553665, 0.00021805228607263416, 0.018575655296444893, -0.08156388252973557, 0.0002310577838215977, -0.012894517742097378, -0.012841306626796722, -0.018078621476888657, -0.005530747584998608, -0.025255482643842697, -0.02163877710700035, -0.03781777620315552, 0.05002932250499725, 0.008884591050446033, 0.012149356305599213, 0.034835685044527054, -0.006424099672585726, 0.0209343358874321, -0.014130513183772564, -0.03002658672630787, -0.015370908193290234, 0.028888849541544914, -0.019398903474211693, -0.04334317520260811, 0.033907730132341385, -0.04418597370386124, 0.012421258725225925, 0.008776158094406128, -0.0026245214976370335, 0.042682453989982605, 0.058975134044885635, 0.009337695315480232, 0.011594709008932114, 0.027661088854074478, 0.0038799785543233156, -0.02009941078722477, 0.009343904443085194, 0.016287725418806076, -0.030540043488144875, -0.0035335004795342684 ]
neo4j-detecting-potential-typos-using-explain
https://markhneedham.com/blog/2015/03/17/neo4j-detecting-potential-typos-using-explain
false
2015-03-17 01:32:18
One month of mini habits
[ "software-development" ]
[ "Software Development" ]
I recently read a book in the 'getting things done' genre written by Stephen Guise titled 'http://www.amazon.co.uk/Mini-Habits-Smaller-Bigger-Results-ebook/dp/B00HGKNBDK[Mini Habits]' and although I generally don't like those types of books I quite enjoyed this one and decided to give his system a try. The underlying idea is that there are two parts of actually doing stuff: * Planning what to do * Doing it We often get stuck in between the first and second steps because what we've planned to do is too big and overwhelming. Guise's approach for overcoming this inaction is to shrink the amount of work to do until it's *small enough that we don't feel any resistance to getting started*. It should be something that you can do in 1 or 2 minutes - stupidly small - something that you can do even on your worst day when you have no time/energy. I'm extremely good at procrastinating so I thought I'd give it a try and see if it helped. Guise suggests starting with one or two habits but I had four things that I want to do so I've ignored that advice for now. My attempted habits are the following: * Read one page of a data science related paper/article a day * Read one page of a computer science related paper/article a day * Write one line of data science related code a day * Write 50 words on blog a day == Sooooo\....has it helped? In terms of doing each of the habits I've been successful so far - today is the 35th day in a row that I've managed to do each of them. Having said that, there have been some times when I've got back home at 11pm and realised that I haven't done 2 of the habits and need to quickly do the minimum to 'tick them off'. The habit I've enjoyed doing the most is writing one line of data science related code a day. My initial intention was that this was going to only involved writing machine learning code but at the moment I've made it a bit more generic so it can include things like the http://www.markhneedham.com/blog/2015/03/11/pythonneo4j-finding-interesting-computer-sciency-people-to-follow-on-twitter/[Twitter Graph] or other bits and pieces that I want to get started on. The main problem I've had with making progress on mini projects like that is that I imagine its end state and it feels too daunting to start on. Committing to just one line of code a day has been liberating in some way. One tweak I have made to all the habits is to have some rough goal of where all the daily habits are leading as I noticed that the stuff I was doing each day was becoming very random. https://twitter.com/mesirii[Michael] pointed me at Amy Hoy's 'http://files.alexpcoleman.com/newsletter/2014/04/The%2030x500%20Guide%20to%20Doing%20It%20Backwards.pdf[Guide to doing it backwards]' which describes a neat technique for working back from a goal and determining the small steps required to achieve it. Writing at least 50 words a day has been beneficial for getting blog posts written. Before the last month I've found myself writing most of my posts at the end of month but I have a more regular cadence now which feels better. Computer science wise I've been picking up papers which have some sort of link to databases to try and learn more of the low level detail there. e.g. I've read the http://www.cs.iit.edu/~yee/classes/cs525aut04/oneil93lruk.pdf[LRU-K cache] paper which Neo4j 2.2's page cache is based on and have been flicking through the original https://hal.archives-ouvertes.fr/inria-00555588/document[CRDTs] paper over the last few days. I also recently came across the Papers We Love repository so I'll probably work through some of the https://github.com/papers-we-love/papers-we-love/tree/master/distributed_systems[distributed systems papers] they've collated next. == Other observations I've found that if I do stuff early in the morning it feels better as you know it's out of the way and doesn't linger over you for the rest of the day. I sometimes find myself wanting to just tick off the habits for the day even when it might be interesting to spend more time on one of the habits. I'm not sure what to make of this really - perhaps I should reduce the number of habits to the ones I'm really interested in? With the writing it does sometimes feel like I'm just writing for the sake of it but it is a good habit to get into as it forces me to explain what I'm working on and get ideas from other people so I'm going to keep doing it. I've enjoyed my experience with 'mini habits' so far although I think I'd be better off focusing on fewer habits so that there's still enough time in the day to read/learn random spontaneous stuff that doesn't fit into these habits.
null
null
[ 0.030227771028876305, -0.003715572878718376, -0.011284839361906052, 0.018506934866309166, 0.09206222742795944, 0.019872331991791725, 0.025275954976677895, 0.03328534588217735, 0.011599174700677395, -0.007271151058375835, -0.002772771753370762, 0.018243612721562386, -0.04531841725111008, -0.0030341539531946182, -0.040688563138246536, 0.06743832677602768, 0.0814971923828125, 0.005091727711260319, 0.013248158618807793, -0.010550646111369133, 0.023049164563417435, 0.07495468854904175, 0.04437154904007912, 0.04040951654314995, 0.03116186521947384, 0.006969935726374388, 0.017569513991475105, -0.012729175388813019, -0.0484645701944828, 0.008011755533516407, 0.040509313344955444, 0.00711214542388916, 0.01632114127278328, 0.010526051744818687, 0.04591068997979164, -0.03278753161430359, -0.027921337634325027, 0.00634432677179575, 0.005815815180540085, 0.007966435514390469, -0.06668467819690704, 0.03407413884997368, -0.04467213898897171, -0.0029199100099503994, -0.04230554774403572, 0.011521145701408386, -0.030083896592259407, 0.000026086780053447, 0.012238020077347755, -0.005316311959177256, -0.061145979911088943, 0.05367320775985718, 0.02593258209526539, -0.01684499904513359, -0.03169546648859978, 0.06198891997337341, 0.03092583455145359, -0.0486864410340786, 0.016922583803534508, -0.021498721092939377, -0.0017856745980679989, -0.017807260155677795, -0.02708212286233902, 0.04040016978979111, 0.024909963831305504, -0.04166192561388016, -0.006138664670288563, 0.052717357873916626, -0.02572287805378437, 0.028339367359876633, -0.03370014205574989, 0.017016576603055, -0.017799269407987595, 0.0019147963030263782, -0.018775902688503265, -0.054863862693309784, 0.03379366919398308, 0.06587839126586914, 0.020631972700357437, 0.043558791279792786, -0.01158665120601654, 0.03767978772521019, 0.009899884462356567, 0.03936895728111267, -0.03128991648554802, -0.031736865639686584, -0.011271847411990166, -0.026354528963565826, -0.05756843090057373, 0.050193894654512405, 0.018640819936990738, -0.07126952707767487, 0.0145094133913517, 0.04871348664164543, 0.0015822972636669874, -0.006638034246861935, 0.020167388021945953, -0.002569736447185278, -0.035206425935029984, -0.01700076274573803, -0.02505391091108322, -0.03721630200743675, 0.017359623685479164, 0.018582498654723167, -0.058242298662662506, 0.0019456992158666253, -0.013288646936416626, -0.012570880353450775, 0.01818244904279709, 0.006676532793790102, -0.020820051431655884, 0.005338787566870451, -0.038338273763656616, 0.00582254258915782, -0.08748937398195267, 0.06705590337514877, 0.012448182329535484, -0.0384666845202446, -0.029671961441636086, -0.009692085906863213, 0.037239767611026764, 0.016665766015648842, 0.0064621297642588615, 0.07872096449136734, 0.002959395991638303, 0.004760222043842077, 0.0016075578751042485, 0.040981609374284744, -0.006086009554564953, -0.06132662668824196, -0.021068129688501358, 0.046917688101530075, -0.01956893876194954, -0.019195660948753357, -0.005766736809164286, -0.014897256158292294, -0.0012433069059625268, 0.03618236631155014, 0.04174472764134407, 0.06693179160356522, 0.014052661135792732, -0.038876671344041824, 0.012777541764080524, -0.006895225029438734, 0.01348546240478754, -0.015633592382073402, -0.0015704125398769975, -0.01409787405282259, -0.0493038147687912, -0.014415633864700794, 0.0028120495844632387, 0.012998677790164948, -0.0023796246387064457, -0.04299573227763176, 0.019037732854485512, 0.06733836233615875, 0.01234174333512783, 0.046826742589473724, -0.014889639802277088, 0.01457921415567398, 0.04032620042562485, 0.0298946313560009, -0.010315698571503162, 0.02088758908212185, 0.012546018697321415, -0.01621176302433014, 0.008330977521836758, 0.049691006541252136, -0.010554696433246136, 0.021202296018600464, -0.05162430554628372, -0.023028891533613205, 0.04932091757655144, -0.04123217612504959, -0.03458331525325775, 0.041806869208812714, 0.0792558416724205, 0.044638741761446, 0.046410150825977325, -0.0019194232299923897, -0.0807059183716774, 0.03868905082345009, 0.010997154749929905, 0.03046584315598011, 0.0052862768061459064, -0.033360082656145096, 0.0695599764585495, 0.04205908626317978, 0.008460314944386482, 0.048677776008844376, -0.08151319622993469, -0.08559088408946991, 0.011045034974813461, -0.02642037160694599, 0.05408766493201256, -0.029547208920121193, 0.0029349287506192923, 0.07498349994421005, -0.012654872611165047, 0.05030079558491707, -0.0007704251329414546, -0.010224729776382446, 0.022674499079585075, -0.03492726758122444, -0.04694610461592674, 0.05415135622024536, 0.019537420943379402, -0.007600393611937761, -0.0347278006374836, 0.0030908563639968634, -0.021874194964766502, -0.009558680467307568, 0.03526069223880768, -0.003131896024569869, 0.009091479703783989, 0.011631818488240242, 0.06691489368677139, -0.019289227202534676, 0.044347818940877914, -0.03840106725692749, 0.0016429577954113483, 0.002816715743392706, -0.022449271753430367, 0.015761183574795723, 0.0014959201216697693, 0.11163483560085297, 0.07714281976222992, -0.05747705698013306, -0.02840215153992176, 0.004337798338383436, -0.019086122512817383, -0.04966749623417854, 0.007863303646445274, 0.01338475476950407, -0.0016295133391395211, 0.01865178532898426, -0.04569524899125099, -0.028744760900735855, 0.028765032067894936, -0.05175956338644028, -0.013192733749747276, 0.05747171863913536, -0.01610678806900978, 0.07081907242536545, -0.003382848808541894, 0.002616266254335642, -0.02539609745144844, 0.00511733815073967, -0.046723753213882446, 0.0008598599233664572, 0.004846676252782345, -0.011241178028285503, 0.04936275631189346, -0.02108706720173359, -0.03427650034427643, -0.04648617282509804, -0.04396793246269226, 0.018873123452067375, 0.07111098617315292, 0.05585185065865517, -0.02517450414597988, 0.06626942753791809, 0.002776575041934848, 0.036800485104322433, 0.012249816209077835, -0.044460881501436234, -0.05271243304014206, -0.05397966876626015, 0.011260253377258778, 0.0034662941470742226, 0.011015164665877819, 0.025827724486589432, 0.03119090385735035, 0.020201828330755234, 0.0005761104985140264, -0.02748844027519226, 0.0682029202580452, 0.0037844586186110973, -0.01864543743431568, -0.028088897466659546, -0.027340831235051155, 0.07277662307024002, -0.03437655791640282, -0.007847847416996956, 0.01860584318637848, -0.0777503177523613, 0.058719754219055176, -0.057001933455467224, -0.04294854402542114, -0.008707322180271149, -0.001268367632292211, 0.06159791350364685, 0.013688204810023308, 0.0071653700433671474, 0.061155352741479874, 0.01784496009349823, 0.004405159968882799, -0.007968099787831306, 0.00894808117300272, 0.031767524778842926, 0.024506837129592896, 0.0012832926586270332, 0.052012670785188675, 0.025679603219032288, -0.003245920641347766, -0.039266977459192276, 0.021451164036989212, -0.023138856515288353, -0.27414748072624207, 0.03601895645260811, 0.008180421777069569, -0.04197049140930176, 0.030735377222299576, -0.018384389579296112, 0.013343020342290401, -0.048173222690820694, -0.027323979884386063, 0.023489272221922874, -0.038999952375888824, -0.029501935467123985, -0.037631914019584656, 0.06491725146770477, 0.03282108157873154, 0.033957116305828094, -0.000018515849660616368, -0.04428964480757713, -0.0039743599481880665, 0.06527464836835861, 0.005670633632689714, -0.05093415454030037, -0.02184007130563259, 0.031338177621364594, 0.04031149670481682, 0.059844110161066055, -0.07563121616840363, 0.03564455732703209, -0.07448599487543106, -0.020535975694656372, 0.004785948432981968, -0.012892871163785458, 0.01621909998357296, -0.0366089902818203, 0.01959138736128807, -0.02880573272705078, 0.041926220059394836, 0.01003117486834526, -0.01163941714912653, 0.024888206273317337, -0.010462096892297268, -0.04045932739973068, -0.018488051369786263, 0.02108640782535076, 0.07349517196416855, 0.010152610018849373, -0.06456413865089417, -0.041512250900268555, -0.02616148069500923, 0.07125288993120193, -0.032020505517721176, -0.04638650640845299, -0.02811715193092823, 0.03145641088485718, -0.003258549142628908, -0.013517199084162712, -0.004184055142104626, -0.012873129919171333, -0.047150179743766785, -0.041139211505651474, -0.020851759240031242, -0.023481573909521103, -0.0027162921614944935, -0.06856410205364227, -0.008632936514914036, -0.06444539874792099, -0.07337787002325058, -0.03039805218577385, 0.07054553925991058, 0.04494846984744072, -0.05464959889650345, 0.00437454367056489, 0.005627343896776438, -0.10807301104068756, -0.01785394735634327, -0.007962917909026146, -0.017667066305875778, 0.01802591048181057, 0.022153548896312714, 0.037570059299468994, -0.04522796720266342, -0.060227397829294205, 0.018413346260786057, 0.005441408138722181, 0.048984918743371964, -0.03858407586812973, 0.02275831438601017, 0.0059918491169810295, -0.023613618686795235, 0.003771374700590968, 0.07379817962646484, 0.006173258647322655, -0.022860735654830933, -0.016003131866455078, 0.027355751022696495, 0.026792453601956367, 0.017627399414777756, -0.0034411337692290545, 0.006298872642219067, 0.021108675748109818, 0.0054056658409535885, -0.05657350271940231, 0.022093161940574646, -0.02070990577340126, -0.014096753671765327, -0.013345662504434586, -0.05769430845975876, 0.020908517763018608, 0.03542182222008705, 0.011723528616130352, -0.009151249192655087, -0.014155197888612747, 0.015653206035494804, -0.03815915063023567, -0.02137846127152443, -0.02940727025270462, 0.023940445855259895, 0.03226252272725105, -0.018467403948307037, 0.011145652271807194, -0.06943724304437637, 0.009709715843200684, -0.009600020945072174, -0.0342714823782444, -0.05334876850247383, -0.02680196799337864, -0.00762465875595808, -0.03196065127849579, 0.011722967028617859, 0.022213926538825035, -0.022630777209997177, -0.004559285938739777, 0.025323081761598587, -0.04102018475532532, 0.0037871627137064934, -0.03720101714134216, -0.07201247662305832, -0.03514908254146576, 0.0014272405533120036, 0.014670092612504959, -0.017423471435904503, 0.00805569812655449, 0.004376271739602089, 0.014077071100473404, 0.05418487265706062, 0.01718144118785858, 0.01125627662986517, -0.021568847820162773, 0.03792988136410713, 0.02733103558421135, -0.012689837254583836, -0.04497617483139038, 0.01963292434811592, -0.04224830120801926, -0.026736333966255188, 0.005545878782868385, 0.036312177777290344, -0.02950138784945011, -0.03233211487531662, -0.00019367801724001765, 0.013976720161736012, -0.06308168917894363, -0.03582107275724411, -0.042446568608284, 0.017385607585310936, 0.05721454694867134, -0.032176434993743896, 0.019308283925056458, 0.003853428643196821, 0.006546069402247667, 0.013217374682426453, -0.0009847990004345775, -0.03016042709350586, 0.01673668809235096, -0.0022968354169279337, 0.010264704935252666, 0.014140941202640533, 0.004389395471662283, 0.02114136703312397, 0.005981342401355505, -0.0003370534104760736, -0.03669917210936546, -0.006940350867807865, 0.008419749327003956, 0.054822664707899094, 0.0315222442150116, 0.0013589505106210709, -0.0034906044602394104, -0.03402810916304588, -0.017098119482398033, -0.032068707048892975, -0.012538991868495941, 0.00528364023193717, -0.0024802526459097862, -0.024632349610328674, -0.07461760193109512, 0.05270335450768471, 0.04855026304721832, 0.015373331494629383, 0.024103503674268723, -0.019185757264494896, -0.01756809651851654, -0.026133988052606583, 0.022278696298599243, 0.06713046133518219, -0.07643153518438339, -0.0018696073675528169, -0.014185856096446514, 0.016378335654735565, 0.0017649621004238725, -0.014530281536281109, -0.03562707081437111, -0.025209642946720123, -0.027820667251944542, 0.01141075138002634, -0.05253226310014725, -0.028006713837385178, -0.03944587707519531, 0.024375852197408676, -0.017554614692926407, -0.014010651037096977, -0.02070779912173748, -0.014950184151530266, -0.027802905067801476, -0.01738790236413479, 0.010645112954080105, -0.03227287158370018, 0.0020526298321783543, 0.018091101199388504, -0.04695718735456467, 0.01518608070909977, -0.016566330567002296, 0.019776595756411552, 0.011500204913318157, -0.030141383409500122, -0.005799607373774052, -0.01904210075736046, 0.008242208510637283, 0.016205722466111183, 0.058501843363046646, -0.005570863839238882, -0.016875308007001877, -0.05335236340761185, -0.022887855768203735, -0.03752504289150238, 0.01890156976878643, -0.02511882223188877, 0.004032388795167208, 0.013794089667499065, 0.058868180960416794, 0.001462104613892734, 0.012785919941961765, -0.0020198035053908825, -0.02806887775659561, 0.04000292345881462, -0.059913117438554764, -0.02834462746977806, -0.04567323625087738, -0.037625253200531006, 0.010426739230751991, 0.009268040768802166, 0.011752831749618053, -0.0325954407453537, 0.05585729703307152, 0.028535965830087662, 0.05066413804888725, 0.03499652445316315, 0.0069656833074986935, 0.013960856013000011, -0.04147944226861, 0.0034570684656500816, -0.0921861082315445, -0.02714049443602562, 0.02935626357793808, -0.0099350456148386, -0.018253251910209656, 0.00701134791597724, -0.024112090468406677, 0.04067176580429077, -0.07298757880926132, -0.032597292214632034, 0.04867265373468399, -0.004931698087602854, -0.0064751929603517056, 0.025986619293689728, -0.06764461100101471, 0.03208155184984207, 0.018804796040058136, -0.0508880652487278, -0.0027022194117307663, -0.024531766772270203, 0.05440519377589226, -0.007377426605671644, 0.01876017078757286, -0.022632336243987083, -0.013278036378324032, 0.07823323458433151, 0.017158811911940575, -0.0011615707771852612, 0.044190652668476105, -0.006468155886977911, 0.050525106489658356, 0.03834665194153786, 0.02010122500360012, -0.01484703179448843, 0.013535800389945507, -0.0157143734395504, -0.052699875086545944, 0.01227743923664093, -0.0017501256661489606, -0.03404472768306732, -0.01990211196243763, 0.07078871130943298, 0.01362478919327259, -0.04414256662130356, -0.08054517954587936, 0.02117202617228031, -0.06496312469244003, -0.01048877090215683, -0.00751733873039484, -0.0037995765451341867, -0.04343666508793831, 0.0531388595700264, -0.004823093768209219, -0.007371365558356047, 0.0750066265463829, -0.02343502640724182, -0.011038962751626968, -0.014149277471005917, 0.10675579309463501, 0.07626792788505554, 0.06693509966135025, 0.001360868918709457, 0.08582890033721924, -0.011631599627435207, -0.031768668442964554, 0.008773595094680786, -0.017469268292188644, -0.014966876246035099, -0.04038446396589279, 0.03659936413168907, 0.05750870332121849, -0.012622207403182983, 0.07633128762245178, -0.037791263312101364, -0.024865051731467247, 0.0010731100337579846, 0.04967096820473671, 0.005978448316454887, 0.05142717435956001, 0.016868924722075462, 0.04191086068749428, -0.033927708864212036, -0.043783772736787796, 0.03502139076590538, -0.026414381340146065, -0.0075680287554860115, 0.03180723264813423, -0.03172207623720169, 0.008796175941824913, 0.00853001419454813, 0.037795186042785645, 0.07560811936855316, -0.011614859104156494, 0.028493491932749748, -0.01398029737174511, 0.0422857441008091, -0.01862940564751625, 0.019428279250860214, -0.025993118062615395, 0.007380291819572449, 0.008199363946914673, -0.042711202055215836, -0.01707659475505352, -0.012714042328298092, -0.023488854989409447, 0.019275648519396782, -0.024163778871297836, 0.00608654273673892, 0.02075759880244732, 0.011752398684620857, -0.032252274453639984, -0.051232047379016876, -0.042638398706912994, -0.02182488702237606, -0.040689822286367416, -0.000032329062378266826, 0.020122667774558067, 0.006733718328177929, -0.04006492719054222, -0.01863092929124832, -0.0033073974773287773, -0.027589598670601845, 0.02221238799393177, -0.06772512197494507, -0.01136741228401661, 0.015847623348236084, 0.021063292399048805, 0.028192011639475822, 0.0024670136626809835, 0.047126319259405136, -0.018843650817871094, -0.010634543374180794, -0.00028650532476603985, -0.00045493568177334964, 0.0328904427587986, 0.006997167598456144, 0.021647240966558456, -0.06774315237998962, 0.02423892356455326, 0.0082726264372468, -0.019264811649918556, -0.07497170567512512, 0.03142315894365311, 0.045585110783576965, 0.0075673433020710945, 0.04635483771562576, -0.02943762205541134, 0.009766915813088417, -0.055467985570430756, 0.014133641496300697, 0.006014161743223667, 0.02881239540874958, 0.027441078796982765, -0.02995825558900833, 0.07641249895095825, 0.007055378053337336, 0.005080641712993383, -0.04391659423708916, -0.024349750950932503, -0.0011986579047515988, 0.006087663117796183, -0.039954036474227905, -0.006626094691455364, -0.016548778861761093, -0.06878119707107544, -0.029483426362276077, 0.031960926949977875, -0.02192004583775997, -0.03453369438648224, 0.04397909343242645, 0.010221146047115326, -0.01922254078090191, 0.025079108774662018, -0.03682844340801239, 0.029415182769298553, -0.030868947505950928, -0.009296155534684658, 0.014580897055566311, 0.005706215742975473, 0.005676847416907549, 0.01092121284455061, -0.016355929896235466, -0.0494166724383831, -0.005209728609770536, -0.0065705724991858006, 0.01851205714046955, 0.03933631256222725, -0.009144858457148075, -0.012982363812625408 ]
[ -0.07237992435693741, -0.0014501750702038407, 0.010155743919312954, -0.0283467136323452, 0.017812257632613182, -0.017755059525370598, -0.017965177074074745, 0.019559038802981377, 0.007194796577095985, -0.025431469082832336, 0.010815814137458801, -0.03895235061645508, -0.0023061083629727364, -0.01699821464717388, 0.07513201236724854, 0.01976199634373188, -0.008351064287126064, -0.07590775191783905, 0.010305812582373619, 0.025695916265249252, 0.026257071644067764, -0.021747279912233353, -0.04237855598330498, -0.028480950742959976, 0.02720804512500763, 0.024274099618196487, 0.04649188369512558, -0.04825730621814728, -0.007158131338655949, -0.16732007265090942, 0.006615607067942619, 0.009732781909406185, 0.058333490043878555, -0.023370983079075813, -0.0082614216953516, 0.053083546459674835, 0.02454312890768051, 0.032316360622644424, -0.02540886402130127, 0.05059773474931717, 0.019843727350234985, -0.0062543973326683044, -0.03964793309569359, -0.0033215873409062624, 0.04420118033885956, 0.0016396818682551384, 0.0011654463596642017, -0.04674459621310234, 0.02408553659915924, -0.005910167470574379, -0.08030609041452408, -0.04722023382782936, -0.027873126789927483, -0.008322946727275848, 0.00976560264825821, 0.014448774047195911, 0.04173864424228668, 0.06666109710931778, 0.005887662526220083, 0.0034388003405183554, 0.006158850621432066, 0.002685318235307932, -0.13362297415733337, 0.10488618165254593, 0.04821494594216347, 0.04233924672007561, -0.03403874859213829, 0.006410977803170681, 0.01675444096326828, 0.1049184575676918, -0.006697755306959152, -0.00969065073877573, -0.038032978773117065, 0.09273999184370041, 0.017740726470947266, -0.000723238626960665, 0.019999926909804344, 0.012102163396775723, 0.018542638048529625, -0.042076218873262405, -0.027977241203188896, 0.020476408302783966, -0.005952028091996908, -0.012777994386851788, -0.03554245084524155, 0.037158071994781494, -0.040211956948041916, 0.04361691325902939, 0.04285217821598053, 0.01681692898273468, 0.041876740753650665, -0.012108110822737217, 0.004759287927299738, -0.009826012887060642, -0.08375910669565201, -0.06174715608358383, 0.008533655665814877, 0.038238707929849625, -0.04387590289115906, 0.4390907287597656, -0.03582213073968887, -0.008279876783490181, 0.06910287588834763, 0.044309839606285095, 0.00029655106482096016, -0.03307582437992096, 0.027166947722434998, -0.060188546776771545, 0.009440980851650238, -0.027942022308707237, 0.03078755922615528, 0.029800595715641975, 0.06371942907571793, -0.059116631746292114, 0.0401410311460495, 0.032932329922914505, 0.03906339406967163, 0.02424580417573452, 0.007162659429013729, 0.0033978158608078957, -0.03126215562224388, 0.01736118085682392, 0.020595740526914597, -0.015344521030783653, -0.024445177987217903, -0.06724685430526733, 0.02438724972307682, 0.07557003200054169, 0.008654006756842136, -0.007009626366198063, 0.06677467375993729, -0.03276712819933891, -0.052130263298749924, 0.0018753019394353032, 0.0026256630662828684, 0.003919453360140324, 0.029084883630275726, -0.018617799505591393, 0.03759976103901863, 0.028220655396580696, 0.014539365656673908, 0.030651681125164032, 0.02512226067483425, -0.03711770102381706, -0.025154076516628265, 0.11824531108140945, 0.02096894569694996, -0.02859058603644371, -0.0060261948965489864, -0.04104619100689888, 0.01672367937862873, 0.022404970601201057, -0.00696923490613699, -0.08385435491800308, 0.03755851835012436, 0.002542684320360422, 0.13554394245147705, -0.0149525236338377, -0.05396925285458565, -0.0061088730581104755, -0.05412852391600609, -0.0052055357955396175, -0.06597495824098587, 0.01792999915778637, 0.08321687579154968, -0.07226094603538513, -0.0069733355194330215, 0.009063389152288437, 0.003434031503275037, -0.05284368246793747, 0.025036342442035675, -0.0011136610992252827, -0.051598984748125076, 0.005221199244260788, 0.06582948565483093, -0.028964484110474586, -0.02197372168302536, 0.025350769981741905, 0.044400282204151154, 0.03195074200630188, 0.03245871514081955, -0.016805144026875496, -0.008312113583087921, -0.0035079489462077618, -0.05427835136651993, -0.07459466904401779, -0.028535570949316025, -0.0019545145332813263, -0.00802017655223608, -0.01701470836997032, -0.034133635461330414, -0.012260360643267632, -0.07922380417585373, 0.06457996368408203, -0.04955387860536575, -0.04170115664601326, 0.028195705264806747, -0.002206002362072468, -0.06380227953195572, -0.024788379669189453, -0.045783866196870804, -0.020921699702739716, -0.02905464544892311, 0.038030534982681274, -0.0357016921043396, 0.019224517047405243, 0.036830414086580276, -0.04645990952849388, 0.12934157252311707, 0.06676661223173141, -0.03418577089905739, -0.059302039444446564, 0.028461044654250145, 0.007270989008247852, -0.014121022075414658, -0.00038915578625164926, 0.007297786418348551, 0.01283196173608303, -0.004538889043033123, 0.007833566516637802, -0.019340386614203453, -0.03174280375242233, -0.026971863582730293, -0.3157396614551544, -0.04871101304888725, -0.014848470687866211, 0.0008240868337452412, 0.023487629368901253, -0.03646713122725487, 0.022093109786510468, -0.02078302577137947, -0.014604262076318264, -0.005143286660313606, 0.05933747813105583, -0.03884326294064522, 0.004499424714595079, -0.07402843981981277, -0.011241049505770206, 0.002610846422612667, -0.02639712207019329, -0.02525520510971546, -0.020419960841536522, -0.0003222906088922173, 0.01886288821697235, -0.02638847567141056, -0.008252173662185669, -0.06411471962928772, -0.018611440435051918, -0.040197182446718216, 0.10093413293361664, 0.025873398408293724, 0.07192534953355789, -0.014488422311842442, 0.03137427195906639, 0.015920335426926613, 0.04121289402246475, -0.12988246977329254, -0.017839215695858, -0.014424861408770084, 0.009982862509787083, -0.03447534143924713, -0.002534642815589905, -0.04438093677163124, -0.06119224429130554, 0.024139750748872757, -0.06972197443246841, -0.015902241691946983, -0.11322074383497238, 0.01838967576622963, -0.021204737946391106, -0.041805412620306015, -0.0420491024851799, 0.05977115035057068, 0.02061428688466549, 0.003725942689925432, -0.013353210873901844, -0.011452875100076199, -0.009549214504659176, -0.029647542163729668, -0.10051437467336655, 0.01585700549185276, -0.0002559973218012601, -0.01651405170559883, 0.006878495682030916, 0.039929475635290146, 0.028624186292290688, -0.03974970057606697, 0.002945501822978258, -0.0036855607759207487, -0.010193663649260998, 0.026854688301682472, 0.033754613250494, 0.0033372212201356888, -0.011595233343541622, 0.07727556675672531, 0.005485641770064831, -0.03293784335255623, 0.020802954211831093, 0.008594765327870846, -0.030303198844194412, 0.044348616153001785, 0.0008796314359642565, 0.00631296681240201, 0.010778606869280338, -0.03786446899175644, 0.02468232810497284, -0.012331677600741386, -0.015584553591907024, 0.007112426217645407, 0.00704030878841877, -0.049822017550468445, 0.07656184583902359, 0.048695001751184464, -0.006578560918569565, 0.02605004794895649, -0.014742576517164707, -0.02792578749358654, 0.12147253006696701, 0.0038519788067787886, -0.24623750150203705, 0.0038242817390710115, 0.037064190953969955, 0.07007333636283875, -0.004688259679824114, 0.00838378258049488, 0.028246469795703888, -0.029091905802488327, 0.018677672371268272, 0.025715624913573265, 0.01003817655146122, 0.023033207282423973, -0.010350597091019154, -0.0008968291222117841, 0.02940976992249489, -0.026885120198130608, 0.022472774609923363, 0.012311527505517006, 0.002851479919627309, -0.005591557361185551, 0.029083458706736565, -0.0006311926408670843, 0.15403786301612854, 0.013398469425737858, 0.02456079050898552, 0.035869941115379333, 0.016019005328416824, -0.004138873890042305, 0.07442396879196167, -0.013462517410516739, 0.008274083025753498, -0.006098643876612186, 0.018155192956328392, 0.021630706265568733, 0.022451601922512054, -0.054881684482097626, -0.05628479644656181, 0.05064699798822403, 0.04255709424614906, -0.0013688807375729084, 0.028686949983239174, 0.006924503017216921, -0.028159674257040024, 0.02937285788357258, 0.08319700509309769, -0.0034675667993724346, -0.001510533387772739, -0.07700305432081223, -0.07295605540275574, -0.02050499990582466, -0.029558813199400902, -0.01772581785917282, 0.01605227217078209, 0.006986039690673351, 0.0042968071065843105, 0.0776752308011055, 0.030732935294508934, -0.01754639483988285, 0.010870378464460373, -0.013270792551338673, -0.01490010041743517, -0.022694505751132965, 0.1084994375705719, 0.03183712810277939, 0.004872419871389866 ]
[ -0.0012906418414786458, 0.027158256620168686, 0.013309192843735218, 0.02705010585486889, 0.01276641245931387, -0.022065332159399986, -0.0013774506514891982, 0.0008210843661800027, -0.010980353690683842, 0.0042378404177725315, -0.009673215448856354, 0.00321724615059793, 0.0015157897723838687, -0.027856813743710518, 0.019900133833289146, -0.0026907084975391626, 0.006102097220718861, -0.011872080154716969, 0.012726416811347008, 0.011823820881545544, -0.017050011083483696, 0.004544753115624189, 0.005492235533893108, 0.027254657819867134, -0.02624470740556717, 0.026091869920492172, 0.006011963356286287, -0.013807175680994987, 0.024562418460845947, -0.13864770531654358, -0.016890691593289375, -0.02213347516953945, -0.03368588909506798, 0.014755809679627419, 0.010857834480702877, 0.00864490307867527, -0.0030760110821574926, 0.006260080263018608, 0.015940794721245766, -0.0031617460772395134, 0.018664658069610596, -0.028559433296322823, 0.004375111311674118, 0.025003699585795403, -0.010606259107589722, -0.004850350320339203, 0.00101994420401752, -0.04761867970228195, -0.022490721195936203, -0.02067187987267971, -0.02871190942823887, 0.001954489154741168, -0.02844431810081005, 0.008716285228729248, 0.0032513714395463467, -0.01707359217107296, 0.03410056233406067, -0.003432596568018198, 0.02121328003704548, -0.01877945475280285, 0.029444264248013496, -0.04589182138442993, -0.04840249940752983, -0.018704833462834358, -0.0077650286257267, -0.011336874216794968, -0.02047959342598915, 0.008617506362497807, -0.03827095031738281, 0.015215260908007622, -0.023470303043723106, 0.021736284717917442, -0.01949007622897625, 0.015230951830744743, 0.02412225306034088, -0.023430906236171722, 0.0076795537024736404, -0.03909670189023018, 0.0037915485445410013, 0.0034467100631445646, -0.04475211724638939, 0.019806237891316414, 0.001472341362386942, 0.01780514232814312, -0.028088953346014023, -0.009273238480091095, 0.016879338771104813, -0.002037827158346772, 0.027111921459436417, -0.01766345277428627, 0.007344583515077829, 0.016275715082883835, 0.01582358032464981, 0.005851249676197767, -0.10847927629947662, -0.03499745950102806, -0.018951959908008575, -0.014900131151080132, -0.014505920931696892, 0.8565188646316528, -0.0038527795113623142, 0.03482820466160774, 0.04395151883363724, 0.02205600216984749, 0.025914592668414116, -0.02279849536716938, -0.0006759255775250494, -0.011340518482029438, 0.013124237768352032, -0.03993486240506172, 0.015830494463443756, 0.027362555265426636, 0.01703983172774315, 0.025961345061659813, 0.041225746273994446, 0.021450452506542206, 0.031950943171978, 0.021010981872677803, 0.007804220542311668, 0.014795806258916855, 0.01966671645641327, 0.010946295224130154, 0.011097129434347153, -0.0211449284106493, -0.009335269220173359, -0.15086908638477325, -0.00734633207321167, -6.922194562456653e-33, 0.05424479767680168, -0.00008492472261423245, 0.004840068519115448, -0.00987932551652193, 0.013426670804619789, -0.013117960654199123, 0.004542430862784386, 0.00486725615337491, 0.003738056868314743, -0.013748778961598873, 0.007617739029228687, -0.01618368923664093, 0.009940017014741898, -0.022686537355184555, 0.04296230524778366, -0.028510326519608498, -0.000011704738426487893, 0.042139794677495956, -0.020217450335621834, 0.015855086967349052, 0.023113597184419632, 0.039579592645168304, 0.006119912955909967, -0.00399553868919611, 0.018902545794844627, -0.02040724828839302, 0.007295934017747641, -0.00002069319089059718, 0.0009652867447584867, -0.03599650785326958, -0.016316460445523262, 0.0045751724392175674, -0.0385366827249527, -0.040296778082847595, -0.005445074290037155, -0.04592439532279968, 0.00043880907469429076, 0.009793344885110855, 0.018141260370612144, -0.029204392805695534, -0.06270090490579605, 0.020444629713892937, -0.0016792959067970514, -0.03735972195863724, -0.0313819944858551, 0.027853256091475487, 0.06369583308696747, 0.03364500030875206, 0.01216304674744606, -0.020649228245019913, 0.01702728495001793, -0.023861626163125038, 0.005874205846339464, -0.018384216353297234, 0.0031028748489916325, -0.004676059354096651, 0.01129237376153469, -0.02896801568567753, 0.04117102921009064, 0.04817524552345276, 0.03145768865942955, -0.004783965647220612, 0.008271871134638786, 0.02565128542482853, 0.01154019869863987, -0.007108943071216345, 0.03706915304064751, -0.0019209720194339752, 0.013731510378420353, -0.0020302904304116964, -0.03777121379971504, -0.014425503090023994, 0.011676304042339325, -0.03135538473725319, 0.04460956156253815, -0.004707469139248133, -0.015388933010399342, -0.03963344544172287, -0.032142508774995804, 0.03599439561367035, -0.0072975787334144115, -0.01948530599474907, -0.020908093079924583, -0.0510953888297081, -0.02492118626832962, 0.015437861904501915, 0.030584413558244705, -0.00018164189532399178, -0.030942432582378387, 0.011439667083323002, -0.0017818028572946787, 0.00754203787073493, -0.002545461058616638, -0.014822431840002537, -0.024667346850037575, 7.362195322280882e-33, 0.010100120678544044, -0.028241058811545372, -0.000968010863289237, 0.006330325733870268, 0.029092559590935707, 0.01360026653856039, 0.019566990435123444, -0.0026962223928421736, -0.051840752363204956, 0.04617413505911827, 0.0009246969129890203, -0.01010583620518446, -0.041231315582990646, 0.018984412774443626, 0.05039965361356735, 0.008750434964895248, 0.0023449850268661976, -0.012935957871377468, 0.02276339754462242, 0.01599944941699505, -0.012105674482882023, -0.00031650951132178307, -0.019031183794140816, -0.0011232151882722974, 0.06192957982420921, 0.061578378081321716, -0.011753985658288002, 0.02045643888413906, 0.010425865650177002, -0.015462893061339855, -0.009188042022287846, -0.004438270349055529, 0.0014650935772806406, -0.00618267897516489, -0.034222815185785294, 0.03339308127760887, -0.01369546353816986, -0.025196723639965057, 0.006322234869003296, -0.013172629289329052, 0.04078957810997963, 0.016872329637408257, 0.022578535601496696, 0.030977757647633553, 0.00110585184302181, 0.010744277387857437, -0.014061696827411652, 0.008514816872775555, -0.044343773275613785, 0.011520449072122574, 0.007454731035977602, 0.004572506994009018, 0.009967506863176823, 0.012187534011900425, -0.0016099424101412296, -0.0212258230894804, -0.020698698237538338, 0.01673344522714615, -0.025351308286190033, 0.000710022693965584, -0.04137202352285385, -0.012741529382765293, -0.016208913177251816, 0.011636998504400253, -0.029877355322241783, 0.00011552216165000573, 0.002002654829993844, 0.016549447551369667, -0.0039133294485509396, 0.003823661943897605, 0.007046552840620279, 0.01240427978336811, 0.004107002168893814, 0.014003529213368893, 0.006321066990494728, -0.0020479511003941298, -0.009967450983822346, 0.004508279263973236, -0.03224026784300804, 0.022144148126244545, 0.019097626209259033, 0.021924268454313278, 0.016957364976406097, -0.022028964012861252, -0.01751687563955784, 0.017006251960992813, -0.021123602986335754, 0.0008575964602641761, 0.005932951811701059, 0.01002613827586174, -0.022350125014781952, -0.014491911046206951, 0.010203848592936993, 0.0404340997338295, -0.010740798898041248, -1.298384066927838e-8, -0.020622003823518753, -0.011348441243171692, 0.005475142505019903, 0.03287959471344948, 0.029854895547032356, 0.007844742387533188, -0.005464119371026754, 0.005749543663114309, -0.024243419989943504, 0.047437965869903564, 0.05183127149939537, -0.05320001393556595, 0.007515406236052513, 0.020226024091243744, 0.004409477114677429, -0.04680338874459267, 0.00945857260376215, -0.01759202964603901, 0.023122096434235573, 0.009696749038994312, 0.041439976543188095, 0.03522227331995964, -0.022672418504953384, 0.009621484205126762, 0.03433412313461304, -0.0061207665130496025, 0.003833907889202237, -0.06927215307950974, -0.0027520046569406986, 0.004749815911054611, -0.0018839138792827725, -0.036509089171886444, -0.03653024509549141, 0.0365230068564415, -0.012558309361338615, -0.06369750946760178, 0.021977180615067482, 0.030340125784277916, -0.004317922983318567, 0.010217897593975067, -0.00157270603813231, -0.02642693929374218, -0.013231514021754265, -0.022786227986216545, -0.04474356770515442, 0.014711303636431694, -0.045426540076732635, -0.02552691660821438, 0.020404821261763573, -0.033879682421684265, 0.0026867089327424765, -0.020061371847987175, 0.05848418548703194, 0.03923436999320984, -0.01362666953355074, 0.016017062589526176, -0.010312510654330254, -0.013491742312908173, -0.0638812780380249, 0.0026390482671558857, 0.0011684471974149346, 0.04585014656186104, -0.023887865245342255, -0.019076019525527954 ]
one-month-of-mini-habits
https://markhneedham.com/blog/2015/03/17/one-month-of-mini-habits
false
2015-03-26 00:02:54
Python: matplotlib hangs and shows nothing (Mac OS X)
[ "python", "matplotlib" ]
[ "Python" ]
I've been playing around with some of the http://matplotlib.org/[matplotlib] demos recently and discovered that simply copying one of the examples didn't actually work for me. I was following the http://matplotlib.org/examples/api/barchart_demo.html[bar chart example] and had the following code: [source,python] ---- import numpy as np import matplotlib.pyplot as plt N = 5 ind = np.arange(N) fig, ax = plt.subplots() menMeans = (20, 35, 30, 35, 27) menStd = (2, 3, 4, 1, 2) width = 0.35 # the width of the bars rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd) plt.show() ---- When I execute this script from the command line it just hangs and I don't see anything at all. Via a http://stackoverflow.com/questions/21129055/no-plot-window-shows-up-with-matplotlib-pyplot-run-with-enthought-canopy-python[combination of] http://stackoverflow.com/questions/7534453/matplotlib-does-not-show-my-drawings-although-i-call-pyplot-show[different] http://stackoverflow.com/questions/2512225/matplotlib-not-showing-up-in-mac-osx[blog posts] (which all suggested different things!) I ended up with the following variation of imports which seems to do the job: [source,python] ---- import numpy as np import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt N = 5 ind = np.arange(N) fig, ax = plt.subplots() menMeans = (20, 35, 30, 35, 27) menStd = (2, 3, 4, 1, 2) width = 0.35 # the width of the bars rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd) plt.show() ---- If I run this script a Python window pops up and contains the following image which is what I expected to happen in the first place! image::{{<siteurl>}}/uploads/2015/03/2015-03-25_23-56-08.png[2015 03 25 23 56 08] The thing to notice is that we've had to change the http://matplotlib.org/faq/usage_faq.html#what-is-a-backend[backend] in order to use matplotlib from the shell: ____ With the TkAgg backend, which uses the Tkinter user interface toolkit, you can use matplotlib from an arbitrary non-gui python shell. ____ Current state: Wishing for ggplot!
null
null
[ 0.010839089751243591, -0.008677199482917786, -0.021359115839004517, 0.022131431847810745, 0.05462208390235901, 0.04225016385316849, -0.010841090232133865, 0.030100522562861443, -0.023354703560471535, -0.023242134600877762, -0.04516780003905296, -0.0017007903661578894, -0.0760994628071785, 0.02179131656885147, 0.02609528787434101, 0.08142509311437607, 0.08713337779045105, -0.0004175032954663038, 0.037567343562841415, 0.023442428559064865, 0.054484765976667404, 0.014523420482873917, -0.030646080151200294, -0.0023899292573332787, -0.015421455726027489, -0.041591089218854904, 0.0024027409963309765, 0.011634545400738716, -0.04736243560910225, 0.00963695626705885, 0.020962730050086975, -0.04396564140915871, 0.014993752352893353, -0.03266249969601631, 0.012218790128827095, 0.009072215296328068, -0.024960780516266823, 0.034931279718875885, -0.014760402962565422, 0.0018604272045195103, -0.04811445251107216, 0.0003599966294132173, -0.009142243303358555, -0.00516556715592742, -0.01707419753074646, 0.01579669862985611, -0.021419035270810127, 0.020801125094294548, -0.008605084381997585, 0.006382877938449383, -0.053979430347681046, 0.026682786643505096, 0.02729593962430954, -0.011458035558462143, 0.016218258067965508, 0.05580620467662811, 0.022041629999876022, -0.07150857150554657, 0.04377318546175957, -0.02745390124619007, 0.012260968796908855, 0.022071031853556633, 0.02960614114999771, 0.05885328724980354, 0.025580622255802155, -0.023027030751109123, -0.014427846297621727, 0.04897410050034523, -0.04296385496854782, -0.014622744172811508, -0.009658647701144218, 0.004477089270949364, -0.014890310354530811, -0.013465821743011475, 0.03071843832731247, -0.03235858678817749, -0.030871747061610222, 0.04074312001466751, -0.001239262637682259, 0.032404981553554535, 0.00972361396998167, 0.021130507811903954, 0.06047205999493599, 0.05097518488764763, -0.010842014104127884, -0.0075971391052007675, -0.05019064620137215, -0.02264311909675598, -0.03720630332827568, 0.033431071788072586, -0.0066029224544763565, -0.05866764113306999, 0.04493612051010132, -0.012389812618494034, -0.02102828584611416, -0.00760929798707366, -0.026545733213424683, -0.00345402373932302, -0.0031829075887799263, -0.04048892483115196, -0.05319691449403763, -0.028999313712120056, 0.026492664590477943, 0.04795851185917854, -0.048639729619026184, -0.03340692073106766, 0.011648002080619335, -0.019915835931897163, -0.022096138447523117, 0.011223111301660538, -0.05543791875243187, -0.013188954442739487, -0.03177092969417572, -0.033166058361530304, -0.05436839908361435, 0.0797937735915184, 0.015387434512376785, -0.02168060652911663, -0.03622892498970032, 0.013426851481199265, 0.025069603696465492, 0.02525872178375721, -0.023370640352368355, 0.09897848963737488, -0.0006522287148982286, 0.03919728845357895, 0.028348693624138832, 0.057753998786211014, -0.01960388943552971, -0.02840230241417885, 0.00788253452628851, 0.05851488560438156, -0.024765683338046074, -0.04582170397043228, 0.03334944322705269, -0.032194558531045914, -0.02262650988996029, 0.012634443119168282, 0.05879366770386696, 0.02364993281662464, -0.008149964734911919, 0.003396617015823722, 0.026533901691436768, 0.004444505553692579, -0.00004556116255116649, -0.00007118072971934453, 0.007754383608698845, -0.05666991323232651, -0.048219699412584305, 0.007305242121219635, 0.01703387126326561, 0.0056070610880851746, 0.06733260303735733, -0.0006811138009652495, 0.0071984403766691685, 0.058085616677999496, 0.010146629065275192, 0.01806073822081089, -0.025311674922704697, -0.0059151253663003445, 0.03162753954529762, 0.02711346559226513, 0.018779125064611435, 0.04537665843963623, 0.015283416956663132, -0.012627924792468548, 0.032234467566013336, 0.04215452820062637, -0.03222154080867767, 0.007449109107255936, -0.05155915766954422, -0.03520742431282997, 0.06202537193894386, -0.04021362587809563, -0.03546897694468498, 0.040610190480947495, 0.09217413514852524, 0.02539047785103321, 0.01522288378328085, 0.006973334588110447, -0.06916208565235138, 0.046822190284729004, -0.0015078287106007338, 0.018672028556466103, 0.0477401465177536, -0.024171127006411552, 0.060408029705286026, -0.014916879124939442, 0.032828591763973236, -0.004749773535877466, -0.04484851658344269, -0.06371377408504486, -0.03487061336636543, 0.015403333120048046, 0.05688516050577164, -0.05327395349740982, -0.04038415104150772, 0.035766154527664185, 0.030440039932727814, 0.012543843127787113, 0.0064171236008405685, -0.005084634758532047, 0.009785275906324387, -0.0639258548617363, -0.07258447259664536, -0.008760051801800728, 0.019880633801221848, -0.034103553742170334, -0.046956438571214676, 0.023510584607720375, -0.006635008379817009, 0.007809626404196024, 0.03087652288377285, -0.0350780114531517, 0.05893160402774811, 0.041291311383247375, 0.05512036383152008, -0.02336229383945465, 0.033346451818943024, -0.02445715293288231, 0.02355923317372799, -0.012405730783939362, 0.01394566334784031, -0.07945659756660461, 0.014600593596696854, 0.1277749091386795, 0.08617640286684036, -0.027610626071691513, -0.051870688796043396, -0.0151450764387846, -0.017172059044241905, -0.01782979629933834, 0.01005373802036047, 0.009990504942834377, -0.03274131938815117, 0.0021637645550072193, -0.035500667989254, -0.02802172116935253, 0.015592358075082302, -0.026220573112368584, 0.011707868427038193, 0.09205909818410873, -0.032534364610910416, 0.044603534042835236, -0.008003737777471542, -0.03538891300559044, 0.013714130967855453, -0.01226909551769495, -0.02303583361208439, 0.041548702865839005, 0.010794108733534813, 0.007998879067599773, 0.07335633039474487, -0.027103152126073837, -0.06623715162277222, -0.015987446531653404, -0.08190442621707916, -0.023565055802464485, 0.06520921736955643, 0.04417699947953224, 0.016172846779227257, 0.030456390231847763, -0.0017442451789975166, -0.010780013166368008, -0.030697958543896675, -0.039897795766592026, -0.06141392141580582, -0.007735787890851498, 0.004197755362838507, 0.04313580319285393, 0.031220827251672745, 0.009527317248284817, -0.015217795968055725, -0.014103960245847702, 0.024691142141819, 0.017433233559131622, 0.03425675258040428, -0.01678181253373623, -0.0440383106470108, -0.04696044325828552, 0.015521813184022903, 0.038600701838731766, -0.012972586788237095, -0.03924988582730293, 0.036944568157196045, -0.04091055691242218, 0.04476465284824371, -0.053393371403217316, -0.005110828205943108, 0.0103283217176795, 0.017579855397343636, 0.05073504522442818, -0.00017237247084267437, 0.009255137294530869, 0.03725867718458176, 0.007658944930881262, 0.025691071525216103, 0.034344159066677094, 0.011882131919264793, 0.03559189662337303, 0.003354329615831375, 0.037612974643707275, 0.030521564185619354, -0.022939329966902733, -0.031185708940029144, -0.018555689603090286, -0.000013576443961937912, -0.039587512612342834, -0.2716446816921234, 0.03642295300960541, -0.023904375731945038, -0.010057691484689713, -0.0007435639854520559, -0.04017822444438934, -0.02283449098467827, -0.029898475855588913, -0.0015591353876516223, 0.02101101167500019, -0.016186153516173363, -0.06921810656785965, -0.0563959963619709, 0.06280923634767532, 0.01183990202844143, 0.03139977902173996, 0.015231994912028313, -0.033400338143110275, 0.03665792942047119, 0.040230270475149155, -0.006935804150998592, -0.027924656867980957, 0.005654489621520042, 0.06120442599058151, 0.008153003640472889, 0.06480146199464798, -0.046412158757448196, 0.06437769532203674, -0.05361830070614815, -0.01707453280687332, 0.015728548169136047, -0.022492552176117897, -0.024897979572415352, -0.015772193670272827, -0.0032569721806794405, -0.046728674322366714, 0.0033860006369650364, -0.02537667006254196, 0.03676147758960724, 0.014143561013042927, -0.05934225767850876, -0.042439546436071396, 0.0076276338659226894, 0.011382457800209522, 0.06659197062253952, -0.022870784625411034, -0.02268633060157299, -0.012220279313623905, -0.04385090619325638, 0.06106185168027878, -0.011952417902648449, -0.016987577080726624, -0.016961997374892235, 0.005621397402137518, -0.04071725532412529, 0.018509872257709503, 0.0007183217676356435, 0.019738463684916496, -0.03798693045973778, -0.007265548221766949, -0.007394733373075724, -0.008275450207293034, -0.026287904009222984, -0.048222821205854416, -0.0059188841842114925, -0.03999366983771324, -0.0408434234559536, -0.02536862902343273, 0.027654079720377922, 0.05672433599829674, -0.03991936892271042, -0.035255879163742065, -0.00514288479462266, -0.10485707968473434, 0.04851587489247322, -0.047105997800827026, -0.006520520430058241, 0.021624522283673286, 0.012211307883262634, -0.02474823407828808, -0.050402019172906876, -0.0745030865073204, 0.07548430562019348, -0.016241533681750298, -0.016483381390571594, -0.007103383541107178, -0.020375685766339302, -0.024390021339058876, -0.021276479586958885, -0.010141718201339245, 0.06002504751086235, -0.011526103131473064, 0.018423866480588913, -0.01136548351496458, -0.03513335809111595, 0.028416244313120842, 0.05667068064212799, 0.017533859238028526, 0.030535509809851646, 0.04953953996300697, 0.005906593520194292, -0.07807780802249908, -0.04764873534440994, -0.00031891721300780773, -0.008377963677048683, -0.010502097196877003, -0.04734572023153305, 0.025762349367141724, 0.030173419043421745, -0.003322027623653412, -0.0025484636425971985, -0.035945940762758255, 0.0007345443009398878, -0.04321488365530968, -0.019440609961748123, -0.03631163388490677, 0.03130725398659706, -0.013183637522161007, 0.003906507045030594, -0.06070813536643982, -0.06267733126878738, 0.013196198269724846, 0.026485955342650414, -0.010726449079811573, -0.06005427986383438, -0.019169770181179047, 0.005815260112285614, -0.008488264866173267, 0.03768041729927063, 0.0030475743114948273, -0.0476696714758873, 0.0501977875828743, 0.05891968309879303, -0.02896835282444954, 0.017025142908096313, -0.02885054238140583, -0.015734408050775528, 0.004275093320757151, 0.03339971974492073, 0.00764517392963171, 0.0001467456459067762, 0.03595258295536041, -0.009778807871043682, 0.009641001001000404, 0.04938210919499397, -0.011843342334032059, 0.030933566391468048, 0.007908573374152184, -0.0017571509815752506, -0.0033219431061297655, 0.004848049022257328, -0.040438778698444366, 0.021942175924777985, -0.028249084949493408, -0.049746476113796234, -0.011152040213346481, 0.01935216411948204, 0.009049912914633751, -0.0012849566992372274, -0.061039622873067856, 0.049204785376787186, -0.04953871667385101, -0.018862886354327202, -0.01370711624622345, -0.036819033324718475, 0.02875131368637085, 0.03223901242017746, 0.036952629685401917, -0.013794885016977787, -0.008681426756083965, 0.024785678833723068, 0.01813521608710289, -0.01428878866136074, 0.014016997069120407, -0.04635578766465187, 0.00966224167495966, 0.014583655633032322, 0.0015408251201733947, -0.013447673991322517, 0.010522698983550072, 0.0010704873129725456, -0.010258366353809834, 0.028477847576141357, -0.000985711463727057, 0.03411491587758064, 0.02607078105211258, -0.05889672040939331, 0.013469084165990353, -0.0029736857395619154, -0.002035088138654828, -0.020614895969629288, -0.020741056650877, -0.016610711812973022, -0.011581791564822197, -0.04536338895559311, -0.05992349237203598, -0.018056008964776993, 0.014454430900514126, 0.01566758006811142, -0.005485984962433577, -0.03225263953208923, 0.0063225869089365005, -0.04083098843693733, 0.04515216872096062, 0.07781340181827545, -0.052645664662122726, 0.0497933067381382, 0.011941534467041492, 0.018014857545495033, -0.005444489885121584, 0.03815016895532608, -0.05070587992668152, -0.03975045308470726, -0.019808264449238777, -0.018887599930167198, 0.008868969976902008, -0.04777608439326286, -0.03955976292490959, 0.008151845075190067, -0.013066875748336315, 0.00023294411948882043, -0.020933205261826515, 0.0021508033387362957, -0.008350319229066372, -0.03397979587316513, 0.02692343108355999, 0.012704652734100819, -0.026957139372825623, 0.04306120425462723, 0.006506646052002907, 0.03328413516283035, -0.054858654737472534, 0.02164091356098652, 0.04267468303442001, -0.006785328034311533, -0.023046132177114487, -0.07195752114057541, -0.01205082144588232, -0.012992420233786106, 0.03752731531858444, -0.0038101710379123688, 0.02797229029238224, -0.050956714898347855, 0.01149743515998125, 0.0165932048112154, 0.004084301181137562, 0.004232767969369888, -0.07044358551502228, 0.014133569784462452, 0.033406924456357956, 0.0022859375458210707, -0.023032641038298607, 0.02632785588502884, -0.01996196061372757, 0.022068891674280167, -0.015176717191934586, -0.047946713864803314, 0.00631381431594491, -0.06461849808692932, 0.038005243986845016, 0.005456957034766674, 0.03668174147605896, -0.10183833539485931, 0.06064650043845177, 0.002728142309933901, 0.05196432024240494, 0.05344376713037491, -0.0038477482739835978, 0.0075341323390603065, -0.04936470463871956, -0.0061651915311813354, -0.08864865452051163, -0.003112232545390725, 0.018136078491806984, 0.027247503399848938, -0.03446225821971893, 0.019503602758049965, -0.05469725281000137, 0.07126571983098984, -0.050283048301935196, -0.03716374561190605, 0.06711585074663162, 0.04369957745075226, 0.017637064680457115, 0.06943606585264206, -0.02983754873275757, 0.020744703710079193, 0.03918953612446785, -0.03713878616690636, -0.015963168814778328, 0.007078732363879681, 0.06917808204889297, -0.00014062353875488043, 0.010416529141366482, 0.015325256623327732, 0.01652875356376171, 0.06780637055635452, 0.008518899790942669, 0.027184102684259415, 0.026540607213974, -0.018268804997205734, 0.02975757047533989, 0.061530593782663345, 0.016723092645406723, -0.025881126523017883, 0.028142506256699562, 0.004326625727117062, -0.06777329742908478, 0.027566123753786087, 0.05463606119155884, 0.022657496854662895, -0.06199688836932182, 0.045616403222084045, -0.021158350631594658, -0.048537783324718475, -0.00720604881644249, 0.010670245625078678, -0.03894304856657982, 0.02173784002661705, -0.012187930755317211, -0.006189649924635887, 0.021928420290350914, 0.05309038236737251, -0.03289216384291649, -0.017799513414502144, 0.045770224183797836, -0.0020415668841451406, 0.014313185587525368, 0.017630020156502724, 0.05945763364434242, 0.07794084399938583, 0.042680684477090836, 0.017026925459504128, 0.042060647159814835, -0.017531612887978554, -0.03204719349741936, -0.012364025227725506, -0.013175904750823975, 0.011958619579672813, -0.06754247844219208, 0.02129359543323517, 0.053135499358177185, -0.006318690720945597, 0.026684584096074104, 0.011946532875299454, 0.017136387526988983, -0.028493424877524376, -0.01270600501447916, -0.003593159606680274, 0.06251984089612961, -0.008109810762107372, 0.034781794995069504, -0.02401868626475334, -0.02488855831325054, 0.04447219893336296, -0.01091169472783804, 0.004943957086652517, 0.03339329734444618, -0.019281946122646332, 0.015394280664622784, 0.00923320185393095, 0.029217220842838287, 0.07370725274085999, -0.02781582809984684, -0.060196805745363235, 0.038018546998500824, 0.057771749794483185, 0.016012491658329964, 0.01802860200405121, 0.04381454735994339, 0.02658863179385662, 0.016761846840381622, -0.0024637598544359207, -0.0075674462132155895, -0.04391913488507271, 0.008269030600786209, 0.03768398240208626, -0.0042295739986002445, 0.019372547045350075, 0.005657283589243889, 0.01086597703397274, -0.07137531787157059, -0.00522454921156168, -0.05823001265525818, -0.08520638942718506, -0.07486264407634735, -0.0027837054803967476, 0.028586748987436295, -0.04366493225097656, -0.042304906994104385, -0.022566625848412514, 0.007034802343696356, 0.02405804581940174, -0.03161001577973366, -0.02320234663784504, -0.04787728935480118, 0.009739595465362072, 0.027095166966319084, -0.005024084355682135, -0.005867913365364075, 0.037262678146362305, 0.01065037027001381, -0.05005161836743355, -0.020010964944958687, 0.05784154310822487, 0.015611466951668262, 0.007566253654658794, 0.02419579215347767, -0.04760254919528961, -0.003396162763237953, -0.042655907571315765, 0.012224314734339714, -0.0578625313937664, 0.020850010216236115, 0.022737089544534683, -0.004006682429462671, 0.028842713683843613, -0.021681958809494972, 0.0027542810421437025, -0.026100413873791695, -0.015287079848349094, -0.044369664043188095, 0.02575705200433731, 0.020908888429403305, -0.0150964530184865, 0.08550328016281128, 0.017415225505828857, 0.0041747805662453175, 0.012045019306242466, -0.015093504451215267, -0.003504532389342785, 0.013894714415073395, -0.04653044417500496, -0.04040469229221344, -0.04526496306061745, -0.04207836464047432, 0.01592743769288063, 0.034577224403619766, -0.0033987066708505154, -0.0446837954223156, -0.010261058807373047, -0.005677124951034784, -0.016944918781518936, 0.03396129235625267, -0.021087907254695892, -0.012029046192765236, -0.03528164327144623, -0.03151746466755867, -0.005919330753386021, 0.00778190279379487, -0.010792850516736507, 0.0035537434741854668, -0.0041082268580794334, -0.05935444310307503, -0.026886221021413803, 0.01576812006533146, 0.025187546387314796, 0.015307615511119366, -0.014228121377527714, 0.002828993834555149 ]
[ -0.049274154007434845, -0.040391676127910614, -0.0215857345610857, -0.021515319123864174, 0.02956833504140377, -0.0548052079975605, -0.048905279487371445, 0.02110028825700283, -0.006761312484741211, -0.014481106773018837, -0.0015528060030192137, -0.0925026461482048, 0.03005613386631012, -0.010447250679135323, 0.04544951766729355, 0.03050975315272808, -0.03903757780790329, -0.040847111493349075, -0.03221951425075531, 0.01645081117749214, 0.004625671077519655, -0.005225073546171188, -0.03189636766910553, -0.040703944861888885, 0.06833139806985855, 0.05604797974228859, 0.034776389598846436, -0.04403097182512283, 0.00697226170450449, -0.2143581360578537, 0.026905471459031105, -0.03605298697948456, 0.0013972469605505466, -0.061047639697790146, 0.019819624722003937, 0.012182722799479961, 0.023668117821216583, 0.02599370665848255, 0.04350747540593147, 0.03696978837251663, -0.004754537716507912, -0.023801380768418312, -0.0364215262234211, -0.007824869826436043, 0.05162499472498894, -0.01392965018749237, -0.03534173592925072, -0.013966213911771774, 0.025254487991333008, 0.009851689450442791, -0.059146031737327576, -0.02933426760137081, -0.010994819924235344, -0.009037584997713566, -0.008390860632061958, 0.01793568953871727, 0.013441860675811768, 0.0272549856454134, 0.021558674052357674, 0.03783980384469032, 0.004869481548666954, 0.011424344033002853, -0.14509083330631256, 0.12449757754802704, 0.021091945469379425, 0.05255648121237755, -0.032729364931583405, 0.012623202055692673, -0.004438610281795263, 0.07469091564416885, 0.001614482724107802, -0.017820993438363075, 0.008084995672106743, 0.06369206309318542, 0.006628004834055901, -0.061332643032073975, -0.021051328629255295, 0.004861115477979183, 0.021096473559737206, -0.051540557295084, -0.06015733629465103, 0.023168573155999184, -0.007186471484601498, -0.002320369705557823, 0.034490760415792465, 0.023173192515969276, 0.008183286525309086, 0.036324888467788696, 0.04109525308012962, 0.0037113032303750515, 0.04119357466697693, 0.007401398848742247, -0.004496417939662933, 0.004653629381209612, -0.11261609196662903, -0.04709228500723839, 0.03532122075557709, 0.02353270910680294, -0.025435665622353554, 0.36492690443992615, -0.024558035656809807, -0.0356331504881382, 0.05870232358574867, 0.09052761644124985, -0.001737321843393147, -0.024171004071831703, -0.0030255005694925785, -0.04034499078989029, -0.01196672860532999, -0.008315040729939938, -0.01103881374001503, -0.048401832580566406, 0.05369272455573082, -0.04376746341586113, 0.017407778650522232, -0.06378654390573502, -0.018926531076431274, -0.007749707438051701, -0.005140714347362518, -0.0021546047646552324, 0.014689655974507332, 0.035704102367162704, 0.024301616474986076, 0.009057248011231422, 0.042807191610336304, 0.030686480924487114, 0.015470736660063267, 0.057335324585437775, 0.025248248130083084, -0.03558553755283356, 0.07073875516653061, -0.027459945529699326, -0.06082477420568466, 0.039639558643102646, -0.024531887844204903, 0.016905751079320908, 0.052219849079847336, -0.023405732586979866, 0.020851602777838707, -0.039138343185186386, -0.0033037145622074604, -0.004998144693672657, 0.053112924098968506, 0.028384381905198097, -0.02841191366314888, 0.10825619101524353, -0.03096233494579792, -0.0024210691917687654, -0.0355985201895237, -0.005715104751288891, -0.020914891734719276, 0.019582713022828102, -0.01962754689157009, -0.03772275894880295, 0.023707741871476173, 0.054418519139289856, 0.04857606813311577, 0.03868839144706726, -0.04848819598555565, -0.0006503252661786973, -0.03447285294532776, -0.02332245372235775, -0.02315678261220455, -0.01470950897783041, 0.04775847867131233, -0.08169738948345184, 0.00680997408926487, 0.027743462473154068, 0.019534913823008537, -0.09429299831390381, 0.008954955264925957, 0.01035992056131363, -0.031195396557450294, -0.0011358200572431087, 0.047951120883226395, -0.029896358028054237, -0.06349125504493713, -0.018098503351211548, 0.10212055593729019, 0.01972014270722866, 0.015981020405888557, -0.015580132603645325, -0.03158612549304962, -0.0018936891574412584, -0.03899271413683891, -0.07905059307813644, -0.036492083221673965, -0.012064073234796524, -0.012861820869147778, -0.027595151215791702, 0.07332912087440491, -0.027615457773208618, -0.04679740592837334, 0.048475202172994614, -0.04605872929096222, 0.015687409788370132, 0.037306249141693115, -0.03523164242506027, -0.034766245633363724, -0.022728217765688896, 0.03375929966568947, -0.0013316991971805692, 0.018488677218556404, -0.003291964065283537, -0.04800139740109444, 0.04871108755469322, 0.07023955136537552, -0.029385827481746674, 0.08163590729236603, 0.012742683291435242, -0.020499523729085922, -0.01615612953901291, -0.02340809255838394, -0.01767422817647457, -0.03559137508273125, -0.02785227820277214, 0.0031173545867204666, -0.02777213416993618, 0.0064397514797747135, 0.047145046293735504, -0.017797792330384254, -0.053030915558338165, -0.014845505356788635, -0.3550507724285126, -0.013043766841292381, 0.018168922513723373, 0.004092811141163111, 0.03925881162285805, -0.044759176671504974, 0.01815396547317505, -0.024923527613282204, -0.02870568446815014, 0.02322891168296337, 0.11594101786613464, -0.016862574964761734, 0.0026058789808303118, -0.14035896956920624, -0.008721696212887764, 0.019788257777690887, -0.040744416415691376, -0.008644438348710537, -0.05118468776345253, -0.013135031796991825, -0.025236573070287704, 0.0026117132510989904, -0.04024098813533783, -0.0374530665576458, -0.020039571449160576, -0.02985820360481739, 0.15391477942466736, 0.01897471398115158, 0.05687808245420456, -0.011191296391189098, 0.02084161527454853, 0.0034997807815670967, -0.00986334215849638, -0.06296077370643616, -0.026947489008307457, 0.03929488733410835, -0.01209138985723257, 0.051073528826236725, 0.003231111913919449, -0.037818390876054764, -0.001753204152919352, 0.04844209924340248, 0.01311415620148182, -0.026482107117772102, -0.04823605343699455, 0.03825840726494789, -0.004754791501909494, -0.012942222878336906, -0.011876133270561695, 0.0486619770526886, 0.009037608280777931, 0.037582945078611374, 0.014666085131466389, 0.036368802189826965, -0.0282150711864233, -0.007416959851980209, -0.05726321414113045, 0.001852006302215159, -0.01636071316897869, -0.04338981583714485, -0.0016459915786981583, 0.04302825778722763, 0.05712048336863518, -0.07989674806594849, -0.03615082427859306, 0.03994922339916229, -0.009658745490014553, -0.03011205792427063, 0.030145522207021713, 0.060568880289793015, -0.004168967716395855, 0.12739676237106323, 0.017910707741975784, 0.014799672178924084, 0.0408741794526577, 0.07202644646167755, 0.025184981524944305, 0.08139483630657196, 0.006556276232004166, 0.004873332101851702, -0.037677519023418427, 0.03411001339554787, 0.03326350823044777, 0.005561397410929203, 0.020917344838380814, 0.007630555424839258, -0.03614320233464241, -0.031499139964580536, 0.0548597052693367, 0.006675751879811287, 0.0258081816136837, -0.021617000922560692, 0.011885715648531914, -0.014848055317997932, 0.034553200006484985, -0.0065272776409983635, -0.28211528062820435, 0.030490802600979805, 0.06650631129741669, 0.05559348315000534, -0.050701744854450226, -0.00817709881812334, 0.035799309611320496, -0.01310329232364893, 0.02436710149049759, -0.014478565193712711, -0.04220892861485481, 0.024813108146190643, 0.004978367127478123, -0.05519447475671768, -0.01036288682371378, -0.02102433517575264, 0.05075608938932419, -0.016107771545648575, 0.02201196737587452, -0.017342131584882736, 0.01854577101767063, -0.03428056091070175, 0.1461271196603775, 0.029402686282992363, 0.02608034759759903, 0.0057778977788984776, -0.0034230470191687346, -0.03950321301817894, 0.07349766790866852, 0.02210840955376625, 0.016117844730615616, 0.005885832943022251, 0.05215337127447128, -0.004311700351536274, 0.020646139979362488, 0.01956169679760933, -0.048617806285619736, 0.050642699003219604, 0.0239812433719635, -0.05280347913503647, -0.02322566881775856, 0.028631823137402534, -0.09220504015684128, 0.03526923432946205, 0.05401548370718956, 0.014281363226473331, 0.022709527984261513, -0.01603385992348194, -0.052193839102983475, 0.018987152725458145, -0.026737404987215996, -0.02715679444372654, -0.0067338524386286736, -0.017447706311941147, 0.0004981736419722438, 0.059227585792541504, 0.02429814077913761, 0.017004989087581635, 0.004842625930905342, -0.000539076398126781, 0.021472837775945663, -0.03785701468586922, 0.10131905972957611, -0.0310969315469265, 0.0012800198746845126 ]
[ 0.019053557887673378, 0.03755516558885574, 0.004939379170536995, -0.021037736907601357, -0.03723403066396713, -0.04680108278989792, -0.0032223816961050034, -0.033357903361320496, -0.01468360424041748, 0.00989585928618908, -0.0339975468814373, -0.005649485159665346, 0.01988915540277958, -0.021045880392193794, 0.05659140646457672, -0.005221452098339796, -0.017367403954267502, -0.04076414182782173, 0.08152364939451218, 0.0009520311723463237, 0.021342534571886063, 0.0065063671208918095, -0.02259621024131775, -0.06588173657655716, -0.037597957998514175, -0.008347107097506523, -0.0691000372171402, 0.03666098415851593, 0.02171049453318119, -0.11445297300815582, 0.006407377775758505, -0.03625282272696495, 0.04008091241121292, -0.05445045605301857, -0.033809587359428406, -0.008243507705628872, 0.008321993052959442, 0.004587704781442881, 0.009251601994037628, 0.02506791613996029, -0.01290065236389637, 0.011245138011872768, -0.017138971015810966, 0.06392495334148407, 0.0387766994535923, 0.018019964918494225, -0.002935927826911211, -0.029253242537379265, 0.0031445070635527372, 0.028861867263913155, -0.022077810019254684, 0.000173779611941427, 0.0057876985520124435, 0.003368470584973693, 0.02871246635913849, -0.017998112365603447, -0.008456328883767128, -0.012802141718566418, 0.03394652530550957, -0.024611402302980423, -0.0030158557929098606, 0.018472887575626373, -0.019758816808462143, -0.007944086566567421, 0.019626233726739883, -0.01443101093173027, -0.04254851117730141, 0.026559555903077126, 0.014354427345097065, 0.01841896027326584, 0.01064182911068201, 0.00033978637657128274, -0.05243324488401413, 0.007231589872390032, -0.020273353904485703, -0.02766810916364193, -0.01379416137933731, -0.054124973714351654, -0.02578376792371273, -0.020750928670167923, -0.04026642441749573, 0.017808161675930023, -0.007363184355199337, 0.044238753616809845, 0.010310938581824303, -0.033491574227809906, 0.025076009333133698, 0.03594367578625679, 0.01197915617376566, 0.025673797354102135, -0.043462369590997696, 0.010807269252836704, -0.02716679312288761, 0.06270910054445267, -0.09390547126531601, -0.024465294554829597, -0.004378186538815498, 0.03811747580766678, -0.0792074128985405, 0.7829379439353943, 0.045926108956336975, -0.019393760710954666, 0.030044738203287125, -0.014394093304872513, -0.01306010689586401, 0.006626525893807411, 0.032260045409202576, -0.007363822311162949, -0.013052496127784252, 0.004487409722059965, -0.016446365043520927, 0.017762701958417892, 0.0030084725003689528, 0.019471177831292152, 0.0521569587290287, 0.0116704311221838, -0.003953211475163698, 0.017279459163546562, -0.004830313380807638, -0.009533248841762543, 0.004986931569874287, 0.06054393947124481, 0.028080323711037636, 0.03330663964152336, 0.03076765313744545, -0.1410735547542572, -0.004805212374776602, -7.141905476884878e-33, -0.036987029016017914, -0.04991661757230759, 0.01733112335205078, 0.005366440396755934, 0.03285674378275871, 0.028338531032204628, -0.011229939758777618, -0.04096418246626854, 0.028613071888685226, -0.005433066748082638, 0.01853799633681774, -0.01598464325070381, -0.02832786552608013, 0.010332008823752403, 0.062146272510290146, -0.009161866270005703, 0.02535702846944332, 0.006128074135631323, -0.025416404008865356, -0.027396854013204575, -0.029684701934456825, 0.03636709600687027, -0.012588387355208397, 0.016593901440501213, 0.0016718890983611345, 0.0026336824521422386, 0.02192714437842369, 0.01682841219007969, 0.006077097728848457, -0.027456194162368774, -0.052476707845926285, 0.020257357507944107, 0.0072401235811412334, -0.05900602415204048, 0.03218039870262146, -0.03991192206740379, 0.005537780001759529, 0.015033910050988197, -0.03606204316020012, 0.04207814112305641, -0.04654757305979729, -0.04976174980401993, -0.021681809797883034, -0.013127414509654045, -0.009645413607358932, -0.012404164299368858, -0.014824249781668186, 0.09722556173801422, -0.013933400623500347, 0.01566171832382679, -0.06606532633304596, 0.07090660184621811, -0.007101627066731453, -0.021615860983729362, -0.01624320261180401, 0.033923882991075516, -0.0029084624256938696, 0.022822095081210136, -0.008699695579707623, -0.008112598210573196, 0.04175613820552826, -0.02662491984665394, 0.037993237376213074, 0.0341818705201149, -0.03604897856712341, 0.012472402304410934, 0.03437613695859909, -0.01116352342069149, -0.021444540470838547, 0.030675867572426796, -0.09658431261777878, 0.047875918447971344, -0.007489384617656469, -0.00289229117333889, 0.02811843901872635, -0.022886035963892937, 0.00009615837916499004, 0.04275643825531006, 0.0029291901737451553, 0.02177821472287178, 0.027691658586263657, -0.020801786333322525, -0.01420283131301403, -0.04903698340058327, -0.03861404210329056, -0.004206161480396986, 0.07909002155065536, 0.025432905182242393, -0.05352519080042839, -0.00480891577899456, 0.015275652520358562, -0.014747872948646545, 0.004482298158109188, 0.029501942917704582, 0.017865030094981194, 6.50713118060115e-33, -0.0029434438329190016, 0.033777765929698944, 0.026054201647639275, -0.021518075838685036, 0.020347613841295242, 0.00335636711679399, 0.04340427741408348, -0.008662809617817402, -0.029576878994703293, 0.020856838673353195, -0.019781578332185745, -0.055878810584545135, -0.03239188715815544, 0.020375071093440056, 0.0762181207537651, 0.013921009376645088, -0.009791775606572628, 0.022935081273317337, -0.0186180267482996, -0.02498658373951912, -0.013196136802434921, 0.01814417727291584, 0.013680304400622845, 0.025090904906392097, -0.01763496920466423, 0.056075312197208405, 0.005893265828490257, -0.0027151291724294424, 0.001506671542301774, 0.004934485536068678, -0.013421455398201942, -0.030747797340154648, -0.011945792473852634, -0.0352388396859169, 0.020628534257411957, 0.032248206436634064, 0.005419581662863493, 0.025953220203518867, 0.006143726408481598, 0.04021746665239334, 0.046602364629507065, 0.029026683419942856, -0.03374802693724632, -0.007809994742274284, -0.022917553782463074, 0.0492800697684288, 0.0039506107568740845, 0.021777845919132233, -0.00822350475937128, -0.009267821907997131, -0.026835689321160316, 0.01599903218448162, -0.012147660367190838, -0.036151058971881866, 0.054850511252880096, -0.04609818011522293, 0.014243577606976032, 0.05546712875366211, -0.03885670751333237, 0.012697456404566765, -0.0749070793390274, 0.006202255841344595, -0.02973649464547634, 0.03502754122018814, -0.011142859235405922, -0.004361951258033514, -0.04870951920747757, -0.05096036195755005, 0.002856980776414275, 0.014018791727721691, 0.028840268030762672, -0.06528648734092712, 0.019789842888712883, 0.0031981284264475107, 0.014783230610191822, 0.02318296767771244, -0.0027995517011731863, -0.014959610067307949, -0.05102356895804405, 0.010029899887740612, 0.052598483860492706, -0.04794825240969658, 0.058860551565885544, 0.025247011333703995, -0.03272203356027603, 0.008353796787559986, -0.0040720789693295956, -0.01043916679918766, -0.013764542527496815, 0.013117427937686443, -0.0009607236133888364, -0.004251975566148758, -0.02069205977022648, 0.036487795412540436, 0.04315418377518654, -1.2142565175565778e-8, -0.03681649640202522, 0.0036558196879923344, -0.0024372695479542017, -0.002755948109552264, 0.037631865590810776, 0.019156455993652344, -0.04560157284140587, -0.019089359790086746, 0.015308043919503689, 0.03003847599029541, 0.009851948358118534, -0.02884518913924694, 0.0025953692384064198, 0.037342268973588943, -0.010958352126181126, -0.02429899014532566, 0.004499704111367464, -0.03236909583210945, 0.0353386327624321, -0.061433933675289154, 0.0074876826256513596, -0.009443888440728188, -0.004538360517472029, 0.00894696731120348, -0.030380988493561745, 0.02734244614839554, 0.0025796890258789062, -0.08696053922176361, -0.01734459400177002, -0.016439447179436684, -0.003930425271391869, -0.002978009171783924, -0.03234364464879036, 0.013244668021798134, 0.020685836672782898, -0.02640945091843605, -0.034751273691654205, 0.036752089858055115, 0.047415733337402344, 0.011358190327882767, -0.01918281428515911, -0.026051495224237442, 0.04272667318582535, -0.03054913505911827, 0.01669640652835369, 0.030139299109578133, -0.012725809589028358, 0.05115564167499542, -0.009671085514128208, -0.027590839192271233, 0.039904527366161346, 0.011394708417356014, 0.031590741127729416, -0.01767829805612564, 0.008592058904469013, 0.001357169821858406, -0.01544850692152977, 0.010741039179265499, -0.007490030024200678, -0.008842718787491322, 0.02471684105694294, -0.03055645152926445, -0.021993670612573624, -0.05394582450389862 ]
python-matplotlib-hangs-and-shows-nothing-mac-os-x
https://markhneedham.com/blog/2015/03/26/python-matplotlib-hangs-and-shows-nothing-mac-os-x
false
2015-03-09 23:00:56
Python: Streaming/Appending to a file
[ "python" ]
[ "Python" ]
I've been playing around with Twitter's API (via the https://github.com/tweepy/tweepy[tweepy] library) and due to the rate limiting it imposes I wanted to stream results to a CSV file rather than waiting until my whole program had finished. I wrote the following program to simulate what I was trying to do: [source,python] ---- import csv import time with open("rows.csv", "a") as file: writer = csv.writer(file, delimiter = ",") end = time.time() + 10 while True: if time.time() > end: break else: writer.writerow(["mark", "123"]) time.sleep(1) ---- The program will run for 10 seconds and append one line to 'rows.csv' once a second. Although I have used the 'a' flag in my call to 'open' if I poll that file before the 10 seconds is up it's empty: [source,bash] ---- $ date && wc -l rows.csv Mon 9 Mar 2015 22:54:27 GMT 0 rows.csv $ date && wc -l rows.csv Mon 9 Mar 2015 22:54:31 GMT 0 rows.csv $ date && wc -l rows.csv Mon 9 Mar 2015 22:54:34 GMT 0 rows.csv $ date && wc -l rows.csv Mon 9 Mar 2015 22:54:43 GMT 10 rows.csv ---- I thought the flushing of the file was completely controlled by the with block but lucky for me there's actually a +++<cite>+++https://docs.python.org/2/library/io.html#io.IOBase.flush[flush()]+++</cite>+++ function which allows me to force writes to the file whenever I want. Here's the new and improved sample program: [source,python] ---- import csv import time with open("rows.csv", "a") as file: writer = csv.writer(file, delimiter = ",") end = time.time() + 10 while True: if time.time() > end: break else: writer.writerow(["mark", "123"]) time.sleep(1) file.flush() ---- And if we poll the file while the program's running: [source,python] ---- $ date && wc -l rows.csv Mon 9 Mar 2015 22:57:36 GMT 14 rows.csv $ date && wc -l rows.csv Mon 9 Mar 2015 22:57:37 GMT 15 rows.csv $ date && wc -l rows.csv Mon 9 Mar 2015 22:57:40 GMT 18 rows.csv $ date && wc -l rows.csv Mon 9 Mar 2015 22:57:45 GMT 20 rows.csv ---- Much easier than I expected - I ♥ python!
null
null
[ 0.039959173649549484, -0.027715865522623062, -0.019602390006184578, 0.022726094350218773, 0.08657477051019669, 0.003714455058798194, -0.000433654262451455, 0.07165786623954773, 0.015506807714700699, -0.01028477493673563, 0.03584687411785126, -0.013876530341804028, -0.07896371185779572, 0.027564801275730133, -0.025412539020180702, 0.04788392782211304, 0.06060975417494774, -0.02650984190404415, 0.05340760201215744, 0.007057544309645891, 0.024924201890826225, 0.03309823200106621, -0.009428991004824638, 0.02247725985944271, -0.0007953855092637241, -0.011184622533619404, -0.03569813445210457, -0.0037959073670208454, -0.047327544540166855, 0.006069748196750879, 0.045805834233760834, -0.01837567798793316, 0.009535265155136585, -0.007658317685127258, 0.002552450867369771, 0.0014211415546014905, -0.00956304743885994, 0.023038210347294807, -0.014948737807571888, 0.014356185682117939, -0.059768978506326675, 0.004327056929469109, -0.029932823032140732, -0.03152135759592056, -0.04896833747625351, 0.033463042229413986, 0.022529324516654015, 0.0500006303191185, -0.018352091312408447, 0.0181607473641634, -0.061878856271505356, 0.02931147813796997, -0.0017461550887674093, -0.047086458653211594, 0.021238714456558228, 0.05947619676589966, 0.018968792632222176, -0.07342306524515152, 0.02510216273367405, -0.015027989633381367, 0.040790993720293045, -0.03466709703207016, 0.0008010222227312624, 0.009087164886295795, 0.027978332713246346, -0.049295470118522644, -0.004118348006159067, 0.07220027595758438, -0.019365807995200157, -0.012605123221874237, -0.013117310591042042, 0.04957395792007446, -0.058616746217012405, -0.009500482119619846, -0.00444532698020339, -0.04913520812988281, 0.008482871577143669, 0.07537457346916199, 0.026637444272637367, 0.0670941099524498, -0.013691470958292484, 0.004920317325741053, 0.03950931504368782, 0.03998085856437683, 0.025523236021399498, -0.023284990340471268, -0.049911048263311386, -0.0022792646195739508, -0.048257842659950256, 0.03321580961346626, 0.01200413703918457, -0.020681118592619896, 0.012484020553529263, 0.0004295292601455003, -0.020353803411126137, 0.0012159798061475158, -0.029237359762191772, 0.019480375573039055, 0.0216037817299366, -0.01556359976530075, -0.057431578636169434, -0.04585037752985954, 0.015908753499388695, 0.046864695847034454, -0.042752955108881, -0.02575579658150673, -0.005078366957604885, -0.042664166539907455, 0.05323819816112518, 0.03017844259738922, 0.0010446282103657722, -0.013326728716492653, -0.020174387842416763, -0.015363446436822414, -0.08334631472826004, 0.06447095423936844, 0.022183535620570183, -0.03136265277862549, -0.022120505571365356, 0.010621060617268085, 0.02522302232682705, 0.04837195575237274, 0.004559483379125595, 0.06513386219739914, 0.022664442658424377, 0.019133184105157852, -0.0017742770723998547, 0.027148747816681862, -0.011755422689020634, -0.06968451291322708, -0.007038964424282312, 0.04074251279234886, 0.0050314804539084435, 0.005702850874513388, -0.02919793128967285, -0.0060541885904967785, -0.022013667970895767, -0.003522377461194992, 0.06995739042758942, 0.024886270985007286, 0.01100220251828432, -0.013556297868490219, 0.004588311538100243, -0.011981220915913582, 0.01655028946697712, 0.022345079109072685, 0.006749204359948635, -0.04092467576265335, -0.01734362728893757, 0.025127634406089783, 0.007032183464616537, -0.01837214082479477, 0.05894507095217705, -0.02857936918735504, -0.006573086138814688, 0.06921149045228958, 0.028961604461073875, 0.04161614552140236, -0.04097834229469299, 0.006721651181578636, 0.038153354078531265, 0.0705975815653801, -0.018403185531497, 0.0015739238588139415, -0.013782501220703125, -0.040626294910907745, 0.007450256962329149, 0.03191429004073143, -0.039042580872774124, -0.014587798155844212, -0.03542087599635124, -0.018336212262511253, 0.07063017785549164, -0.01859978958964348, 0.0276691522449255, 0.0263797827064991, 0.06777086853981018, 0.015553302131593227, 0.040905360132455826, -0.004475470166653395, -0.0826229378581047, 0.048849958926439285, -0.0024346450809389353, 0.052587464451789856, 0.028892260044813156, -0.013762296177446842, 0.052845463156700134, 0.01067316997796297, -0.009163890965282917, 0.012870932929217815, -0.06767787039279938, -0.05176090449094772, -0.0583115853369236, 0.004689202643930912, 0.04618474096059799, -0.06080154702067375, -0.005029749590903521, 0.061972543597221375, -0.0017691849498078227, 0.0427066870033741, 0.004719992633908987, -0.016898641362786293, 0.02314147539436817, -0.060207318514585495, -0.0798807218670845, 0.021039947867393494, 0.03659817948937416, -0.0268386360257864, -0.011985170654952526, 0.029356958344578743, -0.055586252361536026, 0.031425099819898605, 0.04037514701485634, -0.007499219384044409, 0.029884492978453636, 0.060720283538103104, 0.05023201182484627, -0.016662830486893654, 0.03096015751361847, -0.06230568140745163, 0.03509089723229408, -0.010083092376589775, -0.014600982889533043, -0.028164859861135483, 0.00132873619440943, 0.11084842681884766, 0.02505219168961048, -0.04312839359045029, -0.0737912505865097, -0.0050859409384429455, -0.025462251156568527, -0.0357496403157711, -0.01858757995069027, -0.02170211635529995, -0.017120417207479477, 0.04759889096021652, -0.026722362264990807, -0.01646743342280388, 0.00013790598313789815, -0.009375151246786118, 0.007426152471452951, 0.04536258801817894, -0.013360639102756977, 0.055109258741140366, 0.008542350493371487, -0.04123549163341522, -0.0018551110988482833, -0.030954698100686073, -0.03582246974110603, 0.0015992621192708611, 0.025570828467607498, 0.007220705039799213, 0.05902709439396858, -0.05039982497692108, -0.06602758914232254, -0.010831893421709538, -0.06622285395860672, 0.02783993072807789, 0.06314831227064133, 0.03357657417654991, -0.022329028695821762, 0.04354164004325867, -0.006732624024152756, 0.004791495390236378, -0.03341751545667648, -0.02920692414045334, -0.04227384924888611, -0.011328906752169132, 0.0036193164996802807, -0.0032272993121296167, 0.022936413064599037, -0.007582670543342829, 0.032513901591300964, -0.0059140874072909355, -0.007292271591722965, 0.010745163075625896, 0.0455520860850811, -0.034991782158613205, 0.0033506876789033413, -0.0644260048866272, 0.017805302515625954, 0.04946233704686165, -0.058034226298332214, -0.03245025873184204, 0.02108856476843357, -0.056154023855924606, 0.041039399802684784, -0.040580473840236664, -0.01953722909092903, -0.02985498681664467, -0.018478870391845703, 0.01959086023271084, 0.006383982487022877, 0.02330535463988781, 0.06717526167631149, 0.023037739098072052, -0.005289691500365734, -0.0045438907109200954, 0.008164674043655396, 0.026101604104042053, 0.028804337605834007, 0.012840636074543, 0.09183592349290848, 0.012614301405847073, -0.03881237655878067, -0.040520079433918, -0.0027775787748396397, -0.048863187432289124, -0.25792255997657776, 0.07857714593410492, -0.029169924557209015, -0.0517561249434948, 0.0331573560833931, -0.0008255160646513104, 0.018692558631300926, -0.026746122166514397, -0.017229346558451653, 0.0326126292347908, -0.037794820964336395, -0.008551213890314102, -0.061640795320272446, 0.04494103416800499, 0.005973051767796278, 0.022595316171646118, -0.01098936703056097, -0.03806433826684952, 0.010243364609777927, 0.03186456114053726, 0.020090701058506966, -0.02769293449819088, -0.011933174915611744, 0.01854095049202442, 0.030754337087273598, 0.06555335223674774, -0.03944065049290657, 0.04008033499121666, -0.04544362053275108, -0.03182649239897728, 0.013353973627090454, -0.0526876337826252, 0.030008219182491302, -0.013132646679878235, 0.011843109503388405, -0.030155736953020096, 0.0204475075006485, 0.014313586056232452, 0.018165776506066322, 0.008425301872193813, -0.022710353136062622, -0.025750532746315002, -0.029504910111427307, -0.01349120307713747, 0.07806293666362762, 0.008317689411342144, -0.02543647587299347, 0.00460480060428381, -0.012453818693757057, 0.09284203499555588, -0.023648330941796303, -0.058790747076272964, -0.05168328434228897, -0.0031657260842621326, -0.04896729066967964, -0.0013559544458985329, -0.017756914719939232, -0.00360558251850307, -0.02394716627895832, -0.03976001590490341, -0.020009005442261696, -0.03211788460612297, 0.011014070361852646, -0.05418481305241585, -0.03526495769619942, -0.05173035338521004, -0.063082754611969, -0.009551805444061756, 0.06626337021589279, 0.053159844130277634, -0.034048404544591904, 0.025268975645303726, -0.01358752604573965, -0.102055124938488, -0.004960731137543917, -0.019783472642302513, -0.034354083240032196, 0.015755759552121162, -0.0046555218286812305, 0.022138087078928947, -0.06100338697433472, -0.03796476498246193, 0.039470281451940536, 0.0036819486413151026, 0.02762783318758011, -0.0413563996553421, 0.014195417985320091, -0.024500122293829918, -0.017169388011097908, -0.01279121357947588, 0.0819893404841423, -0.04086947813630104, -0.013754052110016346, 0.0016892601270228624, -0.027115359902381897, 0.03809696435928345, 0.02796052396297455, 0.03776155784726143, 0.027983341366052628, 0.02981845661997795, 0.04925669729709625, -0.036076921969652176, -0.03413598984479904, -0.07184307277202606, 0.017939748242497444, -0.03970745578408241, -0.05425646901130676, 0.05253928154706955, -0.00235669850371778, 0.05599921941757202, 0.010080855339765549, 0.00324724311940372, 0.024730883538722992, -0.03952398523688316, -0.014095352031290531, -0.0050268629565835, 0.013609304092824459, 0.013390201143920422, 0.012943526729941368, 0.003077116562053561, -0.04270167276263237, 0.03420474752783775, 0.006190312094986439, 0.0009238968486897647, -0.034698136150836945, -0.0318232886493206, 0.00921218004077673, -0.00035018663038499653, 0.0003232741146348417, -0.0027532195672392845, -0.04823363199830055, -0.0001553141773911193, 0.029557466506958008, -0.02464345656335354, 0.0029248001519590616, -0.039383064955472946, -0.03365913778543472, -0.06846819072961807, 0.010129878297448158, 0.03157828375697136, -0.01467820443212986, -0.009562221355736256, -0.018515421077609062, -0.00253063952550292, 0.04642394185066223, 0.01556533295661211, 0.008435949683189392, 0.01365574449300766, 0.011387034319341183, 0.013554388657212257, 0.014155788347125053, -0.025113729760050774, 0.005174436140805483, -0.023145727813243866, -0.06046278774738312, -0.008889889344573021, 0.04190206527709961, 0.011165176518261433, 0.015423079952597618, -0.020712153986096382, 0.028757963329553604, -0.03185929358005524, -0.003303100587800145, 0.0036518070846796036, -0.00024830945767462254, 0.0391714908182621, 0.011022820137441158, 0.04536044970154762, 0.0041046421974897385, -0.028456570580601692, -0.016707224771380424, 0.01847063936293125, -0.03282308578491211, 0.0031093331053853035, -0.0035851241555064917, -0.015605163760483265, 0.0511828176677227, 0.004174421541392803, 0.01616699993610382, 0.02556075155735016, 0.004092368762940168, -0.025473466143012047, -0.0036614597775042057, 0.018566306680440903, 0.03944053500890732, 0.04428482428193092, -0.015050943940877914, -0.014335798099637032, -0.020787300541996956, -0.013638637028634548, -0.0183107890188694, -0.03176376596093178, 0.009134428575634956, -0.03858986124396324, -0.00588566716760397, -0.07151750475168228, 0.03348454460501671, 0.06732001900672913, -0.01555346418172121, -0.0002952080685645342, -0.03169845789670944, -0.013339483179152012, -0.021051863208413124, 0.005265760235488415, 0.05384618416428566, -0.05651429668068886, -0.013837246224284172, -0.04310915991663933, 0.019068073481321335, 0.0004906753310933709, 0.020721275359392166, -0.04658373445272446, -0.008196872659027576, -0.011970375664532185, 0.024494154378771782, -0.0044379085302352905, -0.03533890098333359, -0.04756306856870651, 0.009632936678826809, -0.026754938066005707, 0.009858429431915283, -0.02520374394953251, 0.006369317881762981, -0.026597365736961365, -0.022646334022283554, 0.03380254656076431, -0.01892276294529438, -0.009970187209546566, 0.0565592423081398, -0.006377785466611385, 0.003484465414658189, -0.04285489395260811, 0.03340968117117882, 0.03284716233611107, -0.04373433440923691, -0.03804217651486397, -0.01875971630215645, 0.003754754550755024, -0.0005516704986803234, 0.04346431791782379, -0.004493996035307646, -0.008215667679905891, -0.021703381091356277, 0.02044145204126835, 0.006345196161419153, -0.008853728882968426, -0.042403899133205414, 0.0012911087833344936, -0.007070614490658045, 0.061259642243385315, 0.011018551886081696, 0.03897342085838318, 0.017581535503268242, -0.04176176339387894, 0.025332549586892128, -0.07349712401628494, -0.0590708963572979, -0.015333698131144047, -0.03480144590139389, 0.038049113005399704, -0.0032705285120755434, 0.008229385130107403, -0.08361823111772537, 0.05602734535932541, 0.035667721182107925, 0.038542743772268295, 0.09924859553575516, 0.030516359955072403, 0.04689182713627815, -0.015472190454602242, -0.006115304306149483, -0.10819729417562485, 0.000913801311980933, 0.03929810971021652, -0.013236661441624165, -0.035938799381256104, -0.006494577042758465, 0.015273484401404858, 0.05401426926255226, -0.0543653778731823, -0.03337365388870239, 0.06326203048229218, -0.025229962542653084, 0.014049040153622627, 0.03244922310113907, -0.0421467125415802, 0.060161300003528595, 0.05203571170568466, -0.05909168720245361, -0.00400901073589921, -0.018466588109731674, 0.0586603581905365, -0.003173485863953829, 0.03304994851350784, -0.04852795600891113, -0.04526934027671814, 0.05288253724575043, 0.02139102667570114, -0.017133768647909164, 0.03981399163603783, -0.016561344265937805, 0.02015642262995243, 0.030115429311990738, -0.02667805925011635, 0.01051386073231697, 0.0034467156510800123, -0.00009040243458002806, -0.0449533574283123, -0.02218671329319477, 0.035059746354818344, 0.010500125586986542, -0.026322655379772186, 0.06799948215484619, -0.005146869458258152, -0.048460520803928375, -0.03817356377840042, 0.02533397451043129, -0.03595681115984917, -0.010454642586410046, -0.04172736406326294, -0.02526661939918995, -0.07371804118156433, 0.04582777991890907, 0.007989698089659214, 0.00826863944530487, 0.08532197773456573, -0.024803755804896355, -0.002106151543557644, -0.0028597922064363956, 0.06332381814718246, 0.0645403042435646, 0.024646669626235962, -0.007992679253220558, 0.04750632494688034, -0.0067101698368787766, -0.025722453370690346, -0.010188410989940166, -0.030881445854902267, 0.007131765130907297, 0.010089358314871788, 0.010755496099591255, 0.07411724328994751, -0.01316878292709589, 0.07870226353406906, -0.01524061243981123, -0.0011000511003658175, -0.04129932075738907, 0.0288523118942976, 0.02445569448173046, 0.030330415815114975, 0.03585357964038849, 0.04252201318740845, -0.0187782384455204, -0.011159906163811684, 0.07136434316635132, 0.00036671990528702736, -0.01301583368331194, 0.030381586402654648, -0.0039007519371807575, 0.004035496152937412, 0.018962377682328224, 0.047665707767009735, 0.052277080714702606, -0.02621031180024147, -0.021102989092469215, -0.004464797209948301, 0.031722038984298706, -0.03266090527176857, 0.02796490676701069, -0.001775612705387175, 0.013666694052517414, -0.0010226289741694927, -0.03525141626596451, -0.0020337654277682304, 0.014215563423931599, -0.02220257744193077, 0.012887166813015938, 0.003325099591165781, 0.02272648923099041, 0.025511624291539192, -0.027430113404989243, -0.04775030538439751, -0.03215614706277847, -0.03866559639573097, -0.08842431753873825, -0.041526973247528076, 0.00352909485809505, 0.03142339736223221, 0.0025711585767567158, -0.03686539828777313, -0.03822307288646698, -0.014561351388692856, 0.0008317199535667896, 0.00013994808250572532, -0.03925703465938568, -0.025667330250144005, 0.02440119907259941, 0.015557972714304924, 0.009907144121825695, 0.0034583830274641514, 0.055251594632864, -0.007542385719716549, -0.04040539264678955, -0.022067921236157417, 0.016571633517742157, 0.03701014444231987, -0.003954618237912655, -0.015244347043335438, -0.07093332707881927, 0.026429275050759315, 0.01626620814204216, -0.007487734314054251, -0.08600431680679321, 0.03738241270184517, 0.05540405213832855, 0.013954698108136654, 0.04013080522418022, -0.014591683633625507, 0.025915231555700302, -0.0487590990960598, -0.008797339163720608, -0.009741474874317646, 0.02782718650996685, 0.052827537059783936, -0.02589976042509079, 0.0687677413225174, 0.03916343301534653, -0.014260550029575825, -0.02735704742372036, -0.004607352893799543, -0.026182010769844055, 0.006422688718885183, -0.05461519584059715, -0.04285659268498421, -0.06462561339139938, -0.0600886195898056, -0.0168258398771286, -0.002047470770776272, -0.0012180543271824718, -0.01588166505098343, 0.0568966381251812, 0.04111279547214508, -0.01638185977935791, -0.01310585904866457, -0.04101118817925453, -0.03001856990158558, -0.019281554967164993, -0.011861182749271393, -0.025500210002064705, 0.04798784479498863, -0.005782949738204479, -0.019584370777010918, -0.014391052536666393, -0.00874632690101862, -0.0017557130195200443, -0.005749663803726435, 0.00023237946152221411, 0.03815136477351189, -0.015743467956781387, 0.023751288652420044 ]
[ -0.0726301446557045, -0.028745455667376518, -0.031695373356342316, 0.002615912351757288, 0.08490777015686035, -0.0850844606757164, -0.029902342706918716, 0.00652351276949048, 0.03641926124691963, 0.032058849930763245, 0.0027983137406408787, -0.027256272733211517, -0.02663339488208294, -0.04068802297115326, 0.0053604478016495705, -0.023496007546782494, -0.00899832509458065, -0.1037636250257492, -0.04224014654755592, 0.03299432992935181, -0.01870173215866089, -0.03268163278698921, -0.04345358535647392, -0.08427039533853531, 0.002482697134837508, -0.017647234722971916, 0.01554509624838829, -0.07531020045280457, -0.03847808763384819, -0.23167195916175842, 0.008374013006687164, -0.05378600209951401, -0.0058824485167860985, -0.01579318568110466, 0.044523563235998154, 0.0028629214502871037, 0.03762521222233772, -0.03708018735051155, -0.009790770709514618, 0.048161569982767105, 0.031427595764398575, 0.015802960842847824, -0.0726090595126152, -0.02948230877518654, -0.006433651316910982, -0.021171048283576965, -0.013365647755563259, 0.004023039247840643, 0.012471050955355167, 0.04484732449054718, -0.0757622942328453, -0.0027291669975966215, 0.0012811627238988876, -0.037010278552770615, -0.017115600407123566, 0.012136800214648247, 0.05954265967011452, 0.07546434551477432, 0.011176594533026218, -0.012003672309219837, 0.03039439767599106, -0.008406830951571465, -0.13717971742153168, 0.11580576747655869, 0.014666328206658363, 0.03351550176739693, -0.03872775286436081, 0.011826781556010246, -0.028543243184685707, 0.07440575957298279, -0.05685177445411682, -0.004805999342352152, -0.04532911255955696, 0.11127161979675293, 0.018381252884864807, -0.027305323630571365, 0.007093470077961683, 0.021513303741812706, 0.036085162311792374, -0.006463748402893543, -0.05960293859243393, -0.011426029726862907, 0.01955314166843891, -0.009730322286486626, -0.0232191514223814, -0.007699108216911554, -0.014320040121674538, 0.07193296402692795, 0.036417942494153976, 0.002867360133677721, 0.03268660232424736, -0.03198959305882454, 0.03884207829833031, 0.02423618547618389, -0.08119168132543564, -0.043574050068855286, 0.03755132108926773, 0.024582212790846825, 0.0008897334337234497, 0.385786771774292, -0.06273389607667923, 0.002766865771263838, 0.02896580472588539, 0.06502862274646759, 0.04206119850277901, -0.006880670785903931, 0.016752835363149643, -0.018352067098021507, -0.007963176816701889, -0.04305639490485191, 0.004985567647963762, -0.02980387955904007, 0.0628788098692894, -0.07742435485124588, 0.01623436063528061, 0.043495625257492065, 0.030478185042738914, -0.0021321477834135294, -0.021575480699539185, 0.05144936591386795, 0.015324505046010017, 0.009770757518708706, 0.02447396144270897, -0.007013123948127031, -0.0009261802770197392, 0.017080649733543396, 0.06258261948823929, 0.08832237869501114, 0.019389180466532707, -0.0024709857534617186, 0.05858561024069786, -0.03157571703195572, -0.07162214070558548, 0.024886855855584145, 0.016034269705414772, 0.01840248890221119, -0.021448887884616852, -0.028470681980252266, -0.008553958497941494, -0.044312745332717896, 0.001315280795097351, -0.04728464409708977, 0.01710408926010132, -0.015912558883428574, -0.00043042629840783775, 0.13346055150032043, 0.00006902468157932162, -0.004634950775653124, -0.013443699106574059, -0.08626853674650192, -0.012190611101686954, 0.030996650457382202, -0.012691840529441833, -0.09049609303474426, 0.007478330750018358, 0.022293424233794212, 0.06950297951698303, -0.00613786093890667, -0.02851775288581848, -0.018469365313649178, -0.05538498982787132, -0.018356140702962875, -0.026706600561738014, 0.02042548544704914, 0.015507744625210762, -0.07475004345178604, 0.000812275568023324, 0.003949522972106934, 0.017699072137475014, -0.056408122181892395, 0.027021804824471474, -0.018810926005244255, -0.03081454522907734, -0.05226978287100792, 0.045212291181087494, -0.013610172085464, -0.021284911781549454, 0.008444234728813171, 0.08131283521652222, 0.04489938169717789, 0.007271072827279568, 0.017594968900084496, -0.01766262762248516, 0.045285727828741074, -0.034679025411605835, -0.042557112872600555, -0.027596259489655495, -0.009932884946465492, 0.012953834608197212, 0.011088565923273563, 0.0049938238225877285, -0.05144638195633888, -0.04980432614684105, -0.00942448154091835, -0.02579575404524803, -0.01542702503502369, 0.05410994589328766, 0.0013145721750333905, 0.011641359888017178, -0.042238518595695496, 0.005219708196818829, -0.02206002175807953, -0.02328403852880001, 0.03682154044508934, -0.01596474088728428, 0.022668635472655296, 0.03335649520158768, -0.03367317467927933, 0.08010437339544296, 0.018832964822649956, -0.008347554132342339, -0.03630410507321358, -0.017571445554494858, -0.03653835877776146, -0.03678656369447708, -0.021872088313102722, -0.0011830488219857216, -0.02409190498292446, 0.020290078595280647, 0.04917116090655327, -0.025540560483932495, -0.0608515664935112, 0.013357392512261868, -0.318751722574234, -0.024795779958367348, -0.0053537688218057156, -0.0049956063739955425, 0.03237169608473778, -0.06630680710077286, -0.04825735092163086, -0.01943744532763958, -0.019569264724850655, 0.055713340640068054, 0.10741835087537766, -0.01600022055208683, 0.0036590062081813812, -0.11731550842523575, 0.021193308755755424, -0.009357322938740253, -0.02745811641216278, 0.003769341856241226, 0.02233879454433918, 0.06125901639461517, 0.011391404084861279, -0.037791892886161804, -0.024968041107058525, -0.03961077332496643, 0.031139152124524117, -0.03032553382217884, 0.0944662094116211, -0.0006291393074207008, 0.07100711017847061, -0.04857047647237778, 0.03197122737765312, 0.02863912098109722, -0.014903419651091099, -0.10661677271127701, -0.04348541051149368, -0.009841474704444408, -0.0006926251808181405, 0.05943842977285385, -0.002855869010090828, -0.0010523051023483276, -0.03772580996155739, 0.05175333097577095, 0.013012060895562172, -0.02135441079735756, -0.010257259011268616, 0.022747911512851715, 0.017732882872223854, -0.033145319670438766, -0.01571124792098999, 0.042807985097169876, 0.012418554164469242, -0.011726586148142815, 0.04275860637426376, 0.040231671184301376, 0.03580564633011818, -0.04121381416916847, -0.055507808923721313, 0.036744553595781326, 0.005885637830942869, -0.022854559123516083, 0.014421346597373486, 0.010829456150531769, 0.06138883903622627, 0.0029303908813744783, -0.026142915710806847, 0.009793822653591633, 0.00618733512237668, -0.009149490855634212, 0.01133003644645214, 0.0044189454056322575, -0.018340809270739555, 0.0985880121588707, -0.053074631839990616, 0.05370054766535759, 0.020568229258060455, 0.04294320568442345, 0.015306307934224606, 0.006707858294248581, 0.02231219783425331, -0.011751465499401093, 0.06522883474826813, 0.006199684459716082, 0.044626615941524506, -0.014258933253586292, 0.01559397578239441, 0.02925664186477661, -0.01594274491071701, 0.04186882823705673, 0.031118430197238922, 0.02711331844329834, 0.0020531658083200455, -0.019956793636083603, -0.010224723257124424, -0.016460934653878212, 0.05676981806755066, 0.007289007771760225, -0.2620493769645691, 0.021094417199492455, 0.019269127398729324, 0.04052579775452614, 0.014280639588832855, 0.005486455280333757, 0.004569204989820719, -0.04338790848851204, -0.016581283882260323, 0.03324363753199577, -0.009100415743887424, 0.06475522369146347, -0.0082937590777874, 0.0030281669460237026, -0.004356066696345806, 0.0010670946212485433, 0.06866718083620071, 0.016549522057175636, 0.011501926928758621, 0.016364121809601784, 0.018248483538627625, -0.04452494531869888, 0.16737046837806702, -0.008725948631763458, 0.015112843364477158, 0.04198995605111122, -0.0005847555003128946, 0.00759577052667737, 0.08373869210481644, 0.015937374904751778, -0.00378384068608284, -0.02117185853421688, 0.036639124155044556, 0.026555446907877922, 0.03230474889278412, -0.051752254366874695, -0.04574113339185715, 0.06784047931432724, 0.02036130242049694, -0.03653044253587723, -0.05078241229057312, 0.02018350176513195, -0.0264494176954031, -0.0007483039516955614, 0.024731744080781937, 0.00969895999878645, -0.04823524132370949, -0.07280155271291733, -0.057642631232738495, 0.015673110261559486, -0.017381658777594566, -0.03161047399044037, 0.014396521262824535, 0.03170366585254669, 0.04930904507637024, 0.07819580286741257, 0.041464634239673615, 0.011399632319808006, 0.04973527789115906, 0.01785363256931305, 0.007506608497351408, -0.0852532684803009, 0.10206595808267593, 0.033335763961076736, 0.006972095929086208 ]
[ -0.029961999505758286, 0.04408607259392738, -0.029072050005197525, 0.02873058244585991, 0.004928226582705975, -0.008542454801499844, -0.012098678387701511, 0.03177175670862198, 0.012125384993851185, -0.016333643347024918, -0.042138636112213135, 0.001568653155118227, 0.010166218504309654, -0.043283864855766296, -0.008559687994420528, -0.06366163492202759, -0.025672441348433495, -0.02479950524866581, 0.053445544093847275, -0.053313370794057846, -0.03350888937711716, 0.04583974555134773, 0.01598464511334896, 0.018029263243079185, 0.00011576329416129738, -0.02764882892370224, -0.05136320739984512, -0.015713026747107506, -0.0034059565514326096, -0.07863494008779526, -0.06494368612766266, -0.005595012102276087, -0.017503784969449043, -0.003696579486131668, -0.002704906277358532, -0.009343265555799007, -0.006695462856441736, 0.02789546363055706, -0.019898662343621254, 0.022649800404906273, 0.043777938932180405, -0.03204406425356865, -0.0010191518813371658, -0.029233934357762337, -0.014394492842257023, 0.009715582244098186, 0.012449415400624275, -0.004993464332073927, -0.06312055140733719, 0.05957210063934326, -0.07456044852733612, 0.021881207823753357, -0.0285764429718256, -0.005797459743916988, 0.01693829894065857, -0.03948189318180084, 0.024340907111763954, 0.013127390295267105, -0.014722847379744053, -0.03809249773621559, -0.00003611180363805033, -0.006368557922542095, -0.04824308305978775, -0.0024711163714528084, 0.009011577814817429, -0.008266609162092209, -0.05621478706598282, 0.048181988298892975, 0.02378195896744728, 0.011054791510105133, -0.012451119720935822, 0.028073107823729515, -0.047919631004333496, -0.020927121862769127, -0.04524307698011398, -0.046999283134937286, 0.024130171164870262, -0.06877880543470383, -0.007741920650005341, -0.005346390418708324, -0.02921539731323719, -0.01961338333785534, 0.00286969100125134, 0.00259032123722136, -0.04501050338149071, -0.019224243238568306, 0.021668583154678345, 0.0799526795744896, -0.02001234143972397, -0.03298099339008331, 0.012621834874153137, 0.03153970092535019, 0.024467015638947487, 0.015049301087856293, -0.06391697376966476, 0.031917691230773926, -0.012639730237424374, 0.0002322592627024278, -0.01456554513424635, 0.7795067429542542, -0.002045451896265149, 0.005372542422264814, 0.01659359782934189, 0.028391215950250626, 0.0539855919778347, -0.01607021503150463, 0.03576064482331276, -0.021855177357792854, 0.01221375074237585, -0.06494487822055817, 0.04809907078742981, 0.0043301708064973354, 0.009049364365637302, 0.0004052717122249305, 0.04338691011071205, 0.044298820197582245, -0.02006891928613186, 0.02846488170325756, 0.005002267193049192, -0.002248780569061637, 0.0024361074902117252, -0.019434427842497826, -0.024916207417845726, -0.009253410622477531, 0.008564859628677368, -0.12332216650247574, 0.05504791438579559, -7.267500436114516e-33, 0.019702745601534843, -0.03817543759942055, 0.005617394112050533, 0.0016084957169368863, 0.06622982770204544, 0.02281075157225132, -0.00021108459623064846, 0.03505043312907219, -0.012335799634456635, -0.014609279111027718, -0.027358731254935265, -0.05141570046544075, -0.01683410070836544, -0.0027790297754108906, 0.023403575643897057, -0.04620659351348877, -0.022242015227675438, 0.03788848593831062, 0.0019675660878419876, -0.005503709893673658, 0.03644482046365738, 0.03921547904610634, 0.03490098938345909, 0.07048294693231583, 0.007249690592288971, -0.002505828393623233, -0.02266005240380764, -0.021492892876267433, -0.01992100290954113, -0.03512095287442207, -0.04056990146636963, 0.04354221373796463, -0.01917228102684021, -0.05891680344939232, 0.06469462066888809, -0.0518413707613945, 0.010149065405130386, 0.01691197045147419, -0.009781647473573685, -0.029821429401636124, -0.05368288978934288, 0.02936372719705105, -0.02874259650707245, -0.02760857343673706, -0.030372032895684242, 0.013821586035192013, 0.006525273900479078, 0.03448354825377464, 0.010806206613779068, 0.02674449048936367, 0.034604933112859726, 0.03268928453326225, -0.0016625288408249617, -0.01610397920012474, 0.010567347519099712, 0.015149645507335663, 0.02187529392540455, 0.012431497685611248, 0.0513821616768837, 0.020544204860925674, 0.04452838376164436, -0.021485544741153717, 0.008460434153676033, 0.024770095944404602, 0.0005199098377488554, 0.014478358440101147, 0.07762645184993744, 0.04883408546447754, 0.051850393414497375, -0.004644919186830521, -0.04932115599513054, -0.007410422433167696, -0.019084861502051353, -0.020616373047232628, 0.051838189363479614, 0.013080790638923645, 0.02096729725599289, -0.032304797321558, 0.02693784236907959, 0.03487331047654152, 0.04333936423063278, -0.03589138388633728, -0.00020495055650826544, -0.043386321514844894, -0.020986301824450493, -0.005428492557257414, 0.031991146504879, 0.03289853408932686, -0.03260992839932442, 0.011200414039194584, 0.001176150399260223, 0.03310544416308403, 0.015818366780877113, -0.024772336706519127, -0.03420001640915871, 8.222988529552935e-33, 0.012763016857206821, -0.045867957174777985, -0.030176395550370216, -0.0067839971743524075, 0.012889874167740345, 0.0009273994946852326, 0.022260500118136406, -0.022076278924942017, 0.01294053252786398, 0.0543641559779644, 0.007818794809281826, -0.04270804673433304, -0.0198864433914423, 0.014939948916435242, 0.04299091920256615, -0.006089611444622278, 0.002641095779836178, 0.0348673090338707, -0.021496228873729706, -0.0322733037173748, -0.014528575353324413, -0.026331087574362755, 0.010252808220684528, -0.01088497880846262, 0.05915828049182892, 0.045570194721221924, -0.02097119390964508, -0.0022896507289260626, -0.004387646913528442, 0.01974334381520748, -0.03319896012544632, -0.03326324000954628, -0.0031889406964182854, -0.016893887892365456, -0.017380427569150925, 0.0413571372628212, 0.02940256893634796, -0.03644570708274841, 0.04341280460357666, -0.01775263249874115, 0.0748537927865982, 0.010935078375041485, -0.017049912363290787, 0.02323663793504238, 0.009271322749555111, 0.0784856453537941, -0.016400529071688652, 0.015496095642447472, -0.03356281667947769, 0.031222697347402573, 0.010919871740043163, 0.011317786760628223, 0.01972302608191967, 0.010997241362929344, 0.03707398101687431, -0.042625170201063156, 0.017082026228308678, 0.0059764268808066845, -0.08881302922964096, -0.02619181014597416, -0.05730106309056282, 0.0014023451367393136, -0.0035840636119246483, -0.011475767940282822, -0.00853428803384304, 0.007303279358893633, -0.012728950940072536, -0.0007637786329723895, 0.029589135199785233, -0.013314861804246902, 0.03329550474882126, -0.05017049238085747, -0.03325808420777321, 0.015904800966382027, -0.03926464170217514, 0.014492670074105263, -0.0019359936704859138, 0.015631355345249176, -0.03764805942773819, 0.013497326523065567, 0.006920865271240473, 0.009398999623954296, 0.01877930760383606, 0.005599020514637232, -0.007764830719679594, 0.03120722621679306, -0.02799377776682377, -0.028763677924871445, 0.0917343944311142, 0.043664008378982544, -0.0037448375951498747, -0.029498785734176636, -0.010588209144771099, -0.0030509266071021557, -0.01278655230998993, -1.2867381826708879e-8, -0.05489625036716461, -0.002276917453855276, -0.0005186869530007243, 0.04568328335881233, 0.022742660716176033, 0.031109236180782318, 0.002078848658129573, 0.0026260747108608484, 0.016027914360165596, 0.031654343008995056, 0.07472270727157593, -0.05675433576107025, 0.014388937503099442, 0.02624862641096115, 0.007769417483359575, -0.05521329492330551, -0.014534711837768555, -0.058802831918001175, 0.02131759002804756, -0.013547588139772415, 0.011743915267288685, 0.04614938795566559, 0.0030095933470875025, -0.023681024089455605, -0.005913207773119211, 0.018621033057570457, 0.002219387562945485, -0.09709889441728592, 0.025414688512682915, -0.02273857779800892, 0.02879219688475132, -0.06465427577495575, -0.038466330617666245, 0.02693605236709118, -0.014965030364692211, -0.04198283329606056, 0.02542703226208687, 0.0200171060860157, 0.003859153715893626, 0.028937796130776405, 0.003036384005099535, 0.008961861953139305, -0.023464219644665718, -0.015748294070363045, -0.023413831368088722, -0.04052164405584335, -0.03530246391892433, 0.01927042007446289, 0.006700525991618633, -0.025222282856702805, 0.019062867388129234, 0.001240723766386509, 0.03371382877230644, 0.03924970328807831, 0.03202510625123978, 0.01703125238418579, 0.028540106490254402, -0.027821900323033333, -0.02317662164568901, -0.020821547135710716, 0.04841121658682823, 0.04007239267230034, -0.00540541997179389, -0.030065907165408134 ]
python-streamingappending-to-a-file
https://markhneedham.com/blog/2015/03/09/python-streamingappending-to-a-file
false
2015-03-30 22:28:23
Python: Creating a skewed random discrete distribution
[ "python" ]
[ "Python" ]
I'm planning to write a variant of the http://en.wikipedia.org/wiki/Tf%E2%80%93idf[TF/IDF] algorithm over the HIMYM corpus which weights in favour of term that appear in a medium number of documents and as a prerequisite needed a function that when given a number of documents would return a weighting. It should return a higher value when a term appears in a medium number of documents i.e. if I pass in 10 I should get back a higher value than 200 as a term that appears in 10 episodes is likely to be more interesting than one which appears in almost every episode. I went through a few different scipy distributions but none of them did exactly what I want so I ended up writing a sampling function which http://stackoverflow.com/questions/24854965/create-random-numbers-with-left-skewed-probability-distribution[chooses random numbers in a range with different probabilities]: [source,python] ---- import math import numpy as np values = range(1, 209) probs = [1.0 / 208] * 208 for idx, prob in enumerate(probs): if idx > 3 and idx < 20: probs[idx] = probs[idx] * (1 + math.log(idx + 1)) if idx > 20 and idx < 40: probs[idx] = probs[idx] * (1 + math.log((40 - idx) + 1)) probs = [p / sum(probs) for p in probs] sample = np.random.choice(values, 1000, p=probs) >>> print sample[:10] [ 33 9 22 126 54 4 20 17 45 56] ---- Now let's visualise the distribution of this sample by plotting a histogram: [source,python] ---- import matplotlib matplotlib.use('TkAgg') import matplotlib.pyplot as plt binwidth = 2 plt.hist(sample, bins=np.arange(min(sample), max(sample) + binwidth, binwidth)) plt.xlim([0, max(sample)]) plt.show() ---- image::{{<siteurl>}}/uploads/2015/03/2015-03-30_23-25-05.png[2015 03 30 23 25 05] It's a bit hacky but it does seem to work in terms of weighting the values correctly. It would be nice if it I could smooth it off a bit better but I'm not sure how at the moment. One final thing we can do is get the count of any one of the values by using the http://docs.scipy.org/doc/numpy/reference/generated/numpy.bincount.html[bincount] function: [source,python] ---- >>> print np.bincount(sample)[1] 4 >>> print np.bincount(sample)[10] 16 >>> print np.bincount(sample)[206] 3 ---- Now I need to plug this into the rest of my code and see if it actually works!
null
null
[ -0.00918398704379797, -0.027851920574903488, -0.004972239024937153, 0.05165053904056549, 0.05791134759783745, 0.003700087545439601, -0.029894258826971054, 0.0355687253177166, -0.0008528971229679883, -0.015352538786828518, 0.002649680944159627, 0.004113154951483011, -0.04986097291111946, 0.022925427183508873, -0.006770864129066467, 0.06780654937028885, 0.07488942891359329, 0.002218449953943491, 0.015021114610135555, -0.006065115332603455, 0.024933379143476486, 0.006773937493562698, -0.018266597762703896, 0.015256786718964577, 0.008722190745174885, 0.002428237348794937, 0.01818990893661976, 0.016810689121484756, -0.021828213706612587, -0.0004883597139269114, -0.0006593763246200979, -0.02694568783044815, -0.016218945384025574, 0.0011632083915174007, 0.005427882075309753, 0.03101108781993389, -0.010155540890991688, 0.03255889192223549, 0.010746398009359837, -0.011918386444449425, -0.0352177768945694, -0.001504874904640019, -0.032229628413915634, -0.011595392599701881, -0.06909586489200592, -0.0055133323185145855, -0.05516187474131584, 0.015702052041888237, -0.012915480881929398, -0.007731893099844456, -0.07226448506116867, 0.04683278501033783, -0.007099186535924673, -0.03487042710185051, 0.00876484252512455, 0.06665630638599396, 0.010967738926410675, -0.06336907297372818, 0.0434611551463604, -0.003913102671504021, 0.007356732152402401, -0.019584836438298225, -0.0018787451554089785, 0.06756465882062912, 0.004326184745877981, -0.04362007603049278, -0.02128199301660061, 0.05633879825472832, -0.03280162438750267, -0.017594195902347565, -0.039738770574331284, -0.00038818680332042277, -0.03109215758740902, -0.038358550518751144, -0.012939241714775562, -0.05146750807762146, -0.0025881147012114525, 0.048901841044425964, 0.01203398872166872, 0.020681625232100487, -0.014859178103506565, -0.014319607056677341, 0.032842572778463364, 0.04298011586070061, -0.013342134654521942, -0.03260551393032074, -0.04858566075563431, -0.024701882153749466, -0.057145681232213974, 0.027255939319729805, 0.03510258346796036, -0.07344165444374084, 0.036571063101291656, -0.006220205221325159, -0.021596036851406097, -0.018072765320539474, 0.017089003697037697, -0.014423390850424767, -0.014270434156060219, -0.004455819260329008, -0.042134497314691544, -0.03535202890634537, 0.027025867253541946, 0.009834442287683487, -0.07116921246051788, 0.007837573066353798, 0.008344360627233982, -0.017232470214366913, -0.01942211575806141, 0.023164942860603333, -0.02676600031554699, 0.01720135286450386, -0.024305325001478195, 0.0025581838563084602, -0.0909610241651535, 0.05276966467499733, 0.044308558106422424, -0.0008787420811131597, -0.03990079089999199, 0.001200800179503858, 0.036265626549720764, 0.023259304463863373, -0.021993586793541908, 0.09130503982305527, -0.011914781294763088, 0.02700970321893692, 0.016298718750476837, 0.07437281310558319, -0.01587412692606449, -0.04073931276798248, 0.001463695545680821, 0.03935744985938072, -0.018688147887587547, 0.005635319743305445, -0.016618411988019943, -0.03372127562761307, -0.04789598286151886, 0.013760161586105824, 0.04871177673339844, 0.015236575156450272, 0.008115696720778942, -0.03636273369193077, -0.003220996353775263, -0.003945843782275915, -0.003642079886049032, -0.03809695318341255, -0.010311318561434746, -0.034972529858350754, -0.007288016844540834, 0.011007155291736126, 0.011275343596935272, 0.00008975658420240507, 0.06026289612054825, -0.0166401956230402, 0.005097891204059124, 0.06575734168291092, 0.03840445354580879, 0.022935079410672188, 0.007186951581388712, -0.004347202833741903, 0.0320778489112854, 0.024651749059557915, -0.013430929742753506, 0.03182035684585571, -0.0024595134891569614, -0.028229016810655594, 0.045025184750556946, 0.0961119681596756, -0.013092820532619953, -0.006467781960964203, -0.05066613480448723, -0.031908631324768066, 0.05258725956082344, -0.0009971833787858486, -0.021978311240673065, 0.03190820291638374, 0.06715255230665207, 0.034300997853279114, 0.026596611365675926, 0.01319403387606144, -0.07399370521306992, 0.05519478768110275, 0.01356087252497673, 0.022224733605980873, 0.04723687469959259, -0.03236767277121544, 0.05822044983506203, 0.030270198360085487, 0.025600053369998932, 0.017005877569317818, -0.07475388795137405, -0.06606313586235046, -0.012349296361207962, 0.0018307900754734874, 0.058239780366420746, -0.029692532494664192, 0.003914418164640665, 0.05589570477604866, 0.028455255553126335, -0.00577258737757802, 0.012299899011850357, -0.014221166260540485, 0.032774653285741806, -0.03705810010433197, -0.05269036442041397, 0.051506608724594116, 0.022535666823387146, -0.019787948578596115, -0.029488692060112953, 0.012614011764526367, 0.0016798521392047405, 0.02447316236793995, 0.005120304878801107, -0.03388829156756401, 0.0354808084666729, 0.02646292932331562, 0.05741080641746521, -0.03732752427458763, 0.03309047594666481, -0.04551537707448006, 0.03468366712331772, -0.03138377144932747, -0.01703062281012535, -0.04004824161529541, -0.009132913313806057, 0.1257808953523636, 0.07870633900165558, -0.04744952917098999, -0.047307584434747696, 0.03201036900281906, -0.03603760525584221, -0.012565068900585175, 0.03824559971690178, -0.0027823043055832386, -0.03781012445688248, 0.010945259593427181, -0.038460515439510345, -0.03997112065553665, 0.022389402613043785, -0.06556028127670288, -0.013442725874483585, 0.08088309317827225, -0.021578392013907433, 0.0696561187505722, 0.006451012566685677, -0.009560850448906422, 0.008739913813769817, 0.008183225989341736, -0.044253699481487274, -0.00234470097348094, 0.012885799631476402, 0.010346482507884502, 0.04630516096949577, -0.022903867065906525, -0.0464259535074234, -0.010147260501980782, -0.025828907266259193, 0.016389044001698494, 0.0741710364818573, 0.05823700875043869, -0.0069429511204361916, 0.058386508375406265, 0.00412251241505146, -0.01903827115893364, -0.03927227854728699, -0.06198415160179138, -0.06457929313182831, -0.011820711195468903, -0.014509257860481739, 0.002885952591896057, 0.050390686839818954, -0.012537936680018902, 0.0029507118742913008, -0.011704615317285061, 0.006946002598851919, -0.015924228355288506, 0.06527820974588394, 0.0069494047202169895, -0.02388419583439827, -0.014420044608414173, -0.004004483576864004, 0.06049717962741852, -0.009481527842581272, -0.04017213359475136, 0.00483558839187026, -0.0497482568025589, 0.018465762957930565, -0.05592823773622513, 0.009948990307748318, -0.007695214357227087, -0.008565985597670078, 0.055387627333402634, 0.033508799970149994, -0.010972404852509499, 0.03749522566795349, 0.022153576835989952, 0.01888361945748329, 0.02255929820239544, 0.0169131588190794, 0.015658605843782425, -0.015588357113301754, 0.001400596578605473, 0.02907165139913559, 0.02087816596031189, -0.03663446381688118, -0.031486764550209045, -0.002070579444989562, -0.02200469747185707, -0.2903681993484497, 0.02523162215948105, -0.015421868301928043, -0.00268428772687912, -0.0012402249267324805, -0.048470351845026016, -0.019783027470111847, -0.020092852413654327, -0.029981067404150963, 0.01731204427778721, -0.021379977464675903, -0.04168669134378433, -0.036669179797172546, 0.07844918966293335, 0.040841180831193924, 0.0006160599295981228, 0.005479432176798582, -0.000019817625798168592, 0.03091360256075859, 0.05040043219923973, 0.012952504679560661, -0.05532258376479149, -0.008685510605573654, 0.05074251443147659, 0.000008110140697681345, 0.06121183559298515, -0.06380405277013779, 0.03405972942709923, -0.08036035299301147, -0.0019071203423663974, -0.0062454077415168285, -0.04222455993294716, 0.00473184697329998, -0.011540004052221775, 0.015702446922659874, -0.02966008335351944, 0.016531625762581825, -0.015008015558123589, 0.01071256399154663, 0.04397996515035629, -0.04153409227728844, -0.04283653944730759, -0.011759504675865173, -0.0033022877760231495, 0.07942841947078705, 0.010077609680593014, -0.0552530512213707, -0.026105249300599098, -0.05224889889359474, 0.06216679513454437, -0.022273339331150055, -0.0192448440939188, -0.06981395184993744, 0.009786559268832207, -0.03158796206116676, 0.00020246920757927, -0.016365082934498787, 0.017926691100001335, -0.03646048903465271, -0.01959981583058834, -0.006544763687998056, -0.004684543237090111, -0.006612766068428755, -0.052636533975601196, -0.02321605384349823, -0.04936068877577782, -0.04874572902917862, -0.023373277857899666, 0.055692773312330246, 0.021722134202718735, -0.04116338863968849, -0.04303783178329468, 0.001456301542930305, -0.10525201261043549, -0.009537429548799992, -0.005512234289199114, -0.005219599697738886, 0.029957730323076248, 0.009998394176363945, 0.03646191209554672, -0.06052497401833534, -0.06341647356748581, 0.04067700356245041, 0.0006674295873381197, 0.0008431688765995204, -0.042943790555000305, -0.005602255463600159, 0.004886917769908905, -0.0013010009424760938, -0.039453715085983276, 0.06318619847297668, -0.0011018917430192232, 0.005371468607336283, 0.01293425913900137, -0.0016706763999536633, 0.036422569304704666, 0.00947132334113121, 0.013599324971437454, 0.029016384854912758, 0.025689246132969856, 0.029993055388331413, -0.08421457558870316, -0.028322972357273102, -0.03742507845163345, -0.03344608098268509, 0.0016460887854918838, -0.04897981137037277, 0.03194979950785637, 0.02318122796714306, -0.03620191663503647, -0.0023011022713035345, 0.022077234461903572, 0.022521311417222023, -0.030523177236318588, -0.0034986408427357674, -0.03139100968837738, 0.017505012452602386, 0.019328171387314796, 0.008868340402841568, 0.006422750186175108, -0.07067546993494034, 0.023904109373688698, -0.02597820945084095, -0.03335951268672943, -0.04032556340098381, -0.02471909299492836, 0.006727152969688177, -0.02263559401035309, 0.023008709773421288, -0.010769234038889408, -0.024513766169548035, 0.02576489932835102, 0.05350989103317261, 0.002680720528587699, 0.013694604858756065, -0.022001828998327255, -0.02724749967455864, -0.022740932181477547, 0.027727356180548668, -0.012386869639158249, 0.007429156452417374, 0.0005896513466723263, 0.018490849062800407, 0.03175995126366615, 0.07804624736309052, -0.03265296667814255, 0.004274088889360428, 0.006432402413338423, -0.011962462216615677, -0.005583067890256643, 0.02222658507525921, 0.021449798718094826, 0.0313243642449379, -0.009235265664756298, -0.04425786808133125, 0.009066072292625904, 0.03618239238858223, -0.002049718052148819, -0.014342146925628185, -0.07254315912723541, 0.04421306028962135, -0.019535483792424202, -0.03160041570663452, -0.020571280270814896, -0.0008309058612212539, 0.03522564470767975, -0.027446968480944633, 0.06324134767055511, 0.00408478919416666, -0.006137739401310682, 0.018439240753650665, -0.012592499144375324, -0.031067293137311935, 0.010199224576354027, -0.05301767960190773, -0.01884906180202961, 0.026591040194034576, -0.0008683620835654438, -0.00818760134279728, 0.04179596155881882, -0.03189416602253914, -0.033501964062452316, -0.003707459196448326, -0.007160903420299292, 0.07074931263923645, 0.045889806002378464, -0.033714018762111664, -0.02862955443561077, -0.03486527502536774, -0.00662798248231411, -0.04076196253299713, 0.00008105674351099879, -0.0163450725376606, 0.01476283185184002, -0.019456682726740837, -0.050938624888658524, 0.010395705699920654, -0.001173935947008431, -0.008631390519440174, -0.005974156782031059, -0.024571098387241364, 0.00793807115405798, -0.04016886278986931, 0.009828946553170681, 0.059846315532922745, -0.0556788444519043, 0.024483123794198036, -0.013384631834924221, 0.012165453284978867, -0.0027095566038042307, 0.03202727064490318, -0.03948792442679405, -0.03980417549610138, -0.01471133716404438, 0.0025429180823266506, -0.036062151193618774, -0.032001614570617676, -0.027214687317609787, 0.05159260332584381, -0.01457357406616211, 0.015394407324492931, -0.02478611096739769, 0.019237609580159187, -0.016408415511250496, -0.02126123383641243, 0.03683943301439285, -0.028702758252620697, -0.05772849917411804, 0.040752559900283813, -0.01108554843813181, 0.036095064133405685, -0.03898758068680763, 0.021999159827828407, 0.030793387442827225, -0.02660415880382061, -0.014796813949942589, -0.04627874493598938, 0.020143136382102966, -0.023456016555428505, 0.048330459743738174, 0.021809641271829605, 0.017831454053521156, -0.03717479109764099, 0.017635758966207504, -0.008044575341045856, 0.018894068896770477, 0.03548869863152504, -0.03876665234565735, 0.01938340626657009, 0.03830358013510704, -0.010970594361424446, 0.029970930889248848, -0.02683568187057972, -0.018929224461317062, 0.05379165709018707, -0.016747670248150826, -0.0212648194283247, -0.021072788164019585, -0.0415475033223629, 0.031648121774196625, 0.01750979945063591, 0.03670531511306763, -0.06573312729597092, 0.045412998646497726, 0.02482466772198677, 0.04293813928961754, 0.04574350267648697, 0.002321664011105895, 0.01906582899391651, -0.036189183592796326, 0.003438672050833702, -0.09914559870958328, -0.02071595937013626, 0.03350285440683365, 0.04181846231222153, 0.013827446848154068, 0.02779063582420349, -0.050998520106077194, 0.04105234146118164, -0.08182364702224731, -0.01794283837080002, 0.04019816219806671, 0.0191348809748888, 0.009261982515454292, 0.03100108541548252, -0.04620175063610077, -0.00539079075679183, 0.03367718309164047, -0.03303366154432297, 0.004712591879069805, 0.022115709260106087, 0.06377808749675751, 0.010811167769134045, -0.02184733934700489, 0.007764031644910574, 0.009478133171796799, 0.08356603235006332, 0.06310506165027618, 0.003208533627912402, 0.04694822058081627, -0.014431395567953587, 0.05344434455037117, 0.028077997267246246, -0.02155977487564087, 0.01580219902098179, 0.009202038869261742, 0.004303485155105591, -0.055596236139535904, 0.054939884692430496, -0.0057409233413636684, -0.008128797635436058, -0.06713075190782547, 0.06589586287736893, -0.0018347288714721799, -0.05655607581138611, -0.07924283295869827, 0.05964308977127075, -0.034984081983566284, 0.021072566509246826, -0.01309226080775261, -0.03162588179111481, -0.0034151070285588503, 0.04951418191194534, -0.012322191148996353, 0.0021290737204253674, 0.05137767642736435, -0.03633057326078415, 0.013405734673142433, 0.047080956399440765, 0.06319210678339005, 0.0912768766283989, 0.07613901048898697, -0.026015855371952057, 0.06302986294031143, -0.03280660882592201, -0.03194420412182808, -0.022705651819705963, -0.02843763865530491, 0.0019349649082869291, 0.005968756042420864, 0.0273039098829031, 0.054268497973680496, 0.001624227617867291, 0.048082977533340454, -0.01026039570569992, 0.005092722829431295, -0.01047266274690628, 0.0042265430092811584, 0.03236733749508858, 0.05430196598172188, 0.001851141219958663, 0.028094861656427383, -0.015794144943356514, -0.042955972254276276, 0.07083659619092941, 0.018823133781552315, -0.028514781966805458, 0.0054170917719602585, -0.028416823595762253, 0.010546436533331871, 0.006945379078388214, 0.02700333669781685, 0.08223335444927216, -0.002486823359504342, -0.024978360161185265, 0.03495590761303902, 0.036240898072719574, -0.014218277297914028, 0.013223244808614254, 0.025049639865756035, 0.0002530218043830246, -0.0018464522436261177, -0.051006074994802475, -0.022144034504890442, -0.023402206599712372, -0.01597641035914421, 0.024981604889035225, -0.0139534380286932, 0.03951472043991089, 0.04994826391339302, -0.009379217401146889, -0.0691937804222107, -0.02732062339782715, -0.028879374265670776, -0.04943794757127762, -0.07920534908771515, 0.019115904346108437, -0.00042667737579904497, -0.001466334448195994, 0.005025178659707308, -0.005137612111866474, -0.009050063788890839, 0.001099209999665618, 0.0019310072530061007, -0.04035932570695877, -0.0321711041033268, 0.01555488258600235, 0.021735362708568573, 0.0016687969909980893, -0.02867325022816658, 0.042844269424676895, 0.000677260453812778, -0.035163719207048416, -0.0018272593151777983, 0.022580981254577637, 0.021179165691137314, 0.03410398215055466, 0.02422989532351494, -0.08260806649923325, -0.006455307360738516, 0.011964915320277214, -0.007343403995037079, -0.07908543199300766, 0.010374070145189762, 0.02788006141781807, -0.00147073226980865, 0.013725675642490387, -0.0002647889486979693, -0.008345707319676876, -0.04739817604422569, -0.010941960848867893, -0.009534541517496109, 0.007997081615030766, 0.06661679595708847, -0.03904791548848152, 0.08703956007957458, -0.006759761366993189, 0.00879702065140009, -0.04106352478265762, 0.0024788128212094307, -0.027340346947312355, 0.013678140938282013, -0.057904042303562164, -0.026033073663711548, -0.024487340822815895, -0.05742006003856659, 0.008162489160895348, 0.011273536831140518, -0.047964662313461304, -0.015991345047950745, 0.03642303869128227, -0.010983515530824661, -0.017723526805639267, 0.041173797100782394, -0.028750939294695854, 0.005057463422417641, -0.01367184892296791, -0.014499481767416, -0.006117559969425201, 0.032887108623981476, 0.016434358432888985, 0.02249240130186081, 0.037005554884672165, -0.05554535984992981, -0.023799987509846687, -0.026357004418969154, 0.01575770042836666, 0.0583840049803257, 0.01023697480559349, 0.02426993101835251 ]
[ -0.064970962703228, 0.006424666382372379, -0.03630343824625015, -0.046536609530448914, 0.06079530343413353, -0.01395677775144577, -0.010561375878751278, 0.026705291122198105, 0.016360342502593994, -0.0032084989361464977, -0.013955650851130486, -0.07626685500144958, 0.010219329036772251, -0.004692063666880131, 0.05083700641989708, -0.012998493388295174, -0.014866050332784653, -0.06076253205537796, -0.03054191917181015, 0.03539818525314331, 0.02268851175904274, -0.01848006248474121, -0.0320809967815876, -0.04874842241406441, 0.02110368199646473, 0.0249905027449131, 0.027382347732782364, -0.03553971275687218, -0.01516589242964983, -0.23335370421409607, 0.02759769931435585, -0.01941627450287342, 0.05153700336813927, -0.03748226910829544, 0.043569277971982956, 0.0356900580227375, 0.020487071946263313, 0.01517176628112793, 0.002783738076686859, 0.05985698476433754, 0.010244752280414104, -0.0033227792009711266, -0.037386130541563034, -0.04118117690086365, 0.021359585225582123, -0.008306605741381645, -0.039026789367198944, -0.023301340639591217, -0.0012216931208968163, 0.05230660364031792, -0.05320505052804947, -0.010598753578960896, -0.043234825134277344, -0.0034406939521431923, -0.029427703469991684, -0.01430524978786707, 0.049753718078136444, 0.03059992752969265, 0.02198108471930027, 0.013984104618430138, 0.006341852247714996, 0.019800880923867226, -0.1560070663690567, 0.10754863917827606, 0.00477812672033906, 0.038674842566251755, -0.05338228866457939, -0.03278069943189621, -0.021826602518558502, 0.08465985953807831, -0.01794661022722721, 0.003948472440242767, -0.019317757338285446, 0.08541259169578552, 0.01990901678800583, -0.014700050465762615, 0.0047029792331159115, -0.008303392678499222, 0.03748026117682457, -0.05827227979898453, -0.057820092886686325, 0.020122533664107323, -0.021932829171419144, 0.0016382995527237654, -0.0013904633233323693, 0.004518645349889994, -0.012013141065835953, 0.0281753521412611, 0.011662169359624386, 0.018935346975922585, 0.04748792573809624, 0.02946539595723152, -0.011697710491716862, 0.022831929847598076, -0.06819518655538559, -0.04285377636551857, 0.013681755401194096, 0.022545894607901573, 0.0034202467650175095, 0.40285494923591614, -0.014527066610753536, -0.035849764943122864, 0.037120021879673004, 0.05273883789777756, -0.011319851502776146, -0.03732597827911377, -0.000373083574231714, -0.053671952337026596, 0.010366804897785187, -0.040835943073034286, 0.01183620747178793, -0.03995346277952194, 0.05834893137216568, -0.08039619028568268, 0.0341033972799778, 0.005273606162518263, 0.024284452199935913, 0.018790658563375473, 0.0043350327759981155, 0.0014693927951157093, -0.0031340233981609344, -0.008771665394306183, 0.019415538758039474, -0.026628956198692322, 0.0063317823223769665, 0.03706705942749977, 0.0480564646422863, 0.07634752988815308, 0.01906161569058895, -0.014635644853115082, 0.03843579813838005, -0.05149028077721596, -0.08626452088356018, 0.012828347273170948, 0.0013005526270717382, 0.014148533344268799, 0.008331972174346447, -0.013380778953433037, 0.0062975212931632996, 0.0259049404412508, -0.005127753131091595, -0.027858175337314606, -0.009593818336725235, 0.007413086481392384, -0.045863594859838486, 0.12463366240262985, -0.008351864293217659, -0.024898720905184746, -0.042406871914863586, -0.050115857273340225, 0.015599790960550308, 0.007721591275185347, 0.01659472845494747, -0.06594283878803253, 0.0036355475895106792, 0.028432605788111687, 0.0879904106259346, -0.013582363724708557, -0.053429797291755676, -0.004761067219078541, -0.04080866649746895, -0.03331863880157471, -0.01535533182322979, 0.049110542982816696, 0.04432741552591324, -0.06276412308216095, -0.018462900072336197, 0.03234955668449402, 0.013807907700538635, -0.0757565051317215, 0.031737376004457474, 0.0018304308177903295, -0.0437711738049984, 0.019558152183890343, 0.03859131038188934, -0.030628614127635956, -0.05190030857920647, 0.011709947139024734, 0.08574773371219635, 0.010322597809135914, 0.0004029703850392252, 0.01936201937496662, -0.04760921001434326, 0.0036677338648587465, -0.06275779753923416, -0.06975027918815613, -0.05682755634188652, 0.01711566001176834, -0.0010464639635756612, -0.013077306561172009, 0.027123799547553062, -0.018858611583709717, -0.029012663289904594, 0.04941624030470848, -0.03667464852333069, -0.029525836929678917, 0.006452708039432764, 0.023767827078700066, -0.053409889340400696, -0.02466251142323017, -0.02198702096939087, 0.01444019004702568, 0.0007889264379628003, 0.019537292420864105, -0.022411949932575226, 0.034253042191267014, 0.06701594591140747, -0.023713786154985428, 0.0778331384062767, 0.019357852637767792, -0.006957645993679762, -0.020118040964007378, -0.023452473804354668, 0.027230748906731606, -0.023202545940876007, -0.022303562611341476, 0.0019113681046292186, -0.022282449528574944, 0.025796810165047646, 0.01920599676668644, -0.0004657908866647631, -0.07360343635082245, -0.02767827734351158, -0.36966195702552795, -0.047466497868299484, 0.003701769048348069, -0.0011754953302443027, 0.05853268876671791, -0.03933931514620781, 0.03232165798544884, -0.018138112500309944, -0.0008995032403618097, 0.05621742084622383, 0.060777291655540466, -0.003972854930907488, -0.015003116801381111, -0.12608906626701355, -0.004793211817741394, 0.022987227886915207, -0.05500265583395958, -0.020834239199757576, -0.025672156363725662, 0.029398608952760696, 0.00511138467118144, -0.011816280893981457, -0.03169358894228935, -0.058453187346458435, -0.01372147724032402, -0.021123187616467476, 0.11509019881486893, -0.004243155010044575, 0.05637141317129135, -0.03628739342093468, 0.04354247450828552, -0.02461406961083412, 0.026011455804109573, -0.008328578434884548, -0.009007992222905159, -0.023788776248693466, -0.018970927223563194, 0.04396804794669151, -0.028151340782642365, -0.04425908252596855, -0.05111223831772804, 0.038149479776620865, -0.01735140010714531, -0.027362115681171417, -0.07393720746040344, 0.02410109154880047, -0.015360185876488686, -0.025669632479548454, 0.013849928043782711, 0.051709603518247604, 0.0028566867113113403, 0.05543017014861107, 0.004755579866468906, 0.0014564197044819593, 0.003943025134503841, -0.026649275794625282, -0.07667843997478485, 0.006473212037235498, -0.04388497769832611, -0.018024735152721405, 0.012746592052280903, 0.025397056713700294, 0.04897219315171242, -0.03633308783173561, -0.032644324004650116, -0.006206026300787926, 0.035856861621141434, -0.01498286984860897, 0.02614218182861805, -0.010192150250077248, -0.004214610438793898, 0.12156244367361069, 0.006521044299006462, 0.01654674857854843, 0.03106517344713211, 0.05234675109386444, 0.014514783397316933, 0.054102182388305664, 0.005942526739090681, -0.007495463825762272, 0.039396874606609344, 0.015166752971708775, 0.028442595154047012, 0.004029920790344477, 0.03434779867529869, 0.01927066035568714, 0.004596560727804899, -0.001091613550670445, 0.055720243602991104, 0.03477250784635544, -0.00906813982874155, 0.03099389374256134, 0.0032618565019220114, -0.01588871143758297, 0.010670452378690243, 0.001435593469068408, -0.2874644696712494, 0.04874713718891144, 0.026383014395833015, 0.09052937477827072, 0.002628495218232274, -0.008186849765479565, 0.03519739583134651, -0.023593856021761894, -0.009541206993162632, -0.02101733349263668, -0.003950369078665972, 0.022948982194066048, 0.013618642464280128, -0.012733595445752144, -0.0001302934397244826, -0.038887135684490204, 0.056815069168806076, 0.010393751785159111, 0.006411262787878513, 0.005249216686934233, 0.014366813004016876, -0.03271344304084778, 0.17893458902835846, 0.011864197440445423, -0.0004280068969819695, 0.010281803086400032, 0.01166649628430605, 0.008430084213614464, 0.07527370750904083, 0.0018652068683877587, 0.015702543780207634, -0.0047978563234210014, 0.0249416995793581, -0.033325791358947754, 0.020534662529826164, -0.0058765411376953125, -0.009560943581163883, 0.03606937825679779, 0.04350309073925018, -0.02408737502992153, -0.00020763897919096053, 0.02633071132004261, -0.06495721638202667, 0.0333431176841259, 0.06835583597421646, 0.020100122317671776, 0.01546663511544466, -0.03728324547410011, -0.04375671595335007, 0.022945404052734375, -0.05475658178329468, 0.00014909717720001936, 0.0005227422807365656, -0.018312552943825722, 0.03433840721845627, 0.07147416472434998, 0.04873371496796608, 0.007432593498378992, 0.017233284190297127, -0.005122450180351734, -0.026945460587739944, -0.049702465534210205, 0.10121908783912659, 0.0011546380119398236, 0.026349779218435287 ]
[ 0.03081730753183365, 0.029939481988549232, -0.014000598341226578, -0.013121028430759907, 0.011419806629419327, -0.007830730639398098, 0.040342092514038086, 0.02760280668735504, 0.0024149224627763033, 0.002234662650153041, -0.01774495467543602, 0.013679005205631256, 0.02819339744746685, -0.006168093532323837, 0.023168006911873817, -0.008458994328975677, -0.001587193226441741, -0.016329940408468246, 0.013474633917212486, -0.004092788323760033, -0.01448223739862442, 0.04070800542831421, 0.020517075434327126, -0.01829610951244831, 0.007074455730617046, -0.027468770742416382, -0.02934943698346615, -0.0011056571966037154, 0.029888134449720383, -0.11024419218301773, 0.004889723379164934, -0.02305566892027855, -0.000048367215640610084, -0.0077490233816206455, -0.0011279411846771836, -0.019744766876101494, -0.05591408535838127, -0.0015577467856928706, 0.008258777670562267, 0.032137107104063034, -0.0016434153076261282, -0.021739214658737183, -0.02988990768790245, 0.03527962416410446, -0.011962782591581345, -0.015479895286262035, -0.017169686034321785, 0.020870065316557884, 0.014389016665518284, 0.042477335780858994, -0.05438326299190521, 0.03185437619686127, -0.016937997192144394, 0.019528498873114586, 0.014089841395616531, -0.052829112857580185, 0.022575629875063896, -0.0356803722679615, -0.008737349882721901, -0.05363532528281212, 0.006453299429267645, 0.005040028132498264, -0.029493117704987526, -0.00048427487490698695, -0.0030635721050202847, -0.024303853511810303, -0.015828939154744148, 0.01359761692583561, -0.005385001190006733, 0.00497177941724658, -0.010044204071164131, 0.001312904991209507, -0.028810521587729454, 0.01372580323368311, 0.0067212856374681, -0.011131432838737965, -0.014065280556678772, -0.07014058530330658, -0.018507935106754303, -0.007423603441566229, -0.04408906400203705, 0.03468875214457512, 0.029594652354717255, -0.005814713425934315, -0.03000708669424057, -0.05797838419675827, 0.017814554274082184, 0.03113202564418316, 0.017386293038725853, 0.03415636718273163, -0.015275388024747372, 0.008882633410394192, 0.008708849549293518, 0.01658034883439541, -0.10422015935182571, 0.011635861359536648, -0.0169061329215765, -0.013327354565262794, -0.003083897056058049, 0.8457844257354736, 0.01113126240670681, -0.015795955434441566, 0.04611658304929733, -0.013673057779669762, -0.007231276948004961, -0.02824198640882969, 0.0168509129434824, -0.012017548084259033, 0.016334131360054016, -0.04510180652141571, 0.013588355854153633, -0.0006933570839464664, 0.04194023832678795, 0.03645056113600731, 0.04549473524093628, 0.02708338387310505, 0.021168939769268036, 0.019451286643743515, -0.03769352659583092, -0.009943487122654915, 0.02322296053171158, 0.028941774740815163, 0.007452938240021467, 0.017757054418325424, 0.006367865018546581, -0.1409546583890915, -0.003527166089043021, -7.043715699076723e-33, 0.0036699522752314806, -0.04480608552694321, 0.00020916042558383197, -0.017155490815639496, 0.008040516637265682, 0.018840931355953217, -0.005757071077823639, 0.0010253718355670571, -0.025314705446362495, -0.01076562236994505, -0.003967243246734142, 0.0075311800464987755, 0.00789810810238123, -0.019168097525835037, 0.020599260926246643, -0.05033988133072853, -0.01370509434491396, 0.0642172321677208, 0.019677579402923584, 0.0140841668471694, -0.014007341116666794, 0.02218116819858551, 0.021107686683535576, 0.001191376824863255, 0.006705045234411955, 0.010203070007264614, -0.0023522668052464724, -0.006710314657539129, 0.0020123524591326714, -0.04595789313316345, -0.04169319570064545, 0.03733000159263611, -0.03371800482273102, -0.06891119480133057, -0.008861224167048931, -0.06303106248378754, -0.012242741882801056, 0.0005503658321686089, -0.008645833469927311, -0.033303868025541306, -0.02365170046687126, 0.043985601514577866, 0.00994472112506628, 0.005477167200297117, -0.01130293495953083, 0.03538769111037254, 0.037958793342113495, 0.05920802429318428, -0.0035015849862247705, -0.014860132709145546, 0.007701998110860586, -0.011219196952879429, 0.01786423847079277, -0.018812591210007668, 0.01617448218166828, 0.03619788587093353, 0.01639525219798088, -0.002999383956193924, 0.012769141234457493, 0.0034527298994362354, 0.020910082384943962, -0.0017253849655389786, 0.009641881100833416, 0.035463057458400726, 0.002776144538074732, 0.010006079450249672, 0.026639282703399658, 0.016191523522138596, 0.028610197827219963, 0.02958228625357151, -0.04221495985984802, 0.01399468444287777, -0.01723003387451172, -0.017274845391511917, 0.010932868346571922, -0.017684679478406906, -0.004593726713210344, 0.008301145397126675, -0.003179538995027542, 0.029244549572467804, 0.003943394869565964, 0.014757797122001648, -0.009302284568548203, -0.010260725393891335, -0.038223035633563995, 0.01864856295287609, 0.0071916827000677586, 0.03815546631813049, -0.03480112925171852, -0.010680532082915306, 0.037443727254867554, -0.011788757517933846, -0.025026395916938782, -0.007361666299402714, -0.02476869523525238, 6.80353208116099e-33, -0.050000280141830444, -0.016104476526379585, -0.009665124118328094, -0.00907706655561924, 0.03474614769220352, -0.004339276812970638, 0.02186422236263752, -0.011923103593289852, -0.03491854667663574, 0.023854566738009453, 0.0049522919580340385, -0.05630464106798172, -0.023971786722540855, 0.014048860408365726, 0.05393693968653679, -0.02792361006140709, -0.004585028626024723, 0.048698607832193375, -0.008528321981430054, 0.0029332907870411873, 0.02233208157122135, 0.018071934580802917, -0.029190408065915108, 0.01312226988375187, 0.011178269051015377, 0.03206083923578262, -0.008650057949125767, -0.003114708000794053, 0.006998272147029638, -0.004931337665766478, -0.012439291924238205, -0.024182377383112907, -0.025438407436013222, -0.0003976997686550021, 0.013594046235084534, 0.0284404493868351, 0.029237261041998863, -0.03389592096209526, -0.01391648780554533, -0.00250927172601223, 0.04545615240931511, 0.01682121865451336, -0.001287413644604385, 0.011728575453162193, -0.005824747495353222, 0.0022632780019193888, -0.02431749366223812, -0.012763144448399544, 0.019584517925977707, -0.001963341375812888, -0.01537620835006237, 0.009742621332406998, 0.003482277039438486, 0.021457258611917496, -0.01976989582180977, 0.0020850570872426033, -0.0201184693723917, 0.031078973785042763, -0.03536739945411682, -0.01060906145721674, -0.06199320778250694, 0.021446745842695236, -0.012583141215145588, 0.0010722647421061993, -0.018603280186653137, -0.009068654850125313, -0.0414331778883934, -0.01548414584249258, -0.03174344077706337, -0.01295468956232071, -0.01588856428861618, -0.04230966418981552, 0.01778988353908062, 0.02376016415655613, -0.0021734696347266436, 0.015281910076737404, -0.0015908421482890844, 0.01038722787052393, -0.00701679103076458, 0.02076573856174946, 0.045352403074502945, -0.029935864731669426, 0.03140239045023918, 0.0208823811262846, 0.015416904352605343, 0.033792536705732346, -0.028834989294409752, -0.03482374921441078, 0.033457931131124496, 0.0062901671044528484, 0.03449266776442528, 0.0044555580243468285, 0.009814725257456303, 0.04020636901259422, 0.027857448905706406, -1.2822852113458794e-8, -0.023511625826358795, 0.006191883701831102, 0.027352506294846535, 0.01165569294244051, 0.03308446705341339, 0.028071191161870956, -0.018218427896499634, -0.0070099481381475925, -0.02957192249596119, -0.016080928966403008, 0.039207056164741516, -0.024183494970202446, -0.0035608764737844467, 0.019162947311997414, 0.01153389923274517, -0.05436921864748001, 0.009334058500826359, -0.04036593809723854, 0.035380031913518906, -0.01669519953429699, -0.004211166873574257, 0.020011430606245995, 0.017882972955703735, -0.008166663348674774, -0.01708223484456539, -0.004979175515472889, 0.012416526675224304, -0.09239868819713593, 0.013996928930282593, -0.015720084309577942, 0.0005218028090894222, -0.023719431832432747, -0.08672460913658142, 0.04477277398109436, 0.01768714003264904, -0.026453090831637383, -0.009084134362637997, 0.02480252832174301, 0.0077604372054338455, 0.021873755380511284, -0.02696516364812851, -0.01020448375493288, -0.000640538171865046, -0.03069065324962139, 0.005375417415052652, -0.003644622629508376, -0.028933431953191757, 0.02408714033663273, 0.02657463774085045, -0.0652925968170166, 0.030138162896037102, -0.021719440817832947, 0.023462187498807907, 0.01631302759051323, 0.02717585302889347, 0.0022381090093404055, -0.017589423805475235, -0.015404051169753075, -0.042654529213905334, 0.03074760176241398, 0.0417475663125515, 0.0007999676745384932, -0.015566571615636349, -0.030106831341981888 ]
python-creating-a-skewed-random-discrete-distribution
https://markhneedham.com/blog/2015/03/30/python-creating-a-skewed-random-discrete-distribution
false
2015-03-08 13:24:19
Neo4j: TF/IDF (and variants) with cypher
[ "neo4j" ]
[ "neo4j" ]
A few weeks ago I wrote a blog post on http://www.markhneedham.com/blog/2015/02/15/pythonscikit-learn-calculating-tfidf-on-how-i-met-your-mother-transcripts/[running TF/IDF over HIMYM transcripts using scikit-learn] to find the most important phrases by episode and afterwards I was curious how difficult it'd be to do in Neo4j. I started by translating one of http://en.wikipedia.org/wiki/Tf%E2%80%93idf#Example_of_tf.E2.80.93idf[wikipedia's TF/IDF examples] to cypher to see what the algorithm would look like: [source,cypher] ---- WITH 3 as termFrequency, 2 AS numberOfDocuments, 1 as numberOfDocumentsWithTerm WITH termFrequency, log10(numberOfDocuments / numberOfDocumentsWithTerm) AS inverseDocumentFrequency return termFrequency * inverseDocumentFrequency 0.9030899869919435 ---- Next I needed to go over the HIMYM episode transcripts and extract phrases and their corresponding counts in each episode. I used scikit-learn's +++<cite>+++http://scikit-learn.org/stable/modules/generated/sklearn.feature_extraction.text.CountVectorizer.html[CountVectorizer]+++</cite>+++ to do this and wrote the results into a CSV file. Here's a preview of that file: [source,bash] ---- $ head -n 10 data/import/words_scikit.csv EpisodeId,Phrase,Count 1,2005,1 1,2005 seven,1 1,2005 seven just,1 1,2030,3 1,2030 kids,1 1,2030 kids intently,1 1,2030 narrator,1 1,2030 narrator kids,1 1,2030 son,1 ---- Now let's import that into Neo4j using the LOAD CSV tool: [source,cypher] ---- // phrases USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-himym/data/import/words_scikit.csv" AS row MERGE (phrase:Phrase {value: row.Phrase}); ---- [source,cypher] ---- // episode -> phrase USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-himym/data/import/words_scikit.csv" AS row MATCH (phrase:Phrase {value: row.Phrase}) MATCH (episode:Episode {id: TOINT(row.EpisodeId)}) MERGE (episode)-[:CONTAINED_PHRASE {times:TOINT(row.Count)}]->(phrase); ---- Now that all the data's in we can translate the TF/IDF query to make use of our graph. We'll start with episode 1: [source,cypher] ---- match (e:Episode) WITH COUNT(e) AS numberOfDocuments match (p:Phrase)<-[r:CONTAINED_PHRASE]-(e:Episode {id: 1}) WITH numberOfDocuments, p, r.times AS termFrequency MATCH (p)<-[:CONTAINED_PHRASE]->(otherEpisode) WITH p, COUNT(otherEpisode) AS numberOfDocumentsWithTerm, numberOfDocuments, termFrequency WITH p, numberOfDocumentsWithTerm, log10(numberOfDocuments / numberOfDocumentsWithTerm) AS inverseDocumentFrequency, termFrequency, numberOfDocuments RETURN p.value, termFrequency, numberOfDocumentsWithTerm, inverseDocumentFrequency, termFrequency * inverseDocumentFrequency AS score ORDER BY score DESC LIMIT 10 ==> +--------------------------------------------------------------------------------------------------------------------+ ==> | p.value | termFrequency | numberOfDocumentsWithTerm | inverseDocumentFrequency | score | ==> +--------------------------------------------------------------------------------------------------------------------+ ==> | "olives" | 18 | 2 | 2.0170333392987803 | 36.306600107378046 | ==> | "yasmine" | 13 | 1 | 2.3180633349627615 | 30.1348233545159 | ==> | "signal" | 11 | 5 | 1.6127838567197355 | 17.740622423917088 | ==> | "goanna" | 10 | 4 | 1.7160033436347992 | 17.16003343634799 | ==> | "flashback date" | 6 | 1 | 2.3180633349627615 | 13.908380009776568 | ==> | "scene" | 17 | 37 | 0.6989700043360189 | 11.88249007371232 | ==> | "flashback date robin" | 5 | 1 | 2.3180633349627615 | 11.590316674813808 | ==> | "ted yasmine" | 5 | 1 | 2.3180633349627615 | 11.590316674813808 | ==> | "smurf pen1s" | 5 | 2 | 2.0170333392987803 | 10.085166696493902 | ==> | "eye patch" | 5 | 2 | 2.0170333392987803 | 10.085166696493902 | ==> +--------------------------------------------------------------------------------------------------------------------+ ==> 10 rows ---- The score we've calculated is different to scikit-learn's but the relative order seems fine so that's good. The neat thing about calculating this in Neo4j is that we can now vary the 'inverse document' part of the equation e.g. to find out the most important phrases in a season rather than an episode: [source,cypher] ---- match (:Season) WITH COUNT(*) AS numberOfDocuments match (p:Phrase)<-[r:CONTAINED_PHRASE]-(:Episode)-[:IN_SEASON]->(s:Season {number: "1"}) WITH p, SUM(r.times) AS termFrequency, numberOfDocuments MATCH (p)<-[:CONTAINED_PHRASE]->(otherEpisode)-[:IN_SEASON]->(s:Season) WITH p, COUNT(DISTINCT s) AS numberOfDocumentsWithTerm, termFrequency, numberOfDocuments WITH p, numberOfDocumentsWithTerm, log10(numberOfDocuments / numberOfDocumentsWithTerm) AS inverseDocumentFrequency, termFrequency, numberOfDocuments RETURN p.value, termFrequency, numberOfDocumentsWithTerm, inverseDocumentFrequency, termFrequency * inverseDocumentFrequency AS score ORDER BY score DESC LIMIT 10 ==> +-------------------------------------------------------------------------------------------------------------+ ==> | p.value | termFrequency | numberOfDocumentsWithTerm | inverseDocumentFrequency | score | ==> +-------------------------------------------------------------------------------------------------------------+ ==> | "moby" | 46 | 1 | 0.9542425094393249 | 43.895155434208945 | ==> | "int" | 71 | 3 | 0.47712125471966244 | 33.87560908509603 | ==> | "ellen" | 53 | 2 | 0.6020599913279624 | 31.909179540382006 | ==> | "claudia" | 104 | 4 | 0.3010299956639812 | 31.307119549054043 | ==> | "ericksen" | 59 | 3 | 0.47712125471966244 | 28.150154028460083 | ==> | "party number" | 29 | 1 | 0.9542425094393249 | 27.67303277374042 | ==> | "subtitle" | 27 | 1 | 0.9542425094393249 | 25.76454775486177 | ==> | "vo" | 47 | 3 | 0.47712125471966244 | 22.424698971824135 | ==> | "ted vo" | 47 | 3 | 0.47712125471966244 | 22.424698971824135 | ==> | "future ted vo" | 45 | 3 | 0.47712125471966244 | 21.47045646238481 | ==> +-------------------------------------------------------------------------------------------------------------+ ==> 10 rows ---- From this query we learn that 'Moby' was only mentioned once in the whole series and actually all of those mentions were in the http://en.wikipedia.org/wiki/The_Limo_%28How_I_Met_Your_Mother%29[same episode]. The occurrence of 'int' seems to be more of a data issue - in some episodes the transcript describes location but in many it doesn't: [source,bash] ---- $ ack -iw "int" data/import/sentences.csv 2361,8,1,8,"INT. LIVING ROOM, YEAR 2030" 2377,8,1,8,INT. CHINESE RESTAURANT 2395,8,1,8,INT. APARTMENT 2412,8,1,8,INT. APARTMENT 2419,8,1,8,INT. BAR 2472,8,1,8,INT. APARTMENT 2489,8,1,8,INT. BAR 2495,8,1,8,INT. APARTMENT 2506,8,1,8,INT. BAR 2584,8,1,8,INT. APARTMENT 2629,8,1,8,INT. RESTAURANT 2654,8,1,8,INT. APARTMENT 2682,8,1,8,INT. RESTAURANT 2689,8,1,8,(Robin gets up and leaves restaurant) INT. HOSPITAL WAITING AREA ---- 'vo' stands for voice over which should probably be stripped out in the stop words as it doesn't add much value. It shows up here because the transcripts aren't consistent in the way they represent Future Ted speaking. Let's have a look at the final season to see how that fares: [source,cypher] ---- match (:Season) WITH COUNT(*) AS numberOfDocuments match (p:Phrase)<-[r:CONTAINED_PHRASE]-(:Episode)-[:IN_SEASON]->(s:Season {number: "9"}) WITH p, SUM(r.times) AS termFrequency, numberOfDocuments MATCH (p)<-[:CONTAINED_PHRASE]->(otherEpisode:Episode)-[:IN_SEASON]->(s:Season) WITH p, COUNT(DISTINCT s) AS numberOfDocumentsWithTerm, termFrequency, numberOfDocuments WITH p, numberOfDocumentsWithTerm, log10(numberOfDocuments / numberOfDocumentsWithTerm) AS inverseDocumentFrequency, termFrequency, numberOfDocuments RETURN p.value, termFrequency, numberOfDocumentsWithTerm, inverseDocumentFrequency, termFrequency * inverseDocumentFrequency AS score ORDER BY score DESC LIMIT 10 ==> +------------------------------------------------------------------------------------------------------------------+ ==> | p.value | termFrequency | numberOfDocumentsWithTerm | inverseDocumentFrequency | score | ==> +------------------------------------------------------------------------------------------------------------------+ ==> | "ring bear" | 28 | 1 | 0.9542425094393249 | 26.718790264301095 | ==> | "click options" | 26 | 1 | 0.9542425094393249 | 24.810305245422448 | ==> | "thank linus" | 26 | 1 | 0.9542425094393249 | 24.810305245422448 | ==> | "vow" | 39 | 2 | 0.6020599913279624 | 23.480339661790534 | ==> | "just click" | 24 | 1 | 0.9542425094393249 | 22.901820226543798 | ==> | "rehearsal dinner" | 23 | 1 | 0.9542425094393249 | 21.947577717104473 | ==> | "linus" | 36 | 2 | 0.6020599913279624 | 21.674159687806647 | ==> | "just click options" | 22 | 1 | 0.9542425094393249 | 20.993335207665147 | ==> | "locket" | 32 | 2 | 0.6020599913279624 | 19.265919722494797 | ==> | "cassie" | 19 | 1 | 0.9542425094393249 | 18.13060767934717 | ==> +------------------------------------------------------------------------------------------------------------------+ ---- There are several phrases which are specific to Barney & Robin's wedding ('vow', 'ring bear', 'rehearsal dinner') so it makes sense that those come out top. The 'linus' here mostly refers to the server at the bar who interacts with Lily although a quick search over the transcripts reveals that she also had an Uncle Linus! [source,bash] ---- $ ack -iw "linus" data/import/sentences.csv | head -n 5 18649,61,3,17,Lily: Why don't we just call Duluth Mental Hospital and say my Uncle Linus can live with us? 59822,185,9,1,Linus. 59826,185,9,1,"Are you my guy, Linus?" 59832,185,9,1,Thank you Linus. 59985,185,9,1,"Thank you, Linus." ... ---- From doing this exercise I think TF/IDF is an interesting way of exploring unstructured data but for a phrase to be really interesting to us it should appear across multiple episodes/seasons. One way to achieve that would be to weight those features more so I'll try that out next. https://github.com/mneedham/neo4j-himym[All the code in this post is on github] if you want to take a look and improve it.
null
null
[ -0.0012681992957368493, -0.041090335696935654, 0.013186052441596985, 0.035562191158533096, 0.07828199118375778, 0.004508950747549534, 0.029210597276687622, 0.034530360251665115, 0.019605420529842377, -0.0006316967192105949, 0.004535104613751173, 0.015748336911201477, -0.03004280850291252, 0.02457565814256668, -0.027907760813832283, 0.05416305363178253, 0.035932786762714386, 0.01826470158994198, 0.01308430265635252, -0.013477960601449013, 0.016331685706973076, 0.05024091154336929, 0.017855919897556305, 0.033308207988739014, 0.03946082293987274, 0.00826730951666832, -0.0035607931204140186, 0.0079624243080616, -0.026269380003213882, 0.007978339679539204, 0.025641534477472305, -0.03276282548904419, 0.009389772079885006, -0.01914675347507, 0.031199520453810692, 0.024035049602389336, -0.03445105999708176, 0.015166034922003746, -0.0018570305546745658, -0.0038770181126892567, -0.055078379809856415, 0.02168157882988453, -0.03368189558386803, -0.004200582392513752, -0.06861705332994461, -0.0003775122168008238, -0.04105246812105179, 0.023151017725467682, 0.029534537345170975, -0.006262605078518391, -0.07247202843427658, 0.01855122670531273, 0.01558263972401619, -0.025966346263885498, 0.006378991529345512, 0.06765265762805939, 0.007014392409473658, -0.08346441388130188, 0.022535238415002823, 0.019092105329036713, -0.006623921915888786, -0.030996529385447502, -0.018478456884622574, 0.041447024792432785, -0.0004364644701126963, -0.05364203080534935, -0.024487245827913284, 0.07142360508441925, -0.05253811180591583, -0.000468267360702157, -0.026299791410565376, 0.018757367506623268, -0.011095787398517132, 0.011546383611857891, 0.00001911302751977928, -0.046131283044815063, 0.014164400286972523, 0.06869698315858841, 0.027525128796696663, 0.043401483446359634, -0.0425175316631794, 0.0036528869532048702, 0.007001293357461691, 0.011261716485023499, -0.014294041320681572, -0.03137456253170967, -0.02129427157342434, -0.03987285494804382, -0.06698276102542877, 0.03982898220419884, 0.018067460507154465, -0.06791570037603378, -0.0016236172523349524, 0.003724440233781934, -0.022283924743533134, 0.023952407762408257, 0.004430166445672512, 0.005497048143297434, -0.01480918936431408, 0.021848615258932114, -0.056255728006362915, -0.023546013981103897, 0.007044550962746143, 0.0034865750931203365, -0.07650062441825867, -0.023754213005304337, -0.008073058910667896, -0.010961182415485382, 0.0037045381031930447, -0.004499828442931175, -0.015408176928758621, -0.0024186845403164625, -0.03016551397740841, -0.011651040986180305, -0.0975850522518158, 0.06342203915119171, 0.03326045721769333, -0.02323339134454727, -0.0446995384991169, 0.004798285663127899, 0.03223627805709839, 0.01934606395661831, -0.008207208476960659, 0.06852086633443832, -0.01377549022436142, 0.03914123401045799, 0.00418243370950222, 0.06028622388839722, -0.016444131731987, -0.06041676923632622, -0.042013172060251236, 0.056405894458293915, -0.013998213224112988, 0.021115925163030624, -0.001562839956022799, -0.04586212337017059, -0.02948685549199581, 0.025592736899852753, 0.060244977474212646, 0.048203762620687485, 0.004707741551101208, -0.036024898290634155, -0.004308547358959913, 0.008627386763691902, 0.026285190135240555, -0.018704209476709366, -0.04534634202718735, -0.01752929575741291, -0.02900773286819458, 0.0035274645779281855, -0.013034820556640625, 0.008505800738930702, 0.06473404169082642, -0.031908776611089706, 0.017098398879170418, 0.09366387873888016, 0.02780342660844326, 0.020504821091890335, 0.006999664008617401, 0.01193063985556364, 0.04806002601981163, 0.03635755553841591, 0.005365794524550438, 0.029598413035273552, -0.009258897043764591, -0.03849918767809868, 0.0013998899376019835, 0.07372943311929703, -0.023271547630429268, 0.028972243890166283, -0.028383255004882812, -0.028221163898706436, 0.06330809742212296, -0.02006160281598568, -0.017254844307899475, 0.0187680646777153, 0.06016024574637413, 0.02640780806541443, 0.039243798702955246, -0.00021379944519139826, -0.08802023530006409, 0.0582977831363678, 0.014868098311126232, 0.017139390110969543, 0.02585112676024437, -0.00009899110591504723, 0.06761600077152252, 0.028721129521727562, 0.017746688798069954, 0.032876964658498764, -0.07936419546604156, -0.0937090516090393, -0.005913607310503721, -0.02249412052333355, 0.04374033957719803, -0.016485456377267838, 0.031194349750876427, 0.0558524951338768, 0.003299464238807559, 0.01048627682030201, 0.022452542558312416, -0.0049229818396270275, 0.0435250960290432, -0.028363222256302834, -0.05023457482457161, 0.06540810316801071, 0.01494876854121685, -0.04835105314850807, -0.022097257897257805, 0.003954913001507521, -0.005330830346792936, 0.015348627232015133, 0.0442316047847271, -0.03392048552632332, 0.022333143278956413, 0.023133384063839912, 0.037499502301216125, -0.013554644770920277, 0.013638906180858612, -0.030896000564098358, 0.017034180462360382, -0.018712282180786133, -0.024790164083242416, -0.014863121323287487, -0.025210192427039146, 0.11330115050077438, 0.062384121119976044, -0.027698302641510963, -0.0644577220082283, 0.030278850346803665, -0.007875709794461727, -0.017223471775650978, 0.0016196202486753464, -0.016487276181578636, -0.01631997525691986, 0.0036032823845744133, -0.053522903472185135, -0.027557864785194397, 0.005391246639192104, -0.04190922528505325, 0.0020372977014631033, 0.04996815323829651, -0.02826952189207077, 0.04521091654896736, 0.011265556327998638, 0.026336858049035072, 0.00855240412056446, -0.029493512585759163, -0.044774867594242096, 0.007622289005666971, 0.013878002762794495, -0.007993265986442566, 0.04245030879974365, -0.013571434654295444, -0.011303136125206947, 0.0045636920258402824, -0.04963168874382973, 0.02001393772661686, 0.06824542582035065, 0.05782558396458626, 0.001202288898639381, 0.06384007632732391, -0.04131610691547394, -0.00977854523807764, -0.007888793013989925, -0.04446486756205559, -0.0398753397166729, -0.07215177267789841, -0.004163362551480532, 0.00063437590142712, 0.027115831151604652, -0.0070049394853413105, 0.025002948939800262, 0.004932780284434557, 0.013653715141117573, -0.012883380986750126, 0.04810759425163269, -0.0015426654135808349, -0.004062948282808065, -0.024907216429710388, -0.0421934500336647, 0.04962902143597603, -0.04779462516307831, -0.022691825404763222, -0.030332932248711586, -0.05575506016612053, 0.026156214997172356, -0.03955817222595215, -0.01235374715179205, 0.00858190469443798, -0.0017693411791697145, 0.049538444727659225, 0.02791876159608364, -0.010690078139305115, 0.03446928784251213, 0.012416685000061989, -0.00009912577661452815, 0.014113851822912693, 0.014529106207191944, 0.04914623871445656, -0.02789519913494587, -0.0006684204563498497, 0.04234779253602028, 0.010383076965808868, -0.024061068892478943, -0.016564950346946716, 0.0012263988610357046, -0.018241874873638153, -0.29391181468963623, 0.04199262335896492, -0.04902319610118866, -0.041057903319597244, 0.030650639906525612, -0.031613368541002274, -0.002223443938419223, -0.032976966351270676, -0.01607123762369156, 0.024642253294587135, -0.021823804825544357, -0.018701596185564995, -0.01584746688604355, 0.058649513870477676, 0.015226919203996658, 0.00748466094955802, -0.03007226437330246, -0.02957882545888424, -0.002066761953756213, 0.05786140263080597, 0.0056379614397883415, -0.03554951772093773, -0.02385452762246132, 0.03325463831424713, 0.023308753967285156, 0.03942590951919556, -0.1054626926779747, 0.03657475486397743, -0.06399574875831604, -0.019869035109877586, -0.0036602846812456846, -0.027955472469329834, 0.019321657717227936, -0.009673470631241798, -0.02030584029853344, -0.012627157382667065, 0.036579906940460205, 0.015229237265884876, -0.009174944832921028, 0.032794564962387085, -0.05177877098321915, -0.05381511151790619, 0.005555818788707256, -0.014739973470568657, 0.07762613892555237, 0.005541352555155754, -0.048078861087560654, -0.019804999232292175, -0.023563286289572716, 0.08468272536993027, -0.035721708089113235, -0.0319792777299881, -0.03572951629757881, 0.02790350280702114, -0.008188102394342422, -0.01651877351105213, 0.01020192913711071, -0.005722224712371826, -0.044109538197517395, -0.031376417726278305, -0.005084351170808077, -0.033573221415281296, 0.017922814935445786, -0.06670741736888885, -0.04291122406721115, -0.055549461394548416, -0.0790388360619545, -0.010312753729522228, 0.05911857262253761, 0.020756669342517853, -0.059396617114543915, 0.025875311344861984, 0.00009982750634662807, -0.10078129917383194, -0.02553575299680233, -0.016728069633245468, -0.015811074525117874, 0.01645612344145775, -0.013469901867210865, 0.0649079903960228, -0.06096811592578888, -0.05913861095905304, 0.008289550431072712, 0.015431578271090984, 0.004182090982794762, -0.020359406247735023, 0.014516555704176426, -0.013668358325958252, -0.022416241466999054, -0.006761640310287476, 0.043106451630592346, -0.034836672246456146, -0.032622117549180984, 0.023260528221726418, 0.010575532913208008, 0.04723076894879341, -0.002124498365446925, 0.014601366594433784, 0.01818203553557396, 0.03889331594109535, 0.015156532637774944, -0.04278656467795372, -0.0015781860565766692, -0.040450118482112885, -0.0152876116335392, -0.004332314245402813, -0.04867679625749588, 0.006929130293428898, 0.02987530827522278, 0.006421075668185949, -0.015053759329020977, 0.005927631631493568, 0.00884253066033125, -0.006819136906415224, -0.009597654454410076, 0.012777983210980892, 0.034118201583623886, 0.03221938759088516, 0.05013719201087952, -0.007359438110142946, -0.06485182791948318, 0.0015129391103982925, -0.022999649867415428, -0.015509720891714096, -0.04924001544713974, -0.031158173456788063, 0.010620742104947567, -0.030464040115475655, 0.0007008775719441473, -0.005189802031964064, -0.03385896235704422, 0.0053945789113640785, 0.024358654394745827, 0.0031202395912259817, 0.05664529651403427, -0.028611967340111732, -0.04320772364735603, -0.020666366443037987, 0.026268204674124718, -0.0044724117033183575, -0.00531711895018816, -0.01948164589703083, -0.014159498736262321, 0.054088421165943146, 0.058144643902778625, -0.002797165419906378, 0.02144651673734188, 0.0043058376759290695, 0.008469618856906891, -0.0038414073642343283, 0.03255241736769676, 0.01086630392819643, 0.01827579364180565, -0.03660070151090622, -0.03185341879725456, 0.0020566124003380537, 0.0486789271235466, -0.014847222715616226, -0.014198880642652512, -0.04750150442123413, 0.05219254642724991, -0.030585994943976402, 0.02145976573228836, -0.0228675976395607, 0.024421824142336845, 0.04111836850643158, -0.015842188149690628, 0.04357178881764412, 0.010011226870119572, 0.0014450338203459978, 0.006146726664155722, 0.016857560724020004, -0.05734371766448021, 0.025508610531687737, 0.008299178443849087, -0.02679729275405407, 0.028871404007077217, 0.027229901403188705, 0.01815469190478325, 0.045952122658491135, -0.020652705803513527, -0.03657089173793793, 0.006609550677239895, 0.017686625942587852, 0.06340502202510834, 0.07149024307727814, -0.01193441916257143, -0.008194743655622005, -0.02723323367536068, -0.005780761130154133, -0.027667513117194176, 0.011573498137295246, -0.017935652285814285, 0.007492047734558582, -0.02946229837834835, -0.06036960706114769, 0.03690207377076149, -0.00315858400426805, -0.007201007567346096, 0.040646374225616455, -0.017137844115495682, -0.0156360175460577, -0.02360120601952076, 0.022974897176027298, 0.060077693313360214, -0.06167231872677803, -0.02249097265303135, -0.024418603628873825, 0.013637829571962357, -0.027141382917761803, 0.03653659671545029, -0.07263166457414627, -0.03955249488353729, -0.02807806432247162, 0.005824839696288109, -0.031046172603964806, -0.03741273283958435, -0.023191217333078384, 0.042310021817684174, -0.004245617426931858, 0.04360272362828255, -0.018970781937241554, 0.010155590251088142, -0.02455480396747589, -0.009254077449440956, 0.03045934997498989, -0.031122559681534767, -0.02730015479028225, -0.0029671299271285534, -0.01893206685781479, 0.027860838919878006, -0.028306996449828148, 0.05075760558247566, 0.022890469059348106, -0.01768280752003193, -0.014697609469294548, -0.028290798887610435, 0.035581838339567184, -0.006736885290592909, 0.06643646210432053, 0.03589233011007309, -0.01577518880367279, -0.026400035247206688, 0.0242648646235466, -0.040179237723350525, 0.01547639537602663, 0.003797211917117238, -0.01680646650493145, 0.008324614726006985, 0.04230509325861931, 0.0024008285254240036, 0.02446313202381134, -0.03101404570043087, -0.0478450283408165, 0.06497322767972946, -0.051293425261974335, -0.03958482667803764, -0.019776374101638794, -0.05317214876413345, 0.016009485349059105, 0.024115493521094322, 0.03692574054002762, -0.048283569514751434, 0.06999718397855759, 0.04283898323774338, 0.04101351648569107, 0.02553095482289791, 0.01340633723884821, 0.027187233790755272, -0.03815238177776337, -0.02530709095299244, -0.09861747920513153, -0.01833476684987545, 0.06020285189151764, 0.010953892022371292, 0.03230438008904457, 0.023139482364058495, -0.023677825927734375, 0.01816055178642273, -0.06945784389972687, -0.020582541823387146, 0.028390442952513695, -0.038776982575654984, 0.01678505912423134, -0.011613250710070133, -0.05145351216197014, -0.005956287961453199, 0.048786040395498276, -0.024315891787409782, -0.021962927654385567, -0.038298849016427994, 0.06250680238008499, -0.018685581162571907, 0.014588887803256512, 0.01387444231659174, -0.04825979471206665, 0.06786616891622543, 0.026580460369586945, 0.03278975933790207, 0.0420263446867466, -0.003529249457642436, 0.026517052203416824, 0.020011961460113525, -0.026380863040685654, 0.011776107363402843, 0.008523938246071339, 0.0028818531427532434, -0.05186730995774269, 0.060154445469379425, 0.019200509414076805, -0.006960996426641941, -0.0369662269949913, 0.08503059297800064, 0.023617222905158997, -0.02120758406817913, -0.05324748530983925, 0.03827475756406784, -0.018079200759530067, -0.004765621852129698, -0.02041812427341938, 0.018565060570836067, -0.022713711485266685, 0.045160531997680664, -0.02839205041527748, -0.0006240797811187804, 0.0629212036728859, -0.03164062276482582, -0.005932446103543043, 0.0039997766725718975, 0.06638242304325104, 0.07832995802164078, 0.05501778423786163, -0.012255692854523659, 0.07533511519432068, -0.03823952004313469, -0.03888966143131256, -0.007515445817261934, 0.006503803189843893, 0.013211461715400219, 0.007295617368072271, 0.015097158960998058, 0.06700312346220016, -0.014750420115888119, 0.08247023820877075, -0.01915130577981472, -0.013947607949376106, -0.022706545889377594, 0.00015384115977212787, 0.04562273994088173, 0.04384114593267441, 0.010428926907479763, 0.013741325587034225, -0.032586995512247086, -0.0542001873254776, 0.031645290553569794, 0.005254219751805067, -0.012649787589907646, -0.0010193967027589679, -0.02625512145459652, 0.02499326504766941, 0.011615454219281673, 0.0256967693567276, 0.08017481863498688, -0.03704513981938362, 0.024186594411730766, -0.0029417145997285843, 0.020819202065467834, -0.010077589191496372, 0.023042408749461174, -0.02033417299389839, -0.006597715895622969, -0.007794682867825031, -0.05390293151140213, -0.04825631529092789, -0.03924281522631645, -0.033141061663627625, -0.0035989824682474136, -0.024276817217469215, 0.0022214760538190603, 0.01763058826327324, -0.0012351268669590354, -0.05241032689809799, -0.046262226998806, -0.026386680081486702, -0.06201135367155075, -0.07182455062866211, -0.0015564385103061795, 0.0012831405038014054, 0.017245696857571602, -0.004496968816965818, -0.005210517905652523, -0.04853125661611557, -0.002455552341416478, 0.0369538888335228, -0.046985939145088196, -0.00025258405366912484, 0.005585256032645702, -0.0005624207551591098, -0.0014815793838351965, 0.007175732403993607, 0.04977196455001831, 0.018591107800602913, -0.017011556774377823, 0.0018539167940616608, 0.03111141175031662, 0.06057792529463768, 0.05592722445726395, 0.014898059889674187, -0.08311225473880768, -0.02265450730919838, 0.017694110050797462, 0.012880529277026653, -0.07377465069293976, -0.006879229564219713, 0.04814889654517174, 0.02167675457894802, 0.03863321617245674, -0.00554675841704011, -0.008133172988891602, -0.03871989995241165, 0.0010706520406529307, 0.008108444511890411, -0.007212947588413954, 0.04563843458890915, -0.039069194346666336, 0.0796886757016182, 0.007629880681633949, -0.006852231919765472, -0.042240407317876816, -0.02395717427134514, -0.013193848542869091, 0.020122861489653587, -0.04141081124544144, -0.024448975920677185, -0.04165789484977722, -0.07735031843185425, -0.02654574066400528, 0.015008773654699326, -0.037035711109638214, -0.016252275556325912, 0.03973178192973137, 0.0041126711294054985, -0.019366033375263214, 0.03571409732103348, -0.04345569387078285, 0.015108036808669567, -0.0006728426087647676, -0.023471467196941376, -0.008222750388085842, 0.0019599359948188066, 0.006018130574375391, 0.01755560375750065, 0.012892949394881725, -0.05835745111107826, 0.0025635717902332544, -0.02883870340883732, 0.027473779395222664, 0.05867987498641014, 0.028494980186223984, 0.011993291787803173 ]
[ -0.04879483953118324, -0.001356940483674407, -0.036221567541360855, -0.030130574479699135, 0.06520729511976242, -0.025311853736639023, -0.01441760454326868, 0.034820929169654846, 0.005080018192529678, -0.01114271953701973, 0.004130316898226738, -0.043603405356407166, -0.006408662535250187, 0.0007412144332192838, 0.08691538870334625, -0.009210003539919853, -0.019863789901137352, -0.03904960677027702, -0.03387501463294029, 0.04006849229335785, 0.00295433821156621, -0.058573756366968155, 0.007737902924418449, -0.035746678709983826, 0.026225466281175613, 0.03259623050689697, 0.03543756157159805, -0.04090737923979759, -0.002637093188241124, -0.21509629487991333, 0.0018860570853576064, 0.01415287610143423, 0.05296450853347778, -0.016635047271847725, 0.023864492774009705, 0.029378823935985565, 0.01587209291756153, 0.0006883367896080017, -0.02863793633878231, 0.05317378789186478, 0.0047425078228116035, 0.01131498720496893, -0.040982577949762344, -0.048215124756097794, 0.024385973811149597, 0.01000414788722992, -0.0352533720433712, -0.015330987051129341, -0.015531329438090324, 0.04952866956591606, -0.04696595296263695, -0.03199481964111328, -0.001760905492119491, 0.003676742548123002, -0.006078213918954134, -0.005747013725340366, 0.039058417081832886, 0.03844068944454193, 0.026970291510224342, 0.01614450477063656, -0.0016103714006021619, 0.017086733132600784, -0.1624949872493744, 0.09446799010038376, 0.0148400217294693, 0.024858588352799416, -0.03989838436245918, -0.023387694731354713, -0.024650614708662033, 0.09121069312095642, -0.0014840050134807825, 0.005869023501873016, -0.031522512435913086, 0.05456334725022316, 0.00028747422038577497, 0.024663424119353294, 0.01751209981739521, 0.008950724266469479, 0.02450827695429325, -0.06658423691987991, -0.029694795608520508, 0.04904720187187195, -0.034925006330013275, -0.015250436961650848, -0.010694971308112144, 0.02010868862271309, -0.0304578710347414, 0.036494385451078415, -0.011906759813427925, 0.037126313894987106, 0.030843889340758324, 0.02250322699546814, 0.050264179706573486, 0.02132204733788967, -0.080459825694561, -0.04641086980700493, 0.01817108690738678, 0.014782405458390713, 0.006967418361455202, 0.3864668011665344, -0.010351162403821945, -0.02822098694741726, 0.034886833280324936, 0.068855881690979, -0.011206417344510555, -0.01480637863278389, 0.009504164569079876, -0.058422502130270004, 0.038065820932388306, -0.03173615410923958, -0.005848762579262257, -0.0398692861199379, 0.06854923814535141, -0.09180345386266708, 0.031797315925359726, 0.021198270842432976, 0.07066413015127182, 0.029298650100827217, 0.003539419500157237, 0.016897715628147125, 0.021469607949256897, -0.0053581236861646175, 0.030167488381266594, -0.04333142936229706, 0.018358122557401657, -0.005343458615243435, 0.042067356407642365, 0.04461897164583206, 0.05524206534028053, 0.01752999611198902, 0.058671735227108, -0.011820339597761631, -0.08846798539161682, 0.025229083374142647, 0.018273549154400826, -0.0068372623063623905, 0.03040502779185772, -0.028198983520269394, -0.0331294946372509, 0.01336752064526081, 0.007362022064626217, -0.05968574061989784, -0.009640156291425228, 0.019931068643927574, -0.04622820019721985, 0.13891224563121796, -0.0034285211004316807, -0.03526686131954193, -0.023477895185351372, -0.03059997782111168, 0.02808663435280323, 0.04480650648474693, 0.02452956698834896, -0.07863522320985794, 0.01309999730437994, 0.025772834196686745, 0.10330872982740402, -0.019175253808498383, -0.08934809267520905, -0.006832655984908342, 0.00024136912543326616, -0.023335063830018044, -0.020599041134119034, 0.057551369071006775, 0.056603480130434036, -0.08283177763223648, -0.025023501366376877, 0.021017570048570633, 0.03742102533578873, -0.09032163769006729, 0.032394543290138245, 0.003206682624295354, -0.07033175975084305, 0.001451150979846716, 0.027657106518745422, -0.04323123022913933, -0.044307902455329895, 0.008480340242385864, 0.07520922273397446, 0.027641599997878075, -0.0001874907611636445, -0.021793507039546967, -0.04316454380750656, 0.039909716695547104, -0.06650292128324509, -0.07492733746767044, -0.034607503563165665, 0.0018330467864871025, -0.00965964887291193, -0.03456200286746025, 0.025747764855623245, -0.005585816223174334, -0.03492533415555954, 0.08084863424301147, -0.036468617618083954, -0.019260913133621216, 0.004201866220682859, 0.018260717391967773, -0.03210529312491417, -0.026004645973443985, -0.03144991770386696, -0.004102545790374279, -0.011938353069126606, 0.027320411056280136, -0.05776987224817276, 0.023709794506430626, 0.037049490958452225, -0.03549608215689659, 0.09452108293771744, 0.028792135417461395, -0.01903645507991314, -0.0001829037064453587, -0.025203505530953407, 0.02452145703136921, -0.02935246005654335, 0.004844094626605511, -0.006252721883356571, -0.03313504159450531, 0.0176943838596344, 0.04338448867201805, -0.012046607211232185, -0.033418525010347366, -0.05091932788491249, -0.360423743724823, -0.047274112701416016, 0.0021984477061778307, -0.018783921375870705, 0.017220528796315193, -0.05876563489437103, 0.023076994344592094, -0.02950107865035534, 0.034182917326688766, 0.05692245811223984, 0.05605714023113251, -0.007569299079477787, -0.018929166719317436, -0.11775880306959152, 0.008390174247324467, 0.03802502900362015, -0.012785488739609718, -0.004754635505378246, -0.010435469448566437, 0.02886522375047207, 0.010539701208472252, -0.04044396057724953, -0.034926507622003555, -0.038682617247104645, -0.02120775356888771, -0.015590369701385498, 0.10510748624801636, 0.025852497667074203, 0.051460158079862595, -0.05678115412592888, 0.040225859731435776, 0.019415950402617455, 0.020879019051790237, -0.06319408863782883, 0.00805380567908287, -0.0454067625105381, 0.018243009224534035, -0.010230276733636856, -0.0006171774002723396, -0.025021567940711975, -0.05193130299448967, 0.009091370739042759, -0.0498696006834507, -0.03714343160390854, -0.07593172043561935, 0.024186326190829277, -0.053230732679367065, -0.041096508502960205, 0.00545166851952672, 0.06764087080955505, 0.014984054490923882, 0.026597730815410614, -0.0008717029122635722, 0.0008612007368355989, -0.00490564526990056, -0.04334021732211113, -0.09067074954509735, -0.005741894245147705, -0.005521644838154316, -0.0003754438366740942, -0.005940837319940329, 0.05301561579108238, 0.029952077195048332, -0.07669678330421448, -0.013797224499285221, 0.012761441990733147, 0.017783908173441887, 0.005533932708203793, 0.007714909501373768, -0.0066018481738865376, -0.025323469191789627, 0.12286647409200668, -0.012866340577602386, 0.015339440666139126, 0.034481294453144073, 0.04122006520628929, 0.00398941058665514, -0.0009159261244349182, 0.016633644700050354, -0.01264055073261261, 0.06158532202243805, -0.026312032714486122, 0.050204746425151825, -0.040519315749406815, 0.01956302858889103, 0.04028545320034027, 0.011151287704706192, -0.04189640283584595, 0.056726306676864624, 0.0289680864661932, 0.0056859455071389675, 0.022321201860904694, -0.008093618787825108, -0.029030175879597664, 0.03952514007687569, 0.006071992218494415, -0.256495863199234, 0.046269822865724564, 0.015915334224700928, 0.0637253001332283, 0.022564131766557693, -0.002323827240616083, 0.01503831148147583, -0.0354168675839901, 0.019728150218725204, -0.015560601837933064, 0.0280851311981678, 0.04330139234662056, 0.02251366712152958, -0.012970183044672012, -0.00579845579341054, -0.017555035650730133, 0.044149722903966904, 0.0406554713845253, 0.0316791795194149, -0.008694474585354328, 0.027760842815041542, -0.029408682137727737, 0.1548004299402237, 0.03480840101838112, -0.009255415759980679, 0.0034997006878256798, -0.03866849094629288, 0.003888573031872511, 0.0667288601398468, -0.00877113826572895, -0.018903352320194244, 0.013968409970402718, -0.010028010234236717, 0.04784366115927696, 0.023378955200314522, -0.05900956690311432, -0.020318608731031418, 0.044673409312963486, 0.027401000261306763, -0.026129944249987602, 0.009091387502849102, 0.00807674415409565, -0.044802162796258926, 0.016090117394924164, 0.07037074118852615, -0.037682194262742996, 0.035238124430179596, -0.02780892327427864, -0.06896970421075821, -0.008752690628170967, -0.03356417641043663, -0.025592222809791565, 0.011820472776889801, -0.009569311514496803, 0.008732538670301437, 0.09675312042236328, 0.03543907031416893, -0.0005576549447141588, 0.02262849546968937, -0.007247105706483126, -0.04610154405236244, -0.05085894837975502, 0.08532070368528366, 0.025631515309214592, 0.021558696404099464 ]
[ 0.07539544254541397, 0.04216057434678078, -0.006277506239712238, -0.013863851316273212, -0.01731286011636257, 0.016143281012773514, -0.0037484844215214252, 0.014901768416166306, 0.02059759385883808, 0.041603945195674896, -0.006629098206758499, -0.019103609025478363, 0.06581196933984756, -0.007567112799733877, -0.016969988122582436, -0.017170874401926994, -0.011816454119980335, -0.010944091714918613, 0.03366393223404884, -0.040386125445365906, -0.030833544209599495, 0.018846355378627777, 0.052139852195978165, -0.005836446303874254, -0.012319708243012428, 0.029995258897542953, -0.05797228217124939, -0.01803298108279705, 0.023876601830124855, -0.09641259908676147, -0.013034754432737827, -0.008203769102692604, 0.0004420600307639688, 0.02323821745812893, -0.0317528173327446, -0.03257343918085098, -0.0031250109896063805, 0.03137633949518204, -0.01834161765873432, 0.050732504576444626, 0.006555419880896807, -0.012402431108057499, -0.016449421644210815, 0.006878310348838568, -0.0001033953158184886, -0.006305327173322439, -0.03015846386551857, -0.027866117656230927, 0.017443716526031494, 0.011414322070777416, -0.043810661882162094, 0.022348839789628983, -0.004419583827257156, 0.028615402057766914, -0.016324978321790695, 0.007455366663634777, 0.009071549400687218, -0.016311103478074074, 0.010345571674406528, -0.00421956367790699, 0.028676284477114677, -0.02336602844297886, -0.044230345636606216, -0.019486894831061363, -0.017548182979226112, -0.011858050711452961, -0.008493016473948956, 0.021640537306666374, 0.0031367256306111813, 0.009379502385854721, -0.03179848939180374, 0.04228594899177551, -0.03209516033530235, -0.011341444216668606, -0.042945463210344315, 0.02660410851240158, 0.04648875072598457, -0.07487670332193375, 0.006561710499227047, -0.00048193344264291227, -0.0424463264644146, 0.03532175347208977, 0.0054213060066103935, -0.046586379408836365, -0.04741604998707771, -0.025443337857723236, -0.0234152190387249, -0.021490491926670074, -0.00685080885887146, 0.05599135905504227, -0.0046963077038526535, 0.017673727124929428, 0.010654853656888008, -0.029359053820371628, -0.081046462059021, 0.0037575107999145985, -0.0019786099437624216, -0.009398537687957287, 0.023684650659561157, 0.8439292907714844, 0.005343958269804716, -0.013358751311898232, -0.012887193821370602, -0.019235489889979362, -0.03776467218995094, 0.01955006644129753, 0.04971802979707718, 0.008239908143877983, 0.0021480494178831577, -0.01596905291080475, -0.01237519271671772, 0.009047613479197025, 0.01639118604362011, 0.02251794934272766, 0.03391698747873306, 0.037700504064559937, 0.02290715090930462, 0.03626176342368126, 0.016497468575835228, 0.000037378351407824084, 0.015504679642617702, 0.010306335985660553, 0.01734268106520176, 0.02451363578438759, 0.007951157167553902, -0.16008692979812622, 0.00010532801388762891, -6.536173237906153e-33, 0.030279727652668953, 0.0019182789837941527, 0.04350726306438446, 0.015079456381499767, 0.0040411739610135555, 0.021641606464982033, 0.012988422997295856, 0.00190109689719975, -0.015028096735477448, -0.03906649351119995, -0.0036419720854610205, 0.01594015583395958, -0.003401118563488126, -0.04105805605649948, -0.003259523306041956, -0.04887450486421585, -0.00549349607899785, 0.02685668133199215, -0.012123680673539639, 0.005483317654579878, 0.011467835865914822, 0.05033719167113304, -0.0006667135749012232, 0.0179851483553648, 0.011418716050684452, 0.007735123857855797, 0.007918011397123337, -0.028870543465018272, 0.004004542250186205, -0.04403931275010109, -0.06872548162937164, 0.027438806369900703, -0.013427936471998692, -0.05586662143468857, 0.022298717871308327, -0.07608772814273834, -0.025136740878224373, 0.00846959464251995, -0.008068549446761608, -0.05858619138598442, -0.05086373910307884, 0.016549358144402504, 0.006523317191749811, -0.032260436564683914, -0.03645683452486992, 0.008511863648891449, 0.019994234666228294, 0.026693502441048622, -0.032011210918426514, 0.010718612931668758, 0.03750807046890259, -0.011979394592344761, -0.007362299133092165, -0.03569792956113815, 0.00009610343840904534, 0.04750881716609001, 0.018660791218280792, -0.013161830604076385, 0.007759063038975, 0.012411552481353283, 0.020250849425792694, -0.012988205067813396, -0.011949033476412296, 0.017716286703944206, 0.044074565172195435, 0.0004721961740870029, 0.040644899010658264, -0.012553834356367588, -0.003941851202398539, 0.012506942264735699, -0.030396483838558197, 0.027552548795938492, -0.008362076245248318, -0.0194060280919075, 0.018654467537999153, -0.03313896059989929, -0.02524258755147457, -0.0029891172889620066, -0.016271347180008888, 0.03773970156908035, -0.025967048481106758, -0.017655353993177414, 0.0037078179884701967, -0.039057400077581406, 0.006741535384207964, -0.009339953772723675, 0.03651062026619911, 0.03279251605272293, -0.007144040893763304, -0.004063125234097242, 0.03954577073454857, 0.012168534100055695, 0.0014045287389308214, -0.02044340968132019, -0.01740111969411373, 6.395613500906578e-33, -0.023239748552441597, 0.01945662684738636, -0.016417723149061203, -0.007506002206355333, 0.016205856576561928, 0.028761841356754303, 0.011155324056744576, -0.003627025755122304, -0.05707002431154251, 0.022304385900497437, -0.008981888182461262, -0.035910576581954956, 0.0050673517398536205, -0.012846252880990505, 0.03853993862867355, -0.015158391557633877, 0.005895107053220272, 0.00503300316631794, -0.03010999597609043, 0.026094159111380577, 0.005720191169530153, 0.003019058145582676, -0.024278128519654274, 0.03006034530699253, 0.045857470482587814, 0.006159225944429636, 0.006000570021569729, 0.0218947883695364, -0.003488748800009489, 0.011943995021283627, -0.008701867423951626, -0.0478580966591835, -0.03433118015527725, 0.018014997243881226, 0.014646746218204498, 0.023310484364628792, 0.01042430754750967, -0.022100508213043213, -0.0176509041339159, -0.0022464666981250048, 0.012466474436223507, 0.023734647780656815, -0.01043633557856083, 0.0393875353038311, -0.02218654751777649, 0.026481371372938156, -0.013353453949093819, 0.026997007429599762, 0.011360589414834976, 0.022201070562005043, -0.008034632541239262, 0.01730731874704361, -0.01381381694227457, 0.015155672095716, 0.002964362734928727, -0.014500046148896217, 0.009507275186479092, 0.0069994693621993065, -0.02498224563896656, -0.012656445614993572, -0.04589375853538513, -0.013963619247078896, -0.013894882053136826, 0.0022180730011314154, -0.013169965706765652, -0.02986515499651432, -0.040042828768491745, 0.022460170090198517, -0.005177173763513565, -0.019517801702022552, 0.017806794494390488, -0.02082638442516327, -0.005075927823781967, 0.014518184587359428, 0.02066066674888134, 0.006227252073585987, -0.02178136818110943, -0.021488798782229424, -0.055039141327142715, 0.028779814019799232, 0.022791730239987373, 0.012653403915464878, 0.021209973841905594, 0.009213249199092388, 0.007007075473666191, -0.00024084842880256474, 0.015385235659778118, 0.014958936721086502, 0.0035940625239163637, 0.02258322201669216, 0.03739918768405914, -0.01173533033579588, 0.006759445182979107, 0.05400463193655014, 0.008385448716580868, -1.253642523124654e-8, -0.03289966657757759, -0.00022363022435456514, 0.0062464503571391106, 0.011318352073431015, 0.00534421019256115, 0.0261077918112278, -0.020560652017593384, -0.010278207249939442, -0.03507775440812111, -0.013198400847613811, 0.028471648693084717, -0.03701026737689972, 0.029562121257185936, 0.022804701700806618, 0.019217342138290405, -0.0234507005661726, 0.002162564778700471, -0.022901754826307297, 0.0287540964782238, 0.017366934567689896, 0.011851559393107891, 0.024834750220179558, -0.0023133226204663515, 0.00790263619273901, -0.008239036425948143, 0.009260551072657108, 0.025423221290111542, -0.056984126567840576, -0.004177554044872522, -0.03354017809033394, 0.012973704375326633, -0.03208895027637482, -0.07456396520137787, 0.004624218214303255, -0.003994327038526535, -0.03522003814578056, 0.00010412814299343154, 0.02699434384703636, 0.008912335149943829, 0.03796599805355072, -0.003870338900014758, 0.0008638938306830823, -0.0170193649828434, -0.02757176384329796, -0.03624250367283821, 0.0019184446427971125, -0.0580446757376194, -0.02423017844557762, 0.05121390521526337, -0.03682351112365723, -0.001058062887750566, 0.002005774760618806, -0.0035300033632665873, 0.041387565433979034, 0.03574039041996002, -0.013269712217152119, 0.0038974075578153133, 0.011138753034174442, -0.014065801165997982, -0.019681647419929504, 0.02639683149755001, 0.031907517462968826, -0.0325869657099247, -0.010575046762824059 ]
neo4j-tfidf-and-variants-with-cypher
https://markhneedham.com/blog/2015/03/08/neo4j-tfidf-and-variants-with-cypher
false
2015-03-01 02:36:06
Python: Detecting the speaker in HIMYM using Parts of Speech (POS) tagging
[ "python" ]
[ "Python" ]
Over the last couple of weeks I've been experimenting with http://www.markhneedham.com/blog/2015/02/20/pythonscikit-learn-detecting-which-sentences-in-a-transcript-contain-a-speaker/[different] http://www.markhneedham.com/blog/2015/02/24/pythonnltk-naive-vs-naive-bayes-vs-decision-tree/[classifiers] to detect speakers in HIMYM transcripts and in all my attempts so far the only features I've used have been words. This led to classifiers that were overfitted to the training data so I wanted to generalise them by introducing parts of speech of the words in sentences which are more generic. First I changed the function which generates the features for each word to also contain the parts of speech of the previous and next words as well as the word itself: [source,python] ---- def pos_features(sentence, sentence_pos, i): features = {} features["word"] = sentence[i] features["word-pos"] = sentence_pos[i][1] if i == 0: features["prev-word"] = "<START>" features["prev-word-pos"] = "<START>" else: features["prev-word"] = sentence[i-1] features["prev-word-pos"] = sentence_pos[i-1][1] if i == len(sentence) - 1: features["next-word"] = "<END>" features["next-word-pos"] = "<END>" else: features["next-word"] = sentence[i+1] features["next-word-pos"] = sentence_pos[i+1][1] return features ---- Next we need to tweak our calling code to calculate the parts of speech tags for each sentence and pass it in: [source,python] ---- featuresets = [] for tagged_sent in tagged_sents: untagged_sent = nltk.tag.untag(tagged_sent) sentence_pos = nltk.pos_tag(untagged_sent) for i, (word, tag) in enumerate(tagged_sent): featuresets.append((pos_features(untagged_sent, sentence_pos, i), tag) ) ---- I'm using nltk to do this and although it's https://honnibal.wordpress.com/2013/09/11/a-good-part-of-speechpos-tagger-in-about-200-lines-of-python/[slower than some alternatives], the data set is small enough that it's not an issue. Now it's time to train a Decision Tree with the new features. I created three variants - one with both words and POS; one with only words; one with only POS. I took a deep copy of the training/test data sets and then removed the appropriate keys: [source,python] ---- def get_rid_of(entry, *keys): for key in keys: del entry[key] import copy # Word based classifier tmp_train_data = copy.deepcopy(train_data) for entry, tag in tmp_train_data: get_rid_of(entry, 'prev-word-pos', 'word-pos', 'next-word-pos') tmp_test_data = copy.deepcopy(test_data) for entry, tag in tmp_test_data: get_rid_of(entry, 'prev-word-pos', 'word-pos', 'next-word-pos') c = nltk.DecisionTreeClassifier.train(tmp_train_data) c.classify(tmp_test_data) # POS based classifier tmp_train_data = copy.deepcopy(train_data) for entry, tag in tmp_train_data: get_rid_of(entry, 'prev-word', 'word', 'next-word') tmp_test_data = copy.deepcopy(test_data) for entry, tag in tmp_test_data: get_rid_of(entry, 'prev-word', 'word', 'next-word') c = nltk.DecisionTreeClassifier.train(tmp_train_data) c.classify(tmp_test_data) ---- The https://github.com/mneedham/neo4j-himym/blob/bae87fb6cea228bcd4ee8b4b406bf18c605c6834/scripts/detect_speaker.py[full code is on my github] but these were the results I saw: [source,bash] ---- $ time python scripts/detect_speaker.py Classifier speaker precision speaker recall non-speaker precision non-speaker recall -------------------- ------------------- ---------------- ----------------------- -------------------- Decision Tree All In 0.911765 0.939394 0.997602 0.996407 Decision Tree Words 0.911765 0.939394 0.997602 0.996407 Decision Tree POS 0.90099 0.919192 0.996804 0.996008 ---- There's still not much in it - the POS one has slightly more false positives and false positives when classifying speakers but on other runs it performed better. If we take a look at the decision tree that's been built for the POS one we can see that it's all about POS now as you'd expect: [source,python] ---- >>> print(c.pseudocode(depth=2)) if next-word-pos == '$': return False if next-word-pos == "''": return False if next-word-pos == ',': return False if next-word-pos == '-NONE-': return False if next-word-pos == '.': return False if next-word-pos == ':': if prev-word-pos == ',': return False if prev-word-pos == '.': return False if prev-word-pos == ':': return False if prev-word-pos == '<START>': return True if prev-word-pos == 'CC': return False if prev-word-pos == 'CD': return False if prev-word-pos == 'DT': return False if prev-word-pos == 'IN': return False if prev-word-pos == 'JJ': return False if prev-word-pos == 'JJS': return False if prev-word-pos == 'MD': return False if prev-word-pos == 'NN': return False if prev-word-pos == 'NNP': return False if prev-word-pos == 'NNS': return False if prev-word-pos == 'POS': return False if prev-word-pos == 'PRP': return False if prev-word-pos == 'PRP$': return False if prev-word-pos == 'RB': return False if prev-word-pos == 'RP': return False if prev-word-pos == 'TO': return False if prev-word-pos == 'VB': return False if prev-word-pos == 'VBD': return False if prev-word-pos == 'VBG': return False if prev-word-pos == 'VBN': return True if prev-word-pos == 'VBP': return False if prev-word-pos == 'VBZ': return False if next-word-pos == '<END>': return False if next-word-pos == 'CC': return False if next-word-pos == 'CD': if word-pos == '$': return False if word-pos == ',': return False if word-pos == ':': return True if word-pos == 'CD': return True if word-pos == 'DT': return False if word-pos == 'IN': return False if word-pos == 'JJ': return False if word-pos == 'JJR': return False if word-pos == 'JJS': return False if word-pos == 'NN': return False if word-pos == 'NNP': return False if word-pos == 'PRP$': return False if word-pos == 'RB': return False if word-pos == 'VB': return False if word-pos == 'VBD': return False if word-pos == 'VBG': return False if word-pos == 'VBN': return False if word-pos == 'VBP': return False if word-pos == 'VBZ': return False if word-pos == 'WDT': return False if word-pos == '``': return False if next-word-pos == 'DT': return False if next-word-pos == 'EX': return False if next-word-pos == 'IN': return False if next-word-pos == 'JJ': return False if next-word-pos == 'JJR': return False if next-word-pos == 'JJS': return False if next-word-pos == 'MD': return False if next-word-pos == 'NN': return False if next-word-pos == 'NNP': return False if next-word-pos == 'NNPS': return False if next-word-pos == 'NNS': return False if next-word-pos == 'PDT': return False if next-word-pos == 'POS': return False if next-word-pos == 'PRP': return False if next-word-pos == 'PRP$': return False if next-word-pos == 'RB': return False if next-word-pos == 'RBR': return False if next-word-pos == 'RBS': return False if next-word-pos == 'RP': return False if next-word-pos == 'TO': return False if next-word-pos == 'UH': return False if next-word-pos == 'VB': return False if next-word-pos == 'VBD': return False if next-word-pos == 'VBG': return False if next-word-pos == 'VBN': return False if next-word-pos == 'VBP': return False if next-word-pos == 'VBZ': return False if next-word-pos == 'WDT': return False if next-word-pos == 'WP': return False if next-word-pos == 'WRB': return False if next-word-pos == '``': return False ---- I like that it's identified the '+++<speaker>+++:+++<sentence>+++' pattern:</p> ~~~python if next-word-pos == ':': \... if prev-word-pos == '+++<START>+++': return True ~~~ Next I need to drill into the types of sentence structures that it's failing on and work out some features that can handle those. I still need to see how well a random forest of decision trees would as well.+++</START>++++++</sentence>++++++</speaker>+++
null
null
[ -0.010077117942273617, -0.01923220604658127, -0.0008718010503798723, 0.027114547789096832, 0.08277510106563568, 0.054028742015361786, 0.023423152044415474, 0.025274505838751793, 0.006947071757167578, 0.0017413126770406961, -0.01385747641324997, 0.028083469718694687, -0.05808282271027565, -0.013487687334418297, 0.0088656609877944, 0.044016025960445404, 0.0519188791513443, -0.000546830240637064, 0.016379183158278465, 0.019208725541830063, 0.03997587412595749, 0.07037966698408127, 0.02790834940969944, 0.010973816737532616, 0.033285707235336304, 0.012703181244432926, 0.000904914690181613, 0.009217385202646255, -0.05739017575979233, -0.0028018364682793617, 0.016048764809966087, -0.006173752248287201, -0.01592577062547207, -0.004481777548789978, 0.04165215045213699, 0.025905141606926918, -0.027966590598225594, 0.00809404905885458, 0.004407170228660107, 0.021732952445745468, -0.0704578384757042, 0.0224252138286829, -0.02863227389752865, 0.005154426675289869, -0.08693765103816986, -0.007946022786200047, -0.06309774518013, 0.02442292682826519, 0.002312071854248643, -0.02892610989511013, -0.07246315479278564, 0.05783725902438164, 0.013592259027063847, -0.032630808651447296, 0.014842401258647442, 0.04910397157073021, 0.011208594776690006, -0.0786057561635971, 0.005804866552352905, -0.01011628471314907, -0.024394532665610313, -0.030195506289601326, 0.004033492412418127, 0.023178288713097572, 0.02827267162501812, -0.04376473277807236, -0.019993357360363007, 0.04028737545013428, -0.044457435607910156, 0.004607647657394409, -0.03229960799217224, 0.022941462695598602, -0.01954590529203415, 0.01626187190413475, -0.0008911396143957973, -0.023205021396279335, 0.009108290076255798, 0.05951536074280739, 0.025218170136213303, 0.023736413568258286, -0.012400981038808823, 0.010163730010390282, 0.010191855952143669, 0.02569693513214588, -0.023053763434290886, -0.019547807052731514, -0.0394800640642643, -0.02834731712937355, -0.0756278708577156, 0.038723863661289215, 0.023154839873313904, -0.057680267840623856, 0.009553248062729836, 0.03963492438197136, -0.017372451722621918, 0.01720668561756611, 0.0023045821581035852, -0.010210971347987652, -0.029050692915916443, -0.01471662800759077, -0.04824531823396683, -0.03484349697828293, 0.035353269428014755, 0.011274009011685848, -0.08436606824398041, -0.006424454040825367, -0.008116676472127438, 0.002395662711933255, 0.004411882255226374, 0.012640547007322311, -0.024222880601882935, 0.001402615918777883, 0.013220087625086308, 0.0012179517652839422, -0.07816846668720245, 0.04613170400261879, -0.004648879636079073, -0.0199518334120512, -0.015668662264943123, -0.016893630847334862, 0.026223862543702126, 0.024432901293039322, -0.012085518799722195, 0.07584180682897568, -0.015729889273643494, 0.026621166616678238, -0.0038896615151315928, 0.05823793634772301, -0.02676798589527607, -0.05936788022518158, -0.023126211017370224, 0.03878280147910118, -0.02390090562403202, 0.03477165848016739, -0.02130839042365551, 0.0023954061325639486, -0.035175926983356476, 0.008278127759695053, 0.08418629318475723, 0.04542364552617073, 0.0038498439826071262, -0.012365357019007206, 0.02433350682258606, 0.03345651924610138, 0.018870264291763306, -0.005190413445234299, -0.029255231842398643, -0.005025859922170639, -0.028574496507644653, 0.03446969389915466, -0.002960581099614501, -0.012684062123298645, 0.052888352423906326, -0.04241367429494858, 0.01731475442647934, 0.07301130890846252, 0.04319332540035248, 0.028134411200881004, -0.0019788153003901243, 0.028381986543536186, 0.02922438271343708, 0.05461953207850456, -0.005886227358132601, 0.04168493673205376, 0.014542782679200172, -0.04374589025974274, -0.006058144848793745, 0.03623108193278313, -0.010076611302793026, 0.001384248142130673, -0.01719350926578045, -0.05830015614628792, 0.06530129909515381, -0.053343821316957474, -0.021369731053709984, 0.003915487322956324, 0.048082828521728516, 0.04455418512225151, 0.017523163929581642, 0.013898876495659351, -0.0749189481139183, 0.02431570552289486, 0.019465923309326172, 0.023778069764375687, 0.03649740293622017, -0.011465110816061497, 0.06378993391990662, 0.02355833165347576, -0.0032985140569508076, -0.0005365919205360115, -0.06854752451181412, -0.06341435015201569, -0.015395522117614746, -0.02237684838473797, 0.06690874695777893, -0.04271532595157623, 0.02473495341837406, 0.05705131217837334, 0.01404641754925251, 0.05974002927541733, 0.041654322296381, -0.0245811827480793, -0.0025836580898612738, -0.019272256642580032, -0.05213616043329239, 0.0323416069149971, 0.02582784742116928, -0.0514717660844326, -0.02221439592540264, 0.016828151419758797, -0.016264794394373894, -0.01288693118840456, 0.0509301982820034, -0.026929428800940514, 0.015450327657163143, 0.018175775185227394, 0.06550333648920059, -0.028954854235053062, 0.03480180725455284, -0.05456313490867615, 0.0038001553621143103, 0.0016532469308003783, -0.005190029740333557, -0.04030364006757736, -0.019515719264745712, 0.11395791172981262, 0.06390639394521713, -0.02085295505821705, -0.05881837010383606, -0.00340063008479774, 0.006393591873347759, -0.02759741060435772, -0.0025797798298299313, 0.002300605410709977, -0.02043762430548668, 0.008722103200852871, -0.04562399536371231, -0.03663993999361992, -0.0018122022738680243, -0.02615254931151867, -0.004130177199840546, 0.06769903004169464, -0.06558459252119064, 0.03462627902626991, 0.010127109475433826, 0.014653033576905727, 0.020742489024996758, -0.01770712062716484, -0.046606749296188354, -0.00994399469345808, 0.016145100817084312, -0.00853637419641018, 0.060416921973228455, -0.026517726480960846, -0.016791895031929016, -0.007084289565682411, -0.049809813499450684, 0.00353874359279871, 0.05980945751070976, 0.029163287952542305, -0.006142096593976021, 0.07713457196950912, -0.026108385995030403, -0.006232722196727991, -0.03538830205798149, -0.054744403809309006, -0.017486726865172386, -0.052612680941820145, -0.0026736175641417503, 0.044910870492458344, 0.0415223054587841, -0.01295709889382124, 0.003997365478426218, -0.006614292971789837, 0.001657597254961729, -0.0017638143617659807, 0.0485435388982296, -0.00297842756845057, -0.0033133577089756727, -0.02956690639257431, -0.020032254979014397, 0.05009772628545761, -0.05413017421960831, -0.03219892829656601, -0.014429227448999882, -0.08186475187540054, 0.0038305341731756926, -0.05951470881700516, -0.01410846970975399, 0.040555696934461594, -0.028255116194486618, 0.039713140577077866, 0.010372149758040905, -0.007438989356160164, 0.07211185246706009, 0.024928003549575806, 0.013410908170044422, 0.020860077813267708, 0.0025543293450027704, 0.03606562688946724, -0.011704056523740292, 0.014892061240971088, 0.0294328685849905, 0.0012125027133151889, 0.011882455088198185, -0.04672606661915779, 0.022984230890870094, -0.03262537717819214, -0.2808479368686676, 0.01966051012277603, 0.016620388254523277, -0.05586322396993637, 0.023815957829356194, -0.023391474038362503, 0.021338684484362602, -0.040648750960826874, -0.019702794030308723, 0.023967698216438293, -0.03248724713921547, -0.030722815543413162, -0.011382478289306164, 0.030262276530265808, 0.022880733013153076, -0.013357939198613167, -0.020983653143048286, -0.018791666254401207, 0.024618325755000114, 0.08117801696062088, 0.011456530541181564, -0.05156435817480087, -0.022766614332795143, 0.045670390129089355, -0.026323212310671806, 0.07358334958553314, -0.07348117232322693, 0.015971528366208076, -0.055660925805568695, -0.025305740535259247, 0.00014603319868911058, -0.030993308871984482, 0.026220520958304405, -0.016269750893115997, -0.012872286140918732, -0.0400085374712944, 0.03255198523402214, 0.02531442977488041, -0.03125421702861786, 0.028013158589601517, -0.022837553173303604, -0.03403936326503754, 0.02026655338704586, -0.005850636400282383, 0.07108040899038315, 0.010575343854725361, -0.05501948297023773, -0.022734923288226128, -0.0337945818901062, 0.048785265535116196, -0.012388580478727818, -0.034026000648736954, -0.018015919253230095, 0.01564323529601097, 0.010282579809427261, -0.020780514925718307, 0.05121632292866707, -0.046750131994485855, -0.046976324170827866, -0.024903977289795876, -0.028513068333268166, -0.043239183723926544, 0.0009090852690860629, -0.05240686610341072, -0.006228464189916849, -0.03252643346786499, -0.057415276765823364, 0.0007339259027503431, 0.05662645027041435, 0.029111549258232117, -0.04346972331404686, 0.01600107178092003, -0.011322187259793282, -0.09812397509813309, -0.010047659277915955, 0.013983296230435371, -0.0028597135096788406, 0.015684891492128372, 0.021729908883571625, 0.04750727117061615, -0.0481666661798954, -0.04911794140934944, 0.01350155845284462, -0.018423570320010185, 0.018656011670827866, -0.021265782415866852, 0.012621916830539703, 0.021772922948002815, -0.008031369186937809, -0.009063437581062317, 0.044075578451156616, -0.023403257131576538, -0.017098497599363327, -0.0034316889941692352, 0.006066434551030397, 0.06874053180217743, -0.023484868928790092, 0.002407792955636978, 0.014110258780419827, 0.031656913459300995, 0.014104630798101425, -0.029759742319583893, -0.013752371072769165, -0.021810997277498245, -0.0010741089936345816, 0.005717615131288767, -0.06244247779250145, -0.020144319161772728, 0.025397514924407005, -0.003958995454013348, -0.011787010356783867, -0.005892010405659676, -0.0038642750587314367, 0.00160760257858783, 0.006984915118664503, -0.01481523085385561, 0.006897549144923687, 0.013009238988161087, 0.04329332709312439, -0.01971186138689518, -0.05931205302476883, -0.0011738553876057267, -0.021340275183320045, -0.005682744085788727, -0.033617112785577774, -0.07331214845180511, 0.007497902028262615, -0.01851492002606392, -0.04369334131479263, -0.020778009667992592, -0.01814943179488182, -0.0004189537139609456, 0.025741199031472206, -0.02278333157300949, 0.07658401131629944, -0.023941125720739365, -0.014965390786528587, -0.02296438068151474, 0.03610236197710037, 0.0069305747747421265, -0.021177414804697037, -0.028134822845458984, 0.007342114113271236, 0.039196599274873734, 0.058380577713251114, 0.011658351868391037, 0.021349608898162842, 0.014164840802550316, 0.006999516859650612, -0.012152358889579773, 0.04234436899423599, -0.017461273819208145, -0.005692053120583296, -0.019052527844905853, -0.009636498987674713, 0.011225719936192036, 0.04037613794207573, 0.019403817132115364, -0.0012575648725032806, -0.05566650629043579, 0.03395460173487663, -0.021202242001891136, 0.01658245362341404, -0.02569860965013504, 0.05174921825528145, 0.030887456610798836, -0.027311302721500397, 0.03588903695344925, -0.005591476336121559, 0.0055096750147640705, 0.016956176608800888, -0.020815469324588776, -0.04250168055295944, 0.02110734023153782, 0.0029684226028621197, -0.041854310780763626, 0.03399784117937088, 0.0365472286939621, -0.02216019481420517, 0.006779798306524754, -0.004842161666601896, -0.004207164514809847, 0.01593201421201229, 0.03286558389663696, 0.0653529018163681, 0.06594286859035492, -0.027045896276831627, -0.001029464416205883, -0.024262038990855217, -0.01604284904897213, -0.0603727288544178, 0.008284660056233406, 0.00820500310510397, -0.006441547069698572, -0.02893441915512085, -0.07049953192472458, -0.012816892936825752, -0.021917272359132767, -0.03003488853573799, -0.014315678738057613, -0.0435689240694046, -0.011359562166035175, -0.01305779442191124, 0.01864233799278736, 0.08134452253580093, -0.05965401604771614, 0.0005615687114186585, -0.01326762791723013, -0.006219279486685991, 0.002461999887600541, 0.008507521823048592, -0.06094285100698471, -0.020619511604309082, -0.011297374963760376, -0.020904505625367165, -0.042421214282512665, -0.0505785197019577, -0.03406991809606552, -0.0007939453353174031, -0.011971806176006794, 0.058387186378240585, -0.027132688090205193, 0.009266858920454979, -0.009042336605489254, -0.025994231924414635, 0.038613758981227875, -0.005293997935950756, 0.014142852276563644, 0.04422573372721672, -0.03857792541384697, 0.01086428202688694, -0.02385135553777218, 0.04167565330862999, 0.052596718072891235, -0.02158762514591217, -0.023218194022774696, -0.06626767665147781, 0.009503512643277645, 0.0003548357344698161, 0.07664793729782104, 0.02332412451505661, -0.003288217820227146, -0.04652547836303711, 0.030520670115947723, -0.05225605145096779, 0.035169754177331924, 0.010413949377834797, -0.02635990083217621, -0.013670830056071281, 0.06549691408872604, -0.004958809819072485, 0.06434831768274307, -0.026184214279055595, -0.012202413752675056, 0.020987994968891144, -0.02104388177394867, -0.05719128996133804, -0.03953490033745766, -0.052411772310733795, 0.012182286009192467, 0.00893334113061428, 0.027792830020189285, -0.04013760760426521, 0.04311877861618996, 0.029611283913254738, 0.052301786839962006, -0.006587393581867218, 0.01159666944295168, 0.02595292590558529, -0.028254590928554535, -0.008386936970055103, -0.07759657502174377, -0.027107995003461838, 0.06003304198384285, 0.0028413422405719757, -0.004682550206780434, -0.021476829424500465, -0.014055788516998291, 0.03221182897686958, -0.03665383532643318, -0.028756797313690186, 0.04680384323000908, -0.007487460970878601, -0.034769151359796524, 0.021352967247366905, -0.03896424174308777, 0.028019746765494347, 0.020970603451132774, -0.024674665182828903, -0.032687198370695114, -0.0029086447320878506, 0.08642879873514175, -0.018707584589719772, 0.02897484041750431, 0.001352172577753663, -0.018722333014011383, 0.05854646489024162, 0.03691907227039337, 0.0268647912889719, 0.028550026938319206, -0.014778743498027325, 0.018858829513192177, 0.04174818471074104, -0.01809077337384224, -0.028112206608057022, 0.02409973554313183, 0.018295058980584145, -0.09987705945968628, 0.04547502472996712, 0.006292211823165417, 0.008220627903938293, -0.020366691052913666, 0.0755651593208313, 0.007724459748715162, -0.036009494215250015, -0.05394415929913521, 0.03225932642817497, -0.05601203441619873, -0.0024237497709691525, -0.03430161997675896, -0.008144301362335682, -0.05179635062813759, 0.06142077594995499, 0.005518790800124407, 0.0024525849148631096, 0.07804803550243378, -0.02442566677927971, -0.009881479665637016, 0.023697393015027046, 0.06722374260425568, 0.06636756658554077, 0.08344417810440063, 0.01825847662985325, 0.060524169355630875, -0.05884521082043648, -0.03812290355563164, -0.008794611319899559, -0.01986159384250641, 0.0012600542977452278, -0.02819269895553589, 0.031962890177965164, 0.054999738931655884, -0.004303340334445238, 0.06372755020856857, -0.04097278416156769, 0.02058660425245762, -0.006920153275132179, 0.03961579129099846, 0.018009062856435776, 0.07580126821994781, 0.020428020507097244, 0.037390656769275665, -0.03427819162607193, -0.053690481930971146, 0.03248948976397514, -0.008577349595725536, -0.018591290339827538, 0.025648348033428192, -0.024558434262871742, 0.03174879029393196, 0.0028885938227176666, 0.06675557047128677, 0.08280273526906967, -0.008326593786478043, -0.012762093916535378, 0.0013696829555556178, 0.02011769264936447, 0.006836144719272852, 0.06232812628149986, 0.0055046239867806435, 0.01238887570798397, 0.0011115651577711105, -0.03558024391531944, -0.023627830669283867, -0.03741743043065071, -0.020018229261040688, 0.03341671824455261, -0.020555652678012848, -0.003968684934079647, 0.007117972243577242, 0.013061678037047386, -0.03392545133829117, -0.06119992583990097, -0.021771542727947235, -0.052373405545949936, -0.062426093965768814, -0.0524388886988163, 0.02817530743777752, 0.021005351096391678, -0.002336065052077174, -0.024995697662234306, -0.03074873611330986, 0.008148305118083954, 0.016207849606871605, -0.05625477060675621, 0.014860829338431358, 0.017194097861647606, 0.014542837627232075, 0.00912175141274929, 0.029485050588846207, 0.03968824818730354, 0.036005523055791855, -0.020451251417398453, 0.0201566182076931, 0.04373633861541748, 0.06709691137075424, 0.029680317267775536, 0.024414200335741043, -0.06701584160327911, -0.011467618867754936, 0.02605208195745945, -0.0012780193937942386, -0.072230763733387, -0.00018890008504968137, 0.03444363549351692, 0.04184354469180107, 0.020070457831025124, 0.01977057009935379, -0.01422753743827343, -0.030869796872138977, -0.020587898790836334, -0.030049100518226624, 0.012362862937152386, 0.023078421130776405, -0.012581868097186089, 0.08007212728261948, 0.030557360500097275, -0.009908286854624748, -0.04975743219256401, -0.012948458082973957, -0.00023241722374223173, 0.003986578434705734, -0.045108769088983536, -0.06269627064466476, -0.02171567641198635, -0.0723867118358612, -0.025269731879234314, 0.027073772624135017, -0.03430412709712982, -0.04004108905792236, 0.018605440855026245, -0.01476442813873291, 0.013948020525276661, 0.03641766682267189, -0.052856918424367905, 0.0008165074395947158, -0.01980753429234028, -0.022069815546274185, -0.014088767580688, 0.01010032370686531, -0.02983861230313778, -0.0017321816412732005, -0.007460456807166338, -0.014843921177089214, -0.03799273818731308, -0.011395211331546307, 0.041967496275901794, 0.03556504100561142, -0.03452993184328079, -0.02923993393778801 ]
[ -0.06776607036590576, -0.00385384657420218, -0.014057465828955173, -0.030219072476029396, 0.06037188693881035, -0.03800677880644798, 0.015666840597987175, 0.013337651267647743, 0.010377665050327778, -0.035182856023311615, -0.006929590832442045, -0.04787348210811615, 0.002571217017248273, -0.009110283106565475, 0.1012025997042656, 0.010380822233855724, 0.03568263351917267, -0.05519929900765419, -0.023538192734122276, 0.02185915969312191, 0.01254690159112215, 0.009282486513257027, -0.03382730856537819, -0.028967227786779404, -0.011406066827476025, 0.03554844483733177, 0.03738945722579956, -0.04845283553004265, -0.00645447289571166, -0.21554800868034363, 0.04177181422710419, -0.0073613328859210014, 0.05907842516899109, -0.024613704532384872, 0.011775964871048927, 0.05619202181696892, 0.007109887432307005, 0.02852599509060383, -0.020003389567136765, 0.04941851273179054, 0.0012869531055912375, -0.007995556108653545, -0.050299596041440964, -0.04686281830072403, 0.056313443928956985, -0.018101634457707405, -0.02314278483390808, -0.05163434147834778, -0.05342470109462738, 0.009146136231720448, -0.0601758249104023, -0.04250127822160721, 0.0005663885385729373, -0.02030571550130844, -0.034826718270778656, 0.0006131640984676778, 0.04580053687095642, 0.08163612335920334, 0.03148787096142769, 0.008634265512228012, -0.021406393498182297, 0.004357688594609499, -0.16219832003116608, 0.08737387508153915, 0.003794957883656025, 0.06556273996829987, -0.045205067843198776, -0.024306274950504303, -0.009502315893769264, 0.09731896966695786, 0.014835325069725513, -0.01560100819915533, -0.0008788504637777805, 0.04844694957137108, -0.024435248225927353, -0.0045786029659211636, 0.03352488949894905, -0.004210319835692644, 0.05858931690454483, -0.02348603494465351, -0.016293788328766823, 0.021664533764123917, 0.0003931235405616462, -0.030083753168582916, 0.0022606023121625185, -0.021893182769417763, -0.022477244958281517, 0.03257497027516365, -0.008429484441876411, 0.005409929435700178, 0.019735533744096756, -0.01921156421303749, 0.015453409403562546, 0.021965105086565018, -0.05751961097121239, -0.04097064957022667, 0.015945419669151306, -0.0025574674364179373, -0.01747220754623413, 0.41058260202407837, -0.02335156314074993, -0.018934201449155807, 0.03412283957004547, 0.02210247702896595, 0.018911555409431458, -0.025581756606698036, -0.015492770820856094, -0.04936939477920532, -0.009591973386704922, -0.03844035044312477, 0.00666055316105485, -0.02178553119301796, 0.04525204375386238, -0.03290528059005737, 0.0031306922901421785, 0.01245020143687725, 0.033343009650707245, 0.03199154883623123, 0.017128916457295418, 0.01782970130443573, -0.012109631672501564, -0.02208525314927101, -0.0009802979184314609, -0.024439727887511253, 0.0296580009162426, 0.0048719607293605804, 0.0547412633895874, 0.07355786859989166, 0.031064867973327637, 0.020762324333190918, 0.05758116394281387, -0.0417584627866745, -0.06763482838869095, 0.02896217070519924, 0.015161145478487015, 0.01857222430408001, 0.04127850383520126, 0.008252393454313278, -0.0007816192228347063, 0.018977096304297447, -0.0194548387080431, -0.05944134667515755, 0.012080181390047073, 0.024288630113005638, -0.04888133332133293, 0.14213338494300842, -0.05779225006699562, -0.02637779340147972, -0.04104427620768547, -0.02976362593472004, 0.007079988718032837, 0.04573589563369751, 0.032894033938646317, -0.091476209461689, 0.008840351365506649, 0.0283951573073864, 0.0972624197602272, -0.0460004061460495, -0.049474552273750305, -0.005284683313220739, 0.007367931772023439, -0.03270671144127846, -0.02398015931248665, 0.010995188727974892, 0.05216348171234131, -0.0879717469215393, -0.03182250261306763, 0.004964337218552828, 0.020609980449080467, -0.07716476917266846, 0.03986385464668274, 0.01136720646172762, -0.030977828428149223, 0.005625153426080942, -0.00409977650269866, -0.03125569969415665, -0.03722964972257614, 0.02141525223851204, 0.0611281655728817, 0.005956342909485102, -0.00798973347991705, 0.0033280181232839823, -0.04591453820466995, -0.0034524095244705677, -0.04715871438384056, -0.07573013752698898, -0.038545873016119, -0.034671537578105927, -0.0011293686693534255, -0.001201238832436502, 0.011436491273343563, -0.032398369163274765, -0.05859595909714699, 0.018099820241332054, -0.03982515633106232, -0.002175980480387807, 0.03566670045256615, 0.00016241407138295472, -0.05317673459649086, -0.0125889228656888, -0.04437998682260513, 0.04578611999750137, 0.0017337643075734377, 0.01860559731721878, -0.04202017933130264, 0.02599123865365982, 0.040042437613010406, -0.03577788919210434, 0.10157857090234756, 0.013023905456066132, 0.0002053105999948457, -0.03165285289287567, 0.0007819319143891335, 0.023029768839478493, -0.02009902521967888, -0.03646686300635338, -0.017853405326604843, 0.014377351850271225, 0.006941972766071558, 0.03468799963593483, -0.05706458166241646, -0.013214888982474804, -0.03969014063477516, -0.3475706875324249, -0.05091113969683647, 0.03916343301534653, 0.000644367653876543, 0.0009551635594107211, -0.08581316471099854, 0.010813341476023197, -0.001974858809262514, 0.011391537263989449, 0.04287850111722946, 0.043996505439281464, 0.000390072469599545, 0.04250559210777283, -0.08089954406023026, 0.01800568588078022, 0.0488877072930336, -0.030999748036265373, -0.017643801867961884, -0.01790027692914009, 0.04676621034741402, 0.010271666571497917, -0.01032425370067358, -0.0037524853833019733, -0.06784747540950775, -0.020146306604146957, -0.038110580295324326, 0.10799258947372437, 0.03327273204922676, 0.0865367129445076, -0.016170185059309006, 0.031138179823756218, -0.01296602375805378, 0.0043880450539290905, -0.09308239817619324, 0.04685637354850769, -0.004690072033554316, -0.005495492834597826, -0.0004905428504571319, -0.006388381123542786, -0.04083468019962311, -0.03318031132221222, 0.036396585404872894, -0.031390685588121414, -0.01708598993718624, -0.07477425038814545, 0.025926539674401283, -0.025170160457491875, -0.03217779099941254, -0.03292270377278328, 0.06220870092511177, 0.024035463109612465, 0.034753087908029556, 0.024235790595412254, 0.0034942650236189365, -0.02376878634095192, -0.022723309695720673, -0.09285591542720795, -0.006870196666568518, -0.032114773988723755, 0.0003427357878535986, 0.03249126300215721, 0.051241327077150345, 0.043780695647001266, -0.07013550400733948, -0.02622462622821331, -0.0005675426800735295, -0.00884238351136446, -0.02620844542980194, 0.03461221605539322, 0.00897363293915987, -0.036594241857528687, 0.12388741225004196, 0.004316268023103476, -0.007049383129924536, 0.023678679019212723, 0.03645319491624832, 0.011343501508235931, 0.0006891830125823617, 0.013051633723080158, -0.03380851820111275, 0.07019448280334473, 0.01239109132438898, 0.034579984843730927, -0.019765270873904228, 0.023904038593173027, 0.01702505350112915, 0.029288098216056824, -0.001196705037727952, 0.07960918545722961, 0.04375213012099266, -0.007585081737488508, 0.02153252623975277, 0.01839442551136017, -0.04418351501226425, 0.07265889644622803, 0.010354793630540371, -0.24790458381175995, 0.03684280067682266, 0.05611507222056389, 0.06409567594528198, 0.02556087262928486, 0.0033892407082021236, 0.008470673114061356, -0.0782400369644165, -0.01777890883386135, -0.001742191961966455, -0.0014859470538794994, 0.009900239296257496, 0.012127416208386421, -0.019400151446461678, -0.023041173815727234, 0.0012831637868657708, 0.10500501096248627, -0.011325664818286896, 0.009201609529554844, 0.016041478142142296, 0.023713162168860435, 0.0046450188383460045, 0.15515027940273285, -0.008304455317556858, 0.02556152269244194, -0.03447243198752403, -0.01185433566570282, -0.03527485579252243, 0.0540248341858387, -0.0032160759437829256, 0.011530628427863121, -0.017119137570261955, 0.05088450759649277, -0.007683771662414074, -0.004630282521247864, -0.02192836068570614, -0.02057790383696556, 0.010985448025166988, 0.03523734211921692, -0.02269750088453293, 0.013212702237069607, 0.0007555740303359926, -0.052992355078458786, -0.013287934474647045, 0.057243797928094864, 0.011807731352746487, 0.05225837603211403, -0.030162332579493523, -0.051862746477127075, 0.03018840216100216, -0.011987605132162571, -0.031126948073506355, -0.032171670347452164, 0.0030833326745778322, 0.04279631748795509, 0.0855150893330574, 0.026929108425974846, -0.020380442962050438, 0.011491057462990284, 0.008168570697307587, -0.003313520923256874, -0.04320194199681282, 0.11485733091831207, 0.032953277230262756, 0.013204721733927727 ]
[ 0.011108318343758583, 0.01250162161886692, -0.0015444610035046935, 0.012919030152261257, 0.014404130168259144, -0.03335395082831383, 0.007607392035424709, -0.002522431779652834, -0.02758324146270752, -0.03250311315059662, -0.03157348558306694, 0.014454149641096592, 0.010730758309364319, -0.018489088863134384, 0.010724370367825031, 0.00781566184014082, -0.008485154248774052, 0.003808901645243168, 0.022538796067237854, -0.030270695686340332, -0.03107667900621891, 0.07210071384906769, 0.025570685043931007, -0.004158235155045986, -0.033756572753190994, 0.01788324862718582, -0.042601946741342545, 0.015265025198459625, 0.031314875930547714, -0.1137031763792038, -0.01657857373356819, -0.032225992530584335, -0.0029804683290421963, 0.009500068612396717, -0.03136112540960312, -0.016866030171513557, -0.012822560966014862, 0.00473951268941164, 0.013136746361851692, 0.02753763645887375, -0.018892711028456688, -0.012112542986869812, -0.014887778088450432, 0.02936837077140808, -0.003334592329338193, 0.008208953775465488, -0.0632612556219101, 0.00407346012070775, -0.014585795812308788, -0.03665044531226158, -0.03686220571398735, -0.013999978080391884, 0.013350177556276321, 0.05216541513800621, -0.016056083142757416, -0.0031834484543651342, 0.0020514572970569134, -0.0031577409245073795, 0.01020939089357853, -0.04502926021814346, -0.0028596387710422277, -0.00832420028746128, -0.034961994737386703, -0.023166203871369362, -0.010661534033715725, -0.0177665576338768, -0.0207056887447834, 0.01838774047791958, 0.029750613495707512, 0.013092048466205597, -0.008234936743974686, 0.03321418911218643, -0.005348394624888897, -0.0124224117025733, -0.0026582751888781786, -0.02317388541996479, 0.018069392070174217, -0.017284417524933815, 0.0430377833545208, 0.01856757327914238, -0.038048382848501205, 0.002409504959359765, 0.023184562101960182, 0.0025453628040850163, 0.012950890697538853, -0.04616936668753624, 0.004852729849517345, 0.00782433245331049, -0.015815449878573418, 0.006501653231680393, -0.04780752956867218, -0.035795871168375015, -0.005589274689555168, 0.009249920956790447, -0.09954570233821869, 0.02391168102622032, -0.027435125783085823, -0.030452966690063477, 0.006019598338752985, 0.8405290842056274, 0.004112666007131338, -0.00409152265638113, 0.023004664108157158, -0.022586185485124588, 0.037317004054784775, -0.009440502151846886, -0.03710995241999626, -0.023477669805288315, 0.061848439276218414, -0.0483124740421772, -0.010907076299190521, 0.015318714082241058, 0.026983262971043587, 0.02418098784983158, 0.021572330966591835, 0.03579431027173996, 0.006299786735326052, 0.03458624333143234, 0.005079383496195078, 0.01438645925372839, 0.008928613737225533, 0.019332285970449448, 0.001974216429516673, 0.0015807471936568618, -0.0033706501126289368, -0.19022423028945923, 0.02072768658399582, -7.650945958668777e-33, 0.01853768527507782, -0.025405194610357285, -0.0015433416701853275, -0.015713483095169067, 0.0030856423545628786, 0.020409775897860527, 0.01075585838407278, -0.023491159081459045, -0.01397913321852684, -0.045114997774362564, 0.01227201521396637, -0.005593609064817429, 0.0009679129580035806, 0.00316099775955081, 0.033092744648456573, -0.02192060463130474, -0.012679867446422577, 0.030405545607209206, 0.013774656690657139, 0.019562948495149612, 0.03998619690537453, 0.024256808683276176, 0.022141315042972565, 0.009588904678821564, 0.01529926247894764, 0.015262327156960964, -0.0022112468723207712, -0.01087433472275734, 0.0031505527440458536, -0.03669319674372673, -0.03604888916015625, 0.02263343706727028, 0.027811165899038315, -0.010642612352967262, -0.00049601896898821, -0.0637107789516449, -0.04090965539216995, 0.010180155746638775, 0.00334935262799263, -0.06272169947624207, -0.03725957125425339, 0.012599737383425236, -0.0013849514070898294, -0.03996508941054344, -0.0141413239762187, -0.011268291622400284, -0.00426787743344903, 0.025009430944919586, 0.0044745150953531265, 0.014152460731565952, 0.036308642476797104, -0.03901323676109314, -0.008084787987172604, 0.010469013825058937, -0.01788671873509884, 0.016776619479060173, 0.022579263895750046, 0.03284163773059845, 0.02201809547841549, -0.017538709565997124, 0.013581519015133381, -0.027795908972620964, 0.033468835055828094, 0.022668790072202682, 0.022149747237563133, -0.022246208041906357, 0.021564263850450516, 0.03320297971367836, 0.025689754635095596, 0.012479741126298904, -0.037577636539936066, -0.013302805833518505, -0.04237287491559982, -0.005893611814826727, 0.013755746185779572, -0.025094635784626007, 0.0025048344396054745, -0.011360518634319305, 0.011003164574503899, 0.06836466491222382, 0.013018390163779259, -0.005765770561993122, -0.006897415965795517, -0.026069942861795425, -0.007425197400152683, -0.041814714670181274, 0.021657586097717285, 0.0020347037352621555, 0.017909521237015724, 0.0424051396548748, -0.0030369998421519995, 0.06769096106290817, -0.01264889631420374, -0.0030042845755815506, 0.013796523213386536, 7.346505411433282e-33, 0.008791097439825535, 0.011433001607656479, -0.04594532027840614, -0.010298504494130611, -0.011047986336052418, -0.03194773569703102, 0.047099411487579346, 0.050742313265800476, -0.03605066239833832, 0.01425575464963913, -0.01690092869102955, -0.010257725603878498, -0.014444270171225071, 0.009968111291527748, 0.048161860555410385, 0.019055934622883797, -0.012191841378808022, 0.06061869487166405, 0.03762718290090561, 0.029170364141464233, 0.0038432020228356123, 0.016372092068195343, -0.010522639378905296, 0.034702837467193604, 0.010112362913787365, 0.008244212716817856, -0.020845144987106323, 0.003017365001142025, -0.0031875912100076675, -0.010343048721551895, 0.007335066329687834, 0.002878478728234768, -0.012090480886399746, 0.006357417441904545, -0.005626762751489878, 0.02156452089548111, 0.0063711171969771385, -0.03515870124101639, 0.04680866375565529, 0.00961760338395834, 0.051977742463350296, 0.03609597682952881, -0.015726035460829735, 0.012055945582687855, 0.007984790951013565, -0.0004015162121504545, -0.017946921288967133, -0.0013769628712907434, -0.006046725437045097, -0.00852883793413639, -0.031257741153240204, 0.0256339143961668, 0.020852962508797646, 0.023409605026245117, -0.006082278676331043, -0.023860789835453033, -0.007674202788621187, 0.006773189175873995, -0.053042273968458176, -0.0078334491699934, -0.030034741386771202, -0.019266122952103615, 0.006686799228191376, -0.03092704527080059, -0.01478475984185934, -0.008418556302785873, -0.06309367716312408, 0.021684641018509865, -0.011156685650348663, -0.005524291191250086, -0.027666013687849045, -0.00010177175863645971, -0.004049959126859903, 0.012585002928972244, -0.00580639811232686, 0.00817248784005642, -0.030775003135204315, -0.007107800804078579, -0.02450650744140148, 0.009817876853048801, 0.01536352839320898, 0.0141911581158638, 0.011776147410273552, 0.014155678451061249, 0.015684962272644043, 0.03499399125576019, -0.019667139276862144, 0.0015573380514979362, 0.023418962955474854, -0.025905441492795944, 0.03201849386096001, 0.01911710761487484, -0.018278753384947777, 0.0026068598963320255, -0.006175977177917957, -1.3111894681117064e-8, -0.0618300624191761, 0.005256418604403734, -0.00821781624108553, 0.031356751918792725, 0.03636311739683151, -0.008383390493690968, -0.020436568185687065, 0.0035746204666793346, -0.02921460010111332, -0.011038926430046558, 0.0714603066444397, -0.002773708663880825, 0.011161228641867638, -0.0034765226300805807, 0.010936705395579338, -0.017875609919428825, -0.0076969703659415245, -0.02588340826332569, 0.036552999168634415, -0.011589769273996353, 0.0480102114379406, 0.03820520266890526, 0.011012447997927666, 0.019134951755404472, -0.0033102703746408224, -0.017766492441296577, 0.025813404470682144, -0.08860472589731216, -0.01287803053855896, -0.027356047183275223, 0.04211420193314552, -0.021974854171276093, -0.06327056884765625, 0.004953834693878889, 0.01477915421128273, -0.004036447964608669, -0.012553787790238857, -0.03695928305387497, 0.003806973109021783, 0.02769244648516178, -0.0013675407972186804, -0.006402511615306139, -0.015354331582784653, -0.028903236612677574, -0.009779044426977634, -0.0020095824729651213, -0.018028879538178444, -0.01107476931065321, 0.03410017490386963, -0.02838558331131935, 0.010514594614505768, 0.00012307606812100857, -0.0002491839986760169, 0.0016683698631823063, 0.05153275653719902, 0.008823318406939507, 0.005314307752996683, -0.017261771485209465, -0.03111313469707966, -0.0113056106492877, 0.028376884758472443, 0.03704804927110672, -0.018220791593194008, -0.004775563254952431 ]
python-detecting-the-speaker-in-himym-using-parts-of-speech-pos-tagging
https://markhneedham.com/blog/2015/03/01/python-detecting-the-speaker-in-himym-using-parts-of-speech-pos-tagging
false
2015-03-24 22:33:42
Topic Modelling: Working out the optimal number of topics
[ "python" ]
[ "Machine Learning", "Python" ]
In my continued exploration of topic modelling I came across The Programming Historian blog and a post showing http://programminghistorian.org/lessons/topic-modeling-and-mallet[how to derive topics from a corpus] using the Java library http://mallet.cs.umass.edu/[mallet]. The instructions on the blog make it very easy to get up and running but as with other libraries I've used, you have to specify how many topics the corpus consists of. I'm never sure what value to select but the authors make the following suggestion: ____ How do you know the number of topics to search for? Is there a natural number of topics? What we have found is that one has to run the train-topics with varying numbers of topics to see how the composition file breaks down. If we end up with the majority of our original texts all in a very limited number of topics, then we take that as a signal that we need to increase the number of topics; the settings were too coarse. There are computational ways of searching for this, including using MALLETs hlda command, but for the reader of this tutorial, it is probably just quicker to cycle through a number of iterations (but for more see Griffiths, T. L., & Steyvers, M. (2004). http://psiexp.ss.uci.edu/research/papers/sciencetopics.pdf[Finding scientific topics]. Proceedings of the National Academy of Science, 101, 5228-5235). ____ Since I haven't yet had the time to dive into the paper or explore how to use the appropriate option in mallet I thought I'd do some variations on the stop words and number of topics and see how that panned out. As I understand it, the idea is to try and get a uniform spread of topics \-> documents i.e. we don't want all the documents to have the same topic otherwise any topic similarity calculations we run won't be that interesting. </p> I tried running mallet with 10,15,20 and 30 topics and also varied the stop words used. I had one version which just stripped out the main characters and the word 'narrator' & another where I stripped out the top 20% of words by occurrence and any words that appeared less than 10 times. The reason for doing this was that it should identify interesting phrases across episodes better than TF/IDF can while not just selecting the most popular words across the whole corpus. I used mallet from the command line and ran it in two parts. . Generate the model . Work out the allocation of topics and documents based on hyper parameters I wrote a script to help me out: [source,bash] ---- #!/bin/sh train_model() { ./mallet-2.0.7/bin/mallet import-dir \ --input mallet-2.0.7/sample-data/himym \ --output ${2} \ --keep-sequence \ --remove-stopwords \ --extra-stopwords ${1} } extract_topics() { ./mallet-2.0.7/bin/mallet train-topics \ --input ${2} --num-topics ${1} \ --optimize-interval 20 \ --output-state himym-topic-state.gz \ --output-topic-keys output/himym_${1}_${3}_keys.txt \ --output-doc-topics output/himym_${1}_${3}_composition.txt } train_model "stop_words.txt" "output/himym.mallet" train_model "main-words-stop.txt" "output/himym.main.words.stop.mallet" extract_topics 10 "output/himym.mallet" "all.stop.words" extract_topics 15 "output/himym.mallet" "all.stop.words" extract_topics 20 "output/himym.mallet" "all.stop.words" extract_topics 30 "output/himym.mallet" "all.stop.words" extract_topics 10 "output/himym.main.words.stop.mallet" "main.stop.words" extract_topics 15 "output/himym.main.words.stop.mallet" "main.stop.words" extract_topics 20 "output/himym.main.words.stop.mallet" "main.stop.words" extract_topics 30 "output/himym.main.words.stop.mallet" "main.stop.words" ---- As you can see, this script first generates a bunch of models from text files in 'mallet-2.0.7/sample-data/himym' - there is one file per episode of HIMYM. We then use that model to generate differently sized topic models. The output is two files; one containing a list of topics and another describing what percentage of the words in each document come from each topic. [source,bash] ---- $ cat output/himym_10_all.stop.words_keys.txt 0 0.08929 back brad natalie loretta monkey show call classroom mitch put brunch betty give shelly tyler interview cigarette mc laren 1 0.05256 zoey jerry arthur back randy arcadian gael simon blauman blitz call boats becky appartment amy gary made steve boat 2 0.06338 back claudia trudy doug int abby call carl stuart voix rachel stacy jenkins cindy vo katie waitress holly front 3 0.06792 tony wendy royce back jersey jed waitress bluntly lucy made subtitle film curt mosley put laura baggage officer bell 4 0.21609 back give patrice put find show made bilson nick call sam shannon appartment fire robots top basketball wrestlers jinx 5 0.07385 blah bob back thanksgiving ericksen maggie judy pj valentine amanda made call mickey marcus give put dishes juice int 6 0.04638 druthers karen back jen punchy jeanette lewis show jim give pr dah made cougar call jessica sparkles find glitter 7 0.05751 nora mike pete scooter back magazine tiffany cootes garrison kevin halloween henrietta pumpkin slutty made call bottles gruber give 8 0.07321 ranjit back sandy mary burger call find mall moby heather give goat truck made put duck found stangel penelope 9 0.31692 back give call made find put move found quinn part ten original side ellen chicago italy locket mine show ---- [source,bash] ---- $ head -n 10 output/himym_10_all.stop.words_composition.txt #doc name topic proportion ... 0 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/1.txt 0 0.70961794636687 9 0.1294699168584466 8 0.07950442338871108 2 0.07192178481473664 4 0.008360809510263838 5 2.7862560133367015E-4 3 2.562409242784946E-4 7 2.1697378721335337E-4 1 1.982849604752168E-4 6 1.749937876710496E-4 1 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/10.txt 2 0.9811551470820473 9 0.016716882136209997 4 6.794128563082893E-4 0 2.807350575301132E-4 5 2.3219634098530471E-4 8 2.3018997315244256E-4 3 2.1354177341696056E-4 7 1.8081798384467614E-4 1 1.6524340216541808E-4 6 1.4583339433951297E-4 2 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/100.txt 2 0.724061485807234 4 0.13624729774423758 0 0.13546964196228636 9 0.0019436342339785994 5 4.5291919356563914E-4 8 4.490055982996677E-4 3 4.1653183421485213E-4 7 3.5270123154213927E-4 1 3.2232165301666123E-4 6 2.8446074162457316E-4 3 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/101.txt 2 0.7815231689893246 0 0.14798271520316794 9 0.023582384458063092 8 0.022251052243582908 1 0.022138209217973336 4 0.0011804626661380394 5 4.0343527385745457E-4 3 3.7102343418895774E-4 7 3.1416667687862693E-4 6 2.533818368250992E- 4 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/102.txt 6 0.6448245189567259 4 0.18612146979166502 3 0.16624873439661025 9 0.0012233726722317548 0 3.4467218590717303E-4 5 2.850788252495599E-4 8 2.8261550915084904E-4 2 2.446611421432842E-4 7 2.2199909869250053E-4 1 2.028774216237081E- 5 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/103.txt 8 0.7531586740033047 5 0.17839539108961253 0 0.06512376460651902 9 0.001282794040111701 4 8.746645156304241E-4 3 2.749100345664577E-4 2 2.5654476523149865E-4 7 2.327819863700214E-4 1 2.1273153572848481E-4 6 1.8774342292520802E-4 6 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/104.txt 7 0.9489502365148181 8 0.030091466847852504 4 0.017936457663121977 9 0.0013482824985091328 0 3.7986419553884905E-4 5 3.141861834124008E-4 3 2.889445824352445E-4 2 2.6964174000656E-4 1 2.2359178288566958E-4 6 1.9732799141958482E-4 7 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/105.txt 8 0.7339694064061175 7 0.1237041841318045 9 0.11889696041555338 0 0.02005288536233353 4 0.0014026751618923005 5 4.793786828705149E-4 3 4.408655780020889E-4 2 4.1141370625324785E-4 1 3.411516484151411E-4 6 3.0107890675777946E-4 8 file:/Users/markneedham/projects/mallet/mallet-2.0.7/sample-data/himym/106.txt 5 0.37064909999661005 9 0.3613559917055785 0 0.14857567731040344 6 0.09545466082502917 4 0.022300625744661403 8 3.8725629469313333E-4 3 3.592484711785775E-4 2 3.3524900189121E-4 7 3.041961449432886E-4 1 2.779945050112539E-4 ---- The output is a bit tricky to understand on its own so I did a bit of post processing using pandas and then ran the results of that through matplotlib to see the distribution of documents for different topics sizes with different stop words. You can https://github.com/mneedham/topic-modelling-mallet/blob/master/results.py[see the script here]. I ended up with the following chart: image::{{<siteurl>}}/uploads/2015/03/2015-03-24_22-08-481.png[2015 03 24 22 08 48,598] On the left hand side we're using more stop words and on the right just the main ones. For most of the variations there are one or two topics which most documents belong to but interestingly the most uniform distribution seems to be when we have few topics. These are the main words for the most popular topics on the left hand side: _15 topics_ [source,text] ---- 8 0.50732 back give call made put find found part move show side ten mine top abby front fire full fianc ---- _20 topics_ [source,text] ---- 12 0.61545 back give call made put find show found part move side mine top front ten full cry fire fianc ---- _30 topics_ [source,text] ---- 22 0.713 back call give made put find show part found side move front ten full top mine fire cry bottom~~~ <p>All contain more or less the same words which at first glance seem like quite generic words so I'm surprised they weren't excluded.</p> <p>On the right hand side we haven't removed many words so we'd expect common words in the English language to dominate. Let's see if they do:</p> <em>10 topics</em> ~~~text 1 3.79451 don yeah ll hey ve back time guys good gonna love god night wait uh thing guy great make ---- _15 topics_ [source,text] ---- 5 2.81543 good time love ll great man guy ve night make girl day back wait god life yeah years thing 10 1.52295 don yeah hey gonna uh guys didn back ve ll um kids give wow doesn thing totally god fine ---- _20 topics_ [source,text] ---- 1 3.06732 good time love wait great man make day back ve god life years thought big give apartment people work 13 1.68795 don yeah hey gonna ll uh guys night didn back ve girl um kids wow guy kind thing baby ---- _30 topics_ [source,text] ---- 14 1.42509 don yeah hey gonna uh guys didn back ve um thing ll kids wow time doesn totally kind wasn 24 2.19053 guy love man girl wait god ll back great yeah day call night people guys years home room phone 29 1.84685 good make ve ll stop time made nice put feel love friends big long talk baby thought things happy ---- Again we have similar words across each run and as expected they are all quite generic words. My take away from this exploration is that I should vary the stop word percentages as well and see if that leads to an improved distribution. Taking out very common words like we do with the left hand side charts seems to make sense although I need to work out why there's a single outlier in each group. The authors suggest that having the majority of our texts in a small number of topics means we need to create more of them so I will investigate that too. The code is https://github.com/mneedham/topic-modelling-mallet[all on github] along with the transcripts so give it a try and let me know what you think.
null
null
[ -0.02074260078370571, -0.014285324141383171, -0.044006627053022385, 0.044626738876104355, 0.05619814991950989, 0.02684011496603489, 0.00949527695775032, 0.04733777418732643, -0.007170816883444786, -0.006865654140710831, -0.011023716069757938, 0.018789131194353104, -0.04049967601895332, 0.00522992480546236, -0.01844753883779049, 0.06569388508796692, 0.0358755849301815, -0.03042401745915413, 0.028871914371848106, -0.0114876264706254, 0.03003099001944065, 0.06462401896715164, 0.04136255383491516, 0.040029142051935196, 0.04006791114807129, -0.02111540548503399, 0.010257088579237461, 0.030007315799593925, -0.04076999053359032, -0.0073095993138849735, 0.014330817386507988, 0.017351051792502403, -0.006801644805818796, 0.0012756369542330503, 0.019226504489779472, -0.011666009202599525, -0.02526177279651165, 0.026644175872206688, 0.030757462605834007, 0.014795886352658272, -0.05544256791472435, 0.028149614110589027, -0.02568511664867401, 0.0004431020934134722, -0.04525642842054367, 0.02176966518163681, -0.05162067711353302, -0.005877071525901556, 0.010800402611494064, -0.003597225993871689, -0.08370902389287949, 0.033704426139593124, -0.004495267290621996, -0.0004286975017748773, -0.009588693268597126, 0.028454866260290146, 0.004466031212359667, -0.06605274230241776, 0.007534300442785025, -0.021415576338768005, -0.01028915774077177, -0.02462141588330269, -0.026081454008817673, 0.052656564861536026, 0.011420797556638718, -0.039461035281419754, -0.01631493680179119, 0.0461767241358757, -0.049009472131729126, -0.025233803316950798, -0.023759163916110992, 0.02734421007335186, -0.011930981650948524, 0.020499033853411674, 0.018565205857157707, -0.02831883914768696, 0.01929352805018425, 0.04809977486729622, 0.009400316514074802, 0.03324000537395477, -0.0446406751871109, 0.01935083605349064, 0.026102600619196892, 0.03967990353703499, -0.005426886957138777, -0.035101518034935, -0.007954508997499943, 0.002815544605255127, -0.0603603795170784, 0.038184501230716705, 0.028355006128549576, -0.06752686947584152, 0.01572141982614994, 0.01266004703938961, 0.0024691589642316103, 0.010987842455506325, 0.034565750509500504, -0.018177451565861702, -0.020121140405535698, -0.006898428313434124, -0.029102295637130737, -0.009747916832566261, 0.018952766433358192, 0.03232581540942192, -0.08864890038967133, -0.010744555853307247, 0.007488146889954805, 0.01448716688901186, -0.023731425404548645, 0.00718032568693161, -0.023931263014674187, -0.01270852331072092, -0.030619172379374504, 0.018402455374598503, -0.07592595368623734, 0.06558366864919662, 0.02491457760334015, -0.02264701947569847, 0.009746668860316277, 0.024140797555446625, 0.019596492871642113, 0.045752208679914474, 0.011352057568728924, 0.06450189650058746, -0.01786213554441929, 0.0029536504298448563, 0.00381149398162961, 0.03203478828072548, -0.023628687486052513, -0.05752544105052948, 0.009029166772961617, 0.0364578478038311, -0.007012494374066591, 0.00437057064846158, -0.005448316223919392, -0.043239764869213104, 0.007735023275017738, 0.037383075803518295, 0.07699994742870331, 0.03942723199725151, 0.0009436186519451439, -0.07596538215875626, 0.01867019757628441, -0.003690927755087614, 0.012134723365306854, -0.015351170673966408, -0.03550131618976593, 0.004378739278763533, 0.0018165832152590156, -0.013273309916257858, 0.002849654061719775, 0.03365601226687431, 0.04704948887228966, -0.04553845524787903, 0.008735809475183487, 0.07436996698379517, 0.019520098343491554, 0.03432561829686165, 0.0031162407249212265, 0.03912698104977608, 0.03744116052985191, 0.03957729414105415, 0.002075872151181102, 0.02585257589817047, 0.019235989078879356, -0.04299463704228401, 0.010824083350598812, 0.06580719351768494, -0.01020833570510149, -0.001659671775996685, -0.06329537183046341, -0.030009306967258453, 0.04795495793223381, -0.05298568680882454, -0.026186687871813774, 0.03923695906996727, 0.07422793656587601, 0.04455822333693504, 0.04693372920155525, 0.006577217020094395, -0.07762271165847778, 0.028797803446650505, 0.0037906263023614883, 0.025718726217746735, 0.018257278949022293, -0.04847152903676033, 0.08555257320404053, 0.03329770267009735, -0.0015201468486338854, 0.020015189424157143, -0.06774076074361801, -0.08401426672935486, 0.012072333134710789, 0.011781065724790096, 0.0643908753991127, -0.021582404151558876, 0.0014360692584887147, 0.06924258172512054, 0.019069146364927292, 0.04269029200077057, 0.031244369223713875, 0.012138317339122295, 0.020578637719154358, -0.049310456961393356, -0.05727314203977585, 0.019036903977394104, 0.009272381663322449, -0.019308893010020256, -0.028030121698975563, 0.0024003880098462105, -0.010488023981451988, 0.023670027032494545, 0.03523366525769234, -0.02270730957388878, 0.012594091705977917, 0.01584276743233204, 0.06272712349891663, -0.02100175991654396, 0.054506927728652954, -0.07470487058162689, 0.02114957571029663, -0.005446030758321285, -0.018573081120848656, 0.021751688793301582, -0.020717784762382507, 0.11238360404968262, 0.06270955502986908, -0.027749964967370033, -0.029323730617761612, 0.022264903411269188, -0.0016671129269525409, -0.024526556953787804, 0.015191254206001759, -0.000999811920337379, -0.0005684799398295581, 0.00993309635668993, -0.08096979558467865, -0.03286581113934517, 0.015302173793315887, -0.03692052140831947, -0.012506638653576374, 0.08610166609287262, -0.01629987359046936, 0.05651059374213219, 0.0003775057557504624, 0.007224614731967449, 0.0018193719442933798, -0.04174512252211571, -0.05962265655398369, -0.007145994808524847, 0.0007126085693016648, -0.011048133485019207, 0.01477902103215456, -0.03170230612158775, -0.038166601210832596, -0.023237012326717377, -0.020809683948755264, 0.034710049629211426, 0.0758788213133812, 0.05655333027243614, -0.014029416255652905, 0.05798398703336716, 0.0022158618085086346, 0.024439098313450813, -0.02368558757007122, -0.06355154514312744, -0.02737603522837162, -0.05333888903260231, -0.0008721451740711927, 0.019950279965996742, 0.021594567224383354, 0.00920158065855503, 0.0056299446150660515, -0.005650943610817194, -0.011973788030445576, -0.03092632256448269, 0.04784437268972397, -0.01903568021953106, -0.012978627346456051, -0.02165980450809002, -0.04971088841557503, 0.05681069940328598, -0.04034126177430153, -0.020841922610998154, 0.011023764498531818, -0.058765627443790436, 0.03645043447613716, -0.06639418005943298, -0.002697021933272481, 0.019451437518000603, 0.014168506488204002, 0.026983022689819336, 0.03378086909651756, 0.013873569667339325, 0.06967182457447052, 0.006540980190038681, 0.012619945220649242, 0.0019073302391916513, -0.005692001897841692, 0.01716914027929306, -0.054300982505083084, 0.010956444777548313, 0.037676651030778885, 0.018688732758164406, -0.0195869542658329, -0.035043880343437195, 0.009097530506551266, -0.01290075108408928, -0.29554447531700134, 0.020931804552674294, -0.0023747719824314117, -0.04760482907295227, 0.007114768493920565, -0.014829005114734173, 0.007551412098109722, -0.052822016179561615, -0.03189181163907051, -0.011108576320111752, -0.03577844053506851, -0.04167521372437477, -0.024383889511227608, 0.06159341335296631, 0.02016785554587841, 0.02644604630768299, 0.00504709267988801, -0.029128188267350197, -0.013952380046248436, 0.06776372343301773, 0.004019651096314192, -0.04792143031954765, -0.012485922314226627, 0.04391693323850632, 0.037333302199840546, 0.047613658010959625, -0.08959232270717621, 0.03912679851055145, -0.06058315187692642, 0.005617896560579538, 0.005426270421594381, -0.013416344299912453, 0.012380405329167843, -0.0402660071849823, -0.022485561668872833, -0.04812842607498169, 0.05044066533446312, 0.026026669889688492, 0.013514100573956966, 0.04795342683792114, -0.013726430013775826, -0.03949573636054993, -0.004060055129230022, -0.02015170454978943, 0.05501943081617355, -0.010462328791618347, -0.08397135883569717, -0.023624122142791748, -0.03346222639083862, 0.06145404651761055, -0.03649430721998215, -0.05932742357254028, -0.020661676302552223, 0.011177378706634045, -0.005287176929414272, -0.006041131913661957, 0.0015148798702284694, -0.006546349730342627, -0.04711151868104935, -0.049531057476997375, -0.015140504576265812, -0.038659822195768356, -0.007271863054484129, -0.05964231491088867, -0.017907680943608284, -0.06301823258399963, -0.08714283257722855, 0.004191347863525152, 0.08628449589014053, 0.03399469703435898, -0.04158492758870125, 0.001398141379468143, -0.024189189076423645, -0.1147223562002182, -0.026555903255939484, -0.0014767204411327839, -0.04002590477466583, 0.0004633438657037914, 0.00859740935266018, 0.060858309268951416, -0.044596798717975616, -0.0427076518535614, 0.020370768383145332, 0.02005445957183838, 0.04079175367951393, -0.04321698471903801, -0.008749512024223804, -0.018172111362218857, -0.02133166231215, -0.008159449324011803, 0.06624528765678406, -0.00206592190079391, -0.003703474532812834, -0.025585083290934563, 0.026482030749320984, 0.03291869908571243, 0.0040945205837488174, -0.0006561705376952887, 0.017502276226878166, 0.04006941616535187, 0.04317107051610947, -0.058426570147275925, 0.0024754025507718325, -0.03521379455924034, -0.047127459198236465, 0.016120046377182007, -0.060239024460315704, -0.0027968506328761578, 0.03735249117016792, 0.019226493313908577, -0.03359962999820709, -0.04894014075398445, 0.036383286118507385, -0.029178861528635025, -0.024592680856585503, -0.02134842984378338, 0.021918071433901787, 0.030011069029569626, 0.002276542829349637, -0.014540948905050755, -0.0634288489818573, 0.032007846981287, -0.010984295979142189, -0.034665796905756, -0.02798069827258587, -0.03906312212347984, 0.014113872312009335, -0.014061310328543186, -0.005152106285095215, 0.013293038122355938, -0.0289458017796278, 0.0020106052979826927, 0.02120368741452694, -0.013444723561406136, 0.0016549361171200871, -0.037420231848955154, -0.04932233318686485, -0.007338510826230049, -0.006871949881315231, 0.011624735780060291, 0.0008540694834664464, 0.0046500153839588165, 0.01625753380358219, 0.04065105319023132, 0.08185773342847824, -0.012611701153218746, 0.01693679206073284, 0.011039570905268192, 0.016776064410805702, -0.007862986996769905, 0.0015495906118303537, -0.04505237936973572, 0.00766528258100152, -0.028818100690841675, -0.019424209371209145, -0.03826543688774109, 0.024749403819441795, 0.014180559664964676, -0.03372739255428314, -0.026464227586984634, 0.030523087829351425, -0.041587647050619125, -0.026316819712519646, -0.038612816482782364, -0.006137828808277845, 0.044883038848638535, -0.030641213059425354, 0.045842573046684265, 0.018124103546142578, -0.018837258219718933, 0.02736334688961506, -0.028189968317747116, -0.039774090051651, 0.017546271905303, 0.010541709139943123, -0.0030078021809458733, 0.007660980336368084, 0.008347044698894024, 0.04106464609503746, 0.029649630188941956, -0.012480412609875202, -0.024038486182689667, 0.0016256854869425297, 0.04170013219118118, 0.07231505215167999, 0.009238089434802532, 0.013158035464584827, -0.00029381405329331756, -0.03733537346124649, -0.011717788875102997, 0.002873880323022604, -0.0025882094632834196, -0.0028506533708423376, 0.012366660870611668, -0.042174261063337326, -0.06287739425897598, 0.04887016862630844, 0.01729091815650463, 0.02194545418024063, 0.0051925466395914555, 0.002070836490020156, 0.006840455811470747, -0.03002001717686653, 0.04563990607857704, 0.052208203822374344, -0.06888417154550552, 0.020449042320251465, -0.023458218201994896, -0.0304160937666893, 0.021951524540781975, 0.011595366522669792, -0.04711635038256645, 0.011253641918301582, -0.0005499657709151506, 0.007786201778799295, -0.040005262941122055, -0.04305427521467209, -0.05200536921620369, 0.02239253744482994, -0.0055108205415308475, 0.008878829888999462, -0.0077340551652014256, 0.0041396054439246655, -0.015312034636735916, -0.03552376106381416, 0.01392542477697134, -0.018334899097681046, -0.0013583601685240865, 0.023904703557491302, -0.05865532159805298, 0.03379572182893753, -0.04093995690345764, 0.040144916623830795, 0.0358266718685627, -0.018287459388375282, -0.019928105175495148, -0.019202252849936485, 0.0033317466732114553, 0.020080314949154854, 0.06174810975790024, 0.000518301036208868, -0.03263349458575249, -0.057029061019420624, 0.013949718326330185, -0.04990333318710327, 0.01167425699532032, -0.014284309931099415, -0.027804575860500336, 0.010338476859033108, 0.044955842196941376, -0.004468304570764303, 0.010007296688854694, -0.03918616101145744, -0.0020706201903522015, 0.05323287472128868, -0.03302226960659027, -0.01050475798547268, -0.02906849980354309, -0.060676634311676025, 0.009590096771717072, 0.015166259370744228, 0.02301948145031929, -0.0566617026925087, 0.03705184906721115, 0.025685328990221024, 0.02753395028412342, 0.03044159524142742, -0.015490354038774967, 0.023640794679522514, -0.023711994290351868, 0.011066652834415436, -0.10804999619722366, -0.044189851731061935, 0.03649042174220085, 0.020408280193805695, 0.002236734377220273, 0.022674081847071648, -0.03720799833536148, 0.059906005859375, -0.06315478682518005, -0.018902620300650597, 0.039574503898620605, -0.011604394763708115, 0.01797293685376644, 0.04493456706404686, -0.05286937206983566, 0.009329842403531075, 0.026169177144765854, -0.025012515485286713, 0.006878998596221209, -0.016434507444500923, 0.054891664534807205, -0.008098103106021881, 0.017788270488381386, -0.001744904788210988, -0.0009518066653981805, 0.04841398075222969, 0.02598002925515175, 0.009941760450601578, 0.05863821506500244, -0.03416230157017708, 0.05165017023682594, 0.055658698081970215, -0.005803598091006279, 0.03155523166060448, -0.025057796388864517, -0.0078140152618289, -0.03621681407094002, 0.018905730918049812, -0.0015480780275538564, -0.01777808740735054, -0.04030773788690567, 0.0658460333943367, 0.026017731055617332, -0.032654769718647, -0.08967886120080948, 0.022545741870999336, -0.043488919734954834, 0.016060110181570053, -0.03017340414226055, -0.005174566991627216, 0.0014214444672688842, 0.04192657396197319, -0.008495827205479145, 0.004516656510531902, 0.0680672898888588, -0.012162071652710438, -0.031167587265372276, 0.0032234627287834883, 0.09033246338367462, 0.07455836981534958, 0.06852138787508011, -0.004047564696520567, 0.08262775838375092, -0.03482475131750107, -0.05713102966547012, 0.0003425146860536188, -0.007684238720685244, 0.0063746958039700985, -0.013916727155447006, 0.024690477177500725, 0.07289504259824753, -0.01474552508443594, 0.06908772140741348, -0.03226203843951225, -0.002112562069669366, 0.015112045221030712, 0.009831649251282215, 0.03952306881546974, 0.06232680007815361, 0.015024091117084026, 0.04114285111427307, -0.01884162239730358, -0.027158532291650772, 0.029279544949531555, -0.022586829960346222, -0.036021772772073746, 0.02706647664308548, -0.00778120057657361, 0.024342091754078865, 0.0051837279461324215, 0.042888253927230835, 0.07794299721717834, 0.008530182763934135, 0.017301367595791817, 0.015725499019026756, 0.004490120802074671, 0.0053157685324549675, 0.03747186064720154, -0.013440041802823544, -0.01003632415086031, -0.011018882505595684, -0.0376482717692852, -0.027813103049993515, -0.027416033670306206, -0.03581571206450462, 0.010447594337165356, -0.03879844769835472, 0.005424048285931349, 0.0021113366819918156, -0.0008861644892022014, -0.053273703902959824, -0.04791751131415367, -0.032755620777606964, -0.016307970508933067, -0.05028684064745903, -0.0045255073346197605, 0.027069149538874626, 0.011253622360527515, -0.02673206850886345, -0.04451102390885353, -0.02872409112751484, -0.01668456569314003, 0.042901843786239624, -0.07043063640594482, -0.003965756855905056, 0.005951393861323595, 0.016148684546351433, 0.012400937266647816, 0.012334069237112999, 0.049241065979003906, -0.023086322471499443, -0.018729064613580704, 0.008663749322295189, -0.0017030829330906272, 0.00904430728405714, 0.025075770914554596, 0.04378289729356766, -0.058896251022815704, 0.03239881247282028, 0.003198802936822176, -0.006641091778874397, -0.07072948664426804, 0.03391126170754433, 0.02868753857910633, 0.01747865043580532, 0.03430556878447533, -0.009118984453380108, -0.004946859087795019, -0.021498998627066612, -0.005358920432627201, -0.021317174658179283, 0.02193915843963623, 0.031402088701725006, -0.01435790490359068, 0.06840147078037262, 0.017148151993751526, -0.005014690104871988, -0.02739841490983963, -0.02933531440794468, -0.002696453360840678, 0.016055477783083916, -0.023750238120555878, -0.016585949808359146, -0.0282223429530859, -0.06557763367891312, -0.03528515249490738, 0.03959532454609871, -0.03800669685006142, -0.01909823529422283, 0.049592725932598114, 0.012031965889036655, -0.044985659420490265, 0.02547617442905903, -0.03699476271867752, -0.01348064187914133, 0.014568792656064034, 0.011932949535548687, -0.019501909613609314, 0.006152042653411627, -0.005153131205588579, 0.0004828374949283898, 0.0238039568066597, -0.02542102336883545, -0.02251664362847805, -0.02202564664185047, 0.015990927815437317, 0.05941367149353027, 0.0002618884900584817, -0.028068840503692627 ]
[ -0.06496221572160721, 0.00966448150575161, -0.04237738251686096, -0.02057574689388275, 0.05627721548080444, -0.024259991943836212, -0.033583104610443115, 0.05156956985592842, 0.004131700377911329, -0.04139050468802452, -0.005410695448517799, -0.040845807641744614, 0.003366283606737852, 0.007526226807385683, 0.10004648566246033, 0.011716698296368122, 0.004083593375980854, -0.07454145699739456, 0.000996750546619296, 0.024661865085363388, 0.02256721258163452, -0.01695234701037407, -0.02065926231443882, -0.019387640058994293, -0.013191387057304382, 0.020158246159553528, 0.015218924731016159, -0.06353277713060379, -0.007461940869688988, -0.23179763555526733, -0.007498814724385738, 0.021783314645290375, 0.05100063607096672, 0.009924768470227718, 0.010207289829850197, 0.07254324853420258, 0.0314953587949276, 0.02904803305864334, -0.002713868161663413, 0.06585615128278732, 0.0013234049547463655, 0.007052662782371044, -0.049140386283397675, -0.04103395342826843, 0.026040416210889816, -0.009558482095599174, -0.025372780859470367, -0.023764653131365776, -0.017356812953948975, -0.008749732747673988, -0.04025837406516075, -0.04274551570415497, -0.03944806009531021, -0.003081992268562317, -0.020144831389188766, 0.031881194561719894, 0.014986425638198853, 0.05514160543680191, 0.0005259717581793666, -0.022616764530539513, 0.00847095251083374, 0.003785924054682255, -0.15581344068050385, 0.09838603436946869, 0.022999698296189308, 0.02630510739982128, -0.051064420491456985, -0.005493727512657642, -0.01355558168143034, 0.09166262298822403, -0.01583826169371605, 0.0022742408327758312, -0.024503206834197044, 0.04884965717792511, 0.0052499896846711636, -0.00020430469885468483, -0.0006028373027220368, 0.022461041808128357, 0.03020119108259678, -0.07534706592559814, -0.03403472527861595, -0.01039790827780962, 0.016969095915555954, -0.025040598586201668, -0.01470384281128645, -0.010537798516452312, -0.005203238222748041, 0.05664682015776634, -0.013085726648569107, 0.0011015036143362522, 0.06226993352174759, 0.004579845350235701, 0.03862272575497627, 0.007672174368053675, -0.08616667240858078, -0.029742036014795303, -0.006641183514147997, 0.0229677464812994, 0.010287130251526833, 0.43362289667129517, -0.02299313433468342, -0.039900511503219604, 0.10030969977378845, 0.028429385274648666, -0.01681152917444706, 0.007414421532303095, -0.017058206722140312, -0.054572585970163345, 0.019585102796554565, -0.037378158420324326, 0.013689364306628704, 0.014042421244084835, 0.05547593533992767, -0.04516850784420967, 0.040949851274490356, -0.024113887920975685, 0.05529048666357994, 0.01180808711796999, 0.012129930779337883, -0.002070583635941148, -0.012432332150638103, -0.010599874891340733, 0.01711823046207428, -0.00857038889080286, 0.01282570417970419, -0.009387608617544174, 0.026137255132198334, 0.048433199524879456, 0.04630286991596222, -0.02762318029999733, 0.035512540489435196, -0.024351520463824272, -0.10487355291843414, -0.007519376929849386, 0.024317530915141106, 0.016697648912668228, 0.04431462287902832, -0.04246935993432999, 0.003659110516309738, 0.0151066230610013, -0.01676616631448269, -0.015535261482000351, 0.04061117395758629, -0.0005017794319428504, -0.074945829808712, 0.15433217585086823, 0.030514992773532867, -0.03912581503391266, -0.014321833848953247, -0.03267428278923035, -0.005636728834360838, 0.022216835990548134, -0.00568329868838191, -0.07168090343475342, 0.027882447466254234, 0.029237356036901474, 0.10022836923599243, -0.014818532392382622, -0.07403161376714706, -0.028002727776765823, -0.027505166828632355, -0.012901649810373783, -0.040465448051691055, 0.059831928461790085, 0.05492014065384865, -0.0843258947134018, -0.019015347585082054, 0.02585095353424549, 0.004584992304444313, -0.08099556714296341, 0.019918430596590042, 0.03326954320073128, -0.018219156190752983, 0.03525547683238983, 0.0655105859041214, -0.023729482665657997, -0.047830935567617416, 0.024853143841028214, 0.06808475404977798, 0.011806649155914783, 0.022596314549446106, 0.007043272722512484, -0.04298250749707222, 0.031546562910079956, -0.054857514798641205, -0.10137889534235, -0.043241046369075775, -0.01633969135582447, -0.005147240124642849, 0.0029048887081444263, -0.03263729810714722, -0.026224300265312195, -0.045983318239450455, 0.06515327095985413, -0.03983951359987259, -0.029225222766399384, 0.018929077312350273, -0.007869889959692955, -0.02523188292980194, -0.02557641826570034, -0.03373607620596886, 0.02267097495496273, -0.03493937477469444, 0.04310647025704384, -0.045558348298072815, 0.05529707670211792, 0.04933270439505577, -0.03888864070177078, 0.08331616222858429, 0.02032708190381527, -0.03268130123615265, -0.03417375311255455, -0.016032787039875984, -0.014070258475840092, 0.011828823015093803, -0.023120304569602013, 0.016597304493188858, 0.006342262029647827, 0.034838978201150894, 0.02073287032544613, -0.018376531079411507, -0.06138058006763458, -0.03775947540998459, -0.3437691032886505, -0.045796073973178864, 0.004764288663864136, -0.01925700530409813, 0.04848868399858475, -0.044566065073013306, 0.03142740949988365, -0.018693093210458755, 0.0018161020707339048, 0.049080152064561844, 0.03334129974246025, -0.015457624569535255, 0.00046463418402709067, -0.09664200991392136, 0.018645133823156357, 0.019418368116021156, -0.051766254007816315, -0.011793999932706356, -0.025869429111480713, -0.00015907491615507752, 0.02457076869904995, -0.014447405003011227, -0.029367662966251373, -0.052328646183013916, -0.028344202786684036, -0.05940772965550423, 0.08844392001628876, 0.011369969695806503, 0.05461839213967323, -0.03800063580274582, 0.061549343168735504, -0.011182584799826145, 0.009993824176490307, -0.06509775668382645, 0.004589788615703583, -0.007676738779991865, -0.014777293428778648, 0.014920609071850777, 0.007896866649389267, -0.024698792025446892, -0.02239907905459404, 0.004206041805446148, -0.05052798613905907, -0.019962722435593605, -0.08375108987092972, 0.026925653219223022, -0.02532113343477249, -0.04722253233194351, 0.023745762184262276, 0.06252826750278473, -0.012156156823039055, 0.026454096660017967, 0.002213194267824292, 0.016651004552841187, -0.05045322701334953, -0.006300604436546564, -0.09167858958244324, 0.017344798892736435, -0.004884617403149605, 0.00043756861123256385, 0.005334194749593735, 0.05367940291762352, 0.013432173989713192, -0.04474463313817978, -0.020252643153071404, 0.03489479422569275, -0.020175127312541008, 0.009066898375749588, 0.018101459369063377, -0.03309159725904465, -0.0033584001939743757, 0.08314578235149384, 0.006836263462901115, 0.008527363650500774, -0.0011604464380070567, 0.036072809249162674, 0.019312454387545586, 0.04072152450680733, 0.005212482996284962, -0.008172058500349522, 0.024813015013933182, -0.008730072528123856, 0.033903203904628754, -0.012242821976542473, 0.010314525105059147, 0.04458305612206459, 0.02849622257053852, -0.031815141439437866, 0.04427432641386986, 0.025469116866588593, -0.02758788876235485, 0.033644676208496094, -0.019138984382152557, -0.012475547380745411, 0.055141910910606384, 0.009770200587809086, -0.23491595685482025, 0.04178450256586075, 0.08625911921262741, 0.05618811026215553, 0.02857195772230625, 0.021705619990825653, 0.015610412694513798, -0.04186920076608658, 0.030950993299484253, 0.03137338161468506, 0.03218470886349678, 0.04029844328761101, -0.011385180987417698, -0.02649352326989174, 0.019179990515112877, 0.00466513866558671, 0.039548907428979874, 0.0077982558868825436, 0.010418842546641827, -0.004499783739447594, 0.013586658053100109, -0.017128970474004745, 0.15960420668125153, -0.015472586266696453, 0.014943811111152172, -0.002608343493193388, 0.009956047870218754, 0.03312104567885399, 0.0437772236764431, 0.002479782560840249, 0.0015042134327813983, -0.03676086291670799, 0.046713270246982574, -0.008209838531911373, 0.013013306073844433, -0.03811928629875183, 0.005267602391541004, 0.020453322678804398, 0.019995899870991707, -0.007757391780614853, 0.034719910472631454, 0.0006845218013040721, -0.0561191700398922, 0.0031391677912324667, 0.0594492182135582, 0.011274812743067741, 0.03797706961631775, -0.036754898726940155, -0.08241992443799973, 0.008758493699133396, -0.03097592107951641, -0.04731743037700653, -0.007181483320891857, -0.000006670290531474166, 0.023781420662999153, 0.07940326631069183, 0.03111334517598152, -0.00886184349656105, 0.0006995866424404085, 0.0036076894029974937, -0.014517668634653091, -0.04199245199561119, 0.08455044031143188, 0.036083322018384933, 0.03797538951039314 ]
[ 0.011698768474161625, 0.004596058279275894, -0.02333989180624485, -0.007740379311144352, -0.0006419463898055255, 0.007349185645580292, -0.01000972744077444, 0.03467445820569992, -0.008919223211705685, 0.021350370720028877, -0.011447404511272907, 0.012128694914281368, 0.025446511805057526, -0.0005989077617414296, -0.013507192023098469, -0.02657811902463436, 0.0037147055845707655, 0.011672841385006905, 0.012491852976381779, -0.005731489043682814, -0.027720222249627113, 0.05443418025970459, 0.04781988263130188, -0.017183218151330948, -0.018562540411949158, 0.011040004901587963, -0.02593480423092842, -0.034389153122901917, 0.020943446084856987, -0.12063226103782654, 0.01146273035556078, 0.001563184428960085, 0.010945159941911697, 0.025673354044556618, 0.008022929541766644, 0.002030511386692524, -0.027850870043039322, 0.017099542543292046, 0.0031967274844646454, 0.011085009202361107, -0.01493100356310606, -0.00658902432769537, -0.009731104597449303, 0.03429224342107773, 0.00911178532987833, -0.03844982385635376, -0.05975668504834175, -0.018909599632024765, 0.0009173914440907538, 0.014679617248475552, -0.041056860238313675, -0.006595567800104618, -0.014923143200576305, 0.02249058708548546, -0.001401053392328322, 0.017856596037745476, 0.019468586891889572, -0.009542127139866352, 0.0015411264030262828, -0.04300674423575401, -0.0004262598231434822, -0.008410467766225338, -0.061585571616888046, -0.03464362025260925, 0.004308984614908695, -0.01209550816565752, -0.01271927822381258, 0.03890769183635712, 0.019532667472958565, 0.024606285616755486, 0.002956721466034651, 0.04586450383067131, -0.026303527876734734, -0.04464953765273094, 0.015964683145284653, 0.0040000309236347675, 0.0025094226002693176, -0.0023303574416786432, 0.02004415914416313, -0.032602958381175995, -0.02187126688659191, -0.0016631267499178648, 0.030920647084712982, -0.04229585826396942, -0.02181260474026203, -0.01811751164495945, 0.02729482203722, 0.008686377666890621, 0.026674099266529083, 0.013418668881058693, -0.013412457890808582, 0.005771746393293142, 0.01870502158999443, 0.003946887329220772, -0.1323305368423462, 0.014736419543623924, -0.009358983486890793, -0.0016219659009948373, 0.004247001837939024, 0.8539591431617737, 0.012971849180758, -0.0024318392388522625, 0.042099788784980774, -0.02675449103116989, -0.006059210281819105, -0.026042690500617027, 0.007292941678315401, -0.02265704609453678, 0.025783829391002655, -0.05462395027279854, 0.021333487704396248, 0.007982163690030575, 0.007491038180887699, 0.030394533649086952, 0.03020871989428997, -0.0007957416819408536, 0.07412011176347733, 0.004066921770572662, -0.026139291003346443, 0.0154776806011796, -0.0012490678345784545, -0.0015559447929263115, -0.000656374089885503, 0.00824621319770813, -0.028603103011846542, -0.16634489595890045, -0.005056894384324551, -6.64578955548827e-33, 0.030616676434874535, -0.03898180276155472, -0.012183849699795246, -0.011151345446705818, -0.00517772464081645, 0.0002757242473307997, 0.0035274047404527664, -0.003072126302868128, -0.0077516851015388966, -0.03202669322490692, 0.006498431321233511, -0.017153341323137283, -0.016574427485466003, -0.038648150861263275, 0.04208820313215256, -0.04854221269488335, -0.0070724450051784515, 0.03812456876039505, -0.01155557855963707, -0.0023847604170441628, 0.028591444715857506, 0.053505804389715195, 0.002716382732614875, -0.027455070987343788, 0.026790646836161613, 0.019150491803884506, 0.026066472753882408, -0.018417613580822945, -0.0066184126771986485, -0.0410647913813591, -0.007165988441556692, 0.01242716796696186, -0.02524569258093834, -0.014630608260631561, 0.02600688673555851, -0.043659813702106476, -0.007065846584737301, -0.020148029550909996, 0.03235214576125145, -0.06411001831293106, -0.048418913036584854, 0.01801374740898609, -0.01617811806499958, -0.0029037909116595984, 0.009517173282802105, 0.010497787967324257, 0.04632139950990677, 0.02751176804304123, -0.0040471614338457584, 0.015560640953481197, -0.0024901828728616238, 0.008607432246208191, 0.005125690251588821, 0.020459460094571114, -0.016467127948999405, 0.030710166320204735, 0.005993027705699205, 0.00399591913446784, 0.0335821770131588, 0.02396673522889614, 0.027360688894987106, 0.013176329433918, 0.0011001781094819307, 0.03122364729642868, -0.001326587051153183, -0.005877991206943989, -0.012418042868375778, -0.0054349275305867195, 0.026079045608639717, 0.012775471433997154, -0.03867587074637413, 0.012528149411082268, -0.016739340499043465, 0.011379506438970566, -0.007219825405627489, -0.005548836197704077, 0.008958753198385239, 0.0015977396396920085, -0.018057383596897125, 0.036843329668045044, 0.005979002919048071, -0.012591663748025894, -0.004968543071299791, -0.05385331064462662, -0.008137881755828857, 0.0012189969420433044, 0.028232701122760773, -0.007792688440531492, -0.004023381508886814, -0.019611254334449768, 0.07320054620504379, 0.018420429900288582, -0.004741087555885315, -0.028796877712011337, -0.025075798854231834, 6.674986631110788e-33, -0.010247115045785904, -0.018951397389173508, -0.018212782219052315, 0.023081975057721138, -0.0010092563461512327, -0.0004135188937652856, -0.011277160607278347, 0.0011723742354661226, -0.06969092786312103, 0.000448727048933506, -0.019746363162994385, 0.0027534414548426867, -0.026699768379330635, -0.0006881196168251336, 0.059683218598365784, -0.015823928639292717, 0.0026002652011811733, -0.0005461000837385654, 0.006067811045795679, 0.035519078373909, -0.009599505923688412, -0.014535052701830864, -0.01840180531144142, -0.006695645395666361, 0.02711629867553711, 0.03177342936396599, -0.0019639511592686176, 0.006923709064722061, 0.014429930597543716, -0.0019797966815531254, 0.027921313419938087, 0.020025955513119698, -0.02692500315606594, -0.003643751610070467, -0.022962814196944237, 0.018485259264707565, 0.031031766906380653, -0.011487366631627083, 0.0262548066675663, -0.0006354626966640353, 0.04024586081504822, 0.014228773303329945, 0.0008509447798132896, 0.02154427394270897, 0.00944807194173336, 0.013598516583442688, -0.011806703172624111, 0.015888849273324013, -0.006147079635411501, 0.0035485741682350636, 0.010153872892260551, -0.0013970055151730776, 0.014146875590085983, -0.02194497548043728, 0.007279490120708942, -0.033127713948488235, -0.01483354065567255, 0.009036119095981121, -0.04674573615193367, 0.00055399548728019, -0.03325328975915909, 0.019032273441553116, -0.011386248283088207, -0.016613394021987915, -0.023181788623332977, -0.035701852291822433, -0.022832848131656647, 0.008748114109039307, -0.031043199822306633, -0.005459250882267952, -0.0012053760001435876, 0.008834653533995152, 0.0023724795319139957, 0.03872158005833626, 0.029783742502331734, 0.008092635311186314, -0.012586157768964767, 0.012436185963451862, 0.018246902152895927, 0.017597563564777374, -0.00035267003113403916, 0.04999146983027458, 0.003545112442225218, -0.011157866567373276, 0.009904613718390465, -0.008617490530014038, -0.03500930964946747, -0.005403720308095217, -0.011412383057177067, -0.017812436446547508, 0.03927581384778023, -0.06248793005943298, 0.028172247111797333, 0.039418045431375504, -0.014514708891510963, -1.2707296548342129e-8, -0.010527239181101322, -0.01408411655575037, -0.03505899757146835, -0.004093049559742212, 0.026059817522764206, 0.009216360747814178, -0.02988864667713642, 0.005782746709883213, -0.031515687704086304, 0.004577545449137688, 0.03940360248088837, -0.017068084329366684, -0.022591743618249893, 0.05405266582965851, -0.004067700821906328, -0.024559568613767624, 0.025180799886584282, -0.014121163636446, 0.023835616186261177, -0.011208750307559967, 0.02968478761613369, 0.054458629339933395, 0.00926615484058857, 0.02495959959924221, 0.02096288837492466, 0.022618213668465614, 0.011490766890347004, -0.07104332000017166, -0.012930870056152344, -0.0186496339738369, 0.028682703152298927, -0.029184093698859215, -0.06939529627561569, 0.011949852108955383, 0.01023599598556757, -0.006864376366138458, 0.008657359518110752, 0.013603377155959606, 0.013946023769676685, 0.011949734762310982, -0.02496006153523922, -0.008908617310225964, 0.010987658053636551, -0.01745494455099106, -0.013983916491270065, -0.00802440196275711, -0.0073166885413229465, -0.008222408592700958, 0.012783155776560307, -0.0487050898373127, -0.021753041073679924, -0.006736804265528917, 0.026561632752418518, -0.005286010913550854, 0.011008095927536488, 0.011639370582997799, 0.0034419232979416847, -0.01901215687394142, -0.018744245171546936, 0.0037301992997527122, 0.020518792793154716, 0.007399415131658316, -0.032456252723932266, 0.0015853655058890581 ]
topic-modelling-working-out-the-optimal-number-of-topics
https://markhneedham.com/blog/2015/03/24/topic-modelling-working-out-the-optimal-number-of-topics
false
2015-03-23 00:45:00
Python: Equivalent to flatMap for flattening an array of arrays
[ "python" ]
[ "Python" ]
I found myself wanting to flatten an array of arrays while writing some Python code earlier this afternoon and being lazy my first attempt involved building the flattened array manually: [source,python] ---- episodes = [ {"id": 1, "topics": [1,2,3]}, {"id": 2, "topics": [4,5,6]} ] flattened_episodes = [] for episode in episodes: for topic in episode["topics"]: flattened_episodes.append({"id": episode["id"], "topic": topic}) for episode in flattened_episodes: print episode ---- If we run that we'll see this output: [source,bash] ---- $ python flatten.py {'topic': 1, 'id': 1} {'topic': 2, 'id': 1} {'topic': 3, 'id': 1} {'topic': 4, 'id': 2} {'topic': 5, 'id': 2} {'topic': 6, 'id': 2} ---- What I was really looking for was the Python equivalent to the http://www.markhneedham.com/blog/2011/07/03/clojure-equivalent-to-scalas-flatmapcs-selectmany/[flatmap function] which I learnt can be achieved in Python http://stackoverflow.com/questions/1077015/python-list-comprehensions-compressing-a-list-of-lists[with a list comprehension] like so: [source,python] ---- flattened_episodes = [{"id": episode["id"], "topic": topic} for episode in episodes for topic in episode["topics"]] for episode in flattened_episodes: print episode ---- We could also choose to http://naiquevin.github.io/a-look-at-some-of-pythons-useful-itertools.html[use itertools] in which case we'd have the following code: [source,python] ---- from itertools import chain, imap flattened_episodes = chain.from_iterable( imap(lambda episode: [{"id": episode["id"], "topic": topic} for topic in episode["topics"]], episodes)) for episode in flattened_episodes: print episode ---- We can then simplify this approach a little by wrapping it up in a 'flatmap' function: [source,python] ---- def flatmap(f, items): return chain.from_iterable(imap(f, items)) flattened_episodes = flatmap( lambda episode: [{"id": episode["id"], "topic": topic} for topic in episode["topics"]], episodes) for episode in flattened_episodes: print episode ---- I think the list comprehensions approach still works but I need to look into itertools more - it looks like it could work well for other list operations.
null
null
[ 0.003436194034293294, -0.0476420521736145, -0.028928741812705994, 0.0046483734622597694, 0.062358807772397995, 0.014920327812433243, -0.005865549668669701, 0.03287334740161896, -0.0005106544122099876, -0.02002626657485962, -0.005677864421159029, -0.014316700398921967, -0.07633718103170395, 0.041581928730010986, -0.022358229383826256, 0.07377702742815018, 0.07773727178573608, -0.03611668944358826, -0.015445131808519363, 0.040803395211696625, 0.02503993548452854, 0.03556940704584122, 0.007257731631398201, 0.0017784759402275085, 0.013810302130877972, -0.0010515806498005986, -0.0006944721681065857, 0.02410934492945671, -0.0589628703892231, -0.024175826460123062, -0.007131658960133791, -0.019688839092850685, 0.00028573311283253133, 0.0011821798980236053, 0.02848445624113083, -0.030135488137602806, -0.02267278917133808, 0.02344435639679432, -0.017066437751054764, 0.027442144230008125, -0.05015745013952255, 0.013555181212723255, -0.002598967868834734, 0.004743169993162155, -0.0167005006223917, 0.0073081995360553265, -0.031217915937304497, 0.027453679591417313, -0.0291312076151371, -0.001181856612674892, -0.04929831251502037, 0.02114051952958107, -0.0022509354166686535, -0.035878680646419525, -0.006503577809780836, 0.06645724922418594, 0.0002237210574094206, -0.1049470528960228, 0.03945598751306534, 0.008172652684152126, -0.007371613755822182, 0.008945219218730927, 0.007448889315128326, 0.0390983410179615, 0.023392658680677414, -0.041356708854436874, -0.0477554090321064, 0.06630067527294159, -0.054742682725191116, -0.029528317973017693, -0.024999933317303658, 0.007854606956243515, -0.04142162576317787, -0.02980913408100605, -0.01187276653945446, -0.037375740706920624, -0.03266315907239914, 0.06346244364976883, -0.006277171429246664, 0.030430123209953308, -0.01388733834028244, 0.025348801165819168, 0.018490565940737724, 0.010041668079793453, 0.004031145479530096, -0.01936577633023262, -0.0728427991271019, -0.01813095435500145, -0.07360140979290009, 0.032318755984306335, 0.013914168812334538, -0.05172523483633995, 0.0022854534909129143, 0.010967171750962734, 0.0061611151322722435, -0.012479487806558609, -0.003319661132991314, 0.0017818460473790765, 0.006785208825021982, 0.00705293845385313, -0.07859775424003601, -0.022395247593522072, 0.026153886690735817, -0.0009047057828865945, -0.057743337005376816, -0.026929868385195732, -0.0024086914490908384, -0.03665056452155113, -0.00024751751334406435, -0.007461306639015675, -0.04079538956284523, -0.016162054613232613, -0.00994945876300335, -0.012189771980047226, -0.09036210924386978, 0.06154302880167961, 0.013665992766618729, -0.02311018295586109, -0.05749534070491791, 0.029367612674832344, 0.035990577191114426, 0.03266019746661186, 0.010163717903196812, 0.10639128088951111, -0.018268968909978867, 0.008966293185949326, 0.006299380678683519, 0.06187515705823898, -0.007511756848543882, -0.040773794054985046, -0.017325613647699356, 0.037566907703876495, -0.015756921842694283, -0.013274737633764744, -0.016657277941703796, -0.012524383142590523, -0.055956628173589706, 0.02603205107152462, 0.02930506132543087, 0.01711762323975563, -0.019693560898303986, -0.015204872004687786, -0.014352618716657162, -0.0059847282245755196, 0.012596054933965206, 0.00695647019892931, -0.0304922666400671, -0.026867706328630447, -0.004972829949110746, 0.029275964945554733, -0.006754735950380564, 0.0027830724138766527, 0.052599433809518814, -0.0246037058532238, 0.021953554823994637, 0.08386530727148056, 0.0038816751912236214, 0.059937234967947006, 0.0032015645410865545, 0.0009763870039023459, 0.03549890220165253, 0.034000225365161896, 0.015588851645588875, 0.044544387608766556, 0.005455102771520615, -0.016436545178294182, -0.007524182088673115, 0.05296768248081207, -0.0033617697190493345, -0.01840776577591896, -0.03757619485259056, -0.04006556048989296, 0.0689963549375534, -0.0031508279498666525, -0.019808514043688774, -0.026254508644342422, 0.07827457040548325, 0.0349673256278038, 0.039254140108823776, 0.0015599291073158383, -0.06812521815299988, 0.026932870969176292, -0.025279656052589417, -0.0055462815798819065, 0.02854675054550171, 0.0015326221473515034, 0.08696994930505753, 0.023361187428236008, 0.02861602231860161, 0.03256496787071228, -0.054104410111904144, -0.06285786628723145, -0.01432130578905344, 0.004332746844738722, 0.05701189115643501, -0.06233680620789528, -0.01901138946413994, 0.07313308864831924, 0.02475993148982525, 0.028128614649176598, -0.010048884898424149, 0.012542452663183212, 0.012295562773942947, -0.03409678116440773, -0.046623121947050095, 0.03504781797528267, 0.032379936426877975, -0.02661099284887314, -0.029926665127277374, 0.02792549692094326, 0.014736591838300228, -0.0034512297715991735, 0.04700884595513344, -0.016017384827136993, 0.04847424104809761, 0.04640734940767288, 0.05017527565360069, -0.029498450458049774, 0.05000022426247597, -0.06402261555194855, 0.036398038268089294, -0.01226737443357706, -0.045364998281002045, -0.05289953947067261, -0.022574380040168762, 0.1271596997976303, 0.06198460981249809, -0.02146383374929428, -0.05329634249210358, 0.02218785136938095, -0.03408142551779747, -0.025619104504585266, -0.009136177599430084, -0.03538380563259125, -0.06275413185358047, 0.04005805775523186, -0.0025782249867916107, -0.019191840663552284, 0.008479098789393902, -0.041614603251218796, -0.015382478944957256, 0.06949906796216965, -0.014316498301923275, 0.05929999426007271, 0.036061786115169525, -0.029348723590373993, -0.007096096407622099, -0.04684830829501152, -0.06577014923095703, -0.00015001937572378665, 0.023206761106848717, -0.015673890709877014, 0.05791759118437767, -0.06554384529590607, -0.05992019549012184, -0.006284582894295454, -0.06994553655385971, -0.024690711870789528, 0.06810645759105682, 0.06044802814722061, -0.05756071209907532, 0.06697430461645126, 0.009236905723810196, -0.02087811939418316, -0.010372348129749298, -0.05512212589383125, -0.0407303050160408, 0.0013702467549592257, 0.006135945674031973, -0.0017190854996442795, 0.04003412649035454, 0.006579091306775808, 0.021955208852887154, -0.008702309802174568, 0.000535814615432173, -0.0024574187118560076, 0.03565536439418793, -0.001616057357750833, -0.009978950954973698, -0.024553053081035614, -0.020119572058320045, 0.0494418703019619, -0.029033493250608444, -0.039369624108076096, -0.01200966164469719, -0.05383330211043358, 0.0021872662473469973, -0.06721748411655426, -0.022190336138010025, 0.00522904098033905, 0.04421091079711914, 0.047111883759498596, -0.039663273841142654, -0.0238694678992033, 0.033907558768987656, 0.008795573376119137, 0.013333315961062908, 0.0065024420619010925, 0.013218292966485023, 0.023839283734560013, -0.0010429220274090767, 0.01915215514600277, 0.026826633140444756, 0.013020932674407959, -0.051112182438373566, 0.0025269766338169575, 0.018410244956612587, -0.020525870844721794, -0.2489539086818695, 0.017944006249308586, -0.045167818665504456, -0.014068086631596088, 0.02865748293697834, -0.014443648047745228, -0.014543972909450531, -0.04718375578522682, 0.013284564018249512, 0.0038053933531045914, -0.008960404433310032, -0.062466997653245926, -0.03433571383357048, 0.06764513999223709, 0.006995860021561384, 0.012088813818991184, -0.04677893966436386, 0.004774775821715593, 0.030767247080802917, 0.05428558960556984, -0.016759945079684258, -0.03433237969875336, -0.004260854329913855, 0.056538380682468414, 0.0034436159767210484, 0.04019053652882576, -0.06983423978090286, 0.04196743294596672, -0.0605844184756279, -0.039168644696474075, 0.010474148206412792, -0.04376013204455376, 0.010628576390445232, -0.019038403406739235, -0.021622011438012123, -0.024961942806839943, 0.04191429540514946, -0.008768727071583271, 0.023897048085927963, 0.03390675410628319, -0.05510157346725464, -0.04081260785460472, 0.0014532151399180293, -0.008152386173605919, 0.07434282451868057, -0.045159872621297836, -0.04045721888542175, -0.035353243350982666, -0.040319640189409256, 0.06001073494553566, 0.007436815649271011, -0.02758452296257019, -0.03384213149547577, 0.027461878955364227, -0.034537721425294876, 0.002915171906352043, -0.03175908327102661, -0.005926880054175854, -0.04798620566725731, 0.03202633932232857, 0.000633181887678802, -0.04877844825387001, -0.027352886274456978, -0.07451936602592468, -0.0016292501240968704, -0.037293195724487305, -0.06671463698148727, 0.005635419394820929, 0.054922930896282196, 0.05859993398189545, -0.026857934892177582, -0.005533136893063784, -0.03132639452815056, -0.11211548745632172, 0.007218630518764257, -0.015807822346687317, -0.009002966806292534, 0.012777355499565601, -0.009015016257762909, 0.038742758333683014, -0.06440657377243042, -0.05332722142338753, 0.01033031940460205, -0.00588289275765419, 0.0057516382075846195, -0.015687402337789536, -0.021450096741318703, -0.0357140488922596, 0.008738921955227852, -0.031228506937623024, 0.0410555899143219, -0.028014471754431725, 0.006665647961199284, 0.03013104386627674, -0.00011126013123430312, 0.06393768638372421, 0.03875454142689705, 0.02360757626593113, 0.0211984571069479, 0.017343342304229736, 0.017815103754401207, -0.05448630452156067, -0.004786403384059668, -0.005402459297329187, 0.002455662237480283, 0.012546119280159473, -0.021782636642456055, 0.021441280841827393, 0.030851872637867928, 0.004188681486994028, -0.042138680815696716, -0.015707340091466904, -0.003198921913281083, -0.04969722032546997, 0.007848215289413929, -0.005172261968255043, 0.01987900398671627, 0.02873213030397892, 0.04303257539868355, -0.024238117039203644, -0.07198057323694229, 0.0011451790342107415, 0.02724156714975834, 0.01946687325835228, -0.05188017711043358, -0.018209772184491158, 0.0133037269115448, -0.011132819578051567, 0.024816960096359253, 0.010260907001793385, 0.013904438354074955, 0.003482517786324024, 0.04986659437417984, -0.03221769630908966, 0.04035051539540291, -0.03987406939268112, -0.026619739830493927, -0.01562703773379326, -0.028982410207390785, 0.00819477904587984, 0.032975271344184875, -0.007386107929050922, 0.012032026425004005, 0.02514350786805153, 0.017280010506510735, 0.015103081241250038, 0.022720705717802048, 0.011319552548229694, -0.012023495510220528, 0.0010553516913205385, 0.012253722175955772, -0.008945941925048828, 0.0028939140029251575, -0.007158723194152117, -0.005184359848499298, 0.017584174871444702, 0.0447244755923748, -0.030035514384508133, -0.04072975367307663, -0.06154809519648552, 0.06686261296272278, -0.049138735979795456, 0.0009615286253392696, 0.00013758178101852536, -0.03393256664276123, 0.060373567044734955, -0.007588137406855822, 0.04306446760892868, -0.001651997328735888, -0.008720164187252522, 0.00002061621125903912, -0.0034991255961358547, -0.03353564441204071, 0.01888118125498295, 0.006731713656336069, -0.0362430140376091, 0.03280363976955414, 0.041033025830984116, -0.01947738416492939, 0.01554759219288826, 0.011279393918812275, 0.0023510712198913097, 0.011834237724542618, 0.005009951535612345, 0.0395745225250721, 0.03386811539530754, -0.016222264617681503, 0.015284521505236626, -0.04526209086179733, -0.033464979380369186, -0.03182874247431755, -0.017919236794114113, -0.012130963616073132, 0.011469840072095394, -0.024270527064800262, -0.07348586618900299, 0.0305072870105505, 0.014810418710112572, -0.019167445600032806, -0.04126377031207085, -0.0215290654450655, 0.0028548124246299267, -0.03400124981999397, 0.0035910597071051598, 0.07891631871461868, -0.0671481117606163, -0.018162619322538376, -0.02822486124932766, 0.023975970223546028, 0.0055146776139736176, 0.05717933923006058, -0.06781890988349915, -0.03197125345468521, -0.0011073719942942262, 0.026666369289159775, -0.011062663048505783, -0.026316165924072266, 0.0070694806054234505, 0.0537768192589283, -0.0329805389046669, -0.006224563345313072, -0.024657264351844788, 0.020439038053154945, -0.01800358295440674, -0.04529508203268051, 0.02746419608592987, -0.013050472363829613, -0.014952115714550018, 0.04188743978738785, -0.023176785558462143, 0.07209117710590363, -0.026678359135985374, 0.03228563442826271, 0.047556642442941666, -0.0034543084912002087, -0.012087306007742882, -0.017431579530239105, 0.030564388260245323, -0.01631411537528038, 0.061876118183135986, 0.019520025700330734, -0.007807743735611439, -0.030268963426351547, 0.00006600513734156266, -0.0010647857561707497, -0.010133784264326096, 0.017954275012016296, -0.032832950353622437, 0.0019768134225159883, 0.04073254391551018, -0.014090088196098804, 0.033618226647377014, 0.004637288395315409, -0.05298588424921036, 0.06547384709119797, -0.047201670706272125, -0.0320470817387104, -0.025112880393862724, -0.0452674999833107, 0.02081509493291378, 0.010380062274634838, 0.06030509993433952, -0.06620290875434875, 0.04674919322133064, 0.0038798374589532614, 0.03548175469040871, 0.03546462953090668, -0.022056326270103455, 0.04623151198029518, -0.024888847023248672, 0.004802838433533907, -0.07645810395479202, -0.01119555626064539, 0.05976155400276184, 0.03225477412343025, -0.008853824809193611, 0.012504607439041138, -0.038064707070589066, -0.001656549284234643, -0.062411341816186905, -0.006983150728046894, 0.05914321541786194, -0.026040682569146156, 0.013397037982940674, 0.009092948399484158, -0.03685041889548302, 0.021114196628332138, 0.05890774354338646, -0.033976778388023376, 0.013832129538059235, 0.0115357069298625, 0.03263809531927109, 0.02288232184946537, 0.029069116339087486, 0.009662149474024773, -0.006142851430922747, 0.0701528862118721, 0.03740980103611946, 0.029055709019303322, 0.035345908254384995, -0.023376481607556343, 0.01929437927901745, 0.0414743609726429, -0.0011709504760801792, 0.011832577176392078, 0.033255044370889664, -0.01888844184577465, -0.06691354513168335, 0.050078146159648895, 0.03906461223959923, -0.030844539403915405, -0.03304725140333176, 0.0883965715765953, 0.006506884470582008, -0.043087441474199295, -0.037854522466659546, 0.03454400599002838, -0.07711873948574066, 0.0028846529312431812, -0.01791786216199398, -0.007968012243509293, -0.027803003787994385, 0.054355740547180176, -0.04244581237435341, 0.0008960564155131578, 0.04161413013935089, -0.007143015507608652, 0.00002657506956893485, 0.014253121800720692, 0.0685833990573883, 0.07717961072921753, 0.0286367479711771, 0.005950975231826305, 0.05292828008532524, -0.03236040100455284, -0.025750556960701942, -0.004969969391822815, -0.007260912097990513, 0.040831588208675385, -0.0007690041675232351, 0.03463120758533478, 0.07266484946012497, -0.0167147908359766, 0.07238712906837463, -0.020085258409380913, 0.009056055918335915, 0.017252285033464432, 0.02307085506618023, 0.029296308755874634, 0.0281495563685894, 0.025010230019688606, 0.07236224412918091, 0.002328842878341675, -0.035889457911252975, 0.03421942517161369, 0.014731990173459053, -0.03438403829932213, 0.02136891335248947, 0.002709103049710393, 0.03410446271300316, 0.026872003450989723, 0.04206588864326477, 0.07944100350141525, -0.01573949120938778, -0.03332801163196564, 0.006893961224704981, 0.017472293227910995, -0.01143944077193737, 0.016871584579348564, -0.02248319610953331, -0.029619481414556503, 0.02691209316253662, -0.05206828564405441, -0.02777937799692154, -0.046598292887210846, 0.0212696623057127, 0.023448290303349495, 0.014545280486345291, 0.010984743945300579, 0.03083355352282524, 0.04397369548678398, -0.0805106982588768, -0.036277998238801956, -0.05774526670575142, -0.05768929049372673, -0.05123646929860115, 0.01768900454044342, 0.013246830552816391, 0.006098253186792135, -0.01602001115679741, -0.040754158049821854, -0.03858864679932594, 0.021005060523748398, 0.009242601692676544, -0.048207979649305344, -0.00986779946833849, 0.01615363545715809, 0.02680640108883381, 0.04684687778353691, 0.010240155272185802, 0.0416678786277771, 0.006649571470916271, -0.02074331045150757, -0.004057280253618956, 0.008379715494811535, 0.04291614890098572, 0.01952461339533329, 0.004314313177019358, -0.062171828001737595, -0.007994997315108776, 0.018117418512701988, 0.0035654616076499224, -0.05533323809504509, 0.018671710044145584, 0.044557929039001465, 0.004961587488651276, 0.04766541346907616, -0.02412371151149273, -0.0036401699762791395, -0.020582573488354683, -0.01761697232723236, 0.026236698031425476, -0.0156572163105011, 0.02928083948791027, -0.027811044827103615, 0.06584213674068451, 0.02392311580479145, -0.010405510663986206, -0.01727733574807644, 0.008573497645556927, -0.032318271696567535, 0.007318800315260887, -0.03308600187301636, -0.028518786653876305, -0.03407970070838928, -0.05561990290880203, -0.021717224270105362, 0.009260684251785278, -0.026789220049977303, -0.003923874348402023, 0.027765164151787758, 0.013691858388483524, -0.04486924409866333, 0.0627860277891159, -0.03888876736164093, 0.04419832304120064, -0.016935760155320168, -0.023348147049546242, -0.01822381466627121, 0.0021595286671072245, -0.00967183243483305, 0.017966536805033684, -0.0048987059853971004, -0.037244297564029694, -0.0005564722814597189, -0.030098503455519676, 0.031717024743556976, 0.05128234997391701, -0.029510153457522392, 0.03285067155957222 ]
[ -0.061654187738895416, -0.014372320845723152, -0.035596441477537155, -0.015881584957242012, 0.03787195309996605, -0.044059332460165024, -0.0422336719930172, 0.024459991604089737, 0.017915895208716393, -0.002818208420649171, 0.006138183642178774, -0.05223658308386803, 0.02255597896873951, -0.024514345452189445, 0.03242730349302292, -0.010677485726773739, -0.027950873598456383, -0.031820353120565414, -0.08336667716503143, 0.03983907401561737, 0.028512930497527122, -0.009645350277423859, -0.056250717490911484, -0.017580442130565643, 0.05059405043721199, 0.06742469221353531, 0.04953485354781151, -0.05389354005455971, -0.02709922567009926, -0.20839375257492065, -0.023268258199095726, -0.01530093140900135, 0.04830257594585419, -0.0048337290063500404, 0.01846066303551197, 0.02866745926439762, 0.015551768243312836, 0.02162720263004303, -0.03948352485895157, 0.04835458844900131, 0.08143671602010727, 0.029135627672076225, -0.05476197227835655, -0.06220817565917969, 0.005096025764942169, 0.014017309062182903, -0.05734274536371231, 0.0028533870354294777, 0.011921575292944908, 0.01922936923801899, -0.04760245233774185, -0.02516046166419983, -0.050915032625198364, -0.008743771351873875, 0.010305636562407017, -0.00394517881795764, 0.015745624899864197, 0.045066192746162415, 0.013656697236001492, 0.015435021370649338, 0.00887907762080431, -0.004852451384067535, -0.11713115125894547, 0.0984211191534996, 0.02068302407860756, 0.04444679245352745, -0.014105266891419888, -0.025032803416252136, -0.008460007607936859, 0.09972800314426422, -0.036470577120780945, -0.024750061333179474, 0.003977474756538868, 0.04890020564198494, 0.020147057250142097, -0.06351128965616226, -0.014857521280646324, -0.010234247893095016, 0.05645731836557388, -0.003231614362448454, -0.0726722925901413, -0.045696716755628586, 0.017261745408177376, -0.015113777481019497, 0.013414404354989529, -0.00623038224875927, -0.029124634340405464, 0.00023838177730794996, 0.02294260449707508, 0.005282279569655657, 0.020799653604626656, -0.01761559024453163, 0.046559929847717285, 0.043794311583042145, -0.05863463878631592, -0.010537554509937763, -0.0066110240295529366, 0.010391724295914173, -0.03964008018374443, 0.34853678941726685, -0.05581047385931015, -0.01068904809653759, 0.07777047157287598, 0.030126208439469337, -0.017660418525338173, -0.009122557006776333, 0.016027135774493217, -0.0370061919093132, -0.01325647160410881, -0.08378135412931442, -0.02495385706424713, -0.05430000275373459, 0.0603363923728466, -0.06686564534902573, 0.036028821021318436, 0.020359618589282036, -0.00027286174008622766, 0.04918474331498146, -0.018147123977541924, 0.015647288411855698, 0.0025066786911338568, 0.00808224081993103, 0.025105679407715797, 0.020316265523433685, -0.020811723545193672, 0.04926450550556183, 0.038325630128383636, 0.06528149545192719, 0.047321710735559464, 0.04307335615158081, 0.041597332805395126, -0.05467153713107109, -0.0891454666852951, 0.033716052770614624, 0.02001313678920269, 0.03856591880321503, 0.05602920800447464, -0.029972795397043228, 0.03453025594353676, 0.02812626212835312, -0.005315813701599836, -0.06534238159656525, -0.004642687737941742, -0.003285843413323164, -0.03699642792344093, 0.11520152539014816, -0.015528249554336071, 0.0017335590673610568, -0.06249398738145828, -0.012424954213202, -0.01959610916674137, 0.003635411150753498, 0.02693253941833973, -0.060134779661893845, -0.007904225960373878, 0.05505811795592308, 0.09242232888936996, -0.024694178253412247, -0.06243178993463516, -0.01803235150873661, -0.06977150589227676, -0.01525054220110178, -0.029073480516672134, 0.012270614504814148, 0.020757708698511124, -0.0814422070980072, -0.004245302639901638, 0.02465568669140339, 0.009794298559427261, -0.06941288709640503, 0.03732763230800629, -0.01594802550971508, -0.04165619984269142, 0.0022104994859546423, 0.037377551198005676, -0.020353203639388084, -0.038128189742565155, -0.003977277781814337, 0.10390118509531021, 0.0014038108056411147, 0.009227083995938301, 0.025725718587636948, -0.02507883869111538, 0.021874714642763138, -0.01665058359503746, -0.08882437646389008, -0.0706079974770546, 0.01655363105237484, -0.00503028929233551, -0.07485483586788177, 0.005128956399857998, -0.06595329940319061, -0.07547779381275177, 0.03101593442261219, -0.030082475394010544, -0.011286342516541481, 0.0646638423204422, -0.00021309730072971433, 0.009471803903579712, 0.016574759036302567, -0.0016244965372607112, 0.03365306928753853, 0.005568232852965593, 0.029823416844010353, -0.06303568929433823, -0.017880897969007492, 0.02562817744910717, -0.07029323279857635, 0.08456762135028839, 0.027678832411766052, -0.024804117158055305, 0.0021720060613006353, -0.014298958703875542, -0.023385610431432724, -0.02136998437345028, -0.05113024264574051, 0.00253311381675303, 0.008794930763542652, 0.016533125191926956, 0.006617583800107241, -0.02412395179271698, -0.13167768716812134, -0.014899887144565582, -0.34634146094322205, -0.029199298471212387, 0.047722965478897095, -0.04110196232795715, 0.013896453194320202, -0.10343357920646667, 0.010328530333936214, -0.023521246388554573, -0.06046043336391449, 0.0424114353954792, 0.05561421066522598, -0.01782567985355854, -0.011961918324232101, -0.10328339040279388, 0.007967040874063969, 0.04041379317641258, -0.01380482129752636, -0.01507195271551609, 0.009706362150609493, 0.03905824199318886, 0.004435916431248188, 0.006344145629554987, 0.00639693345874548, -0.09242996573448181, -0.03961799666285515, -0.01999533921480179, 0.12159767746925354, 0.00432399520650506, 0.037304237484931946, 0.0052002971060574055, 0.03147263452410698, 0.006246155593544245, -0.036745913326740265, -0.04266538470983505, -0.06035046651959419, -0.012090684846043587, 0.0023917199578136206, 0.02439827099442482, 0.007972811348736286, -0.03448118269443512, -0.056416578590869904, 0.02640281245112419, -0.04934404045343399, -0.0732124000787735, -0.008846014738082886, 0.005812297109514475, -0.015654029324650764, -0.06700693070888519, 0.06275065988302231, 0.08815488964319229, 0.015041019767522812, 0.028073668479919434, 0.007216427009552717, 0.006071968469768763, 0.023806175217032433, -0.0337708443403244, -0.0661633089184761, -0.023518962785601616, 0.005830409936606884, 0.0009259285288862884, -0.002498545916751027, 0.012956133112311363, 0.05349908769130707, -0.013891021721065044, -0.03073514997959137, 0.04058248922228813, 0.0077420929446816444, 0.020554697141051292, -0.03274215757846832, -0.024079665541648865, -0.009037419222295284, 0.1068955808877945, 0.023859906941652298, 0.01564808003604412, 0.022077735513448715, 0.07664395123720169, -0.029599037021398544, 0.08378656208515167, 0.06264044344425201, 0.003874760353937745, 0.027244126424193382, 0.020530302077531815, 0.05493541806936264, -0.004634028300642967, 0.035568807274103165, 0.04089628905057907, -0.013919792138040066, 0.010045456700026989, 0.05262254178524017, 0.0030251604039222, -0.00000583477049076464, -0.0069350297562778, -0.018858248367905617, -0.011694762855768204, 0.03824695944786072, -0.013251575641334057, -0.2546122372150421, 0.06064796820282936, 0.025971241295337677, 0.022302044555544853, 0.028298942372202873, 0.04724344238638878, 0.02229299396276474, -0.033673930913209915, 0.005011266563087702, 0.007740903180092573, 0.01302594318985939, 0.030822686851024628, 0.02046935074031353, -0.020441453903913498, 0.027184562757611275, 0.011771591380238533, 0.08938416838645935, 0.013108553364872932, 0.019774165004491806, 0.006342408247292042, 0.013353429734706879, -0.009289536625146866, 0.16133646667003632, 0.016214357689023018, 0.028691129758954048, -0.0056956615298986435, 0.003248123452067375, -0.008197731338441372, 0.0659046545624733, 0.05482790619134903, -0.016029486432671547, -0.014733857475221157, 0.053484540432691574, -0.0027346964925527573, 0.02447148598730564, -0.054417744278907776, -0.008382758125662804, 0.06332240998744965, 0.026249444112181664, -0.0007496676407754421, -0.014035629108548164, 0.0035562999546527863, -0.05653056874871254, 0.024954918771982193, 0.04639272391796112, 0.011999621987342834, 0.018352005630731583, -0.06470880657434464, -0.02517288736999035, 0.0066558970138430595, -0.010207025334239006, -0.02485278993844986, 0.01003002654761076, 0.0033044933807104826, 0.00478128669783473, 0.061358027160167694, 0.0023579238913953304, 0.028995444998145103, 0.03482352942228317, 0.007827072404325008, -0.00360571825876832, -0.04911248758435249, 0.1219928041100502, 0.048685088753700256, 0.015842102468013763 ]
[ 0.014784552156925201, 0.020536724478006363, 0.010539339855313301, 0.00862670037895441, 0.0003540503967087716, -0.00223624799400568, -0.0010040007764473557, 0.057874634861946106, -0.020160570740699768, -0.03290684521198273, -0.049906905740499496, 0.02781403623521328, 0.027267983183264732, 0.011127620004117489, -0.009046630002558231, 0.02141280472278595, -0.03910871967673302, -0.00132218177895993, 0.04134732484817505, -0.013543865643441677, -0.020340371876955032, 0.0693160817027092, 0.021792884916067123, -0.008334269747138023, -0.020016806200146675, 0.05526183545589447, -0.0034043830819427967, -0.028073972091078758, 0.0020880629308521748, -0.09535874426364899, -0.025783995166420937, -0.02811705321073532, 0.02397426776587963, -0.014127103611826897, 0.02249329909682274, -0.008883487433195114, -0.026756826788187027, 0.01582077518105507, -0.0031376718543469906, 0.05431878939270973, 0.04137628525495529, 0.03321370854973793, -0.02352612465620041, -0.0033916374668478966, -0.009699820540845394, -0.009359361603856087, -0.05010318011045456, -0.01988297887146473, 0.004203182645142078, 0.012224131263792515, -0.026761459186673164, 0.008398415520787239, 0.0013441501650959253, -0.001997734187170863, 0.01600152999162674, -0.04207274317741394, -0.026972265914082527, -0.02940043993294239, -0.007791280280798674, -0.02754351682960987, 0.007419477682560682, -0.013594809919595718, -0.03189370781183243, -0.024629829451441765, -0.027228975668549538, -0.037669431418180466, 0.0006395999225787818, 0.04827684164047241, 0.017367251217365265, -0.021908197551965714, -0.003925433848053217, 0.0011065468424931169, -0.061597906053066254, -0.05716307833790779, -0.01296885497868061, -0.05618129298090935, 0.04507392644882202, -0.08412317931652069, 0.0073476615361869335, 0.014851804822683334, -0.06200661510229111, 0.0048415446653962135, 0.03264594078063965, -0.025909006595611572, -0.05882690101861954, -0.06312693655490875, -0.017814187332987785, 0.0306019876152277, -0.005814790725708008, 0.020019225776195526, -0.022596033290028572, -0.0035411296412348747, 0.005893709138035774, 0.015547608956694603, -0.06571639329195023, 0.05123636871576309, 0.012256642803549767, -0.024601414799690247, -0.034788958728313446, 0.7846233248710632, 0.020529426634311676, -0.003210480324923992, 0.014435234479606152, -0.01162758469581604, -0.010215760208666325, 0.029799358919262886, 0.024618258699774742, -0.04289863258600235, -0.04265380650758743, -0.012330742552876472, 0.01688425987958908, -0.017470674589276314, 0.06336456537246704, 0.02663799189031124, 0.03970770537853241, 0.022638896480202675, 0.037652190774679184, 0.05885685980319977, -0.007132736500352621, -0.01432983297854662, 0.04361560195684433, -0.044321250170469284, 0.06357622146606445, 0.02253670245409012, -0.009874670766294003, -0.14160968363285065, -0.014241299591958523, -6.786848142902975e-33, 0.01711726188659668, 0.005450644996017218, 0.01074906811118126, 0.011833788827061653, 0.000763774907682091, -0.025223584845662117, 0.00785019900649786, -0.0002996615075971931, 0.020713066682219505, -0.010000808164477348, -0.005678940564393997, 0.017349151894450188, -0.008717929013073444, -0.007565912324935198, 0.0003652361629065126, -0.01712937466800213, 0.018254004418849945, 0.08342411369085312, -0.025396209210157394, -0.008446615189313889, -0.011542429216206074, 0.06966274976730347, 0.043358318507671356, -0.02803483046591282, -0.002026510192081332, -0.028276586905121803, 0.006939887534826994, -0.02851637825369835, -0.0040176622569561005, -0.04970834031701088, -0.030506556853652, 0.04156389832496643, 0.036473434418439865, -0.04056350886821747, -0.009074555709958076, -0.035483747720718384, -0.04780059680342674, 0.015372609719634056, -0.03126789629459381, 0.028510544449090958, 0.004912577103823423, 0.018775347620248795, -0.008379918523132801, -0.04534345865249634, -0.02752707339823246, 0.03672734275460243, 0.012903829105198383, 0.05279717966914177, -0.008565730415284634, 0.04136091098189354, 0.019369080662727356, -0.023749621585011482, -0.002194971777498722, -0.036829717457294464, 0.014326724223792553, 0.013837139122188091, 0.028483908623456955, -0.0328093096613884, 0.020740164443850517, 0.0040032812394201756, 0.019102545455098152, 0.020568208768963814, 0.0012108638184145093, 0.02907184511423111, 0.0022131663281470537, 0.009656858630478382, 0.064298115670681, 0.04590214788913727, 0.01310183946043253, 0.018338315188884735, -0.0415903702378273, 0.060241665691137314, -0.021420380100607872, -0.06744254380464554, 0.006445970386266708, -0.059194713830947876, 0.005380145739763975, -0.05964168161153793, 0.00027268179110251367, 0.04377421736717224, 0.04685981944203377, -0.01661652699112892, -0.016008693724870682, -0.0346362367272377, -0.03574347868561745, 0.02791634202003479, 0.025345776230096817, 0.06681070476770401, -0.01564723253250122, -0.0029776599258184433, 0.024592174217104912, 0.022652477025985718, 0.029209868982434273, -0.04354039207100868, -0.008145320229232311, 7.083700139419943e-33, -0.0030112441163510084, 0.005093750543892384, -0.04698820412158966, -0.0036581007298082113, 0.0231294184923172, -0.023197228088974953, 0.03312227874994278, 0.009963540360331535, -0.04299483820796013, 0.026022624224424362, -0.04216138273477554, -0.02835427224636078, -0.0381522960960865, 0.007982120849192142, 0.0748496800661087, 0.005467123817652464, 0.007391112856566906, 0.03657352924346924, -0.03965514525771141, -0.009922446683049202, -0.010412518866360188, -0.015009736642241478, -0.013860896229743958, 0.01775025948882103, 0.023605450987815857, 0.010502601973712444, -0.029810816049575806, 0.027850717306137085, 0.037873197346925735, -0.01310013048350811, 0.005716598592698574, -0.032664697617292404, -0.01543404906988144, -0.03916040435433388, -0.006269331555813551, 0.057902559638023376, 0.020124727860093117, -0.0288514606654644, -0.02315158024430275, -0.04586367309093475, 0.014034031890332699, 0.054538968950510025, -0.04223698377609253, 0.05685025453567505, -0.03641378507018089, -0.016064126044511795, -0.00438712676987052, 0.016146989539265633, 0.03641868010163307, -0.04113336279988289, -0.02779332920908928, 0.009488868527114391, 0.0218491293489933, 0.03285789117217064, 0.008483343757689, -0.043999094516038895, -0.023643964901566505, 0.03760853037238121, -0.05674651265144348, -0.005934452172368765, -0.07846415787935257, -0.04636974632740021, -0.04468310996890068, -0.010166028514504433, -0.004390606191009283, 0.013796479441225529, -0.04361921176314354, -0.021289462223649025, -0.05389481037855148, 0.005746523384004831, -0.007999210618436337, -0.01614849641919136, 0.011190873570740223, 0.005453791934996843, 0.0186944417655468, 0.020408354699611664, -0.017979906871914864, -0.0042745862156152725, -0.011629733256995678, 0.0332670658826828, 0.008993029594421387, -0.0420927070081234, -0.01342229638248682, -0.012295336462557316, -0.003575049340724945, 0.007626812439411879, 0.01053975522518158, 0.025654347613453865, 0.02521382085978985, 0.019220640882849693, 0.039686303585767746, -0.04601186141371727, 0.04145484045147896, 0.04429617151618004, -0.03186221420764923, -1.2491783607515572e-8, -0.014788652770221233, -0.011469540186226368, -0.004765068180859089, 0.02862687222659588, 0.011122648604214191, 0.029767217114567757, 0.0031724555883556604, -0.018697362393140793, 0.004762053024023771, -0.005231065209954977, 0.0014323311625048518, -0.029027096927165985, 0.018055766820907593, 0.03322223201394081, 0.07561931014060974, 0.01849391870200634, -0.013496079482138157, 0.020496824756264687, 0.034899115562438965, 0.014042765833437443, -0.0032808096148073673, 0.004947534296661615, -0.03433503210544586, 0.019579611718654633, -0.0070310430601239204, 0.0002129953500116244, 0.024971505627036095, -0.06052365526556969, 0.03644167631864548, -0.03628358244895935, 0.050091423094272614, -0.012152663432061672, -0.022184589877724648, 0.003619253635406494, 0.008596634492278099, -0.04298343509435654, 0.06473957002162933, 0.02806907333433628, 0.008410375565290451, 0.027869494631886482, -0.01052990835160017, -0.0038148981984704733, 0.009792419150471687, -0.031131401658058167, -0.027100859209895134, -0.04097640514373779, -0.04247039556503296, 0.013200403191149235, 0.05161876976490021, -0.05940917879343033, -0.00978587195277214, -0.04035878926515579, 0.016004418954253197, 0.0019782392773777246, 0.044640205800533295, 0.016750356182456017, 0.027906926348805428, 0.02159653976559639, -0.0073178112506866455, 0.023411693051457405, 0.030743861570954323, 0.039003606885671616, -0.03636213764548302, 0.004467060789465904 ]
python-equivalent-to-flatmap-for-flattening-an-array-of-arrays
https://markhneedham.com/blog/2015/03/23/python-equivalent-to-flatmap-for-flattening-an-array-of-arrays
false
2015-03-15 22:43:17
Python: Transforming Twitter datetime string to timestamp (z' is a bad directive in format)
[ "python" ]
[ "Python" ]
I've been playing around with importing Twitter data into Neo4j and since Neo4j can't store dates natively just yet I needed to convert a date string to timestamp. I started with the following which unfortunately throws an exception: [source,python] ---- from datetime import datetime date = "Sat Mar 14 18:43:19 +0000 2015" >>> datetime.strptime(date, "%a %b %d %H:%M:%S %z %Y") Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/_strptime.py", line 317, in _strptime (bad_directive, format)) ValueError: 'z' is a bad directive in format '%a %b %d %H:%M:%S %z %Y' ---- https://docs.python.org/2/library/datetime.html#strftime-strptime-behavior[%z is actually a valid option] used to extract the timezone but my googling suggests it not working is one of the idiosyncrasies of strptime. I eventually came across the +++<cite>+++python-dateutil+++</cite>+++ library, as http://stackoverflow.com/questions/3305413/python-strptime-and-timezones[recommended by Joe Shaw on StackOverflow]. Using that library the problem is suddenly much simpler: [source,bash] ---- $ pip install python-dateutil ---- [source,python] ---- from dateutil import parser parsed_date = parser.parse(date) >>> parsed_date datetime.datetime(2015, 3, 14, 18, 43, 19, tzinfo=tzutc()) ---- To get to a timestamp we can use calendar as I've http://www.markhneedham.com/blog/2014/10/20/python-converting-a-date-string-to-timestamp/[described before]: [source,python] ---- import calendar timestamp = calendar.timegm(parser.parse(date).timetuple()) >>> timestamp 1426358599 ----
null
null
[ 0.02405071072280407, -0.01851658709347248, -0.021447448059916496, 0.019853591918945312, 0.07928510755300522, 0.0069525218568742275, 0.0369890034198761, 0.04060555621981621, 0.05180925875902176, -0.013126779347658157, -0.0073466612957417965, -0.020168619230389595, -0.06346110254526138, 0.024917708709836006, -0.021850556135177612, 0.07576867938041687, 0.0711580291390419, -0.04606319218873978, 0.0065306406468153, -0.008249476552009583, 0.010706792585551739, 0.03411850705742836, 0.008547275327146053, 0.02007181942462921, 0.008845618925988674, -0.005033443216234446, -0.006386046763509512, -0.011676071211695671, -0.03825924172997475, 0.006548705045133829, 0.036483682692050934, 0.01712026447057724, 0.012145339511334896, 0.005041372496634722, 0.029415974393486977, 0.018489520996809006, -0.0334339514374733, -0.020390650257468224, 0.003895523026585579, 0.01947469636797905, -0.04282362386584282, 0.027614891529083252, -0.01896672509610653, 0.000259515771176666, -0.03636797517538071, 0.019152287393808365, 0.015824923291802406, 0.07268743216991425, 0.0019855881109833717, 0.011193362064659595, -0.06407967209815979, 0.005194890312850475, 0.003567362204194069, -0.028527097776532173, -0.004766756668686867, 0.05670969560742378, -0.007330610882490873, -0.10583799332380295, 0.035232678055763245, -0.0066842795349657536, 0.025096287950873375, -0.05205775797367096, -0.01118499506264925, -0.003032014472410083, 0.002170301740989089, -0.027484701946377754, -0.006430743262171745, 0.050654858350753784, -0.042014386504888535, -0.015448217280209064, 0.0018072458915412426, 0.033713750541210175, -0.046184662729501724, -0.00828827079385519, -0.004470964893698692, -0.029246557503938675, -0.02133779227733612, 0.07457058876752853, 0.023992493748664856, 0.07838243991136551, 0.009164533577859402, 0.011812168173491955, 0.04929506033658981, 0.03497347980737686, 0.025627948343753815, -0.024374544620513916, -0.061275776475667953, -0.0187623742967844, -0.042859092354774475, 0.03213302791118622, 0.03066628985106945, -0.03735612332820892, 0.038953714072704315, 0.012285886332392693, 0.006380198523402214, 0.013019924983382225, -0.030401963740587234, -0.002687259577214718, 0.03653969615697861, -0.032312050461769104, -0.05769869685173035, -0.028567273169755936, 0.03263453394174576, 0.016013802960515022, -0.04454782232642174, -0.06716901808977127, -0.0483584962785244, -0.03156306967139244, 0.025149153545498848, -0.0038058569189161062, -0.051175557076931, -0.00002368885361647699, -0.005596792791038752, -0.02130432054400444, -0.059749945998191833, 0.040665414184331894, 0.031815022230148315, -0.039982493966817856, -0.035456202924251556, 0.010569646023213863, 0.04160893335938454, 0.005373893305659294, -0.014383260160684586, 0.0446413978934288, 0.014418819919228554, 0.0708746537566185, -0.004391202703118324, 0.057724613696336746, -0.026489315554499626, -0.040303755551576614, -0.046501923352479935, 0.05993127450346947, 0.00039728908450342715, 0.014592842198908329, -0.018591810017824173, -0.033300843089818954, -0.031220195814967155, 0.021829023957252502, 0.06832806020975113, 0.034840140491724014, -0.004915762692689896, -0.02831765078008175, -0.000770348182413727, 0.0030586221255362034, 0.010206912644207478, 0.060244880616664886, -0.0009437859989702702, -0.02865326963365078, -0.03873015195131302, -0.00519678695127368, 0.004830365069210529, 0.015044939704239368, 0.04747441038489342, 0.0036826888099312782, -0.006462621968239546, 0.07299290597438812, 0.030530761927366257, 0.027070321142673492, -0.03165236487984657, 0.008403000421822071, 0.04494893550872803, 0.039135608822107315, -0.03516034781932831, 0.04916999489068985, 0.014848408289253712, -0.04546518996357918, -0.01873120665550232, 0.02092139422893524, -0.031366389244794846, 0.00956729892641306, -0.023288648575544357, -0.0480213426053524, 0.06320216506719589, -0.04798610135912895, 0.0028517632745206356, 0.06804332137107849, 0.08044055104255676, -0.01040070690214634, 0.012113823555409908, -0.01884697563946247, -0.08159585297107697, 0.0738087072968483, 0.0011661967728286982, 0.037115443497896194, 0.007493630051612854, 0.032763030380010605, 0.051668211817741394, -0.010022330097854137, 0.009630662389099598, 0.04389791190624237, -0.09165547788143158, -0.059574101120233536, -0.03441439941525459, -0.026390735059976578, 0.05635818466544151, -0.053985510021448135, 0.0013991768937557936, 0.0371343195438385, 0.0007298497366718948, 0.048414457589387894, 0.0076329754665493965, -0.014174339361488819, -0.010615766048431396, -0.03718986362218857, -0.055727049708366394, 0.01622159034013748, 0.05846882984042168, -0.021846476942300797, 0.005194975528866053, 0.010912994854152203, -0.019429251551628113, 0.009522868320345879, 0.0480123795568943, -0.020402628928422928, 0.02368372492492199, 0.034535638988018036, 0.043044351041316986, -0.02665088139474392, 0.007185134571045637, -0.051363859325647354, 0.04097844287753105, -0.0010222282726317644, -0.027743130922317505, -0.05434711277484894, -0.0046930452808737755, 0.11647150665521622, 0.0328979529440403, -0.017380256205797195, -0.04786838963627815, 0.03592595458030701, 0.002736912341788411, -0.03732066601514816, -0.008486276492476463, -0.013057967647910118, 0.02852492593228817, 0.026062965393066406, -0.03196626529097557, -0.016714340075850487, -0.03513668477535248, -0.003589078551158309, 0.023763136938214302, 0.05611063167452812, -0.026082362979650497, 0.056968074291944504, -0.018112516030669212, -0.0023608440533280373, -0.021793276071548462, -0.037521976977586746, -0.020690416917204857, 0.04238768666982651, 0.0432639941573143, -0.012412150390446186, 0.07287896424531937, -0.03204476833343506, -0.06333347409963608, -0.020251106470823288, -0.05874938890337944, 0.05417470261454582, 0.06803100556135178, 0.031264934688806534, 0.0007522960659116507, 0.0343596413731575, -0.0540713369846344, 0.022326745092868805, -0.030550217255949974, -0.06499834358692169, -0.034475650638341904, -0.004413815215229988, 0.03452874347567558, 0.02766980603337288, 0.033780913800001144, -0.004893041681498289, 0.03304719552397728, 0.013173135928809643, -0.013175023719668388, -0.00823112204670906, 0.04822932928800583, -0.02741541713476181, -0.003518531331792474, -0.04894956573843956, -0.0018189194379374385, 0.08112077414989471, -0.07126563787460327, -0.054988980293273926, -0.022391896694898605, -0.05559961125254631, 0.04740129038691521, -0.010045995935797691, -0.006406781263649464, 0.0015208653640002012, 0.015363721176981926, 0.05531716346740723, 0.016346748918294907, 0.021489830687642097, 0.06759323924779892, 0.033817268908023834, 0.02494998089969158, 0.01000925898551941, -0.003498195204883814, 0.03624817728996277, 0.016328489407896996, 0.04186105728149414, 0.06043737009167671, 0.036112479865550995, -0.002530287718400359, -0.05243135243654251, -0.005334433168172836, -0.020957598462700844, -0.2682608366012573, 0.05156294256448746, -0.048684872686862946, -0.03908742219209671, -0.004991651047021151, 0.0014690490206703544, 0.04674559459090233, -0.024855991825461388, -0.020704440772533417, 0.012279793620109558, -0.013689679093658924, -0.049138233065605164, -0.015076760202646255, 0.038205597549676895, 0.004289139527827501, -0.030827607959508896, -0.020015763118863106, -0.05712161213159561, 0.009803162887692451, 0.019241295754909515, 0.008251500315964222, -0.03808166831731796, 0.004812975879758596, 0.03211003169417381, 0.01497018150985241, 0.04025457054376602, -0.042937200516462326, 0.03553541749715805, -0.043633267283439636, -0.03829250857234001, 0.023785118013620377, -0.04271718114614487, 0.043262891471385956, -0.03199748694896698, 0.002175207482650876, -0.014223896898329258, 0.00860111229121685, 0.026139652356505394, 0.03873315826058388, 0.02783910557627678, -0.05230827257037163, -0.029201213270425797, 0.011129352264106274, -0.016741523519158363, 0.10628066211938858, 0.00452306866645813, -0.04293883591890335, -0.006176905240863562, -0.001793758012354374, 0.06255558878183365, -0.037560224533081055, -0.04172879084944725, -0.01096027810126543, -0.01011203695088625, -0.030995482578873634, -0.020340949296951294, -0.027679139748215675, -0.007478128187358379, -0.0285031795501709, -0.012867698445916176, 0.0021235074382275343, -0.023898785933852196, 0.018427791073918343, -0.05283796787261963, -0.06467284262180328, -0.04534002020955086, -0.07025336474180222, -0.03940155729651451, 0.037143878638744354, 0.05596280097961426, -0.04839088395237923, 0.03744947537779808, -0.012074585072696209, -0.10157044231891632, -0.01391714159399271, -0.055254675447940826, -0.013465516269207, -0.01641669310629368, -0.04023551940917969, 0.03540731966495514, -0.062282998114824295, -0.05585132911801338, 0.015429362654685974, 0.0032156205270439386, 0.020648563280701637, -0.012983929365873337, -0.0035077016800642014, -0.03959814831614494, -0.03519286960363388, -0.023485852405428886, 0.05252961814403534, -0.0265395138412714, -0.011971013620495796, 0.02248212695121765, -0.033157527446746826, 0.04246145859360695, 0.02066996693611145, 0.01106986217200756, 0.024730030447244644, 0.041788239032030106, 0.015196137130260468, -0.04035070165991783, -0.005326182581484318, -0.045344892889261246, 0.007787482347339392, -0.047962434589862823, -0.03091387264430523, 0.022801581770181656, -0.003177159233018756, 0.029073230922222137, 0.009271209128201008, -0.0007913201698102057, 0.00012980058090761304, -0.031070735305547714, -0.022556932643055916, -0.017233040183782578, -0.010481603443622589, 0.023170167580246925, 0.04225391894578934, -0.030808664858341217, -0.05369400978088379, 0.008430746383965015, 0.0011247385991737247, 0.002300403779372573, -0.058794714510440826, -0.029419200494885445, -0.016382809728384018, -0.038825538009405136, 0.023707779124379158, 0.003313520224764943, -0.05124017968773842, 0.03665975108742714, 0.054843224585056305, -0.00419801939278841, 0.04298445209860802, -0.03198603540658951, 0.013540701009333134, -0.0555662102997303, 0.005754847079515457, -0.021257633343338966, -0.009540597908198833, 0.0015551876276731491, -0.02078896574676037, 0.007465672213584185, 0.041092485189437866, 0.019076114520430565, 0.023313701152801514, 0.006626098416745663, 0.025876125320792198, 0.016862479969859123, -0.0012442806037142873, -0.05164926499128342, 0.007494274992495775, -0.03322887420654297, -0.06454070657491684, 0.014239409007132053, 0.03231387212872505, 0.006643977016210556, -0.005887122359126806, -0.032208655029535294, 0.02256525680422783, -0.045734815299510956, 0.021893339231610298, -0.02517680637538433, -0.005236813798546791, 0.03271033614873886, 0.0014758259057998657, 0.03580963984131813, 0.0012780469842255116, -0.035208676010370255, -0.012491383589804173, 0.023564554750919342, -0.03140834718942642, 0.024873411282896996, 0.0015372391790151596, -0.016528688371181488, 0.03281218558549881, 0.037872668355703354, 0.008409745991230011, 0.013937177136540413, -0.009464971721172333, 0.007781894877552986, -0.007739211432635784, 0.016496427357196808, 0.026604747399687767, 0.06808523833751678, -0.019307753071188927, -0.018990755081176758, -0.036922384053468704, -0.03936147689819336, -0.021694926545023918, -0.016911830753087997, -0.00550197996199131, -0.03055364452302456, -0.004699889104813337, -0.07030317932367325, 0.024814413860440254, 0.0268381480127573, 0.017389856278896332, 0.00434153201058507, -0.02489524707198143, -0.00540740042924881, -0.025351010262966156, 0.020686326548457146, 0.03875293582677841, -0.029376504942774773, -0.024210432544350624, -0.010253721848130226, 0.019030677154660225, -0.009461003355681896, 0.04913846030831337, -0.030370496213436127, -0.004903929773718119, -0.013080204837024212, -0.008466561324894428, -0.003805947955697775, -0.03212655335664749, -0.009656398557126522, -0.007215188816189766, -0.0030684289522469044, 0.04216623306274414, 0.01533189881592989, 0.011550729162991047, -0.026802221313118935, -0.0022987944539636374, 0.03290494158864021, 0.003719835076481104, 0.02853158488869667, 0.021531319245696068, 0.018786227330565453, 0.02370748110115528, -0.04930442199110985, 0.016667108982801437, 0.005301390774548054, -0.02882961370050907, -0.040836166590452194, -0.06844593584537506, 0.020099040120840073, -0.007340945303440094, 0.06180529296398163, -0.008603674359619617, -0.0072225546464324, -0.03902889043092728, -0.008967828936874866, -0.03526192530989647, 0.007597168441861868, 0.02400866709649563, -0.010015632957220078, -0.003158362815156579, 0.05531424656510353, 0.013699868693947792, 0.029948793351650238, -0.021752525120973587, -0.015423167496919632, 0.03164856135845184, -0.05292181298136711, -0.05240136384963989, 0.006232523359358311, -0.056079279631376266, 0.0017058199737221003, 0.02366672456264496, 0.005661359988152981, -0.044938500970602036, 0.05813504382967949, 0.056940317153930664, 0.043148472905159, 0.07599891722202301, -0.0006983401835896075, 0.011652562767267227, -0.0023170290514826775, -0.032408468425273895, -0.09590642154216766, 0.02145821787416935, 0.04286094382405281, 0.012642900459468365, -0.021909045055508614, -0.007665073499083519, 0.007249064277857542, -0.007637901697307825, -0.06622150540351868, -0.043226562440395355, 0.04695400595664978, 0.00013567408313974738, 0.03205861523747444, 0.00763989333063364, -0.04208377003669739, 0.03760208934545517, 0.04898139461874962, -0.051606930792331696, -0.03491821512579918, -0.02492302469909191, 0.08304587751626968, -0.02156217023730278, 0.031022660434246063, -0.04321620240807533, -0.012018284760415554, 0.07847481220960617, 0.011099567636847496, 0.01859450340270996, 0.05280331149697304, -0.027408402413129807, 0.03011735901236534, 0.03998921066522598, -0.014486710540950298, -0.014184125699102879, 0.01896144449710846, 0.002575341612100601, -0.05331544205546379, 0.01263065543025732, 0.015390013344585896, -0.01618841476738453, -0.019343877211213112, 0.07426756620407104, -0.004078519530594349, -0.022821277379989624, -0.02225365675985813, 0.003077214118093252, -0.013958433642983437, -0.00872885063290596, -0.0306746494024992, 0.002107572741806507, -0.037841662764549255, 0.05166514590382576, -0.007208768278360367, 0.027357494458556175, 0.07704174518585205, -0.01953781396150589, 0.012473500333726406, 0.020749345421791077, 0.07277815043926239, 0.05990808457136154, 0.013747956603765488, 0.014794724993407726, 0.07624708116054535, 0.010188918560743332, -0.03358076512813568, -0.001090537873096764, -0.03718443214893341, -0.005659035872668028, -0.009249312803149223, 0.0031761229038238525, 0.08972639590501785, -0.0074320086278021336, 0.05834454298019409, -0.014215524308383465, -0.0119614377617836, -0.04437891021370888, 0.012007891200482845, 0.0547541119158268, -0.007697971537709236, 0.010195068083703518, 0.03527807071805, -0.03376714885234833, -0.016402309760451317, 0.07421491295099258, -0.0038371721748262644, -0.015450171194970608, 0.04227666184306145, -0.02342846803367138, 0.004991205874830484, 0.017208196222782135, 0.04961009696125984, 0.049049340188503265, -0.029522040858864784, -0.024478618055582047, 0.004559480585157871, 0.02141556702554226, -0.010316355153918266, 0.020933322608470917, 0.0009327881853096187, -0.003830868285149336, -0.005323193967342377, -0.04947575554251671, 0.006743757054209709, -0.011564117856323719, -0.07110295444726944, 0.047479961067438126, -0.018803071230649948, 0.005684971809387207, 0.003679142566397786, -0.06522639840841293, -0.036731090396642685, -0.03130996599793434, -0.02987116388976574, -0.014632650651037693, -0.08928349614143372, 0.006537033244967461, 0.029833462089300156, -0.031319648027420044, -0.018206970766186714, -0.015679022297263145, 0.012317989952862263, -0.005914885550737381, -0.014656927436590195, -0.026544995605945587, -0.03306816518306732, 0.01945425756275654, 0.010026117786765099, -0.02531336434185505, 0.031323760747909546, 0.048960261046886444, -0.011554020456969738, -0.024604173377156258, -0.02028501220047474, 0.0008314051665365696, 0.034681111574172974, 0.010340427048504353, -0.0035606143064796925, -0.06791108101606369, -0.0026432902086526155, 0.04192467778921127, -0.016863763332366943, -0.06527505815029144, 0.029107294976711273, 0.060813721269369125, 0.01432904601097107, 0.019104667007923126, -0.01900244876742363, -0.018822338432073593, -0.014517572708427906, -0.0028631524182856083, 0.017168093472719193, 0.014720719307661057, 0.027121691033244133, -0.025597382336854935, 0.06214718148112297, 0.06532268971204758, -0.024556877091526985, -0.005335768219083548, -0.03172808513045311, 0.013818159699440002, 0.0005666210199706256, -0.03263325244188309, -0.04989397153258324, -0.08663439005613327, -0.062404338270425797, -0.01929270103573799, -0.006203688681125641, -0.030221816152334213, -0.022040000185370445, 0.04359512776136398, 0.01849115826189518, -0.007315440569072962, 0.02241317182779312, -0.0509454719722271, 0.0010014008730649948, -0.01916773058474064, -0.018992627039551735, -0.05073700100183487, 0.017352275550365448, -0.004491953644901514, -0.008776468224823475, 0.0013058965560048819, -0.04961626976728439, -0.02294137515127659, -0.014517176896333694, 0.0373951718211174, 0.030490729957818985, 0.030574943870306015, 0.022483685985207558 ]
[ -0.04486817494034767, -0.022916188463568687, -0.01519683189690113, -0.009579877369105816, 0.04837777465581894, -0.13413195312023163, -0.028588278219103813, 0.01335653755813837, -0.0029513577464967966, 0.00031303177820518613, 0.02098463848233223, -0.046179018914699554, 0.02772326022386551, 0.012357519008219242, 0.008813931606709957, -0.021801358088850975, -0.08138996362686157, -0.08391710370779037, -0.008772624656558037, 0.03797619044780731, -0.007005949039012194, 0.010546103119850159, 0.014490276575088501, -0.028759310021996498, 0.04334303364157677, 0.049294136464595795, 0.03506521135568619, -0.05253611132502556, -0.042231976985931396, -0.1886148601770401, 0.007685360033065081, -0.01106750126928091, -0.015952153131365776, -0.006973814684897661, 0.015728726983070374, 0.015609151683747768, 0.023844992741942406, -0.0013336320407688618, 0.0070411441847682, 0.057576727122068405, 0.010051030665636063, -0.004730056971311569, -0.08787764608860016, -0.00034191261511296034, -0.005164265166968107, -0.006589904893189669, -0.05024394765496254, 0.024472156539559364, -0.03391565755009651, 0.03212328627705574, -0.01902865059673786, 0.04027673602104187, -0.01647988334298134, 0.0003788820467889309, 0.021805312484502792, 0.04327221214771271, 0.05466479808092117, 0.07276573777198792, 0.013320607133209705, -0.025939902290701866, -0.0005595047841779888, -0.017561838030815125, -0.14138200879096985, 0.09705132246017456, -0.00395855400711298, -0.011821760796010494, -0.0365448035299778, 0.02015734650194645, -0.042050689458847046, 0.025053348392248154, -0.039171744138002396, -0.008079972118139267, -0.024738367646932602, 0.06616141647100449, 0.007751839235424995, 0.009181364439427853, 0.01703302189707756, -0.025478601455688477, 0.06117934733629227, -0.019092559814453125, 0.018810370936989784, 0.031967807561159134, -0.010153144598007202, -0.0008888571755960584, 0.023650966584682465, -0.010529418475925922, -0.01778297685086727, 0.053396183997392654, 0.00400888454169035, 0.043042175471782684, -0.015624405816197395, -0.030094534158706665, 0.040558479726314545, 0.03783648833632469, -0.0619736947119236, -0.011043782345950603, 0.044664181768894196, 0.04961031675338745, -0.0039029542822390795, 0.3849100172519684, -0.015425430610775948, 0.039006177335977554, -0.02415650524199009, 0.07884864509105682, -0.018627973273396492, -0.03121771849691868, -0.002369672292843461, -0.07176477462053299, 0.01189824752509594, -0.03761666268110275, -0.017819881439208984, -0.020765315741300583, 0.0697745829820633, -0.13881690800189972, 0.034559302031993866, 0.011816837824881077, 0.039644740521907806, 0.010984761640429497, -0.034685879945755005, 0.0351603664457798, 0.0007243133150041103, 0.013580375351011753, 0.0520227774977684, 0.042755041271448135, 0.027427563443779945, 0.05526342988014221, 0.01101232971996069, 0.04531465470790863, 0.02934960648417473, 0.030538152903318405, 0.038642264902591705, -0.03101203776896, -0.0631786361336708, 0.037364792078733444, 0.014311064966022968, 0.022251201793551445, -0.023392328992486, -0.01896326243877411, 0.010277245193719864, -0.05368393659591675, -0.04496436566114426, -0.09791689366102219, 0.00440370524302125, 0.03908653184771538, -0.03636479377746582, 0.12761105597019196, -0.008184096775949001, -0.0208617951720953, -0.03609319403767586, -0.0016547207487747073, -0.029866406694054604, 0.0190367940813303, -0.0052414340898394585, -0.04269511252641678, 0.0027448530308902264, -0.011529608629643917, 0.08881916850805283, -0.003867798252031207, -0.0556950606405735, -0.013228187337517738, -0.05386168137192726, -0.024944720789790154, -0.0003812817158177495, 0.0636853352189064, 0.03650173544883728, -0.128390833735466, -0.029629571363329887, 0.013068100437521935, -0.013637046329677105, -0.11165723949670792, 0.028567662462592125, -0.011428763158619404, -0.02791799046099186, -0.04511633142828941, 0.0849902406334877, 0.004380850121378899, 0.018645543605089188, -0.041550200432538986, 0.05973607674241066, 0.020156677812337875, -0.01656544953584671, -0.006107746157795191, -0.0389116071164608, -0.00291759567335248, -0.035565223544836044, -0.04619789123535156, -0.04765527695417404, -0.0065827276557683945, 0.02201966382563114, -0.0345928780734539, 0.02430354803800583, -0.04664519429206848, -0.07189022749662399, 0.027468033134937286, -0.04124288633465767, -0.03833382949233055, -0.012545478530228138, 0.047015029937028885, 0.05073431134223938, -0.051505688577890396, 0.02472778968513012, -0.02739604189991951, 0.006614506244659424, 0.020323345437645912, -0.0034274847712367773, -0.022975046187639236, 0.08221612125635147, -0.056231070309877396, 0.014409294351935387, 0.03824177384376526, -0.026486406102776527, -0.0016519965138286352, -0.004501365125179291, -0.02519858628511429, -0.007328257896006107, -0.02071259915828705, 0.009942591190338135, -0.04365696385502815, 0.010233018547296524, 0.05164916813373566, -0.0808400958776474, -0.031137239187955856, -0.007997183129191399, -0.31324225664138794, 0.0099356509745121, 0.024284178391098976, 0.006455610506236553, 0.057211510837078094, -0.022349216043949127, -0.04143540933728218, -0.04399190843105316, 0.03731784597039223, 0.04802561178803444, 0.0729576051235199, -0.00941241905093193, 0.003617939306423068, -0.09358014166355133, 0.023264531046152115, 0.022709256038069725, 0.013223318383097649, 0.0004798981244675815, -0.0012976180296391249, -0.013200068846344948, -0.02445789985358715, -0.08188167959451675, -0.08088487386703491, -0.02615363337099552, 0.0310503002256155, -0.013848685659468174, 0.10478442907333374, 0.010218776762485504, 0.02193916030228138, -0.024029910564422607, 0.057784758508205414, 0.004119733348488808, 0.005152235738933086, -0.0884585753083229, 0.00835492368787527, -0.04124895855784416, 0.040975477546453476, 0.05151306837797165, 0.04426879063248634, -0.004133343230932951, -0.0009128651581704617, 0.006532483734190464, -0.004669055342674255, -0.02261633239686489, 0.021807577461004257, 0.019139274954795837, -0.0009295060881413519, 0.022043513134121895, 0.025027558207511902, 0.06067957729101181, 0.01574254035949707, 0.02425611950457096, -0.0006040987209416926, 0.02022499032318592, -0.014490507543087006, -0.035988468676805496, -0.05996154621243477, -0.001264444668777287, 0.023822039365768433, -0.0026622391305863857, 0.010411564260721207, 0.02034013904631138, 0.06039213761687279, -0.04743194207549095, -0.021746544167399406, 0.020417379215359688, -0.004338122438639402, -0.03385382518172264, -0.029262738302350044, -0.0004786747449543327, -0.005426832940429449, 0.11061958968639374, -0.0534006766974926, 0.048142608255147934, 0.05555875971913338, 0.026415660977363586, -0.021592725068330765, 0.042472854256629944, 0.08033312112092972, 0.007439423352479935, -0.0034789673518389463, -0.004721097648143768, 0.12034754455089569, 0.0323619544506073, 0.02438688464462757, 0.006829663645476103, -0.004339635372161865, 0.02626596949994564, 0.03789230063557625, 0.003031837521120906, -0.015112031251192093, -0.03814353048801422, -0.02023923210799694, -0.0027027190662920475, 0.05767100304365158, -0.03163035959005356, -0.2525075376033783, 0.052466701716184616, 0.03355609253048897, 0.017929788678884506, 0.008914991281926632, -0.030703485012054443, -0.01054738461971283, -0.03667009249329567, -0.040555816143751144, -0.01151875127106905, 0.004954798612743616, 0.04246904328465462, 0.010499101132154465, 0.002606492256745696, -0.0026334032882004976, 0.02428376115858555, 0.002792561426758766, 0.03932683914899826, -0.007072615437209606, -0.004811813123524189, 0.06731526553630829, -0.01876451075077057, 0.16823621094226837, 0.047860272228717804, 0.00302715552970767, 0.03888807073235512, -0.023334626108407974, -0.0011672131950035691, 0.08183728158473969, 0.00726480083540082, -0.03465264290571213, 0.023068632930517197, 0.060203637927770615, 0.04285908490419388, -0.0050612036138772964, -0.08494047075510025, -0.030931230634450912, 0.019389459863305092, 0.01715730130672455, -0.015316802076995373, -0.05567978695034981, 0.036437198519706726, -0.04147286340594292, 0.025119569152593613, 0.05520037189126015, -0.060083433985710144, -0.027040498331189156, -0.049378715455532074, -0.0394829586148262, 0.010520393028855324, -0.041085172444581985, -0.02519582211971283, -0.04522642120718956, 0.0028292492497712374, -0.025963900610804558, 0.08736345916986465, 0.03642534092068672, -0.01938963495194912, 0.04218822345137596, 0.02868014946579933, 0.005891131702810526, -0.023588603362441063, 0.09570862352848053, -0.008885637857019901, 0.014243078418076038 ]
[ 0.04456106573343277, 0.0647502988576889, -0.03508405387401581, 0.048516079783439636, -0.010582765564322472, 0.007821043953299522, -0.035660065710544586, 0.04006361588835716, -0.004989103879779577, -0.0709027498960495, -0.03528374060988426, 0.012056334875524044, 0.00883595272898674, -0.022298024967312813, 0.00928518082946539, -0.029667887836694717, 0.0049750967882573605, -0.0030912349466234446, 0.07126535475254059, -0.04434013366699219, -0.03837902098894119, 0.02510981261730194, 0.011760451830923557, 0.0451388917863369, -0.006772540044039488, -0.003884857753291726, -0.06059345230460167, -0.0030488581396639347, 0.0036358493380248547, -0.10616043955087662, -0.026994435116648674, 0.007051261141896248, -0.010036664083600044, -0.026135597378015518, 0.041625458747148514, 0.029217135161161423, 0.012427625246345997, -0.011158086359500885, -0.01071142964065075, -0.006473408080637455, 0.029828151687979698, -0.020602945238351822, -0.008324330672621727, 0.004977620206773281, -0.037332113832235336, 0.03020564839243889, 0.06664939224720001, 0.020127438008785248, -0.0668715238571167, -0.01209109928458929, -0.03976660594344139, 0.012107954360544682, -0.025523249059915543, 0.009209444746375084, 0.010639077052474022, 0.03488130867481232, -0.011654354631900787, 0.00017205491894856095, 0.02636122517287731, -0.061882950365543365, -0.03428011015057564, 0.008040997199714184, -0.04053819552063942, -0.02300434559583664, 0.006509257480502129, -0.016311749815940857, -0.01568945311009884, -0.006457030773162842, 0.02168029546737671, 0.010065475478768349, -0.023018406704068184, 0.0338788703083992, -0.03074960596859455, 0.025738436728715897, -0.0431387722492218, 0.007388038095086813, 0.027407098561525345, -0.03786538913846016, -0.011446032673120499, 0.02021150477230549, 0.009896465577185154, 0.008812353946268559, 0.0003097866429015994, 0.015371344983577728, 0.023448431864380836, -0.0375557467341423, -0.02768615633249283, 0.050257451832294464, -0.0000038278967622318305, -0.01828181929886341, 0.0019558246713131666, 0.0032650164794176817, -0.014376316219568253, 0.011239387094974518, -0.08075029402971268, -0.02195642702281475, 0.010141342878341675, 0.008058379404246807, 0.006998973898589611, 0.7901250720024109, 0.000831728451885283, 0.0071654487401247025, -0.02588103897869587, 0.05800354853272438, 0.02719639427959919, 0.0130759971216321, 0.0003967728989664465, -0.03553580865263939, 0.010206657461822033, -0.011453812941908836, 0.004243583418428898, 0.002737171482294798, 0.013377037830650806, -0.019819309934973717, 0.0711536705493927, 0.040364254266023636, 0.0008848755387589335, 0.011893006041646004, -0.001428559422492981, 0.008712868206202984, 0.006512475665658712, 0.019312871620059013, 0.01658071205019951, -0.01872716285288334, 0.015718620270490646, -0.11531580984592438, 0.04171182960271835, -6.538317780412435e-33, 0.01589445397257805, 0.013377117924392223, 0.04386996105313301, -0.01866944320499897, 0.049799758940935135, 0.019974248483777046, 0.007075577974319458, -0.025938164442777634, 0.05018245056271553, -0.029410667717456818, -0.009416692890226841, -0.0490405336022377, -0.0032560599502176046, -0.05870554596185684, 0.04247431457042694, -0.006685867439955473, -0.008033172227442265, 0.05781524255871773, 0.04639638215303421, 0.021093223243951797, 0.02245369739830494, 0.009239383973181248, -0.002016618847846985, 0.02816305123269558, 0.004369738511741161, 0.018805580213665962, 0.01544773019850254, -0.01080487109720707, -0.00399821950122714, -0.047070808708667755, -0.032532479614019394, 0.036298204213380814, -0.022105423733592033, -0.011182288639247417, 0.09389049559831619, -0.058359723538160324, -0.06867829710245132, -0.0013378891162574291, -0.025172922760248184, -0.0203817430883646, -0.048477474600076675, -0.01743357442319393, -0.0201921034604311, -0.036417338997125626, -0.003918533679097891, -0.0013494276208803058, -0.007577506825327873, 0.027053555473685265, 0.004306316375732422, 0.03990386798977852, 0.01208619773387909, 0.01672654040157795, -0.0005023195408284664, -0.03884721174836159, -0.03797087073326111, 0.008053743280470371, 0.010862900875508785, -0.0038481936790049076, 0.03437158465385437, -0.021815722808241844, 0.03873816132545471, -0.017419954761862755, 0.01738627813756466, -0.016534077003598213, 0.03999952971935272, -0.0021512580569833517, 0.028728902339935303, 0.04390609636902809, 0.034225258976221085, 0.04261066019535065, -0.039795875549316406, 0.001734839635901153, -0.02183523215353489, -0.008783556520938873, 0.02370305545628071, -0.04005131497979164, 0.036806195974349976, -0.0035734286066144705, 0.08123072981834412, 0.029067672789096832, 0.02156219817698002, -0.038064319640398026, 0.005593760870397091, -0.06092642620205879, -0.0058377753011882305, -0.018072649836540222, 0.040393486618995667, 0.030585546046495438, 0.013555372133851051, 0.025917883962392807, 0.016608083620667458, -0.04237237200140953, -0.012635843828320503, -0.003732313634827733, -0.014061474241316319, 6.68571448642998e-33, 0.016871090978384018, -0.025120392441749573, -0.021613627672195435, 0.03994424641132355, 0.002008192241191864, -0.04012667387723923, -0.011203055270016193, 0.04151250422000885, -0.01610046997666359, 0.05613816902041435, 0.031503718346357346, -0.04826435074210167, -0.028085563331842422, 0.037542495876550674, 0.058968015015125275, 0.020793937146663666, 0.008316366001963615, -0.016018012538552284, -0.008280155248939991, -0.007470125798135996, -0.044044479727745056, -0.0011008785804733634, -0.042955175042152405, 0.024922486394643784, 0.04961704462766647, 0.01999610848724842, 0.031449027359485626, -0.011492906138300896, 0.021401245146989822, 0.0161387100815773, -0.014068330638110638, -0.016944190487265587, -0.0036889559123665094, -0.012051605619490147, -0.03094172105193138, 0.0427253395318985, -0.00148458790499717, -0.01725994236767292, 0.056628018617630005, -0.030642053112387657, 0.051628228276968, 0.0457068607211113, -0.025588354095816612, 0.022132331505417824, -0.019582323729991913, 0.07851836085319519, -0.02087167277932167, 0.04666466638445854, 0.008988986723124981, 0.011362702585756779, -0.008627683855593204, 0.014448661357164383, -0.00034387229243293405, -0.017185714095830917, 0.014171569608151913, -0.04043702408671379, 0.017909247428178787, -0.0007333516841754317, -0.07290784269571304, -0.026868125423789024, -0.07238175719976425, -0.017484603449702263, -0.022584883496165276, 0.0044562784023582935, -0.030878063291311264, -0.07729365676641464, -0.029301462695002556, -0.016416558995842934, 0.016402268782258034, -0.031145375221967697, 0.0272700022906065, -0.0499153733253479, -0.03794935345649719, 0.04263855889439583, -0.0034363868180662394, -0.015013065189123154, -0.005620911717414856, 0.05607052147388458, -0.041374389082193375, 0.001987073104828596, 0.009793869219720364, 0.023021694272756577, 0.043959952890872955, 0.0073171923868358135, -0.02308524213731289, 0.020705921575427055, -0.03883012384176254, 0.02001151256263256, 0.024015013128519058, -0.01086004264652729, -0.01051054336130619, 0.020972460508346558, -0.03697596490383148, 0.026615053415298462, 0.013930751010775566, -1.221758161307207e-8, -0.01779118925333023, 0.011312448419630527, -0.01413269154727459, 0.019269922748208046, -0.003628823207691312, 0.005867956671863794, -0.0405091717839241, -0.020322160795331, 0.02250710129737854, 0.029329581186175346, 0.05863348767161369, -0.042516227811574936, 0.02002064511179924, -0.02928377315402031, -0.032103005796670914, 0.014113727025687695, -0.0532979778945446, -0.032533444464206696, 0.021441150456666946, -0.010009877383708954, 0.018999453634023666, 0.012750620022416115, 0.026642978191375732, -0.022232750430703163, 0.007593220099806786, 0.032389264553785324, 0.014241640456020832, -0.03766041621565819, 0.0128935556858778, -0.028650661930441856, 0.03740319237112999, -0.045136477798223495, -0.030271319672465324, -0.02714458294212818, -0.04494272172451019, -0.048062484711408615, -0.005263856146484613, -0.01938025839626789, -0.011043746024370193, 0.03848898410797119, 0.005529793910682201, -0.0022353187669068575, -0.01787579618394375, -0.02794072963297367, -0.06251046061515808, 0.0012417471734806895, -0.05905735865235329, -0.004744909703731537, -0.0029770382679998875, 0.0017410691361874342, 0.00402609771117568, 0.006656205747276545, 0.02102607861161232, 0.028128931298851967, 0.06644359230995178, 0.01504374947398901, 0.01853945478796959, -0.02877642959356308, -0.03437935560941696, -0.04047928377985954, 0.011987781152129173, 0.022240998223423958, -0.019577614963054657, -0.022680068388581276 ]
python-transforming-twitter-datetime-string-to-timestamp-z-is-a-bad-directive-in-format
https://markhneedham.com/blog/2015/03/15/python-transforming-twitter-datetime-string-to-timestamp-z-is-a-bad-directive-in-format
false
2015-03-14 02:52:02
Python: Checking any value in a list exists in a line of text
[ "python" ]
[ "Python" ]
I've been doing some log file analysis to see what cypher queries were being run on a Neo4j instance and I wanted to narrow down the lines I looked at to only contain ones which had mutating operations i.e. those containing the words MERGE, DELETE, SET or CREATE Here's an example of the text file I was parsing: [source,bash] ---- $ cat blog.txt MATCH n RETURN n MERGE (n:Person {name: "Mark"}) RETURN n MATCH (n:Person {name: "Mark"}) ON MATCH SET n.counter = 1 RETURN n ---- So I only want lines 2 & 3 to be returned as the first one only returns data and doesn't execute any updates on the graph. I started off with a very crude way of doing this; [source,python] ---- with open("blog.txt", "r") as ins: for line in ins: if "MERGE" in line or "DELETE" in line or "SET" in line or "CREATE" in line: print line.strip() ---- A better way of doing this is to use the +++<cite>+++https://docs.python.org/2/library/functions.html#any[any]+++</cite>+++ command and make sure at least one of the words exists in the line: [source,python] ---- mutating_commands = ["SET", "DELETE", "MERGE", "CREATE"] with open("blog.txt", "r") as ins: for line in ins: if any(command in line for command in mutating_commands): print line.strip() ---- I thought I might be able to simplify the code even further by using https://docs.python.org/2/library/itertools.html[itertools] but my best attempt so far is less legible than the above: [source,python] ---- import itertools commands = ["SET", "CREATE", "MERGE", "DELETE"] with open("blog.txt", "r") as ins: for line in ins: if len(list(itertools.ifilter(lambda x: x in line, mutating_commands))) > 0: print line.strip() ---- I think I'll go with the 2nd approach for now but if I'm doing something wrong with itertools and it's much easier to use than the example I've shown do correct me!
null
null
[ 0.007062104530632496, -0.009706827811896801, -0.026115458458662033, 0.035040490329265594, 0.11283746361732483, 0.020602848380804062, 0.02008584886789322, 0.02666233479976654, 0.010038499720394611, -0.020113857463002205, -0.01264504250138998, 0.014838575385510921, -0.09414400160312653, 0.010105360299348831, -0.01416692789644003, 0.06570511311292648, 0.0664556473493576, -0.0010205538710579276, 0.019340291619300842, -0.01686566136777401, -0.01574457809329033, 0.059112563729286194, -0.007099450565874577, 0.01952073536813259, 0.013069186359643936, 0.0034018587321043015, -0.00004242696377332322, -0.025450756773352623, -0.038849975913763046, 0.015287205576896667, 0.05324088782072067, -0.01207098737359047, 0.03624585643410683, -0.02351468801498413, 0.029063228517770767, -0.007615957874804735, -0.05841251090168953, -0.0017129017505794764, -0.005593844223767519, 0.007743334397673607, -0.03760792315006256, 0.018809953704476357, -0.029912324622273445, 0.006782620679587126, -0.05601917579770088, 0.0016547212144359946, -0.059798333793878555, 0.05391831323504448, 0.007586733903735876, 0.023691600188612938, -0.060293570160865784, 0.01445167325437069, -0.023685216903686523, -0.0381932333111763, -0.0022586872801184654, 0.08269757777452469, 0.013299679383635521, -0.058755770325660706, 0.05048498511314392, -0.015595227479934692, -0.01342296227812767, -0.032814159989356995, -0.0197332464158535, 0.03704315051436424, 0.0028887176886200905, -0.04851754009723663, -0.010977542959153652, 0.04164578765630722, -0.05601447448134422, -0.03374888747930527, -0.00573581550270319, 0.05306331813335419, -0.03538570925593376, 0.0018570563988760114, 0.014906682074069977, -0.016766738146543503, 0.00043228536378592253, 0.05586224049329758, 0.02481525018811226, 0.06077590957283974, -0.017038119956851006, 0.02667292393743992, 0.007055994588881731, 0.01198041345924139, 0.0017505954019725323, -0.019326694309711456, -0.0507768839597702, -0.0005820227670483291, -0.048705291002988815, 0.012248150072991848, 0.016278903931379318, -0.06968986988067627, -0.00817323848605156, 0.002990076085552573, -0.004167657345533371, 0.025300443172454834, -0.0126613425090909, 0.005587142426520586, 0.022377900779247284, -0.020827217027544975, -0.05095556378364563, -0.004094278439879417, 0.004726774990558624, -0.006708503235131502, -0.08671528100967407, -0.027964865788817406, -0.029965512454509735, -0.01816786266863346, 0.015629786998033524, -0.03192894905805588, -0.05883009359240532, -0.0053475601598620415, -0.008142543025314808, 0.01210829708725214, -0.10309015959501266, 0.06456884741783142, 0.014189268462359905, -0.0004486617399379611, -0.0048512681387364864, 0.02267184853553772, 0.016815081238746643, 0.013373023830354214, 0.009238543920218945, 0.08620861917734146, 0.006481749005615711, 0.047120630741119385, 0.027921918779611588, 0.04511142894625664, -0.03187647834420204, -0.08944906294345856, -0.01645914651453495, 0.048673633486032486, -0.02388625405728817, -0.00017557429964654148, -0.014808829873800278, -0.015150920487940311, -0.022697120904922485, 0.0099052544683218, 0.047829605638980865, 0.006760249380022287, 0.02168121188879013, -0.024190375581383705, 0.006558078806847334, -0.003770285053178668, 0.03682730346918106, 0.00677533121779561, -0.055707864463329315, -0.02617684379220009, 0.015398315154016018, -0.007630936335772276, 0.025487834587693214, 0.026671022176742554, 0.0713474452495575, -0.012900300323963165, 0.02200750820338726, 0.12522399425506592, 0.015701450407505035, 0.04908987507224083, -0.009091202169656754, 0.013351399451494217, 0.05011049285531044, 0.044619545340538025, 0.0019008676754310727, 0.030931590124964714, 0.01625879481434822, -0.018435044214129448, -0.028861718252301216, 0.030745012685656548, -0.028120901435613632, 0.008376630023121834, -0.034619782119989395, -0.045783769339323044, 0.05617727339267731, -0.03419436141848564, 0.029360424727201462, 0.014376991428434849, 0.036856759339571, 0.03018280863761902, 0.03716360777616501, -0.012424895539879799, -0.06336366385221481, 0.06941749900579453, -0.0021705266553908587, 0.01118403673171997, -0.006009319331496954, 0.00006438555283239111, 0.07824350148439407, 0.03163336217403412, 0.040480319410562515, 0.001266012666746974, -0.08761154860258102, -0.09298383444547653, 0.008693676441907883, -0.016305238008499146, 0.0719715803861618, -0.03877636045217514, 0.0005728956894017756, 0.042744386941194534, 0.004444929305464029, 0.02513737790286541, 0.017368841916322708, -0.011609965935349464, 0.02833831124007702, -0.06475591659545898, -0.048596903681755066, 0.023960553109645844, -0.006191424559801817, -0.07161690294742584, -0.04306044057011604, 0.021673457697033882, -0.012070635333657265, 0.0259398240596056, 0.034533336758613586, -0.035053472965955734, 0.06098417937755585, 0.058359045535326004, 0.0008387810084968805, -0.026797743514180183, 0.040806688368320465, -0.042019322514534, 0.012356872670352459, -0.02498498000204563, -0.03520997613668442, 0.00001810530011425726, 0.018049025908112526, 0.12066876888275146, 0.05555472895503044, -0.028857292607426643, -0.053432758897542953, 0.01661805622279644, -0.025948354974389076, -0.024775177240371704, 0.008759420365095139, 0.00541168125346303, -0.012797740288078785, 0.006619160063564777, -0.028019433841109276, 0.01724245585501194, 0.008253093808889389, -0.017371656373143196, -0.01467707846313715, 0.05139729753136635, -0.016577420756220818, 0.05665937438607216, 0.029975561425089836, 0.009200388565659523, -0.027676349505782127, -0.04513463377952576, -0.043413322418928146, 0.02012692391872406, 0.03634293004870415, -0.009741974994540215, 0.05763046815991402, -0.051994338631629944, -0.0232414361089468, -0.022659894078969955, -0.05599324405193329, 0.03173208236694336, 0.047770991921424866, 0.02753489278256893, -0.032897915691137314, 0.02516537718474865, -0.020344674587249756, -0.0065727634355425835, -0.010954943485558033, -0.048316601663827896, -0.06992735713720322, -0.0016129041323438287, -0.004588491283357143, 0.014201936312019825, 0.012203523889183998, 0.031280480325222015, -0.00036463464493863285, -0.008635233156383038, -0.000884097651578486, -0.02118196152150631, 0.02784821391105652, 0.010385247878730297, -0.020060673356056213, -0.03231682628393173, -0.0301072858273983, 0.03360285982489586, -0.06251178681850433, -0.03550674766302109, -0.024056440219283104, -0.03894750028848648, 0.024369483813643456, -0.052016422152519226, -0.035851508378982544, -0.0064056385308504105, 0.010861552320420742, 0.04685421288013458, -0.028865206986665726, 0.008711601607501507, 0.06830401718616486, 0.011376292444765568, 0.009857178665697575, 0.017278406769037247, 0.006349810864776373, 0.03859151899814606, 0.03206998109817505, 0.047349996864795685, 0.028248965740203857, -0.01652650348842144, -0.03075459785759449, -0.024137252941727638, -0.005009944550693035, -0.015212982892990112, -0.2721613943576813, 0.05768764019012451, -0.018346287310123444, -0.032048847526311874, 0.009967309422791004, -0.044207435101270676, 0.009840535931289196, -0.03665611892938614, -0.023276379331946373, 0.015188056044280529, -0.016430208459496498, -0.027863966301083565, -0.012257962487637997, 0.05927825719118118, 0.001072168117389083, 0.020327236503362656, -0.01776667684316635, -0.04036569595336914, 0.006897647399455309, 0.06077053025364876, 0.017154425382614136, -0.028461582958698273, 0.018175626173615456, 0.01072174683213234, 0.011195829138159752, 0.02900422178208828, -0.07155020534992218, 0.025543324649333954, -0.06305870413780212, -0.03369755670428276, -0.001587432692758739, 0.01609995774924755, 0.010051446966826916, -0.003751570824533701, -0.027486035600304604, 0.0011325795203447342, 0.056644752621650696, 0.028100209310650826, 0.00002382014827162493, 0.0557752400636673, -0.03778308257460594, -0.05307086929678917, -0.02263575606048107, -0.0469326451420784, 0.059814516454935074, -0.009178719483315945, -0.05596727505326271, -0.04020611569285393, -0.002585973124951124, 0.08404560387134552, -0.009875288233160973, -0.028595879673957825, 0.004296629223972559, 0.04192918911576271, 0.009553040377795696, 0.004200989380478859, -0.013784581795334816, -0.01593288779258728, -0.025885771960020065, -0.0234976876527071, -0.028297124430537224, -0.05248990282416344, 0.008940878324210644, -0.045232195407152176, -0.020134225487709045, -0.03787974640727043, -0.0784015953540802, -0.07098734378814697, 0.050202690064907074, 0.031684305518865585, -0.041231442242860794, 0.04545034095644951, -0.007324873004108667, -0.09591729938983917, -0.06469164788722992, -0.0381094329059124, -0.019690407440066338, -0.00870688259601593, -0.001587845734320581, 0.03213300183415413, -0.07588856667280197, -0.028516860678792, 0.01474794652312994, 0.019971948117017746, 0.010183682665228844, -0.032855186611413956, 0.006946067325770855, -0.04952556639909744, -0.029895788058638573, -0.032325055450201035, 0.041874900460243225, -0.017501674592494965, -0.019687224179506302, 0.02306397631764412, 0.004843544214963913, 0.036134425550699234, 0.016334526240825653, 0.0292510949075222, 0.006069768685847521, 0.04651166498661041, 0.05899660661816597, -0.03498590737581253, 0.039320603013038635, -0.03556976094841957, -0.01575920730829239, -0.01655924879014492, -0.040392711758613586, -0.00017941187252290547, 0.014731166884303093, 0.02765878103673458, -0.012892537750303745, -0.022220639511942863, 0.027676604688167572, -0.039892055094242096, -0.03163526579737663, -0.020615095272660255, 0.023159347474575043, 0.013507124967873096, 0.03479618951678276, -0.026638910174369812, -0.05716196447610855, 0.028600076213479042, 0.011913138441741467, -0.014371207915246487, -0.039406247437000275, -0.08545321226119995, 0.0038402199279516935, -0.0017693128902465105, 0.007284929044544697, 0.023292522877454758, -0.034826599061489105, 0.02758072130382061, 0.023277195170521736, -0.04207215830683708, 0.03648610785603523, -0.03333860635757446, -0.014971363358199596, -0.0242808498442173, -0.026848189532756805, 0.02887052111327648, -0.032214801758527756, -0.0005365869146771729, -0.023139366880059242, 0.031050829216837883, 0.0067656380124390125, -0.0061688958667218685, 0.05659180134534836, 0.005317035596817732, 0.029096202924847603, 0.01469698827713728, -0.0078056687489151955, -0.010719484649598598, 0.01917506940662861, -0.03763165324926376, -0.00976105872541666, 0.002497592940926552, 0.041159071028232574, -0.028398700058460236, -0.01027510967105627, -0.03774229437112808, 0.009025812149047852, -0.03603173419833183, 0.04137561470270157, -0.024697626009583473, -0.01886206679046154, 0.0328960157930851, -0.029642444103956223, 0.024041010066866875, -0.025802509859204292, -0.012151365168392658, -0.000313177501084283, 0.014613427221775055, -0.03708463907241821, 0.019519131630659103, -0.004007542971521616, -0.007248967420309782, 0.013364064507186413, 0.06567534804344177, -0.007103022187948227, 0.015325109474360943, -0.009371225722134113, -0.011721549555659294, -0.00005284646249492653, 0.023552536964416504, 0.048804424703121185, 0.042194899171590805, 0.02179138921201229, 0.002611674601212144, -0.029238557443022728, -0.03493083268404007, -0.0165691077709198, -0.0017841345397755504, -0.018625173717737198, 0.014725500717759132, -0.03953156620264053, -0.058526746928691864, 0.020551374182105064, 0.03877764567732811, 0.019199606031179428, 0.006253243423998356, -0.0026525412686169147, 0.01371356938034296, 0.001941751572303474, -0.007837921380996704, 0.029204601421952248, -0.04823538288474083, -0.035204559564590454, -0.023138318210840225, -0.036506250500679016, 0.01674787886440754, 0.013085880316793919, -0.07081469893455505, -0.02127305418252945, 0.0008556860848329961, 0.014254596084356308, 0.014358053915202618, -0.029688287526369095, -0.028667666018009186, 0.021182728931307793, -0.02091224119067192, 0.012024087831377983, -0.020787397399544716, 0.03596565127372742, 0.0004843734495807439, -0.009954853914678097, 0.04472340643405914, -0.026556406170129776, -0.009294494986534119, 0.05811293050646782, -0.014394032768905163, 0.04668955132365227, -0.033825453370809555, 0.05483081564307213, 0.02671043947339058, 0.009458865970373154, -0.011975746601819992, -0.03860047459602356, 0.03025093302130699, -0.022573456168174744, 0.014952394179999828, 0.012509980238974094, 0.01759953983128071, -0.04951512813568115, -0.013770571909844875, -0.03351940959692001, 0.0004622160631697625, -0.02423618920147419, -0.03981664404273033, -0.0175617802888155, 0.08224601298570633, -0.0014839294599369168, 0.059095319360494614, -0.033127736300230026, -0.05348558723926544, 0.0497291274368763, -0.03227085992693901, -0.05119607597589493, -0.014779367484152317, -0.05497536435723305, 0.021690016612410545, 0.039612043648958206, 0.02269349992275238, -0.07318636775016785, 0.017994850873947144, 0.05137551575899124, 0.018306616693735123, 0.03313792124390602, -0.01810070127248764, 0.02478804625570774, -0.03788905218243599, -0.005329729989171028, -0.08985576033592224, -0.01689939573407173, 0.052873361855745316, -0.0012660393258556724, 0.00043849271605722606, -0.02394634485244751, 0.013848364353179932, 0.014276942238211632, -0.017389817163348198, -0.03547900915145874, 0.07575094699859619, -0.013544868677854538, 0.03740474209189415, 0.03557273745536804, -0.05724181979894638, 0.01103966124355793, 0.04928835481405258, -0.03371340036392212, -0.031947217881679535, -0.04924151301383972, 0.06977871060371399, -0.019303293898701668, 0.01792375184595585, -0.00196707621216774, -0.04460553452372551, 0.05805299058556557, 0.036118991672992706, 0.03560793772339821, 0.04367436468601227, -0.007618917152285576, 0.016081396490335464, 0.03939832001924515, -0.013488716445863247, 0.009681418538093567, 0.047956034541130066, 0.0038818318862468004, -0.029923761263489723, 0.020424824208021164, 0.006415254436433315, -0.020365485921502113, -0.008471407927572727, 0.07022875547409058, 0.0038182002026587725, -0.053694624453783035, -0.03591548278927803, 0.03859947994351387, -0.03450842201709747, 0.017077235504984856, -0.04042486846446991, 0.01820327714085579, -0.05245335027575493, 0.05168015882372856, -0.006728626322001219, -0.0067185875959694386, 0.07198870927095413, -0.022835904732346535, 0.015555204823613167, 0.014123980887234211, 0.08201799541711807, 0.10863734781742096, 0.04326695576310158, 0.00010129769361810759, 0.021527117118239403, 0.003550219815224409, -0.04660657420754433, -0.010452117770910263, -0.012667415663599968, 0.00939320307224989, 0.035913627594709396, 0.01508263498544693, 0.06548056751489639, -0.03488331660628319, 0.07350532710552216, -0.004624682944267988, 0.015991801396012306, -0.01961814984679222, -0.00537703325971961, 0.030393794178962708, 0.046854134649038315, 0.0234158243983984, 0.03899506852030754, -0.028954338282346725, -0.031327128410339355, 0.0544874370098114, -0.019740015268325806, -0.01857180893421173, 0.043676406145095825, -0.012721501290798187, -0.014117916114628315, 0.025100691244006157, 0.05868009105324745, 0.07886712998151779, -0.008483411744236946, 0.0131004573777318, 0.00490549486130476, 0.029294434934854507, -0.0011030513560399413, 0.014870838262140751, 0.010589134879410267, -0.005725598428398371, -0.008600534871220589, -0.04605262726545334, -0.04164987429976463, -0.010088288225233555, -0.032836757600307465, 0.0032089699525386095, -0.000008869416888046544, -0.027627363801002502, 0.006400392856448889, 0.005446102935820818, 0.01698245480656624, -0.044044625014066696, -0.050106022506952286, -0.03634689375758171, -0.0657726526260376, 0.011284851469099522, 0.010169275104999542, 0.015171783976256847, -0.015958311036229134, 0.0023130779154598713, -0.035875026136636734, -0.019401995465159416, 0.04037821292877197, -0.04154466465115547, 0.023562995716929436, -0.0007824065978638828, 0.02550654485821724, -0.01827499084174633, 0.021103305742144585, 0.04268298298120499, 0.005820169113576412, -0.009842184372246265, 0.010051287710666656, 0.03396199643611908, 0.04754089191555977, 0.027585484087467194, -0.00013873849820811301, -0.07408246397972107, -0.006939627695828676, 0.021083660423755646, -0.006578806787729263, -0.07643887400627136, -0.010740349069237709, 0.03343125432729721, -0.02614755742251873, 0.043850261718034744, -0.017556414008140564, -0.025312038138508797, -0.003852645168080926, 0.00020330026745796204, -0.009038460440933704, -0.019209085032343864, 0.04284878447651863, -0.02885548584163189, 0.05814269930124283, 0.0297177042812109, -0.022936828434467316, -0.04648149758577347, -0.019537342712283134, -0.00587023701518774, 0.017486386001110077, -0.010422535240650177, -0.03480301797389984, -0.03950180485844612, -0.06913198530673981, -0.01320054940879345, 0.02153587155044079, -0.01696726121008396, -0.01836046762764454, -0.003015401540324092, 0.04179713502526283, -0.018200360238552094, 0.03977244719862938, -0.022971000522375107, 0.023209579288959503, -0.015116779133677483, -0.03585264831781387, -0.027211859822273254, -0.0010052518919110298, -0.031049787998199463, 0.04588567838072777, 0.0037921748589724302, -0.02106628194451332, -0.017632994800806046, -0.03209512680768967, 0.03317577391862869, 0.03076094575226307, 0.02495392970740795, 0.023958997800946236 ]
[ -0.07445485889911652, 0.003478984348475933, -0.02245221473276615, 0.006575734820216894, 0.06552332639694214, -0.0770142450928688, -0.016038959845900536, -0.0009795496007427573, 0.012165469117462635, -0.012204249389469624, 0.06205029785633087, -0.02051466703414917, 0.018544558435678482, -0.004707495681941509, 0.03613031283020973, -0.019088484346866608, -0.04965493455529213, -0.043880630284547806, -0.013899575918912888, 0.04618966951966286, -0.03838573768734932, -0.023943832144141197, -0.02952432446181774, -0.01720556803047657, 0.025898655876517296, 0.04242047667503357, 0.001694156788289547, -0.013666966930031776, -0.04987669736146927, -0.22836165130138397, 0.022342197597026825, 0.0013673282228410244, -0.004040571860969067, -0.01262490265071392, 0.021007340401411057, 0.06389157474040985, 0.02629971317946911, -0.009378647431731224, 0.026709051802754402, 0.030708568170666695, 0.04485201835632324, -0.008930187672376633, -0.04996832087635994, 0.004702829755842686, 0.021040650084614754, -0.021776355803012848, -0.0216376893222332, -0.03369115665555, -0.012295734137296677, 0.015174658969044685, -0.03255012631416321, -0.034946832805871964, -0.004277796018868685, -0.009600291028618813, 0.018909689038991928, 0.009828262031078339, 0.05632690340280533, 0.08076425641775131, 0.026348968967795372, 0.022965021431446075, -0.007307519670575857, -0.002470620907843113, -0.13656359910964966, 0.054345350712537766, 0.011292770504951477, -0.017555736005306244, -0.05841358006000519, 0.0024987144861370325, -0.028167204931378365, 0.10240347683429718, -0.021427281200885773, -0.008729933761060238, -0.045417364686727524, 0.08883644640445709, -0.05199367180466652, 0.01701536774635315, -0.0014310181140899658, -0.0020470768213272095, -0.00037923722993582487, -0.013639570213854313, -0.08628672361373901, -0.006454747170209885, -0.01657508872449398, -0.0037918819580227137, -0.031529348343610764, 0.042098142206668854, -0.01664516143500805, 0.05320556089282036, 0.05317661911249161, -0.0034634610638022423, 0.03320992365479469, 0.020863711833953857, 0.040210235863924026, 0.021960491314530373, -0.09115774929523468, -0.021040720865130424, 0.008285488933324814, 0.0239837896078825, 0.025413917377591133, 0.40532752871513367, 0.006576224230229855, -0.0008157945121638477, 0.014818542636930943, 0.04618386551737785, 0.016915200278162956, -0.005089046433568001, 0.023632317781448364, -0.0415569432079792, 0.03666240721940994, -0.04326367750763893, 0.025825582444667816, -0.05252581462264061, 0.04824458062648773, -0.08514627069234848, 0.035239797085523605, 0.03827187791466713, 0.05155603587627411, 0.01740405336022377, -0.04663814604282379, 0.0090745585039258, 0.020260969176888466, -0.034327346831560135, 0.021021857857704163, 0.001253680675290525, 0.017989005893468857, 0.03895007446408272, 0.046106401830911636, 0.0532694011926651, 0.016047069802880287, -0.02388969250023365, 0.05778910592198372, -0.00579586299136281, -0.0491354763507843, 0.03169932961463928, -0.035300400108098984, 0.006068781483918428, 0.01920521818101406, -0.04037094861268997, -0.0053281765431165695, 0.021578632295131683, 0.006767693441361189, -0.05821866914629936, 0.024534115567803383, -0.005240291357040405, -0.030774781480431557, 0.13366205990314484, 0.004378226585686207, -0.03698418289422989, -0.04292517527937889, -0.046803608536720276, -0.014323064126074314, 0.02091464214026928, -0.009440145455300808, -0.0660775825381279, -0.01898031495511532, 0.02843608148396015, 0.10028219223022461, -0.008246546611189842, -0.04020736366510391, 0.002362881787121296, -0.008441945537924767, -0.027737775817513466, -0.07083754986524582, 0.10741270333528519, 0.017660798504948616, -0.07709508389234543, -0.023568494245409966, 0.0005971522186882794, -0.00837145745754242, -0.07045727223157883, 0.03755766898393631, -0.022345826029777527, -0.01650967262685299, -0.03495126590132713, 0.02731817215681076, -0.011380293406546116, -0.021685097366571426, -0.009266474284231663, 0.07064700126647949, 0.03419715166091919, 0.004879397340118885, 0.009015367366373539, -0.060962460935115814, 0.022023113444447517, -0.05441415682435036, -0.05716671422123909, -0.08150188624858856, 0.035718031227588654, -0.03082975186407566, -0.008375592529773712, -0.03302059322595596, -0.01339441817253828, -0.017374755814671516, 0.02203061245381832, -0.0625971108675003, -0.03417155146598816, -0.02374156005680561, -0.0021926865447312593, -0.030085373669862747, -0.056952644139528275, 0.06053049862384796, 0.030163351446390152, 0.0009708122815936804, 0.008861701935529709, -0.05495988950133324, 0.010043159127235413, 0.04753252491354942, -0.02855226770043373, 0.07263457775115967, 0.008122792467474937, -0.04292500391602516, 0.004499728325754404, -0.005424254573881626, 0.008348541334271431, -0.012106169015169144, -0.04342878237366676, -0.02768593840301037, -0.008891413919627666, 0.024888817220926285, 0.04670538008213043, -0.0453498549759388, -0.037895552814006805, -0.011677559465169907, -0.34566667675971985, -0.07321281731128693, -0.006549855228513479, -0.0047335149720311165, 0.062431178987026215, -0.03807147219777107, 0.0007015307201072574, -0.0002906765148509294, -0.01258936058729887, 0.041323546320199966, 0.0721566379070282, -0.0049329278990626335, 0.004967030603438616, -0.08288821578025818, 0.016094250604510307, 0.010161439888179302, -0.015302808955311775, 0.00961319636553526, -0.022328220307826996, 0.04012667015194893, 0.029595250263810158, -0.06540822982788086, -0.020834987983107567, -0.044737447053194046, -0.003863909048959613, -0.009568733163177967, 0.11890663951635361, 0.019851984456181526, 0.045301374047994614, -0.030531903728842735, 0.03578967973589897, 0.012124109081923962, -0.01235360000282526, -0.060502149164676666, -0.01214390154927969, 0.022893143817782402, 0.003972411621361971, 0.032471779733896255, -0.006930241826921701, 0.01450492162257433, -0.007230663206428289, -0.005833598785102367, -0.03274434059858322, -0.038404155522584915, -0.006394701078534126, 0.011785793118178844, -0.06417062133550644, -0.026532169431447983, 0.0158900897949934, 0.053391456604003906, 0.018425406888127327, 0.038350947201251984, 0.013295881450176239, 0.019281649962067604, 0.013280472718179226, -0.02553877979516983, -0.05814991518855095, 0.005677828565239906, 0.011496654711663723, -0.048852793872356415, -0.0024758153595030308, 0.03173292428255081, 0.04792317375540733, -0.06170927733182907, 0.04196400195360184, 0.01828952319920063, 0.019817987456917763, 0.015692804008722305, 0.0163606908172369, -0.03748152405023575, -0.03534414991736412, 0.0861821249127388, -0.005284949205815792, 0.01118618343025446, 0.004728768486529589, 0.06411957740783691, -0.015352203510701656, 0.0030750250443816185, -0.015665818005800247, 0.006870511919260025, 0.05285368859767914, -0.010782085359096527, 0.060543011873960495, -0.016552599146962166, -0.030267929658293724, 0.054182492196559906, 0.0021253398153930902, -0.024504393339157104, 0.08149342238903046, -0.001531120389699936, -0.0030415465589612722, 0.0034672808833420277, 0.002129861619323492, -0.015127361752092838, 0.07588329166173935, -0.0003186872345395386, -0.27362391352653503, 0.023147188127040863, 0.014819972217082977, 0.06848087161779404, 0.018917573615908623, 0.007362005766481161, 0.018597641959786415, 0.0027502896264195442, -0.024987485259771347, 0.009630543179810047, 0.029378389939665794, 0.06109776720404625, -0.0184615571051836, -0.020754877477884293, -0.016544582322239876, 0.015041083097457886, 0.056195929646492004, 0.005283920094370842, 0.029487432911992073, 0.02261492609977722, 0.03521015867590904, -0.05883799120783806, 0.18817953765392303, 0.025834623724222183, 0.023265037685632706, 0.023453593254089355, -0.027765518054366112, -0.003646788652986288, 0.07116178423166275, -0.0009445269824936986, 0.003038473892956972, 0.0182692501693964, 0.0032813914585858583, 0.03871674835681915, 0.024046199396252632, -0.02917713299393654, 0.013799414038658142, 0.04589475691318512, 0.012328864075243473, -0.06104441359639168, -0.025049220770597458, 0.030993711203336716, -0.0306235458701849, 0.008831956423819065, 0.055825162678956985, -0.024755248799920082, -0.017582356929779053, -0.04025711119174957, -0.05668449401855469, 0.003386787138879299, -0.06472521275281906, -0.03312892094254494, -0.03051055409014225, -0.0052080885507166386, 0.027538776397705078, 0.050522711127996445, 0.031229380518198013, 0.021968167275190353, 0.025073492899537086, 0.014817547984421253, -0.026314223185181618, -0.03971758484840393, 0.13211943209171295, -0.004663663916289806, -0.012892919592559338 ]
[ 0.008165703155100346, 0.025107357650995255, -0.014241904020309448, 0.027827829122543335, -0.030108589679002762, -0.02562565915286541, 0.006025942042469978, 0.0103461854159832, -0.008086562156677246, 0.03371439501643181, -0.015537110157310963, 0.010915304534137249, 0.055315397679805756, 0.00713055394589901, -0.009601231664419174, 0.006912942044436932, -0.027578158304095268, 0.02574831247329712, 0.022423245012760162, -0.03177797421813011, -0.030647916719317436, 0.03978468477725983, 0.051037710160017014, 0.014366641640663147, -0.0030914018861949444, 0.006587876472622156, -0.03712894394993782, -0.0173778273165226, 0.0022404100745916367, -0.09895997494459152, -0.021194806322455406, 0.004475616849958897, 0.016270196065306664, 0.021943500265479088, 0.023440100252628326, -0.019420897588133812, 0.01824953407049179, 0.024410009384155273, -0.00024147167277988046, 0.019721368327736855, 0.013765920884907246, -0.011325718834996223, -0.026599055156111717, 0.007837669923901558, -0.007990199141204357, -0.01919454149901867, -0.05495742708444595, 0.013976076617836952, 0.019112786278128624, -0.018580883741378784, -0.03045080602169037, -0.003932258579879999, -0.00458188634365797, -0.011155578307807446, 0.023119552060961723, 0.01766946353018284, -0.03555786982178688, -0.021665096282958984, -0.012215077877044678, -0.04042866826057434, 0.030198119580745697, -0.002547851298004389, -0.07191865146160126, -0.021282169967889786, -0.01257864385843277, -0.034731898456811905, 0.013365466147661209, 0.049824897199869156, 0.0273392666131258, 0.006429124157875776, -0.04842172935605049, 0.04327740520238876, -0.07197147607803345, -0.030256779864430428, -0.01706336997449398, 0.0464005209505558, 0.042335398495197296, -0.03411228209733963, -0.032645389437675476, -0.014249814674258232, -0.013607002794742584, 0.0004968435969203711, 0.00436804536730051, 0.005988365039229393, -0.03972916677594185, -0.020818835124373436, -0.0038785128854215145, 0.008507076650857925, 0.019745750352740288, 0.001597129856236279, -0.011596420779824257, 0.01569560170173645, 0.010570110753178596, -0.022799117490649223, -0.09929048269987106, 0.002858680672943592, -0.008989640511572361, 0.014925037510693073, 0.006238559726625681, 0.8238618969917297, 0.02559804543852806, -0.006757721304893494, 0.014963135123252869, 0.012732881121337414, -0.0026073071639984846, 0.020728828385472298, 0.018836963921785355, -0.025269661098718643, -0.0030779156368225813, -0.039196886122226715, 0.007785653695464134, -0.03669746220111847, -0.0008980013662949204, 0.02321229688823223, 0.03904028609395027, 0.0431029237806797, 0.051690008491277695, 0.008537937887012959, -0.002768140286207199, 0.011582514271140099, 0.0037473789416253567, 0.006711864843964577, 0.006299141328781843, 0.01822994276881218, -0.0038182646967470646, -0.11321018636226654, -0.0041175116784870625, -6.320319414316564e-33, 0.03092045709490776, -0.00805614236742258, 0.04394996538758278, 0.008666167967021465, 0.01706862449645996, 0.05007312446832657, -0.028204260393977165, -0.028431933373212814, -0.04066803678870201, -0.0067729707807302475, -0.02565150521695614, -0.013650801964104176, 0.030157705768942833, -0.020015066489577293, 0.036189910024404526, -0.044869206845760345, 0.009843810461461544, 0.029620740562677383, -0.008538957685232162, 0.011095812544226646, 0.014353727921843529, 0.04293224215507507, -0.004479669034481049, 0.0373765267431736, 0.025756333023309708, 0.013495665043592453, -0.0008815329056233168, -0.027308320626616478, -0.0032475353218615055, -0.0533534400165081, -0.06947850435972214, 0.008579936809837818, -0.00016431507538072765, 0.0032733494881540537, -0.03617104887962341, -0.05424557253718376, -0.020718829706311226, -0.024862799793481827, 0.010891148820519447, -0.056895431131124496, -0.06031770259141922, 0.0009377746609970927, 0.00027631636476144195, -0.03331156447529793, -0.0051451618783175945, -0.005316828843206167, -0.0371861569583416, 0.05214143916964531, 0.007798861712217331, 0.0520860031247139, 0.038667161017656326, 0.020559344440698624, -0.01999283768236637, 0.004086001310497522, -0.01151459664106369, 0.018052486702799797, 0.026030469685792923, 0.016085784882307053, 0.03399638086557388, 0.030675038695335388, 0.005458480678498745, -0.010481792502105236, -0.011324592866003513, 0.04576569050550461, 0.060383573174476624, 0.018972625955939293, 0.035589687526226044, 0.06471160799264908, 0.006900116801261902, 0.036280207335948944, -0.05063469707965851, 0.041788872331380844, -0.014820604585111141, -0.0321124792098999, 0.041781194508075714, -0.04255913197994232, -0.024085337296128273, -0.037926871329545975, -0.002204939955845475, 0.05940019711852074, 0.009873926639556885, -0.009046642109751701, -0.009996797889471054, -0.024245142936706543, -0.021763741970062256, -0.02077915146946907, 0.050947848707437515, 0.04167507588863373, -0.0032850210554897785, 0.03399219363927841, 0.019616855308413506, 0.01769864745438099, 0.003040975658223033, -0.009462484158575535, -0.024422520771622658, 6.52874999108071e-33, -0.0036565198097378016, 0.004763052798807621, 0.004187938757240772, -0.0035165667068213224, 0.005359808914363384, -0.00489174947142601, 0.03199280798435211, 0.020715665072202682, -0.019084462895989418, 0.04215230420231819, -0.0013628521701321006, -0.015823954716324806, 0.008013170212507248, 0.01808289624750614, 0.06605511903762817, 0.007480745669454336, 0.005672542843967676, -0.026401977986097336, 0.004230970982462168, 0.031067198142409325, -0.009120999835431576, -0.0159857589751482, -0.005676385946571827, 0.03625832125544548, 0.03348451480269432, -0.0048908875323832035, -0.0028340108692646027, -0.010564231313765049, -0.0022903173230588436, -0.007816227152943611, -0.011090121231973171, -0.02764224447309971, -0.0155698386952281, -0.020071154460310936, 0.029337352141737938, 0.003167147282510996, 0.008072194643318653, 0.0018237391486763954, 0.025814538821578026, -0.028695620596408844, 0.017360413447022438, 0.05846937745809555, -0.010479063726961613, 0.04676412045955658, -0.01462247408926487, 0.027668487280607224, -0.0031504249200224876, 0.028901690617203712, -0.014728032052516937, -0.0011834264732897282, -0.012796159833669662, 0.026552323251962662, 0.013773961924016476, 0.041018396615982056, 0.013649641536176205, -0.058434125036001205, -0.0014067769516259432, 0.01986069045960903, -0.04955914616584778, -0.005552216432988644, -0.03254590928554535, -0.017191750928759575, -0.04349827766418457, 0.028232770040631294, -0.007082001306116581, -0.03801947087049484, -0.053598932921886444, 0.0010920495260506868, -0.02736687660217285, -0.004845128394663334, 0.030886191874742508, -0.029018426313996315, -0.04572048410773277, 0.00911776814609766, 0.01602308638393879, 0.016504520550370216, -0.04172714799642563, -0.0031653507612645626, -0.05132405832409859, 0.04727546125650406, 0.021274812519550323, -0.0009546625078655779, 0.011803140863776207, 0.03398696333169937, -0.01360267587006092, -0.014354131184518337, -0.018297895789146423, 0.0235285721719265, 0.031009584665298462, 0.02839941531419754, 0.0005792166339233518, -0.06343887001276016, -0.015000717714428902, 0.03575390949845314, -0.03206321969628334, -1.2311686781174558e-8, -0.06186811253428459, -0.020282872021198273, -0.015002196654677391, 0.03722459077835083, 0.009854007512331009, 0.022421186789870262, -0.01750803552567959, -0.0008896756335161626, -0.019513478502631187, 0.0112577173858881, 0.017355963587760925, -0.012862102128565311, 0.008778630755841732, 0.018683986738324165, 0.034240830689668655, -0.025487227365374565, 0.04409012198448181, -0.03803730383515358, 0.040678445249795914, -0.013973784632980824, 0.0020685072522610426, 0.02188887447118759, -0.014048567973077297, 0.003912837710231543, -0.006928599905222654, 0.002312392694875598, 0.015181057155132294, -0.07467685639858246, -0.01993236318230629, -0.03520277887582779, 0.049317821860313416, -0.041756585240364075, -0.03092271462082863, 0.04106294736266136, -0.010737655684351921, -0.04663316160440445, 0.02410982921719551, 0.03338455408811569, 0.009009442292153835, 0.009567844681441784, -0.029057325795292854, 0.017831875011324883, -0.026737576350569725, -0.030096882954239845, -0.03812865912914276, -0.06099560111761093, -0.041486144065856934, -0.036972709000110626, 0.028723467141389847, -0.05741633474826813, -0.004453820642083883, -0.012302134186029434, 0.020489059388637543, -0.0035571802873164415, 0.03712347522377968, 0.0044515058398246765, 0.02625160478055477, 0.006512535270303488, -0.014674282632768154, 0.0017725899815559387, 0.0031228235457092524, -0.004393451381474733, -0.008269662968814373, -0.02739151567220688 ]
python-checking-any-value-in-a-list-exists-in-a-line-of-text
https://markhneedham.com/blog/2015/03/14/python-checking-any-value-in-a-list-exists-in-a-line-of-text
false
2015-03-22 01:51:52
Python: Simplifying the creation of a stop word list with defaultdict
[ "python" ]
[ "Python" ]
I've been playing around with topics models again and recently read a http://www.perseus.tufts.edu/publications/02-jocch-mimno.pdf[paper by David Mimno] which suggested the following heuristic for working out which words should go onto the stop list: ____ A good heuristic for identifying such words is to remove those that occur in more than 5-10% of documents (most common) and those that occur fewer than 5-10 times in the entire corpus (least common). ____ I decided to try this out on the https://github.com/mneedham/neo4j-himym/blob/master/data/import/sentences.csv[HIMYM dataset] that I've been working on over the last couple of months. I started out with the following code to build a dictionary of words, their total occurrences and the episodes they'd been used in: [source,python] ---- import csv from sklearn.feature_extraction.text import CountVectorizer from collections import defaultdict episodes = defaultdict(str) with open("sentences.csv", "r") as file: reader = csv.reader(file, delimiter = ",") reader.next() for row in reader: episodes[row[1]] += row[4] vectorizer = CountVectorizer(analyzer='word', min_df = 0, stop_words = 'english') matrix = vectorizer.fit_transform(episodes.values()) features = vectorizer.get_feature_names() words = {} for doc_id, doc in enumerate(matrix.todense()): for word_id, score in enumerate(doc.tolist()[0]): word = features[word_id] if not words.get(word): words[word] = {} if not words[word].get("score"): words[word]["score"] = 0 words[word]["score"] += score if not words[word].get("episodes"): words[word]["episodes"] = set() if score > 0: words[word]["episodes"].add(doc_id) ---- This works fine but the code inside the last for block is ugly and most of it is handling the case when parts of a dictionary aren't yet initialised which is defaultdict territory. You'll notice I am using defaultdict in the first part of the code but not yet the second as I'd struggled to get it working. This was my first attempt to make the 'words' variable based on it: [source,python] ---- >>> words = defaultdict({}) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: first argument must be callable ---- We can see why this doesn't work if we try to evaluate '{}' as a function which is what defaultdict does internally: [source,python] ---- >>> {}() Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: 'dict' object is not callable ---- Instead what we need is to pass in 'dict': [source,python] ---- >>> dict() {} >>> words = defaultdict(dict) >>> words defaultdict(<type 'dict'>, {}) ---- That simplifies the first bit of the loop: [source,python] ---- words = defaultdict(dict) for doc_id, doc in enumerate(matrix.todense()): for word_id, score in enumerate(doc.tolist()[0]): word = features[word_id] if not words[word].get("score"): words[word]["score"] = 0 words[word]["score"] += score if not words[word].get("episodes"): words[word]["episodes"] = set() if score > 0: words[word]["episodes"].add(doc_id) ---- We've still got a couple of other places to simplify though which we can do by defining a http://pymotw.com/2/collections/defaultdict.html[custom function] and passing that into defaultdict: [source,python] ---- def default_dict_function(): return {"score": 0, "episodes": set()} >>> words = defaultdict(default_dict_function) >>> words defaultdict(<function default_dict_function at 0x10963fcf8>, {}) ---- And here's the final product: [source,python] ---- def default_dict_function(): return {"score": 0, "episodes": set()} words = defaultdict(default_dict_function) for doc_id, doc in enumerate(matrix.todense()): for word_id, score in enumerate(doc.tolist()[0]): word = features[word_id] words[word]["score"] += score if score > 0: words[word]["episodes"].add(doc_id) ---- After this we can write out the words to our stop list: [source,python] ---- with open("stop_words.txt", "w") as file: writer = csv.writer(file, delimiter = ",") for word, value in words.iteritems(): # appears in > 10% of episodes if len(value["episodes"]) > int(len(episodes) / 10): writer.writerow([word.encode('utf-8')]) # less than 10 occurences if value["score"] < 10: writer.writerow([word.encode('utf-8')]) ----
null
null
[ -0.006048024166375399, -0.022781699895858765, -0.014074594713747501, 0.01966681145131588, 0.07466389983892441, 0.00689196540042758, 0.01536477543413639, 0.03266049176454544, 0.010867198929190636, -0.008827874436974525, 0.005073390435427427, 0.01689429208636284, -0.043771933764219284, 0.026034368202090263, -0.01701309345662594, 0.04604007676243782, 0.04904664680361748, 0.025483988225460052, 0.025635993108153343, -0.01626061461865902, 0.018632786348462105, 0.05406879261136055, 0.02487388625741005, 0.03880157694220543, 0.015521391294896603, -0.030703812837600708, -0.01142113283276558, 0.0017305284272879362, -0.048177290707826614, -0.0025088402908295393, 0.02713979221880436, -0.001072181505151093, 0.012157990597188473, 0.01097940281033516, 0.04544945806264877, -0.0012905271723866463, -0.042341262102127075, 0.022152571007609367, 0.008169524371623993, -0.01943114772439003, -0.03619374707341194, 0.006838895380496979, -0.05309483781456947, -0.01615014486014843, -0.06383509188890457, 0.0017058500088751316, -0.04437289014458656, 0.00955455843359232, 0.005797011777758598, -0.029244687408208847, -0.07222892343997955, 0.04945608973503113, 0.004812190774828196, -0.025195587426424026, -0.0037791419308632612, 0.05328434333205223, 0.013222246430814266, -0.07318607717752457, 0.018005412071943283, 0.017711088061332703, 0.003475857898592949, -0.029172612354159355, -0.01211902592331171, 0.05485033616423607, 0.0005078595131635666, -0.04525715857744217, -0.017192339524626732, 0.07027192413806915, -0.04315147176384926, -0.02047482132911682, -0.049194298684597015, 0.007179663050919771, -0.010752569884061813, 0.023217901587486267, -0.02739590033888817, -0.035125091671943665, 0.03158675879240036, 0.03214175999164581, 0.01588343270123005, 0.02834678255021572, -0.04417964071035385, 0.023698225617408752, 0.006639726459980011, 0.0024188263341784477, -0.018903493881225586, -0.04990252107381821, -0.04294964671134949, -0.031886033713817596, -0.056871041655540466, 0.011692977510392666, 0.02826443873345852, -0.04944887012243271, 0.03093421272933483, 0.017809448763728142, -0.02005687728524208, 0.018754389137029648, 0.028038769960403442, 0.0019504092633724213, -0.009644277393817902, 0.01537201926112175, -0.05346554517745972, -0.04420579597353935, 0.023774132132530212, 0.022601930424571037, -0.10057885944843292, -0.010637125000357628, 0.037869762629270554, 0.0065311770886182785, 0.017816727980971336, -0.017087597399950027, -0.02650260552763939, -0.030388399958610535, -0.017576931044459343, 0.0072506326250731945, -0.09404314309358597, 0.06214994192123413, 0.018364666029810905, -0.009053128771483898, -0.015125682577490807, 0.0010405938373878598, 0.026925697922706604, 0.024217350408434868, 0.011084647849202156, 0.06797679513692856, -0.05036884918808937, 0.008358513005077839, -0.01594201847910881, 0.06814499944448471, -0.025649147108197212, -0.07183977961540222, -0.015465429052710533, 0.03726992756128311, -0.010546224191784859, 0.013786934316158295, -0.003993751015514135, -0.014215613715350628, -0.008459746837615967, 0.01993190497159958, 0.04697802662849426, 0.03174727037549019, 0.024328291416168213, -0.020731449127197266, 0.006536316126585007, 0.01837342232465744, 0.02686893194913864, -0.010965252295136452, -0.0393749438226223, -0.012029282748699188, -0.0104059474542737, 0.024989385157823563, 0.012380723841488361, 0.034707676619291306, 0.05104929581284523, -0.028983762487769127, 0.00671424763277173, 0.07398334890604019, 0.00803284626454115, 0.03278832510113716, 0.009537290781736374, 0.018884524703025818, 0.045488618314266205, 0.02827456220984459, -0.008499923162162304, 0.026884332299232483, -0.017018018290400505, -0.033162157982587814, 0.0017144308658316731, 0.06815019249916077, -0.038609955459833145, 0.02824052795767784, -0.03074149414896965, -0.0452389270067215, 0.06791730225086212, -0.0349649116396904, 0.0035718614235520363, 0.01766168139874935, 0.057287055999040604, 0.04791729152202606, 0.02558998391032219, 0.014716500416398048, -0.0775424912571907, 0.05122746154665947, -0.009922345168888569, -0.0006241057417355478, 0.02888425439596176, -0.03187965229153633, 0.06879530847072601, 0.039253853261470795, 0.003000993048772216, 0.0241673793643713, -0.07039812952280045, -0.06511241942644119, -0.0008261342882178724, 0.00533768255263567, 0.040302250534296036, -0.02735082060098648, 0.013590388000011444, 0.05813039094209671, 0.005147668998688459, 0.024624034762382507, 0.029741281643509865, -0.01780594512820244, 0.026438774541020393, -0.011527466587722301, -0.06751394271850586, 0.05395552143454552, -0.0006554300780408084, -0.041948698461055756, -0.01613399013876915, 0.005390748847275972, -0.025977224111557007, 0.03105081059038639, 0.04445183277130127, -0.00918386597186327, 0.026368452236056328, 0.02353566698729992, 0.06875330209732056, -0.003126980736851692, 0.03469027578830719, -0.06527206301689148, 0.020771430805325508, -0.033481795340776443, -0.021050218492746353, -0.024784184992313385, -0.03310037776827812, 0.10729321092367172, 0.05835525691509247, -0.027886375784873962, -0.06202905625104904, 0.018732387572526932, -0.008985692635178566, 0.0030361153185367584, 0.028371479362249374, -0.013956008478999138, -0.03362562134861946, 0.018925875425338745, -0.04653170704841614, -0.03504323586821556, 0.0364389643073082, -0.024877309799194336, -0.015136069618165493, 0.049185819923877716, -0.02772182784974575, 0.0425146222114563, 0.04355250671505928, 0.02219901792705059, 0.016580142080783844, -0.017642123624682426, -0.04075203463435173, -0.006337366532534361, 0.02485688589513302, -0.013660288415849209, 0.029397400096058846, -0.04316610097885132, 0.013109049759805202, -0.010688579641282558, -0.04093563184142113, 0.019888371229171753, 0.07702014595270157, 0.04105716571211815, -0.014248664490878582, 0.0612725168466568, -0.035309046506881714, -0.01864513009786606, -0.002549226162955165, -0.06093613803386688, -0.03492134436964989, -0.05124815180897713, -0.021937083452939987, -0.00017448863945901394, 0.026980776339769363, -0.019604932516813278, 0.018949508666992188, -0.0061803762800991535, 0.015189121477305889, 0.004634265787899494, 0.06273292005062103, -0.008756455034017563, -0.002380402758717537, -0.02764052338898182, -0.025850705802440643, 0.03652775287628174, -0.0337412990629673, -0.016703039407730103, 0.006274612154811621, -0.057079412043094635, 0.022181373089551926, -0.05877181515097618, -0.014798014424741268, 0.0036431485787034035, -0.003300802083685994, 0.03891376778483391, 0.020238254219293594, -0.004651402123272419, 0.023421162739396095, 0.035681579262018204, 0.0031402248423546553, 0.03485414385795593, 0.008407717570662498, 0.05454045161604881, -0.0026012531016021967, 0.008382760919630527, 0.04924630746245384, -0.01952091045677662, -0.013839706778526306, -0.03126507252454758, -0.0007512865122407675, -0.004648932255804539, -0.2834760844707489, 0.019258392974734306, -0.039474666118621826, -0.02224063314497471, 0.009425874799489975, -0.032334618270397186, 0.002305267844349146, -0.023255368694663048, -0.0032220720313489437, 0.011059362441301346, -0.03194794803857803, -0.04234277084469795, -0.020649774000048637, 0.06237766519188881, 0.028516555204987526, 0.019347673282027245, -0.03763662651181221, -0.042625054717063904, -0.001119688618928194, 0.06335221976041794, 0.024761497974395752, -0.028246335685253143, -0.013646535575389862, 0.03778565675020218, -0.032282691448926926, 0.0800352543592453, -0.07950431853532791, 0.04195966571569443, -0.07038766145706177, -0.01863062009215355, 0.0026482853572815657, -0.0541154146194458, 0.0077179204672575, -0.016579413786530495, 0.010828649625182152, -0.014147011563181877, 0.03137180581688881, 0.0038978459779173136, -0.017869675531983376, 0.06790640950202942, -0.03014613501727581, -0.043026719242334366, -0.00038814079016447067, -0.016081489622592926, 0.061657264828681946, 0.003712710691615939, -0.05190610513091087, -0.04794646427035332, -0.0075749740935862064, 0.07430347800254822, -0.010940049774944782, -0.035020291805267334, -0.04842154309153557, 0.025950022041797638, -0.021185580641031265, -0.0026095062494277954, 0.01473849918693304, -0.019541045650839806, -0.042712435126304626, -0.04416721314191818, -0.02342473901808262, -0.031054211780428886, 0.0113905044272542, -0.05507894977927208, -0.03216630592942238, -0.05132972076535225, -0.057757239788770676, -0.007804144639521837, 0.04375866428017616, 0.04410960525274277, -0.03889767453074455, 0.03685764968395233, 0.023824455216526985, -0.10046690702438354, -0.04934689402580261, -0.005820386577397585, 0.016415588557720184, 0.02130265161395073, -0.006851940881460905, 0.059422388672828674, -0.07734593749046326, -0.05062124878168106, 0.02062000334262848, 0.015678878873586655, -0.009903407655656338, -0.03771011903882027, 0.03239912539720535, 0.0014833802124485373, -0.0214984193444252, -0.0006225586403161287, 0.03829171136021614, -0.01775307208299637, 0.00033836186048574746, 0.006193953566253185, 0.01890645921230316, 0.04884345084428787, -0.005440796725451946, 0.005337506998330355, 0.018313659355044365, 0.02097686380147934, 0.01601993292570114, -0.07031649351119995, -0.012225378304719925, -0.04182842746376991, -0.014982623979449272, -0.001574810710735619, -0.051604628562927246, -0.016189835965633392, 0.056170158088207245, 0.007797048427164555, 0.01392398215830326, 0.01067355740815401, 0.04318472743034363, -0.023249315097928047, 0.03899445757269859, -0.0028598797507584095, 0.06422079354524612, 0.026683993637561798, 0.03780772164463997, -0.01100712176412344, -0.06635158509016037, 0.009506314061582088, -0.02702282927930355, -0.035751499235630035, -0.03944640979170799, -0.030487196519970894, 0.020685777068138123, -0.03451071307063103, -0.005785176530480385, 0.005254085641354322, -0.03598032891750336, 0.008410646580159664, 0.027972938492894173, -0.016214685514569283, 0.06703237444162369, -0.06736040115356445, -0.03158996254205704, -0.012660612352192402, -0.02597486972808838, 0.014404519461095333, -0.01373220793902874, -0.03212832659482956, 0.01343519426882267, 0.04300269857048988, 0.06945484131574631, -0.013358340598642826, 0.01593133993446827, -0.003770907176658511, 0.009569237940013409, 0.0044778743758797646, 0.024033214896917343, 0.003708397503942251, -0.0028451180551201105, -0.0120553495362401, -0.019590239971876144, -0.00980775710195303, 0.03782936558127403, -0.016710901632905006, -0.017815660685300827, -0.0435699000954628, 0.03894861787557602, -0.02152966894209385, -0.011139756068587303, -0.016093069687485695, 0.008830076083540916, 0.0461970679461956, -0.016928507015109062, 0.03711789846420288, 0.002489424543455243, 0.002153304871171713, 0.018564587458968163, -0.0025570860598236322, -0.03877229243516922, 0.02229173853993416, -0.027954109013080597, -0.036354031413793564, 0.028759218752384186, 0.03825804218649864, -0.028627615422010422, 0.012236785143613815, -0.01991133764386177, -0.033136408776044846, -0.009252605959773064, 0.006967689376324415, 0.06513428688049316, 0.05556623637676239, -0.012703576125204563, -0.022179579362273216, -0.04054071381688118, -0.028902409598231316, -0.04827890545129776, 0.028608882799744606, -0.016588181257247925, 0.002573880599811673, -0.04399299621582031, -0.06944484263658524, 0.003352963365614414, -0.010113047435879707, -0.003463843371719122, 0.005737296771258116, -0.030598152428865433, -0.00933487992733717, -0.022306373342871666, -0.0011965734884142876, 0.07153424620628357, -0.06891122460365295, 0.000007667890713491943, -0.029801344498991966, -0.004110583104193211, 0.018500035628676414, -0.001106732408516109, -0.08238355815410614, -0.03429551050066948, -0.01282005850225687, 0.03493605926632881, -0.045427873730659485, -0.04589826241135597, -0.05229666456580162, 0.04062236100435257, -0.0025653732009232044, 0.022630175575613976, -0.015951745212078094, 0.007353124674409628, -0.006359391380101442, -0.0018930137157440186, 0.027846049517393112, -0.03303927183151245, -0.04323999211192131, 0.028125736862421036, -0.01856067217886448, 0.02556634694337845, -0.02957174926996231, 0.035868264734745026, 0.031899694353342056, -0.010744139552116394, -0.025531351566314697, -0.028865089640021324, 0.03450872749090195, 0.017101144418120384, 0.05840454623103142, 0.04438032954931259, 0.003384687937796116, -0.03262510150671005, -0.0036840985994786024, -0.021308792755007744, 0.042874641716480255, 0.016086654737591743, -0.024383142590522766, 0.01939932256937027, 0.0850844532251358, 0.002362328115850687, 0.03266720473766327, -0.006660138256847858, -0.06111343950033188, 0.05529727786779404, -0.004578841850161552, -0.021618591621518135, -0.023035965859889984, -0.04003956541419029, 0.028782611712813377, 0.02161039412021637, 0.04147813469171524, -0.04017123952507973, 0.053862884640693665, 0.012881830334663391, 0.053457312285900116, 0.030609510838985443, 0.042395614087581635, 0.0326232872903347, -0.032512858510017395, 0.017034538090229034, -0.09987472742795944, -0.013268674723803997, 0.07564298808574677, -0.03070894256234169, 0.032075971364974976, -0.008253675885498524, -0.03515162318944931, 0.022934963926672935, -0.05263151228427887, -0.04482261836528778, 0.023365912958979607, -0.03601294755935669, 0.04006141051650047, 0.006733948830515146, -0.04254017770290375, 0.011854917742311954, 0.045649003237485886, -0.04386777803301811, 0.004055097699165344, -0.05270528420805931, 0.06951669603586197, -0.029795249924063683, 0.03465462848544121, 0.0009023878374136984, -0.028699198737740517, 0.07091084867715836, 0.04953543096780777, 0.021718375384807587, 0.04625644162297249, -0.03951193764805794, 0.0482754223048687, 0.04219861701130867, -0.03880758583545685, -0.004165170714259148, 0.025231987237930298, 0.000472063577035442, -0.04335130378603935, 0.05777759850025177, 0.0025097778998315334, 0.002441240241751075, -0.027286430820822716, 0.09559329599142075, 0.023052308708429337, -0.042565494775772095, -0.04423030838370323, 0.0145309092476964, -0.030024221166968346, 0.022795287892222404, -0.02443115971982479, 0.0009818454273045063, -0.01952339895069599, 0.052598726004362106, -0.02129359543323517, 0.02363271452486515, 0.056469548493623734, -0.08050239831209183, -0.01722174510359764, 0.033263131976127625, 0.08137533068656921, 0.0843692198395729, 0.06490136682987213, -0.01252485066652298, 0.06668750941753387, -0.03590640053153038, -0.058493323624134064, -0.01480620913207531, -0.030430974438786507, 0.02099660597741604, 0.010392507538199425, 0.0015278965001925826, 0.03324972465634346, -0.006663030944764614, 0.054518431425094604, -0.02968425489962101, -0.014582030475139618, -0.013763711787760258, 0.003593450179323554, 0.025780022144317627, 0.024706989526748657, 0.015938006341457367, 0.03156968578696251, -0.029397843405604362, -0.006895444355905056, 0.033132217824459076, 0.02565777860581875, -0.050027236342430115, 0.016415340825915337, -0.03817124292254448, 0.007646608632057905, 0.026078902184963226, 0.06271332502365112, 0.0658273845911026, -0.029021359980106354, 0.032212357968091965, 0.021643826737999916, 0.004109031055122614, -0.003592023393139243, 0.025425169616937637, -0.01515563391149044, -0.002672414295375347, 0.004821507725864649, -0.031394004821777344, -0.020054785534739494, -0.03940005972981453, -0.026535319164395332, -0.0008601813460700214, -0.006839997600764036, 0.0015442119911313057, -0.00016470423724967986, 0.02990935556590557, -0.05215631052851677, -0.03626912087202072, -0.01875314489006996, -0.051650043576955795, -0.07869338244199753, 0.0030369763262569904, 0.00527794286608696, 0.0020270063541829586, -0.008394027128815651, -0.010033924132585526, -0.011153298430144787, -0.011173557490110397, 0.0011849184520542622, -0.06681298464536667, 0.022051427513360977, 0.008709527552127838, 0.02372126281261444, 0.008715844713151455, 0.014903154224157333, 0.039225637912750244, -0.012722174637019634, -0.03332531824707985, 0.01924261823296547, -0.003029125276952982, 0.04118019714951515, 0.03732074052095413, 0.02848971076309681, -0.07620396465063095, -0.003691920079290867, 0.004481820855289698, 0.009667905047535896, -0.09082616120576859, 0.018578186631202698, 0.03880757838487625, 0.011724797077476978, 0.027790561318397522, 0.012107453308999538, -0.0011071772314608097, -0.01975821517407894, 0.009430872276425362, -0.0036672805435955524, -0.00043247046414762735, 0.022618334740400314, -0.03331616148352623, 0.0437176488339901, 0.018974578008055687, 0.005845760460942984, -0.06420368701219559, 0.0038735296111553907, -0.015376193448901176, 0.021261384710669518, -0.03877367451786995, -0.012813849374651909, -0.04081416502594948, -0.0624212920665741, -0.02799212746322155, 0.034294258803129196, -0.05030649155378342, -0.019187210127711296, 0.03791123628616333, -0.007225542329251766, -0.03470543399453163, 0.024835411459207535, -0.05163651332259178, 0.00207103556022048, -0.009794266894459724, -0.017841188237071037, -0.010866531170904636, 0.03254029527306557, -0.007600411772727966, 0.03317055106163025, -0.0006681425729766488, -0.03800112381577492, 0.012203138321638107, -0.02812897227704525, -0.008072089403867722, 0.05437594652175903, 0.0029549007304012775, -0.006984179839491844 ]
[ -0.05760255083441734, 0.008021118119359016, -0.014565699733793736, -0.006241942755877972, 0.058652523905038834, -0.021209822967648506, 0.014793356880545616, 0.019798336550593376, 0.013930137269198895, -0.018447941169142723, -0.009670129045844078, -0.030455220490694046, -0.004587419331073761, 0.0039051652420312166, 0.060102105140686035, 0.0018251121509820223, 0.01713073067367077, -0.050844211131334305, -0.013805046677589417, 0.024161940440535545, -0.01422522310167551, 0.01115389447659254, -0.030909840017557144, -0.0199471153318882, 0.009487511590123177, 0.03330665081739426, 0.036234479397535324, -0.03478238359093666, -0.008564095944166183, -0.2298218160867691, -0.0035397803876549006, -0.015250856988132, 0.05017108842730522, -0.00005632460306514986, 0.021134035661816597, 0.05067122355103493, 0.01688096486032009, 0.029258083552122116, -0.010317627340555191, 0.04768580570816994, 0.007529263384640217, 0.01573013886809349, -0.037074487656354904, -0.028413081541657448, 0.04834473878145218, 0.006698316894471645, -0.02741825394332409, -0.02507382445037365, -0.016481369733810425, 0.013493415899574757, -0.06984823197126389, -0.033005185425281525, -0.033578548580408096, -0.0033997143618762493, -0.01213699858635664, 0.008533175103366375, 0.042645279318094254, 0.05376933142542839, 0.011757002212107182, 0.013582554645836353, -0.0015268868301063776, -0.001543253194540739, -0.15839172899723053, 0.08838564157485962, -0.005039972718805075, 0.03617072477936745, -0.05046634376049042, -0.008954627439379692, -0.03245577961206436, 0.11099003255367279, 0.00030042845173738897, -0.0032882154919207096, -0.023309918120503426, 0.0700221136212349, -0.00007397084118565544, 0.0005955885862931609, 0.014281844720244408, -0.0004388382949400693, 0.047815509140491486, -0.03459356725215912, -0.04620790109038353, 0.04011577367782593, -0.006751779932528734, -0.0357169508934021, -0.006940991152077913, 0.007405545096844435, -0.014138567261397839, 0.034096673130989075, -0.005293151363730431, 0.008025534451007843, 0.04368576779961586, 0.010934100486338139, 0.03113156370818615, 0.019633620977401733, -0.08147301524877548, -0.062382519245147705, -0.003342337440699339, 0.007052143104374409, -0.012154783122241497, 0.4184010624885559, -0.03310735151171684, -0.02224225550889969, 0.0334293358027935, 0.012518057599663734, 0.008391143754124641, -0.01702743023633957, 0.0005243271589279175, -0.06562097370624542, 0.004170362371951342, -0.027186520397663116, 0.01898040808737278, -0.004887192975729704, 0.05409010127186775, -0.08325174450874329, 0.02610170654952526, 0.009817685931921005, 0.052751366049051285, 0.028466196730732918, 0.01281281653791666, 0.004274385049939156, -0.011468596756458282, 0.0035973950289189816, 0.01713401824235916, -0.012075554579496384, 0.028193291276693344, 0.006304038688540459, 0.06666181236505508, 0.060528241097927094, 0.03853101283311844, -0.011849270202219486, 0.049698587507009506, -0.02933608740568161, -0.08597783744335175, 0.022792043164372444, 0.0001997595973080024, -0.00268485676497221, 0.04068157821893692, -0.012211250141263008, 0.0015669484855607152, 0.009921658784151077, -0.0019095815951004624, -0.04085518792271614, 0.021750936284661293, -0.00714585417881608, -0.03717730939388275, 0.14298228919506073, -0.02197226881980896, -0.04674883559346199, -0.029288966208696365, -0.04986422136425972, 0.02045196108520031, 0.03243686258792877, 0.030552279204130173, -0.08032343536615372, 0.01339594554156065, 0.02414132095873356, 0.11037271469831467, -0.049615804105997086, -0.07060860097408295, -0.0135742062702775, -0.02309131994843483, -0.027703870087862015, -0.041321203112602234, 0.039200201630592346, 0.04652554169297218, -0.07412606477737427, -0.02848847024142742, 0.008825629949569702, -0.002395837800577283, -0.07449639588594437, 0.03816714882850647, 0.01657535322010517, -0.06408579647541046, 0.038188688457012177, 0.03533415496349335, -0.022475622594356537, -0.030696213245391846, 0.01125431526452303, 0.07589703053236008, -0.003463227301836014, -0.03365838900208473, 0.018948379904031754, -0.05088295415043831, 0.019161293283104897, -0.05579352378845215, -0.06401768326759338, -0.06252796947956085, -0.015490037389099598, 0.018935920670628548, -0.0183192640542984, -0.003165367990732193, -0.02288759872317314, -0.024176932871341705, 0.06470604240894318, -0.05241254344582558, -0.011431533843278885, 0.00219174032099545, 0.006278152111917734, -0.0382913239300251, -0.042653895914554596, -0.02820047363638878, 0.028482066467404366, 0.006048932671546936, 0.007074290886521339, -0.023349715396761894, 0.018928641453385353, 0.04015572369098663, -0.0454757995903492, 0.08766849339008331, 0.013582734391093254, -0.032731860876083374, -0.01476879883557558, -0.024697264656424522, 0.0006211191648617387, -0.010929499752819538, -0.03751788288354874, -0.012485659681260586, -0.019636020064353943, 0.015481382608413696, 0.05028793215751648, -0.02239077165722847, -0.038936976343393326, -0.03984248265624046, -0.3537507951259613, -0.028763411566615105, -0.009148333221673965, 0.0063043013215065, 0.02786885015666485, -0.060832709074020386, 0.013516088016331196, -0.030901595950126648, 0.0069891479797661304, 0.06072024628520012, 0.04900003969669342, -0.0161479189991951, -0.005572748836129904, -0.10496849566698074, 0.028825437650084496, 0.01903168112039566, -0.01889961212873459, -0.030679496005177498, -0.031211109831929207, 0.035691939294338226, 0.032598283141851425, -0.03234410285949707, -0.0056281075812876225, -0.06235792115330696, -0.0350114069879055, -0.041923776268959045, 0.1194847822189331, 0.019240204244852066, 0.048627469688653946, -0.026660801842808723, 0.04706214740872383, -0.00016386077913921326, 0.011908757500350475, -0.0629335269331932, 0.006077995523810387, -0.03806046396493912, -0.012685286812484264, 0.005999810062348843, -0.02330601029098034, -0.030878538265824318, -0.02474280819296837, 0.04464077204465866, -0.040028151124715805, -0.018039047718048096, -0.0642450824379921, 0.018464555963873863, -0.010872965678572655, -0.04857245460152626, -0.0014280467294156551, 0.06315308809280396, 0.015246342867612839, 0.046011876314878464, 0.014037738554179668, 0.02658306062221527, -0.018954593688249588, -0.028738632798194885, -0.0983724594116211, -0.0074168359860777855, -0.02030632272362709, -0.020194601267576218, 0.006624205037951469, 0.03696875646710396, 0.04944946989417076, -0.0438932366669178, -0.031016673892736435, 0.004216552712023258, 0.0012992873089388013, -0.0008240516763180494, 0.02458922564983368, -0.0072807203978300095, -0.03524069860577583, 0.09541942924261093, -0.002332060830667615, -0.011904403567314148, 0.019378017634153366, 0.03627796471118927, 0.0006471356609836221, 0.021060125902295113, 0.01757216639816761, -0.0068730139173567295, 0.05094633623957634, -0.009103409945964813, 0.0411037877202034, -0.011839435435831547, 0.033433686941862106, 0.03147415816783905, 0.03316555172204971, -0.033910010010004044, 0.06645230203866959, 0.04538864269852638, 0.023142321035265923, 0.02030385471880436, 0.007862255908548832, -0.019031783565878868, 0.05185774713754654, -0.01280705351382494, -0.25677841901779175, 0.035963885486125946, 0.05396656319499016, 0.08127637207508087, 0.02328546904027462, -0.006671841721981764, -0.00890558771789074, -0.05336093530058861, 0.017803339287638664, 0.008886921219527721, 0.014621560461819172, 0.045206379145383835, 0.009089088067412376, -0.04003724083304405, -0.023857083171606064, -0.014122840017080307, 0.08470743894577026, -0.0056767538189888, 0.026061225682497025, 0.028322389349341393, 0.04647078737616539, -0.03342476114630699, 0.17188236117362976, -0.011709349229931831, 0.013090187683701515, -0.013995356857776642, -0.018080659210681915, -0.006342730950564146, 0.031644221395254135, 0.02703164517879486, 0.00958026759326458, -0.019230851903557777, 0.058754775673151016, 0.026974044740200043, 0.030485043302178383, -0.034275121986866, -0.01458520907908678, 0.056585799902677536, 0.04993080720305443, -0.015299138613045216, -0.005500391125679016, 0.028019223362207413, -0.07742556929588318, 0.002926622051745653, 0.07727774232625961, -0.004648227710276842, 0.02750473842024803, -0.030968528240919113, -0.05735724791884422, 0.012004809454083443, -0.03180291876196861, -0.03340958058834076, -0.02000129036605358, -0.011128578335046768, 0.019673993811011314, 0.06999634951353073, 0.0221683531999588, -0.017136206850409508, 0.03473538160324097, -0.0005545765743590891, -0.028635133057832718, -0.05101850628852844, 0.10811272263526917, 0.033983323723077774, 0.01347359549254179 ]
[ 0.025836650282144547, 0.022542981430888176, -0.007612859830260277, 0.022057492285966873, 0.009088673628866673, 0.02554168924689293, 0.014046316966414452, 0.004241662099957466, -0.02494373545050621, 0.014316572807729244, -0.014168176800012589, 0.03604164347052574, 0.032939136028289795, -0.008818408474326134, -0.030592599883675575, -0.003832465037703514, -0.019123245030641556, -0.015145541168749332, 0.03594386205077171, -0.0023678105790168047, -0.027072135359048843, 0.06763280928134918, 0.01698901318013668, -0.02999102883040905, -0.02239731326699257, 0.02730841375887394, -0.04262809455394745, 0.004037101287394762, 0.020233944058418274, -0.09537268429994583, 0.009075879119336605, -0.029687147587537766, 0.030357535928487778, 0.014699146151542664, -0.0022740401327610016, -0.021954454481601715, -0.0300400722771883, 0.001947148353792727, -0.016233904287219048, 0.04740339145064354, -0.021850256249308586, -0.015141615644097328, 0.0024151101242750883, 0.008103540167212486, 0.02438972517848015, -0.0003607483522500843, -0.04083123803138733, -0.02480693720281124, -0.012102106586098671, 0.009093094617128372, -0.057359304279088974, 0.0031046655494719744, -0.0125764524564147, 0.02333040162920952, -0.009240594692528248, -0.01821528561413288, -0.0059875985607504845, -0.018835121765732765, -0.011605639010667801, -0.06786724925041199, 0.022022303193807602, -0.018271110951900482, -0.05094119533896446, -0.03451211377978325, -0.0069752647541463375, -0.019869530573487282, -0.011236915364861488, 0.028163917362689972, -0.011548949405550957, 0.033266082406044006, 0.0035947258584201336, 0.06013145670294762, -0.008643078617751598, -0.04693879187107086, -0.023296279832720757, -0.015641668811440468, 0.012104509398341179, -0.04868996888399124, 0.03462792560458183, 0.01585610955953598, -0.04762173444032669, 0.008692098781466484, 0.025462530553340912, -0.030811050906777382, -0.03857240825891495, -0.02973160147666931, 0.02579869143664837, 0.009006471373140812, 0.015924949198961258, 0.012661159038543701, -0.037008631974458694, -0.01873646304011345, 0.013120656833052635, -0.0012838977854698896, -0.10062188655138016, 0.033327069133520126, 0.017614683136343956, -0.015592332929372787, 0.0031855101697146893, 0.8513184785842896, 0.01406609546393156, -0.0007231159252114594, 0.0021207674872130156, -0.016020165756344795, 0.012118459679186344, 0.004670904949307442, 0.006016897968947887, -0.011092214845120907, 0.020472530275583267, -0.06450174003839493, -0.00796822551637888, 0.007247401867061853, 0.014441425912082195, 0.04071735590696335, 0.020230209454894066, 0.03180413320660591, 0.006526114419102669, 0.03779948502779007, 0.01118768472224474, 0.015611357986927032, 0.004012816119939089, -0.00225653825327754, 0.014659238047897816, 0.009833660908043385, -0.0034840921871364117, -0.13648240268230438, 0.011522839777171612, -7.259828866107462e-33, 0.018668020144104958, -0.03833089768886566, 0.005264521576464176, -0.00017244422633666545, 0.0025244487915188074, 0.003797919722273946, -0.010963933542370796, 0.016880501061677933, -0.007599722594022751, -0.03789174184203148, 0.0026217224076390266, 0.01170254684984684, 0.002031406620517373, -0.012615170329809189, 0.0377308614552021, -0.022726966068148613, 0.021022101864218712, 0.026753274723887444, 0.005143849644809961, 0.011434867978096008, 0.043891552835702896, 0.01461790595203638, 0.014615342952311039, 0.016877148300409317, -0.004241141024976969, 0.006967210676521063, 0.00024582361220382154, -0.041863251477479935, -0.025738442316651344, -0.04801090806722641, -0.053189717233181, 0.04832998663187027, 0.013863486237823963, -0.0459086038172245, 0.012288842350244522, -0.061877258121967316, -0.007206601556390524, 0.0066866385750472546, -0.009193201549351215, -0.07024331390857697, -0.025603918358683586, 0.030705539509654045, -0.011700330302119255, -0.0019499469781294465, -0.006687442306429148, 0.005743176676332951, 0.017743239179253578, 0.03008870780467987, 0.00037392330705188215, 0.005121103022247553, 0.020716991275548935, 0.006645937450230122, 0.011790077202022076, -0.006449672859162092, -0.013402493670582771, 0.029429711401462555, 0.01918630488216877, 0.020327895879745483, 0.014152107760310173, 0.0020233585964888334, 0.01237503718584776, -0.009894710965454578, 0.02471274323761463, 0.04103594273328781, 0.013753201812505722, -0.005441281478852034, 0.03463798016309738, 0.012923842296004295, 0.017761193215847015, 0.02632678858935833, -0.034347593784332275, 0.00787372887134552, -0.03186073154211044, -0.030854297801852226, -0.0018893745727837086, -0.040545687079429626, 0.01485428400337696, -0.00850033387541771, 0.003288505831733346, 0.034942373633384705, 0.02049979194998741, -0.0185380969196558, -0.03147744759917259, -0.03559233248233795, -0.0192855317145586, 0.011594784446060658, 0.033870864659547806, -0.005178562365472317, 0.00807065237313509, 0.0005767119582742453, 0.029522385448217392, 0.04023897275328636, -0.0003819647245109081, -0.01791689544916153, -0.01833529584109783, 7.06251258843034e-33, -0.017915058881044388, -0.042088884860277176, -0.03012620098888874, -0.0007035714806988835, 0.028703369200229645, 0.007653995882719755, 0.029078824445605278, 0.02994862012565136, -0.03204718604683876, 0.019570648670196533, -0.02483477257192135, -0.03709815815091133, -0.007901367731392384, 0.01594666950404644, 0.039235539734363556, 0.0017217369750142097, 0.005420574452728033, 0.02918926253914833, 0.006615644786506891, 0.01780812442302704, -0.013824675232172012, 0.024358076974749565, 0.007660993374884129, -0.0011004528496414423, 0.008474033325910568, 0.02371201477944851, -0.019973626360297203, -0.01961483247578144, -0.01774461939930916, 0.036665018647909164, 0.012977168895304203, -0.00918967742472887, -0.011139249429106712, 0.010600771754980087, -0.01445663534104824, 0.021660618484020233, -0.00421150540933013, -0.031155036762356758, -0.0018034063978120685, 0.034815747290849686, 0.050781648606061935, 0.03925228863954544, -0.02314472571015358, 0.012753305956721306, 0.009635011665523052, 0.028875378891825676, -0.03495250269770622, 0.018795805051922798, -0.01658009923994541, 0.01885361038148403, -0.028913037851452827, 0.009506967850029469, -0.011510283686220646, 0.027155159041285515, -0.004928970243781805, -0.02458326332271099, -0.04064974933862686, 0.006106659770011902, -0.059567466378211975, 0.0014784509548917413, -0.03582350164651871, 0.010696233250200748, -0.014435024932026863, 0.004582585766911507, 0.0023642920423299074, 0.018047235906124115, -0.05975870043039322, 0.011013949289917946, -0.0244346521794796, 0.027241671457886696, -0.036323461681604385, -0.01934647746384144, 0.00011257908772677183, 0.008913867175579071, -0.010250017046928406, 0.018678875640034676, -0.04875074699521065, -0.005192542914301157, -0.03024991601705551, 0.026961015537381172, 0.03596126660704613, 0.0007841630140319467, 0.015914667397737503, 0.012309374287724495, -0.0001160434985649772, 0.002816912718117237, -0.013268604874610901, -0.010206149891018867, 0.015552517957985401, 0.0010131624294444919, 0.0518474355340004, -0.028392691165208817, 0.020043402910232544, 0.008305924013257027, -0.004574671387672424, -1.291693241256553e-8, -0.0485776923596859, -0.0003712325997184962, -0.014498121105134487, 0.016224347054958344, 0.013664721511304379, -0.011575262993574142, -0.009476687759160995, 0.010036163032054901, -0.012002036906778812, 0.004266330040991306, 0.06708809733390808, -0.029237592592835426, -0.004135127644985914, 0.005634282249957323, 0.014021415263414383, -0.03149624168872833, 0.034037452191114426, 0.00491097429767251, 0.02601739764213562, -0.00337962806224823, 0.008793110027909279, 0.03064519166946411, -0.008855676278471947, 0.006177184637635946, -0.012807457707822323, 0.0017447551945224404, 0.035299673676490784, -0.08212674409151077, 0.005512929055839777, -0.022296126931905746, 0.014795097522437572, -0.05083177238702774, -0.053270187228918076, 0.01198974996805191, -0.006412244401872158, -0.009839426726102829, 0.00786465685814619, -0.0042707654647529125, 0.02425178699195385, 0.044535815715789795, -0.014929061755537987, -0.012317808344960213, -0.014654305763542652, -0.019822267815470695, -0.029051201418042183, -0.0013010427355766296, -0.03317808359861374, -0.031166767701506615, 0.03893179073929787, -0.04274725541472435, -0.013803139328956604, -0.011928738094866276, 0.02348039671778679, 0.02215355820953846, 0.04512344300746918, 0.010683140717446804, 0.029648633673787117, 0.02353823184967041, -0.040025461465120316, -0.025484340265393257, 0.03237156197428703, 0.028610847890377045, -0.03571899235248566, -0.0027647444512695074 ]
python-simplifying-the-creation-of-a-stop-word-list-with-defaultdict
https://markhneedham.com/blog/2015/03/22/python-simplifying-the-creation-of-a-stop-word-list-with-defaultdict
false
2015-03-22 01:28:33
Python: Forgetting to use enumerate
[ "python" ]
[ "Python" ]
Earlier this evening I found myself writing the equivalent of the following Python code while building a stop list for a topic model\... [source,python] ---- words = ["mark", "neo4j", "michael"] word_position = 0 for word in words: print word_position, word word_position +=1 ---- \...which is very foolish given that there's https://docs.python.org/2/library/functions.html#enumerate[already a function] that makes it really easy to grab the position of an item in a list: [source,python] ---- for word_position, word in enumerate(words): print word_position, word ---- Python does make things extremely easy at times - you're welcome future Mark!
null
null
[ 0.011453578248620033, -0.014815461821854115, -0.01663932204246521, 0.0315585695207119, 0.08212684839963913, 0.026483800262212753, -0.0008095610537566245, 0.01952553167939186, 0.01284297090023756, -0.009795382618904114, -0.00041930924635380507, 0.02173001877963543, -0.05728433281183243, 0.008175735361874104, 0.004945935215801001, 0.06289664655923843, 0.059216197580099106, -0.016881253570318222, -0.009644203819334507, -0.009256148710846901, 0.01726680062711239, 0.07496945559978485, -0.00440180441364646, 0.005813383497297764, 0.009485895745456219, 0.019307030364871025, -0.02522943913936615, -0.006308761425316334, -0.051770325750112534, -0.0034195980988442898, 0.020924031734466553, 0.017528193071484566, 0.0013185827992856503, -0.012943698093295097, 0.04938549920916557, -0.022582607343792915, -0.017471078783273697, 0.02042349800467491, -0.018735509365797043, 0.010881207883358002, -0.04673450067639351, -0.0037591191940009594, -0.045528873801231384, 0.018899235874414444, -0.0610092468559742, -0.00011229899246245623, -0.04345378279685974, 0.019310148432850838, -0.018785132095217705, 0.0012585363583639264, -0.06638773530721664, 0.06296733766794205, 0.0038388194516301155, -0.023702124133706093, -0.00678761163726449, 0.037484701722860336, 0.018895773217082024, -0.06888461112976074, 0.014031407423317432, -0.024852097034454346, -0.003038099966943264, -0.014812421053647995, 0.007738204672932625, 0.031047005206346512, 0.025230305269360542, -0.04688616842031479, -0.011355972848832607, 0.06049424782395363, -0.03890777379274368, 0.014519945718348026, -0.04313162341713905, 0.01563565619289875, -0.053978778421878815, 0.007993691600859165, -0.018050821498036385, -0.03957841917872429, 0.0018087666248902678, 0.07332998514175415, 0.023995544761419296, 0.07648936659097672, -0.009531226009130478, 0.0315038338303566, 0.0446152500808239, 0.017523394897580147, 0.0105659868568182, -0.015791838988661766, -0.04212092235684395, -0.025000298395752907, -0.03986228629946709, 0.030766906216740608, -0.015447476878762245, -0.07833635807037354, 0.0008677115547470748, 0.021209241822361946, -0.014513025060296059, 0.015168636105954647, -0.0015840952983126044, 0.015817943960428238, -0.006375209894031286, -0.018273381516337395, -0.04523900896310806, -0.06839827448129654, 0.02497236430644989, -0.002851883415132761, -0.07433072477579117, -0.02012486197054386, 0.005204085726290941, -0.00813656859099865, 0.02574422024190426, -0.001548908418044448, -0.034388210624456406, -0.003657802240923047, -0.042878154665231705, 0.00772471260279417, -0.09760444611310959, 0.04918175935745239, -0.008941685780882835, 0.0007961984956637025, -0.024781804531812668, -0.018406473100185394, 0.04286505654454231, 0.015556875616312027, 0.029640916734933853, 0.0862872526049614, 0.0016782013699412346, 0.014547654427587986, 0.007833913899958134, 0.07348901778459549, -0.004476179834455252, -0.07063402235507965, -0.03544792905449867, 0.051960624754428864, -0.023605626076459885, -0.003165540983900428, -0.010083797387778759, -0.001374706975184381, -0.023175928741693497, 0.03977012261748314, 0.056707534939050674, 0.044403739273548126, 0.012085329741239548, -0.025918394327163696, 0.00961039774119854, 0.006231161765754223, 0.009773348458111286, 0.011316505260765553, -0.01996358297765255, -0.0026643089950084686, -0.005164430011063814, 0.01998242735862732, -0.0018008542247116566, 0.007418147288262844, 0.036564651876688004, -0.009347743354737759, -0.006865273229777813, 0.06570304930210114, 0.016555434092879295, 0.052249811589717865, -0.0074957069009542465, 0.01896294578909874, 0.04985610023140907, 0.03478987142443657, 0.005250092130154371, 0.0666847974061966, 0.022727562114596367, -0.03075646236538887, -0.0036355231422930956, 0.05305294319987297, -0.015601125545799732, 0.007403196766972542, -0.02062017098069191, -0.035887692123651505, 0.06170905753970146, -0.047493524849414825, -0.003182235173881054, 0.020950378850102425, 0.06186715513467789, 0.023013116791844368, 0.04068848118185997, -0.0025734538212418556, -0.06750625371932983, 0.025986796244978905, -0.012182250618934631, 0.035550277680158615, 0.013957210816442966, -0.024968188256025314, 0.08236268162727356, 0.04399916157126427, 0.026344824582338333, -0.011259359307587147, -0.06010637804865837, -0.1037411317229271, -0.012141493149101734, -0.020276818424463272, 0.07996019721031189, -0.04325229302048683, -0.008507129736244678, 0.03589625656604767, 0.00289251864887774, 0.04815297946333885, 0.03147386386990547, -0.02298198640346527, 0.0016772192902863026, -0.025595232844352722, -0.041385721415281296, 0.03090771660208702, 0.0406375415623188, -0.0393814891576767, -0.050432849675416946, 0.03178941830992699, -0.017839906737208366, 0.03266596049070358, 0.03768547624349594, -0.012762685306370258, 0.02595851756632328, 0.028134943917393684, 0.06536642462015152, -0.00018560751050245017, 0.01970345340669155, -0.05128788203001022, 0.017519503831863403, -0.009042603895068169, -0.01094675064086914, -0.03951117768883705, 0.018815921619534492, 0.13425850868225098, 0.049578726291656494, -0.02269221656024456, -0.042105454951524734, 0.008172092959284782, -0.007970668375492096, -0.030690407380461693, 0.018369266763329506, -0.008821169845759869, -0.04692944139242172, 0.011997359804809093, -0.055160000920295715, -0.011176339350640774, 0.009486228227615356, -0.03023495338857174, -0.016828523948788643, 0.061017632484436035, -0.04067489877343178, 0.04999421909451485, 0.022123873233795166, -0.006576647982001305, 0.005861320998519659, -0.026681354269385338, -0.034070685505867004, 0.024989137426018715, 0.012475135736167431, -0.02047039195895195, 0.07230730354785919, -0.02372688800096512, -0.026603328064084053, -0.011380461044609547, -0.026018042117357254, 0.0022175682242959738, 0.08461881428956985, 0.04031744226813316, -0.011304122395813465, 0.06894378364086151, -0.03875071182847023, 0.01510179229080677, -0.025781115517020226, -0.06738265603780746, -0.04909275099635124, -0.04887113347649574, 0.00594607787206769, 0.04489973932504654, 0.03318685293197632, 0.011128989979624748, 0.02349584922194481, 0.0005724980146624148, 0.028574546799063683, -0.005865618586540222, 0.04387957230210304, 0.0032342353370040655, -0.007342267315834761, -0.0386795699596405, -0.005993572063744068, 0.036241061985492706, -0.04376848414540291, -0.0379365049302578, 0.010551032610237598, -0.03999881073832512, 0.04355502128601074, -0.04935514181852341, -0.036556798964738846, 0.016237618401646614, 0.004999780561774969, 0.030423054471611977, -0.021468214690685272, 0.008774598129093647, 0.05414707213640213, 0.009508375078439713, -0.020166639238595963, 0.007706182077527046, -0.008882624097168446, 0.017151115462183952, 0.0074745044112205505, 0.027863522991538048, 0.03225546330213547, -0.024785960093140602, -0.007271228823810816, -0.04018304869532585, 0.008251765742897987, -0.008549386635422707, -0.2761760950088501, 0.0668216198682785, -0.017875203862786293, -0.02500811591744423, 0.00998806394636631, -0.022520676255226135, 0.002742970362305641, -0.049483656883239746, 0.007770592346787453, 0.01823952980339527, -0.05303136259317398, -0.06265099346637726, -0.028082866221666336, 0.05091256648302078, 0.030501343309879303, 0.021054768934845924, -0.01193967740982771, -0.03416011109948158, -0.018738457933068275, 0.04888194426894188, 0.02600414864718914, -0.045200034976005554, -0.0034529739059507847, 0.040268220007419586, 0.019436517730355263, 0.06375071406364441, -0.0840144008398056, 0.031586822122335434, -0.07396693527698517, -0.0290676336735487, -0.0008291975245811045, -0.010045016184449196, 0.01315102819353342, -0.025775764137506485, -0.012061786837875843, -0.037032339721918106, 0.027112746611237526, -0.007721067871898413, -0.017477385699748993, 0.04686026647686958, -0.046623289585113525, -0.0524330772459507, 0.006134124472737312, -0.02216307818889618, 0.06620487570762634, 0.000334104843204841, -0.03701527789235115, -0.03734232857823372, -0.026248639449477196, 0.051802389323711395, -0.02365933731198311, -0.053229860961437225, 0.004002219997346401, 0.04506337642669678, -0.012138580903410912, -0.009826591238379478, 0.005930731538683176, 0.003644648939371109, -0.0412021279335022, -0.028049979358911514, -0.017445076256990433, -0.044056933373212814, 0.018415328115224838, -0.04720434173941612, 0.010136171244084835, -0.029634615406394005, -0.04967794567346573, 0.005610077641904354, 0.05667142570018768, 0.039482105523347855, -0.03670647740364075, 0.011378148570656776, -0.006566941272467375, -0.07965151965618134, -0.022440148517489433, -0.020389067009091377, -0.0007467003888450563, 0.005849811714142561, -0.0029563410207629204, 0.04320758208632469, -0.0701337680220604, -0.06567360460758209, 0.018644949421286583, 0.03331546485424042, 0.0028571533039212227, -0.039985619485378265, 0.02634335681796074, -0.03005576692521572, -0.03637348487973213, -0.009476960636675358, 0.06605572253465652, -0.02472713030874729, -0.014846744947135448, -0.00809896644204855, 0.018714599311351776, 0.03139660134911537, 0.04424440860748291, -0.002873634686693549, 0.02444339543581009, 0.02688342146575451, -0.0015064020408317447, -0.043468791991472244, 0.0022178187500685453, -0.030564753338694572, -0.01700240932404995, 0.014128519222140312, -0.04424174502491951, 0.012125501409173012, 0.04275818169116974, 0.0029109150636941195, -0.023303057998418808, 0.01433250680565834, 0.026435067877173424, -0.01454127300530672, 0.003379988484084606, -0.006269109435379505, 0.026005001738667488, 0.013263076543807983, 0.025712136179208755, -0.02064170502126217, -0.07824809849262238, 0.003323028329759836, -0.00970112718641758, -0.0015933692920953035, -0.05779781937599182, -0.05852843075990677, -0.01443085540086031, -0.02348664589226246, 0.008087222464382648, 0.019452985376119614, 0.012354109436273575, 0.03480463847517967, 0.03139840438961983, -0.043481145054101944, 0.03968310356140137, -0.02949945256114006, -0.020496640354394913, -0.03334074839949608, -0.0050909994170069695, 0.020392922684550285, -0.014655334874987602, -0.009584479033946991, -0.015712639316916466, 0.03548343479633331, 0.05070873349905014, 0.0019214682979509234, 0.013690490275621414, 0.00027060171123594046, 0.002262624679133296, 0.022325817495584488, 0.00021605490474030375, -0.017699940130114555, 0.002135300310328603, -0.05433919280767441, -0.016054527834057808, -0.011515196412801743, 0.05584479495882988, -0.028615234419703484, -0.03672260418534279, -0.019451400265097618, 0.04402358457446098, -0.03362355753779411, -0.002518953988328576, -0.011270767077803612, 0.011788398027420044, 0.022947298362851143, -0.030687114223837852, 0.04838711395859718, -0.012695541605353355, 0.01797207072377205, 0.04739300534129143, 0.021953795105218887, -0.046149443835020065, 0.012488092295825481, -0.0011221838649362326, -0.043623026460409164, 0.010196837596595287, 0.04893128201365471, -0.006828512996435165, -0.013868845999240875, 0.005078258458524942, -0.0218051690608263, 0.009683187119662762, 0.019317902624607086, 0.06800229847431183, 0.014621884562075138, -0.013806834816932678, -0.011243047192692757, -0.02305305376648903, -0.035380154848098755, -0.03770393505692482, -0.007512753363698721, -0.022083761170506477, 0.004651851020753384, -0.012692958116531372, -0.07444553822278976, -0.0009593002614565194, 0.0016469579422846437, -0.022443052381277084, 0.000561740598641336, -0.022899752482771873, -0.005841874983161688, -0.044370707124471664, 0.003915179055184126, 0.04650407284498215, -0.05447756126523018, 0.002136381110176444, -0.032663993537425995, -0.0009457823471166193, 0.017226960510015488, -0.010653212666511536, -0.04671841114759445, -0.025235462933778763, -0.010087023489177227, 0.0022040025796741247, 0.006788355298340321, -0.049234651029109955, -0.017384374514222145, -0.022448988631367683, -0.020495716482400894, 0.028402894735336304, -0.030687009915709496, 0.027192195877432823, -0.047259483486413956, -0.006327793933451176, 0.01950766332447529, -0.022181162610650063, -0.0010817351285368204, 0.0347222238779068, -0.019811853766441345, 0.028088334947824478, -0.02525116503238678, 0.04675140976905823, 0.015346656553447247, -0.010731789283454418, -0.012783599086105824, -0.0698227509856224, 0.012259205803275108, -0.022002695128321648, 0.06332984566688538, 0.01004838664084673, 0.00359108904376626, -0.05296271666884422, -0.005942226853221655, -0.04156000167131424, 0.034288737922906876, 0.008382744155824184, -0.051152557134628296, -0.01107998751103878, 0.08495699614286423, 0.01984606869518757, 0.02837551385164261, 0.0045020864345133305, -0.039624832570552826, 0.046771302819252014, -0.0383022166788578, -0.04566027224063873, -0.010163439437747002, -0.04991322383284569, 0.015424596145749092, 0.034517496824264526, 0.03153286501765251, -0.05121203511953354, 0.04504211246967316, 0.03279183432459831, 0.0534774474799633, 0.02122879959642887, -0.008046112954616547, 0.0151801947504282, -0.014631104655563831, 0.02643986977636814, -0.09275953471660614, -0.041512466967105865, 0.055292218923568726, 0.03201555460691452, -0.039180412888526917, -0.03876595199108124, -0.014213008806109428, 0.020137706771492958, -0.07509353756904602, -0.02049621008336544, 0.06530214846134186, 0.024023134261369705, 0.004726318176835775, 0.012054858729243279, -0.047029875218868256, 0.03252413868904114, 0.039395496249198914, -0.03043278679251671, -0.014766095206141472, -0.039188411086797714, 0.07156737148761749, -0.034557972103357315, 0.0476410835981369, -0.006237378343939781, -0.019099226221442223, 0.08021800220012665, 0.040984317660331726, 0.012726648710668087, 0.034094616770744324, -0.03634609282016754, 0.02533426322042942, 0.06930095702409744, -0.017100492492318153, -0.012989538721740246, 0.037438180297613144, -0.002292662626132369, -0.06872139126062393, 0.01150703988969326, 0.004402725026011467, -0.002888507442548871, -0.03434443846344948, 0.07431817054748535, 0.014779235236346722, -0.026576515287160873, -0.03897887468338013, 0.03714083880186081, -0.04827534407377243, -0.005455004516988993, -0.03215726464986801, -0.015109537169337273, -0.0489298440515995, 0.06071893125772476, 0.006280627567321062, 0.0028901482000947, 0.06929049640893936, -0.03851841390132904, -0.007802103646099567, 0.009782166220247746, 0.06998217850923538, 0.08577123284339905, 0.07286715507507324, -0.015006533823907375, 0.05477483570575714, -0.024677995592355728, -0.053986355662345886, -0.011237254366278648, -0.025342727079987526, 0.02327190339565277, 0.01663230173289776, 0.019815057516098022, 0.05949552357196808, -0.0309124905616045, 0.059703610837459564, -0.018888777121901512, 0.010851290076971054, -0.011343230493366718, 0.03710354119539261, 0.0019947069231420755, 0.05959276109933853, 0.03310693800449371, 0.03940153494477272, -0.04879571124911308, -0.035977378487586975, 0.04701145365834236, -0.02238842472434044, -0.007756562437862158, 0.039352260529994965, -0.010464738123118877, 0.0033273682929575443, 0.036710724234580994, 0.05382515490055084, 0.10615162551403046, -0.029938004910945892, -0.021522274240851402, 0.01080472394824028, 0.019047865644097328, 0.005835035815834999, 0.024398107081651688, 0.004914926830679178, 0.02779579535126686, 0.0019868977833539248, -0.03788638114929199, -0.005975395906716585, -0.03592976555228233, -0.04050865396857262, 0.029698073863983154, -0.028305770829319954, 0.0035275632981210947, -0.0035422027576714754, 0.006041145883500576, -0.026571106165647507, -0.04785216599702835, -0.0290354136377573, -0.03169795125722885, -0.08458859473466873, -0.026867780834436417, 0.017251363024115562, -0.002637675032019615, -0.03296370059251785, -0.0192242581397295, -0.02768980897963047, -0.0021767725702375174, 0.0021202703937888145, -0.043760161846876144, 0.003734610043466091, 0.014586389996111393, 0.04074271768331528, 0.022640416398644447, 0.01111532561480999, 0.03391505405306816, 0.004537547007203102, -0.02674752287566662, 0.023638222366571426, 0.009634767659008503, 0.047373946756124496, 0.02600407414138317, 0.001214768155477941, -0.08998768776655197, 0.004587102215737104, 0.027716610580682755, 0.02423885650932789, -0.07953988760709763, 0.014639603905379772, 0.027187485247850418, -0.002478497102856636, 0.04175674915313721, -0.02203931100666523, 0.005925951059907675, -0.037396788597106934, -0.005334980320185423, 0.004962160252034664, -0.01643543690443039, 0.008912096731364727, -0.029873104766011238, 0.062274254858493805, 0.026074795052409172, -0.0015610994305461645, -0.04229612275958061, -0.0235785823315382, -0.007446748670190573, 0.0024474228266626596, -0.06529360264539719, -0.053840093314647675, -0.04101086035370827, -0.06296052783727646, -0.008286034688353539, 0.027890529483556747, -0.027705326676368713, -0.02282453514635563, 0.018331149592995644, 0.033569417893886566, -0.031100962311029434, 0.05749184638261795, -0.05343027412891388, 0.0044947778806090355, -0.029793983325362206, 0.004234085790812969, 0.0017526890151202679, 0.027368362993001938, -0.007536198943853378, 0.03603598475456238, -0.001253484282642603, -0.01566549576818943, 0.02900441735982895, -0.014243957586586475, 0.008463532663881779, 0.01857777126133442, -0.014257706701755524, 0.03308281674981117 ]
[ -0.07450622320175171, -0.02843233197927475, -0.022398846223950386, -0.01099065039306879, 0.026578035205602646, -0.030206093564629555, 0.0010774147231131792, 0.027685508131980896, 0.03524697944521904, -0.0043083904311060905, -0.003092493861913681, -0.027882196009159088, 0.0091649005189538, 0.014373891055583954, 0.06360554695129395, -0.021260468289256096, -0.008772004395723343, -0.06074732542037964, -0.003951047081500292, 0.02378980442881584, 0.03951340541243553, 0.01712673157453537, -0.03607148677110672, -0.03350057080388069, 0.00784034188836813, 0.043050579726696014, 0.015355223789811134, -0.02651803381741047, -0.022093679755926132, -0.21813331544399261, 0.009457592852413654, 0.00452710036188364, 0.02679467387497425, 0.003115312894806266, 0.009138630703091621, 0.04572116583585739, 0.0014143554726615548, 0.022679053246974945, -0.0018999059684574604, 0.0598754808306694, 0.01665298268198967, 0.029202943667769432, -0.06742526590824127, -0.02194111794233322, 0.05562388896942139, -0.0030230432748794556, -0.02881683222949505, -0.02017580345273018, 0.002404183382168412, 0.006142354570329189, -0.07036671042442322, -0.020892634987831116, -0.03319408744573593, -0.020651474595069885, 0.019869709387421608, 0.019921066239476204, 0.046113837510347366, 0.052590303122997284, 0.017828116193413734, 0.016084225848317146, 0.01287813764065504, -0.008346880786120892, -0.13189174234867096, 0.09277492016553879, 0.005133538506925106, 0.03430643305182457, -0.04240717366337776, -0.012603172101080418, -0.021653616800904274, 0.11467741429805756, 0.011869731359183788, -0.03762040659785271, -0.02727409638464451, 0.08068445324897766, 0.007752099074423313, -0.013806144706904888, 0.004714333917945623, 0.004453936591744423, 0.03705428168177605, -0.026210933923721313, -0.04208333045244217, 0.002424689009785652, -0.023319335654377937, -0.019634800031781197, -0.025297043845057487, 0.020411504432559013, -0.010869021527469158, 0.05590226128697395, 0.02820909209549427, 0.0072577646933496, 0.04848024994134903, -0.016215071082115173, 0.019347913563251495, 0.031222829595208168, -0.061349958181381226, -0.034115567803382874, 0.010406346060335636, 0.005920027382671833, -0.04173275828361511, 0.43402960896492004, -0.026762308552861214, 0.002771824598312378, 0.034485720098018646, 0.0014765033265575767, 0.003727894276380539, -0.02452983893454075, 0.010610640048980713, -0.0643656924366951, -0.013740703463554382, -0.04161501303315163, 0.006006571929901838, -0.01032113004475832, 0.0795949399471283, -0.07599778473377228, 0.005135789047926664, 0.009565039537847042, 0.02553197555243969, 0.01589885540306568, 0.01184075977653265, -0.00044541197712533176, -0.033517684787511826, 0.004227117169648409, -0.008423889987170696, 0.005879238247871399, 0.008385617285966873, 0.004229182843118906, 0.043248701840639114, 0.072874054312706, 0.030637240037322044, 0.03191019967198372, 0.06190783903002739, -0.025544743984937668, -0.053922343999147415, 0.026705974712967873, -0.004819075111299753, 0.011737784370779991, 0.03696655482053757, -0.014794300310313702, 0.0280576441437006, 0.025651779025793076, -0.007533060386776924, -0.06663023680448532, -0.0011422334937378764, 0.011838261038064957, -0.0008302494534291327, 0.13178208470344543, -0.03886976093053818, -0.03383215144276619, -0.029125241562724113, -0.03247090429067612, -0.016502192243933678, 0.04077930003404617, 0.018849004060029984, -0.07252431660890579, 0.007718284614384174, 0.03576825186610222, 0.10416990518569946, -0.029155882075428963, -0.05533217266201973, -0.022073037922382355, -0.035849157720804214, -0.013161938637495041, -0.04863252118229866, 0.028084343299269676, 0.028873631730675697, -0.10577339679002762, -0.024584101513028145, 0.0016270865453407168, -0.012613990344107151, -0.07945875823497772, 0.03827551379799843, 0.010211832821369171, -0.06095750257372856, 0.01640397123992443, 0.052820395678281784, -0.006430844776332378, -0.030536320060491562, 0.008549137972295284, 0.0790882334113121, 0.017122771590948105, -0.0290190652012825, 0.0053506093099713326, -0.060912854969501495, -0.018205244094133377, -0.043842606246471405, -0.05484488606452942, -0.07870646566152573, 0.006109303329139948, -0.0072661531157791615, -0.020251428708434105, -0.005780127365142107, -0.017694009467959404, -0.05932718887925148, 0.05597103387117386, -0.0767194926738739, -0.03803698718547821, 0.018727203831076622, 0.00940139964222908, -0.007450880017131567, -0.019489461556077003, 0.005383969284594059, 0.017761994153261185, -0.022972481325268745, 0.026356983929872513, -0.039609868079423904, 0.016220582649111748, 0.06196843832731247, -0.029724402353167534, 0.10570358484983444, 0.009113905020058155, -0.052514947950839996, -0.040197938680648804, 0.011490583419799805, 0.004157680552452803, -0.02289952151477337, -0.05468359962105751, -0.022725390270352364, 0.0012353920610621572, 0.030668487772345543, 0.008188774809241295, -0.044205620884895325, -0.055143821984529495, -0.01929830014705658, -0.34160321950912476, -0.03050798550248146, 0.006534038111567497, 0.006888934876769781, 0.02638031169772148, -0.053571298718452454, 0.013991673476994038, -0.009183738380670547, -0.01525913830846548, 0.021854596212506294, 0.05682781711220741, -0.032858625054359436, 0.023700473830103874, -0.08776885271072388, -0.020726565271615982, 0.02598840370774269, -0.04455935209989548, -0.03920595347881317, -0.008953736163675785, 0.05894720181822777, 0.0258797574788332, -0.02348695695400238, -0.05167544633150101, -0.04808003827929497, -0.019390469416975975, -0.03992580994963646, 0.13411734998226166, 0.019764309749007225, 0.07008768618106842, -0.002515190513804555, 0.04867120459675789, -0.009559563361108303, -0.004044810310006142, -0.06774087995290756, -0.001860810094512999, 0.004562837537378073, -0.011862237937748432, 0.019414210692048073, 0.000027293848688714206, -0.023992333561182022, -0.0255467239767313, 0.039260514080524445, -0.03127294033765793, -0.015409180894494057, -0.03180892765522003, 0.030433151870965958, -0.021171726286411285, -0.03437059745192528, 0.00007196656952146441, 0.1068153828382492, 0.01822911761701107, 0.009592266753315926, 0.014684736728668213, 0.015561369247734547, 0.009319177828729153, -0.03635546192526817, -0.07021346688270569, -0.013734456151723862, 0.00943207647651434, -0.010120194405317307, 0.020056024193763733, 0.022325171157717705, 0.03911003842949867, -0.0338166207075119, -0.035850103944540024, 0.012562642805278301, 0.0022427865769714117, -0.0183974988758564, 0.023396769538521767, -0.01509143877774477, -0.014508426189422607, 0.10172116756439209, 0.026650438085198402, 0.013317239470779896, -0.00025341883883811533, 0.03680253401398659, -0.012709429487586021, 0.0235972348600626, 0.018126513808965683, -0.02406332455575466, 0.026299811899662018, 0.009388459846377373, 0.0518018938601017, -0.008429905399680138, -0.002460372867062688, 0.032150425016880035, 0.019423656165599823, -0.02661389857530594, 0.07028539478778839, 0.02170390635728836, -0.01104239746928215, 0.012525592930614948, -0.003963784780353308, 0.004915305413305759, 0.06672438234090805, -0.022513113915920258, -0.2740477919578552, 0.01723964884877205, 0.037653371691703796, 0.060628458857536316, 0.002273153280839324, 0.021926933899521828, 0.001383566646836698, -0.059760719537734985, -0.015596726909279823, 0.017804240807890892, -0.02279256097972393, 0.046123798936605453, -0.0025894863065332174, -0.02143438160419464, -0.017281748354434967, -0.00011730237019946799, 0.05052458494901657, -0.008573045954108238, 0.008588454686105251, 0.03699216991662979, 0.04890799522399902, 0.00934577826410532, 0.1971469521522522, -0.00013791407400276512, 0.029820479452610016, -0.0006031394586898386, -0.01750507950782776, 0.01720587909221649, 0.04759371653199196, 0.023108819499611855, 0.011588877998292446, -0.00718526728451252, 0.034209780395030975, -0.003731394186615944, 0.024513300508260727, -0.039615195244550705, -0.017326809465885162, 0.03612269088625908, 0.054604291915893555, -0.01952306367456913, -0.007220711559057236, 0.026073934510350227, -0.05786852166056633, 0.00791868008673191, 0.06752718985080719, 0.026024524122476578, 0.019167836755514145, -0.04179081693291664, -0.03386560454964638, 0.013482085429131985, -0.04900650680065155, -0.024364322423934937, -0.015224484726786613, -0.0004452132270671427, 0.0105880843475461, 0.06265659630298615, 0.005392802879214287, -0.03474786877632141, 0.0012889927020296454, 0.00516303488984704, -0.021884575486183167, -0.05395848676562309, 0.12032771110534668, 0.018163569271564484, 0.006775340996682644 ]
[ 0.014513300731778145, 0.041167646646499634, 0.011207559145987034, 0.019062615931034088, 0.026027442887425423, 0.023540068417787552, -0.019681289792060852, -0.007554619573056698, -0.01885809749364853, 0.004716172348707914, -0.021741701290011406, 0.06089788302779198, 0.027697313576936722, 0.01991264335811138, -0.00732262572273612, 0.031440846621990204, 0.011855289340019226, 0.04806707426905632, 0.044373128563165665, -0.026961058378219604, -0.04227038472890854, 0.09170140326023102, 0.04040665179491043, 0.03223083168268204, -0.045486848801374435, 0.010206368751823902, -0.05664863809943199, -0.0003363519790582359, 0.0013475528685376048, -0.1189163327217102, -0.00762140704318881, -0.04781037196516991, 0.0033594337292015553, -0.006151874549686909, 0.034612495452165604, -0.008097447454929352, -0.014417003840208054, -0.007056648842990398, 0.03272009268403053, 0.02519838511943817, 0.005716250278055668, -0.022494353353977203, -0.0364815779030323, -0.03776898235082626, 0.036655064672231674, 0.03747081011533737, -0.013797304593026638, 0.008432053029537201, 0.0089941481128335, -0.0075614978559315205, -0.04313729330897331, -0.006215686909854412, -0.03313484415411949, 0.011844541877508163, 0.006935265846550465, 0.03225983679294586, 0.02583211474120617, -0.04839514195919037, -0.0028085310477763414, -0.052849896252155304, 0.048355475068092346, 0.017015807330608368, -0.0793612077832222, -0.01795189641416073, -0.03109912946820259, -0.015795594081282616, -0.011727810837328434, 0.02379346266388893, 0.0076338788494467735, 0.03189396113157272, -0.0025511751882731915, 0.03167570382356644, 0.010232030414044857, -0.051170505583286285, 0.03589852899312973, -0.05167154595255852, 0.05492445454001427, -0.05398854613304138, 0.030328556895256042, 0.0132132638245821, -0.00014118039689492434, -0.018834766000509262, 0.028183048591017723, -0.009366409853100777, -0.024309992790222168, -0.03788067400455475, 0.032231420278549194, 0.00114266702439636, 0.027286380529403687, 0.013197691179811954, -0.049357328563928604, -0.03941464051604271, 0.027055516839027405, -0.009647085331380367, -0.0785193145275116, 0.026832176372408867, -0.014500780962407589, -0.02578127197921276, -0.015294007956981659, 0.7689202427864075, 0.023056646808981895, -0.04157049208879471, -0.00783249270170927, 0.0007243248401209712, 0.04057655483484268, -0.014114192686975002, -0.026105185970664024, -0.051021307706832886, -0.007776516955345869, -0.041683927178382874, -0.014043739065527916, -0.0211950596421957, -0.015933480113744736, 0.0264597050845623, 0.036353934556245804, 0.008600350469350815, 0.018874846398830414, 0.04832034558057785, 0.027457157149910927, -0.025314699858427048, 0.04672384262084961, 0.029391348361968994, 0.034743599593639374, 0.0059210085310041904, -0.02772093564271927, -0.09412901848554611, 0.024908363819122314, -7.966813780362203e-33, 0.02320234291255474, -0.05414319410920143, 0.025413211435079575, 0.027341661974787712, 0.019103849306702614, 0.03806352615356445, -0.04498233646154404, 0.016044573858380318, 0.008760552853345871, -0.01842549256980419, 0.0075176069512963295, -0.01568126305937767, 0.03586085885763168, 0.015731219202280045, 0.06782252341508865, -0.008015387691557407, 0.027893733233213425, 0.03919726237654686, -0.054090715944767, 0.023165760561823845, 0.018873298540711403, 0.0007812585681676865, -0.012984140776097775, 0.031318195164203644, -0.007370173931121826, 0.051124412566423416, -0.03623827174305916, -0.009422828443348408, -0.03785741701722145, -0.043650127947330475, -0.09094817191362381, -0.004035420250147581, 0.03299163281917572, -0.018403390422463417, 0.012123124673962593, -0.054129838943481445, -0.027225574478507042, -0.0284796841442585, 0.015461756847798824, -0.12869924306869507, -0.027654770761728287, 0.02269056811928749, -0.011853191070258617, -0.024850141257047653, -0.020511092618107796, -0.03735103830695152, 0.004995068535208702, 0.04832776263356209, 0.011199681088328362, 0.07343276590108871, 0.0410350002348423, 0.0035586284939199686, -0.03275950998067856, 0.0268915556371212, -0.04833114519715309, -0.04028213024139404, 0.01161097176373005, 0.016905874013900757, 0.019682329148054123, -0.0373091883957386, -0.005367117468267679, -0.0006803162395954132, 0.043926872313022614, 0.024960925802588463, 0.014676219783723354, -0.011276036500930786, -0.01607716828584671, 0.02952682413160801, 0.0016503646038472652, 0.058737121522426605, -0.03075619600713253, -0.011945988051593304, -0.007329261861741543, -0.0030721998773515224, -0.019655531272292137, -0.053485527634620667, -0.03865598887205124, -0.07288753241300583, -0.008983459323644638, 0.08372710645198822, 0.04294286295771599, -0.031865693628787994, 0.00038792291888967156, -0.028451230376958847, 0.016420185565948486, -0.022478913888335228, 0.043344125151634216, 0.008293652907013893, 0.03419413045048714, -0.0070519642904400826, -0.019614053890109062, 0.012961016967892647, 0.019602706655859947, 0.02489549294114113, -0.02935076132416725, 7.345320366190859e-33, 0.026463884860277176, -0.020643582567572594, -0.009075263515114784, -0.011351590976119041, -0.024472447112202644, -0.010492832399904728, 0.042836349457502365, 0.005876809824258089, -0.02819436602294445, 0.061882250010967255, 0.020359985530376434, -0.02905219979584217, -0.011746411211788654, 0.03130078688263893, 0.0647696927189827, 0.0014082485577091575, 0.0021382395643740892, 0.03411363810300827, 0.007881066761910915, -0.0283748060464859, -0.032755881547927856, -0.00028250933974049985, -0.016910871490836143, 0.017295707017183304, -0.0010386165231466293, 0.011807103641331196, -0.01188828144222498, -0.03927208110690117, -0.002052868017926812, 0.06295987963676453, 0.01623353362083435, 0.018208276480436325, 0.023624854162335396, 0.05681417137384415, -0.003261410631239414, 0.02395772375166416, -0.03261648118495941, -0.03325415775179863, 0.02448149397969246, 0.018851036205887794, 0.05376216024160385, 0.05270892381668091, -0.007315417286008596, 0.024075906723737717, 0.015113814733922482, 0.0061818878166377544, -0.02732897363603115, 0.04189653322100639, -0.0003540034231264144, 0.018601160496473312, -0.025058982893824577, 0.0597284696996212, 0.017299151048064232, 0.01948421448469162, -0.0026415653992444277, -0.03419298678636551, -0.06672783195972443, 0.027306143194437027, -0.042208295315504074, -0.017703065648674965, -0.021454600617289543, 0.0015875138342380524, 0.0011980534764006734, -0.01655862107872963, 0.005662170238792896, 0.005018969997763634, -0.06725223362445831, 0.008555876091122627, -0.033746033906936646, -0.04147878289222717, 0.0051275514997541904, 0.01811809279024601, -0.048629164695739746, 0.03240085020661354, -0.02720087394118309, 0.009989204816520214, -0.05624951049685478, -0.017478497698903084, -0.04247765988111496, 0.004155690316110849, 0.01135973259806633, -0.013825011439621449, -0.0040863086469471455, 0.03521764278411865, -0.024104474112391472, 0.0024184861686080694, -0.043971482664346695, -0.010133305564522743, 0.007748562376946211, -0.007108809892088175, 0.05081716179847717, -0.03761943057179451, 0.024026894941926003, 0.038508474826812744, -0.01466717291623354, -1.242618452579336e-8, -0.09262260049581528, -0.0022711774799972773, -0.004508917685598135, 0.017210308462381363, -0.0288355965167284, 0.03760087862610817, -0.0158199742436409, -0.00033166471985168755, 0.014923698268830776, 0.031258393079042435, 0.04433899372816086, -0.02667805552482605, 0.0024157424923032522, 0.036438312381505966, 0.005697090178728104, 0.03370514512062073, 0.021268578246235847, 0.014947673305869102, 0.028332021087408066, 0.0041939690709114075, 0.02318713255226612, 0.03231430426239967, -0.020301932469010353, -0.026381950825452805, -0.013774578459560871, -0.028006482869386673, 0.027048198506236076, -0.06858723610639572, 0.008859509602189064, -0.031522952020168304, 0.04965599626302719, -0.056560222059488297, -0.04336518049240112, 0.022944195196032524, -0.006141016259789467, -0.008233080618083477, -0.012287805788218975, 0.01798180863261223, 0.01705140620470047, 0.039450179785490036, -0.017154362052679062, -0.008716655895113945, -0.04296223074197769, 0.00023282297479454428, -0.008572258055210114, -0.029176384210586548, -0.04497005045413971, -0.05292828008532524, 0.02590726874768734, 0.002426493214443326, -0.003762874286621809, 0.0029480503872036934, 0.046122778207063675, -0.028694890439510345, 0.0376296192407608, 0.02899477630853653, -0.0167864803224802, -0.012054569087922573, -0.0194749403744936, -0.01469140313565731, 0.03065504878759384, 0.03264714404940605, -0.029677335172891617, 0.03984666243195534 ]
python-forgetting-to-use-enumerate
https://markhneedham.com/blog/2015/03/22/python-forgetting-to-use-enumerate
false
2015-04-03 23:31:33
How I met your mother: Story arcs
[ "machine-learning-2" ]
[ "Machine Learning" ]
After weeks of playing around with various algorithms to extract story arcs in How I met your mother I've come to the conclusion that I don't yet have the skills to completely automate this process so I'm going to change my approach. The new plan is to treat the outputs of the algorithms as suggestions for possible themes but then have a manual step where I extract what I think are interesting themes in the series. A theme can consist of a single word or a phrase and the idea is that once a story arc is identified we'll search over the corpus and find the episodes where that phrase occurs. We can then generate a CSV file of (story arc) \-> (episodeId), store that into our HIMYM graph and use the story arc as another factor for episode similarity. I ended up with the following script to work out https://raw.githubusercontent.com/mneedham/neo4j-himym/master/data/import/sentences.csv[which episodes contained a story arc]: [source,bash] ---- #!/bin/bash find_term() { arc=${1} searchTerm=${2} episodes=$(grep --color -iE "${searchTerm}" data/import/sentences.csv | awk -F"," '{ print $2 }' | sort | uniq) for episode in ${episodes}; do echo ${arc},${episode} done } find_term "Bro Code" "bro code" find_term "Legendary" "legen(.*)ary" find_term "Slutty Pumpkin" "slutty pumpkin" find_term "Magician's Code" "magician's code" find_term "Thanksgiving" "thanksgiving" find_term "The Playbook" "playbook" find_term "Slap Bet" "slap bet" find_term "Wrestlers and Robots" "wrestlers" find_term "Robin Sparkles" "sparkles" find_term "Blue French Horn" "blue french horn" find_term "Olive Theory" "olive" find_term "Thank You Linus" "thank you, linus" find_term "Have you met...?" "have you met" find_term "Laser Tag" "laser tag" find_term "Goliath National Bank" "goliath national bank" find_term "Challenge Accepted" "challenge accepted" find_term "Best Man" "best man" ---- If we run this script we'll see something like the following: [source,bash] ---- $ ./scripts/arcs.sh Bro Code,14 Bro Code,155 Bro Code,170 Bro Code,188 Bro Code,201 Bro Code,61 Bro Code,64 Legendary,117 Legendary,120 Legendary,122 Legendary,136 Legendary,137 Legendary,15 Legendary,152 Legendary,157 Legendary,162 Legendary,171 ... Best Man,208 Best Man,30 Best Man,32 Best Man,41 Best Man,42 ---- I pulled out these themes by eyeballing the output of the following scripts: * https://github.com/mneedham/neo4j-himym/blob/master/scripts/scikit_ngram.py[TF/IDF] - calculates TF/IDF scores for ngrams. This helps find important themes in the context of a single episode. I then did some manual searching to see how many of those themes existed in other episodes * https://github.com/mneedham/neo4j-himym/blob/master/scripts/tfidf_special.py[Weighted Term Frequency] - this returns a weighted term frequency for ngrams of different lengths. The weights are determined by the http://www.markhneedham.com/blog/2015/03/30/python-creating-a-skewed-random-discrete-distribution/[skewed random discrete distribution I wrote about earlier in the week]. I ran it with different skews and ngram lengths. * https://github.com/mneedham/topic-modelling-mallet/blob/master/ner.py[Named entity extraction] - this pulls out any phrases that are named entities. It mostly pulled out names of people (which I used as a stop word list in some other algorithms) but also revealed a couple of themes. * https://github.com/mneedham/topic-modelling-mallet/blob/master/train_himym.sh[Topic modelling] - I used http://mallet.cs.umass.edu/[mallet] to extract topics across the corpus. Most of them didn't make much sense to me but there were a few which identified themes that I recognised. I can't remember off the top of my head if any obvious themes have been missed so if you know HIMYM better than me let me know and I'll try and work out why those didn't surface. Next I want to see how these scripts fare against some other TV shows and see how quickly I can extract themes for those. It'd also be cool if I can make the whole process a bit more automated.
null
null
[ -0.00739446934312582, 0.017175396904349327, -0.010385451838374138, 0.04751913622021675, 0.08172886818647385, 0.009939988143742085, 0.010023844428360462, 0.037505801767110825, 0.009697088971734047, -0.0042908405885100365, -0.03573385253548622, 0.01006786897778511, -0.040238555520772934, 0.017428942024707794, -0.03094152733683586, 0.0787258967757225, 0.04723929241299629, 0.003629355924203992, 0.00439445348456502, -0.0070894635282456875, -0.0009661304065957665, 0.0519581139087677, 0.023092687129974365, 0.041577473282814026, 0.009475898928940296, -0.004648721311241388, -0.004350221250206232, 0.0041940598748624325, -0.055744219571352005, 0.00292834616266191, 0.03595215454697609, -0.04381360113620758, 0.0069655971601605415, -0.009149034507572651, 0.011036409065127373, -0.019961893558502197, -0.03154277428984642, 0.01752043515443802, 0.0009047631756402552, 0.0007123479736037552, -0.07222450524568558, 0.027834733948111534, -0.027272086590528488, -0.02311345376074314, -0.03692121431231499, -0.02013768069446087, -0.05222242698073387, 0.018415164202451706, -0.0005523036234080791, -0.02303265780210495, -0.03772014006972313, 0.053671956062316895, -0.0021820683032274246, -0.018048623576760292, -0.011956647969782352, 0.056515179574489594, 0.026043778285384178, -0.08435866981744766, 0.022173812612891197, -0.007272100541740656, -0.022483767941594124, -0.013674947433173656, -0.008292088285088539, 0.02266707271337509, 0.005215929355472326, -0.037568628787994385, -0.013969816267490387, 0.0595686174929142, -0.0466398186981678, -0.017603997141122818, -0.036247264593839645, 0.007379422429949045, -0.010066910646855831, -0.023452792316675186, 0.028827518224716187, -0.04164419695734978, 0.01820274442434311, 0.03836169093847275, 0.0033947534393519163, 0.028308594599366188, -0.059448275715112686, 0.034907687455415726, -0.004002806730568409, 0.025593847036361694, -0.015634477138519287, -0.053397249430418015, -0.046665169298648834, -0.029207030311226845, -0.052262481302022934, 0.05934370309114456, -0.0075459955260157585, -0.06933405250310898, 0.004396473057568073, 0.02121005952358246, -0.009622358717024326, -0.007023923564702272, 0.03037397935986519, -0.006926591973751783, -0.00017418715287931263, 0.01200303714722395, -0.06071903184056282, -0.03140096738934517, 0.032467104494571686, 0.017625099048018456, -0.08049982041120529, -0.0068735405802726746, 0.008100093342363834, 0.01081546675413847, -0.01330634206533432, -0.006694603245705366, -0.0106036476790905, 0.0031800665892660618, -0.0001709272910375148, 0.019410157576203346, -0.08821132779121399, 0.0720989927649498, 0.029585100710392, -0.056219227612018585, -0.0036222885828465223, 0.03507034108042717, 0.04903332144021988, 0.006758000236004591, -0.014036241918802261, 0.0793573260307312, -0.00035263344761915505, 0.016474073752760887, -0.006348141934722662, 0.0630456730723381, -0.03700295090675354, -0.04843629151582718, -0.0385916568338871, 0.042418356984853745, -0.00043506029760465026, 0.008141382597386837, -0.0025263342540711164, -0.022459255531430244, -0.02474254183471203, 0.007564330007880926, 0.02869003266096115, 0.04919867217540741, -0.016458643600344658, -0.021500371396541595, 0.004026403650641441, 0.00012610589328687638, 0.027537072077393532, -0.039648693054914474, -0.009669649414718151, -0.020527424290776253, -0.033002760261297226, 0.00911856908351183, 0.00002831594247254543, 0.01451022457331419, 0.05058756843209267, -0.04852738976478577, -0.005507935769855976, 0.07880602031946182, 0.006124790292233229, 0.04119298979640007, -0.022097239270806313, -0.010647792369127274, 0.05798904225230217, 0.02633567340672016, 0.014248084276914597, 0.022275231778621674, 0.0034802411682903767, -0.02204209566116333, 0.025089094415307045, 0.06908386200666428, -0.005723096895962954, 0.015455109067261219, -0.05847369134426117, -0.019835416227579117, 0.08157085627317429, -0.04064331576228142, -0.008991105481982231, 0.024595340713858604, 0.07017099112272263, 0.046071406453847885, 0.03940005227923393, 0.026034846901893616, -0.08572899550199509, 0.03975509852170944, 0.0030986457131803036, 0.0008739263284951448, 0.04336303472518921, -0.02037951536476612, 0.06166289001703262, 0.022372720763087273, 0.024441314861178398, 0.026915889233350754, -0.07712889462709427, -0.08905111253261566, -0.025318266823887825, 0.004297986626625061, 0.023861486464738846, -0.02239246480166912, 0.015304850414395332, 0.07910152524709702, 0.019683074206113815, 0.04714290425181389, 0.02172769606113434, 0.005828072316944599, 0.04216533899307251, -0.04587265104055405, -0.053153373301029205, 0.03291813284158707, 0.012735260650515556, -0.030169503763318062, -0.004929123446345329, -0.007219001650810242, -0.022283228114247322, 0.014060566201806068, 0.07396798580884933, -0.023936079815030098, 0.05182722583413124, 0.019721129909157753, 0.05842486023902893, -0.04274402931332588, 0.02326858602464199, -0.060835447162389755, -0.007187546696513891, 0.0016098062042146921, -0.03538552671670914, -0.007184591144323349, -0.006634194869548082, 0.12024465948343277, 0.05407819151878357, -0.039965491741895676, -0.03712843731045723, 0.04525178670883179, -0.001992032863199711, -0.03359353169798851, -0.03211278095841408, -0.02105904556810856, -0.03850334510207176, 0.041867733001708984, -0.0398518331348896, -0.03756967931985855, 0.0297296904027462, -0.039167068898677826, -0.007379154209047556, 0.049226704984903336, -0.004392229951918125, 0.06907329708337784, 0.009670349769294262, -0.010343087837100029, -0.018618127331137657, -0.02303905412554741, -0.03545757383108139, 0.0053464793600142, -0.0012116461293771863, -0.02177560143172741, 0.012937829829752445, -0.02777823992073536, -0.0426567941904068, -0.006463134195655584, -0.0648735985159874, 0.010036523453891277, 0.05878765508532524, 0.058350298553705215, -0.009293170645833015, 0.06219904124736786, 0.008744987659156322, 0.003706059418618679, -0.0051454720087349415, -0.052967801690101624, -0.03920276090502739, -0.03335937485098839, -0.019339725375175476, 0.007950173690915108, 0.045051123946905136, 0.015093064866960049, -0.008105762302875519, 0.0014128638431429863, 0.02195383980870247, -0.007573945447802544, 0.04683920741081238, -0.0072191753424704075, -0.003556519513949752, -0.007807030808180571, -0.038349125534296036, 0.050532471388578415, -0.05153386667370796, -0.01427704468369484, -0.0032488778233528137, -0.07433216273784637, 0.006820483133196831, -0.05172613635659218, -0.028711499646306038, -0.006978208664804697, -0.008966184221208096, 0.03887634724378586, 0.005137731321156025, 0.01091118436306715, 0.04826345667243004, -0.008474762551486492, 0.03565079718828201, 0.029601210728287697, 0.009230544790625572, 0.03258196637034416, -0.01870003342628479, -0.003582664532586932, 0.04202698543667793, -0.018414540216326714, -0.02469104342162609, -0.013597709126770496, 0.010174972005188465, -0.04287749528884888, -0.28054454922676086, 0.014354689046740532, -0.028447668999433517, -0.034126561135053635, 0.030809471383690834, -0.033147700130939484, -0.001000908319838345, -0.034199971705675125, 0.008939198218286037, 0.008156420662999153, -0.0337335430085659, -0.04984837770462036, -0.014770871959626675, 0.05865699052810669, 0.005680209957063198, 0.000454199209343642, -0.040403690189123154, -0.03631669282913208, 0.0030504916794598103, 0.042521968483924866, 0.011025440879166126, -0.05549829080700874, 0.012576727196574211, 0.04613715782761574, 0.024947654455900192, 0.07585794478654861, -0.07868191599845886, 0.036783959716558456, -0.04572433605790138, -0.012324441224336624, 0.018679097294807434, -0.043491095304489136, -0.017601516097784042, -0.027868211269378662, 0.006028000731021166, -0.022952504456043243, 0.03888268768787384, -0.03157623112201691, 0.012544441036880016, 0.025375423952937126, -0.006495616864413023, -0.03774674981832504, -0.008867952972650528, 0.03280344977974892, 0.06913821399211884, -0.0017898747464641929, -0.03320333734154701, -0.033458828926086426, -0.028453096747398376, 0.09432490170001984, -0.004332673270255327, 0.02025589905679226, 0.002722968813031912, 0.02673482894897461, -0.0149495555087924, 0.00010288517660228536, 0.004103275015950203, -0.006875530816614628, -0.05583617463707924, -0.03891377151012421, 0.008804120123386383, -0.03403940424323082, 0.012017489410936832, -0.054650381207466125, -0.013829343020915985, -0.06384161859750748, -0.040292076766490936, -0.007288395892828703, 0.07292719930410385, 0.025964487344026566, -0.0340031273663044, -0.00025038025341928005, 0.008063961751759052, -0.1025630459189415, -0.02136976830661297, 0.0031544435769319534, -0.01672283001244068, 0.012572982348501682, -0.007425980176776648, 0.02445521205663681, -0.02324581705033779, -0.04484955966472626, 0.03572062402963638, 0.01099297497421503, -0.0018544389167800546, -0.010363239794969559, 0.005695119965821505, -0.0020841972436755896, -0.023307355120778084, -0.020046107470989227, 0.04319443553686142, -0.026263045147061348, -0.04671071842312813, -0.013637671247124672, 0.015926983207464218, 0.028120296075940132, 0.0217948816716671, 0.0022837386932224035, 0.017100244760513306, 0.037229087203741074, 0.009749353863298893, -0.06243278086185455, 0.022663813084363937, -0.022593699395656586, -0.012129620648920536, -0.01982746832072735, -0.05195453763008118, 0.0013311561197042465, 0.03751010447740555, 0.007836570963263512, -0.011450089514255524, -0.007479312364012003, 0.012137988582253456, -0.05378055199980736, 0.006969774141907692, -0.006849642843008041, 0.027657832950353622, 0.02871350385248661, 0.02159181982278824, 0.004494113847613335, -0.06679617613554001, 0.005806623492389917, -0.01690521091222763, -0.018983984366059303, -0.06275539100170135, -0.045997507870197296, 0.03224542737007141, 0.002964047249406576, 0.019601641222834587, 0.008671256713569164, -0.009270896203815937, -0.002307461341843009, 0.021004704758524895, -0.018106093630194664, 0.05365806072950363, -0.02196352556347847, -0.04446570947766304, -0.02449682727456093, 0.011252788826823235, 0.014596623368561268, 0.009026192128658295, -0.00592517014592886, -0.004140167031437159, 0.014398416504263878, 0.05983518809080124, -0.0023435307666659355, 0.032710570842027664, -0.03959590196609497, -0.0013094599125906825, -0.010059887543320656, 0.009088503196835518, -0.020856346935033798, 0.025488806888461113, -0.04601714387536049, 0.02004757523536682, -0.01730353944003582, 0.019317978993058205, -0.01695040613412857, -0.006394449155777693, -0.038757361471652985, 0.04494237154722214, -0.03746325895190239, -0.013713911175727844, -0.019467668607831, -0.02773405611515045, 0.04944742098450661, -0.0061551774851977825, 0.022911975160241127, 0.0016600120579823852, 0.03212355077266693, 0.0048687998205423355, 0.01670781336724758, -0.040045902132987976, 0.010669357143342495, 0.0020928620360791683, -0.032860055565834045, 0.03534442186355591, -0.002829276956617832, 0.030483391135931015, 0.03804529830813408, -0.028741396963596344, -0.03915788605809212, 0.0017827012343332171, 0.04277321696281433, 0.052643924951553345, 0.04512384161353111, -0.016566675156354904, 0.012345305643975735, -0.046793997287750244, -0.004385855048894882, -0.031092513352632523, -0.002242876449599862, -0.02363848313689232, -0.025472227483987808, -0.04345383122563362, -0.06157032027840614, 0.02362821437418461, -0.006799942348152399, 0.01295432262122631, 0.001513039693236351, -0.008120047859847546, 0.012633457779884338, -0.04760754480957985, 0.022661322727799416, 0.07996221631765366, -0.0780288577079773, 0.005691337399184704, -0.01465563289821148, 0.019349567592144012, 0.026145126670598984, 0.03416306897997856, -0.051969509571790695, -0.023177240043878555, -0.028657566756010056, 0.029261676594614983, -0.050715990364551544, -0.02595561183989048, -0.025151459500193596, 0.06252587586641312, -0.018391024321317673, 0.01863570138812065, -0.04243018850684166, 0.012163279578089714, 0.010206932201981544, -0.02184068039059639, 0.019710995256900787, -0.01904352195560932, -0.03447042405605316, 0.004469402600079775, -0.013450652360916138, 0.029565656557679176, -0.02573366090655327, 0.02472252957522869, 0.039035193622112274, -0.023858241736888885, -0.0444585382938385, -0.04066360369324684, 0.0034153570886701345, 0.0043154009617865086, 0.08879557996988297, 0.050567399710416794, -0.0030309827998280525, -0.03439263254404068, 0.0003027544298674911, -0.014161043800413609, 0.02189602144062519, 0.02976718731224537, -0.022337084636092186, 0.01579396426677704, 0.06946663558483124, 0.013729766011238098, 0.0025643177796155214, -0.036978740245103836, -0.0345425084233284, 0.050811607390642166, -0.08811033517122269, -0.013286229223012924, 0.007601781748235226, -0.03908316791057587, 0.036165304481983185, -0.0011957561364397407, 0.03977986425161362, -0.033764712512493134, 0.028919678181409836, 0.02460700273513794, 0.036938611418008804, -0.00020123172726016492, 0.03609466552734375, 0.022995004430413246, -0.01105641108006239, 0.025645097717642784, -0.08263977617025375, 0.005489865317940712, 0.05281573534011841, -0.003989662043750286, 0.012129547074437141, 0.02524936944246292, -0.0338686965405941, 0.04823990538716316, -0.06755910068750381, -0.02730327472090721, 0.05830030143260956, -0.04549671337008476, 0.017089758068323135, 0.018941329792141914, -0.06380167603492737, 0.012717025354504585, 0.024832095950841904, -0.021141644567251205, 0.009549977257847786, 0.004416028968989849, 0.07294239848852158, 0.02168365567922592, 0.008089931681752205, -0.0016315864631906152, -0.037669312208890915, 0.09575257450342178, 0.03953476995229721, 0.029157768934965134, 0.0430392324924469, -0.022949790582060814, 0.0294500719755888, 0.008902661502361298, 0.004797141999006271, -0.0017220695735886693, 0.010884517803788185, -0.021847959607839584, -0.0541919469833374, 0.045699603855609894, 0.00616413215175271, -0.007890710607171059, -0.04759012162685394, 0.09832142293453217, 0.019351957365870476, -0.01788167469203472, -0.04814528301358223, 0.024280456826090813, -0.03540151193737984, 0.0016606790013611317, -0.003689131699502468, -0.016430476680397987, -0.02876579575240612, 0.06389841437339783, -0.02557668276131153, 0.010380561463534832, 0.06777233630418777, -0.031413666903972626, 0.02055944688618183, 0.007484761066734791, 0.08451052010059357, 0.10165298730134964, 0.058693841099739075, -0.0011141006834805012, 0.062450479716062546, -0.029604816809296608, -0.045176222920417786, -0.009158862754702568, 0.006432435475289822, 0.017391560599207878, -0.019799042493104935, 0.020977532491087914, 0.04628133401274681, -0.014450124464929104, 0.05947078764438629, -0.012190839275717735, -0.0367945060133934, 0.00583555968478322, 0.011658111587166786, 0.026446577161550522, 0.00515404948964715, 0.003928610123693943, 0.02241973765194416, 0.011434748768806458, -0.061342597007751465, 0.055737465620040894, -0.0040494720451533794, -0.03307138383388519, 0.04128925874829292, -0.018361039459705353, 0.03334252908825874, -0.01784362830221653, 0.028294630348682404, 0.07296183705329895, -0.006477609742432833, -0.0019639250822365284, 0.0031540526542812586, 0.047284431755542755, 0.01883956417441368, 0.0371868796646595, -0.03841985762119293, -0.02555449865758419, -0.015791483223438263, -0.03313513845205307, -0.027836943045258522, -0.015688154846429825, -0.00179247313644737, 0.034451425075531006, 0.00005312390931067057, -0.008345795795321465, 0.0415351502597332, 0.046028655022382736, -0.059715788811445236, -0.04709027707576752, -0.05101907253265381, -0.07255372405052185, -0.04411015659570694, -0.013138032518327236, 0.007148404605686665, 0.009052297100424767, -0.03853941708803177, -0.011320947669446468, -0.020025238394737244, -0.00808098167181015, 0.005785660352557898, -0.042950958013534546, -0.003977031446993351, 0.011523493565618992, 0.016111498698592186, 0.03824235871434212, -0.009086537174880505, 0.03156501054763794, 0.01001687254756689, -0.007837771438062191, -0.010666330344974995, 0.036836057901382446, 0.035541169345378876, 0.01844109036028385, 0.02428431250154972, -0.08122558146715164, 0.0011966280872002244, 0.019842738285660744, -0.0334148108959198, -0.07807888090610504, 0.0065177264623343945, 0.022697268053889275, 0.010823502205312252, 0.04354620724916458, -0.015473948791623116, 0.0021079126745462418, -0.06459025293588638, 0.016385380178689957, -0.011022988706827164, -0.017808275297284126, 0.05701320245862007, -0.050898581743240356, 0.07293938100337982, -0.0016349621582776308, -0.016949083656072617, -0.047547847032547, 0.00036462341086007655, -0.009957312606275082, 0.02654086798429489, -0.043877724558115005, -0.011592988856136799, -0.006709103938192129, -0.09928896278142929, -0.03526698797941208, 0.023741785436868668, -0.020625397562980652, -0.018598202615976334, 0.037052590399980545, -0.02016054466366768, -0.056668996810913086, 0.0270749069750309, -0.0421418622136116, 0.02118179015815258, -0.010040353052318096, -0.01120382733643055, -0.025610636919736862, 0.004956448450684547, -0.01874607801437378, 0.017196930944919586, 0.012084472924470901, -0.013775241561233997, -0.02498006448149681, -0.04213738813996315, 0.026547813788056374, 0.029681256040930748, 0.0007744478643871844, -0.00023803341900929809 ]
[ -0.07579495757818222, -0.010774021036922932, -0.009891540743410587, -0.024844223633408546, 0.03661590814590454, -0.03560025244951248, -0.0464526042342186, 0.003905364079400897, 0.03515533357858658, -0.01682073436677456, 0.02018495462834835, 0.004223013296723366, 0.01429992076009512, -0.005107668694108725, 0.06554169952869415, 0.006072071846574545, 0.024770958349108696, -0.014695987105369568, -0.033153995871543884, 0.023029420524835587, 0.00231506978161633, -0.016402728855609894, -0.020634062588214874, -0.03332085162401199, -0.0017944860737770796, 0.03464591130614281, 0.045353107154369354, -0.02902277745306492, -0.028891099616885185, -0.20993104577064514, -0.011590922251343727, 0.025816665962338448, 0.07124009728431702, 0.0036971697118133307, 0.027112342417240143, 0.030241025611758232, 0.0004984851111657917, 0.030404992401599884, -0.028190085664391518, 0.03228027746081352, 0.015003553591668606, -0.009886824525892735, -0.0206716600805521, -0.069060780107975, 0.004031714517623186, -0.025168893858790398, -0.016802847385406494, 0.003610332263633609, 0.015105057507753372, 0.03259905427694321, -0.05841793119907379, -0.006415688432753086, -0.027831127867102623, 0.0050654844380915165, 0.00976038258522749, 0.043132707476615906, 0.04358014464378357, 0.020363787189126015, 0.009741398505866528, 0.031324975192546844, 0.008292775601148605, 0.008221904747188091, -0.1279156655073166, 0.0881597101688385, 0.031391989439725876, 0.04090225696563721, -0.05101805180311203, -0.011228539980947971, -0.011775588616728783, 0.09809435904026031, -0.04161187633872032, 0.001640214934013784, -0.024395423009991646, 0.05816532298922539, 0.0065375324338674545, 0.01741565763950348, 0.005049286875873804, -0.009293853305280209, 0.004838904365897179, -0.052620407193899155, -0.08797512948513031, 0.016796225681900978, -0.04873977228999138, 0.0007055888418108225, -0.012251980602741241, 0.028102023527026176, -0.019871076568961143, 0.015872469171881676, -0.013141663745045662, 0.023930687457323074, 0.055227335542440414, -0.021493740379810333, 0.03661506250500679, 0.017759626731276512, -0.11840368062257767, -0.05524924397468567, -0.009586227126419544, -0.012224365957081318, 0.006464345846325159, 0.432844340801239, -0.00833394005894661, -0.05914565920829773, 0.06877123564481735, 0.020653927698731422, 0.015566826798021793, -0.004146867897361517, 0.028064975515007973, -0.059759367257356644, 0.027336828410625458, -0.044059086591005325, -0.007978673093020916, -0.019734371453523636, 0.041174471378326416, -0.08843366801738739, 0.05394989997148514, 0.03028596192598343, 0.010979166254401207, 0.02820022776722908, 0.00529860844835639, -0.01715347357094288, 0.031740400940179825, 0.015391784720122814, -0.013017750345170498, -0.006107245106250048, 0.007151675410568714, -0.04734349250793457, 0.07774262875318527, 0.03282748535275459, 0.0457463301718235, -0.02093142829835415, 0.03928673267364502, 0.005984914489090443, -0.061602745205163956, 0.029016025364398956, 0.0017585796304047108, 0.005938793532550335, 0.0392681285738945, -0.032428011298179626, -0.014310195110738277, 0.002185070887207985, 0.0005240066675469279, -0.06347325444221497, -0.019404863938689232, 0.010325021110475063, -0.03989415615797043, 0.10599805414676666, 0.023255936801433563, -0.03085545264184475, -0.04301885515451431, -0.0191445741802454, -0.005310769192874432, 0.011566130444407463, 0.02595239318907261, -0.05163643881678581, 0.0004342084575910121, 0.023477254435420036, 0.09229695796966553, -0.018238771706819534, -0.09079024195671082, 0.024917826056480408, 0.007371704094111919, -0.03233572840690613, -0.009522208012640476, 0.007867729291319847, 0.045858100056648254, -0.0617276094853878, -0.00921009574085474, 0.03056361898779869, 0.03685680776834488, -0.050638824701309204, 0.015832357108592987, 0.004082009196281433, -0.05226987600326538, 0.018337246030569077, 0.03057847172021866, -0.0059887380339205265, -0.05761545151472092, 0.024159390479326248, 0.06029648333787918, -0.002222271403297782, -0.01242219191044569, -0.00919639877974987, -0.02711687982082367, 0.04920751601457596, -0.061066001653671265, -0.12298794835805893, -0.045481543987989426, 0.012345664203166962, -0.015904035419225693, -0.007176137529313564, 0.039303433150053024, -0.004183711018413305, -0.018957722932100296, 0.07933706045150757, -0.005302939563989639, -0.0401565246284008, 0.02285447157919407, -0.002507059834897518, -0.042145226150751114, -0.04683506116271019, -0.03815392032265663, -0.02790558896958828, -0.024138061329722404, -0.009909296408295631, -0.05082608014345169, 0.017851199954748154, 0.036024026572704315, -0.058101337403059006, 0.07113935053348541, 0.014506016857922077, -0.03669733181595802, -0.021626392379403114, -0.015558689832687378, 0.01732952706515789, -0.005757280625402927, -0.020362427458167076, 0.004419262520968914, -0.003102135844528675, 0.02216157875955105, 0.03140341863036156, -0.01770816743373871, -0.022636985406279564, -0.02523430436849594, -0.3252279758453369, -0.019832225516438484, -0.0004368225345388055, -0.020525841042399406, -0.013041798025369644, -0.0637175440788269, 0.03836573660373688, -0.03220600262284279, 0.017495354637503624, 0.031401850283145905, 0.040100689977407455, -0.07129621505737305, 0.02695821039378643, -0.1035732701420784, 0.006333145312964916, 0.01986665651202202, -0.023221854120492935, 0.009897756390273571, 0.010887988843023777, 0.04734786972403526, 0.030109070241451263, -0.033387426286935806, 0.0021213525906205177, -0.06616334617137909, -0.03447522222995758, -0.01746375858783722, 0.13437366485595703, 0.07005178183317184, 0.04844193905591965, -0.0595489926636219, 0.03967418894171715, 0.005111821461468935, 0.020451277494430542, -0.045881085097789764, -0.006230759900063276, -0.015351365320384502, 0.03048386424779892, 0.0016710381023585796, -0.024164602160453796, -0.03870818018913269, -0.1064436286687851, 0.03194313123822212, -0.0385681688785553, -0.008016305044293404, -0.04588271677494049, 0.003584941616281867, -0.022295398637652397, -0.03009229525923729, 0.021131401881575584, 0.08125677704811096, 0.01801658608019352, -0.012884566560387611, 0.0017682291800156236, 0.004559838213026524, -0.028827058151364326, -0.023672722280025482, -0.04769052937626839, 0.021100737154483795, 0.0030106157064437866, -0.0035157487727701664, 0.027774354442954063, 0.061949223279953, 0.025471748784184456, -0.07440820336341858, -0.0032203185837715864, 0.020528322085738182, -0.011800422333180904, 0.01568792387843132, 0.0232028029859066, -0.007179995998740196, -0.04844829440116882, 0.059490866959095, 0.005415861960500479, 0.01593371294438839, 0.019783610478043556, 0.04605070874094963, 0.03243532031774521, 0.003000581404194236, -0.003508660476654768, -0.016284814104437828, 0.036911044269800186, -0.054753627628088, 0.026392042636871338, -0.039495840668678284, -0.0014328408287838101, 0.052016481757164, 0.014733949676156044, -0.0725879892706871, 0.09929101169109344, 0.020763877779245377, -0.011190692894160748, 0.04324006289243698, -0.026349617168307304, -0.01692090556025505, 0.019971180707216263, -0.005999214015901089, -0.26911601424217224, 0.05933109298348427, 0.023402798920869827, 0.0703514814376831, 0.01608157530426979, -0.0057062432169914246, 0.02074466459453106, -0.037084486335515976, 0.021168427541851997, 0.003073865082114935, 0.03973689675331116, 0.025038547813892365, -0.0031941465567797422, -0.015170775353908539, -0.014817964285612106, 0.020370878279209137, 0.07355020195245743, 0.02256377413868904, 0.02594066597521305, 0.02715507708489895, -0.0037592065054923296, -0.015113416127860546, 0.17789073288440704, 0.02941965125501156, -0.02227870561182499, 0.002541026333346963, 0.015090514905750751, -0.023349102586507797, 0.023325448855757713, 0.027939235791563988, -0.019199436530470848, -0.004987999331206083, 0.01785542070865631, 0.032216377556324005, 0.04744279384613037, -0.04805603250861168, -0.02245453931391239, 0.07628311961889267, 0.04915444180369377, -0.008618425577878952, -0.007098888512700796, 0.04641463980078697, -0.03866538777947426, 0.0010055432794615626, 0.033324409276247025, 0.004218473564833403, 0.020150011405348778, 0.022963078692555428, -0.0925254225730896, 0.025023138150572777, -0.03256247565150261, -0.026248862966895103, -0.012439052574336529, 0.005754658952355385, 0.01610574685037136, 0.08088406920433044, 0.017527524381875992, 0.021140161901712418, 0.04230611026287079, -0.004067761357873678, -0.06173529848456383, -0.05131637677550316, 0.10479581356048584, 0.01857043243944645, 0.011515550315380096 ]
[ 0.059600457549095154, 0.007714647334069014, -0.013899116776883602, -0.0004129141743760556, 0.003416894469410181, 0.027531730011105537, 0.0031114297453314066, -0.00373636931180954, 0.0008912020130082965, -0.006858218926936388, -0.03224773332476616, 0.019770517945289612, 0.03090069070458412, -0.01480342447757721, -0.004644022788852453, -0.00961662270128727, 0.0030151614919304848, -0.04430169239640236, 0.019818652421236038, -0.008115463890135288, 0.0028180433437228203, 0.008290121331810951, -0.006189065985381603, -0.03441125154495239, -0.015854621306061745, 0.03369757905602455, -0.04888049140572548, -0.014062450267374516, 0.02104017324745655, -0.10573729127645493, -0.016360605135560036, -0.0069318972527980804, 0.01704423688352108, 0.026002179831266403, -0.005323311779648066, -0.05074067413806915, -0.020062686875462532, 0.021920498460531235, -0.009199420921504498, 0.04405663534998894, -0.015002110041677952, 0.0007795544806867838, 0.001083918265067041, 0.0022393870167434216, 0.020012525841593742, -0.015364181250333786, -0.02469608187675476, -0.024141903966665268, -0.0035165981389582157, 0.005913649685680866, -0.04041600972414017, 0.03409221023321152, -0.0073323603719472885, 0.020365772768855095, -0.02895405702292919, 0.01779980957508087, 0.035789478570222855, -0.0062976437620818615, 0.030948974192142487, -0.044123366475105286, 0.012296872213482857, -0.011749542318284512, -0.050952598452568054, -0.016024736687541008, -0.024682985618710518, -0.0332542322576046, -0.004410678520798683, 0.01850084960460663, -0.014479340985417366, 0.005513146985322237, -0.0061984192579984665, 0.03914036229252815, -0.04350141063332558, -0.02274685725569725, -0.034742776304483414, 0.022403094917535782, 0.007632722612470388, -0.06156804785132408, -0.0058485399931669235, -0.008281379006803036, -0.05936793237924576, 0.042726725339889526, 0.047152284532785416, 0.0069419308565557, -0.0254017673432827, 0.010213167406618595, 0.016514789313077927, -0.011476079002022743, 0.008389249444007874, 0.013576826080679893, -0.02179586887359619, -0.020038742572069168, 0.009647971950471401, -0.01544033270329237, -0.09562326222658157, 0.004362537991255522, -0.014784001745283604, -0.03443644940853119, -0.014531446620821953, 0.8383274078369141, 0.00302871223539114, -0.008158404380083084, 0.012046880088746548, -0.002346466528251767, -0.011927280575037003, 0.050448570400476456, 0.02177456021308899, 0.0051774680614471436, 0.025997508317232132, -0.012889578007161617, 0.009210558608174324, 0.015307541936635971, 0.0260201096534729, 0.02497882768511772, 0.06300749629735947, 0.03937705606222153, 0.0063181049190461636, -0.0015207224059849977, -0.009923689067363739, 0.032692305743694305, 0.06829577684402466, 0.009346267208456993, -0.005716203711926937, 0.03339054435491562, 0.013482512906193733, -0.17730802297592163, 0.024864519014954567, -7.254288614295243e-33, 0.00820635911077261, 0.025264641270041466, 0.017284922301769257, -0.023603299632668495, -0.008659221231937408, 0.020426807925105095, -0.02035420387983322, 0.019313570111989975, 0.010084381327033043, -0.016477486118674278, 0.007330762222409248, 0.02575054205954075, -0.02198558859527111, -0.01833857223391533, 0.021514739841222763, -0.018471302464604378, 0.014549905434250832, 0.002191732171922922, -0.0014120610430836678, 0.015896761789917946, 0.03133789077401161, 0.04636840522289276, 0.008262185379862785, 0.012096012942492962, -0.04953499510884285, 0.011972920969128609, 0.026293708011507988, -0.03751766309142113, 0.0007462650537490845, -0.04403770714998245, -0.0416710190474987, 0.022301696240901947, 0.04216188192367554, -0.04854234308004379, 0.013156364671885967, -0.06306686997413635, -0.05868075042963028, -0.005108734592795372, 0.0062773157842457294, 0.00030011500348336995, -0.03143515810370445, 0.02757791243493557, -0.029235554859042168, -0.031024638563394547, -0.005324170459061861, 0.003761834464967251, 0.015759188681840897, 0.03667014092206955, -0.025565316900610924, 0.0020206698682159185, 0.011267434805631638, 0.0128679433837533, 0.0287834033370018, -0.02572477050125599, 0.027508536353707314, 0.05218826234340668, 0.008420740254223347, -0.028354519978165627, 0.031585000455379486, 0.00931633822619915, 0.009599980898201466, -0.014658831991255283, 0.0008720275945961475, 0.04651365801692009, -0.0010380903258919716, -0.0022152517922222614, 0.045723721385002136, -0.0035105799324810505, 0.01294091995805502, -0.0005750429118052125, -0.06397538632154465, 0.02342062070965767, -0.007953847758471966, -0.012262159958481789, -0.006569754332304001, -0.037486229091882706, -0.018115300685167313, 0.008830218575894833, -0.002736134687438607, 0.034284692257642746, -0.06236424669623375, -0.035241853445768356, -0.013975018635392189, -0.04162512719631195, -0.014876129105687141, 0.0035486493725329638, 0.030584368854761124, 0.01912006363272667, -0.03036760352551937, 0.008460563607513905, 0.03220318630337715, 0.0430876724421978, 0.0027329681906849146, -0.008509984239935875, 0.02727089449763298, 6.908951149226702e-33, -0.006520915310829878, 0.0004649814509321004, -0.031113747507333755, -0.005678857211023569, 0.03899480774998665, -0.0014047779841348529, -4.1452838672739745e-7, 0.004236922599375248, -0.058558423072099686, 0.010386031121015549, -0.0495581328868866, -0.013107453472912312, -0.04455523565411568, -0.001992656849324703, 0.06571431457996368, -0.0031543527729809284, 0.011846758425235748, 0.017131932079792023, -0.019803639501333237, 0.03620239719748497, -0.017733074724674225, 0.021373217925429344, -0.018742317333817482, 0.012141739949584007, 0.03963879868388176, 0.022818733006715775, -0.011497383005917072, 0.011935696005821228, 0.002900537336245179, 0.0042125750333070755, -0.031099999323487282, -0.006475298199802637, -0.016068074852228165, -0.024205319583415985, -0.002061766106635332, 0.04483931139111519, 0.006596419494599104, -0.018709348514676094, -0.02553734742105007, 0.014983061701059341, 0.018747268244624138, 0.02311483770608902, -0.017286324873566628, 0.018655648455023766, -0.01622098684310913, 0.028869448229670525, -0.013587135821580887, 0.01878567598760128, 0.01791473478078842, -0.004934925585985184, -0.023519465699791908, -0.002878335304558277, -0.015095099806785583, 0.006463768891990185, 0.017420383170247078, -0.02461845800280571, -0.0015622617211192846, 0.01288545411080122, -0.05828295275568962, 0.009459382854402065, -0.047897811979055405, 0.012849630787968636, 0.014555205591022968, -0.0011947713792324066, -0.02603493630886078, 0.011507058516144753, -0.0030703223310410976, -0.0008933471399359405, -0.0245396438986063, -0.005344434641301632, -0.014530381187796593, -0.007943318225443363, 0.004962147679179907, 0.030872482806444168, 0.016625570133328438, -0.0032827809918671846, -0.03259258344769478, -0.008754968643188477, -0.050432294607162476, 0.012593365274369717, 0.009920185431838036, 0.011330585926771164, 0.006847425363957882, -0.009367610327899456, 0.0012344418792054057, 0.012984155677258968, -0.03765373304486275, 0.019001217558979988, 0.010345084592700005, 0.010007612407207489, 0.02433040738105774, -0.023347653448581696, 0.033498719334602356, -0.0006972915725782514, -0.0193759985268116, -1.3067024795532234e-8, -0.02038961835205555, -0.00710428087040782, -0.010698290541768074, -0.008689720183610916, 0.003266813000664115, 0.0019257055828347802, -0.017163220793008804, 0.006133312359452248, -0.02899826690554619, -0.01801055110991001, 0.05078132450580597, -0.014378911815583706, 0.016553068533539772, 0.02547597698867321, 0.0286394190043211, -0.012853478081524372, 0.02774650976061821, -0.05076690763235092, 0.019237957894802094, 0.004479558207094669, 0.03496335446834564, 0.041302043944597244, -0.00192171277012676, -0.00551734771579504, -0.022877540439367294, -0.013184791430830956, 0.02409338392317295, -0.06859223544597626, -0.02191670797765255, -0.004260839428752661, 0.03907809406518936, -0.021708190441131592, -0.04047096520662308, -0.00900605320930481, -0.007688332349061966, -0.04057738557457924, 0.025233887135982513, 0.02868846245110035, 0.020730840042233467, -0.004543675109744072, 0.014223793521523476, -0.0034060755278915167, 0.011113281361758709, -0.0375969223678112, -0.01012822799384594, 0.00742956530302763, -0.016253674402832985, -0.03294326737523079, 0.06085456535220146, -0.0523771196603775, -0.03684829920530319, -0.017626384273171425, 0.005653422325849533, 0.03880893439054489, 0.031365226954221725, 0.0009381147101521492, 0.03223491087555885, 0.009393156506121159, -0.027936285361647606, -0.03980044275522232, 0.035007499158382416, 0.013345418497920036, -0.021727941930294037, -0.02893504872918129 ]
how-i-met-your-mother-story-arcs
https://markhneedham.com/blog/2015/04/03/how-i-met-your-mother-story-arcs
false
2015-04-05 10:07:12
R: Markov Chain Wikipedia Example
[ "r-2" ]
[ "R" ]
Over the weekend I've been https://github.com/gigasquid/howistart/blob/master/clojure/1/index.md[reading] http://freakonometrics.blog.free.fr/index.php?post/2011/12/20/Basic-on-Markov-Chain-(for-parents)[about] http://en.wikipedia.org/wiki/Markov_chain[Markov Chains] and I thought it'd be an interesting exercise for me to translate Wikipedia's example into R code. But first a definition: ____ A Markov chain is a random process that undergoes transitions from one state to another on a state space. It is required to possess a property that is usually characterized as "memoryless": the probability distribution of the next state depends only on the current state and not on the sequence of events that preceded it. ____ that 'random process' could be moves in a Monopoly game, the next word in a sentence or, as in Wikipedia's example, the next state of the Stock Market. The diagram below shows the probabilities of transitioning between the various states: image::{{<siteurl>}}/uploads/2015/04/800px-Finance_Markov_chain_example_state_space.svg_.png[800px Finance Markov chain example state space svg,399] e.g. if we're in a Bull Market the probability of the state of the market next week being a Bull Market is 0.9, a Bear Market is 0.075 and a Stagnant Market is 0.025. We can model the various transition probabilities as a matrix: [source,r] ---- M = matrix(c(0.9, 0.075, 0.025, 0.15, 0.8, 0.05, 0.25, 0.25, 0.5), nrow = 3, ncol = 3, byrow = TRUE) > M [,1] [,2] [,3] [1,] 0.90 0.075 0.025 [2,] 0.15 0.800 0.050 [3,] 0.25 0.250 0.500 ---- Rows/Cols 1-3 are Bull, Bear, Stagnant respectively. Now let's say we start with a Bear market and want to find the probability of each state in 3 weeks time. We can do this is by multiplying our probability/transition matrix by itself 3 times and then multiplying the result by a vector representing the initial Bear market state. [source,R] ---- threeIterations = (M %*% M %*% M) > threeIterations > threeIterations [,1] [,2] [,3] [1,] 0.7745 0.17875 0.04675 [2,] 0.3575 0.56825 0.07425 [3,] 0.4675 0.37125 0.16125 > c(0,1,0) %*% threeIterations [,1] [,2] [,3] [1,] 0.3575 0.56825 0.07425 ---- So we have a 56.825% chance of still being in a Bear Market, 35.75% chance that we're now in a Bull Market and only a 7.425% chance of being in a stagnant market. I found it a bit annoying having to type '%*% M' multiple times but luckily the expm library allows us to apply a Matrix power operation: [source,r] ---- install.packages("expm") library(expm) > M %^% 3 [,1] [,2] [,3] [1,] 0.7745 0.17875 0.04675 [2,] 0.3575 0.56825 0.07425 [3,] 0.4675 0.37125 0.16125 ---- The nice thing about this function is that we can now easily see where the stock market will trend towards over a large number of weeks: [source,r] ---- > M %^% 100 [,1] [,2] [,3] [1,] 0.625 0.3125 0.0625 [2,] 0.625 0.3125 0.0625 [3,] 0.625 0.3125 0.0625 ---- i.e. 62.5% of weeks we will be in a bull market, 31.25% of weeks will be in a bear market and 6.25% of weeks will be stagnant,
null
null
[ -0.021793721243739128, 0.005495490040630102, -0.03735053166747093, 0.03221962973475456, 0.09850040078163147, -0.006978156976401806, -0.005206984002143145, 0.05352306738495827, 0.022387271746993065, -0.011729283258318901, 0.018447494134306908, -0.015371164306998253, -0.05997542291879654, 0.009436417371034622, 0.0040200576186180115, 0.05495493486523628, 0.05874437466263771, -0.00767938606441021, 0.024414408951997757, 0.010844008065760136, -0.003664563409984112, 0.08666253089904785, 0.016760317608714104, 0.03150361403822899, 0.03756241500377655, -0.009008049964904785, 0.04199643060564995, 0.02257993258535862, -0.036613427102565765, 0.017479972913861275, 0.0255684033036232, 0.01165978703647852, -0.027276011183857918, 0.015479725785553455, 0.03443555906414986, -0.026829546317458153, -0.034361064434051514, -0.0028674688655883074, -0.01753069832921028, -0.004216017201542854, -0.06658848375082016, 0.02189512364566326, -0.0061760516837239265, 0.01840207166969776, -0.03775565326213837, -0.007297320757061243, -0.03711776062846184, 0.03316299617290497, -0.007922200486063957, -0.026786208152770996, -0.06361463665962219, 0.0059143370017409325, -0.006175576709210873, 0.03479786589741707, -0.01104774046689272, 0.02745411917567253, -0.0036429499741643667, -0.061977967619895935, 0.03526165708899498, -0.049162693321704865, 0.035948678851127625, -0.03341105580329895, -0.018607722595334053, 0.025199558585882187, -0.005469949916005135, -0.029134947806596756, 0.006582104600965977, 0.05080060288310051, -0.028667790815234184, -0.03001907281577587, -0.023914610967040062, 0.00922192633152008, -0.010447260923683643, 0.012206495739519596, 0.016415251418948174, -0.03712451085448265, -0.012502376921474934, 0.05944390594959259, -0.018248088657855988, 0.038049083203077316, -0.004532722756266594, 0.01232120767235756, 0.032248277217149734, 0.02961912751197815, -0.0015817912062630057, -0.038523294031620026, -0.04125753417611122, -0.03189226612448692, -0.07512397319078445, 0.07512498646974564, -0.0075918082147836685, -0.040711499750614166, 0.0007720243302173913, 0.004135428462177515, -0.0622497983276844, -0.013358153402805328, -0.0031283400021493435, 0.01621261239051819, -0.017071401700377464, -0.027325550094246864, -0.05406441166996956, -0.02163376472890377, 0.013766089454293251, 0.017072636634111404, -0.07856517285108566, 0.0027947176713496447, 0.001145230489782989, -0.013371128588914871, 0.0030692098662257195, -0.0038993279449641705, -0.02438182383775711, 0.007194481790065765, 0.0029557684902101755, 0.03235901519656181, -0.06070062145590782, 0.06847953051328659, -0.001672115526162088, -0.02438407391309738, 0.013101822696626186, -0.015881547704339027, 0.03873732313513756, 0.002925402717664838, -0.02683262713253498, 0.0759352594614029, 0.0013263106811791658, -0.005347645375877619, 0.01585397496819496, 0.041074324399232864, -0.018082018941640854, -0.042823243886232376, -0.008417323231697083, 0.06438680738210678, -0.037414707243442535, 0.019224191084504128, -0.003778200363740325, -0.02162596955895424, 0.002986407373100519, -0.0030781428795307875, 0.0472058467566967, 0.015073290094733238, 0.009695208631455898, -0.029670212417840958, 0.035804059356451035, 0.023599300533533096, 0.026952015236020088, -0.004201837815344334, 0.0042577944695949554, -0.03298700973391533, -0.03135908767580986, 0.01102018915116787, 0.026071717962622643, 0.0030074052046984434, 0.06032516807317734, 0.00805175956338644, -0.0021187749225646257, 0.04746648296713829, -0.0007435541483573616, 0.02565939351916313, 0.00897065456956625, 0.012123326770961285, 0.014916139654815197, 0.036291275173425674, 0.03796371817588806, 0.06313258409500122, 0.021386276930570602, -0.031334202736616135, 0.033030249178409576, 0.08129486441612244, -0.03257673606276512, -0.025197049602866173, -0.07010996341705322, -0.048684652894735336, 0.05810532346367836, -0.032278988510370255, -0.03244571015238762, 0.04573563113808632, 0.06907038390636444, 0.018401067703962326, 0.06478394567966461, -0.03517682105302811, -0.0745084285736084, 0.032207880169153214, 0.023074984550476074, 0.051085248589515686, 0.01793549582362175, -0.0514703132212162, 0.06652478873729706, 0.03247983008623123, -0.0013126761186867952, 0.015527314506471157, -0.0556381493806839, -0.04377373680472374, -0.02455676905810833, -0.016260908916592598, 0.055674176663160324, -0.042664315551519394, 0.0274099949747324, 0.037648674100637436, 0.03658803552389145, 0.03263192996382713, -0.02015121653676033, -0.0031996930483728647, 0.012463279999792576, -0.04474524036049843, -0.03279281035065651, 0.04783884808421135, 0.036011531949043274, -0.029430218040943146, -0.06135489046573639, 0.00061004952294752, 0.00287079275585711, 0.012661803513765335, 0.015815794467926025, -0.05010829493403435, 0.06503356248140335, 0.020767413079738617, 0.06454843282699585, -0.028643250465393066, 0.009918301366269588, -0.023318326100707054, 0.036408696323633194, -0.006771227344870567, -0.009083819575607777, -0.0021747141145169735, -0.0005688145756721497, 0.10980077087879181, 0.07082848995923996, -0.0193288903683424, -0.06486643105745316, 0.03502705320715904, -0.0032903500832617283, -0.04098367691040039, 0.0012408267939463258, -0.022072650492191315, 0.04285985976457596, -0.013534829951822758, -0.040014587342739105, -0.037690386176109314, 0.008457299321889877, -0.04086559638381004, -0.005259727593511343, 0.05499112606048584, -0.024289365857839584, 0.039657581597566605, -0.0066675846464931965, -0.016295162960886955, -0.011832165531814098, -0.013866029679775238, -0.07921282202005386, 0.00837424024939537, -0.028695132583379745, -0.002690073801204562, 0.06009097024798393, -0.033522993326187134, -0.04961029067635536, -0.017554504796862602, -0.03803468495607376, 0.037958256900310516, 0.06663678586483002, 0.05918537825345993, 0.01584746688604355, 0.042253997176885605, -0.014971298165619373, 0.016074195504188538, -0.046704474836587906, -0.05256614089012146, -0.04502807557582855, -0.033796362578868866, -0.01897846907377243, 0.0370967723429203, 0.047126464545726776, -0.007787695154547691, 0.037315987050533295, 0.009347120299935341, 0.022792721167206764, -0.015612917952239513, 0.003968091681599617, 0.008164823986589909, -0.017287787050008774, -0.0010575585765764117, -0.014477993361651897, 0.057693738490343094, -0.034119732677936554, -0.015499401837587357, 0.021866224706172943, -0.053494393825531006, 0.05651633441448212, -0.03492218255996704, -0.023750372231006622, 0.014762785285711288, 0.02455500327050686, 0.05198267847299576, 0.017383409664034843, 0.005021198652684689, 0.06611806899309158, 0.021060878410935402, 0.01212884671986103, 0.0029474664479494095, 0.019101127982139587, 0.04908964782953262, 0.003903985023498535, 0.003912918735295534, 0.0238153375685215, -0.026863528415560722, 0.012729519046843052, -0.05745759606361389, 0.016987552866339684, -0.002869558986276388, -0.2859724164009094, 0.024501372128725052, 0.010809685103595257, -0.025396408513188362, 0.008726033382117748, -0.027587752789258957, 0.010621213354170322, -0.03749839588999748, -0.01932179369032383, 0.006446385756134987, -0.0025767269544303417, -0.06983217597007751, -0.04815088212490082, 0.056226696819067, 0.029204998165369034, -0.01010507345199585, 0.026932068169116974, -0.040645163506269455, 0.022636765614151955, 0.05677793547511101, -0.0027544694021344185, -0.058791182935237885, -0.025496553629636765, 0.03173276036977768, 0.011711657978594303, 0.03874170780181885, -0.08744693547487259, -0.0030661365017294884, -0.04865248128771782, 0.008349298499524593, -0.020770657807588577, -0.03229467570781708, 0.003855570685118437, -0.022064993157982826, 0.006942301522940397, -0.01976984553039074, 0.02086043171584606, 0.0037974121514707804, 0.023121939972043037, 0.029766378924250603, 0.007615796755999327, -0.015324681997299194, 0.015036734752357006, 0.013078714720904827, 0.05778764560818672, 0.020581666380167007, -0.04310024529695511, 0.016324013471603394, -0.028285132721066475, 0.07279316335916519, -0.01543943677097559, -0.016893938183784485, 0.003168675350025296, 0.03347290679812431, 0.007401994429528713, 0.0005296270246617496, -0.016584638506174088, -0.02400737814605236, -0.059147968888282776, -0.016381269320845604, -0.013949554413557053, -0.03770942613482475, -0.006987426895648241, -0.06877017021179199, 0.0053024571388959885, -0.0559559091925621, -0.08637949824333191, 0.023746071383357048, 0.079077810049057, 0.01930058002471924, -0.026019174605607986, -0.017723413184285164, -0.006222875788807869, -0.11548039317131042, -0.0015473236562684178, -0.015283609740436077, 0.0004888775874860585, 0.027048207819461823, 0.027306213974952698, 0.031241297721862793, -0.028760571032762527, -0.06980345398187637, 0.010080788284540176, 0.014273837208747864, 0.04913310706615448, -0.028404561802744865, 0.008902834728360176, 0.018743792548775673, -0.02444378286600113, -0.02602100931107998, 0.06704463809728622, -0.0007972361636348069, -0.020294873043894768, -0.03813990205526352, -0.015590840950608253, 0.05659184232354164, -0.0077966609969735146, -0.02335783652961254, 0.01517926063388586, 0.030362028628587723, 0.04584670811891556, -0.05905299261212349, 0.0020581374410539865, -0.004175520967692137, -0.03729661554098129, 0.011350022628903389, -0.040275365114212036, 0.009615777991712093, 0.02703786827623844, -0.00006321976979961619, -0.024001307785511017, -0.041037335991859436, 0.018930386751890182, -0.03677621856331825, -0.010555148124694824, -0.01914268545806408, -0.019394833594560623, 0.02873959019780159, 0.02524661086499691, -0.009748389944434166, -0.05767069756984711, 0.028089573606848717, -0.008865964598953724, -0.034317515790462494, -0.04041409492492676, -0.027037812396883965, 0.0031933975405991077, -0.00866570696234703, 0.02088162675499916, -0.012570823542773724, 0.008763879537582397, 0.021792598068714142, 0.018116548657417297, -0.034634605050086975, 0.03134322538971901, 0.00960791576653719, -0.05279988795518875, -0.03249084949493408, -0.004358830861747265, -0.013603748753666878, 0.017753053456544876, 0.0017156106187030673, 0.03981282189488411, 0.010319333523511887, 0.022701026871800423, -0.0036473742220550776, 0.03266167640686035, 0.026324907317757607, 0.014997946098446846, 0.008344830013811588, 0.0012971602845937014, -0.041395820677280426, 0.02003568969666958, -0.017903605476021767, -0.017696894705295563, -0.022619979456067085, 0.032116517424583435, -0.015116452239453793, -0.016423208639025688, -0.05026892200112343, 0.04179240018129349, -0.044205185025930405, -0.02644854597747326, -0.017787164077162743, -0.017398308962583542, 0.06179842725396156, -0.011613399721682072, 0.0476345419883728, 0.0035375654697418213, 0.017482511699199677, 0.007135007064789534, -0.03322985768318176, -0.040881410241127014, 0.005798987112939358, -0.009834470227360725, 0.002271614270284772, -0.0003352115163579583, -0.03182649239897728, 0.0003814066876657307, -0.00006714034680044279, -0.004788713529706001, -0.00663709407672286, 0.025174196809530258, 0.01875000074505806, 0.05777924507856369, 0.02233041822910309, 0.00582159124314785, 0.0193716362118721, -0.035955265164375305, -0.01084207184612751, -0.021889667958021164, -0.015048331581056118, -0.026391830295324326, -0.01688864268362522, -0.0071587031707167625, -0.04631684347987175, 0.011892126873135567, 0.029396381229162216, -0.023010291159152985, -0.001197675708681345, 0.03371197730302811, -0.00216425652615726, -0.011458168737590313, 0.030440039932727814, 0.06312527507543564, -0.03932657092809677, 0.019901486113667488, 0.02049548178911209, 0.008493239991366863, 0.019310608506202698, 0.0031521518249064684, -0.051630645990371704, -0.016064533963799477, -0.017728744074702263, -0.010008787736296654, -0.0283491313457489, -0.055837880820035934, -0.044553011655807495, 0.01370764896273613, 0.038011711090803146, -0.0007121058297343552, -0.018677253276109695, 0.012166017666459084, -0.018900135532021523, -0.003083776915445924, 0.005493908654898405, -0.041210368275642395, 0.01885402761399746, 0.061590589582920074, -0.008378441445529461, -0.0005197232821956277, -0.048776332288980484, 0.01163625530898571, -0.0030049486085772514, -0.016590896993875504, -0.007962197996675968, -0.038521841168403625, 0.031037673354148865, -0.0035524771083146334, 0.050633858889341354, -0.0026617690455168486, -0.0064043086022138596, -0.037199679762125015, 0.002106740605086088, 0.006045850925147533, -0.02021719329059124, 0.028693780303001404, -0.005090564489364624, 0.0395166352391243, 0.047381624579429626, -0.004892575088888407, 0.023113803938031197, -0.010158553719520569, -0.008451273664832115, 0.06309088319540024, -0.02695871889591217, -0.050757989287376404, -0.03229277580976486, -0.051754944026470184, 0.0255748201161623, -0.00461594108492136, 0.001402724185027182, -0.04253128916025162, 0.007267901208251715, 0.03802899271249771, 0.038421012461185455, 0.0354396291077137, 0.029453162103891373, 0.018143849447369576, -0.04022354632616043, 0.018067780882120132, -0.10462456941604614, -0.004956354852765799, 0.0479310117661953, 0.01584532856941223, 0.00325783621519804, -0.009982001967728138, -0.04482274502515793, 0.004480162635445595, -0.06411388516426086, -0.01850527711212635, 0.03940151259303093, -0.006908359006047249, -0.015931593254208565, 0.029935598373413086, -0.041310057044029236, -0.009866523556411266, 0.008711783215403557, -0.045262619853019714, 0.014199541881680489, 0.0075698611326515675, 0.030476028099656105, -0.0231406819075346, 0.03415133059024811, -0.030192872509360313, 0.03254738822579384, 0.10383906960487366, 0.0245534498244524, 0.016776952892541885, 0.061890918761491776, -0.00794343650341034, 0.03633357211947441, 0.03944874554872513, -0.00703441584482789, 0.023106014356017113, 0.020739760249853134, -0.0332268550992012, -0.07825236767530441, 0.04457434266805649, 0.012545709498226643, -0.017322968691587448, -0.056129857897758484, 0.08505862206220627, 0.00394047237932682, -0.04338015988469124, -0.05979493260383606, 0.010478422045707703, -0.08312160521745682, -0.014229069463908672, -0.01625456102192402, 0.01033801306039095, -0.03519062325358391, 0.054713986814022064, -0.03515836223959923, 0.030993187800049782, 0.0892350897192955, -0.016665326431393623, -0.014886182732880116, -0.010476463474333286, 0.07930819690227509, 0.10116098076105118, 0.0683872401714325, -0.0022556756157428026, 0.06161928549408913, -0.05242997407913208, -0.020345019176602364, -0.020664213225245476, -0.02668651193380356, -0.030288929119706154, -0.0402057059109211, 0.04538170248270035, 0.05574619770050049, -0.036609552800655365, 0.06282466650009155, -0.026350297033786774, -0.04558410868048668, 0.023410264402627945, 0.02751610055565834, 0.02223668433725834, 0.057732030749320984, 0.007913446985185146, -0.003737168852239847, 0.004449922125786543, -0.038668472319841385, 0.04916800931096077, -0.002404036931693554, -0.03401358425617218, 0.026814645156264305, 0.011133899912238121, 0.01921255514025688, 0.03762732446193695, 0.046110235154628754, 0.10199051350355148, -0.04098125547170639, 0.028101498261094093, 0.003139843698590994, -0.0013279927661642432, 0.01904979906976223, 0.02335522510111332, 0.00045476757804863155, -0.01610543765127659, -0.018757641315460205, -0.04538223147392273, -0.032593246549367905, -0.02967158332467079, -0.013977810740470886, -0.010100041516125202, -0.0199707243591547, 0.010907215066254139, 0.03916007652878761, -0.02387109585106373, -0.048977263271808624, -0.06261319667100906, -0.03472437337040901, -0.07653272897005081, -0.06677398830652237, 0.002478144597262144, 0.030471613630652428, -0.032934874296188354, -0.027662213891744614, 0.008693154901266098, -0.012991802766919136, -0.012179449200630188, 0.05120226740837097, -0.03773883357644081, -0.04292415454983711, 0.009903773665428162, 0.002386007457971573, 0.01902833767235279, -0.01408348698168993, 0.04232889041304588, -0.0040866839699447155, -0.028699230402708054, -0.021626489236950874, 0.028252489864826202, 0.02865627594292164, 0.01600082404911518, 0.01831400953233242, -0.09175808727741241, 0.04473793879151344, 0.04156395047903061, -0.030332036316394806, -0.08046212047338486, 0.0371360257267952, -0.0033052824437618256, -0.006754246074706316, 0.04333730414509773, -0.03536762669682503, -0.00379615044221282, -0.0824003517627716, 0.0034485049545764923, -0.011153600178658962, 0.009500591084361076, 0.023293184116482735, -0.027310656383633614, 0.0837002545595169, 0.03705872595310211, -0.025317814201116562, -0.059557102620601654, 0.002601905493065715, -0.01906484179198742, -0.010498186573386192, -0.0179748572409153, -0.00550001161172986, -0.010317344218492508, -0.07908330112695694, -0.018396425992250443, 0.037406325340270996, -0.025796113535761833, -0.044282667338848114, 0.01588701270520687, 0.01447716448456049, -0.019535673782229424, 0.012714743614196777, -0.023897314444184303, 0.012261947616934776, -0.031497374176979065, -0.0019450699910521507, -0.025383008643984795, 0.005998496897518635, -0.014180490747094154, 0.014346490614116192, 0.02204570360481739, -0.0405370369553566, 0.00497535290196538, -0.012928396463394165, 0.018931197002530098, 0.0093870609998703, -0.010471614077687263, -0.01400978583842516 ]
[ -0.0970638170838356, -0.04076799005270004, -0.06736446917057037, -0.011382760480046272, 0.037651825696229935, 0.003753820899873972, 0.019537342712283134, 0.028400275856256485, 0.017565222457051277, -0.00521590793505311, 0.03063347004354, -0.03307599574327469, 0.010965828783810139, 0.013828527182340622, 0.06814391911029816, 0.003203245345503092, -0.019042611122131348, -0.07012904435396194, -0.012517692521214485, 0.015136019326746464, 0.02285013534128666, -0.06798873096704483, -0.05530096963047981, -0.048056378960609436, 0.05758626013994217, 0.031674791127443314, 0.07895771414041519, -0.024613885208964348, -0.0009902985766530037, -0.20958498120307922, 0.015317543409764767, -0.015911821275949478, 0.028712861239910126, -0.023232294246554375, 0.021757274866104126, 0.04668787866830826, 0.014274382032454014, 0.006026543211191893, 0.010016288608312607, 0.02967391163110733, 0.003221695078536868, 0.04204094037413597, -0.011550799943506718, -0.020935365930199623, 0.03905327245593071, -0.011271707713603973, -0.017816275358200073, -0.0065337885171175, -0.04291365668177605, 0.0168136153370142, -0.06851671636104584, -0.0026288952212780714, 0.010130711831152439, 0.0022361939772963524, 0.006756470538675785, 0.029452268034219742, 0.03008561208844185, 0.05881790444254875, 0.008291792124509811, -0.01337237935513258, 0.0034528453834354877, 0.008914478123188019, -0.1521134078502655, 0.08208563178777695, 0.07107777148485184, 0.04569179192185402, -0.019445454701781273, 0.014485667459666729, -0.02167247235774994, 0.08317146450281143, 0.01720488630235195, -0.01454894244670868, -0.04449765011668205, 0.051856741309165955, 0.019968902692198753, -0.04415963962674141, 0.00044744880869984627, 0.0013490779092535377, 0.024099554866552353, -0.0221212450414896, -0.017729731276631355, 0.0009265888947993517, -0.027579661458730698, -0.0317821130156517, -0.06696410477161407, 0.025990236550569534, -0.008461060002446175, 0.026005780324339867, 0.018391810357570648, 0.008196677081286907, 0.013962611556053162, 0.05941001698374748, 0.03718997538089752, -0.004657058976590633, -0.07946142554283142, 0.020614981651306152, 0.02095770835876465, 0.031405091285705566, 0.023597557097673416, 0.3941534459590912, 0.002267449628561735, -0.011475884355604649, 0.05859367921948433, 0.023741085082292557, 0.005689120851457119, 0.010672811418771744, -0.016073573380708694, -0.03076203539967537, 0.029492542147636414, -0.02955120988190174, 0.012089477851986885, -0.0036310406867414713, 0.07913964986801147, -0.05513419955968857, 0.012888499535620213, -0.02900400385260582, 0.04893394932150841, 0.03753195330500603, 0.02074866183102131, -0.010672694072127342, -0.03183319792151451, 0.021539265289902687, 0.0294735636562109, -0.014881904236972332, -0.022265709936618805, -0.023589661344885826, 0.005968362092971802, 0.0698249489068985, 0.04410189762711525, -0.017264988273382187, 0.05720342695713043, -0.05272246524691582, -0.0743878111243248, 0.03451492264866829, 0.023606715723872185, -0.009762527421116829, -0.01929219625890255, -0.049589186906814575, 0.016978254541754723, 0.018189039081335068, -0.03199275583028793, -0.007993345148861408, 0.023958418518304825, -0.045898303389549255, -0.06746713072061539, 0.11525018513202667, 0.03127070516347885, -0.03292618691921234, -0.026864387094974518, -0.026555011048913002, -0.0017097487580031157, 0.02272830903530121, 0.01714158058166504, -0.09363552182912827, 0.03117266297340393, 0.034011051058769226, 0.09212382882833481, -0.015100413002073765, -0.06156042963266373, -0.019584791734814644, -0.06604465842247009, -0.03111156076192856, -0.05111844092607498, 0.07396817207336426, 0.032736219465732574, -0.06717819720506668, -0.005608474835753441, 0.011453703977167606, 0.02115785703063011, -0.0794781967997551, 0.026242827996611595, 0.04832984507083893, -0.04003847390413284, 0.021441703662276268, 0.04467863589525223, -0.014053473249077797, -0.05559847131371498, -0.0123143894597888, 0.044385552406311035, 0.002583868568763137, -0.0237917210906744, -0.0065771122463047504, -0.04174777865409851, 0.0033285997342318296, -0.021224522963166237, -0.06266532838344574, -0.08264489471912384, 0.014241866767406464, -0.02749522775411606, 0.0002971946378238499, 0.0031991726718842983, -0.026382269337773323, -0.05114784836769104, 0.08577258884906769, -0.051366209983825684, -0.01933087222278118, -0.010654404759407043, 0.009010415524244308, -0.00797222089022398, -0.03600398078560829, -0.04742760583758354, 0.023834094405174255, -0.04777980595827103, 0.028059320524334908, -0.07010649889707565, 0.03618686646223068, 0.04214025288820267, -0.040663089603185654, 0.0743786171078682, 0.042072758078575134, 0.007643298711627722, -0.00186305888928473, -0.026483576744794846, 0.011515738442540169, -0.01633073203265667, -0.010653319768607616, -0.016183054074645042, -0.007924031466245651, 0.033722277730703354, -0.00836628396064043, -0.011224702000617981, -0.023636896163225174, -0.029092783108353615, -0.3442293405532837, -0.042423609644174576, -0.02683348022401333, 0.005211701616644859, 0.06211598962545395, -0.049421001225709915, -0.01979689672589302, -0.031106192618608475, 0.004835415631532669, 0.0036263144575059414, 0.057757534086704254, -0.01142255961894989, -0.030914708971977234, -0.12183183431625366, 0.0212948527187109, 0.01344786025583744, -0.051827702671289444, 0.005768964067101479, -0.05179685726761818, 0.031965333968400955, -0.014750419184565544, -0.02299036644399166, -0.04410442337393761, -0.06261328607797623, 0.01251453161239624, -0.03561493381857872, 0.1086580902338028, -0.004827805329114199, 0.06932205706834793, -0.0008449748274870217, 0.028599442914128304, -0.0024520012084394693, -0.006434241309762001, -0.048981450498104095, -0.0016700399573892355, -0.028919029980897903, 0.011942947283387184, -0.003355790162459016, -0.0166771300137043, -0.04482168331742287, -0.07722590118646622, -0.0003405092575121671, -0.04643501713871956, 0.0024417899549007416, -0.05741870775818825, 0.021027641370892525, -0.0026952745392918587, -0.0009223686065524817, -0.017351942136883736, 0.0686098039150238, 0.021403558552265167, -0.00046073138946667314, 0.030412161722779274, -0.0037809424102306366, 0.026497164741158485, -0.023218531161546707, -0.036322858184576035, -0.010309096425771713, -0.00047615228686481714, -0.006729056593030691, 0.024287506937980652, 0.04296129196882248, 0.045198746025562286, -0.031154775992035866, -0.010927809402346611, -0.01620125211775303, 0.029892440885305405, -0.03933015093207359, 0.010275975801050663, 0.007843711413443089, -0.01760772615671158, 0.13568846881389618, 0.014976995065808296, -0.005381829105317593, 0.04160458594560623, 0.0460868738591671, -0.028306197375059128, 0.008330017328262329, -0.02039007842540741, 0.0187077559530735, 0.043921325355768204, -0.029557516798377037, 0.03279627859592438, 0.005897988099604845, 0.005816072691231966, -0.0037811200600117445, 0.013709735125303268, -0.022102272137999535, 0.021392319351434708, 0.056749127805233, 0.0009301260579377413, -0.008506442420184612, 0.005854697898030281, -0.02596072480082512, 0.050112493336200714, 0.0003183273656759411, -0.2749812602996826, 0.026569735258817673, 0.07419697940349579, 0.08960923552513123, 0.015721037983894348, 0.01533515751361847, 0.04430272802710533, -0.03684776648879051, -0.023845814168453217, 0.011353437788784504, 0.022935474291443825, 0.048367589712142944, 0.06309165060520172, 0.0050509776920080185, 0.014493211172521114, -0.04227295517921448, 0.03790830075740814, -0.038653843104839325, 0.04108111560344696, 0.0108407661318779, 0.04345417395234108, -0.01240319013595581, 0.18222381174564362, 0.004289960488677025, 0.020403079688549042, 0.005209721624851227, -0.024858294054865837, 0.047501809895038605, 0.07356207072734833, -0.021260887384414673, 0.00010251227649860084, 0.038601189851760864, 0.01932852901518345, -0.0010858298046514392, 0.046246301382780075, -0.03397870808839798, -0.027644101530313492, 0.04181100055575371, 0.01731952466070652, -0.001740578911267221, 0.004729914478957653, 0.010179465636610985, -0.0007672443171031773, 0.02637346461415291, 0.09196841716766357, 0.011500543914735317, 0.010519808158278465, -0.07797940820455551, -0.04468546062707901, 0.04123983904719353, -0.02756763994693756, -0.05279906466603279, -0.013716754503548145, -0.01443971786648035, -0.0022075341548770666, 0.03736850619316101, 0.024044182151556015, -0.06534334272146225, 0.018796483054757118, -0.019800666719675064, -0.0044904486276209354, -0.057831957936286926, 0.09199155122041702, -0.009093459695577621, 0.010427048429846764 ]
[ -0.0035563854034990072, 0.02382083050906658, 0.0063377064652740955, -0.007323232013732195, 0.008041770197451115, 0.012034674175083637, 0.018170872703194618, 0.022783685475587845, -0.00790612492710352, -0.0000019274812075309455, -0.02817635051906109, 0.031029775738716125, 0.026494784280657768, -0.015506709925830364, 0.0005643018521368504, -0.009413838386535645, 0.010244607925415039, -0.01601656898856163, 0.03425329923629761, 0.0038154718931764364, -0.013179168105125427, -0.01292539294809103, -0.01778273843228817, -0.009301618672907352, -0.03074757568538189, 0.03777627646923065, -0.02117140404880047, -0.0004030078707728535, 0.0023613881785422564, -0.13875338435173035, -0.04431211203336716, -0.04288438707590103, 0.010675014927983284, -0.01189988013356924, -0.0007416005246341228, 0.01140756905078888, -0.009035478346049786, 0.0012945419875904918, 0.015336904674768448, 0.03709586337208748, 0.05703456327319145, 0.025525888428092003, 0.004097859375178814, -0.0009349733591079712, 0.022974390536546707, -0.013632228597998619, -0.021564261987805367, -0.014968694187700748, 0.007937707006931305, -0.00823803897947073, -0.045272547751665115, 0.012686064466834068, 0.00906470138579607, 0.02347251959145069, 0.03193439170718193, 0.006769504863768816, -0.016975849866867065, -0.03422287479043007, 0.007354551926255226, -0.03207467868924141, 0.012497268617153168, 0.021368490532040596, -0.0431583896279335, -0.007095229346305132, -0.001903680618852377, -0.014028213918209076, -0.041416142135858536, 0.05170281603932381, -0.028585026040673256, 0.013461598195135593, -0.006661371793597937, 0.010585974901914597, -0.04528331011533737, -0.015344730578362942, -0.014864727854728699, 0.007190986070781946, 0.012831037864089012, -0.024245362728834152, 0.013081950135529041, 0.005529365036636591, -0.06099184975028038, -0.003323921700939536, 0.00010117869533132762, -0.02959810011088848, -0.042364783585071564, -0.009119884110987186, 0.026614509522914886, -0.017226628959178925, 0.054181452840566635, -0.010685998015105724, -0.006125995889306068, 0.03948640450835228, 0.0007492353324778378, -0.020430291071534157, -0.07989231497049332, -0.005938463844358921, -0.00914263166487217, -0.025384407490491867, 0.020388951525092125, 0.8444472551345825, 0.04138907045125961, -0.008633917197585106, 0.02388804778456688, 0.014012759551405907, 0.010594627819955349, 0.021415742114186287, -0.01987224444746971, 0.02201208472251892, 0.006817719433456659, -0.04199740290641785, -0.00011258279118919745, 0.017824795097112656, 0.04710942134261131, 0.02257142961025238, 0.0076046898029744625, 0.045694783329963684, -0.018287954851984978, 0.01178191602230072, -0.011063200421631336, 0.021245252341032028, 0.02360248565673828, 0.005912804510444403, 0.006954812444746494, -0.00042054144432768226, -0.02176826074719429, -0.14348195493221283, 0.0007708548801019788, -7.777844981943858e-33, -0.021383075043559074, -0.0387222021818161, 0.013006281107664108, -0.023376692086458206, 0.021048998460173607, 0.022047704085707664, -0.0073324949480593204, -0.04292292892932892, -0.022857381030917168, -0.015517470426857471, 0.013985644094645977, -0.005318761803209782, -0.022584855556488037, -0.03861897438764572, 0.0108844805508852, -0.03219542279839516, -0.004051977768540382, 0.04305898770689964, 0.02985662780702114, -0.006522790994495153, 0.021488310769200325, 0.05077054351568222, 0.0014940851833671331, 0.004891778342425823, 0.006375192664563656, 0.01623825542628765, -0.005777094978839159, -0.04847582057118416, 0.02793901041150093, -0.04583055526018143, -0.0120752714574337, 0.02152101881802082, -0.031534332782030106, -0.027366673573851585, 0.022287655621767044, -0.03209005296230316, -0.0251099094748497, -0.0024126272182911634, -0.033481139689683914, -0.0759231448173523, -0.02101551927626133, -0.05093754082918167, -0.03612480312585831, -0.0060838270001113415, -0.06381520628929138, 0.02670583687722683, 0.019443253055214882, -0.00025306918541900814, 0.0036884178407490253, 0.006588636431843042, 0.01683361642062664, -0.002262340160086751, 0.0021832867059856653, -0.020953135564923286, -0.04018936678767204, 0.026549795642495155, 0.032918766140937805, -0.004738524090498686, -0.01069859229028225, -0.017647942528128624, 0.018064022064208984, -0.018727263435721397, -0.0044918423518538475, 0.011584858410060406, -0.009789942763745785, 0.020474599674344063, 0.003386500757187605, 0.023016223683953285, 0.020761119201779366, 0.01205005869269371, -0.029928216710686684, 0.0036992228124290705, -0.004402194172143936, 0.0015886013861745596, 0.041293900460004807, -0.023765239864587784, -0.004046408459544182, 0.014768761582672596, -0.013020548038184643, 0.07422628998756409, 0.017887039110064507, -0.02259221114218235, -0.03331869840621948, -0.018561381846666336, -0.0014584456803277135, 0.008507352322340012, 0.01805543713271618, -0.007427106145769358, 0.024491289630532265, 0.02465076372027397, 0.04115518927574158, -0.010334248654544353, 0.009942535310983658, 0.008844190277159214, -0.008247236721217632, 7.708143309727882e-33, -0.023782016709446907, -0.042450398206710815, 0.015243906527757645, -0.015711599960923195, -0.002697159070521593, -0.031122490763664246, 0.03710931912064552, 0.006192374508827925, -0.032335225492715836, 0.019085973501205444, -0.03785131126642227, 0.007723076734691858, -0.02256188541650772, 0.034572094678878784, 0.06518679112195969, -0.023501496762037277, 0.027470959350466728, 0.03956612944602966, -0.010434691794216633, 0.004318722058087587, 0.01090668048709631, -0.0018691789591684937, -0.017297258600592613, 0.04652296379208565, 0.0326554998755455, 0.08209791779518127, 0.01268243882805109, 0.02464366890490055, 0.008380048908293247, -0.028653167188167572, -0.017139961943030357, -0.004139673430472612, -0.008989007212221622, 0.007922354154288769, -0.036022286862134933, 0.02167743630707264, 0.027668630704283714, -0.004830916412174702, -0.000925488886423409, -0.0066454000771045685, 0.007276284508407116, -0.001767063862644136, -0.02032868191599846, 0.008981565944850445, 0.016001345589756966, 0.060647401958703995, 0.013638485223054886, 0.002956087701022625, 0.028973015025258064, 0.011452141217887402, -0.024130316451191902, 0.049550123512744904, 0.0028583642560988665, 0.011030186899006367, -0.0019064127700403333, -0.02253570593893528, -0.010632465593516827, 0.03182191774249077, 0.015303521417081356, 0.02102476730942726, -0.019402476027607918, -0.0077256103977561, -0.028900783509016037, 0.0038136285729706287, -0.018814025446772575, -0.004244890529662371, -0.020560020580887794, -0.05766613781452179, 0.025994088500738144, -0.031677715480327606, -0.02378707006573677, 0.0049723731353878975, 0.024659384042024612, 0.01510566845536232, 0.01843978278338909, 0.019272008910775185, -0.009329336695373058, -0.0037612528540194035, -0.006847084499895573, 0.02997586689889431, 0.01853424496948719, 0.015259593725204468, -0.0022818907164037228, 0.02851245366036892, 0.0038612582720816135, -0.00971184577792883, -0.006968541070818901, -0.017322741448879242, 0.04401136934757233, -0.024306820705533028, 0.0318598747253418, -0.00653819739818573, 0.0006420885911211371, 0.033477943390607834, -0.02988010086119175, -1.3082214422865945e-8, 0.006294602528214455, -0.014741713181138039, 0.029711341485381126, 0.005812279414385557, 0.02777409926056862, 0.032927580177783966, 0.009802412241697311, -0.04105129465460777, -0.008922223933041096, -0.00015046675980556756, 0.058214426040649414, -0.025837315246462822, -0.012514566071331501, 0.009114310145378113, -0.017642652615904808, -0.05154836177825928, -0.01852269656956196, -0.00665847584605217, 0.04243335872888565, -0.0006441168952733278, 0.023225732147693634, 0.03194689750671387, -0.012561356648802757, 0.021327994763851166, -0.011228490620851517, -0.01435934565961361, 0.02507280558347702, -0.08089374005794525, 0.03480996936559677, -0.02078973315656185, -0.014575675129890442, -0.009140754118561745, -0.007426353171467781, 0.027047866955399513, -0.013574574142694473, -0.022153286263346672, 0.011284872889518738, 0.029645631089806557, 0.021562909707427025, 0.015196887776255608, -0.010171313770115376, 0.001784300897270441, -0.015559732913970947, -0.029788093641400337, -0.021438708528876305, 0.00004681747668655589, -0.04798826947808266, 0.02141646295785904, 0.05599342659115791, -0.05229133367538452, -0.0019669048488140106, -0.002631895476952195, 0.016144173219799995, 0.016788875684142113, 0.029912276193499565, -0.03665117919445038, 0.0014769836561754346, -0.027795543894171715, -0.057478927075862885, -0.020013829693198204, 0.023169435560703278, -0.011607709340751171, -0.029877621680498123, -0.030516739934682846 ]
r-markov-chain-wikipedia-example
https://markhneedham.com/blog/2015/04/05/r-markov-chain-wikipedia-example
false
2015-04-18 23:53:20
R: Removing for loops
[ "r-2" ]
[ "R" ]
In my last blog post I showed http://www.markhneedham.com/blog/2015/04/16/r-think-bayes-more-posterior-probability-calculations/[the translation of a likelihood function from Think Bayes into R] and in my first attempt at this function I used a couple of nested for loops. [source,r] ---- likelihoods = function(names, mixes, observations) { scores = rep(1, length(names)) names(scores) = names for(name in names) { for(observation in observations) { scores[name] = scores[name] * mixes[[name]][observation] } } return(scores) } ---- [source,r] ---- Names = c("Bowl 1", "Bowl 2") bowl1Mix = c(0.75, 0.25) names(bowl1Mix) = c("vanilla", "chocolate") bowl2Mix = c(0.5, 0.5) names(bowl2Mix) = c("vanilla", "chocolate") Mixes = list("Bowl 1" = bowl1Mix, "Bowl 2" = bowl2Mix) Mixes Observations = c("vanilla", "vanilla", "vanilla", "chocolate") l = likelihoods(Names, Mixes, Observations) > l / sum(l) Bowl 1 Bowl 2 0.627907 0.372093 ---- We pass in a vector of bowls, a nested dictionary describing the mixes of cookies in each bowl and the observations that we've made. The function tells us that there's an almost 2/3 probability of the cookies coming from Bowl 1 and just over 1/3 of being Bowl 2. In this case there probably won't be much of a performance improvement by getting rid of the loops but we should be able to write something that's more concise and hopefully idiomatic. Let's start by getting rid of the inner for loop. That can be replace by a call to the +++<cite>+++http://adv-r.had.co.nz/Functionals.html[Reduce]+++</cite>+++ function like so: [source,r] ---- likelihoods2 = function(names, mixes, observations) { scores = rep(0, length(names)) names(scores) = names for(name in names) { scores[name] = Reduce(function(acc, observation) acc * mixes[[name]][observation], Observations, 1) } return(scores) } ---- [source,r] ---- l2 = likelihoods2(Names, Mixes, Observations) > l2 / sum(l2) Bowl 1 Bowl 2 0.627907 0.372093 ---- So that's good, we've still got the same probabilities as before. Now to get rid of the outer for loop. The +++<cite>+++http://adv-r.had.co.nz/Functionals.html[Map]+++</cite>+++ function helps us out here: [source,r] ---- likelihoods3 = function(names, mixes, observations) { scores = rep(0, length(names)) names(scores) = names scores = Map(function(name) Reduce(function(acc, observation) acc * mixes[[name]][observation], Observations, 1), names) return(scores) } l3 = likelihoods3(Names, Mixes, Observations) > l3 $`Bowl 1` vanilla 0.1054688 $`Bowl 2` vanilla 0.0625 ---- We end up with a list instead of a vector which we need to fix by using the +++<cite>+++https://stat.ethz.ch/R-manual/R-devel/library/base/html/unlist.html[unlist]+++</cite>+++ function: [source,r] ---- likelihoods3 = function(names, mixes, observations) { scores = rep(0, length(names)) names(scores) = names scores = Map(function(name) Reduce(function(acc, observation) acc * mixes[[name]][observation], Observations, 1), names) return(unlist(scores)) } l3 = likelihoods3(Names, Mixes, Observations) > l3 / sum(l3) Bowl 1.vanilla Bowl 2.vanilla 0.627907 0.372093 ---- Now we just have this annoying 'vanilla' in the name. That's fixed easily enough: [source,r] ---- likelihoods3 = function(names, mixes, observations) { scores = rep(0, length(names)) names(scores) = names scores = Map(function(name) Reduce(function(acc, observation) acc * mixes[[name]][observation], Observations, 1), names) result = unlist(scores) names(result) = names return(result) } l3 = likelihoods3(Names, Mixes, Observations) > l3 / sum(l3) Bowl 1 Bowl 2 0.627907 0.372093 ---- A slightly cleaner alternative makes use of the +++<cite>+++https://stat.ethz.ch/R-manual/R-devel/library/base/html/lapply.html[sapply]+++</cite>+++ function: [source,r] ---- likelihoods3 = function(names, mixes, observations) { scores = rep(0, length(names)) names(scores) = names scores = sapply(names, function(name) Reduce(function(acc, observation) acc * mixes[[name]][observation], Observations, 1)) names(scores) = names return(scores) } l3 = likelihoods3(Names, Mixes, Observations) > l3 / sum(l3) Bowl 1 Bowl 2 0.627907 0.372093 ---- That's the best I've got for now but I wonder if we could write a version of this using matrix operations some how - but that's for next time!
null
null
[ 0.00916875246912241, 0.027204463258385658, -0.007552787661552429, 0.005370722152292728, 0.07000456750392914, 0.042213838547468185, 0.03275664523243904, 0.006300635170191526, -0.002315854886546731, -0.02021424099802971, 0.010461801663041115, 0.0049318717792630196, -0.0480046272277832, 0.010996818542480469, -0.02029726281762123, 0.0867326632142067, 0.06267606467008591, -0.007498595397919416, 0.008031383156776428, 0.0029233284294605255, 0.01883305422961712, 0.058183494955301285, 0.023624470457434654, 0.025777528062462807, 0.05532823130488396, -0.0008134852396324277, 0.016592716798186302, 0.024173956364393234, -0.03948616608977318, -0.017106350511312485, 0.04385354742407799, 0.04650018736720085, -0.0047922153025865555, -0.01539820060133934, 0.023954708129167557, -0.010033311322331429, -0.024696635082364082, 0.008044693619012833, 0.0011773378355428576, 0.01799158751964569, -0.05731464549899101, 0.030903104692697525, -0.04251446947455406, 0.010655952617526054, -0.049466997385025024, -0.013043249025940895, -0.044165439903736115, 0.012209215201437473, -0.0008533202344551682, -0.01763750985264778, -0.05837305635213852, 0.03634107485413551, -0.028530964627861977, -0.02607208676636219, -0.0014184864703565836, 0.031971774995326996, 0.02784629538655281, -0.06272172182798386, 0.019989026710391045, -0.037529345601797104, -0.023100100457668304, 0.0011110083432868123, -0.0037792320363223553, 0.02371908165514469, 0.001238880679011345, -0.024026138707995415, -0.013462470844388008, 0.045041825622320175, -0.032899629324674606, -0.00945874024182558, -0.04924248903989792, -0.026462720707058907, -0.0041451528668403625, 0.00723224226385355, -0.04283467307686806, -0.07276615500450134, 0.01873900555074215, 0.06305326521396637, 0.019261199980974197, -0.002589163836091757, 0.0020767233800143003, -0.017713280394673347, 0.006198421120643616, 0.015345660038292408, 0.011473255231976509, -0.03160766884684563, -0.006528290919959545, -0.03167058154940605, -0.07482082396745682, 0.07151573896408081, 0.014222761616110802, -0.05295202508568764, 0.007795166689902544, 0.019867977127432823, -0.039330024272203445, 0.0021093254908919334, 0.017826704308390617, -0.008393025025725365, -0.00969238206744194, -0.026114538311958313, -0.06282439827919006, -0.023735133931040764, 0.04244223237037659, 0.01426216121762991, -0.09065660089254379, -0.019341111183166504, -0.027800127863883972, -0.004340613726526499, -0.042709048837423325, 0.007558436598628759, -0.00927876215428114, 0.04925316944718361, -0.0073773739859461784, 0.01326826773583889, -0.08717098832130432, 0.049762286245822906, 0.020640427246689796, -0.009477358311414719, -0.017482904717326164, -0.008301300927996635, 0.04274682700634003, 0.027911821380257607, -0.003800457576289773, 0.0732397735118866, 0.03942982107400894, 0.03593248873949051, 0.004603059031069279, 0.06195248290896416, -0.014350209385156631, -0.05299126356840134, -0.012250639498233795, 0.04627000540494919, -0.00045224771020002663, 0.019855529069900513, -0.012073646299540997, -0.04205963388085365, -0.011437531560659409, -0.003421895205974579, 0.0532950684428215, 0.05120344087481499, 0.02711900696158409, -0.02947649173438549, 0.033904068171978, 0.007994613610208035, 0.030278651043772697, -0.004766670987010002, -0.02903795801103115, 0.0009948930237442255, -0.03461519628763199, 0.019609766080975533, 0.03085392154753208, 0.009238282218575478, 0.037902966141700745, -0.04440687969326973, 0.025978125631809235, 0.06469172239303589, 0.022975362837314606, 0.016197729855775833, -0.008099358528852463, 0.011776872910559177, 0.047312237322330475, 0.043662384152412415, 0.007798521779477596, 0.026292432099580765, 0.003035937901586294, -0.03703523799777031, 0.036607783287763596, 0.06912048161029816, -0.029516564682126045, -0.003032960696145892, -0.045810747891664505, -0.06348394602537155, 0.0669117271900177, -0.001254762290045619, -0.025842886418104172, 0.012075599282979965, 0.07561861723661423, 0.01907479576766491, 0.06570343673229218, 0.03231548145413399, -0.07401714473962784, 0.04572654888033867, 0.00104718457441777, 0.0241459459066391, 0.011616122908890247, -0.021121984347701073, 0.08297267556190491, 0.012446085922420025, 0.008332392200827599, 0.05105668678879738, -0.06669013202190399, -0.08483435213565826, -0.008755712769925594, -0.003385045798495412, 0.048192016780376434, -0.02830507420003414, 0.0019477163441479206, 0.07073338329792023, 0.03304841369390488, 0.011755735613405704, 0.0019547101110219955, 0.026382816955447197, 0.044100359082221985, -0.02559972181916237, -0.06671079248189926, 0.03454558923840523, 0.03367536514997482, -0.026100579649209976, -0.035574618726968765, 0.03260235860943794, -0.039509326219558716, 0.025489548221230507, 0.0189556535333395, -0.032311804592609406, 0.015065587125718594, 0.025716114789247513, 0.0648215264081955, 0.027081340551376343, 0.03609316796064377, -0.04495227336883545, -0.013590974733233452, 0.004415258299559355, -0.013595706783235073, -0.008375829085707664, 0.011943005956709385, 0.13561351597309113, 0.08877293765544891, -0.024187810719013214, -0.0397413931787014, 0.04438302293419838, -0.00024371466133743525, -0.008843736723065376, 0.03516261652112007, -0.0014666728675365448, -0.01641782745718956, 0.023680362850427628, -0.041776519268751144, -0.020737184211611748, 0.012135251425206661, -0.056578949093818665, -0.00428612669929862, 0.0775534063577652, -0.01533933449536562, 0.05550637096166611, -0.025932390242815018, -0.01053959596902132, 0.0019564765971153975, -0.040862005203962326, -0.0472981296479702, 0.01976565457880497, 0.012958863750100136, -0.017358385026454926, 0.04417359083890915, -0.022532470524311066, -0.008647211827337742, -0.027447888627648354, -0.036161720752716064, 0.03280976042151451, 0.0806141272187233, 0.0638459324836731, -0.028721459209918976, 0.0805550292134285, 0.0025138501077890396, -0.008782314136624336, -0.016510993242263794, -0.07466305792331696, -0.05576089769601822, -0.0403020977973938, 0.005686756689101458, 0.02929058112204075, 0.013601338490843773, 0.01320718415081501, -0.014267753809690475, 0.026027198880910873, -0.0007937089540064335, -0.024044742807745934, 0.02503739297389984, 0.009114952757954597, -0.02887919172644615, -0.031981196254491806, -0.007837054319679737, 0.06250710040330887, -0.010488593950867653, -0.03489827364683151, 0.007051974534988403, -0.06813371181488037, 0.019512532278895378, -0.061036210507154465, -0.021106107160449028, -0.002617770805954933, 0.0039206393994390965, 0.047408364713191986, 0.002264130860567093, -0.004682199098169804, 0.03997136652469635, 0.0028613463509827852, 0.028365690261125565, 0.00855033565312624, 0.0045957718975842, 0.03543517738580704, -0.01445793453603983, 0.002716444432735443, 0.04107460007071495, 0.011405637487769127, 0.0039425683207809925, -0.03605246916413307, 0.023187994956970215, -0.0078163156285882, -0.2834711968898773, 0.012228298000991344, 0.020706212148070335, -0.020420173183083534, 0.03209775313735008, -0.03254837542772293, 0.022867023944854736, -0.04733189567923546, -0.019054818898439407, 0.029120640829205513, 0.0053657060489058495, -0.03173966705799103, -0.040918223559856415, 0.055174220353364944, 0.03696257621049881, 0.00801844708621502, -0.014578050933778286, -0.02969847247004509, -0.005308795254677534, 0.07314726710319519, 0.04878397285938263, -0.05495123565196991, -0.02573065087199211, 0.01730080507695675, 0.0016077480977401137, 0.053556181490421295, -0.04737940803170204, 0.035780373960733414, -0.08950361609458923, -0.011988053098320961, -0.003456914098933339, -0.03372492268681526, 0.019001396372914314, -0.021838530898094177, 0.00011496327351778746, -0.007570421788841486, 0.019489524886012077, -0.012850108556449413, -0.03100443072617054, 0.046476099640131, -0.04460001364350319, -0.03974871709942818, 0.014206436462700367, -0.011443529278039932, 0.08894611150026321, 0.010111775249242783, -0.04552400857210159, -0.01274829264730215, -0.044251833111047745, 0.05417574197053909, -0.01647825539112091, -0.013766929507255554, -0.02333015948534012, 0.016368389129638672, -0.049362532794475555, -0.02773585356771946, -0.01280795969069004, -0.01720774546265602, -0.021862830966711044, -0.029514465481042862, 0.0214499831199646, -0.03832608833909035, 0.0011357254115864635, -0.033168449997901917, -0.004691221285611391, -0.05815744772553444, -0.0744544118642807, -0.00015179108595475554, 0.062276098877191544, 0.029751306399703026, -0.018203971907496452, -0.030517542734742165, -0.021886831149458885, -0.10420884937047958, -0.013899767771363258, -0.024418827146291733, -0.015532105229794979, -0.013482625596225262, 0.012663752771914005, 0.03710173815488815, -0.03664400801062584, -0.0618726909160614, 0.02462858520448208, -0.009445596486330032, 0.02816581539809704, -0.012818710878491402, -0.015714118257164955, 0.02157844789326191, -0.026889687404036522, -0.021017758175730705, 0.06561087816953659, -0.0093619329854846, 0.0183179322630167, -0.013776039704680443, -0.006381732877343893, 0.06685482710599899, 0.023298198357224464, -0.011285553686320782, 0.02020980417728424, 0.048299640417099, 0.018213802948594093, -0.05751724913716316, 0.01073629129678011, -0.03149788826704025, -0.06508683413267136, 0.004278185311704874, -0.04390433058142662, -0.0010420415783300996, 0.03255249932408333, -0.005325872916728258, 0.0033274441957473755, -0.0076960427686572075, 0.03252631053328514, -0.03088582679629326, -0.016532283276319504, -0.022598344832658768, 0.020067937672138214, 0.02200128696858883, 0.023512257263064384, -0.018137240782380104, -0.07486937195062637, 0.024907929822802544, -0.02810852602124214, -0.023061519488692284, -0.06000915914773941, -0.046858642250299454, 0.001731369411572814, -0.03836624696850777, -0.014663096517324448, 0.025315089151263237, -0.0031571900472044945, 0.018674571067094803, 0.05281562730669975, -0.01349655631929636, 0.05595893785357475, -0.010158654302358627, -0.02512567862868309, -0.008477100171148777, -0.01589430496096611, -0.023415492847561836, 0.004152016714215279, -0.013417583890259266, 0.01731475256383419, 0.04428188502788544, 0.008547641336917877, 0.011723168194293976, 0.028543030843138695, -0.022283628582954407, 0.005430871620774269, 0.026803405955433846, 0.003403154667466879, -0.0034407072234898806, 0.008943178690969944, -0.024448975920677185, -0.008359581232070923, -0.009114214219152927, 0.03282519802451134, -0.01704246550798416, -0.03996992111206055, -0.054315049201250076, 0.0336691290140152, -0.022278334945440292, -0.034723054617643356, -0.032552964985370636, -0.0015949716325849295, 0.07049150764942169, -0.023609422147274017, 0.015364098362624645, -0.00027679791674017906, 0.01637996733188629, 0.016469230875372887, -0.02889297530055046, -0.01476113311946392, 0.007157403975725174, -0.039058320224285126, -0.001428028685040772, 0.026979602873325348, -0.014020221307873726, -0.019282344728708267, -0.008965771645307541, -0.018350521102547646, -0.022110402584075928, -0.0015924216713756323, 0.013937150128185749, 0.04742201790213585, 0.03638392314314842, -0.019830532371997833, -0.02267463319003582, -0.026151634752750397, -0.024979664012789726, -0.05984479561448097, 0.0027308091521263123, -0.00882148277014494, 0.02792341075837612, -0.03830517455935478, -0.06662395596504211, -0.00475924601778388, 0.013104635290801525, -0.04657039791345596, 0.0203388724476099, 0.008500496856868267, -0.0023774947039783, -0.0070336549542844296, 0.026257071644067764, 0.07590898871421814, -0.05878016725182533, 0.0012654649326577783, -0.00001534484908916056, -0.009052247740328312, 0.011773294769227505, -0.007527726702392101, -0.045238252729177475, -0.00019190041348338127, -0.01744251511991024, 0.029218439012765884, -0.02046656608581543, -0.04571964964270592, -0.007945512421429157, 0.014559220522642136, 0.009717238135635853, 0.011939979158341885, -0.024625880643725395, -0.001404317794367671, -0.02521025761961937, -0.03056010976433754, 0.01944631151854992, -0.048658665269613266, -0.038372136652469635, 0.03863019123673439, -0.03679261356592178, 0.03243699297308922, -0.026897767558693886, -0.0024018094409257174, 0.040810324251651764, -0.020210416987538338, 0.007077352609485388, -0.05764029175043106, 0.03543301671743393, 0.009341922588646412, 0.051340505480766296, -0.011094165034592152, -0.019914209842681885, -0.032500579953193665, 0.025319863110780716, -0.049180660396814346, 0.020033372566103935, 0.005982751492410898, 0.012405871413648129, 0.03372953459620476, 0.0559188649058342, -0.025098903104662895, 0.017867853865027428, -0.021933140233159065, -0.01856207475066185, 0.06725477427244186, -0.020065847784280777, -0.022643668577075005, -0.044367820024490356, -0.02744450606405735, 0.02355339005589485, -0.005489585921168327, 0.004143108613789082, -0.022713270038366318, 0.04413281008601189, 0.03883077949285507, 0.03498043864965439, 0.05835156887769699, 0.0007411451661027968, 0.008549768477678299, -0.03704026713967323, 0.017672671005129814, -0.07598526775836945, -0.03250753507018089, 0.06629283726215363, 0.012484806589782238, -0.0005964425508864224, 0.005054587032645941, -0.04848805442452431, 0.04908294603228569, -0.07763606309890747, -0.02444111555814743, 0.022996772080659866, -0.0246015265583992, 0.0018619897309690714, -0.004997979383915663, -0.05393878370523453, -0.012594630010426044, 0.018833039328455925, -0.041833918541669846, 0.002021430991590023, -0.011237453669309616, 0.06816407293081284, -0.01500610075891018, 0.035529304295778275, 0.008520536124706268, 0.007659707218408585, 0.06173781678080559, 0.046596869826316833, 0.028810210525989532, 0.05760429799556732, -0.034697964787483215, 0.029415985569357872, 0.03375393897294998, 0.013609031215310097, -0.002820295747369528, 0.0056304968893527985, -0.005351920146495104, -0.06191687658429146, 0.011222443543374538, 0.006725101266056299, -0.035467300564050674, -0.04138661175966263, 0.05988503620028496, 0.0016808571526780725, -0.029104875400662422, -0.04073669761419296, 0.012286149896681309, -0.051654912531375885, 0.01104667503386736, 0.00785139761865139, -0.014985240064561367, -0.04375652223825455, 0.07547862082719803, 0.0010576051427051425, 0.0017151935026049614, 0.05286816135048866, -0.014064475893974304, -0.016478247940540314, 0.015621056780219078, 0.08438518643379211, 0.08708135038614273, 0.05660448223352432, 0.01281860750168562, 0.07346093654632568, -0.024024054408073425, -0.03737438842654228, -0.00866928230971098, -0.026773469522595406, -0.0036501099821180105, -0.016500921919941902, 0.02454903908073902, 0.08445484936237335, -0.016327397897839546, 0.04766292870044708, -0.036827605217695236, -0.021518267691135406, 0.016813302412629128, -0.0002536056563258171, 0.011704983189702034, 0.06034884974360466, -0.017073001712560654, 0.03417612239718437, -0.01793503761291504, -0.049203917384147644, -0.0036986717022955418, -0.007804699242115021, -0.012527075596153736, 0.03208793327212334, -0.03895155340433121, 0.03663748875260353, 0.009169836528599262, 0.0316186361014843, 0.08051468431949615, -0.023601852357387543, -0.029014257714152336, -0.009899722412228584, 0.026528403162956238, 0.0023137256503105164, 0.022684140130877495, 0.003528231754899025, -0.038154635578393936, -0.0038590289186686277, -0.04466937854886055, -0.011422076262533665, -0.027723368257284164, -0.020007140934467316, 0.005170430056750774, -0.027232345193624496, -0.009143281728029251, 0.0047171409241855145, -0.015286995097994804, -0.057568393647670746, -0.054797619581222534, -0.03847687691450119, -0.05244719982147217, -0.06612473726272583, -0.02154327929019928, 0.02130851149559021, -0.016975872218608856, -0.030291827395558357, -0.002558934036642313, -0.013797171413898468, -0.016548454761505127, 0.028887568041682243, -0.053527701646089554, 0.0020599267445504665, 0.021798906847834587, 0.009213806129992008, 0.040828801691532135, 0.013414192944765091, 0.042961277067661285, 0.0060083321295678616, -0.0029243240132927895, 0.007848975248634815, 0.013282225467264652, 0.039699919521808624, 0.0155823128297925, 0.017176754772663116, -0.06407782435417175, 0.0014636529376730323, 0.023398783057928085, -0.0326361246407032, -0.09565570950508118, 0.0027054341044276953, 0.026490328833460808, 0.0052269152365624905, 0.02628166414797306, -0.029675189405679703, 0.008744413033127785, -0.03724860027432442, -0.022804994136095047, -0.0031685337889939547, 0.013330450281500816, 0.04941927641630173, -0.043256573379039764, 0.07478215545415878, 0.009342116303741932, -0.024493113160133362, -0.05157585069537163, -0.018545519560575485, 0.0015371374320238829, 0.01134492363780737, -0.04629890248179436, -0.019113101065158844, -0.0067032258957624435, -0.11422151327133179, -0.014464610256254673, 0.02960038185119629, -0.043563906103372574, -0.01395004615187645, 0.015117214061319828, 0.005475226789712906, -0.01397379394620657, 0.04529194161295891, -0.022655876353383064, 0.05196484923362732, -0.015057597309350967, -0.011209862306714058, -0.023349057883024216, 0.038454748690128326, 0.0072530172765254974, 0.03847602382302284, 0.001980761531740427, -0.04332856461405754, -0.021130023524165154, -0.027103273198008537, 0.013478608801960945, 0.05655135214328766, 0.011658520437777042, 0.009990600869059563 ]
[ -0.06666921079158783, -0.027902640402317047, -0.04785674810409546, -0.04537796229124069, 0.06976617872714996, -0.01979074254631996, 0.01931593380868435, 0.03222881630063057, 0.06323869526386261, 0.0036550152581185102, 0.001232952461577952, -0.08175094425678253, 0.0027213990688323975, -0.013598049990832806, 0.050515297800302505, -0.0031724963337183, -0.031156621873378754, -0.05677996948361397, -0.022265035659074783, 0.02429540641605854, 0.014339298009872437, -0.007902417331933975, -0.054063599556684494, -0.0225107092410326, 0.05459042266011238, 0.04973766952753067, 0.025781089439988136, -0.00811313558369875, -0.03136049956083298, -0.2219657003879547, 0.01832517236471176, 0.004601220600306988, 0.04821734502911568, -0.013586936518549919, 0.0072174989618361, 0.048436038196086884, 0.04741853475570679, 0.011093659326434135, 0.006801429204642773, 0.06912951171398163, 0.05145171657204628, -0.0043553682044148445, -0.014205683022737503, -0.003148064948618412, 0.03093193843960762, -0.017514143139123917, -0.050041526556015015, -0.018529746681451797, -0.03045831248164177, 0.019796177744865417, -0.050490107387304306, -0.003132773796096444, -0.03345935419201851, -0.018758073449134827, 0.002267767209559679, 0.039422839879989624, 0.023333756253123283, 0.03455225005745888, 0.03241109475493431, 0.061536457389593124, 0.019448045641183853, 0.025987381115555763, -0.1583818942308426, 0.08739371597766876, 0.014072426594793797, 0.013924283906817436, -0.03682297468185425, -0.009850777685642242, 0.0020048089791089296, 0.10940488427877426, -0.01670430228114128, 0.0051778326742351055, -0.025774860754609108, 0.09676112979650497, -0.00366040482185781, -0.028826838359236717, -0.002603195607662201, 0.011040368117392063, 0.021438337862491608, -0.014566958881914616, -0.024197889491915703, 0.03065626509487629, -0.0037731423508375883, -0.019355570897459984, -0.020034775137901306, -0.0009732444887049496, -0.013274753466248512, 0.009670741856098175, 0.040780674666166306, 0.01201847568154335, 0.0018525735940784216, -0.00447542779147625, -0.024307027459144592, -0.0009730197489261627, -0.08597569912672043, 0.011875233612954617, 0.01399997528642416, 0.00721184303984046, -0.011301684193313122, 0.3825957477092743, -0.02856493555009365, -0.002173604676499963, 0.01735123060643673, 0.044292643666267395, -0.009890302084386349, -0.056358546018600464, -0.0414268784224987, -0.05517752841114998, 0.0021945899352431297, -0.02997114136815071, -0.015454932115972042, -0.03602241352200508, 0.05704499036073685, -0.06937991082668304, -0.018444037064909935, 0.012154879979789257, 0.06991113722324371, -0.025259342044591904, 0.025443725287914276, 0.0005243810592219234, -0.022100593894720078, 0.007778691593557596, 0.051662690937519073, 0.0007265809690579772, -0.004521603230386972, -0.0017714631976559758, 0.02876909263432026, 0.09141674637794495, 0.020722821354866028, 0.027187544852495193, 0.0750148817896843, -0.03927113860845566, -0.09226005524396896, 0.009278528392314911, -0.00010069127165479586, 0.013445421122014523, 0.03194130212068558, -0.005521133076399565, 0.007119341753423214, -0.001595343928784132, -0.02189207263290882, -0.05292591452598572, 0.04628049582242966, -0.017916735261678696, -0.0372176319360733, 0.13101986050605774, -0.00918106734752655, -0.027426548302173615, -0.04480952396988869, -0.06091226264834404, 0.04179014638066292, 0.05478054657578468, 0.034202974289655685, -0.074707992374897, 0.03348251432180405, 0.04172152653336525, 0.04721687361598015, -0.017535855993628502, -0.09464545547962189, -0.010151255875825882, -0.050662703812122345, -0.02311123162508011, -0.01532812975347042, 0.012679871171712875, 0.007430803496390581, -0.04774722456932068, -0.011850877664983273, 0.02211112529039383, 0.01552259549498558, -0.06552878767251968, 0.05886948108673096, 0.01256144791841507, -0.051869720220565796, 0.01163015142083168, 0.03424028307199478, 0.009813153184950352, -0.04894575476646423, -0.010269728489220142, 0.09596236795186996, 0.03377828747034073, -0.01747620850801468, -0.06088026240468025, -0.03326190263032913, 0.018734194338321686, -0.01964620128273964, -0.070560522377491, -0.06099531799554825, -0.017910989001393318, -0.03047211468219757, 0.006114807911217213, 0.0004958077915944159, -0.07539864629507065, -0.028911547735333443, 0.04099559783935547, -0.05041532218456268, -0.03439376503229141, 0.004413093905895948, 0.023869911208748817, -0.013702835887670517, -0.04257345572113991, 0.020592844113707542, 0.0005964559968560934, -0.00837541464716196, -0.014201290905475616, -0.061336275190114975, 0.024022355675697327, 0.0918988510966301, -0.006428433116525412, 0.07308309525251389, 0.02474512904882431, 0.02041795663535595, -0.010151118040084839, -0.020498692989349365, 0.03459171578288078, -0.015734491869807243, 0.0060326470993459225, 0.020789694041013718, -0.0005603815661743283, 0.0042565129697322845, 0.03580266609787941, -0.010825403034687042, -0.052953001111745834, -0.030816085636615753, -0.337706059217453, -0.06290354579687119, 0.02786022610962391, -0.02936438098549843, 0.048815153539180756, -0.07111986726522446, -0.024478932842612267, 0.028612803667783737, -0.007965890690684319, 0.02748480997979641, 0.032386213541030884, 0.003224783344194293, -0.011574730277061462, -0.0730246752500534, -0.024977605789899826, -0.009569923393428326, -0.04630623757839203, -0.04931829497218132, -0.059686917811632156, 0.025409476831555367, -0.026778237894177437, -0.01407331321388483, -0.03202911466360092, -0.06268646568059921, 0.014735612086951733, -0.0038414206355810165, 0.10908752679824829, 0.02605499140918255, 0.05486870929598808, -0.0029941610991954803, 0.021641341969370842, -0.0030462429858744144, 0.02801728993654251, 0.005797883961349726, -0.003644791431725025, -0.002372801536694169, 0.007483166176825762, 0.030565891414880753, -0.02611146681010723, -0.005958738271147013, -0.036582596600055695, 0.035359207540750504, -0.04226807504892349, -0.016582828015089035, -0.08861520141363144, 0.010594181716442108, -0.00808518286794424, 0.004355978686362505, -0.012988884933292866, 0.07281804084777832, 0.023162394762039185, 0.043502531945705414, 0.020936142653226852, -0.02266278862953186, -0.004764909390360117, -0.016572099179029465, -0.06429160386323929, -0.020527664572000504, -0.06296063214540482, 0.007643217220902443, 0.030190719291567802, 0.043771617114543915, 0.05346955358982086, -0.048943258821964264, -0.011493925005197525, -0.0455578938126564, 0.01114786509424448, -0.025683224201202393, 0.021037984639406204, -0.01190432533621788, -0.012576897628605366, 0.10772844403982162, -0.03379872813820839, 0.01880226470530033, 0.06565912812948227, 0.049866124987602234, 0.0034188067074865103, -0.025077849626541138, -0.05449862778186798, 0.0024644413497298956, 0.04054960608482361, -0.020279474556446075, 0.017130369320511818, 0.0016586451092734933, 0.008462297730147839, 0.0073123895563185215, -0.014270718209445477, -0.003514380194246769, 0.0434175580739975, 0.02430366910994053, -0.015569019131362438, -0.02871706895530224, -0.009871444664895535, -0.01412163581699133, 0.02698962390422821, 0.006951881106942892, -0.27739304304122925, 0.03327402472496033, 0.041928038001060486, 0.03283354640007019, 0.028871813789010048, 0.010392476804554462, 0.03590843081474304, -0.052784305065870285, -0.00833347998559475, -0.013940047472715378, -0.030507631599903107, 0.027890844270586967, 0.0539175309240818, 0.018355529755353928, -0.004802199546247721, -0.02768602967262268, 0.005104083102196455, -0.014165098778903484, 0.03960919380187988, -0.007964708842337132, 0.0364157110452652, -0.004954770673066378, 0.19230593740940094, -0.012098859064280987, 0.008647867478430271, 0.019750624895095825, -0.0025735609233379364, -0.014990766532719135, 0.0757058635354042, -0.0003730211465153843, 0.021993394941091537, 0.019183311611413956, 0.029017960652709007, -0.006864077411592007, 0.05826257914304733, -0.018147679045796394, -0.030966514721512794, 0.044243987649679184, 0.04007948935031891, -0.054151155054569244, 0.024651648476719856, 0.013484083116054535, -0.020465603098273277, 0.005832127295434475, 0.12611491978168488, 0.0009099324815906584, 0.027809560298919678, -0.03548495098948479, -0.0620480552315712, 0.02505630813539028, -0.003180387429893017, -0.00631709024310112, -0.00555052375420928, -0.02534172497689724, 0.022505657747387886, 0.04486190527677536, 0.01970413140952587, -0.01797330193221569, -0.002861905610188842, 0.007581761572510004, 0.03188764303922653, -0.05015464872121811, 0.14678813517093658, 0.020175887271761894, -0.004986935295164585 ]
[ 0.012112973257899284, -0.007901536300778389, 0.018604155629873276, -0.013452691957354546, -0.002263501286506653, 0.007196222431957722, 0.004983754828572273, 0.01985977031290531, 0.021606380119919777, -0.005634017754346132, 0.0026670843362808228, -0.0066957296803593636, 0.009669908322393894, -0.019659744575619698, 0.019083548337221146, 0.015960441902279854, 0.03193264082074165, 0.013693811371922493, 0.03898985683917999, -0.018566980957984924, -0.04608917981386185, 0.023581789806485176, 0.022470012307167053, 0.006993741262704134, -0.03000737354159355, 0.03309912234544754, -0.0030491864308714867, -0.00833683181554079, 0.026577899232506752, -0.13009171187877655, -0.024433687329292297, -0.027584627270698547, -0.00031611035228706896, 0.0100031066685915, -0.019692037254571915, -0.040336981415748596, -0.03520622476935387, 0.014514012262225151, 0.015410549007356167, 0.00754342507570982, -0.009606387466192245, 0.023573478683829308, 0.023042751476168633, -0.02488594502210617, -0.022803502157330513, -0.020857417955994606, -0.024889081716537476, -0.021270792931318283, -0.019272102043032646, -0.007507530972361565, -0.059256915003061295, -0.003689125180244446, -0.0152716850861907, 0.020193831995129585, 0.00995685625821352, -0.04067625477910042, -0.02927468717098236, -0.027903245761990547, 0.02357596531510353, 0.015799693763256073, -0.009635097347199917, 0.013349161483347416, -0.026771703734993935, -0.022920317947864532, 0.011823036707937717, -0.025770846754312515, -0.03343714028596878, 0.016436737030744553, 0.001993313431739807, 0.01772259548306465, -0.010552817024290562, 0.03642788901925087, -0.011716067790985107, -0.03753969818353653, 0.013355649076402187, -0.012369569391012192, 0.015713950619101524, -0.017368223518133163, 0.008437031880021095, -0.008943995460867882, -0.03470424562692642, 0.008340765722095966, -0.00037623062962666154, -0.003727261908352375, -0.01764848455786705, -0.0633457824587822, 0.01348968967795372, -0.0021200324408710003, 0.005336368456482887, -0.02514044940471649, -0.04278870299458504, -0.020090993493795395, -0.015650155022740364, -0.01248450018465519, -0.057237669825553894, -0.005484399385750294, -0.012731376104056835, -0.027773020789027214, 0.01835199072957039, 0.8409637808799744, -0.04065268114209175, 0.07648361474275589, 0.039540380239486694, -0.0005194024415686727, -0.004771389998495579, -0.03653162717819214, -0.027533920481801033, 0.007642496842890978, 0.05207148194313049, -0.04649687930941582, 0.023088812828063965, 0.04491239786148071, 0.04088163003325462, 0.028373360633850098, -0.045238737016916275, 0.05132542550563812, 0.04197220504283905, 0.008819947019219398, -0.029326727613806725, 0.009611336514353752, 0.004708326421678066, 0.0075895823538303375, 0.006543334107846022, -0.00128171278629452, 0.0208062045276165, -0.19859252870082855, 0.0017682958859950304, -7.322227779668955e-33, 0.008965671993792057, -0.024053143337368965, 0.007701195310801268, 0.015214446000754833, 0.05286244675517082, 0.013787470757961273, 0.012654511258006096, -0.019596757367253304, -0.000037172063457546756, -0.024280132725834846, 0.03999624773859978, -0.01480677630752325, -0.03098907880485058, -0.002710760338231921, 0.04910316318273544, -0.0005928818136453629, -0.02090715616941452, 0.060801513493061066, 0.011946060694754124, 0.04102599248290062, 0.004940978717058897, 0.006903126370161772, 0.010934545658528805, 0.025907078757882118, -0.01799270324409008, 0.03358206897974014, 0.03410249203443527, -0.001950746402144432, 0.0019095413153991103, -0.05335929989814758, -0.01326540857553482, 0.011871655471622944, -0.017941582947969437, -0.003611017717048526, 0.03503955900669098, -0.049526672810316086, -0.0016794437542557716, -0.008347849361598492, 0.009394912049174309, -0.004980055615305901, 0.0004682863946072757, 0.012567047961056232, 0.004603909328579903, 0.027792641893029213, -0.06966576725244522, -0.04922286793589592, 0.006645664107054472, 0.029285743832588196, 0.031200002878904343, 0.03370870277285576, 0.02081134542822838, -0.04147164896130562, 0.022334951907396317, 0.02321215160191059, -0.011700027622282505, 0.014058598317205906, 0.010030708275735378, 0.028735490515828133, 0.017364637926220894, -0.004845007788389921, -0.005524889100342989, 0.0019382876344025135, -0.014563819393515587, 0.014538027346134186, 0.00017154264787677675, 0.013342291116714478, 0.004073456395417452, 0.0004446592938620597, 0.01989137753844261, 0.017363110557198524, -0.03564709797501564, 0.0036300153005868196, -0.012210683897137642, -0.0035298431757837534, 0.03150337189435959, 0.006595558486878872, -0.029141198843717575, 0.006926406640559435, 0.031103823333978653, 0.02375786006450653, 0.037153322249650955, 0.0034043604973703623, -0.05487372726202011, 0.007844513282179832, -0.027393294498324394, 0.005764553789049387, 0.0031236291397362947, 0.0037726429291069508, 0.01343964971601963, -0.008789584040641785, 0.014666244387626648, 0.031232796609401703, 0.007902460172772408, -0.004729707725346088, -0.02419884316623211, 7.796492730451715e-33, -0.04870230332016945, -0.012764082290232182, 0.009930768981575966, 0.0029547458980232477, 0.01119972299784422, -0.030340729281306267, 0.029050039127469063, 0.0025535612367093563, -0.03783030807971954, 0.001107822055928409, -0.01734393835067749, -0.0019665672443807125, -0.016261084005236626, 0.04668770357966423, 0.04608110338449478, 0.01991724967956543, 0.025846906006336212, 0.02053080126643181, -0.012989128939807415, -0.022921793162822723, -0.01739141345024109, -0.0038711095694452524, 0.01655571348965168, 0.004455611575394869, -0.009085808880627155, 0.059614017605781555, 0.027003105729818344, 0.017857475206255913, 0.007382035255432129, -0.02292436547577381, 0.0005645827623084188, 0.022006355226039886, 0.0015024556778371334, -0.0056028286926448345, -0.03240837901830673, 0.05265180021524429, 0.02595897950232029, -0.01708337850868702, -0.0025484624784439802, -0.017825236544013023, -0.0007736912812106311, -0.014709766022861004, -0.023241017013788223, 0.021737970411777496, 0.013139543123543262, 0.010487203486263752, 0.013499477878212929, -0.02250567451119423, 0.02166767604649067, 0.020103873685002327, -0.029676172882318497, 0.016093948855996132, -0.0037763582076877356, 0.037041839212179184, -0.0141393868252635, -0.015327220782637596, -0.056230612099170685, -0.0012314749183133245, -0.003236333141103387, -0.0401562824845314, -0.018412277102470398, 0.01826217584311962, -0.01686873659491539, 0.0324697345495224, -0.004116942640393972, 0.03541212156414986, -0.03384670615196228, -0.032577551901340485, -0.000050404654757585377, 0.021970514208078384, -0.0343783013522625, 0.01734215021133423, 0.030851148068904877, 0.019732434302568436, 0.023810936138033867, 0.015133517794311047, -0.02251841500401497, -0.025562645867466927, 0.0205945186316967, 0.015306360088288784, 0.011409033089876175, -0.03377700597047806, -0.007465739268809557, -0.005879576783627272, 0.017139658331871033, -0.013447867706418037, -0.03752006217837334, 0.029186950996518135, 0.028734717518091202, -0.04778672382235527, 0.012051133438944817, 0.019155776128172874, -0.007547649554908276, 0.011920197866857052, -0.012782515957951546, -1.2932720672154119e-8, -0.010529102757573128, -0.02395997941493988, -0.011658062227070332, 0.045027684420347214, 0.06267304718494415, 0.026960615068674088, -0.03920877352356911, -0.02651992067694664, -0.015114903450012207, 0.009891193360090256, 0.01599850133061409, 0.005371298175305128, -0.005641993135213852, 0.001523991348221898, 0.005076815374195576, -0.05480527505278587, 0.004367487970739603, 0.022330205887556076, 0.036885086447000504, 0.00990576297044754, -0.014648869633674622, 0.04676621034741402, 0.024628395214676857, -0.017044248059391975, 0.019680876284837723, -0.02432294934988022, 0.03321612626314163, -0.05553869530558586, -0.02851039357483387, -0.030968077480793, -0.008902414701879025, -0.027952861040830612, -0.03444625437259674, 0.04319081827998161, -0.02237985096871853, -0.055029962211847305, 0.002700675278902054, 0.024634160101413727, -0.004474590998142958, 0.013954771682620049, -0.0009292952017858624, 0.01576840505003929, -0.056599926203489304, -0.014010841026902199, -0.001014334731735289, 0.006067064590752125, -0.02927447482943535, 0.011535471305251122, 0.025037582963705063, -0.015052174217998981, -0.0022356361150741577, -0.01444117072969675, 0.04082166776061058, -0.005251897964626551, 0.007444005459547043, 0.01971469260752201, 0.0017155398381873965, -0.02521670237183571, -0.009843377396464348, 0.003689675824716687, 0.009418059140443802, 0.02682688646018505, -0.01349890697747469, -0.02535492181777954 ]
r-removing-for-loops
https://markhneedham.com/blog/2015/04/18/r-removing-for-loops
false
2015-04-27 22:34:43
R: dplyr - Error in (list: invalid subscript type 'double'
[ "r-2", "rstats" ]
[ "R" ]
In my continued playing around with R I wanted to find the minimum value for a specified percentile given a data frame representing a cumulative distribution function (CDF). e.g. imagine we have the following CDF represented in a data frame: [source,r] ---- library(dplyr) df = data.frame(score = c(5,7,8,10,12,20), percentile = c(0.05,0.1,0.15,0.20,0.25,0.5)) ---- and we want to find the minimum value for the 0.05 percentile. We can use the +++<cite>+++filter+++</cite>+++ function to do so: [source,r] ---- > (df %>% filter(percentile > 0.05) %>% slice(1))$score [1] 7 ---- Things become more tricky if we want to return multiple percentiles in one go. My first thought was to create a data frame with one row for each target percentile and then pull in the appropriate row from our original data frame: [source,r] ---- targetPercentiles = c(0.05, 0.2) percentilesDf = data.frame(targetPercentile = targetPercentiles) > percentilesDf %>% group_by(targetPercentile) %>% mutate(x = (df %>% filter(percentile > targetPercentile) %>% slice(1))$score) Error in (list(score = c(5, 7, 8, 10, 12, 20), percentile = c(0.05, 0.1, : invalid subscript type 'double' ---- Unfortunately this didn't quite work as I expected - https://twitter.com/tonkouts[Antonios] pointed out that this is probably because we're mixing up two pipelines and dplyr can't figure out what we want to do. Instead he suggested the following variant which uses the +++<cite>+++https://github.com/hadley/dplyr#do[do]+++</cite>+++ function [source,r] ---- df = data.frame(score = c(5,7,8,10,12,20), percentile = c(0.05,0.1,0.15,0.20,0.25,0.5)) targetPercentiles = c(0.05, 0.2) > data.frame(targetPercentile = targetPercentiles) %>% group_by(targetPercentile) %>% do(df) %>% filter(percentile > targetPercentile) %>% slice(1) %>% select(targetPercentile, score) Source: local data frame [2 x 2] Groups: targetPercentile targetPercentile score 1 0.05 7 2 0.20 12 ---- We can then wrap this up in a function: [source,r] ---- percentiles = function(df, targetPercentiles) { # make sure the percentiles are in order df = df %>% arrange(percentile) data.frame(targetPercentile = targetPercentiles) %>% group_by(targetPercentile) %>% do(df) %>% filter(percentile > targetPercentile) %>% slice(1) %>% select(targetPercentile, score) } ---- which we call like this: [source,r] ---- df = data.frame(score = c(5,7,8,10,12,20), percentile = c(0.05,0.1,0.15,0.20,0.25,0.5)) > percentiles(df, c(0.08, 0.10, 0.50, 0.80)) Source: local data frame [2 x 2] Groups: targetPercentile targetPercentile score 1 0.08 7 2 0.10 8 ---- Note that we don't actually get any rows back for 0.50 or 0.80 since we don't have any entries greater than those percentiles. With a proper CDF we would though so the function does its job.
null
null
[ 0.032090798020362854, -0.00416191341355443, -0.016504930332303047, 0.01999274268746376, 0.08168108761310577, 0.03438219055533409, -0.006402947474271059, -0.036559075117111206, 0.010050599463284016, -0.010761820711195469, 0.02910797856748104, -0.00037565294769592583, -0.049141909927129745, 0.041826240718364716, -0.0017301933839917183, 0.0757092833518982, 0.04312099516391754, -0.0038583215791732073, 0.015511529520154, 0.001102230977267027, 0.024269403889775276, 0.051749877631664276, -0.012405873276293278, 0.030463438481092453, 0.04510122910141945, -0.009456969797611237, 0.02057286538183689, 0.022386223077774048, -0.03096975013613701, 0.028243066743016243, 0.028659632429480553, 0.05574364960193634, 0.0013012522831559181, -0.010463433340191841, 0.008042190223932266, 0.00524307694286108, -0.019838208332657814, 0.009645278565585613, 0.045206546783447266, -0.011236204765737057, -0.045716285705566406, 0.006852642633020878, -0.001551188644953072, 0.004618056584149599, -0.03679965063929558, 0.035691358149051666, -0.032055772840976715, 0.0077579752542078495, -0.0002630369272083044, -0.009924008511006832, -0.02033320628106594, 0.044660963118076324, -0.013501481153070927, -0.06790846586227417, 0.013472204096615314, 0.044146738946437836, 0.0005229503149166703, -0.06577561795711517, 0.032144393771886826, -0.03257077932357788, 0.005219717510044575, 0.009786062873899937, -0.042054567486047745, 0.016388729214668274, 0.032913073897361755, -0.0035412816796451807, 0.003928429447114468, 0.028391161933541298, -0.044055499136447906, -0.028978869318962097, -0.023967469111084938, -0.019813859835267067, -0.010945353657007217, 0.0002492948842700571, -0.0217612124979496, -0.01588435284793377, -0.019566522911190987, 0.02939663827419281, 0.02613508328795433, 0.024794016033411026, -0.04231114313006401, -0.00961509719491005, 0.014501985162496567, -0.011011620052158833, 0.009336192160844803, -0.02761016972362995, -0.02407062239944935, -0.021816812455654144, -0.06669223308563232, 0.08077076077461243, -0.02791621722280979, -0.036390215158462524, 0.017631374299526215, 0.011962471529841423, 0.005345940589904785, -0.0034791117068380117, 0.011858313344419003, -0.01287927944213152, 0.022415906190872192, -0.02830403670668602, -0.05820050835609436, -0.019740136340260506, 0.04031848907470703, 0.02442007325589657, -0.08249420672655106, 0.02682245522737503, -0.006314944475889206, -0.008413701318204403, 0.01582927256822586, 0.01366164069622755, -0.024151356890797615, 0.008960793726146221, -0.02082750014960766, -0.022111855447292328, -0.06329671293497086, 0.07598040252923965, 0.007810972630977631, -0.022785883396863937, -0.004930590279400349, 0.007746497169137001, 0.05742648243904114, 0.03763170540332794, -0.0293108057230711, 0.06731016933917999, -0.01987295225262642, 0.04471796005964279, 0.028809789568185806, 0.06938044726848602, 0.003784982254728675, -0.08358867466449738, -0.02697642147541046, 0.04093813896179199, -0.017492420971393585, -0.016886649653315544, -0.022190343588590622, -0.024294869974255562, -0.010322600603103638, -0.020897148177027702, 0.05245920270681381, 0.0005252314149402082, 0.08262430131435394, 0.015658671036362648, -0.006996575742959976, -0.020078914240002632, 0.05400621145963669, 0.027282580733299255, 0.009255531243979931, -0.019116424024105072, -0.05361400917172432, 0.021403582766652107, 0.03835365176200867, 0.038006268441677094, 0.08217419683933258, -0.04470812901854515, 0.037240080535411835, 0.050853364169597626, 0.039907265454530716, -0.03248966857790947, -0.019727099686861038, 0.019138649106025696, 0.029561098664999008, 0.028033506125211716, 0.0022885198704898357, 0.05069110542535782, -0.021258261054754257, -0.055691324174404144, 0.02761889062821865, 0.04734364151954651, -0.05772467330098152, -0.012759929522871971, -0.04686115309596062, -0.051514893770217896, 0.05265642702579498, -0.0006868892814964056, 0.027243144810199738, 0.02140241488814354, 0.06956852972507477, 0.03884684666991234, 0.026632297784090042, 0.0030283096712082624, -0.0692877471446991, 0.04687816649675369, 0.005682467948645353, 0.04023321345448494, 0.04959632828831673, -0.04710349440574646, 0.07864280790090561, 0.003255960764363408, 0.058721136301755905, 0.04991395026445389, -0.08121661841869354, -0.07477320730686188, -0.015218627639114857, -0.03805670142173767, 0.016247492283582687, -0.030778052285313606, -0.01896040514111519, 0.07109755277633667, 0.04040108621120453, 0.010861213319003582, -0.011432697996497154, 0.020373640581965446, 0.03946878761053085, -0.04828435927629471, -0.015074176713824272, -0.0024407748132944107, 0.020423509180545807, -0.02917668968439102, -0.00430634617805481, 0.050117820501327515, -0.01907888986170292, 0.035269543528556824, 0.01708703674376011, -0.000541742134373635, 0.04496488720178604, 0.011350230313837528, 0.03755946084856987, 0.03777302801609039, 0.04369072616100311, -0.03997079282999039, 0.02392788603901863, -0.01247413270175457, -0.008876792155206203, -0.01047608070075512, -0.017345787957310677, 0.12709712982177734, 0.08602046221494675, -0.03336833044886589, -0.05715728551149368, 0.03765108063817024, -0.03811589628458023, -0.021447565406560898, 0.04917455092072487, 0.009322292171418667, -0.001376367057673633, 0.033960986882448196, -0.052297212183475494, -0.025008674710989, 0.03546702489256859, -0.005496698897331953, -0.01197630912065506, 0.0639609843492508, 0.0028463220223784447, 0.0410771481692791, -0.03810333460569382, -0.0049304296262562275, 0.010640881024301052, -0.012041064910590649, -0.07958396524190903, -0.022614678367972374, 0.012152689509093761, -0.009953483939170837, 0.010987743735313416, -0.029851313680410385, -0.007074832450598478, -0.015529918484389782, -0.023770680651068687, 0.03745148330926895, 0.05003126710653305, 0.04092651978135109, -0.030326563864946365, 0.013300228863954544, -0.008471017703413963, -0.011751869693398476, -0.013939390890300274, -0.05538325011730194, -0.036665767431259155, -0.005831649526953697, 0.0010507786646485329, 0.03390542045235634, 0.012316573411226273, 0.0031352730002254248, -0.007012127432972193, 0.0009379258845001459, -0.00783348549157381, -0.04618483781814575, 0.044789496809244156, -0.013498594053089619, -0.04496193677186966, -0.00389291369356215, 0.020298125222325325, 0.04786460101604462, 0.00277587934397161, -0.019685517996549606, -0.012771784327924252, -0.054263222962617874, 0.07372257858514786, -0.050895821303129196, -0.007253680378198624, -0.03516240045428276, -0.0003821376012638211, 0.029768163338303566, 0.029963936656713486, -0.004091215319931507, 0.035407837480306625, -0.0012909241486340761, 0.02175748348236084, 0.040013231337070465, 0.021194133907556534, 0.034407585859298706, 0.01690085232257843, -0.005466699134558439, 0.07202961295843124, 0.007915359921753407, -0.007022805046290159, -0.04196145758032799, -0.0337439589202404, -0.014842239208519459, -0.2605988681316376, 0.04212796688079834, -0.02287129871547222, -0.01762174442410469, 0.0075157503597438335, -0.08123178780078888, -0.01387804839760065, -0.024954969063401222, 0.0012592372950166464, -0.03550993651151657, 0.007893657311797142, -0.01933297887444496, -0.016086287796497345, 0.05251786485314369, 0.006247845944017172, 0.004579674918204546, 0.011167377233505249, -0.015303349122405052, -0.007461218629032373, 0.06961537897586823, 0.051258385181427, -0.044696252793073654, -0.019394274801015854, 0.028744515031576157, 0.019528834149241447, 0.03391721099615097, -0.028630373999476433, 0.04385140538215637, -0.06689615547657013, -0.07717674225568771, 0.0030324524268507957, -0.036014992743730545, -0.0038256950210779905, 0.005121815018355846, 0.03352218121290207, -0.015935227274894714, 0.031000154092907906, 0.06719353795051575, 0.015945883467793465, 0.028002368286252022, -0.04299929365515709, -0.010277358815073967, 0.008856367319822311, -0.007746802642941475, 0.055081672966480255, 0.011822579428553581, -0.04414914920926094, 0.02280106209218502, -0.055942803621292114, 0.07842092216014862, -0.005301584955304861, 0.005341882351785898, -0.050301987677812576, 0.009834880009293556, -0.042106062173843384, -0.03499247506260872, -0.028320997953414917, -0.015017233788967133, -0.02485528215765953, -0.03754863515496254, -0.010610710829496384, -0.032390519976615906, 0.012504151090979576, -0.0187501423060894, -0.037969522178173065, -0.05543670430779457, -0.07651796191930771, -0.020315667614340782, 0.046351898461580276, 0.0007478116312995553, -0.028455328196287155, -0.03113098256289959, 0.021887611597776413, -0.09910676628351212, 0.007483102846890688, -0.04855041950941086, 0.0072602806612849236, -0.034250810742378235, -0.0336252823472023, 0.040051329880952835, -0.06245319917798042, -0.043001554906368256, 0.028672846034169197, 0.0033434033393859863, 0.029587561264634132, -0.004559680353850126, -0.0008173977839760482, 0.02050173468887806, -0.0048829042352736, -0.035018473863601685, 0.05249287188053131, -0.04082859680056572, 0.003031000029295683, 0.008454267866909504, -0.0178281981498003, 0.049460381269454956, -0.017413971945643425, 0.025532467290759087, 0.016146957874298096, 0.02260211482644081, 0.045848216861486435, -0.0558660589158535, 0.005742160603404045, -0.07631935179233551, -0.06360513716936111, 0.02278388850390911, -0.09030994027853012, 0.04369870573282242, 0.01811482384800911, 0.02083098702132702, 0.02544569969177246, -0.022770626470446587, 0.0209859199821949, -0.03443555906414986, -0.003344407305121422, -0.017680389806628227, -0.0263025164604187, 0.004094017203897238, -0.00439531821757555, 0.015578541904687881, -0.06897242367267609, 0.012167460285127163, -0.030778521671891212, -0.043645426630973816, -0.030401060357689857, -0.023813217878341675, 0.045006174594163895, -0.026708271354436874, -0.012233715504407883, -0.0012149647809565067, -0.015888867899775505, 0.03500303626060486, 0.0319436714053154, -0.019027404487133026, 0.029671084135770798, -0.040146604180336, -0.03629292920231819, -0.0018296431517228484, 0.03667770326137543, -0.005564290564507246, -0.01984495297074318, -0.012937773950397968, 0.006783654913306236, 0.024596378207206726, 0.026862304657697678, -0.02038966305553913, 0.024707937613129616, 0.018677184358239174, -0.029164215549826622, 0.02549072727560997, 0.020561618730425835, 0.021172329783439636, 0.0076157813891768456, -0.04966871067881584, -0.08135189861059189, 0.0018942016176879406, 0.02934730052947998, -0.0058722104877233505, -0.03674463555216789, -0.07907872647047043, 0.005786997266113758, -0.0019687230233103037, 0.003992463927716017, -0.0374256931245327, 0.02635256014764309, 0.05029481276869774, -0.015679411590099335, 0.006239891517907381, -0.007745201233774424, -0.009068816900253296, -0.009262636303901672, -0.003580627031624317, 0.006144942715764046, 0.0023401668295264244, -0.03258361667394638, -0.0003983997739851475, 0.06699032336473465, -0.014609098434448242, -0.013220627792179585, -0.010289103724062443, -0.010350820608437061, -0.027553927153348923, 0.005204502958804369, 0.006649890448898077, 0.017093440517783165, 0.04934070631861687, -0.01206904649734497, 0.0119362473487854, -0.03902281075716019, -0.04147299751639366, -0.034294020384550095, -0.006729607470333576, -0.0004958705394528806, 0.003099404275417328, -0.047986309975385666, -0.05469591170549393, -0.0023700841702520847, 0.05846757814288139, -0.032986119389534, 0.022333689033985138, -0.04994909092783928, 0.02814701572060585, -0.028109192848205566, 0.010404178872704506, 0.0757492184638977, -0.040323082357645035, 0.03207717835903168, 0.029741575941443443, -0.022767512127757072, 0.03325314447283745, -0.03643975034356117, -0.06814675778150558, -0.0038067332934588194, -0.016991158947348595, 0.046480126678943634, -0.013589379377663136, -0.047406792640686035, -0.051057614386081696, 0.02124575339257717, -0.01882713846862316, 0.00033710713614709675, -0.055734798312187195, 0.015954677015542984, -0.022844642400741577, 0.004563159309327602, 0.01994418539106846, 0.004713351372629404, -0.060733065009117126, 0.05162423104047775, -0.004369036294519901, -0.011676883324980736, 0.00666689220815897, 0.021002598106861115, 0.03335735574364662, 0.0006385035230778158, 0.006175124552100897, -0.045205190777778625, 0.004643805790692568, -0.03932793438434601, 0.012386166490614414, -0.013326100073754787, 0.03098348341882229, -0.022521620616316795, 0.007772450800985098, -0.018311046063899994, -0.03735388442873955, -0.0029846576508134604, -0.017334192991256714, 0.022632546722888947, 0.075578972697258, -0.01512936595827341, 0.02806154265999794, -0.025646889582276344, -0.001503477804362774, 0.05927759408950806, -0.017189666628837585, -0.0382760651409626, -0.022756600752472878, -0.015362703241407871, 0.05116809159517288, 0.006998579949140549, -0.00826274324208498, -0.021228693425655365, 0.04444140940904617, 0.02899700030684471, 0.02942691370844841, 0.068827323615551, -0.014189984649419785, 0.004266927018761635, -0.04837680235505104, 0.01871323026716709, -0.09228938072919846, 0.0002759548951871693, 0.030043339356780052, -0.011879107914865017, -0.014382490888237953, 0.021009642630815506, -0.04834873974323273, 0.03907100483775139, -0.052690595388412476, -0.06043317914009094, 0.03872990608215332, 0.015291375108063221, 0.02023736946284771, -0.0004223274008836597, -0.03598896041512489, -0.01469988189637661, 0.015427004545927048, -0.04348514601588249, 0.0003574360744096339, -0.014271636493504047, 0.05462063103914261, -0.007257379125803709, 0.021563660353422165, -0.0115206865593791, 0.030263684689998627, 0.06857439130544662, 0.01468753907829523, 0.0013297258410602808, 0.053767163306474686, -0.03568168729543686, 0.013884018175303936, 0.01801072247326374, -0.017470313236117363, 0.004457251168787479, 0.006898322142660618, 0.020146260038018227, 0.0044920798391103745, 0.025266965851187706, 0.023830343037843704, 0.004113904666155577, -0.05606783926486969, 0.06815668195486069, 0.002829850185662508, -0.05053357779979706, -0.07563164830207825, 0.0015768865123391151, -0.01904989778995514, 0.013009502552449703, 0.004719754680991173, -0.020690128207206726, -0.01880239136517048, 0.07894490659236908, -0.015097594819962978, 0.0005570795619860291, 0.08702199906110764, -0.014136397279798985, -0.03170862793922424, 0.05197148397564888, 0.05194143205881119, 0.07627925276756287, 0.026393696665763855, 0.006527307443320751, 0.037648819386959076, -0.019725801423192024, -0.05768958851695061, 0.04185985401272774, -0.0328192301094532, 0.04425773769617081, -0.059039246290922165, 0.012234410271048546, 0.042578138411045074, -0.014123009517788887, 0.07013548910617828, -0.01758398301899433, -0.0015484928153455257, 0.006384795065969229, -0.0025300937704741955, 0.043555159121751785, 0.059318479150533676, -0.006916958838701248, 0.019801277667284012, 0.014304699376225471, 0.022274242714047432, 0.05074087530374527, -0.005914061330258846, -0.02198495715856552, -0.009205658920109272, 0.003057940397411585, 0.01408207044005394, 0.008913710713386536, -0.004453400615602732, 0.06829972565174103, -0.05024775117635727, -0.023454781621694565, -0.019842464476823807, 0.0231894813477993, -0.01725146546959877, -0.028121381998062134, 0.01496329065412283, -0.038424812257289886, -0.051781777292490005, -0.02994343638420105, -0.01206719409674406, 0.0026966531295329332, 0.010107973590493202, 0.01510907243937254, -0.018113695085048676, 0.023499302566051483, 0.024845562875270844, -0.015474380925297737, -0.0341867059469223, -0.05952029302716255, -0.05334741249680519, -0.054065681993961334, -0.058058734983205795, -0.001765633118338883, -0.000007840954822313506, 0.0037058640737086535, -0.017218852415680885, -0.013200785964727402, 0.013117996975779533, -0.006776424124836922, -0.005704890470951796, -0.05641027167439461, -0.04776071012020111, -0.0012494121911004186, 0.02005501464009285, 0.013161513954401016, 0.005661479197442532, 0.03400629386305809, 0.01846441812813282, -0.03895864263176918, -0.013653004541993141, 0.01275620050728321, 0.03146449476480484, 0.022393401712179184, 0.029360264539718628, -0.06800614297389984, 0.019714294001460075, 0.007156455423682928, -0.01855006068944931, -0.08714277297258377, 0.02981634810566902, 0.017423925921320915, 0.005635248962789774, 0.06748326867818832, 0.008465683087706566, 0.02635962702333927, -0.0562015064060688, -0.01782839000225067, 0.015705136582255363, 0.0037131335120648146, 0.03292428329586983, -0.0587504580616951, 0.06617294251918793, 0.02598937228322029, 0.022536274045705795, -0.0591340996325016, -0.0023119354154914618, 0.0026716161519289017, -0.024431467056274414, -0.04225128889083862, -0.01679498329758644, -0.03859993442893028, -0.08692532032728195, -0.015410301275551319, 0.033864811062812805, -0.05792107805609703, -0.013515712693333626, -0.003247620537877083, 0.01565215177834034, -0.03541823476552963, -0.015408752486109734, -0.059322163462638855, 0.03087194263935089, -0.01552306767553091, -0.013171368278563023, 0.011422260664403439, 0.06851290166378021, -0.024968072772026062, 0.023767560720443726, 0.0006877706618979573, -0.024092331528663635, -0.016235820949077606, -0.008489452302455902, 0.007817234843969345, 0.06907950341701508, -0.015941783785820007, 0.0077270567417144775 ]
[ -0.08503925800323486, 0.01807747408747673, -0.026888756081461906, -0.034457553178071976, 0.05070938169956207, -0.022843724116683006, -0.040292445570230484, 0.030733468011021614, 0.0198413897305727, 0.039865050464868546, 0.08624942600727081, -0.06800274550914764, 0.02673615887761116, 0.003179023275151849, 0.03128110617399216, -0.021022502332925797, 0.00022513048315886408, 0.007191312499344349, -0.015511560253798962, 0.013927876949310303, -0.0018565100617706776, -0.07879778742790222, -0.03160017356276512, -0.08453977853059769, 0.08136758208274841, 0.01866929791867733, -0.038397662341594696, -0.0649980828166008, -0.014483723789453506, -0.23663616180419922, 0.017463333904743195, 0.03385593369603157, 0.03437652811408043, -0.07423471659421921, -0.030819233506917953, 0.02511642687022686, 0.028354277834296227, -0.010458857752382755, 0.016217578202486038, 0.051462095230817795, -0.0032539241947233677, -0.01619616709649563, -0.005964408162981272, -0.022650934755802155, 0.0018652890576049685, 0.008218353614211082, -0.05974655598402023, -0.010754191316664219, -0.0021468079648911953, 0.028399407863616943, -0.02903720550239086, -0.012207303196191788, 0.019839351996779442, 0.028904611244797707, -0.030626166611909866, 0.015579288825392723, 0.04158174991607666, 0.03607902303338051, 0.004750496242195368, 0.03775784745812416, 0.01188864279538393, 0.013622494414448738, -0.1708020567893982, 0.06879482418298721, 0.015036557801067829, 0.0215326938778162, -0.010736942291259766, -0.01589805819094181, -0.06136482581496239, 0.07161684334278107, -0.0058720349334180355, 0.014928159303963184, -0.050747644156217575, 0.05729564651846886, 0.02265389822423458, -0.02566389925777912, -0.028632042929530144, -0.027405766770243645, 0.040835753083229065, -0.013078426010906696, -0.017432652413845062, 0.04829346761107445, -0.021559322252869606, -0.01982899010181427, 0.0029643294401466846, -0.004024531226605177, 0.0020471704192459583, 0.0233400110155344, 0.011543151922523975, 0.007983425632119179, 0.042834993451833725, 0.01587858237326145, 0.04773735627532005, 0.003755404846742749, -0.10180621594190598, 0.02577243745326996, 0.016242649406194687, -0.0018508873181417584, 0.0024452018551528454, 0.37229999899864197, -0.020312217995524406, -0.0333787240087986, 0.019548343494534492, 0.05057065933942795, 0.02954467572271824, -0.03291616216301918, -0.030919361859560013, -0.033044662326574326, 0.012968997471034527, -0.029467877000570297, -0.0005063415737822652, -0.032610516995191574, 0.0444113127887249, -0.06472406536340714, 0.05131689831614494, -0.02050631307065487, -0.003968097269535065, -0.009698009118437767, 0.06379399448633194, 0.03798092156648636, -0.022796111181378365, -0.012538074515759945, 0.04999926686286926, 0.0012974640121683478, 0.01702684722840786, -0.020040547475218773, 0.03171171247959137, 0.062204573303461075, 0.04044456034898758, 0.035162460058927536, 0.0768791139125824, -0.03950368985533714, -0.08826696872711182, -0.00420798547565937, -0.013452430255711079, 0.0008465810678899288, 0.0285798367112875, -0.030969738960266113, -0.002774727763608098, 0.006134395487606525, -0.01259981095790863, 0.02602815069258213, 0.031372036784887314, -0.007707539945840836, -0.0379219651222229, 0.1545380800962448, -0.012461150996387005, -0.02981671504676342, -0.022193094715476036, -0.06286758184432983, 0.04426339641213417, 0.012432519346475601, -0.01017370168119669, -0.014690921641886234, -0.006610016338527203, 0.031711991876363754, 0.027357811108231544, -0.047697365283966064, -0.04394727572798729, -0.018545953556895256, -0.03211149945855141, -0.034559883177280426, -0.05317828431725502, 0.05138905718922615, 0.02146589383482933, -0.039515815675258636, -0.035828597843647, 0.05338381230831146, -0.04315952584147453, -0.05561475455760956, 0.04747961461544037, 0.04191882163286209, -0.07552208006381989, 0.00004308301140554249, 0.03927211835980415, -0.005065759643912315, -0.036091506481170654, -0.00898715853691101, 0.033252064138650894, 0.034252654761075974, 0.035071585327386856, 0.013771717436611652, -0.04497943073511124, 0.02546628564596176, -0.0272324588149786, -0.04743092134594917, -0.07101848721504211, 0.006796791683882475, -0.009190932847559452, 0.008211327716708183, -0.009794003330171108, -0.01975497044622898, -0.044580720365047455, 0.07296335697174072, -0.04599398374557495, -0.03199099376797676, 0.038658108562231064, -0.02807675115764141, -0.038058191537857056, -0.02131636254489422, -0.000031337211112258956, -0.0014425049303099513, 0.05291498079895973, 0.05983024463057518, -0.046481918543577194, 0.007816629484295845, 0.03811370208859444, -0.06683529913425446, 0.062060799449682236, 0.007517946418374777, 0.03208862990140915, -0.0011237608268857002, 0.0031774980016052723, -0.0019433426205068827, 0.01566307619214058, 0.021461423486471176, 0.01305419858545065, -0.007872899994254112, -0.00456797331571579, 0.03299402818083763, 0.015735218301415443, -0.020563270896673203, -0.018051553517580032, -0.35593181848526, -0.022048044949769974, -0.003941472619771957, -0.0002625577326398343, 0.02736002951860428, 0.01571415178477764, -0.025431491434574127, 0.0341307669878006, -0.039659284055233, 0.07547204196453094, 0.04569709673523903, 0.022166406735777855, -0.020850764587521553, -0.10003168135881424, 0.0033265515230596066, 0.021635519340634346, -0.02172233909368515, -0.05795632675290108, -0.011635294184088707, -0.07163514941930771, 0.007136352825909853, -0.06114629656076431, -0.002723670331761241, -0.01414666697382927, 0.0861515998840332, 0.00021888651826884598, 0.11007656157016754, 0.01472190860658884, 0.04485807940363884, -0.06618939340114594, 0.02496061846613884, 0.008116770535707474, 0.0016480431659147143, 0.012249971739947796, 0.01790364272892475, -0.05365323647856712, -0.018642274662852287, 0.02497337944805622, -0.033465638756752014, 0.001316517242230475, -0.027830881997942924, 0.036591943353414536, -0.012953571043908596, -0.02559804916381836, -0.07964754849672318, 0.015742985531687737, -0.0028067254461348057, 0.04640226438641548, -0.026355886831879616, 0.05243881419301033, 0.019740059971809387, 0.0038822912611067295, 0.04305436834692955, 0.022984392940998077, 0.05668307840824127, -0.04012661054730415, -0.08265775442123413, -0.017597397789359093, -0.006544773932546377, -0.06082286685705185, 0.03314399719238281, -0.017177898436784744, 0.07366812974214554, -0.08499804884195328, -0.031067809090018272, -0.026745138689875603, 0.0342530757188797, -0.03606775775551796, 0.022510061040520668, 0.04019705951213837, -0.01088815275579691, 0.08293694257736206, -0.03630229830741882, 0.04508514702320099, 0.04150004684925079, 0.03315739706158638, 0.008635751903057098, -0.019619258120656013, -0.017983462661504745, -0.005605306942015886, 0.0557074137032032, -0.051771730184555054, 0.008703963831067085, -0.06906513124704361, 0.02598048560321331, 0.004245529416948557, 0.005422567017376423, -0.006089221220463514, 0.049406230449676514, 0.059977684170007706, 0.0026891804300248623, -0.04441114887595177, 0.006453470792621374, -0.024205677211284637, 0.05014819651842117, 0.020003672689199448, -0.26637789607048035, -0.0005988215561956167, 0.037700820714235306, 0.00770028680562973, -0.014225447550415993, 0.020098773762583733, 0.038819145411252975, -0.07883375883102417, -0.01643722876906395, 0.009237649850547314, 0.020159956067800522, 0.07196410745382309, 0.06205493584275246, -0.01860700361430645, 0.010502752847969532, -0.042726002633571625, 0.004541485104709864, -0.014620647765696049, 0.03152986988425255, -0.0018450472271069884, 0.043362848460674286, -0.04559766873717308, 0.1453249454498291, -0.0027464437298476696, -0.03534289821982384, -0.003502952866256237, -0.02256401814520359, -0.01620732806622982, 0.07811006158590317, 0.0104290172457695, 0.010561129078269005, 0.056462306529283524, 0.030525503680109978, -0.013666253536939621, -0.003958838060498238, 0.02806234359741211, -0.04442405700683594, 0.03084888868033886, 0.04767048731446266, -0.033661454916000366, 0.011846492066979408, -0.009859898127615452, -0.03722142055630684, 0.03733604773879051, 0.07705116271972656, -0.04674985632300377, -0.01147582195699215, -0.05491681024432182, -0.03882133960723877, 0.014812245033681393, 0.016882142052054405, 0.04325466230511665, 0.023095261305570602, -0.028702229261398315, 0.033058226108551025, 0.02713237889111042, 0.05062996968626976, 0.0015116732101887465, 0.046868696808815, -0.031646765768527985, -0.004568779841065407, -0.05164038762450218, 0.09078063070774078, 0.008447958156466484, 0.03330162540078163 ]
[ -0.0028849614318460226, 0.02556663565337658, -0.0037569995038211346, -0.0006598506588488817, -0.013244512490928173, -0.005758126266300678, 0.022418998181819916, 0.03947260603308678, -0.006204867735505104, -0.004190806765109301, -0.020878978073596954, -0.009754433296620846, 0.019958127290010452, -0.012562299147248268, -0.004459461662918329, -0.031881704926490784, 0.004046170972287655, 0.03383023664355278, 0.010618136264383793, -0.042534634470939636, -0.04290974885225296, 0.04105427488684654, -0.0033353357575833797, -0.018813641741871834, 0.013219280168414116, 0.024806011468172073, -0.06790997833013535, 0.004887154791504145, 0.02162293531000614, -0.12813501060009003, 0.013573696836829185, -0.028196047991514206, 0.015520032495260239, 0.02515898458659649, -0.018729211762547493, -0.007728144526481628, -0.033965639770030975, 0.04761591926217079, 0.016105201095342636, 0.013230345211923122, 0.0008029296877793968, 0.010220406576991081, 0.008059275336563587, -0.01990310475230217, -0.018823564052581787, -0.0332922525703907, -0.00934775173664093, -0.006986322347074747, 0.010365479625761509, 0.020148320123553276, -0.032229382544755936, 0.03600262105464935, 0.016546837985515594, 0.004130987916141748, 0.024470027536153793, -0.04729682579636574, -0.007532211486250162, -0.01777515932917595, 0.006424068473279476, -0.027499374002218246, -0.04013790562748909, -0.024768542498350143, -0.03244151175022125, -0.004112934228032827, 0.014078575186431408, -0.02405485510826111, -0.07588249444961548, 0.014041329734027386, 0.015679752454161644, -0.010710302740335464, -0.0015471667284145951, 0.015563037246465683, -0.022235922515392303, -0.051587194204330444, 0.009413551539182663, 0.02040361799299717, -0.00838814489543438, -0.019007481634616852, 0.01175646111369133, -0.014104824513196945, -0.007704151328653097, 0.020906174555420876, -0.008219154551625252, -0.03301998972892761, 0.0017926183063536882, -0.004864461719989777, 0.01793111115694046, 0.017722073942422867, 0.022650614380836487, -0.015202446840703487, 0.033709265291690826, 0.05791956186294556, 0.02076157182455063, 0.030783390626311302, -0.09138117730617523, 0.01459154486656189, 0.005375964567065239, -0.035108715295791626, 0.0027916680555790663, 0.8280572891235352, 0.016470223665237427, -0.007051510736346245, 0.01764609105885029, -0.00795681867748499, -0.023965341970324516, -0.06805408746004105, 0.010748952627182007, 0.026296423748135567, -0.0015430650673806667, -0.05156143754720688, 0.026277989149093628, 0.03921247273683548, 0.04926542565226555, 0.032368507236242294, 0.020432336255908012, 0.001681464840658009, 0.03629857301712036, 0.017319105565547943, -0.010433788411319256, -0.047500964254140854, -0.03299972787499428, -0.007882662117481232, 0.006911971606314182, -0.0005463100387714803, -0.020262625068426132, -0.17586083710193634, -0.010173490270972252, -6.863350784622428e-33, 0.0072261495515704155, -0.020116453990340233, 0.045323144644498825, -0.039369095116853714, 0.008790544234216213, -0.0058647398836910725, 0.019328512251377106, -0.00791873037815094, 0.005454437807202339, -0.04949299991130829, 0.03456463664770126, -0.010288286954164505, -0.0010612441692501307, -0.001388653414323926, -0.020380975678563118, -0.040574345737695694, -0.013377267867326736, 0.040031298995018005, 0.018083272501826286, -0.005518799182027578, 0.013878188095986843, 0.020163966342806816, 0.02536560595035553, 0.04362626373767853, 0.005443250760436058, -0.003631740575656295, 0.019462399184703827, -0.03283872455358505, -0.01321080420166254, -0.03360924869775772, -0.05999119207262993, 0.04579431191086769, 0.012967067770659924, -0.025338098406791687, 0.04199939966201782, -0.044318243861198425, 0.02733316458761692, 0.029894327744841576, -0.017001358792185783, -0.010644866153597832, -0.03851959481835365, -0.002648713532835245, -0.010833130218088627, 0.008814839646220207, -0.009611536748707294, -0.0065896944142878056, 0.04850643128156662, 0.06767537444829941, -0.0004579446103889495, 0.013253899291157722, 0.004566078074276447, 0.0037504490464925766, 0.015964044257998466, -0.007519039791077375, -0.015896707773208618, 0.052733130753040314, -0.014348163269460201, -0.00907419715076685, 0.016998236998915672, 0.0077866739593446255, -0.03276346996426582, 0.020133551210165024, -0.010751524940133095, -0.022161690518260002, 0.005595806986093521, -0.00965026579797268, 0.022198369726538658, -0.02342555858194828, 0.05283832550048828, 0.03156808763742447, -0.03163941577076912, 0.017399245873093605, 0.0019963879603892565, -0.026579394936561584, 0.05440538376569748, -0.010730764828622341, 0.012547148391604424, 0.003174409968778491, 0.04571226239204407, 0.021898802369832993, -0.00794664304703474, 0.0010344259208068252, -0.031542349606752396, -0.00997244380414486, -0.01093378011137247, -0.014491057954728603, 0.020376713946461678, 0.01724226586520672, -0.049362923949956894, -0.026367919519543648, 0.04910614341497421, -0.02586633712053299, -0.001008022460155189, 0.002747650258243084, -0.012234250083565712, 7.569461424953745e-33, -0.012275801971554756, 0.0180494524538517, -0.002125416649505496, 0.013292395509779453, 0.06861400604248047, -0.05693360045552254, 0.0020661144517362118, -0.028370726853609085, -0.023539014160633087, 0.007810807786881924, 0.0010962982196360826, -0.009963911958038807, -0.002264295006170869, 0.04530258849263191, 0.04371529445052147, -0.021016955375671387, 0.01588217355310917, 0.05534377321600914, -0.028779128566384315, 0.02502678520977497, 0.023454291746020317, -0.010490630753338337, 0.0018873023800551891, 0.03361282870173454, 0.006211439147591591, 0.05685849487781525, -0.02413465455174446, -0.0240790992975235, 0.015789153054356575, -0.012719654478132725, 0.02100181020796299, 0.03293393924832344, -0.012601573951542377, -0.030745970085263252, -0.00949999038130045, 0.011477441526949406, 0.005117625929415226, -0.029407382011413574, -0.017554281279444695, -0.018470631912350655, -0.010429834015667439, 0.01828518509864807, -0.00667037907987833, 0.027064254507422447, 0.012306557968258858, 0.0017707550432533026, 0.04837040975689888, 0.0017358274199068546, -0.027599960565567017, 0.006553620100021362, -0.03649446368217468, 0.024747030809521675, 0.0017638275166973472, 0.058106496930122375, 0.01635148748755455, -0.029426297172904015, -0.02481669746339321, 0.01797017827630043, -0.02991274558007717, 0.006273450795561075, -0.014307377859950066, -0.009501432999968529, -0.004984323866665363, -0.00906477589160204, -0.028781289234757423, -0.00798975583165884, -0.03174567222595215, 0.001785201602615416, -0.03699503839015961, 0.03802128881216049, 0.01456794235855341, -0.03033316507935524, 0.055057257413864136, -0.010922460816800594, -0.0019262388814240694, -0.00651905732229352, -0.02766289748251438, 0.008562424220144749, -0.0019031318370252848, 0.0634218156337738, 0.002907488727942109, -0.001820269855670631, 0.020507462322711945, 0.026280617341399193, 0.002627287060022354, -0.000703213328961283, -0.011824962683022022, -0.015551429241895676, 0.03724495694041252, -0.009836427867412567, -0.01966579630970955, -0.01144532859325409, -0.014748675748705864, 0.05172431468963623, 0.01652165688574314, -1.2736948384883817e-8, -0.01751016639173031, 0.020465491339564323, -0.02680344320833683, 0.003817993449047208, 0.02634841948747635, 0.019929122179746628, -0.04550682008266449, -0.0021557211875915527, -0.017955688759684563, -0.022104233503341675, 0.058711178600788116, -0.03138349577784538, -0.008746868930757046, -0.001989512238651514, -0.0015607201494276524, -0.037745535373687744, 0.02761269360780716, -0.004707901272922754, 0.034618329256772995, -0.022030791267752647, 0.0019349496578797698, 0.028460288420319557, 0.020299118012189865, -0.0037361036520451307, 0.005328821949660778, -0.0012941029854118824, 0.010440066456794739, -0.10567660629749298, 0.024648450314998627, -0.005376457702368498, 0.023749133571982384, -0.040575604885816574, -0.014809884130954742, 0.003779310965910554, 0.009418903850018978, -0.03317717835307121, 0.02793440781533718, 0.011050285771489143, 0.003408182878047228, -0.001017145812511444, -0.005693831015378237, -0.0059256176464259624, -0.002644149586558342, -0.017531752586364746, -0.03148682415485382, 0.01434624008834362, -0.023388631641864777, 0.03638308122754097, 0.009190144017338753, -0.05251092091202736, 0.02306642383337021, -0.028903581202030182, -0.001899497234262526, 0.014939128421247005, 0.05104577913880348, 0.013852501288056374, -0.024880552664399147, 0.014093867503106594, -0.045440733432769775, -0.02540532872080803, 0.009502328000962734, 0.03102175146341324, -0.016152244061231613, -0.006901300512254238 ]
r-dplyr-error-in-list-invalid-subscript-type-double
https://markhneedham.com/blog/2015/04/27/r-dplyr-error-in-list-invalid-subscript-type-double
false
2015-04-16 20:57:20
R: Think Bayes - More posterior probability calculations
[ "r-2" ]
[ "R" ]
As I mentioned in a post last week I've been reading through http://thinkbayes.com[Think Bayes] and http://www.markhneedham.com/blog/2015/04/12/r-creating-an-object-with-functions-to-calculate-conditional-probability/[translating some of the examples form Python to R]. After my first post https://twitter.com/tonkouts[Antonios] suggested a more idiomatic way of writing the function in R so I thought I'd give it a try to calculate the probability that combinations of cookies had come from each bowl. In the simplest case we have this function which takes in the names of the bowls and the likelihood scores: [source,r] ---- f = function(names,likelihoods) { # Assume each option has an equal prior priors = rep(1, length(names)) / length(names) # create a data frame with all info you have dt = data.frame(names,priors,likelihoods) # calculate posterior probabilities dt$post = dt$priors*dt$likelihoods / sum(dt$priors*dt$likelihoods) # specify what you want the function to return list(names=dt$names, priors=dt$priors, likelihoods=dt$likelihoods, posteriors=dt$post) } ---- We assume a prior probability of 0.5 for each bowl. Given the following probabilities of of different cookies being in each bowl\... [source,python] ---- mixes = { 'Bowl 1':dict(vanilla=0.75, chocolate=0.25), 'Bowl 2':dict(vanilla=0.5, chocolate=0.5), } ---- \...we can simulate taking one vanilla cookie with the following parameters: [source,r] ---- Likelihoods = c(0.75,0.5) Names = c("Bowl 1", "Bowl 2") res=f(Names,Likelihoods) > res$posteriors[res$name == "Bowl 1"] [1] 0.6 > res$posteriors[res$name == "Bowl 2"] [1] 0.4 ---- If we want to simulate taking 3 vanilla cookies and 1 chocolate one we'd have the following: [source,r] ---- Likelihoods = c((0.75 ** 3) * (0.25 ** 1), (0.5 ** 3) * (0.5 ** 1)) Names = c("Bowl 1", "Bowl 2") res=f(Names,Likelihoods) > res$posteriors[res$name == "Bowl 1"] [1] 0.627907 > res$posteriors[res$name == "Bowl 2"] [1] 0.372093 ---- That's a bit clunky and the intent of '3 vanilla cookies and 1 chocolate' has been lost. I decided to refactor the code to take in a vector of cookies and calculate the likelihoods internally. First we need to create a data structure to store the mixes of cookies in each bowl that we defined above. It turns out we can do this using a http://stackoverflow.com/questions/22097029/nested-dictionary-in-r[nested list]: [source,r] ---- bowl1Mix = c(0.75, 0.25) names(bowl1Mix) = c("vanilla", "chocolate") bowl2Mix = c(0.5, 0.5) names(bowl2Mix) = c("vanilla", "chocolate") Mixes = list("Bowl 1" = bowl1Mix, "Bowl 2" = bowl2Mix) > Mixes $`Bowl 1` vanilla chocolate 0.75 0.25 $`Bowl 2` vanilla chocolate 0.5 0.5 ---- Now let's tweak our function to take in observations rather than likelihoods and then calculate those likelihoods internally: ~~~r likelihoods = function(names, observations) { scores = c(1,1) names(scores) = names for(name in names) { for(observation in observations) { scores[name] = scores[name] * mixes[[name]][observation] } } return(scores) } f = function(names,mixes,observations) { # Assume each option has an equal prior priors = rep(1, length(names)) / length(names) # create a data frame with all info you have dt = data.frame(names,priors) dt$likelihoods = likelihoods(Names, Observations) # calculate posterior probabilities dt$post = dt$priors*dt$likelihoods / sum(dt$priors*dt$likelihoods) # specify what you want the function to return list(names=dt$names, priors=dt$priors, likelihoods=dt$likelihoods, posteriors=dt$post) } ~~~ And if we call that function: ~~~r Names = c("Bowl 1", "Bowl 2") bowl1Mix = c(0.75, 0.25) names(bowl1Mix) = c("vanilla", "chocolate") bowl2Mix = c(0.5, 0.5) names(bowl2Mix) = c("vanilla", "chocolate") Mixes = list("Bowl 1" = bowl1Mix, "Bowl 2" = bowl2Mix) Mixes Observations = c("vanilla", "vanilla", "vanilla", "chocolate") res=f(Names,Mixes,Observations) > res$posteriors[res$names == "Bowl 1"] [1] 0.627907 > res$posteriors[res$names == "Bowl 2"] [1] 0.372093 ~~~ Exactly the same result as before! #win
null
null
[ 0.01645095832645893, 0.024273185059428215, -0.014694148674607277, 0.025401556864380836, 0.07494589686393738, 0.05649169534444809, 0.021317346021533012, 0.003681260161101818, -0.00518075143918395, -0.010479478165507317, 0.0029727842193096876, 0.021857094019651413, -0.04478093981742859, 0.0019019163446500897, -0.028566721826791763, 0.07507923990488052, 0.06663665920495987, -0.004092024173587561, 0.002070046728476882, 0.008198096416890621, 0.02952149510383606, 0.05845096707344055, -0.0028432549443095922, 0.033913590013980865, 0.04432377964258194, 0.010053576901555061, 0.01970265805721283, 0.024619048461318016, -0.04064399376511574, -0.03590642660856247, 0.03758196905255318, 0.04010467976331711, -0.008459371514618397, -0.017761480063199997, 0.012888425029814243, -0.004316334612667561, -0.01792450062930584, 0.004913190379738808, -0.004041052423417568, 0.025014987215399742, -0.05263812839984894, 0.031032178550958633, -0.04145029932260513, 0.0065324860624969006, -0.05629836022853851, -0.02239052951335907, -0.019367018714547157, 0.028182396665215492, 0.0032177891116589308, 0.0032396188471466303, -0.0537308044731617, 0.03865949437022209, -0.0442315898835659, -0.01796025224030018, 0.0009676654590293765, 0.037305332720279694, 0.036772992461919785, -0.07076078653335571, 0.017136944457888603, -0.04078209027647972, -0.007830623537302017, 0.015562701970338821, -0.0087599391117692, 0.006224224343895912, -0.01718902215361595, -0.02096244879066944, 0.004731826018542051, 0.0558575764298439, -0.03901493921875954, -0.00488319993019104, -0.04464476555585861, -0.029291769489645958, 0.0002839293156284839, 0.003822795581072569, -0.035782501101493835, -0.06895028054714203, 0.006430889014154673, 0.07255027443170547, 0.0025061056949198246, 0.00970198679715395, 0.007741583976894617, -0.034827664494514465, 0.01737988367676735, 0.018103156238794327, -0.001344042830169201, -0.032910626381635666, -0.0168425515294075, -0.03182225674390793, -0.059718407690525055, 0.06623654812574387, 0.004771132953464985, -0.055369798094034195, 0.013246211223304272, 0.011052669957280159, -0.03271011263132095, -0.0010585173731669784, 0.02167457528412342, -0.009574580937623978, 0.0015959955053403974, -0.008527404628694057, -0.07124005258083344, -0.036436308175325394, 0.043178826570510864, 0.013656915165483952, -0.08852864056825638, -0.016361922025680542, -0.018447978422045708, -0.011187363415956497, -0.03387055546045303, 0.016052596271038055, -0.02193157561123371, 0.03523024171590805, -0.004327932372689247, -0.001285494421608746, -0.08888545632362366, 0.0508943535387516, 0.028979800641536713, -0.020806128159165382, -0.007780464366078377, -0.010023738257586956, 0.051878422498703, 0.02418970875442028, -0.019970299676060677, 0.07853516191244125, 0.042663611471652985, 0.039371732622385025, 0.015333328396081924, 0.05671920254826546, 0.0020565097220242023, -0.07049614191055298, -0.00039089948404580355, 0.047379687428474426, -0.0020875006448477507, 0.01025827694684267, -0.000003977102096541785, -0.03245532512664795, -0.0202642735093832, -0.008890130557119846, 0.053556863218545914, 0.036767009645700455, 0.025902312248945236, -0.03871898725628853, 0.03028029389679432, 0.026405856013298035, 0.043507251888513565, -0.008272468112409115, -0.014338030479848385, 0.0000829065393190831, -0.04447073116898537, 0.026606522500514984, 0.01845136471092701, -0.00535607011988759, 0.05690077692270279, -0.044156987220048904, 0.015595728531479836, 0.07154782861471176, 0.026880279183387756, 0.018609249964356422, -0.02532605640590191, 0.018322940915822983, 0.058948881924152374, 0.03229908272624016, 0.008005977608263493, 0.03462895378470421, 0.013443265110254288, -0.026410942897200584, 0.030422000214457512, 0.08202614635229111, -0.03163578733801842, 0.0051430994644761086, -0.06511741131544113, -0.06358813494443893, 0.0677141472697258, -0.01534438505768776, -0.026439715176820755, 0.014783546328544617, 0.06941526383161545, 0.010770395398139954, 0.0747140571475029, 0.015576081350445747, -0.08326036483049393, 0.026927931234240532, 0.011296460404992104, 0.02561776526272297, 0.015692729502916336, -0.040156930685043335, 0.08580783009529114, 0.00837914738804102, 0.010474261827766895, 0.05656636878848076, -0.06350944936275482, -0.0786270871758461, -0.009831678122282028, -0.01381159108132124, 0.05522240325808525, -0.03545476868748665, -0.0011748747201636434, 0.07675398141145706, 0.04310145974159241, 0.012707855552434921, -0.012500793673098087, 0.02861091122031212, 0.023138148710131645, -0.038997020572423935, -0.05745752528309822, 0.03742612153291702, 0.03830961883068085, -0.008301854133605957, -0.005642651114612818, 0.02347809262573719, -0.027434661984443665, 0.02639871835708618, 0.023804139345884323, -0.04803165793418884, 0.021222177892923355, 0.035210978239774704, 0.058026038110256195, 0.02125065214931965, 0.035921208560466766, -0.05009600520133972, 0.0073508769273757935, 0.016842762008309364, -0.009503449313342571, -0.015416792593896389, 0.015731116756796837, 0.13372702896595, 0.09140264987945557, -0.03127078711986542, -0.05672613903880119, 0.03865501284599304, -0.0009276886703446507, -0.0217379592359066, 0.021494343876838684, 0.0020567888859659433, -0.01613769866526127, 0.03255389258265495, -0.03371378406882286, -0.024200789630413055, 0.011721027083694935, -0.04644763842225075, 0.0031221441458910704, 0.08808501064777374, -0.010028627701103687, 0.05706179141998291, -0.049239203333854675, 0.0005570297944359481, -0.010392667725682259, -0.029810601845383644, -0.04202939197421074, 0.0023330780677497387, -0.003109968965873122, -0.013392066583037376, 0.05669233202934265, -0.012431666254997253, -0.008608321659266949, -0.02470274083316326, -0.04307613894343376, 0.04569590091705322, 0.08460333943367004, 0.0569918155670166, -0.03210483491420746, 0.07885413616895676, 0.008145651780068874, -0.0005633877590298653, -0.033076606690883636, -0.07600434124469757, -0.04564085602760315, -0.0404190719127655, 0.003851143643260002, 0.03755756840109825, 0.027869515120983124, -0.0066825877875089645, 0.002811908023431897, 0.0156736858189106, 0.0018279283540323377, -0.025467900559306145, 0.012140887789428234, 0.013392501510679722, -0.026734845712780952, -0.04070363566279411, 0.0017879483057186007, 0.06705068796873093, -0.013558443635702133, -0.034771695733070374, 0.008121242746710777, -0.06363104283809662, 0.027114637196063995, -0.057288918644189835, -0.028619445860385895, -0.0006617190083488822, 0.0026916316710412502, 0.043322622776031494, 0.014291821047663689, 0.0022204492706805468, 0.05597706884145737, 0.0074905045330524445, 0.011213783174753189, 0.020623546093702316, 0.007855091243982315, 0.03176938742399216, -0.006530696526169777, 0.014725502580404282, 0.027078114449977875, 0.007526523433625698, 0.0019165393896400928, -0.034874238073825836, 0.01627582497894764, -0.0005127455806359649, -0.27357345819473267, 0.006666448898613453, 0.020053699612617493, -0.023548347875475883, 0.008016855455935001, -0.025711452588438988, 0.02543090656399727, -0.0467064268887043, -0.022970033809542656, 0.03266436979174614, 0.004400938283652067, -0.03988582640886307, -0.046582844108343124, 0.06258528679609299, 0.04169962555170059, 0.0163436159491539, -0.0025948386173695326, -0.038018785417079926, 0.0003099770110566169, 0.06544550508260727, 0.029378537088632584, -0.056492697447538376, -0.020511500537395477, 0.03072001412510872, 0.007816343568265438, 0.04639791324734688, -0.03250769525766373, 0.03203685209155083, -0.09194792807102203, -0.022327225655317307, 0.013914196752011776, -0.032094694674015045, 0.020089641213417053, 0.0007852352573536336, 0.0002326318499399349, -0.017690876498818398, 0.019596213474869728, -0.0064336564391851425, -0.013806753791868687, 0.04001118615269661, -0.03819078579545021, -0.040675122290849686, 0.00520962243899703, -0.00788596086204052, 0.08714686334133148, 0.012873288244009018, -0.047570955008268356, 0.00439961114898324, -0.04265535622835159, 0.058953817933797836, -0.0018756642239168286, -0.014023714698851109, -0.03490012139081955, 0.010011175647377968, -0.03518875315785408, -0.008417564444243908, -0.013385117053985596, -0.01278028916567564, -0.02183550037443638, -0.025487443432211876, 0.026632346212863922, -0.029579780995845795, -0.013230218552052975, -0.024917375296354294, -0.009034254588186741, -0.05897410959005356, -0.07906631380319595, -0.0007935342146083713, 0.07684885710477829, 0.03281804546713829, -0.02435121312737465, -0.023866930976510048, -0.021688301116228104, -0.10663115978240967, -0.006360238883644342, -0.0167231522500515, -0.013722768984735012, -0.00362999620847404, 0.010831671766936779, 0.045638006180524826, -0.023443706333637238, -0.07198124378919601, 0.013877367600798607, -0.0015528358053416014, 0.014546199701726437, -0.013722761534154415, -0.0006833700463175774, 0.006673798430711031, -0.026034725829958916, -0.020960524678230286, 0.07635216414928436, -0.017096415162086487, -0.002836340805515647, 0.00409713014960289, -0.01356601994484663, 0.0525410994887352, 0.015310161747038364, -0.01587744615972042, 0.011476407758891582, 0.03243483975529671, 0.02093043178319931, -0.06906473636627197, 0.0011234704870730639, -0.04957081004977226, -0.05543145537376404, -0.004092388320714235, -0.04821524769067764, 0.006462656892836094, 0.02433912642300129, -0.006255339831113815, 0.005459190811961889, 0.003379771951586008, 0.027076218277215958, -0.03176141902804375, -0.019758321344852448, -0.030271440744400024, 0.019580552354454994, 0.019955992698669434, 0.01880270428955555, -0.016484884545207024, -0.07691213488578796, 0.017576884478330612, -0.01669788733124733, -0.030112890526652336, -0.048978839069604874, -0.041714146733284, 0.0050744530744850636, -0.026203781366348267, -0.00978939514607191, 0.014445153065025806, -0.012172129936516285, 0.004635223653167486, 0.05212834104895592, -0.00045848870649933815, 0.045284204185009, 0.00936870463192463, -0.0358940064907074, -0.013612608425319195, 0.001081674243323505, -0.0044919876381754875, 0.001917681540362537, -0.012215675786137581, 0.006175808608531952, 0.028492340818047523, 0.016175169497728348, 0.013308222405612469, 0.024145491421222687, -0.002674591727554798, -0.003976162523031235, 0.013988924212753773, 0.00889125932008028, 0.01579354517161846, 0.007976831868290901, -0.02821059338748455, -0.021720638498663902, -0.017425555735826492, 0.039993397891521454, -0.010650072246789932, -0.030079681426286697, -0.04949343204498291, 0.024491015821695328, -0.04012226313352585, -0.03622156381607056, -0.02084817923605442, -0.004301946144551039, 0.06284108757972717, -0.022103333845734596, 0.004664758685976267, -0.0010926256654784083, 0.016030944883823395, 0.02688664011657238, -0.01971200667321682, -0.02359059639275074, 0.012693822383880615, -0.037292808294296265, 0.00031846610363572836, 0.017843374982476234, -0.025754081085324287, -0.02001476287841797, -0.015197752974927425, -0.006240881513804197, -0.021719325333833694, 0.0034993772860616446, -0.008379134349524975, 0.04971717670559883, 0.03235630691051483, -0.02102123200893402, -0.01240688469260931, -0.013613884337246418, -0.017679883167147636, -0.06388524174690247, -0.012048842385411263, -0.007361331954598427, 0.032070111483335495, -0.03421640396118164, -0.07427196204662323, 0.009442846290767193, 0.005701560992747545, -0.03080086037516594, 0.012795589864253998, 0.007569009438157082, -0.006805829703807831, -0.0022919627372175455, 0.03213612362742424, 0.07074608653783798, -0.06074001267552376, -0.0022585028782486916, 0.002484038472175598, -0.007843375205993652, 0.017628589645028114, 0.003734599333256483, -0.03485077619552612, -0.0011793604353442788, -0.023032573983073235, 0.019137585535645485, -0.025523586198687553, -0.041983455419540405, -0.010661166161298752, 0.012642798945307732, 0.01177770085632801, 0.009770503267645836, -0.022190257906913757, 0.008244662545621395, -0.028510885313153267, -0.030522774904966354, 0.02770818956196308, -0.03935524448752403, -0.0355529747903347, 0.052916496992111206, -0.029233986511826515, 0.021677840501070023, -0.027958720922470093, -0.009348037652671337, 0.031159767881035805, -0.03632563352584839, 0.0075134155340492725, -0.05410202592611313, 0.028798433020710945, -0.008621962741017342, 0.05448521673679352, -0.011832529678940773, -0.009812595322728157, -0.03728373721241951, 0.015844296663999557, -0.051575955003499985, 0.011837108060717583, 0.007343532983213663, 0.000465765391709283, 0.04748852178454399, 0.05667360872030258, -0.02327827922999859, 0.013656935654580593, -0.014276290312409401, -0.009093120694160461, 0.049406491219997406, -0.016601180657744408, -0.02638946659862995, -0.03475821018218994, -0.03436482325196266, 0.028461879119277, 0.0044852374121546745, 0.013208188116550446, -0.0467580109834671, 0.03241167962551117, 0.03641282394528389, 0.020369742065668106, 0.06872457265853882, 0.0011228291550651193, 0.009670433588325977, -0.03820137307047844, 0.01864590495824814, -0.08836337178945541, -0.021360984072089195, 0.07090367376804352, 0.009312136098742485, -0.017959274351596832, 0.010443544015288353, -0.05371752753853798, 0.03630485385656357, -0.09460107982158661, -0.017800472676753998, 0.03347967565059662, -0.025859838351607323, -0.003071405692026019, -0.0012331631733104587, -0.05669146403670311, -0.009300027042627335, 0.016382558271288872, -0.0428800992667675, -0.003261710749939084, -0.0036378412041813135, 0.0662694200873375, -0.0193769708275795, 0.028731023892760277, 0.0013368463842198253, 0.009517478756606579, 0.06544497609138489, 0.025018833577632904, 0.014192083850502968, 0.04751206561923027, -0.026002032682299614, 0.03584050387144089, 0.025956522673368454, 0.02651926316320896, 0.017964376136660576, 0.006893073208630085, 0.010743597522377968, -0.0692143514752388, 0.009713985025882721, 0.0029887440614402294, -0.03116190806031227, -0.05150327458977699, 0.06159408017992973, -0.012653129175305367, -0.03341825678944588, -0.053741052746772766, 0.015061120502650738, -0.04409473016858101, 0.0011420436203479767, 0.010786684229969978, -0.017087602987885475, -0.02494443766772747, 0.06562899053096771, -0.017532313242554665, -0.014857153408229351, 0.0671091303229332, -0.012048335745930672, -0.020125696435570717, 0.02120823599398136, 0.071955606341362, 0.0731462612748146, 0.05128887668251991, 0.014330047182738781, 0.0772799625992775, -0.011004114523530006, -0.041087523102760315, -0.004251865204423666, -0.04507611691951752, -0.02213986963033676, -0.017503833398222923, 0.030835462734103203, 0.08071728050708771, -0.028800275176763535, 0.045268572866916656, -0.031363602727651596, -0.010211491957306862, 0.008309360593557358, -0.0001989085430977866, 0.009166527539491653, 0.07133817672729492, 0.0036016865633428097, 0.03926508501172066, -0.009284034371376038, -0.03530251234769821, 0.010386846028268337, -0.01878770999610424, -0.024681998416781425, 0.020408870652318, -0.03370842710137367, 0.02768942527472973, 0.021272167563438416, 0.022086365148425102, 0.09010179340839386, -0.034996066242456436, -0.016334375366568565, -0.006046992726624012, 0.01742621697485447, 0.010647887364029884, 0.01632927544414997, 0.003743438981473446, -0.015600742772221565, -0.01448641438037157, -0.04133961349725723, -0.01989634707570076, -0.029560232535004616, -0.02578018046915531, 0.00804874487221241, -0.020889153704047203, 0.001744332374073565, 0.011898408643901348, -0.028278296813368797, -0.05666133388876915, -0.05699745565652847, -0.03721228986978531, -0.04313772916793823, -0.0687556266784668, -0.02583806775510311, 0.015141824260354042, -0.02933642826974392, -0.04411638528108597, -0.019683310762047768, -0.0025317841209471226, -0.010458236560225487, 0.031167663633823395, -0.040673814713954926, -0.020364535972476006, 0.030532484874129295, -0.0015857639955356717, 0.04130006581544876, 0.003068084130063653, 0.05856478214263916, 0.009611413814127445, -0.006206270772963762, -0.02244209498167038, 0.015296537429094315, 0.04672563821077347, 0.02784872241318226, -0.007904415018856525, -0.059842173010110855, 0.003780461149290204, 0.015701409429311752, -0.026248788461089134, -0.08984339237213135, 0.0010234579676762223, 0.02102482132613659, 0.026293721050024033, 0.037223052233457565, -0.02257341332733631, 0.01899603009223938, -0.03351028263568878, -0.025279060006141663, 0.0007099727517925203, 0.009099721908569336, 0.051236532628536224, -0.039770618081092834, 0.06698425859212875, 0.024739960208535194, -0.03282327204942703, -0.05086774751543999, -0.004437841475009918, -0.0037250651512295008, 0.01081792637705803, -0.05194646492600441, -0.023820141330361366, -0.01694486103951931, -0.11107366532087326, -0.021578557789325714, 0.030427604913711548, -0.03914904594421387, -0.005130705889314413, 0.012528463266789913, 0.01760213077068329, 0.003224430838599801, 0.05998685583472252, -0.03428885340690613, 0.04725024476647377, -0.012305913493037224, -0.01618204079568386, -0.017062457278370857, 0.04341169074177742, 0.008953879587352276, 0.025753771886229515, 0.016097616404294968, -0.03846144303679466, -0.037461988627910614, -0.02369120344519615, 0.018160276114940643, 0.045186009258031845, -0.00008619087748229504, 0.004329575225710869 ]
[ -0.0805915966629982, -0.013177684508264065, -0.042225535959005356, -0.026166457682847977, 0.04816334322094917, -0.012823770754039288, 0.036165643483400345, 0.028362970799207687, 0.04890170693397522, -0.004839431028813124, -0.007269191090017557, -0.07641734927892685, 0.017420507967472076, -0.015062328428030014, 0.05734007805585861, -0.006310939323157072, -0.03712901473045349, -0.07049846649169922, -0.044596586376428604, 0.01839454472064972, 0.041116733103990555, -0.022963834926486015, -0.04853685945272446, -0.05890147015452385, 0.03826083242893219, 0.028755968436598778, 0.02566796913743019, 0.0115608349442482, -0.014013797976076603, -0.21802489459514618, 0.02198316901922226, -0.00518270255997777, 0.013611849397420883, -0.04149313271045685, -0.000016532952940906398, 0.03866130858659744, 0.042549844831228256, 0.021422874182462692, 0.01602085307240486, 0.0566733218729496, 0.04631408303976059, -0.010271796025335789, -0.036194078624248505, -0.009646995924413204, 0.03514828905463219, -0.006202165503054857, -0.05957382917404175, -0.005155162885785103, -0.026946911588311195, 0.0230603888630867, -0.0331435352563858, -0.0039878664538264275, -0.012544636614620686, -0.022224603220820427, 0.004982803948223591, 0.039282217621803284, 0.018905336037278175, 0.06343121826648712, 0.013125889003276825, 0.04120706766843796, 0.013497788459062576, 0.0054759555496275425, -0.15149767696857452, 0.09998296946287155, 0.0207743588835001, 0.023911498486995697, -0.04878310114145279, -0.004101814702153206, 0.0015382261481136084, 0.10002071410417557, -0.022451136261224747, 0.012083418667316437, -0.02449924685060978, 0.0795409232378006, 0.009603535756468773, -0.022463975474238396, 0.008576378226280212, -0.004317502025514841, 0.006336946506053209, -0.000678461801726371, -0.025038575753569603, 0.051776327192783356, -0.0061597866006195545, -0.018000388517975807, -0.030475838109850883, -0.0056209140457212925, 0.016703955829143524, 0.006925794295966625, 0.00749560771510005, 0.017439987510442734, 0.018311558291316032, 0.020112499594688416, 0.007176568731665611, -0.012240584008395672, -0.0944293811917305, 0.024353278800845146, 0.024353811517357826, 0.006251772865653038, 0.0080300597473979, 0.41235658526420593, -0.02128647454082966, 0.009204267524182796, 0.020162101835012436, 0.041798967868089676, -0.005530619993805885, -0.03569193556904793, -0.03374357521533966, -0.05629845708608627, 0.0020524212159216404, -0.023419588804244995, 0.0025113443844020367, -0.02947414666414261, 0.05716198310256004, -0.06654548645019531, -0.01634751819074154, 0.015435916371643543, 0.053200431168079376, -0.013013509102165699, 0.017138304188847542, -0.02121252566576004, -0.020442374050617218, 0.0025577228516340256, 0.06222063675522804, -0.0035668129567056894, -0.008264033123850822, 0.0055492939427495, 0.019381649792194366, 0.10305299609899521, 0.0050581395626068115, 0.026247648522257805, 0.05927560478448868, -0.04545104131102562, -0.06478994339704514, 0.018503975123167038, 0.010988658294081688, 0.006302712485194206, 0.02810600958764553, -0.0020834370516240597, 0.022329185158014297, 0.03186771646142006, -0.02744070254266262, -0.03880791738629341, 0.041577890515327454, -0.03266686573624611, -0.03095570020377636, 0.13016928732395172, 0.015339365229010582, -0.01688144914805889, -0.0568016916513443, -0.059689659625291824, 0.03250307962298393, 0.03772694990038872, 0.031797315925359726, -0.07415714114904404, 0.028170403093099594, 0.02142193913459778, 0.04334128648042679, -0.03196312114596367, -0.05796738341450691, -0.012935766018927097, -0.04376334324479103, -0.035545606166124344, -0.010303863324224949, 0.03281471133232117, 0.018160879611968994, -0.06249922513961792, -0.005226870067417622, 0.025957660749554634, 0.01259106770157814, -0.08017312735319138, 0.061609964817762375, 0.012592321261763573, -0.06054561585187912, -0.015603270381689072, 0.019924169406294823, 0.0007903301739133894, -0.036639727652072906, -0.0026389588601887226, 0.07955469936132431, 0.006972243078052998, -0.010867530480027199, -0.047910116612911224, -0.04555339738726616, 0.00046439358266070485, -0.04817986860871315, -0.05969942361116409, -0.0647997260093689, -0.012198629789054394, -0.049598224461078644, 0.0025350493378937244, 0.014089040458202362, -0.06798355281352997, -0.04017092287540436, 0.036966800689697266, -0.02903875522315502, -0.016968531534075737, 0.015263443812727928, 0.004585922695696354, -0.016917187720537186, -0.03048168309032917, -0.006264250725507736, -0.02388789691030979, -0.008547472767531872, -0.009298511780798435, -0.035523515194654465, 0.045774202793836594, 0.07556762546300888, -0.010174339637160301, 0.10155878216028214, 0.02087375335395336, 0.004079223144799471, -0.029776036739349365, -0.013193564489483833, 0.011274678632616997, -0.004980808589607477, 0.020795593038201332, 0.03500937670469284, 0.0005462425760924816, 0.019443616271018982, 0.024163903668522835, 0.010709786787629128, -0.05840517207980156, -0.005802688654512167, -0.3602495491504669, -0.07011093944311142, 0.005007321946322918, -0.017458142712712288, 0.05991268903017044, -0.0458674356341362, -0.0007825875072740018, 0.027411773800849915, -0.00746827432885766, 0.03423034027218819, 0.0501745231449604, 0.0019286952447146177, -0.0036181509494781494, -0.0815257802605629, -0.0265554990619421, -0.006007276475429535, -0.051557667553424835, -0.042789772152900696, -0.041964299976825714, 0.05144456773996353, -0.046460457146167755, -0.027183793485164642, -0.01131695881485939, -0.05213715508580208, 0.023625057190656662, -0.012833311222493649, 0.11014646291732788, 0.025930438190698624, 0.05420750007033348, -0.031101485714316368, 0.02840365655720234, -0.005394516047090292, 0.01372730452567339, -0.016865015029907227, 0.018291248008608818, -0.011515125632286072, 0.002411437686532736, 0.029397068545222282, -0.019553765654563904, -0.03688932582736015, -0.041322026401758194, 0.03714900463819504, -0.0322435162961483, -0.03008059784770012, -0.0860564112663269, 0.010874615050852299, -0.003622445510700345, 0.0027781205717474222, -0.025534069165587425, 0.06696976721286774, 0.03444480895996094, 0.04068334028124809, 0.0329602025449276, -0.015070829540491104, -0.01158149354159832, -0.03642386570572853, -0.04864726960659027, -0.026550130918622017, -0.03528588265180588, 0.010679857805371284, 0.02575596421957016, 0.01816387288272381, 0.034817103296518326, -0.03254279866814613, -0.010104130953550339, -0.0325419157743454, 0.02766837552189827, -0.04833780229091644, 0.020863860845565796, -0.02561868354678154, -0.009870990179479122, 0.0963389128446579, -0.0006350231706164777, 0.03807752579450607, 0.05604960396885872, 0.04950254037976265, 0.00830728467553854, -0.004914243705570698, -0.04220249876379967, 0.029761802405118942, 0.047703225165605545, -0.02295571193099022, 0.0337245836853981, -0.010178138501942158, 0.018529653549194336, 0.0019122408702969551, -0.015532764606177807, 0.002723929937928915, 0.053281866014003754, 0.0036152652464807034, -0.01434034202247858, -0.0373958982527256, -0.015212890692055225, -0.01850210316479206, 0.05580410361289978, 0.021889328956604004, -0.2826613187789917, 0.049032777547836304, 0.04821871593594551, 0.044764816761016846, 0.026442930102348328, 0.002433673944324255, 0.035465307533741, -0.034465156495571136, -0.019406938925385475, -0.008171549066901207, -0.008496653288602829, 0.019796980544924736, 0.07075030356645584, 0.011944744735956192, -0.011536153964698315, -0.036202553659677505, 0.0023002205416560173, -0.04092009365558624, 0.0004740848089568317, -0.01381662767380476, 0.02900283969938755, -0.007416742853820324, 0.18132451176643372, -0.0049417344853281975, 0.012041673995554447, 0.022275861352682114, -0.00616906862705946, -0.007753666024655104, 0.07628493756055832, 0.007676036097109318, 0.01969308964908123, -0.000541081593837589, 0.010530225932598114, -0.032560769468545914, 0.047128986567258835, -0.013191255740821362, -0.03611096739768982, 0.025519344955682755, 0.03133828192949295, -0.050011105835437775, 0.010369193740189075, -0.0014805968385189772, -0.0205745417624712, 0.010115494020283222, 0.1050758808851242, 0.0008101854473352432, 0.02730577625334263, -0.03692960366606712, -0.045691851526498795, 0.009013532660901546, -0.01369672454893589, -0.018146181479096413, -0.0158991739153862, -0.019425377249717712, 0.03133849799633026, 0.05523739755153656, 0.03884868323802948, -0.013395125046372414, 0.012357027269899845, 0.008700009435415268, 0.0022996889892965555, -0.049328628927469254, 0.1367155909538269, 0.016170017421245575, -0.0017554244259372354 ]
[ 0.025951776653528214, 0.004468637052923441, 0.023782003670930862, -0.021219026297330856, -0.052363622933626175, -0.00027692175353877246, -0.00017375341849401593, 0.009104182943701744, 0.02981196902692318, -0.015178673900663853, -0.008697159588336945, -0.021317485719919205, -0.002760994713753462, -0.027190832421183586, 0.030930334702134132, -0.024919800460338593, 0.04779701679944992, 0.005757822189480066, 0.01638828217983246, -0.026315750554203987, -0.04610811173915863, 0.033538803458213806, 0.024778036400675774, -0.005059785675257444, -0.04284965991973877, 0.00267446949146688, -0.009926021099090576, 0.024135533720254898, 0.00937567837536335, -0.13251735270023346, -0.03323132172226906, -0.015478909015655518, -0.0019491937709972262, 0.007882203906774521, -0.030526867136359215, -0.06553318351507187, -0.03278970345854759, -0.0156233636662364, 0.024805823341012, -0.012253914028406143, -0.02078094333410263, -0.010445845313370228, 0.0032543691340833902, 0.006963201332837343, -0.01690511777997017, -0.00013502634828910232, -0.02327287383377552, -0.00027617200976237655, 0.007294507697224617, -0.02778344415128231, -0.026588859036564827, 0.02632378600537777, 0.013454205356538296, 0.039545319974422455, 0.017425190657377243, -0.013792621903121471, -0.02021501585841179, -0.04591220244765282, 0.017328927293419838, 0.007552746683359146, -0.03748311847448349, 0.053423672914505005, -0.0006542569026350975, -0.022421101108193398, 0.0016238257521763444, -0.016050327569246292, -0.02623254992067814, 0.04002416133880615, -0.01960245706140995, 0.010995225980877876, -0.02364632487297058, 0.00884282123297453, -0.009637356735765934, -0.01432006061077118, 0.01367859449237585, -0.02852121740579605, -0.0069116284139454365, -0.03740323707461357, -0.037817083299160004, 0.010728744789958, -0.031605470925569534, -0.005917716305702925, 0.0007291588117368519, 0.018192656338214874, -0.020435938611626625, -0.055359989404678345, 0.0322236493229866, 0.028728004544973373, 0.02106352709233761, -0.030687574297189713, -0.052053987979888916, -0.016987269744277, 0.004345412831753492, -0.005004296079277992, -0.05577511712908745, -0.011832848191261292, -0.034496940672397614, -0.029729364439845085, 0.014271368272602558, 0.7888942956924438, -0.06313829123973846, 0.04272696003317833, 0.03309893608093262, 0.016736052930355072, 0.011470118537545204, -0.02307259291410446, -0.04138868674635887, 0.010843519121408463, 0.0813160389661789, -0.04123668372631073, 0.02493348903954029, 0.04766206070780754, 0.0342758484184742, 0.032426346093416214, -0.0531802773475647, 0.03379429876804352, 0.016468852758407593, 0.002892168704420328, -0.010049121454358101, 0.01071655098348856, 0.03073953278362751, 0.041259873658418655, 0.010691595263779163, 0.012663711793720722, 0.0179054643958807, -0.18898969888687134, 0.022332480177283287, -7.698701151354902e-33, -0.01634671539068222, -0.05821061134338379, 0.01689988747239113, 0.013895525597035885, 0.07182062417268753, -0.011198148131370544, 0.010523964650928974, -0.001327704288996756, 0.004776943940669298, -0.019171401858329773, 0.032001279294490814, 0.0036612069234251976, -0.022184640169143677, 0.0002010263124248013, 0.07195492088794708, 0.03250255808234215, -0.03968920558691025, 0.05910671874880791, 0.0394565723836422, 0.05094248056411743, -0.017843928188085556, 0.012728164903819561, 0.014152038842439651, 0.03198716416954994, -0.01734241470694542, 0.059101223945617676, 0.017604483291506767, 0.0003624119271989912, 0.019478054717183113, -0.045072074979543686, -0.032557521015405655, 0.017452744767069817, -0.0064928256906569, -0.030548689886927605, 0.027297262102365494, -0.0330800898373127, -0.019193224608898163, 0.0017331447452306747, -0.05110643804073334, -0.015513546764850616, -0.018120089545845985, 0.0017924618441611528, -0.007126760669052601, 0.01849433220922947, -0.07954877614974976, -0.05491618067026138, -0.015910930931568146, 0.04514430835843086, 0.04729105904698372, 0.07531388103961945, 0.030548768118023872, -0.019016461446881294, 0.038254864513874054, 0.014787265099585056, -0.013918299227952957, -0.01760382205247879, 0.010717947036027908, 0.04320849850773811, 0.0017636482371017337, -0.05992581322789192, -0.011149149388074875, -0.025556128472089767, -0.017199497669935226, 0.031835392117500305, 0.0060851299203932285, 0.036630041897296906, 0.002785012125968933, 0.0449327677488327, 0.01360015757381916, 0.00581723265349865, -0.05215724557638168, 0.010051391087472439, -0.02411246858537197, -0.019694749265909195, 0.005829084664583206, 0.005907126236706972, -0.011013971641659737, 0.020265892148017883, 0.03994585573673248, 0.06487561762332916, 0.04641464725136757, -0.004031996708363295, -0.06470604240894318, 0.0036846885923296213, -0.04347182810306549, 0.04624461755156517, 0.01538633368909359, 0.043603524565696716, 0.022879665717482567, 0.0010985754197463393, -0.0026414240710437298, 0.017870401963591576, 0.003242450300604105, 0.00019318108388688415, -0.009408023208379745, 7.297532112726118e-33, -0.05790373682975769, 0.019247138872742653, -0.0400000624358654, 0.029711361974477768, 0.02444719709455967, -0.04234274476766586, 0.01792432926595211, 0.007046348415315151, -0.017775649204850197, 0.0033368412405252457, -0.01795394904911518, 0.00896717794239521, -0.02958866022527218, 0.03339235112071037, 0.04277780279517174, 0.03220082446932793, 0.014926816336810589, 0.019008925184607506, -0.021142086014151573, -0.012376746162772179, -0.025214379653334618, 0.012538298964500427, -0.008256010711193085, -0.0074028982780873775, -0.025571709498763084, 0.058715227991342545, 0.02968691848218441, 0.009483283385634422, -0.014755732379853725, -0.03344699367880821, -0.010380283929407597, 0.011803028173744678, 0.012618247419595718, -0.012659917585551739, 0.0006812700303271413, 0.03806522861123085, 0.030881116166710854, -0.001576062641106546, -0.0029807931277900934, -0.01027693785727024, -0.015287669375538826, 0.012318111956119537, -0.027674643322825432, 0.01474217139184475, -0.007519233506172895, 0.04012294486165047, 0.010377763770520687, -0.029819820076227188, 0.04616396501660347, 0.047338198870420456, -0.020425312221050262, 0.03425558656454086, -0.006603272166103125, -0.023989316076040268, -0.011457097716629505, 0.001138406223617494, -0.030295098200440407, 0.010105018503963947, 0.006689733825623989, -0.026305079460144043, -0.027411717921495438, 0.03651333972811699, 0.013841052539646626, 0.04162769764661789, -0.007523938547819853, 0.030517006292939186, -0.06940735876560211, -0.03032652661204338, -0.004915103781968355, 0.017121512442827225, -0.0539122000336647, 0.01733190007507801, 0.04551306366920471, 0.0004741199954878539, 0.0006725597777403891, 0.013228141702711582, -0.010344319976866245, 0.008328476920723915, -0.0070271482691168785, 0.02935964986681938, 0.014912514016032219, -0.019132550805807114, -0.0018382593989372253, -0.004415302071720362, -0.0007986353011801839, -0.02375759929418564, -0.04529491066932678, 0.009099260903894901, 0.04184011369943619, -0.006023407448083162, 0.0043625482358038425, 0.028416067361831665, -0.0008879885426722467, 0.009302404709160328, -0.019307831302285194, -1.2636330204429669e-8, 0.00932453852146864, -0.05438374727964401, -0.02122787944972515, 0.052123382687568665, 0.07261879742145538, 0.05104101076722145, -0.05929961055517197, -0.02231414057314396, -0.02464716136455536, 0.0019167599966749549, 0.030133312568068504, 0.026189858093857765, -0.029830405488610268, 0.010793286375701427, 0.0003989138931501657, -0.04498055577278137, -0.010176654905080795, -0.013330735266208649, 0.022368190810084343, -0.0005460629472509027, -0.0059992666356265545, 0.01619209535419941, 0.056698765605688095, -0.030878694728016853, 0.010243394412100315, -0.025047848001122475, 0.011347511783242226, -0.06743619590997696, -0.03988846391439438, -0.026531526818871498, -0.007252083159983158, -0.03210114687681198, -0.04957277327775955, 0.03870713710784912, -0.00455835135653615, -0.06572478264570236, -0.011534450575709343, 0.025140343233942986, -0.006141609977930784, -0.00028477213345468044, -0.0019951716531068087, -0.009654373861849308, -0.05255761742591858, -0.01649385504424572, 0.01584489829838276, 0.009044548496603966, -0.05737552419304848, 0.041251569986343384, 0.031015947461128235, -0.020216582342982292, -0.015371336601674557, -0.004836370702832937, 0.03277360647916794, -0.012772461399435997, 0.021555056795477867, 0.020440759137272835, 0.03123181313276291, -0.043793126940727234, 0.009239988401532173, -0.015970876440405846, 0.027156714349985123, 0.02727188542485237, -0.001538949436508119, -0.02409661002457142 ]
r-think-bayes-more-posterior-probability-calculations
https://markhneedham.com/blog/2015/04/16/r-think-bayes-more-posterior-probability-calculations
false
2015-04-19 23:08:45
R: non-numeric argument to binary operator
[ "r-2" ]
[ "R" ]
When debugging R code, given my Java background, I often find myself trying to print out the state of variables along with an appropriate piece of text like this: [source,r] ---- names = c(1,2,3,4,5,6) > print("names: " + names) Error in "names: " + names : non-numeric argument to binary operator ---- We might try this next: [source,r] ---- > print("names: ", names) [1] "names: " ---- which doesn't actually print the +++<cite>+++names+++</cite>+++ variable - only the first argument to the print function is printed. We'll find more success with the +++<cite>+++https://stat.ethz.ch/R-manual/R-devel/library/base/html/paste.html[paste]+++</cite>+++ function: [source,r] ---- > print(paste("names: ", names)) [1] "names: 1" "names: 2" "names: 3" "names: 4" "names: 5" "names: 6" ---- This is an improvement but it repeats the 'names:' prefix multiple times which isn't what we want. Introducing the +++<cite>+++https://stat.ethz.ch/R-manual/R-devel/library/base/html/toString.html[toString]+++</cite>+++ function gets us over the line: [source,r] ---- > print(paste("names: ", toString(names))) [1] "names: 1, 2, 3, 4, 5, 6" ----
null
null
[ 0.014493094757199287, 0.0194139014929533, -0.0338459350168705, 0.03516028821468353, 0.05343765392899513, 0.02749716304242611, 0.02399342507123947, -0.008561871945858002, 0.0050364225171506405, -0.022362366318702698, -0.04425298795104027, 0.020608223974704742, -0.07193876057863235, 0.019653301686048508, -0.0023395121097564697, 0.08608994632959366, 0.05147816240787506, -0.03376375883817673, 0.02872122824192047, -0.004286076873540878, 0.0216823723167181, 0.035833023488521576, -0.033333636820316315, 0.020889630541205406, 0.03180801123380661, 0.00951544288545847, 0.0023142914287745953, 0.014496937394142151, -0.05214150249958038, -0.012921491637825966, 0.04888918623328209, 0.04548364505171776, 0.00948399305343628, -0.005528790410608053, 0.019717920571565628, 0.004062189720571041, 0.007454575039446354, 0.014534364454448223, 0.017890162765979767, -0.0024756682105362415, -0.054816924035549164, -0.006820327136665583, -0.028012989088892937, 0.001991735305637121, -0.02108440175652504, 0.011768115684390068, -0.03312306106090546, -0.006176539231091738, -0.024823233485221863, 0.030557382851839066, -0.0786573737859726, 0.052931301295757294, -0.023740431293845177, -0.026179775595664978, -0.011128636077046394, 0.04208222031593323, 0.004463243763893843, -0.057812463492155075, 0.018501663580536842, -0.07020727545022964, 0.003238819306716323, -0.0001579299714649096, -0.021676482632756233, 0.0310321394354105, 0.016811653971672058, -0.013279235921800137, 0.004820710513740778, 0.02929702401161194, -0.033757057040929794, -0.008837306872010231, -0.035025324672460556, 0.0007044236990623176, -0.038205746561288834, -0.0035587928723543882, -0.0022682517301291227, -0.026712020859122276, -0.019151076674461365, 0.07140292227268219, 0.0036217980086803436, 0.033069685101509094, -0.005466784350574017, 0.006964031141251326, 0.06512394547462463, -0.002509897341951728, 0.024687692523002625, -0.018551316112279892, -0.014914446510374546, -0.027108807116746902, -0.041725918650627136, 0.04190604388713837, -0.005208824761211872, -0.054781317710876465, 0.006847709883004427, 0.023212557658553123, -0.024579567834734917, 0.003370300168171525, -0.013604534789919853, -0.011883934028446674, 0.011913959868252277, -0.03124120831489563, -0.05422712489962578, -0.017116986215114594, 0.08472518622875214, 0.023489924147725105, -0.07821402698755264, -0.013444052077829838, -0.0054310644045472145, -0.01335819624364376, -0.029145516455173492, 0.0438043512403965, -0.0315542072057724, 0.016103437170386314, -0.04744573310017586, -0.02640506625175476, -0.06287920475006104, 0.05252234637737274, 0.021768709644675255, -0.01730968803167343, 0.0165121927857399, 0.037271082401275635, 0.022800011560320854, 0.03454382345080376, 0.0049920170567929745, 0.06675004959106445, 0.019892234355211258, 0.05239535868167877, 0.003631793661043048, 0.037640683352947235, -0.044413913041353226, -0.07016194611787796, -0.02938595786690712, 0.08480425924062729, -0.018606780096888542, -0.0019225742435082793, -0.000738982402253896, -0.005966842174530029, -0.017410758882761, -0.016487926244735718, 0.0567428283393383, 0.04054061323404312, 0.02480514533817768, -0.030691979452967644, 0.011426631361246109, -0.02750038169324398, 0.01561559084802866, -0.006971279159188271, -0.018577545881271362, -0.018443293869495392, -0.010514898225665092, 0.011816906742751598, 0.011884964071214199, -0.012512648478150368, 0.07958575338125229, -0.01868470013141632, 0.012578103691339493, 0.059492193162441254, 0.009944050572812557, 0.038373447954654694, -0.03269820660352707, 0.007322066929191351, 0.057306867092847824, 0.006680767051875591, -0.007102943956851959, 0.0661056861281395, 0.013012152165174484, 0.0015694512985646725, 0.02585696429014206, 0.026653192937374115, -0.03915804997086525, -0.017977889627218246, -0.05808970332145691, -0.08240611851215363, 0.03995714709162712, -0.014546534977853298, 0.0016634498024359345, -0.000013619474884762894, 0.06389617174863815, -0.020805776119232178, 0.06313623487949371, 0.0018144852947443724, -0.06943002343177795, 0.04477151110768318, -0.015897901728749275, 0.029161591082811356, 0.008292603306472301, -0.014227080158889294, 0.059858523309230804, 0.010627967305481434, 0.03024008497595787, 0.05209655687212944, -0.06191784143447876, -0.08555181324481964, 0.022073842585086823, -0.0008619774016551673, 0.04656347632408142, -0.011417936533689499, -0.03303642198443413, 0.07770711928606033, 0.01462204847484827, 0.0017431984888389707, 0.0010881111957132816, 0.0013393410481512547, 0.038314953446388245, -0.031373389065265656, -0.029899585992097855, 0.01701945997774601, 0.01837555691599846, -0.01827765628695488, -0.0018476444529369473, 0.0325002521276474, 0.004314092919230461, 0.07142148166894913, 0.011135807260870934, -0.025867370888590813, 0.05449950695037842, 0.0012869280762970448, 0.044627588242292404, 0.01090185809880495, 0.05477997660636902, -0.052804287523031235, 0.026994187384843826, -0.0007869132095947862, 0.014427894726395607, -0.016859276220202446, 0.01965855062007904, 0.15647271275520325, 0.07292107492685318, 0.01368253119289875, -0.027416322380304337, 0.04462382569909096, -0.021734772250056267, -0.04038967937231064, 0.04147866740822792, 0.00380633189342916, -0.0251979511231184, 0.028980031609535217, -0.02434585802257061, 0.022065505385398865, -0.003841410856693983, -0.045196663588285446, -0.005104939918965101, 0.06625509262084961, -0.03467651084065437, 0.02971731685101986, -0.004295452497899532, 0.0009544659405946732, -0.007288665976375341, -0.021482553333044052, -0.056562699377536774, 0.0037085567601025105, 0.04110930487513542, -0.000180940653081052, 0.044455040246248245, -0.013952918350696564, -0.034154944121837616, -0.017541848123073578, -0.024767927825450897, 0.009607882238924503, 0.07193854451179504, 0.04584868624806404, -0.02282049134373665, 0.020013919100165367, -0.02545832470059395, -0.004523327574133873, -0.04326746612787247, -0.048816531896591187, -0.051398586481809616, -0.02124318853020668, 0.012008856050670147, 0.02149166353046894, -0.002123568905517459, 0.04769411310553551, 0.0025850075762718916, 0.0075017185881733894, -0.0017045633867383003, -0.023351887241005898, 0.021831529214978218, 0.009055039845407009, -0.007119571790099144, -0.022324496880173683, 0.009786087088286877, 0.038465604186058044, -0.04476838931441307, -0.05690743029117584, 0.014736306853592396, -0.06300228089094162, 0.043644197285175323, -0.0526701882481575, -0.05111910030245781, -0.014724401757121086, -0.022062914445996284, 0.05835768207907677, 0.01063909474760294, 0.018368151038885117, 0.05647372081875801, -0.011305076070129871, 0.03018253855407238, -0.001257371623069048, 0.01281522773206234, 0.004918829537928104, -0.01773628033697605, -0.002795810578390956, -0.0049081179313361645, 0.0006335884681902826, -0.010754905641078949, -0.03599151223897934, 0.0038002943620085716, -0.033195555210113525, -0.2526054382324219, 0.031707148998975754, -0.03990723937749863, -0.018957803025841713, 0.014407576061785221, -0.06039254739880562, 0.01495551597326994, -0.05642697587609291, 0.003583351382985711, 0.021298730745911598, -0.008477157913148403, -0.040937118232250214, -0.035246409475803375, 0.06373343616724014, 0.009026212617754936, 0.033864304423332214, 0.02535209245979786, -0.023364484310150146, -0.026289120316505432, 0.06463254988193512, 0.033164169639348984, -0.03512420877814293, 0.02774728089570999, 0.04447449371218681, 0.033070437610149384, 0.05732855573296547, -0.05961651727557182, 0.04626033827662468, -0.04007910564541817, -0.04870975762605667, 0.014825825579464436, -0.004268627613782883, -0.00449697719886899, -0.0018122734036296606, -0.017536496743559837, -0.024114061146974564, 0.00798459630459547, 0.010250745341181755, 0.01264851912856102, 0.03458679839968681, -0.07048957794904709, -0.038703180849552155, 0.015862926840782166, -0.04793209582567215, 0.03638612851500511, 0.01821058802306652, -0.04246275871992111, -0.0032407641410827637, -0.025532253086566925, 0.0873306542634964, -0.036180902272462845, -0.0014876885106787086, -0.0035705906338989735, 0.020048679783940315, -0.04233262687921524, -0.030527088791131973, -0.04593649134039879, 0.005704870447516441, -0.018923319876194, -0.042581260204315186, 0.013225271366536617, -0.03314841166138649, -0.0027042964939028025, -0.04233748838305473, 0.0002155493275495246, -0.04974309727549553, -0.05433140695095062, -0.012705376371741295, 0.07461331784725189, 0.05473112314939499, -0.03624248877167702, 0.003789502428844571, -0.009244847111403942, -0.10404808819293976, -0.01896832510828972, -0.0738784670829773, -0.04572232440114021, -0.032875340431928635, 0.007104183081537485, 0.049325548112392426, -0.044109128415584564, -0.05105233192443848, 0.018266627565026283, 0.0200749970972538, 0.023928796872496605, -0.006970059126615524, 0.011425800621509552, -0.022331759333610535, -0.011920987628400326, -0.015545273199677467, 0.07316511869430542, -0.029696008190512657, -0.02015148475766182, -0.0347893200814724, 0.0096224844455719, 0.016565274447202682, 0.04607393220067024, -0.013611864298582077, 0.037008918821811676, 0.04114446043968201, 0.01506075356155634, -0.07383842766284943, 0.025082023814320564, -0.09461190551519394, -0.014344601891934872, 0.005932805594056845, -0.07339390367269516, 0.005929927807301283, 0.01809963397681713, -0.009198292158544064, -0.02029593288898468, -0.004797293338924646, 0.02823583036661148, -0.05702390521764755, -0.026000816375017166, 0.0030035851523280144, 0.029568800702691078, 0.01959204487502575, -0.0003043494943995029, -0.04325398802757263, -0.046446915715932846, 0.013573499396443367, 0.001755983685143292, -0.06455931812524796, -0.035861872136592865, -0.030590075999498367, -0.023205507546663284, -0.06158185005187988, 0.024773862212896347, 0.009297968819737434, -0.002995917573571205, 0.010694261640310287, 0.04548073932528496, 0.011938562616705894, 0.012832451611757278, 0.0001867781684268266, -0.02368045225739479, -0.03592904284596443, -0.0223535243421793, -0.0006705732084810734, -0.011194373480975628, 0.00035875794128514826, 0.02303459867835045, 0.03075549565255642, 0.015615999698638916, -0.03374096378684044, 0.02865288034081459, -0.004388768225908279, -0.023047860711812973, 0.030297251418232918, 0.021224305033683777, -0.03131704777479172, 0.017683206126093864, -0.018751276656985283, -0.02580762282013893, -0.01598890870809555, 0.05504940450191498, 0.004612029064446688, -0.0357818566262722, -0.03360607102513313, 0.04884245619177818, -0.015110352076590061, 0.01007265504449606, 0.0008008877048268914, -0.04205771163105965, 0.018767811357975006, -0.006728671956807375, 0.03549439087510109, 0.0011941990815103054, 0.0021251144353300333, 0.017673688009381294, 0.0038494286127388477, -0.0052641225047409534, 0.01825134828686714, -0.02457743138074875, -0.018487878143787384, -0.006046882830560207, 0.015567317605018616, 0.017445215955376625, 0.010364539921283722, -0.023446880280971527, 0.0012649687705561519, 0.018257418647408485, -0.010611296631395817, 0.04105393961071968, -0.004903496243059635, 0.005872663576155901, -0.020123817026615143, -0.02024810202419758, -0.04172065854072571, -0.0076964376494288445, -0.029329288750886917, -0.020873326808214188, 0.029989732429385185, -0.046012844890356064, -0.0637107565999031, -0.001380235655233264, 0.06255581229925156, -0.014421171508729458, 0.02027188427746296, -0.003476952901110053, 0.019906727597117424, -0.031124001368880272, 0.039862945675849915, 0.028165489435195923, -0.054599322378635406, -0.001684660790488124, -0.013953895308077335, -0.006145824212580919, 0.018010541796684265, -0.0011923415586352348, -0.056371863931417465, 0.002322495449334383, -0.016100984066724777, 0.014231492765247822, -0.000849222531542182, -0.058415673673152924, -0.04820815101265907, -0.007222988177090883, -0.008723375387489796, 0.004597007296979427, -0.015867117792367935, 0.03297584503889084, -0.045021623373031616, 0.005431191064417362, 0.0064619737677276134, -0.028427112847566605, -0.004769755527377129, 0.08036983758211136, -0.020652472972869873, 0.03531584516167641, -0.016469383612275124, 0.06576280295848846, 0.0367966964840889, 0.018597101792693138, -0.025306234136223793, -0.06747850030660629, 0.03282127529382706, -0.0012703073443844914, 0.01793089136481285, -0.022431455552577972, 0.01496822852641344, -0.035876426845788956, 0.016906732693314552, -0.011517751961946487, -0.007426778320223093, -0.007558370940387249, -0.03800800070166588, 0.00792770367115736, 0.05711358040571213, 0.03246351704001427, 0.03352450206875801, -0.004038752522319555, -0.03163983300328255, 0.06404116749763489, -0.023944025859236717, -0.04777323082089424, 0.00976554024964571, -0.04868805781006813, 0.03124953620135784, 0.0390201136469841, 0.03850043565034866, -0.045629505068063736, 0.03732339292764664, 0.04132530465722084, 0.007348821964114904, 0.021317875012755394, -0.011804427951574326, 0.011188039556145668, -0.029382862150669098, -0.004633460193872452, -0.09766894578933716, -0.021044790744781494, 0.05084162950515747, 0.019010353833436966, -0.02461557649075985, -0.05704941228032112, -0.029531313106417656, 0.018980151042342186, -0.057459212839603424, -0.03635377064347267, 0.015146499499678612, 0.030215837061405182, -0.00650159502401948, 0.019493646919727325, -0.057398051023483276, 0.012555880472064018, 0.05429942533373833, -0.03790261968970299, -0.004033604636788368, -0.01828925870358944, 0.07273459434509277, 0.008416097611188889, 0.02877728082239628, -0.005437340121716261, 0.004236276727169752, 0.06122876703739166, 0.05084885284304619, -0.005946773570030928, 0.027687333524227142, -0.05025601387023926, 0.02034745179116726, 0.03266686573624611, -0.01927817612886429, -0.015122096054255962, 0.02626301348209381, -0.0004702693840954453, -0.07436738163232803, -0.051362648606300354, 0.015133177861571312, -0.02923605404794216, -0.03624531999230385, 0.049582283943891525, -0.004613783210515976, -0.038196004927158356, -0.021727707237005234, 0.023598069325089455, -0.04533196985721588, 0.01570558361709118, -0.022516349330544472, -0.0017126626335084438, -0.06569075584411621, 0.07107001543045044, 0.013075626455247402, -0.0070280819199979305, 0.06457813084125519, 0.0016017768066376448, -0.020032864063978195, -0.02116197720170021, 0.04969312995672226, 0.08148312568664551, 0.014237117022275925, 0.0005844819243066013, 0.03434492647647858, -0.020777644589543343, -0.044627126306295395, 0.04144054278731346, 0.0008229074883274734, 0.015007108449935913, 0.0027380615938454866, -0.007194257341325283, 0.08733675628900528, -0.0374109148979187, 0.06262245029211044, -0.015776783227920532, 0.010611450299620628, -0.0007355039124377072, 0.039473094046115875, 0.004729350097477436, 0.04290269687771797, 0.0054220883175730705, 0.053319159895181656, -0.003598660696297884, -0.025036459788680077, 0.02728114277124405, -0.03267744556069374, -0.003144327085465193, 0.02376565895974636, -0.00561716640368104, 0.009486088529229164, 0.04702930897474289, 0.021907057613134384, 0.09103406965732574, -0.041468605399131775, -0.06426417082548141, -0.00024347618455067277, 0.07202917337417603, 0.03424503654241562, 0.025069493800401688, 0.013113184832036495, -0.04071866720914841, -0.019262660294771194, -0.05253610014915466, -0.04885373264551163, -0.01827014796435833, -0.049613870680332184, 0.054378677159547806, -0.038689956068992615, -0.017352940514683723, 0.03268948197364807, -0.013451848179101944, -0.030519675463438034, -0.06518448144197464, -0.04826391860842705, -0.018515976145863533, -0.0671948716044426, -0.019767213612794876, -0.008926468901336193, -0.017242321744561195, -0.03356055170297623, -0.009760227985680103, -0.003131584729999304, -0.008551550097763538, 0.01946975104510784, -0.046207066625356674, -0.013222089037299156, 0.03474637493491173, 0.04081375151872635, 0.006578733213245869, 0.051308631896972656, 0.031725622713565826, 0.008317798376083374, -0.018291689455509186, 0.026640569791197777, -0.006840406451374292, 0.05088016018271446, 0.017241889610886574, -0.011225779540836811, -0.0843120589852333, 0.011261721141636372, -0.000023473319743061438, 0.018648464232683182, -0.06310451775789261, 0.013138596899807453, 0.0064202528446912766, -0.0423150435090065, 0.039267584681510925, -0.007380451075732708, 0.027185754850506783, -0.011318488046526909, -0.02441331557929516, -0.002384889405220747, 0.020979736000299454, 0.029096055775880814, -0.019456563517451286, 0.08583687990903854, 0.04124022275209427, 0.015921108424663544, -0.024467648938298225, -0.027424419298768044, -0.004636206664144993, 0.007444831542670727, -0.04877835139632225, -0.03322247415781021, -0.05970193073153496, -0.08696369081735611, -0.011389292776584625, 0.008172765374183655, -0.03200408071279526, -0.022794045507907867, 0.006555358879268169, 0.05786096304655075, -0.023417366668581963, 0.06595134735107422, -0.02476424165070057, 0.031223561614751816, -0.02454741671681404, -0.02050805278122425, 0.016576867550611496, 0.03932078182697296, -0.023347744718194008, 0.03816758468747139, 0.0033540779259055853, -0.007828246802091599, -0.01988280564546585, -0.025898518040776253, 0.0105928098782897, 0.07031765580177307, 0.000843683781567961, 0.0020943954586982727 ]
[ -0.10030031204223633, -0.0033985369373112917, -0.04967111349105835, -0.010510804131627083, 0.05205119401216507, -0.06747446954250336, -0.014121245592832565, 0.058265745639801025, 0.016684668138623238, -0.0033775651827454567, -0.0025141809601336718, -0.0296072605997324, 0.008397133089601994, -0.014538579620420933, 0.06648562103509903, -0.020665140822529793, -0.035901252180337906, -0.0303487665951252, -0.009444711729884148, 0.015383055433630943, 0.038535937666893005, 0.009861540980637074, -0.018560606986284256, -0.043202418833971024, 0.026812788099050522, 0.04922543093562126, 0.009535271674394608, -0.03732824698090553, -0.01626668870449066, -0.23409557342529297, -0.0008636477286927402, 0.026289789006114006, 0.021346015855669975, -0.020466627553105354, 0.002697854768484831, 0.04697910323739052, 0.003239797428250313, 0.0216598529368639, 0.003877708688378334, 0.03995843976736069, 0.003405796131119132, 0.010277071967720985, -0.04610035941004753, -0.01884469948709011, 0.011994900181889534, 0.010209531523287296, -0.040490977466106415, -0.020022716373205185, 0.00693913921713829, 0.018361784517765045, -0.09640881419181824, 0.01387873012572527, 0.01433768030256033, -0.0402645505964756, -0.002041624626144767, 0.02159116044640541, 0.07018794864416122, 0.07930383086204529, 0.006770247593522072, -0.02097003534436226, -0.005684652365744114, -0.02411458268761635, -0.15368705987930298, 0.09061448276042938, 0.059421464800834656, 0.03670633211731911, -0.014340187422931194, 0.013696368783712387, -0.026738833636045456, 0.0802263393998146, 0.007172871846705675, -0.016874536871910095, -0.061511844396591187, 0.09715481847524643, 0.00024201427004300058, -0.030341925099492073, -0.02225763164460659, -0.005084700882434845, 0.031271930783987045, -0.04787179455161095, -0.039357833564281464, -0.006714855786412954, -0.01251767948269844, -0.008812994696199894, -0.025096938014030457, 0.02719675749540329, -0.010573667474091053, 0.05026930570602417, 0.04115252196788788, 0.024173980578780174, 0.02832501009106636, -0.007877517491579056, 0.0567062683403492, 0.027464725077152252, -0.08567776530981064, 0.029283002018928528, 0.020337391644716263, -0.0003470872179605067, -0.008780180476605892, 0.43916118144989014, -0.03047104924917221, -0.01738780550658703, 0.03230608254671097, 0.029284197837114334, 0.013998364098370075, -0.006312175653874874, -0.006154925562441349, -0.05132611468434334, 0.006012954283505678, -0.05004574730992317, 0.009908651933073997, -0.022544430568814278, 0.0953197106719017, -0.057764746248722076, 0.005090207792818546, 0.007728794123977423, 0.05262961611151695, -0.007919329218566418, -0.02529396489262581, 0.015581494197249413, -0.018944548442959785, -0.0037047246005386114, -0.007660388946533203, 0.030706945806741714, 0.01029451284557581, -0.037024062126874924, 0.01991652511060238, 0.08860450983047485, 0.022843575105071068, 0.039201099425554276, 0.061821844428777695, -0.011771118268370628, -0.06552788615226746, 0.005810814443975687, -0.023463550955057144, 0.011413739062845707, 0.024127015843987465, 0.001574902213178575, -0.013521864078938961, 0.027880534529685974, -0.01037209015339613, -0.034987855702638626, 0.0002528903423808515, 0.011763987131416798, -0.04767893627285957, 0.10063953697681427, -0.03501860052347183, -0.005205873865634203, -0.013354341499507427, -0.042104169726371765, 0.011988352984189987, 0.05698542669415474, 0.013804813846945763, -0.046259619295597076, -0.008318087086081505, 0.015158931724727154, 0.07019218057394028, -0.021259836852550507, -0.0609176941215992, -0.013976671732962132, -0.02430655248463154, -0.023596027866005898, -0.03123609349131584, 0.040785834193229675, 0.021860886365175247, -0.020380612462759018, -0.023042265325784683, 0.013451693579554558, 0.017459100112318993, -0.061318330466747284, 0.018786584958434105, 0.0004720454744528979, -0.01777179352939129, -0.011793224141001701, 0.030457142740488052, -0.002018243307247758, -0.0002483510470483452, 0.009428972378373146, 0.06654094159603119, 0.03642626479268074, -0.002739585703238845, -0.013735301792621613, -0.06637560576200485, -0.0026859764475375414, -0.019375385716557503, -0.07082663476467133, -0.10517675429582596, -0.005351358558982611, -0.00886993482708931, 0.0006266129785217345, 0.0003889111685566604, -0.011614717543125153, -0.07632822543382645, 0.04897088184952736, -0.036330826580524445, -0.04428616166114807, 0.02822740375995636, 0.0039307489059865475, -0.006318256258964539, -0.035409484058618546, 0.04161651432514191, 0.04605855047702789, 0.0016586171695962548, 0.04022268205881119, -0.0585220530629158, -0.014458968304097652, 0.06493469327688217, -0.04007536545395851, 0.05824467912316322, 0.020411590114235878, -0.027234168723225594, -0.0005852593458257616, 0.018691878765821457, 0.013883914798498154, -0.026772087439894676, -0.010510385036468506, 0.008677980862557888, 0.005825736094266176, 0.02467847615480423, 0.028122074902057648, -0.04629586264491081, -0.06002385914325714, -0.02880636602640152, -0.3529304265975952, -0.0410308912396431, -0.005972476210445166, -0.03542383760213852, 0.03977576643228531, -0.03483215719461441, 0.010877035558223724, -0.00306679611094296, -0.01173278409987688, 0.01684076339006424, 0.04149206727743149, -0.016708562150597572, -0.012040537782013416, -0.09297934919595718, -0.011083903722465038, 0.03031137026846409, -0.027790874242782593, -0.027176206931471825, -0.006630559451878071, 0.037883490324020386, -0.0370875746011734, -0.03286316618323326, -0.04061613231897354, -0.02091217413544655, 0.010290195234119892, -0.03195998817682266, 0.1021154373884201, 0.025761770084500313, 0.08516670018434525, -0.019033443182706833, 0.017917249351739883, -0.00122779980301857, 0.0045153493992984295, -0.06966844201087952, 0.0015404501464217901, -0.010643514804542065, -0.0510169118642807, 0.045906223356723785, 0.018877174705266953, -0.014988973736763, 0.00035966167342849076, 0.019068120047450066, -0.052789121866226196, 0.004813987761735916, -0.01528911478817463, 0.009967866353690624, -0.018611205741763115, -0.05097299814224243, 0.01576506532728672, 0.0824863463640213, 0.009242722764611244, 0.008728178218007088, 0.02943401411175728, 0.022221004590392113, 0.03732618689537048, -0.013644715771079063, -0.0551140122115612, -0.0024483201559633017, 0.025284433737397194, -0.048844099044799805, 0.048019859939813614, 0.018584787845611572, 0.038320377469062805, -0.05940988287329674, -0.018263041973114014, 0.00902467966079712, -0.004270841833204031, -0.023126402869820595, 0.04239926487207413, -0.022343214601278305, -0.015751292929053307, 0.11577893048524857, 0.006032824981957674, -0.0009495712583884597, 0.0022537356708198786, 0.049430835992097855, -0.0013719666749238968, -0.0229294802993536, 0.005438233260065317, -0.012267366982996464, 0.027830807492136955, 0.011043407954275608, 0.04761867970228195, -0.037083130329847336, -0.016981031745672226, 0.02289416827261448, -0.013500673696398735, -0.025766925886273384, 0.06992394477128983, 0.005234496667981148, -0.034670084714889526, -0.01573692448437214, 0.00317332218401134, -0.04104670137166977, 0.057559918612241745, 0.01972154714167118, -0.2759169340133667, 0.01521631795912981, 0.04103397578001022, 0.037414953112602234, -0.01417839340865612, 0.02303164452314377, 0.04644811898469925, -0.08994866907596588, -0.030034199357032776, 0.00040604505920782685, 0.009977159090340137, 0.0485682375729084, 0.004669505171477795, -0.0030972121749073267, 0.022402111440896988, 0.004701150115579367, 0.0489092618227005, -0.01971062272787094, 0.00948166474699974, -0.0001345371565548703, 0.01154244039207697, -0.003124857321381569, 0.16591715812683105, -0.031411513686180115, 0.026231154799461365, 0.01672290451824665, -0.00009649229468777776, 0.01585806906223297, 0.08241169899702072, 0.02329123765230179, -0.010878127068281174, 0.02866409346461296, 0.07081213593482971, -0.021547121927142143, 0.04237376153469086, -0.018949519842863083, -0.034557025879621506, 0.014797976240515709, 0.034266114234924316, -0.017516769468784332, 0.0112270787358284, 0.022518692538142204, -0.04160357266664505, 0.016009213402867317, 0.061653267592191696, 0.022830184549093246, 0.004135387483984232, -0.014305810444056988, -0.035794567316770554, 0.0040189288556575775, -0.02362988516688347, 0.0015838536201044917, -0.02422410063445568, -0.013783507980406284, 0.011135072447359562, 0.048094555735588074, 0.009450331330299377, -0.026037270203232765, -0.006353557575494051, -0.0008224883931688964, -0.02687131240963936, -0.07052133977413177, 0.12167982012033463, 0.030918331816792488, -0.008849864825606346 ]
[ -0.007303216494619846, 0.03350970894098282, -0.06016071140766144, 0.02119380235671997, 0.008930334821343422, 0.010838109999895096, -0.013887360692024231, 0.015022157691419125, -0.05233432725071907, 0.0013146091951057315, -0.04690192639827728, 0.007638071663677692, 0.04564901441335678, 0.0014681881293654442, 0.012268025428056717, -0.012004280462861061, -0.011442944407463074, 0.008299846202135086, 0.029586710035800934, -0.0466606542468071, -0.020174255594611168, 0.049212343990802765, 0.030851658433675766, -0.03568927198648453, 0.0436764694750309, 0.04960965737700462, -0.02856978215277195, 0.003602217184379697, 0.017513755708932877, -0.1128838062286377, 0.008927502669394016, -0.011520043015480042, 0.05174516141414642, -0.0012487907661125064, -0.0008220130112022161, 0.02368978038430214, -0.03250662237405777, 0.039882466197013855, 0.034925833344459534, -0.004693789407610893, -0.011900483630597591, 0.012991166673600674, -0.020129337906837463, -0.025369394570589066, -0.027159009128808975, -0.0370991975069046, -0.06503742188215256, 0.019791379570961, 0.01703653484582901, -0.013805568218231201, -0.02354620210826397, -0.021044019609689713, 0.016402294859290123, -0.027532033622264862, 0.060513511300086975, -0.0484410785138607, -0.023053107783198357, -0.01605214737355709, -0.04841208830475807, -0.07367357611656189, 0.003238028846681118, -0.006070935167372227, -0.08956745266914368, -0.012689691036939621, -0.008261081762611866, -0.01606321707367897, -0.01680423691868782, 0.03970496356487274, 0.04819696396589279, 0.01659790426492691, -0.018602773547172546, 0.002932007424533367, -0.0338069386780262, -0.05732952803373337, -0.017869485542178154, 0.0017921001417562366, 0.03398426994681358, -0.02875390090048313, 0.0034082767087966204, -0.004827836994081736, -0.04870684817433357, 0.009082184173166752, -0.019716674461960793, 0.012539055198431015, -0.015148364007472992, 0.007624772842973471, -0.0017710973042994738, -0.004604720510542393, -0.01787339150905609, -0.007587895728647709, 0.031215542927384377, 0.006343971472233534, 0.03426452353596687, -0.019653677940368652, -0.07533237338066101, 0.03204356133937836, -0.01985340751707554, -0.012272622436285019, -0.0004750215739477426, 0.8086334466934204, 0.02051810547709465, 0.01457423996180296, 0.02175135165452957, -0.004088649060577154, 0.0006848531193099916, -0.046203672885894775, -0.036621689796447754, -0.005684090778231621, 0.012083655223250389, -0.04385156184434891, 0.026051681488752365, -0.01573408581316471, 0.0426061786711216, 0.05157522112131119, -0.011655704118311405, 0.009087085723876953, 0.023155393078923225, -0.029208462685346603, -0.0005311676068231463, -0.031931355595588684, 0.014929356053471565, 0.0050141713581979275, -0.012247142381966114, 0.015557672828435898, -0.011809059418737888, -0.14421072602272034, -0.008749461732804775, -7.477930822642998e-33, 0.03691543638706207, 0.0011533222859725356, 0.022759169340133667, -0.009184110909700394, 0.005493386182934046, 0.07576622068881989, -0.00629681721329689, -0.016734415665268898, 0.0036338744685053825, -0.023541191592812538, 0.02307061292231083, 0.008202110417187214, 0.03850587457418442, -0.016165945678949356, -0.00042644666973501444, -0.021659867838025093, -0.010567324236035347, 0.05811789631843567, -0.03141084685921669, 0.04703034460544586, -0.0010614207712933421, 0.007707956712692976, 0.0035387054085731506, 0.04004834219813347, 0.008869700133800507, 0.018215229734778404, 0.028465503826737404, -0.04804651811718941, -0.009694579057395458, -0.04776204004883766, -0.03246612101793289, 0.03935091942548752, 0.017018349841237068, -0.0006537634180858731, 0.048697151243686676, -0.07497815042734146, 0.026401227340102196, 0.012009071186184883, -0.02400360070168972, -0.0267009474337101, -0.052852824330329895, -0.002632470801472664, -0.05898990482091904, 0.038225479423999786, -0.019105006009340286, -0.02960391901433468, 0.04044245555996895, 0.05655411630868912, -0.01387233380228281, 0.05622556805610657, -0.007300569210201502, 0.009367144666612148, 0.019628768786787987, 0.014153940603137016, 0.013231140561401844, 0.026520900428295135, -0.013356514275074005, 0.03348983824253082, -0.016745738685131073, 0.007177692838013172, -0.02518262341618538, 0.01587923988699913, 0.0003470181836746633, 0.020430445671081543, 0.013706988655030727, 0.018778586760163307, -0.021393802016973495, -0.005861684679985046, 0.009962481446564198, 0.07402673363685608, -0.026280801743268967, 0.009370015934109688, -0.008227955549955368, 0.0012245052494108677, 0.06399603933095932, 0.014121768064796925, -0.004976889584213495, -0.01653832197189331, 0.01672513596713543, 0.025619901716709137, 0.026812421157956123, 0.02512858249247074, 0.008110200054943562, -0.024198457598686218, 0.01100270263850689, -0.02336576022207737, 0.0014379285275936127, -0.023221241310238838, -0.007173946127295494, -0.003674859181046486, 0.045528020709753036, -0.014416531659662724, -0.0036021785344928503, -0.02725442312657833, -0.04013173654675484, 7.172020172785006e-33, -0.0024247020483016968, -0.021947694942355156, 0.009885349310934544, 0.009716027416288853, 0.003083441872149706, -0.020284775644540787, 0.00979984924197197, -0.009890335611999035, -0.02146132104098797, 0.028175508603453636, 0.00638057105243206, 0.006066693924367428, -0.00027517706621438265, 0.041719745844602585, 0.08618853986263275, -0.046449195593595505, 0.018743110820651054, 0.043481938540935516, -0.009041480720043182, 0.018248889595270157, 0.03295665234327316, -0.03345497325062752, 0.04749760031700134, 0.01528915110975504, 0.021729938685894012, 0.0352805033326149, -0.02069409377872944, -0.02278241701424122, 0.02525162138044834, -0.020853275433182716, 0.015655595809221268, 0.025760024785995483, -0.006821152288466692, -0.013237646780908108, -0.019348012283444405, 0.057961512356996536, 0.01818450167775154, 0.006079209968447685, 0.018681233748793602, 0.006197581999003887, -0.004329021088778973, 0.008038965985178947, 0.019176969304680824, 0.020779462531208992, 0.02055204100906849, -0.06575724482536316, -0.013423042371869087, 0.015506506897509098, -0.013159414753317833, -0.012230556458234787, -0.005555456504225731, -0.024166207760572433, -0.008036923594772816, -0.003526032203808427, 0.006012695375829935, -0.03774729743599892, -0.03886621445417404, 0.033934418112039566, -0.018290936946868896, -0.007311233319342136, -0.021757934242486954, -0.019407153129577637, -0.04800379276275635, 0.021045437082648277, -0.05615535378456116, -0.0377609021961689, 0.007415327243506908, -0.022210609167814255, 0.012163561768829823, -0.002391632879152894, 0.02292311191558838, -0.02165258303284645, 0.013493536040186882, 0.020831434056162834, -0.013547683134675026, 0.013960684649646282, -0.035938993096351624, 0.005368150770664215, -0.0066267563961446285, 0.029113372787833214, 0.01800292730331421, 0.029255056753754616, 0.013967259787023067, 0.013768435455858707, 0.015320015139877796, 0.0023098858073353767, -0.024037405848503113, 0.012116800993680954, 0.027186281979084015, -0.018198169767856598, 0.0006507972138933837, -0.007778179831802845, -0.02679307572543621, 0.05565820634365082, 0.03612303361296654, -1.2769662660616632e-8, 0.020421024411916733, -0.017777293920516968, -0.03579532355070114, -0.020962893962860107, 0.08444254845380783, 0.022765079513192177, -0.025793887674808502, -0.05572284758090973, -0.008111550472676754, 0.017569903284311295, 0.03622535988688469, -0.03133990988135338, -0.007748458534479141, -0.011154190637171268, 0.018942002207040787, -0.027213720604777336, 0.04627718776464462, -0.01551781501621008, 0.02208629809319973, 0.016346273943781853, -0.008024672046303749, 0.008761636912822723, -0.022240472957491875, -0.013913420028984547, 0.006064988672733307, -0.04275394231081009, 0.054835859686136246, -0.08090578019618988, 0.0333692766726017, -0.03180311992764473, 0.05050281807780266, -0.010392964817583561, -0.012422893196344376, 0.02667807973921299, -0.0002772581938188523, -0.06760150194168091, 0.0319332480430603, 0.027692852541804314, -0.003994993399828672, 0.021832197904586792, -0.036990370601415634, 0.011863598600029945, -0.03103712387382984, -0.016224481165409088, -0.024728218093514442, -0.050588466227054596, -0.00034824901376850903, -0.02121667005121708, 0.0037458157166838646, -0.0440480001270771, 0.018318787217140198, -0.012686851434409618, 0.0034545441158115864, 0.015047923661768436, 0.031386636197566986, 0.016403265297412872, -0.02805389277637005, -0.02254009060561657, -0.022101990878582, 0.0054955375380814075, -0.008094625547528267, -0.0007388130179606378, 0.0029429167043417692, -0.020871538668870926 ]
r-non-numeric-argument-to-binary-operator
https://markhneedham.com/blog/2015/04/19/r-non-numeric-argument-to-binary-operator
false
2015-04-21 05:59:24
R: Numeric keys in the nested list/dictionary
[ "r-2" ]
[ "R" ]
Last week I described how I've been http://www.markhneedham.com/blog/2015/04/16/r-think-bayes-more-posterior-probability-calculations/[creating fake dictionaries in R using lists] and I found myself using the same structure while solving the http://www.greenteapress.com/thinkbayes/dice.py[dice problem] in http://www.greenteapress.com/thinkbayes/[Think Bayes]. The dice problem is described as follows: ____ Suppose I have a box of dice that contains a 4-sided die, a 6-sided die, an 8-sided die, a 12-sided die, and a 20-sided die. If you have ever played Dungeons & Dragons, you know what I am talking about. Suppose I select a die from the box at random, roll it, and get a 6. What is the probability that I rolled each die? ____ Here's a simple example of the nested list that I started with: [source,r] ---- dice = c(4,6,8,12,20) priors = rep(1.0 / length(dice), length(dice)) names(priors) = dice > priors 4 6 8 12 20 0.2 0.2 0.2 0.2 0.2 ---- I wanted to retrieve the prior for the 8 dice which I tried to do like this: [source,r] ---- > priors[8] <NA> NA ---- That comes back with 'NA' because we're actually looking for the numeric index 8 rather than the item in that column. As far as I understand if we want to look up values by name we have to use a string so I tweaked the code to store names as strings: [source,r] ---- dice = c(4,6,8,12,20) priors = rep(1.0 / length(dice), length(dice)) names(priors) = sapply(dice, paste) > priors["8"] 8 0.2 ---- That works much better but with some experimentation I realised I didn't even need to run 'dice' through the https://stat.ethz.ch/R-manual/R-devel/library/base/html/lapply.html[+++<cite>+++sapply+++</cite>+++] function, it already works the way it was: [source,r] ---- dice = c(4,6,8,12,20) priors = rep(1.0 / length(dice), length(dice)) names(priors) = dice > priors["8"] 8 0.2 ---- Now that we've got that working we can write a likelihood function which takes in observed dice rolls and tells us how likely it was that we rolled each type of dice. We start simple by copying the above code into a function: [source,r] ---- likelihoods = function(names, observations) { scores = rep(1.0 / length(names), length(names)) names(scores) = names return(scores) } dice = c(4,6,8,12,20) l1 = likelihoods(dice, c(6)) > l1 4 6 8 12 20 0.2 0.2 0.2 0.2 0.2 ---- Next we'll update the score for a particular dice to 0 if one of the observed rolls is greater than the dice's maximum score: [source,r] ---- likelihoods = function(names, observations) { scores = rep(1.0 / length(names), length(names)) names(scores) = names for(name in names) { for(observation in observations) { if(name < observation) { scores[paste(name)] = 0 } } } return(scores) } dice = c(4,6,8,12,20) l1 = likelihoods(dice, c(6)) > l1 4 6 8 12 20 0.0 0.2 0.2 0.2 0.2 ---- The 4 dice has been ruled out since we've rolled a 6! Now let's put in the else condition which updates our score by the probability that we got the observed roll with each of valid dice. i.e. we have a 1/20 chance of rolling any number with the 20 side dice, a 1/8 chance with the 8 sided dice etc. [source,r] ---- likelihoods = function(names, observations) { scores = rep(1.0 / length(names), length(names)) names(scores) = names for(name in names) { for(observation in observations) { if(name < observation) { scores[paste(name)] = 0 } else { scores[paste(name)] = scores[paste(name)] * (1.0 / name) } } } return(scores) } dice = c(4,6,8,12,20) l1 = likelihoods(dice, c(6)) > l1 4 6 8 12 20 0.00000000 0.03333333 0.02500000 0.01666667 0.01000000 ---- And finally let's normalise those scores so they're a bit more readable: [source,r] ---- > l1 / sum(l1) 4 6 8 12 20 0.0000000 0.3921569 0.2941176 0.1960784 0.1176471 ----
null
null
[ -0.00010983486572513357, 0.035169344395399094, -0.019661983475089073, 0.0543447807431221, 0.06548350304365158, 0.05206650495529175, -0.0005651916726492345, -0.011653999797999859, -0.008967489935457706, -0.024502605199813843, 0.002528680255636573, 0.025702081620693207, -0.03630431741476059, 0.007060733623802662, -0.02628341130912304, 0.08488442003726959, 0.04880132898688316, -0.0209885835647583, 0.002171978820115328, 0.01906350441277027, 0.029448965564370155, 0.03909912332892418, -0.014684715308248997, 0.035301484167575836, 0.04818127676844597, 0.019558722153306007, 0.03632914647459984, 0.02254154533147812, -0.02633373811841011, -0.01579287461936474, 0.04654940962791443, 0.03890831395983696, 0.005604950711131096, -0.027542831376194954, 0.02747935615479946, -0.014695209451019764, -0.03978654369711876, 0.006202389486134052, -0.02269681729376316, 0.028858276084065437, -0.07135798782110214, 0.027304455637931824, -0.01420182827860117, -0.0009013375965878367, -0.016557950526475906, -0.01701096072793007, -0.02879340574145317, 0.021851200610399246, -0.017468752339482307, 0.018743038177490234, -0.05793044716119766, 0.03659236803650856, -0.04983479157090187, -0.007871638983488083, -0.009355729445815086, 0.0398249588906765, 0.03163768723607063, -0.071084164083004, 0.012845806777477264, -0.040937718003988266, 0.007840546779334545, 0.0067934561520814896, -0.00488869147375226, 0.024260086938738823, 0.009266299195587635, -0.007980023510754108, 0.0039195045828819275, 0.061788544058799744, -0.032444342970848083, -0.003264729166403413, -0.05712316930294037, -0.015937596559524536, 0.0028635156340897083, -0.009475914761424065, -0.025069085881114006, -0.04184778407216072, 0.025099609047174454, 0.04763943329453468, 0.03204527497291565, 0.0062009249813854694, -0.005922528449445963, -0.03860284388065338, 0.019230209290981293, 0.016042493283748627, -0.002229540143162012, -0.02849537879228592, -0.032008931040763855, -0.026446998119354248, -0.06157609447836876, 0.0536351203918457, 0.0014041244285181165, -0.06553463637828827, 0.03830534592270851, 0.030349668115377426, -0.05387893319129944, -0.005117170047014952, 0.006654857192188501, -0.003337741829454899, 0.0026148457545787096, -0.005560793448239565, -0.07515126466751099, -0.024936014786362648, 0.06932015717029572, -0.00298715359531343, -0.08062426000833511, 0.017161356285214424, 0.002147455932572484, -0.017166834324598312, -0.00856406707316637, 0.026580657809972763, -0.036151155829429626, 0.0243445485830307, -0.011712360195815563, 0.0013838396407663822, -0.07429230213165283, 0.05989399179816246, 0.030217966064810753, 0.004081957507878542, -0.001852609682828188, -0.013650612905621529, 0.05189549922943115, 0.019822919741272926, -0.011930187232792377, 0.06581740826368332, 0.03242427110671997, 0.03846513852477074, 0.006110731977969408, 0.055509280413389206, 0.005724812857806683, -0.0804031640291214, 0.011151795275509357, 0.054144348949193954, -0.05100115388631821, 0.006047065369784832, -0.006705232430249453, -0.01794425956904888, -0.019152868539094925, 0.00839952565729618, 0.06337781995534897, 0.03258104994893074, 0.025320541113615036, -0.03972724825143814, 0.021317999809980392, 0.020944561809301376, 0.032099489122629166, 0.006671197712421417, -0.012233057990670204, -0.006823697127401829, -0.06427762657403946, 0.015461822971701622, 0.005957180168479681, -0.015352717600762844, 0.07357104867696762, -0.02877393737435341, 0.020607048645615578, 0.0526990070939064, 0.011294018477201462, 0.02091045305132866, -0.012148481793701649, 0.005546677857637405, 0.03836407884955406, 0.0297571811825037, 0.017142225056886673, 0.06462077051401138, 0.007295338436961174, -0.04830315709114075, 0.029595403000712395, 0.06609563529491425, -0.0533456951379776, -0.004647745750844479, -0.06478062272071838, -0.06332613527774811, 0.06098596751689911, -0.0505424439907074, -0.006392468232661486, 0.03332773968577385, 0.0713910162448883, 0.026452193036675453, 0.03936624526977539, -0.0033873100765049458, -0.0725519061088562, 0.011903037317097187, 0.005263960920274258, 0.022246917709708214, 0.006144802086055279, -0.052512314170598984, 0.07357596606016159, -0.0038259539287537336, 0.03793606162071228, 0.06818235665559769, -0.073312908411026, -0.04717479646205902, -0.0031961945351213217, -0.002629804890602827, 0.061615921556949615, -0.03752755746245384, -0.002007868606597185, 0.08897583186626434, 0.023392613977193832, 0.014363819733262062, -0.003139973385259509, 0.029513830319046974, 0.022883152589201927, -0.022211657837033272, -0.02574746683239937, 0.0370183102786541, 0.028762908652424812, -0.007124612107872963, 0.012941315770149231, 0.018077583983540535, 0.0026193237863481045, 0.003923966083675623, 0.0037998086772859097, -0.042597655206918716, 0.046933356672525406, 0.03253396973013878, 0.05945560708642006, 0.02897871658205986, 0.03853876516222954, -0.04919816553592682, -0.0008484101854264736, 0.043669700622558594, 0.008789276704192162, -0.045776158571243286, 0.021264929324388504, 0.13662095367908478, 0.06311501562595367, -0.03605610132217407, -0.07325700670480728, 0.02349015139043331, -0.03287661448121071, -0.015584448352456093, 0.022084033116698265, 0.0151829207316041, -0.009599610231816769, -0.0004551128076855093, -0.06205504387617111, -0.03845686838030815, 0.028111111372709274, -0.037296172231435776, 0.0018348892917856574, 0.05498981848359108, -0.023098735138773918, 0.038792531937360764, -0.005111902020871639, -0.006328146439045668, -0.028196310624480247, -0.04756941273808479, -0.061124835163354874, -0.011666012927889824, 0.010190669447183609, -0.01936626061797142, 0.06353939324617386, 0.010318247601389885, 0.0020954555366188288, -0.016541259363293648, -0.02590269222855568, 0.03160737454891205, 0.07442586869001389, 0.05249926820397377, -0.054518409073352814, 0.06910426169633865, 0.020176926627755165, -0.00029841906507499516, -0.02937670797109604, -0.056551333516836166, -0.06425739079713821, -0.04340442642569542, -0.0021461169235408306, 0.0435846671462059, 0.028206251561641693, 0.0072372364811599255, 0.0003728862211573869, -0.008121694438159466, -0.0036006879527121782, -0.04069177433848381, 0.03926322981715202, 0.01171200256794691, -0.02237231284379959, -0.03440340608358383, 0.008348326198756695, 0.06307422369718552, -0.001533979782834649, -0.03495216369628906, 0.010622628964483738, -0.045683540403842926, 0.05387117713689804, -0.044899363070726395, -0.0386359728872776, 0.030502134934067726, 0.011313003487884998, 0.05097588151693344, 0.003378004999831319, 0.01513747964054346, 0.07763135433197021, 0.005276416428387165, 0.03267868235707283, 0.008000638335943222, 0.0016413101693615317, 0.03467399626970291, 0.01044390443712473, 0.025304200127720833, 0.0373096764087677, -0.001289880252443254, 0.010790382511913776, -0.03449992835521698, 0.013154622167348862, 0.0002379995712544769, -0.2537202537059784, 0.007209263741970062, -0.005172410514205694, -0.02874707244336605, 0.028028765693306923, -0.017873674631118774, 0.023599402979016304, -0.027485160157084465, -0.019232429563999176, 0.006785717327147722, 0.006997465156018734, -0.04417651519179344, -0.0355275496840477, 0.041863713413476944, 0.041946422308683395, 0.04034546762704849, 0.010635340586304665, -0.02414688840508461, -0.002204964403063059, 0.0659109354019165, 0.0188974030315876, -0.04306782782077789, -0.018089545890688896, 0.052560653537511826, 0.022959401831030846, 0.0609346479177475, -0.04099804908037186, 0.018044639378786087, -0.08326328545808792, -0.02474305033683777, 0.009548193775117397, -0.013729420490562916, 0.032378025352954865, -0.018948828801512718, 0.006761791650205851, -0.029188524931669235, 0.020789677277207375, 0.010935472324490547, -0.011215275153517723, 0.04427359625697136, -0.018801331520080566, -0.015698904171586037, 0.039470773190259933, -0.006340022198855877, 0.07710020989179611, 0.010915524326264858, -0.0575563907623291, 0.031163401901721954, -0.042968738824129105, 0.0469638966023922, -0.005931216757744551, -0.016706103459000587, -0.013477921485900879, 0.012776645831763744, -0.017434393987059593, 0.011250447481870651, -0.015347923152148724, 0.0003258222423028201, -0.055030494928359985, -0.03614557534456253, 0.008130297996103764, -0.02958941087126732, -0.018476687371730804, -0.02322308160364628, 0.014317995868623257, -0.0907583013176918, -0.07329032570123672, 0.004117588512599468, 0.06383001804351807, 0.06021784991025925, -0.030550561845302582, -0.023286815732717514, -0.02083709090948105, -0.11280739307403564, 0.004376680590212345, -0.0005242785555310547, -0.018630588427186012, -0.004819120746105909, 0.023601340129971504, 0.044100407510995865, -0.0396944023668766, -0.05135892331600189, 0.016814282163977623, -0.003878530114889145, 0.014579963870346546, 0.011669328436255455, 0.0156436525285244, 0.003966139629483223, -0.025477401912212372, 0.0031575248576700687, 0.07516185939311981, 0.019609689712524414, 0.000564395566470921, 0.017535274848341942, -0.016019467264413834, 0.04430491477251053, 0.0043594324961304665, -0.016482863575220108, 0.03743753954768181, 0.04123219847679138, 0.030342508107423782, -0.06107800453901291, -0.0015648150583729148, -0.07951676100492477, -0.06312276422977448, -0.00461245235055685, -0.03460267558693886, 0.013146927580237389, 0.031362615525722504, -0.010843595489859581, -0.0043054139241576195, -0.017067905515432358, 0.0363302044570446, -0.061796415597200394, 0.006162261124700308, -0.04134216159582138, 0.04733855649828911, 0.04051262512803078, -0.015241600573062897, -0.03589706867933273, -0.06431640684604645, 0.02333746664226055, -0.031218765303492546, -0.032460153102874756, -0.026705950498580933, -0.04227530583739281, 0.0035344636999070644, -0.03006715327501297, 0.0045060631819069386, -0.0021146340295672417, -0.011213312856853008, 0.009811324998736382, 0.05256933718919754, -0.015346617437899113, 0.04823274910449982, -0.013518376275897026, -0.04045261815190315, -0.014755402691662312, -0.03610291704535484, -0.0011231356766074896, 0.005947771016508341, -0.024353815242648125, 0.007544387597590685, 0.02394852414727211, 0.03926532715559006, -0.016828741878271103, 0.049775607883930206, 0.01726098358631134, 0.009290400892496109, 0.006486154161393642, -0.02204984240233898, -0.006856146268546581, 0.021871674805879593, -0.033731307834386826, -0.037698131054639816, -0.010735616087913513, 0.03797104209661484, -0.012348692864179611, -0.005836267489939928, -0.06150832399725914, 0.022489694878458977, -0.03826785832643509, -0.0544198639690876, -0.015919459983706474, 0.000995736918412149, 0.05757701396942139, -0.03098602034151554, -0.004165299236774445, 0.007531082723289728, 0.011298835277557373, 0.03196306899189949, -0.009587561711668968, -0.01438069250434637, 0.015136737376451492, -0.026941565796732903, -0.003915600944310427, 0.017305763438344002, -0.028659453615546227, 0.0033748766873031855, -0.024038882926106453, -0.005611012689769268, -0.014459386467933655, -0.011447465978562832, -0.010390705429017544, 0.043706245720386505, 0.03137091547250748, -0.012663967907428741, 0.003998537082225084, -0.05848488584160805, -0.048605483025312424, -0.0653734803199768, -0.035128701478242874, -0.005031159147620201, 0.027259767055511475, -0.04741312935948372, -0.04569530114531517, 0.0046598659828305244, -0.014264923520386219, -0.007729024160653353, 0.023488592356443405, 0.02270817570388317, -0.03187035396695137, -0.00827073398977518, 0.02692854218184948, 0.059260137379169464, -0.05449637025594711, 0.00909059401601553, 0.0038708020001649857, 0.005746679846197367, 0.015317985787987709, -0.00563083216547966, -0.045010969042778015, 0.0009505478665232658, -0.047524094581604004, 0.0028020041063427925, -0.015728533267974854, -0.040013935416936874, -0.0423627607524395, -0.01606082357466221, -0.006416249088943005, 0.0191415473818779, -0.030535589903593063, -0.0063070133328437805, -0.008884203620254993, -0.01949871890246868, 0.01797184906899929, -0.03484600409865379, -0.05896090343594551, 0.05217306315898895, -0.030751800164580345, -0.0004542388778645545, -0.007614483125507832, -0.0057458835653960705, 0.01915528066456318, -0.03770621865987778, 0.002404163358733058, -0.05141850933432579, 0.02488585188984871, 0.012616822496056557, 0.03339309245347977, 0.004911500029265881, 0.009023427963256836, -0.0356978178024292, 0.025300337001681328, -0.02336679771542549, 0.0019900829065591097, -0.015320970676839352, -0.03214658796787262, 0.047978658229112625, 0.041582778096199036, -0.007421313319355249, -0.010852809995412827, -0.01695527322590351, -0.01057329960167408, 0.05340481176972389, -0.019214041531085968, -0.02484455145895481, -0.020786073058843613, -0.054725974798202515, 0.030614066869020462, 0.0011279531754553318, 0.00688232621178031, -0.033672869205474854, 0.02673541195690632, 0.03425857797265053, 0.014800168573856354, 0.08243945240974426, -0.006055797450244427, 0.008970786817371845, -0.018099213019013405, 0.001375435502268374, -0.07596567273139954, -0.0070175607688724995, 0.03574100881814957, -0.02712894417345524, -0.013744446448981762, -0.008781904354691505, -0.04833163321018219, 0.029976217076182365, -0.05963004380464554, -0.04114716500043869, 0.03398384153842926, -0.001129128155298531, -0.0000818847183836624, 0.01168165635317564, -0.05104960501194, -0.013787772506475449, 0.03435951843857765, -0.04802657291293144, -0.014392171055078506, -0.013438102789223194, 0.07281795889139175, -0.00809383112937212, 0.031900204718112946, 0.010802587494254112, -0.014382741414010525, 0.04085979238152504, 0.03890478238463402, 0.05150610953569412, 0.06551063805818558, -0.03568483516573906, 0.03449016436934471, 0.024625146761536598, 0.004777677822858095, 0.0013954552123323083, 0.001435654703527689, 0.01008439902216196, -0.06982562690973282, 0.009574276395142078, 0.02341982163488865, -0.028084279969334602, -0.05455803871154785, 0.07421853393316269, -0.0002938630641438067, -0.02894463948905468, -0.046317439526319504, 0.008848881348967552, -0.04895535856485367, -0.006244736257940531, 0.002862799447029829, -0.02821507304906845, -0.01299072802066803, 0.06751652806997299, -0.024385418742895126, 0.00036650896072387695, 0.057857271283864975, -0.03380485251545906, -0.023669686168432236, 0.007676455657929182, 0.060416724532842636, 0.08828052878379822, 0.0521891750395298, 0.01958627626299858, 0.07564350962638855, -0.03292363882064819, -0.0381891131401062, 0.021386217325925827, -0.06661386042833328, -0.012855899520218372, -0.04815870523452759, 0.015061498619616032, 0.04080229997634888, -0.023713400587439537, 0.03936140611767769, -0.03886665776371956, -0.007379462942481041, 0.028188733384013176, 0.014606568031013012, 0.006274225655943155, 0.05283266678452492, -0.002397652482613921, 0.015002995729446411, -0.011962850578129292, -0.046274807304143906, 0.025206932798027992, -0.03154858946800232, -0.03613680601119995, 0.02405371516942978, -0.015875443816184998, 0.008779611438512802, 0.019517457112669945, 0.013214384205639362, 0.0745452344417572, -0.026711566373705864, -0.017908964306116104, 0.0025926220696419477, 0.026954516768455505, 0.00028994277818128467, 0.009909872896969318, 0.0073071192018687725, -0.016677044332027435, 0.00016864098142832518, -0.029432211071252823, -0.01133731473237276, -0.05452658608555794, -0.018324432894587517, 0.014001583680510521, -0.04793993756175041, 0.003073359839618206, 0.03223782032728195, -0.026137154549360275, -0.053431566804647446, -0.06390645354986191, -0.033041439950466156, -0.02426094561815262, -0.10907799750566483, -0.0038556235376745462, 0.044964466243982315, -0.016930533573031425, -0.024924416095018387, -0.022484008222818375, -0.004092208109796047, -0.0021677042823284864, 0.019383948296308517, -0.030238425359129906, -0.018847240135073662, 0.02395051345229149, 0.0057666366919875145, 0.028560278937220573, 0.041107308119535446, 0.027493903413414955, 0.00448586605489254, -0.011467251926660538, -0.01927831396460533, 0.003933200612664223, 0.049977123737335205, 0.04087139293551445, 0.003609652165323496, -0.05958080291748047, 0.025326376780867577, -0.0041525219567120075, -0.026777099817991257, -0.07704062759876251, 0.0164185781031847, 0.005286925006657839, 0.007784481160342693, 0.05401056632399559, 0.002750005107372999, 0.025474771857261658, -0.0432150661945343, -0.027221955358982086, 0.016947032883763313, 0.011422071605920792, 0.04303246736526489, -0.04585647955536842, 0.05499466136097908, 0.019856305792927742, -0.005971664097160101, -0.06483551859855652, -0.003408018732443452, -0.0034194360487163067, -0.017231320962309837, -0.039023615419864655, -0.02036481723189354, -0.033257268369197845, -0.09650441259145737, -0.003512487281113863, 0.013847863301634789, -0.05308837443590164, -0.021527687087655067, 0.0275567676872015, 0.0241662859916687, -0.02478223666548729, 0.05348233878612518, -0.03296363726258278, 0.049017418175935745, -0.03055570274591446, -0.03237225487828255, 0.00034891272662207484, 0.054326131939888, -0.00331122986972332, 0.01262002345174551, 0.019005320966243744, -0.05478738248348236, -0.01218223012983799, -0.00968193169683218, -0.00034849325311370194, 0.05071934685111046, 0.007434287574142218, -0.0026810963172465563 ]
[ -0.0980614721775055, -0.016382230445742607, 0.0010161125101149082, -0.041718725115060806, 0.05030903220176697, 0.005194915924221277, 0.04554041475057602, 0.02220708504319191, 0.08268244564533234, -0.018894147127866745, 0.007053765468299389, -0.038242220878601074, 0.014084544032812119, -0.011380143463611603, 0.054323602467775345, -0.0052454243414103985, -0.04791330173611641, -0.05017358437180519, -0.021566756069660187, 0.01639988087117672, -0.0012465514009818435, -0.03482036665081978, -0.03895404934883118, -0.018542498350143433, 0.030297623947262764, 0.027974657714366913, 0.011852019466459751, -0.036443278193473816, -0.019207077100872993, -0.25226709246635437, 0.00878248829394579, -0.016372723504900932, -0.004294551443308592, -0.028895510360598564, -0.029691005125641823, 0.03941129520535469, 0.012611531652510166, 0.060039110481739044, 0.023683510720729828, 0.026701578870415688, 0.003059437032788992, 0.02474881522357464, -0.03600247576832771, 0.010057111270725727, 0.027716178447008133, 0.013236465863883495, -0.002854634076356888, -0.014708142727613449, 0.019764212891459465, 0.009842075407505035, -0.027237487956881523, -0.0018055250402539968, -0.03515029698610306, -0.02354770340025425, 0.00237893033772707, 0.001835493603721261, 0.018509410321712494, 0.05534068122506142, 0.024615777656435966, 0.03419406712055206, 0.010519303381443024, 0.00028053237474523485, -0.13872194290161133, 0.10948912054300308, -0.021528257057070732, 0.02999694272875786, -0.02154848352074623, -0.013520992361009121, -0.015204041264951229, 0.09467477351427078, 0.0009038546704687178, -0.006566095631569624, -0.00443620840087533, 0.08253727108240128, 0.004306168295443058, -0.034800104796886444, 0.01058360654860735, -0.007482761982828379, 0.04492413252592087, -0.02349158748984337, -0.03648209571838379, 0.03933624550700188, 0.007025342434644699, -0.02225387468934059, -0.03975006565451622, 0.002211563754826784, 0.00005781744766863994, 0.027981940656900406, 0.03751412779092789, 0.02360190451145172, 0.02134096622467041, 0.039560578763484955, 0.0227001141756773, 0.000059099831560160965, -0.07550735026597977, 0.005916981026530266, 0.027321476489305496, 0.01588619127869606, -0.013154501095414162, 0.3969121277332306, -0.03089793212711811, -0.01208287850022316, 0.022354789078235626, 0.05688091367483139, -0.01898922771215439, -0.023416657000780106, -0.03945564478635788, -0.07407024502754211, -0.004083964973688126, -0.025937575846910477, -0.009302182123064995, -0.026103468611836433, 0.08115977793931961, -0.009052189067006111, -0.019710713997483253, -0.0032444605603814125, 0.04587933421134949, -0.020426463335752487, 0.01223063562065363, -0.0028521032072603703, -0.029593484476208687, -0.007459475193172693, 0.03865189477801323, -0.0040220944210886955, 0.014362058602273464, 0.02205449901521206, 0.009128652513027191, 0.09743773192167282, 0.030288750305771828, -0.0038065528497099876, 0.058107972145080566, -0.06661204993724823, -0.076568104326725, 0.001117896637879312, 0.013534815050661564, 0.006912071257829666, 0.046015795320272446, -0.01006369013339281, 0.02331487089395523, -0.014433884993195534, -0.03254111111164093, -0.026883795857429504, 0.03007972240447998, -0.004047977272421122, -0.07208853214979172, 0.08605991303920746, -0.0005441189277917147, -0.027631938457489014, -0.038234759122133255, -0.04546334967017174, 0.006774557288736105, 0.006558548659086227, 0.028575990349054337, -0.07118647545576096, -0.022930147126317024, 0.03863300383090973, 0.07910627871751785, -0.017614830285310745, -0.05616707727313042, -0.030010748654603958, -0.019153404980897903, -0.011874242685735226, -0.027095329016447067, 0.06901659816503525, 0.008388658054172993, -0.06581618636846542, -0.016406841576099396, 0.004421270918101072, 0.043907374143600464, -0.08357922732830048, 0.02464495413005352, 0.011448442935943604, -0.03336954116821289, 0.0015972703695297241, 0.062432821840047836, 0.0024962960742413998, -0.031245170161128044, -0.04444866627454758, 0.09094487130641937, 0.013452173210680485, 0.020390048623085022, 0.0025761108845472336, -0.04369385913014412, -0.023171797394752502, -0.03373183682560921, -0.07369634509086609, -0.06307816505432129, 0.0029933000914752483, -0.021872863173484802, -0.020527884364128113, 0.013335959985852242, -0.08439292013645172, -0.06209724023938179, 0.06723154336214066, -0.03166039288043976, -0.029980042949318886, 0.035611528903245926, -0.005413775332272053, 0.0003747784940060228, -0.03843382000923157, 0.0012739090016111732, -0.01558383647352457, -0.014096024446189404, 0.013167981058359146, -0.03195108100771904, 0.03145657479763031, 0.07047620415687561, -0.06622054427862167, 0.07676251977682114, 0.010824624449014664, -0.020276987925171852, -0.014181762933731079, -0.02835468202829361, 0.00763385696336627, -0.03182727470993996, 0.009667732752859592, -0.00041153098572976887, -0.015624729916453362, 0.00784220639616251, 0.03697814792394638, 0.02399432845413685, -0.0645834356546402, 0.002462552161887288, -0.34799888730049133, -0.053894173353910446, -0.02420872263610363, -0.01279358845204115, 0.031760670244693756, -0.02492786943912506, -0.0148977842181921, 0.014355466701090336, 0.004739695228636265, 0.032795391976833344, 0.028788795694708824, -0.008089444600045681, -0.008853200823068619, -0.10570119321346283, -0.00660610431805253, 0.03652550280094147, -0.05441710352897644, -0.049877967685461044, -0.05015984922647476, 0.052606675773859024, -0.02661413885653019, -0.033172570168972015, -0.029639756307005882, -0.054792359471321106, 0.014407902956008911, 0.028232162818312645, 0.12923859059810638, 0.009623668156564236, 0.030647262930870056, -0.015793107450008392, 0.015203921124339104, 0.016981476917862892, -0.01044817641377449, 0.00663523655384779, 0.016105979681015015, -0.033882513642311096, -0.022505618631839752, 0.02984475903213024, -0.015925858169794083, -0.01975233294069767, -0.04830632358789444, 0.026937434449791908, -0.038101449608802795, -0.023838112130761147, -0.08873574435710907, 0.0020739594474434853, -0.034119218587875366, 0.007004070561379194, 0.002195196459069848, 0.10073714703321457, 0.02047574706375599, 0.039331842213869095, 0.018350781872868538, -0.01614433526992798, 0.026678772643208504, -0.0402059331536293, -0.060745444148778915, -0.01474093273282051, -0.037477023899555206, 0.016296040266752243, 0.03437504917383194, 0.030786575749516487, 0.04354745149612427, -0.06694044917821884, -0.014600872062146664, -0.015457028523087502, 0.018373960629105568, -0.032397735863924026, 0.0343288853764534, -0.020462002605199814, -0.011332732625305653, 0.09106991440057755, 0.005473889410495758, 0.005097732413560152, 0.031092863529920578, 0.04706258699297905, -0.0037122871726751328, 0.013498523272573948, 0.009485832415521145, 0.03297307342290878, 0.030327290296554565, -0.010548141784965992, 0.03976837545633316, 0.0023812202271074057, 0.031175008043646812, 0.00974440947175026, -0.022485066205263138, 0.02278945781290531, 0.08330866694450378, 0.0068867565132677555, -0.014208704233169556, -0.010989518836140633, -0.015246146358549595, -0.002523512579500675, 0.029695574194192886, 0.005882247816771269, -0.25396648049354553, 0.043690428137779236, 0.07337471842765808, 0.05641409382224083, 0.0029460133519023657, 0.004525982309132814, 0.02840445563197136, -0.03146747127175331, 0.015109495259821415, -0.0006648064008913934, 0.021821849048137665, 0.04893084242939949, 0.00033402457484044135, -0.0036627594381570816, -0.020495537668466568, -0.04801495373249054, 0.022003192454576492, -0.05726564675569534, 0.02365194447338581, -0.011013947427272797, 0.053099337965250015, -0.011491053737699986, 0.20213676989078522, -0.009435662068426609, 0.019741762429475784, -0.005692231468856335, 0.01318943127989769, 0.00860433280467987, 0.021535184234380722, 0.006332339718937874, 0.008283182978630066, -0.004859332926571369, 0.030996721237897873, -0.004818708170205355, 0.041864022612571716, -0.015867875888943672, -0.054209884256124496, 0.0336928553879261, 0.029630202800035477, -0.019619431346654892, 0.01634480059146881, 0.007130151614546776, -0.041785985231399536, 0.05725124850869179, 0.11121582239866257, 0.04632030054926872, 0.034252557903528214, -0.046251628547906876, -0.04858119413256645, -0.01425762940198183, -0.026824016124010086, -0.009212271310389042, -0.008786234073340893, -0.04574809595942497, 0.024921255186200142, 0.023678531870245934, 0.06743431091308594, -0.02590779773890972, 0.03426006808876991, -0.004567678086459637, -0.009992633014917374, -0.05579614266753197, 0.14572475850582123, 0.015563174150884151, 0.024173660203814507 ]
[ 0.014899851754307747, 0.07516731321811676, -0.007252241484820843, -0.036802612245082855, -0.03673451021313667, -0.0039332169108092785, -0.013264276087284088, 0.03007841482758522, 0.020664531737565994, 0.02601926028728485, -0.01564668118953705, 0.018633797764778137, -0.0035234594251960516, -0.015941714867949486, 0.0033482888247817755, -0.016742633655667305, -0.0052260118536651134, -0.002853545593097806, 0.005442796275019646, -0.004730939399451017, -0.03788027912378311, 0.038698989897966385, 0.016834892332553864, -0.035090621560811996, 0.0013290484203025699, -0.02174082212150097, 0.01859123259782791, 0.020835446193814278, 0.013120065443217754, -0.12133088707923889, 0.0008075924124568701, -0.017559053376317024, -0.030718974769115448, 0.010520457290112972, 0.0004761260934174061, -0.02126217447221279, -0.055473994463682175, 0.0055819968692958355, 0.005205596797168255, 0.0279625803232193, 0.0014498881064355373, 0.0414225198328495, 0.014920918270945549, 0.04707474261522293, 0.01588813029229641, -0.028451766818761826, -0.038665179163217545, 0.0023060592357069254, 0.03555980697274208, -0.038248103111982346, -0.019434340298175812, -0.02452809177339077, -0.0014120491687208414, 0.024433577433228493, 0.02219875156879425, -0.03668104112148285, -0.05725830793380737, -0.024866983294487, 0.014293214306235313, -0.05803762748837471, -0.04190763831138611, 0.011585922911763191, -0.006056495476514101, -0.018903104588389397, -0.03632347285747528, 0.015569362789392471, 0.006303782109171152, 0.045927744358778, -0.010873250663280487, 0.01260894164443016, -0.004372508730739355, 0.03735831752419472, -0.01342826709151268, -0.027895012870430946, -0.0194815993309021, -0.03702252730727196, 0.0007057209732010961, -0.07452095299959183, -0.00739144254475832, 0.01398536842316389, -0.009991129860281944, 0.014863982796669006, 0.01975916512310505, -0.015238477848470211, 0.0008052316843532026, -0.0243917815387249, 0.011555460281670094, 0.007556553464382887, 0.02391704171895981, 0.003271956229582429, 0.017621079459786415, 0.01401468925178051, -0.005467030219733715, -0.01653803139925003, -0.13499578833580017, 0.04567103460431099, 0.012470533140003681, -0.04018638655543327, 0.00020698395383078605, 0.8159531354904175, 0.03034238889813423, -0.011791741475462914, -0.015665503218770027, 0.016300009563565254, 0.010853639803826809, 0.01883787102997303, -0.02939504198729992, 0.007726915180683136, 0.007233910728245974, -0.03212994709610939, -0.03877556324005127, 0.027349866926670074, 0.0008783258963376284, 0.024029936641454697, -0.030117850750684738, 0.05773331969976425, -0.005796364042907953, 0.038032978773117065, -0.02647288329899311, -0.0031291975174099207, 0.016568398103117943, 0.02987246960401535, 0.011175590567290783, -0.014353821985423565, 0.026211101561784744, -0.16937781870365143, 0.01728464663028717, -7.950229759124008e-33, 0.07702505588531494, -0.0625327005982399, 0.0015515980776399374, 0.022322969511151314, 0.04906808212399483, -0.03566533327102661, 0.010204384103417397, 0.03349409997463226, -0.0037500604521483183, -0.01116144098341465, -0.005747614428400993, 0.012404708191752434, -0.03159061446785927, -0.04153930023312569, 0.04417882114648819, 0.0023621474392712116, -0.025781499221920967, 0.038504354655742645, -0.01062428392469883, 0.009981277398765087, -0.039729151874780655, 0.007148080971091986, 0.009197925217449665, 0.0084576066583395, -0.017880456522107124, 0.05976644530892372, 0.01909281499683857, 0.0010536349145695567, -0.008221294730901718, -0.04097411409020424, -0.026003453880548477, 0.005784548819065094, -0.014389853924512863, -0.0103553906083107, 0.05256694555282593, -0.04213457927107811, -0.011252040974795818, 0.006092405412346125, -0.01718074642121792, -0.028901487588882446, -0.0008130717324092984, -0.006688204128295183, -0.027928853407502174, -0.0033532935194671154, -0.012769022956490517, -0.048003025352954865, 0.03324660658836365, -0.004876250401139259, 0.042424947023391724, 0.016959751024842262, 0.03778202086687088, 0.004477367270737886, 0.03969074413180351, 0.01928754150867462, 0.0021236275788396597, 0.02011808007955551, -0.008344237692654133, 0.003082112642005086, 0.015144766308367252, 0.02250966615974903, 0.017467817291617393, -0.0032730516977608204, -0.004685706924647093, 0.023921126499772072, -0.007890529930591583, 0.017376728355884552, -0.0357251800596714, -0.030007705092430115, 0.04271832853555679, -0.011360032483935356, -0.01821007765829563, 0.021823687478899956, -0.019984867423772812, -0.019931066781282425, 0.022614143788814545, 0.02349858544766903, 0.010388949885964394, -0.013888823799788952, 0.02436540089547634, 0.02958284132182598, 0.05801256373524666, 0.0019047022797167301, -0.057541973888874054, -0.023662542924284935, -0.0017466992139816284, 0.03409171104431152, 0.019586822018027306, 0.024548830464482307, -0.007062879391014576, -0.01332764606922865, 0.01952187716960907, -0.023780236020684242, -0.0033883489668369293, -0.023976963013410568, -0.01264218706637621, 7.058811250593189e-33, -0.03208068013191223, -0.0038718737196177244, 0.007263978943228722, -0.021071333438158035, 0.07593263685703278, -0.045921240001916885, 0.019226128235459328, 0.0007725780596956611, -0.011288660578429699, -0.002523593371734023, -0.01569625362753868, 0.02586943283677101, -0.009272987022995949, 0.03997522592544556, 0.08197587728500366, -0.03971412777900696, -0.007326905149966478, 0.02583613432943821, -0.013216454535722733, -0.02495439350605011, -0.017289599403738976, -0.009606655687093735, -0.019799813628196716, 0.022075487300753593, 0.030106736347079277, 0.02482675015926361, -0.009312940761446953, 0.0034047591034322977, 0.011541791260242462, 0.00014961007400415838, 0.06255326420068741, 0.02040145732462406, 0.013833734206855297, 0.038397416472435, -0.048411332070827484, 0.018288685008883476, 0.040962960571050644, -0.02372436225414276, -0.017371024936437607, -0.03337724506855011, 0.03920606151223183, -0.024945639073848724, -0.028322609141469002, 0.01748247630894184, -0.004780321381986141, -0.0033779817167669535, -0.02006101794540882, 0.019847193732857704, 0.03304111585021019, 0.019836409017443657, -0.007149147801101208, 0.04659159481525421, -0.04270533472299576, 0.015821417793631554, 0.008177490904927254, -0.005326015409082174, -0.08016389608383179, 0.0036628067027777433, 0.03403288125991821, 0.009297933429479599, -0.026213470846414566, -0.023435842245817184, -0.04115428775548935, 0.02368752285838127, -0.0008309694239869714, 0.03219129890203476, -0.023323193192481995, -0.024047723039984703, -0.04413712024688721, 0.024165388196706772, -0.027572736144065857, 0.0017480523092672229, -0.03484692424535751, -0.011898468248546124, 0.004725390113890171, -0.03663437440991402, -0.03615516051650047, -0.02147829532623291, 0.009881386533379555, 0.04539639130234718, 0.015240291133522987, -0.03797392547130585, -0.0035043407697230577, 0.0271794144064188, -0.019374381750822067, -0.022961124777793884, -0.0004606829024851322, -0.01885024644434452, 0.03872884437441826, -0.014709653332829475, -0.004408454056829214, -0.021953368559479713, -0.002833629259839654, 0.03711918741464615, -0.02365318313241005, -1.303342056502288e-8, -0.010755466297268867, -0.008350337855517864, -0.014530723914504051, 0.026469068601727486, 0.025299157947301865, 0.01820819079875946, -0.01922149956226349, -0.0017550187185406685, -0.005414541345089674, -0.018661634996533394, 0.03695610165596008, 0.0027004533912986517, -0.013943961821496487, -0.02705974504351616, 0.016823329031467438, -0.023256462067365646, -0.04534728080034256, 0.009057330898940563, 0.032095812261104584, 0.000998358242213726, 0.061514075845479965, 0.03374619409441948, -0.006044824607670307, -0.017298715189099312, -0.002794149098917842, -0.005650086794048548, 0.02839241363108158, -0.06426987051963806, -0.01753375306725502, -0.016999663785099983, 0.012039478868246078, -0.0055864653550088406, 0.005439469125121832, 0.046736154705286026, -0.03234456479549408, -0.046617019921541214, 0.04013339802622795, 0.025617826730012894, 0.015264017507433891, 0.009901459328830242, 0.0017248139483854175, -0.03026849403977394, -0.0539955236017704, -0.020017053931951523, -0.014735638163983822, 0.009894032031297684, -0.01392061822116375, 0.01394959818571806, 0.018083440139889717, -0.05576415732502937, -0.004785772878676653, -0.0110677070915699, -0.004585699178278446, -0.011786278337240219, 0.036685243248939514, -0.020048191770911217, 0.01433110237121582, -0.02208285592496395, -0.022923385724425316, -0.001733041601255536, 0.03135797753930092, -0.0040250513702631, 0.02121811918914318, -0.003357591573148966 ]
r-numeric-keys-in-the-nested-listdictionary
https://markhneedham.com/blog/2015/04/21/r-numeric-keys-in-the-nested-listdictionary
false
2015-04-07 20:59:49
Neo4j: The learning to cycle dependency graph
[ "neo4j" ]
[ "neo4j" ]
Over the past couple of weeks I've been reading about skill building and the break down of skills into more manageable chunks, and recently had a chance to break down the skills required to learn to cycle. I initially sketched out the skill progression but quickly realised I had drawn a dependency graph and thought that putting it into Neo4j would simplify things. I started out with the overall goal for cycling which was to 'Be able to cycle through a public park': [source,cypher] ---- MERGE (:Goal:Task {name: "Be able to cycle through a public park"}) ---- This goal is easy for someone who's already learnt to cycle but if we're starting from scratch it's a bit daunting so we need to break it down into a simpler skill that we can practice. The mini algorithm that we're going to employ for task breakdown is this: . Can we do the given task now? . Break the task down into something simpler and return to 1. One of the things to keep in mind is that we won't get the break down perfect the first time so we may need to change it. For a diagram drawn on a piece of paper this would be annoying but in Neo4j it's just a simpler refactoring. Going back to cycling. Since the goal isn't yet achievable we need to break that down into something a bit easier. Let's start with something really simple: [source,cypher] ---- MERGE (task:Task {name: "Take a few steps forward while standing over the bike"}) WITH task MATCH (goal:Goal:Task {name: "Be able to cycle through a public park"}) MERGE (goal)-[:DEPENDS_ON]->(task) ---- In the first line we create our new task and then we connect it to our goal which we created earlier. image::{{<siteurl>}}/uploads/2015/04/graph-9.png[Graph 9,300] After we've got the hang of walking with the bike we want to get comfortable with cycling forward a few rotations while sitting on the bike but to do that we need to be able to get the bike moving from a standing start. We might also have another step where we cycle forward while standing on the bike as that might be slightly easier. Let's update our graph: [source,cypher] ---- // First let's get rid of the relationship between our initial task and the goal MATCH (initialTask:Task {name: "Take a few steps forward while standing over the bike"}) MATCH (goal:Goal {name: "Be able to cycle through a public park"}) MATCH (goal)-[rel:DEPENDS_ON]->(initialTask) DELETE rel WITH initialTask, goal, ["Get bike moving from standing start", "Cycle forward while standing", "Cycle forward while sitting"] AS newTasks // Create some nodes for our new tasks UNWIND newTasks AS newTask MERGE (t:Task {name: newTask}) WITH initialTask, goal, COLLECT(t) AS newTasks WITH initialTask, goal, newTasks, newTasks[0] AS firstTask, newTasks[-1] AS lastTask // Connect the last task to the goal MERGE (goal)-[:DEPENDS_ON]->(lastTask) // And the first task to our initial task MERGE (firstTask)-[:DEPENDS_ON]->(initialTask) // And all the tasks to each other FOREACH(i in RANGE(0, length(newTasks) - 2) | FOREACH(t1 in [newTasks[i]] | FOREACH(t2 in [newTasks[i+1]] | MERGE (t2)-[:DEPENDS_ON]->(t1) ))) ---- image::{{<siteurl>}}/uploads/2015/04/graph-10.png[Graph 10,600] We don't strictly need to learn how to cycle while standing up - we could just go straight from getting the bike moving to cycling forward while sitting. Let's update the graph to reflect that: [source,cypher] ---- MATCH (sitting:Task {name: "Cycle forward while sitting"}) MATCH (moving:Task {name: "Get bike moving from standing start"}) MERGE (sitting)-[:DEPENDS_ON]->(moving) ---- image::{{<siteurl>}}/uploads/2015/04/graph-11.png[Graph 11,600] Once we've got the hang of those tasks let's add in a few more to get us closer to our goal: [source,cypher] ---- WITH [ {skill: "Controlled stop using brakes/feet", dependsOn: "Cycle forward while sitting"}, {skill: "Steer around stationary objects", dependsOn: "Controlled stop using brakes/feet"}, {skill: "Steer around people", dependsOn: "Steer around stationary objects"}, {skill: "Navigate a small circular circuit", dependsOn: "Steer around stationary objects"}, {skill: "Navigate a loop of a section of the park", dependsOn: "Navigate a small circular circuit"}, {skill: "Navigate a loop of a section of the park", dependsOn: "Steer around people"}, {skill: "Be able to cycle through a public park", dependsOn: "Navigate a loop of a section of the park"} ] AS newTasks FOREACH(newTask in newTasks | MERGE (t1:Task {name: newTask.skill}) MERGE (t2:Task {name: newTask.dependsOn}) MERGE (t1)-[:DEPENDS_ON]->(t2) ) ---- Finally let's get rid of the relationship from our goal to 'Cycle forward while sitting' since we've replaced that with some intermediate steps: [source,cypher] ---- MATCH (task:Task {name: "Cycle forward while sitting"}) WITH task MATCH (goal:Goal:Task {name: "Be able to cycle through a public park"}) MERGE (goal)-[rel:DEPENDS_ON]->(task) DELETE rel ---- And here's what the final dependency graph looks like: image::{{<siteurl>}}/uploads/2015/04/graph-13.png[Graph 13,600] Although I put this into Neo4j in order to visualise the dependencies we can now query the data as well. For example, let's say I know how to cycle forward while sitting on the bike. What steps are there between me and being able to cycle around a park? [source,cypher] ---- MATCH (t:Task {name: "Cycle forward while sitting"}), (g:Goal {name: "Be able to cycle through a public park"}), path = shortestpath((g)-[:DEPENDS_ON*]->(t)) RETURN path ---- image::{{<siteurl>}}/uploads/2015/04/graph-14.png[Graph 14,400] Or if we want a list of the tasks we need to do next we could restructure the query slightly: [source,cypher] ---- MATCH (t:Task {name: "Cycle forward while sitting"}), (g:Goal {name: "Be able to cycle through a public park"}), path = shortestpath((t)<-[:DEPENDS_ON*]->(g)) WITH [n in nodes(path) | n.name] AS tasks UNWIND tasks AS task RETURN task ==> +--------------------------------------------+ ==> | task | ==> +--------------------------------------------+ ==> | "Cycle forward while sitting" | ==> | "Controlled stop using brakes/feet" | ==> | "Steer around stationary objects" | ==> | "Steer around people" | ==> | "Navigate a loop of a section of the park" | ==> | "Be able to cycle through a public park" | ==> +--------------------------------------------+ ==> 6 rows ---- That's all for now but I think this is an interesting way of tracking how you'd learn a skill. I'm trying a similar approach for some statistics topics I'm learning about but I've found the order of tasks isn't so linear there - interestingly much more a graph than a tree.
null
null
[ 0.038684189319610596, -0.01914941892027855, -0.0022984882816672325, 0.02885853685438633, 0.09033288806676865, 0.005010067019611597, 0.03323909267783165, 0.026745662093162537, 0.012936857528984547, -0.023913031443953514, 0.013613129034638405, -0.008822238072752953, -0.05459201708436012, 0.019790304824709892, -0.02473246306180954, 0.05271289125084877, 0.08153675496578217, 0.017068248242139816, 0.001513126539066434, -0.007115265820175409, 0.019799169152975082, 0.05698775500059128, 0.029361587017774582, 0.048859380185604095, 0.05062558129429817, 0.012020772323012352, 0.021107010543346405, -0.0017744426149874926, -0.04776235669851303, -0.0044950335286557674, 0.04031744971871376, -0.005036140326410532, 0.023769022896885872, -0.015321457758545876, 0.04420539736747742, -0.01749473065137863, -0.042180318385362625, -0.010401838459074497, 0.006289157550781965, -0.024082820862531662, -0.05875098705291748, 0.05183623358607292, -0.03340919688344002, 0.00767875649034977, -0.03524646535515785, 0.03560983017086983, -0.04504681006073952, 0.003455993952229619, 0.025188112631440163, -0.020050223916769028, -0.09705949574708939, 0.02676934003829956, 0.009397266432642937, 0.006033767014741898, -0.012153271585702896, 0.046973008662462234, 0.010377326980233192, -0.060086943209171295, 0.04184942692518234, -0.032530780881643295, -0.028502507135272026, -0.004147712141275406, -0.024310478940606117, 0.05817262455821037, 0.007127765566110611, -0.062082789838314056, 0.0015871435170993209, 0.05642014369368553, -0.037498265504837036, 0.0017314782598987222, -0.011477198451757431, 0.0021360148675739765, 0.0011561195133253932, 0.004472287371754646, 0.006964386906474829, -0.05008979141712189, 0.019939886406064034, 0.06140867993235588, 0.008377842605113983, 0.041737161576747894, -0.020242178812623024, 0.04521828144788742, 0.0006057792343199253, 0.015400715172290802, -0.011092345230281353, -0.024841628968715668, -0.013521041721105576, -0.038349699229002, -0.06519246846437454, 0.04603569209575653, 0.002185727935284376, -0.06677675247192383, -0.0066212136298418045, 0.021944541484117508, -0.01153302751481533, 0.0027624377980828285, 0.007698842789977789, 0.031159142032265663, 0.0063498918898403645, -0.023885929957032204, 0.0013570538721978664, -0.031139768660068512, 0.002616285113617778, 0.019297365099191666, -0.083022341132164, -0.03368876501917839, -0.017262136563658714, -0.02764762006700039, 0.02644990012049675, -0.021384766325354576, -0.02887234091758728, -0.008101620711386204, -0.012963047251105309, 0.03066278249025345, -0.05066275969147682, 0.06619690358638763, 0.012236777693033218, -0.0011195659171789885, -0.048444658517837524, 0.004445643629878759, 0.043900467455387115, 0.026071419939398766, 0.008507971651852131, 0.07861702889204025, -0.030921906232833862, 0.04382868856191635, -0.01882169395685196, 0.0596279613673687, -0.02329869195818901, -0.061105210334062576, -0.021797722205519676, 0.059381503611803055, -0.016630763188004494, -0.007602711673825979, -0.010301751084625721, -0.04778800904750824, 0.016603738069534302, 0.017604999244213104, 0.03378221392631531, 0.042695388197898865, -0.007220486178994179, -0.04839367792010307, 0.06302033364772797, -0.0138729652389884, 0.026930224150419235, 0.004597532097250223, -0.028083281591534615, -0.04292353615164757, -0.042051155120134354, 0.006656267214566469, 0.004233906045556068, 0.002085587475448847, 0.040983859449625015, -0.028110355138778687, 0.017777709290385246, 0.1100296676158905, 0.03246120363473892, 0.014402956701815128, -0.026989197358489037, 0.011254724115133286, 0.05361069738864899, 0.014077967964112759, 0.010802963748574257, 0.047929007560014725, -0.015510938130319118, -0.031715117394924164, -0.009904580190777779, 0.045819368213415146, -0.011943222023546696, 0.005638551898300648, -0.028269901871681213, -0.05436814948916435, 0.05813686549663544, -0.04932929575443268, -0.02465565875172615, 0.05720159038901329, 0.06997842341661453, 0.02624872885644436, 0.02341139316558838, 0.013378427363932133, -0.06972061097621918, 0.05069233477115631, 0.040356773883104324, 0.030231880024075508, 0.014104744419455528, -0.022474095225334167, 0.06812380254268646, 0.04065079987049103, 0.013569462113082409, 0.04746672883629799, -0.07649169862270355, -0.08333060890436172, 0.00980798527598381, -0.020610209554433823, 0.06653687357902527, -0.01723007671535015, 0.021397752687335014, 0.051418572664260864, -0.01201813668012619, 0.04895748943090439, 0.028244471177458763, -0.01442661415785551, 0.031390104442834854, -0.047422394156455994, -0.04926055297255516, 0.06797239929437637, 0.01589733548462391, -0.0375206358730793, -0.057375092059373856, 0.01620001718401909, -0.008964727632701397, -0.0188498143106699, 0.03780156001448631, -0.011129960417747498, 0.0353580117225647, 0.019100792706012726, 0.024659084156155586, -0.000755710992962122, 0.029072768986225128, -0.026435356587171555, 0.009389091283082962, 0.0075798942707479, -0.020099543035030365, 0.002529464429244399, -0.009764719754457474, 0.10229795426130295, 0.04044598340988159, -0.024009468033909798, -0.05533691495656967, 0.048495564609766006, 0.0034568519331514835, -0.027867747470736504, 0.004803589079529047, 0.010602880269289017, 0.020684268325567245, -0.011123900301754475, -0.04180314019322395, -0.025057043880224228, -0.0006381623679772019, -0.051390454173088074, 0.011925202794373035, 0.06193293631076813, -0.037276025861501694, 0.07042137533426285, 0.006759323179721832, 0.0008034089114516973, 0.00837782770395279, -0.0027914470992982388, -0.07974981516599655, 0.01697719283401966, 0.009239362552762032, -0.011337511241436005, 0.048078685998916626, -0.007880289107561111, -0.030503883957862854, -0.03734377771615982, -0.018486635759472847, 0.018920518457889557, 0.05322029069066048, 0.050808101892471313, -0.014311235398054123, 0.04008232057094574, -0.02637903019785881, 0.022533316165208817, -0.011732684448361397, -0.04497406631708145, -0.03427862003445625, -0.04934033006429672, 0.027104828506708145, 0.006732426583766937, 0.02855200693011284, 0.001104819937609136, 0.03334721550345421, 0.017426174134016037, 0.007850945927202702, -0.007900894619524479, 0.0340142697095871, 0.00916883535683155, -0.013355526141822338, -0.03300068527460098, -0.041165564209222794, 0.05434876307845116, -0.05171749368309975, -0.00763449864462018, 0.01543106883764267, -0.052810583263635635, 0.06111528351902962, -0.05644957348704338, -0.04805352911353111, -0.0005429044831544161, 0.032184895128011703, 0.0400535948574543, 0.031176257878541946, 0.00423224363476038, 0.06803080439567566, 0.00642654811963439, 0.016404787078499794, -0.013564306311309338, 0.006049650721251965, 0.05224943533539772, 0.022901760414242744, 0.027440480887889862, 0.04938074201345444, -0.028831088915467262, -0.0013696328969672322, -0.017434174194931984, 0.008096957579255104, -0.030708512291312218, -0.2788546681404114, 0.05445866659283638, -0.011909347027540207, -0.04856916517019272, 0.011606586165726185, -0.04830478876829147, -0.01735694520175457, -0.022441130131483078, -0.03066469542682171, 0.0072074285708367825, -0.0179903544485569, -0.04335460811853409, -0.015312966890633106, 0.0535825751721859, 0.006543317344039679, 0.020508160814642906, 0.009598957374691963, -0.055272746831178665, 0.0019626040011644363, 0.05043826997280121, -0.014954508282244205, -0.057886525988578796, -0.011778472922742367, 0.012489695101976395, 0.02391512133181095, 0.023449134081602097, -0.10082833468914032, 0.02137801982462406, -0.06890733540058136, -0.024559587240219116, -0.0002532809739932418, -0.02016490325331688, 0.018333328887820244, -0.007226271089166403, -0.008890200406312943, -0.02440701238811016, 0.05365466699004173, 0.021588245406746864, 0.014535266906023026, 0.010469754226505756, -0.044951360672712326, -0.05532258003950119, -0.007547489367425442, 0.010805969126522541, 0.08510560542345047, -0.005126653704792261, -0.061949215829372406, -0.013292967341840267, -0.030047742649912834, 0.07971971482038498, -0.020284315571188927, -0.039774857461452484, -0.008840525522828102, 0.01737259142100811, 0.0019429896492511034, -0.026468414813280106, -0.006121674086898565, -0.00824204832315445, -0.05734384432435036, -0.02642706222832203, -0.01945299655199051, -0.03499109297990799, 0.00412604957818985, -0.06301916390657425, -0.010804768651723862, -0.05116915702819824, -0.06206229701638222, -0.022236812859773636, 0.04447082802653313, 0.020980553701519966, -0.028379634022712708, 0.04000191017985344, -0.0031258545350283384, -0.09672731161117554, -0.03553038835525513, -0.013555929996073246, -0.008346820250153542, 0.001113884267397225, -0.006634679157286882, 0.03290262073278427, -0.04756449908018112, -0.060639265924692154, 0.02183251641690731, 0.01281183771789074, 0.04075516760349274, 0.01665179803967476, 0.011386890895664692, -0.011617138981819153, -0.02876182086765766, 0.010640435852110386, 0.07222212851047516, 0.0007286261534318328, -0.02099759876728058, -0.006901201326400042, 0.0011817154008895159, 0.021442538127303123, 0.014361221343278885, -0.029935136437416077, -0.004656356293708086, 0.01880180463194847, 0.033970125019550323, -0.03719579428434372, 0.01774430088698864, 0.032715849578380585, -0.02610619366168976, -0.02235000766813755, -0.05952536687254906, 0.025253480300307274, 0.04532768577337265, 0.029515035450458527, -0.009083645418286324, -0.03933393210172653, 0.0220306608825922, -0.04176883026957512, -0.04541618004441261, -0.004300697240978479, 0.01698487438261509, 0.034099336713552475, 0.024052254855632782, -0.01544557698071003, -0.06021794676780701, 0.02656184509396553, 0.021107075735926628, -0.0021083771716803312, -0.06123796105384827, -0.013414728455245495, -0.021009910851716995, -0.024974258616566658, 0.007930712774395943, 0.018671603873372078, -0.02673696167767048, 0.041968781501054764, 0.018408965319395065, -0.04460117220878601, 0.020447343587875366, -0.022307202219963074, -0.05674739181995392, -0.041929733008146286, 0.027747973799705505, -0.008093534037470818, -0.019075430929660797, 0.028641484677791595, -0.002339773578569293, 0.020076749846339226, 0.05059679597616196, 0.008213765919208527, 0.017541509121656418, -0.021248681470751762, 0.009547042660415173, 0.011293808929622173, 0.0058229174464941025, -0.04004416987299919, -0.018720455467700958, -0.0354759618639946, 0.010144124738872051, -0.010705938562750816, 0.024148600175976753, -0.04366740211844444, -0.02014894038438797, -0.011941990815103054, 0.02519802376627922, -0.061063773930072784, 0.005581093020737171, -0.02878469042479992, 0.019932817667722702, 0.05510086938738823, -0.013421867042779922, -0.011518348008394241, -0.02364923246204853, -0.02467372640967369, 0.02404067851603031, -0.011854076758027077, -0.05194998160004616, -0.0031364629976451397, -0.012660309672355652, 0.003005037782713771, 0.003495714860036969, 0.008648552931845188, 0.03356708958745003, 0.010743571445345879, -0.02684693969786167, -0.01788582094013691, 0.019105734303593636, -0.01577092707157135, 0.053839702159166336, 0.03309168666601181, -0.0076569365337491035, 0.00953749381005764, -0.03407709673047066, -0.0028688102029263973, -0.012982367537915707, 0.014638829976320267, -0.03822875767946243, 0.022740572690963745, -0.02216223254799843, -0.05952727422118187, 0.029465220868587494, 0.010589256882667542, 0.012043504975736141, 0.04483160749077797, 0.0035395368468016386, -0.007625671103596687, -0.02224242128431797, 0.043002933263778687, 0.07854384928941727, -0.0657234713435173, -0.025919118896126747, 0.016505638137459755, 0.022001730278134346, -0.0138149568811059, 0.015925468876957893, -0.05393344163894653, -0.03260563313961029, -0.03205818682909012, 0.021162712946534157, -0.039956796914339066, -0.04117225855588913, -0.030993202701210976, -0.00549662159755826, -0.003087251214310527, 0.02219557948410511, 0.00877139251679182, -0.031749069690704346, -0.030608128756284714, 0.0003229794092476368, 0.024688560515642166, -0.03211357071995735, -0.005038466304540634, 0.017507215961813927, -0.032853640615940094, -0.009191892109811306, -0.01867665909230709, 0.020603761076927185, 0.01304304227232933, -0.01311697717756033, 0.0033284290693700314, -0.052157212048769, 0.01991952583193779, 0.020609544590115547, 0.051117997616529465, 0.005760040134191513, -0.0022780336439609528, -0.032852258533239365, -0.011933278292417526, -0.013532480224967003, 0.01659633032977581, -0.01101053599268198, -0.001559363678097725, 0.02336985431611538, 0.03539663925766945, 0.02391745336353779, 0.024926310405135155, -0.009384140372276306, -0.03761180862784386, 0.06273754686117172, -0.05653999373316765, -0.04657972231507301, -0.01650889590382576, -0.03643113747239113, 0.0039951493963599205, 0.004616986960172653, 0.023195425048470497, -0.04435313493013382, 0.04072112217545509, 0.044400282204151154, 0.041236747056245804, 0.024543514475226402, -0.030576353892683983, 0.029198048636317253, -0.04469403252005577, -0.009270934388041496, -0.0759056955575943, 0.0008162309532053769, 0.03605783358216286, 0.0013829624513164163, -0.01973837986588478, 0.0076128654181957245, -0.019427262246608734, 0.021695783361792564, -0.0637274757027626, -0.012214657850563526, 0.06403007358312607, -0.016872204840183258, 0.01958012953400612, -0.0006931088864803314, -0.06477230042219162, 0.013608548790216446, 0.026476701721549034, -0.04730693995952606, -0.0006959424936212599, -0.035249993205070496, 0.050097450613975525, -0.01619913801550865, 0.02901042439043522, -0.004177635069936514, -0.01032357756048441, 0.09038112312555313, 0.01589374616742134, 0.020656105130910873, 0.06322985887527466, -0.0258206594735384, 0.043817419558763504, 0.020837904885411263, -0.011644997633993626, -0.021992262452840805, 0.04673583805561066, -0.01617138274013996, -0.0436430387198925, 0.05007072165608406, 0.0007075449102558196, -0.02122591622173786, -0.04555761069059372, 0.07628088444471359, 0.0033801747485995293, -0.05233458802103996, -0.04506918787956238, 0.027451785281300545, -0.04010549560189247, -0.024777427315711975, -0.016579193994402885, 0.01710762269794941, -0.029967617243528366, 0.05791959539055824, -0.03321167081594467, -0.007362862583249807, 0.07843896001577377, -0.01196449063718319, -0.02818051539361477, -0.01832115836441517, 0.10284089297056198, 0.07421875, 0.04881225526332855, 0.002505882643163204, 0.07485632598400116, 0.002377958269789815, -0.026169344782829285, 0.006705741863697767, -0.01912667788565159, -0.0038390043191611767, -0.02552584558725357, 0.02834315039217472, 0.04819269850850105, -0.025412162765860558, 0.06316270679235458, -0.01485490519553423, -0.032941654324531555, 0.012982049956917763, 0.016842156648635864, 0.017204470932483673, 0.06095707789063454, 0.026592249050736427, 0.048137933015823364, -0.015036732889711857, -0.028493830934166908, 0.012686141766607761, -0.029869602993130684, -0.004888441879302263, 0.042965956032276154, -0.03383232653141022, 0.0021465730387717485, 0.041589878499507904, 0.018580574542284012, 0.08778735250234604, -0.06668904423713684, 0.0008899581152945757, -0.025036562234163284, 0.026728319004178047, 0.004365843720734119, -0.013844580389559269, 0.005164949223399162, -0.012728429399430752, -0.00368474586866796, -0.042628511786460876, -0.03804188221693039, -0.019609419628977776, -0.012173080816864967, 0.006804501637816429, -0.01888103596866131, 0.0058183022774755955, 0.008354359306395054, -0.022586289793252945, -0.04072468727827072, -0.05900049954652786, -0.036351051181554794, -0.06170837953686714, -0.06611339747905731, 0.013781148009002209, 0.0081038111820817, -0.003918639849871397, -0.03066357783973217, -0.00647756876423955, -0.015597554855048656, -0.03494973108172417, 0.05157175660133362, -0.06376013159751892, -0.008254459127783775, 0.013383463956415653, 0.04312218353152275, 0.028097912669181824, 0.008181974291801453, 0.036743443459272385, 0.018047593533992767, 0.002712300978600979, -0.022568203508853912, 0.01322312094271183, 0.029344001784920692, 0.014098310843110085, 0.010034649632871151, -0.06048014387488365, -0.009173390455543995, 0.01050543412566185, -0.022057434543967247, -0.07454344630241394, 0.010363554581999779, 0.06218615546822548, 0.018285272642970085, 0.050079166889190674, -0.03369894623756409, -0.027849890291690826, -0.05724044889211655, 0.018928352743387222, 0.021743904799222946, 0.008014394901692867, 0.04458228871226311, -0.02853609248995781, 0.08193155378103256, 0.017597945407032967, -0.0318850576877594, -0.02366659976541996, -0.03334599733352661, -0.015441338531672955, -0.006418420467525721, -0.04488841071724892, -0.025228416547179222, -0.013093278743326664, -0.10675965249538422, -0.01649758592247963, 0.010184389539062977, -0.01456595491617918, -0.03420623019337654, 0.006171354092657566, 0.011895762756466866, 0.005533681251108646, 0.033153560012578964, -0.042921170592308044, 0.03879271447658539, -0.015387880615890026, 0.005780309438705444, -0.015005310997366905, 0.003893469925969839, -0.007530583534389734, 0.03505208343267441, 0.0060152411460876465, -0.04812774434685707, -0.0007788369548507035, -0.02448989264667034, 0.022858522832393646, 0.03702506422996521, 0.0005695117870345712, 0.0071247355081140995 ]
[ -0.07224816828966141, -0.033145904541015625, -0.005268724635243416, -0.023171445354819298, 0.010264357551932335, 0.003825005842372775, -0.02764406055212021, 0.004837594460695982, 0.014789095148444176, -0.00018383820133749396, 0.011739456094801426, -0.05629380792379379, 0.0026203503366559744, 0.029838651418685913, 0.07415419816970825, 0.0024182393681257963, -0.009716681204736233, -0.03807279095053673, 0.023251134902238846, 0.040004629641771317, -0.03310680761933327, -0.02438085339963436, -0.01985655538737774, -0.01723598875105381, 0.04204154759645462, 0.03311067447066307, 0.033375225961208344, -0.02392238937318325, 0.0007843288476578891, -0.18774425983428955, 0.0034361006692051888, 0.01968773454427719, 0.013098839670419693, -0.017299659550189972, -0.018773231655359268, 0.06452702730894089, -0.002049677539616823, 0.03503068909049034, -0.016388582065701485, 0.040428705513477325, 0.03843960165977478, 0.042706336826086044, -0.05309305340051651, -0.02063732035458088, 0.057828884571790695, 0.03125569596886635, -0.01115549635142088, -0.01740564964711666, 0.018699821084737778, -0.010493445210158825, -0.03259525075554848, -0.05677972361445427, -0.005410105921328068, -0.019774993881583214, 0.009480481967329979, 0.05368911102414131, 0.02480028010904789, 0.05737058073282242, 0.011099698953330517, 0.04543345049023628, 0.008712404407560825, 0.013943805359303951, -0.136141836643219, 0.0544029176235199, 0.032027315348386765, 0.03789316862821579, -0.047349631786346436, 0.0022140969522297382, -0.017652802169322968, 0.1157340556383133, 0.004053114447742701, -0.0031249832827597857, -0.019127964973449707, 0.0539567768573761, 0.00584852509200573, 0.01718827895820141, -0.009000684134662151, 0.0009186022798530757, 0.020771967247128487, -0.0437767431139946, -0.03925761207938194, -0.0004076960904058069, -0.025928502902388573, 0.016117895022034645, -0.024569258093833923, 0.04078998789191246, -0.044360898435115814, 0.04485649615526199, 0.03702015429735184, 0.05909202620387077, 0.028384549543261528, 0.016619529575109482, 0.027106409892439842, 0.0063670044764876366, -0.09388654679059982, -0.03755170479416847, 0.004562782123684883, 0.004940616898238659, -0.03225267305970192, 0.4164384603500366, -0.018200647085905075, 0.009260140359401703, 0.0727432370185852, 0.04876364395022392, -0.011460669338703156, -0.022843800485134125, 0.023159019649028778, -0.061723027378320694, 0.019579416140913963, -0.01713603548705578, 0.03286776691675186, -0.006743294652551413, 0.027686379849910736, -0.06654191762208939, 0.011016757227480412, 0.034439630806446075, 0.018297437578439713, 0.03278444707393646, -0.0197682436555624, 0.01897399313747883, -0.013448065146803856, 0.005451100878417492, 0.02024836838245392, 0.01014037150889635, -0.020772207528352737, -0.017471304163336754, 0.018995489925146103, 0.04175356775522232, 0.04491029679775238, -0.0029587794560939074, 0.07397114485502243, -0.007828067988157272, -0.06780266761779785, 0.02047961764037609, -0.005141360219568014, -0.00028855755226686597, 0.04980699345469475, -0.03980930522084236, 7.213626531665795e-7, 0.05303774029016495, 0.010439782403409481, 0.008676198311150074, 0.06952162086963654, -0.035556480288505554, -0.03810702636837959, 0.11529482156038284, 0.01794428378343582, -0.0436980314552784, 0.008370117284357548, -0.029549822211265564, -0.025712231174111366, 0.006160560995340347, 0.009963436052203178, -0.06530212610960007, 0.012387705966830254, 0.014020238071680069, 0.08394376188516617, -0.01993531733751297, -0.07774553447961807, -0.0013365192571654916, -0.03427795693278313, -0.03455660864710808, -0.07278857380151749, 0.04240803048014641, 0.07344494014978409, -0.10781943053007126, -0.012457787990570068, -0.0071993740275502205, -0.010460402816534042, -0.06912735849618912, 0.0017794781597331166, 0.010711682960391045, -0.028267985209822655, 0.009842492640018463, 0.1078936830163002, -0.012792947702109814, -0.04926621913909912, -0.0003333105123601854, 0.04114571213722229, 0.015481890179216862, 0.035057298839092255, -0.02443268522620201, -0.02529350481927395, -0.0072752027772367, -0.049120090901851654, -0.05060635507106781, -0.08142729848623276, -0.00452421884983778, -0.011999598704278469, -0.02350536361336708, -0.033951785415410995, -0.0037540122866630554, -0.08092685043811798, 0.07889597862958908, -0.0467032827436924, -0.028224527835845947, -0.0013858529273420572, -0.0032976095099002123, -0.0527411587536335, -0.0056336866691708565, -0.021278992295265198, 0.01821097731590271, -0.011785333976149559, 0.023365329951047897, -0.07027936726808548, 0.0263384897261858, 0.04410224035382271, -0.058000676333904266, 0.10670244693756104, 0.06480879336595535, -0.02964046411216259, -0.03502081334590912, 0.017626678571105003, 0.009091027081012726, 0.023106642067432404, -0.010258786380290985, 0.016725631430745125, -0.001185101573355496, 0.00013235209917183965, 0.013924439437687397, -0.024602334946393967, 0.0031302832067012787, -0.010112523101270199, -0.3271879553794861, -0.04995826259255409, 0.003959801979362965, 0.020646022632718086, 0.027935348451137543, -0.016087355092167854, 0.0014211819507181644, -0.009186078794300556, -0.02532239817082882, -0.015152272768318653, 0.11590956151485443, -0.046472396701574326, -0.012567692436277866, -0.08451280742883682, 0.003046235768124461, 0.0308077409863472, -0.01743941754102707, -0.026290079578757286, -0.030463995411992073, 0.006312506273388863, 0.027650147676467896, -0.04089593514800072, -0.015563135966658592, -0.06623803824186325, -0.032501935958862305, -0.013172411359846592, 0.12601293623447418, -0.02262115478515625, 0.054324764758348465, -0.05440649390220642, 0.019414447247982025, -0.008319723419845104, -0.007892540656030178, -0.07765436172485352, 0.00759951863437891, -0.03618144616484642, 0.03717924281954765, -0.030997835099697113, -0.016103914007544518, -0.03590153157711029, -0.04419495165348053, 0.012143350206315517, -0.0655284970998764, -0.047511376440525055, -0.07594949007034302, 0.03308143839240074, -0.02562830038368702, -0.007269096560776234, 0.0054284678772091866, 0.05586078017950058, 0.03010839968919754, 0.04016118869185448, 0.01131572388112545, -0.009112231433391571, 0.004920653998851776, -0.02128266729414463, -0.08735581487417221, 0.014358948916196823, -0.00015564094064757228, -0.0037691781762987375, 0.0006111993570812047, 0.053100455552339554, 0.03548535704612732, -0.07967246323823929, 0.03578495234251022, 0.026127269491553307, -0.024061741307377815, -0.01526561751961708, 0.027697602286934853, -0.013817465864121914, -0.022809959948062897, 0.0819086804986, 0.034778911620378494, -0.00857493095099926, 0.04654539003968239, 0.031217997893691063, -0.03610466048121452, 0.037415288388729095, 0.04658784717321396, 0.001118780579417944, 0.016219990327954292, -0.0763319805264473, 0.037374213337898254, -0.009645285084843636, -0.046952392905950546, 0.03425851836800575, 0.0048273662105202675, -0.06916579604148865, 0.057786066085100174, 0.025060417130589485, 0.002210114384070039, 0.01562013104557991, -0.016220465302467346, -0.02445676364004612, 0.08456160128116608, -0.035204268991947174, -0.2707013487815857, 0.04205196350812912, 0.04967426508665085, 0.07142578065395355, 0.01499116700142622, 0.008715060539543629, 0.05506836995482445, -0.0055535114370286465, 0.002685589948669076, 0.011954834684729576, 0.026670625433325768, 0.04818803817033768, -0.016827724874019623, 0.00046001342707313597, 0.006702896673232317, -0.0033525314647704363, 0.044038739055395126, 0.022102758288383484, 0.027945393696427345, -0.0071107749827206135, 0.019732432439923286, 0.02414494752883911, 0.16237445175647736, 0.023617971688508987, 0.02534320019185543, 0.012263163924217224, -0.0706024244427681, -0.007700973656028509, 0.05687389150261879, -0.021597228944301605, -0.03417442739009857, 0.012577374465763569, 0.014748318120837212, 0.04870188236236572, 0.023449502885341644, -0.05651184916496277, -0.016120316460728645, 0.05891290679574013, 0.02588457614183426, -0.01805744878947735, 0.023332474753260612, -0.018170056864619255, -0.025362152606248856, 0.032570887356996536, 0.0755515918135643, -0.016303246840834618, -0.021422414109110832, -0.03713533282279968, -0.07404714077711105, -0.016241319477558136, -0.03432012349367142, -0.05234596133232117, -0.032856542617082596, -0.006864235736429691, -0.0010567974532023072, 0.059623103588819504, 0.034886956214904785, -0.030414318665862083, 0.002044449793174863, -0.010765648446977139, -0.0009404264274053276, -0.0257803276181221, 0.09759856015443802, -0.0136808967217803, -0.008459724485874176 ]
[ 0.010868340730667114, 0.045261140912771225, 0.004990304820239544, 0.016512015834450722, 0.0010467292740941048, 0.016752133145928383, -0.01370240468531847, 0.009242071770131588, -0.019762791693210602, 0.004005320370197296, -0.02264341153204441, 0.03660750761628151, 0.06100601702928543, 0.019412711262702942, 0.04746143892407417, 0.020662866532802582, 0.017487961798906326, 0.03478221222758293, 0.01755581796169281, -0.004358076956123114, -0.0026301718316972256, -0.0016316194087266922, 0.02552739344537258, 0.0180850587785244, -0.01192350871860981, 0.03497152030467987, -0.03806536644697189, -0.015735236927866936, 0.014647205360233784, -0.10622025281190872, -0.03816317766904831, 0.011070147156715393, -0.003749846713617444, -0.01708928868174553, -0.010904021561145782, 0.006225390359759331, -0.01942216046154499, 0.012500000186264515, 0.012736991979181767, -0.026127077639102936, 0.017976829782128334, 0.008357643149793148, 0.0010167495347559452, -0.023541048169136047, 0.029556499794125557, 0.04217848181724548, 0.021764619275927544, -0.044369205832481384, 0.0025734526570886374, -0.030704395845532417, -0.002728437539190054, -0.03147348761558533, 0.03121853992342949, -0.0250866636633873, 0.015036163851618767, -0.01884467899799347, -0.02766336314380169, -0.00720088928937912, 0.007581252604722977, -0.039061516523361206, 0.04665989801287651, -0.025410372763872147, -0.08801115304231644, -0.027744125574827194, -0.0034212148748338223, -0.0332019105553627, -0.007668490055948496, -0.007406326942145824, 0.009831028990447521, -0.01610928773880005, 0.01383670512586832, 0.02735956944525242, -0.046471007168293, -0.03820795565843582, 0.008881686255335808, 0.019648348912596703, 0.0258546844124794, 0.001274688052944839, -0.028930645436048508, -0.033454325050115585, -0.0021493586245924234, 0.028954163193702698, 0.03254086151719093, 0.009675407782196999, 0.04529847204685211, -0.0243622288107872, -0.002165773883461952, -0.008161799050867558, 0.03160597383975983, -0.015333852730691433, -0.061764802783727646, 0.01678764447569847, -0.007808425463736057, -0.008395290933549404, -0.09458253532648087, 0.014579540118575096, 0.01934797130525112, -0.006441988050937653, 0.003199431113898754, 0.7936806082725525, 0.02376342937350273, 0.014860243536531925, 0.05050717294216156, 0.029784031212329865, 0.012648506090044975, 0.05458107590675354, 0.03133506327867508, -0.01678762212395668, 0.023246245458722115, 0.020026303827762604, -0.011418714188039303, -0.010497716255486012, 0.029507916420698166, 0.030351923778653145, 0.004414629656821489, 0.029490049928426743, 0.005223264917731285, 0.0099946865811944, -0.0004701001744251698, 0.0256365817040205, -0.009451876394450665, 0.019265994429588318, 0.02241223119199276, 0.006624751258641481, 0.01619069278240204, -0.16971084475517273, -0.024002602323889732, -7.230254897608712e-33, 0.001267614308744669, 0.0009847914334386587, 0.07538080960512161, -0.005268942564725876, 0.018928557634353638, -0.0139616122469306, 0.01332075521349907, -0.04271034151315689, 0.0032435546163469553, -0.03967731446027756, 0.0054226345382630825, 0.0009862605948001146, 0.020689036697149277, -0.04315178841352463, 0.03239957615733147, -0.029487568885087967, -0.02395792119204998, 0.006824456620961428, 0.01113900262862444, 0.017390547320246696, 0.00008148314373102039, 0.007894108071923256, -0.0421280711889267, 0.02992742508649826, 0.01280867587774992, 0.023046689108014107, 0.034980658441782, -0.01246400736272335, -0.007749403826892376, -0.02657075598835945, -0.08582719415426254, 0.0166694987565279, -0.026367072016000748, -0.01655014045536518, 0.0021216229069978, -0.03770684450864792, -0.008550886064767838, 0.014071810990571976, -0.031009944155812263, -0.04858620464801788, -0.029094742611050606, -0.05171922221779823, -0.010790759697556496, -0.05330953374505043, -0.04387572035193443, 0.005182589404284954, 0.026781003922224045, 0.06221714988350868, -0.014180278405547142, 0.05127512663602829, -0.005160679575055838, 0.013704749755561352, -0.024485057219862938, -0.023151706904172897, -0.037089668214321136, 0.014175512827932835, 0.023291680961847305, 0.020624442026019096, -0.05865543335676193, 0.03831329569220543, 0.0488932766020298, 0.01757674105465412, -0.02841103821992874, 0.04690761864185333, -0.010529930703341961, -0.0033302821684628725, -0.020540699362754822, -0.010479727759957314, 0.02751760557293892, 0.015075928531587124, -0.061390385031700134, 0.038471322506666183, 0.026538372039794922, -0.019293714314699173, 0.062153976410627365, -0.02638312615454197, -0.009990072809159756, -0.03808511421084404, -0.023605134338140488, 0.04654635116457939, -0.013037797063589096, -0.04900987818837166, -0.0462668240070343, -0.05923623591661453, -0.011145414784550667, -0.0029884367249906063, 0.059129808098077774, -0.004965350963175297, -0.0011570759816095233, 0.02078832872211933, 0.03526267409324646, -0.018576042726635933, 0.004073061980307102, 0.04022283852100372, -0.04073276370763779, 7.483463727615525e-33, 0.006378547288477421, 0.012705490924417973, 0.015205473639070988, -0.0037401148583739996, 0.034446798264980316, 0.0069852364249527454, 0.03970284014940262, -0.037584587931632996, -0.054689690470695496, 0.016203053295612335, -0.01882469281554222, -0.042631540447473526, -0.002657589502632618, 0.04023931920528412, 0.04596717655658722, -0.023249700665473938, 0.019940394908189774, -0.0036504354793578386, -0.00294159515760839, 0.017583003267645836, 0.0010583606781437993, 0.01766878552734852, -0.031493328511714935, 0.004364894703030586, 0.01656799390912056, 0.05121514946222305, 0.005930628161877394, 0.03692648187279701, 0.006064346991479397, 0.04509370028972626, -0.04767106845974922, -0.0493076927959919, -0.006743238307535648, -0.005570411216467619, -0.007341138087213039, 0.027504514902830124, -0.037846896797418594, -0.023954469710588455, -0.00591423362493515, 0.0011964086443185806, -0.003569069318473339, -0.01916496828198433, -0.03441271558403969, 0.05864259973168373, 0.05784381181001663, 0.010576920583844185, -0.019645394757390022, 0.03609286993741989, -0.021391361951828003, 0.020637251436710358, 0.0343201607465744, 0.03982357308268547, -0.02815859764814377, 0.009393555112183094, 0.05127209797501564, -0.035309720784425735, 0.010308983735740185, 0.03023829683661461, -0.011547311209142208, -0.017565680667757988, -0.01441105455160141, 0.004836580716073513, -0.037378765642642975, 0.04222539812326431, -0.0049535902217030525, -0.0361657440662384, -0.016562990844249725, -0.010337620973587036, 0.0064141093753278255, 0.03017350099980831, -0.011457481421530247, 0.0512915775179863, 0.0161310825496912, 0.03478878736495972, 0.04271189123392105, -0.008000698871910572, -0.0015846486203372478, -0.007717509754002094, -0.037147704511880875, -0.03511521592736244, 0.0014905291609466076, -0.01587841846048832, 0.03179442882537842, 0.011900066398084164, -0.011698615737259388, 0.00789234321564436, -0.04234877601265907, 0.003969370387494564, -0.0009771211771294475, 0.00940733589231968, 0.02610492892563343, 0.013498403131961823, -0.01885964162647724, 0.056724127382040024, -0.020478161051869392, -1.253221970642926e-8, -0.004851318895816803, 0.022272584959864616, -0.03302060067653656, -0.019512776285409927, 0.03819168359041214, 0.030598478391766548, -0.017164036631584167, -0.011579890735447407, -0.034706663340330124, 0.03029538132250309, 0.06814068555831909, -0.018540535122156143, 0.012307602912187576, 0.00896424800157547, 0.013683904893696308, -0.02974279783666134, 0.021343320608139038, 0.011913805268704891, 0.039577145129442215, 0.005233192816376686, -0.006422673352062702, 0.02173490636050701, -0.0468989722430706, -0.013557348400354385, 0.003551359521225095, -0.0699004977941513, 0.00542097631841898, -0.06382089853286743, -0.0057852561585605145, -0.014778273180127144, -0.01487896591424942, -0.02038404531776905, -0.0050225630402565, 0.022473445162177086, -0.035823483020067215, -0.06275306642055511, 0.027069205418229103, 0.03083498403429985, 0.03091965615749359, 0.03128102794289589, -0.03479103371500969, 0.03614770993590355, -0.04084896296262741, -0.03384891524910927, -0.03589348495006561, 0.013594891875982285, -0.038331639021635056, -0.04027220606803894, 0.03682698309421539, -0.060548726469278336, -0.024665243923664093, -0.007101437076926231, 0.04472870007157326, 0.021374622359871864, 0.04161478579044342, 0.03965945541858673, -0.015689803287386894, -0.056039825081825256, -0.05439278110861778, 0.002305838279426098, -0.00782607402652502, 0.03878436237573624, -0.022111786529421806, -0.026133323088288307 ]
neo4j-the-learning-to-cycle-dependency-graph
https://markhneedham.com/blog/2015/04/07/neo4j-the-learning-to-cycle-dependency-graph
false
2015-04-09 22:02:18
R: Snakes and ladders markov chain
[ "r-2" ]
[ "R" ]
A few days ago I read a really cool blog post http://freakonometrics.blog.free.fr/index.php?post/2011/12/20/Basic-on-Markov-Chain-(for-parents)[explaining how Markov chains can be used to model the possible state transitions in a game of snakes and ladders], a use of Markov chains I hadn't even thought of! While the example is very helpful for understanding the concept, my understanding of the code is that it works off the assumption that any roll of the dice that puts you on a score > 100 is a winning roll. In the version of the game that I know you have to land exactly on 100 to win. e.g if you're on square 98 and roll a 6 you would go forward 2 spaces to 100 and then bounce back 4 spaces to 96. I thought it'd be a good exercise to tweak the code to cater for this: [source,r] ---- n=100 # We have 6 extra columns because we want to represent throwing of the dice which results in a final square > 100 M=matrix(0,n+1,n+1+6) rownames(M)=0:n colnames(M)=0:(n+6) # set probabilities of landing on each square assuming that there aren't any snakes or ladders for(i in 1:6){ diag(M[,(i+1):(i+1+n)])=1/6 } # account for 'bounce back' if a dice roll leads to a final score > 100 for(i in 96:100) { for(c in 102:107) { idx = 101 - (c - 101) M[i, idx] = M[i, idx] + M[i, c] } } ---- We can inspect the last few rows to check that if the transition matrix is accurate: [source,r] ---- > M[95:100,95:101] 94 95 96 97 98 99 100 94 0 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 95 0 0.0000000 0.1666667 0.1666667 0.1666667 0.3333333 0.1666667 96 0 0.0000000 0.0000000 0.1666667 0.3333333 0.3333333 0.1666667 97 0 0.0000000 0.0000000 0.1666667 0.3333333 0.3333333 0.1666667 98 0 0.0000000 0.1666667 0.1666667 0.1666667 0.3333333 0.1666667 99 0 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 0.1666667 ---- If we're on the 99th square (the last row) we could roll a 1 and end up on 100, a 2 and end up on 99 (1 forward, 1 back), a 3 and end up on 98 (1 forward, 2 back), a 4 and end up on 97 (1 forward, 3 back), a 5 and end up on 96 (1 forward, 4 back) or a 6 and end up on 95 (1 forward, 5 back). i.e. we can land on 95, 96, 97, 98, 99 or 100 with 1/6 probability. If we're on the 96th square (the 3rd row) we could roll a 1 and end up on 97, a 2 and end up on 98, a 3 and end up on 99, a 4 and end up on 100, a 5 and end up on 99 (4 forward, 1 back) or a 6 and end up on 98 (4 forward, 2 back). i.e. we can land on 97 with 1/6 probability, 98 with 2/6 probability, 99 with 2/6 probability or 100 with 1/6 probability. We could do a similar analysis for the other squares but it seems like the probabilities are being calculated correctly. Next we can update the matrix with the snakes and ladders. That code stays the same: [source,r] ---- # get rid of the extra columns, we don't need them anymore M=M[,1:(n+1)] # add in the snakes and ladders starting = c(4,9,17,20,28,40,51,54,62,64,63,71,93,95,92) ending = c(14,31,7,38,84,59,67,34,19,60,81,91,73,75,78) for(i in 1:length(starting)) { # Retrieve current probabilities of landing on the starting square v=M[,starting[i]+1] ind=which(v>0) # Set no probability of falling on the starting squares M[ind,starting[i]+1]=0 # Move all existing probabilities to the ending squares M[ind,ending[i]+1]=M[ind,ending[i]+1]+v[ind] } ---- We can also simplify the +++<cite>+++powermat+++</cite>+++ function which is used to simulate what the board would look like after a certain number of dice rolls: [source,r] ---- # original powermat=function(P,h){ Ph=P if(h>1) { for(k in 2:h) { Ph=Ph%*%P } } return(Ph) } #new library(expm) powermat = function(P,h) { return (P %^% h) } ---- [source,r] ---- initial=c(1,rep(0,n)) h = 1 > (initial%*%powermat(M,h))[1:15] 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 [1,] 0 0.1666667 0.1666667 0.1666667 0 0.1666667 0.1666667 0 0 0 0 0 0 0 0.1666667 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 [1,] 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ---- One interesting thing I noticed is that it now seems to take way more turns on average to finish the game than when you didn't need to score exactly 100 to win: [source,r] ---- > sum(1 - game) [1] 999 ---- [source,r] ---- distrib=initial%*%M game=rep(NA,1000) for(h in 1:length(game)){ game[h]=distrib[n+1] distrib=distrib%*%M} plot(1-game[1:200],type="l",lwd=2,col="red", ylab="Probability to be still playing") ---- image::{{<siteurl>}}/uploads/2015/04/2015-04-09_22-48-24.png[2015 04 09 22 48 24,574] I expected it to take longer to finish the game but not this long! I think I've probably made a mistake but I'm not sure where\... == Update https://twitter.com/tonkouts[Antonios] found the mistake I'd made - when on the 100th square we should have a 1 as the probability of getting to the 100th square. i.e. we need to update M like so: [source,r] ---- M[101,101] = 1 ---- Now if we visualise he probability that we're still playing we get a more accurate curve: [source,r] ---- distrib=initial%*%M game=rep(NA,1000) for(h in 1:length(game)){ game[h]=distrib[n+1] distrib=distrib%*%M} plot(1-game[1:200],type="l",lwd=2,col="red", ylab="Probability to be still playing") ---- image::{{<siteurl>}}/uploads/2015/04/2015-04-10_23-49-21.png[2015 04 10 23 49 21,570]
null
null
[ -0.00997218955308199, 0.01577930338680744, -0.031273532658815384, 0.038500942289829254, 0.09312690794467926, 0.004460672847926617, 0.02090117521584034, 0.021227862685918808, 0.011970557272434235, -0.0246841162443161, 0.025525206699967384, 0.008210050873458385, -0.06163322180509567, 0.0006858683191239834, -0.012251443229615688, 0.06492755562067032, 0.058318544179201126, -0.01478362176567316, 0.0067872414365410805, 0.007008063141256571, -0.013734935782849789, 0.08151809126138687, 0.002401563338935375, 0.04155374690890312, 0.01808742806315422, 0.003405745606869459, 0.03282072767615318, 0.028746990486979485, -0.044634848833084106, 0.009290298447012901, 0.034491218626499176, 0.0004536302585620433, 0.00305425887927413, -0.017027903348207474, 0.04032307118177414, -0.023459965363144875, -0.06008323282003403, 0.041627317667007446, -0.0017263659974560142, -0.003392512910068035, -0.06023639068007469, 0.02587941475212574, -0.015912404283881187, 0.0021169306710362434, -0.037436917424201965, -0.010561512783169746, -0.024511508643627167, 0.024308310821652412, -0.008493618108332157, -0.025767941027879715, -0.04918045550584793, 0.050576966255903244, -0.029124263674020767, 0.023314254358410835, -0.0019580968655645847, 0.030753454193472862, 0.01997307501733303, -0.06371039152145386, 0.011308389715850353, -0.050317585468292236, 0.018123652786016464, -0.013633077032864094, -0.023109890520572662, 0.008887957781553268, -0.0024504561442881823, -0.012089783325791359, 0.01961427740752697, 0.07440726459026337, -0.004332602955400944, 0.0020186123438179493, -0.030741628259420395, 0.022157220169901848, -0.0003559838514775038, -0.017617996782064438, -0.005027399864047766, -0.04202984645962715, 0.0016487305983901024, 0.06387951225042343, 0.0195930153131485, 0.03349386900663376, -0.023675691336393356, -0.003666242817416787, 0.04290464147925377, 0.025297310203313828, -0.023363277316093445, -0.028560619801282883, -0.01900985650718212, -0.04531843215227127, -0.0677320584654808, 0.059376008808612823, -0.023826127871870995, -0.055992595851421356, 0.02317768521606922, 0.019835244864225388, -0.040332403033971786, -0.0199249517172575, 0.0012382973218336701, 0.016008861362934113, -0.007811207324266434, -0.029831379652023315, -0.0311757642775774, -0.028903203085064888, 0.019723793491721153, -0.0046005831100046635, -0.08697333931922913, 0.00016532084555365145, 0.01707516983151436, -0.0014303645584732294, -0.014143151231110096, 0.01152996625751257, -0.03521493449807167, -0.012006409466266632, -0.007872972637414932, -0.015374135226011276, -0.0821114256978035, 0.07971414178609848, 0.0038439978379756212, -0.01904507912695408, 0.014697789214551449, 0.002974278060719371, 0.05974136292934418, 0.007520419079810381, -0.02769644744694233, 0.0877545103430748, 0.019265497103333473, 0.016571585088968277, 0.018037503585219383, 0.05802495777606964, -0.017971660941839218, -0.05498671904206276, 0.001706406706944108, 0.05122494325041771, -0.04249226301908493, 0.021587343886494637, 0.0017478306544944644, -0.035949114710092545, -0.0049092406406998634, 0.011316093616187572, 0.02162991091609001, 0.028743267059326172, -0.0002638183650560677, -0.02866673469543457, 0.021540053188800812, 0.012491494417190552, 0.010685788467526436, -0.014337996952235699, -0.003228941233828664, -0.016101626679301262, -0.03614598140120506, 0.010738566517829895, 0.02925533428788185, 0.0026257475838065147, 0.044243019074201584, -0.02420191466808319, -0.003240228397771716, 0.04288613796234131, 0.006483888253569603, 0.012453321367502213, -0.006968925707042217, 0.01936936378479004, 0.02786315605044365, 0.01820378005504608, 0.031199084594845772, 0.03970547392964363, 0.029036706313490868, -0.03059466928243637, 0.036235447973012924, 0.07170478999614716, -0.01667911186814308, -0.01101340539753437, -0.0697980523109436, -0.021786648780107498, 0.04998071491718292, -0.028688108548521996, -0.039010174572467804, 0.021418863907456398, 0.06214725598692894, 0.04039895907044411, 0.05645459145307541, -0.033198680728673935, -0.07406799495220184, 0.017776822671294212, 0.006447639781981707, 0.043232567608356476, 0.010101852007210255, -0.04655810818076134, 0.08147571235895157, 0.004094150848686695, 0.01739862561225891, 0.030124517157673836, -0.07690063118934631, -0.052621085196733475, -0.0022855987772345543, -0.015673840418457985, 0.05114475637674332, -0.03360047936439514, 0.004521837458014488, 0.0618908666074276, 0.03704285994172096, 0.02778191864490509, 0.003418290987610817, 0.0067610787227749825, 0.047493841499090195, -0.023859869688749313, -0.029445409774780273, 0.03346537426114082, 0.034516289830207825, -0.016802337020635605, -0.04014304280281067, 0.006791632156819105, -0.002121454104781151, -0.0028783741872757673, 0.01684660278260708, -0.04042469710111618, 0.05259612947702408, 0.04602207988500595, 0.061410848051309586, -0.011263732798397541, 0.0321737565100193, -0.0405983030796051, -0.00038182124262675643, -0.005659164395183325, -0.012083720415830612, -0.01608509011566639, 0.022789116948843002, 0.13133157789707184, 0.07204204797744751, -0.022923942655324936, -0.06724880635738373, 0.028110334649682045, -0.033213093876838684, -0.05162780359387398, 0.026038967072963715, -0.004468259401619434, 0.001233964110724628, -0.01147161889821291, -0.06868260353803635, -0.06032223254442215, 0.016540737822651863, -0.03490400314331055, 0.003578903852030635, 0.05421305447816849, -0.01735553704202175, 0.03656059131026268, -0.01033085212111473, -0.02270776964724064, -0.004646688234061003, -0.020040107890963554, -0.0651891827583313, 0.015425644814968109, -0.02052883245050907, -0.009736931882798672, 0.07114335149526596, 0.003379155183210969, -0.030092811211943626, -0.005530880764126778, -0.04506644234061241, 0.012908396311104298, 0.045093730092048645, 0.04484867304563522, 0.015852313488721848, 0.06278219074010849, -0.004009916912764311, -0.0009497113060206175, -0.04617691785097122, -0.05790788680315018, -0.06541437655687332, -0.041970394551754, -0.014998511411249638, 0.03920089825987816, 0.06029907241463661, 0.008196975104510784, 0.017467625439167023, -0.011683098040521145, 0.0027339262887835503, -0.006117623765021563, 0.0175937470048666, 0.008955932222306728, -0.021064143627882004, -0.00952144991606474, -0.01279765646904707, 0.05973097309470177, -0.04013334587216377, -0.03645957633852959, 0.016619034111499786, -0.05981125682592392, 0.05761082097887993, -0.04112906754016876, -0.02905404195189476, 0.027974450960755348, 0.008231845684349537, 0.06138760969042778, -0.01087451633065939, 0.004895180929452181, 0.06252839416265488, -0.01064277719706297, 0.01617264561355114, 0.02888289839029312, 0.04186425358057022, 0.04075672850012779, 0.005806957837194204, 0.005843016784638166, 0.024565838277339935, -0.008896010927855968, -0.002893142867833376, -0.05954299867153168, 0.015302144922316074, -0.00795575138181448, -0.2916896641254425, 0.026784813031554222, 0.011128123849630356, -0.03878113627433777, 0.02577185072004795, -0.02647489123046398, 0.01911069080233574, -0.037665486335754395, -0.02584548108279705, 0.010922455228865147, -0.008478814736008644, -0.06714625656604767, -0.02992659993469715, 0.0489228218793869, 0.03826160356402397, 0.012150684371590614, 0.023457784205675125, -0.03542675822973251, 0.01834891363978386, 0.06650497019290924, -0.0010183050762861967, -0.06813646852970123, -0.03661203384399414, 0.03385893628001213, 0.011713368818163872, 0.05712956190109253, -0.06147509068250656, -0.003606254467740655, -0.06365246325731277, -0.003813579911366105, -0.011560825631022453, -0.004046806134283543, -0.01073390245437622, -0.030632242560386658, 0.013307005167007446, -0.01585562899708748, 0.031130291521549225, -0.0005974206142127514, -0.02841426618397236, 0.04804474115371704, -0.02287815697491169, -0.012521921657025814, -0.002111954614520073, 0.04663725942373276, 0.07857426255941391, 0.01813421957194805, -0.02287592738866806, 0.012003599666059017, -0.01998976431787014, 0.06269583851099014, -0.021035069599747658, -0.025227883830666542, -0.010046289302408695, 0.038150884211063385, -0.02308344468474388, 0.010652284137904644, -0.009508374147117138, -0.005018720403313637, -0.05541060119867325, -0.01451205275952816, -0.00666862353682518, -0.03529425710439682, 0.0022391127422451973, -0.05300765484571457, 0.03291400521993637, -0.0656961128115654, -0.0627220869064331, 0.004159762058407068, 0.0589333213865757, 0.020991126075387, -0.031492073088884354, -0.038114458322525024, -0.013337799347937107, -0.10879671573638916, 0.005512795876711607, 0.0066612400114536285, -0.01068226620554924, 0.0060884179547429085, 0.02495897375047207, 0.05130937322974205, -0.023511802777647972, -0.07028429210186005, 0.015755362808704376, -0.002293866127729416, 0.023565126582980156, -0.009923934005200863, 0.0289166122674942, 0.01540382020175457, -0.016839470714330673, -0.016386110335588455, 0.06984621286392212, 0.028185904026031494, -0.02370259165763855, -0.01873711124062538, -0.005786407273262739, 0.06556566804647446, 0.0025878828018903732, -0.026358051225543022, 0.0063348994590342045, 0.04681913182139397, 0.03150920942425728, -0.08213672786951065, 0.018759597092866898, -0.0313468836247921, -0.038107700645923615, -0.0037205535918474197, -0.0372801274061203, -0.003913223743438721, 0.03134843707084656, -0.009264118038117886, -0.011764160357415676, -0.036904558539390564, 0.020510859787464142, -0.047783881425857544, -0.0035278149880468845, -0.04314490780234337, 0.025331301614642143, 0.029381154105067253, -0.006207551807165146, -0.015683069825172424, -0.07537757605314255, 0.034741610288619995, -0.011846807785332203, -0.015697449445724487, -0.02578096278011799, -0.03579377010464668, 0.011083980090916157, -0.012059081345796585, 0.03315046802163124, -0.014770830050110817, 0.004934481345117092, 0.03059353306889534, 0.027312252670526505, -0.015540476888418198, 0.037286367267370224, 0.01407906785607338, -0.06312594562768936, -0.03830066695809364, -0.0031214554328471422, -0.014070933684706688, -0.003854014677926898, -0.014171062968671322, 0.018250461667776108, 0.028208278119564056, 0.03487880155444145, -0.02651534043252468, 0.05722200497984886, 0.014172305352985859, 0.014064930379390717, 0.027092326432466507, -0.0029701453167945147, -0.046981338411569595, 0.042159222066402435, -0.0545203797519207, -0.016289781779050827, -0.0057548233307898045, 0.030907897278666496, -0.0053801327012479305, -0.027503035962581635, -0.04121992364525795, 0.038156960159540176, -0.02746507339179516, -0.04145069792866707, -0.019536685198545456, -0.01845918409526348, 0.06913480162620544, -0.004888132214546204, 0.013268102891743183, 0.004151538014411926, 0.016336889937520027, 0.012001996859908104, -0.029182812198996544, -0.027787979692220688, 0.012367463670670986, -0.0038640585262328386, -0.0000035126467992085963, -0.00018475664546713233, -0.026135748252272606, -0.009722394868731499, -0.019644031301140785, -0.03365602716803551, 0.01070789247751236, 0.004989315290004015, 0.01683964394032955, 0.044392701238393784, 0.030993875116109848, 0.002022902248427272, 0.0003864461905322969, -0.03305394947528839, -0.006846766918897629, -0.03665449097752571, -0.01769581064581871, -0.0018341596005484462, -0.00662005553022027, -0.03831382468342781, -0.031579770147800446, 0.008456229232251644, -0.0033524881582707167, -0.02253641001880169, 0.007193290162831545, 0.038835834711790085, -0.0057510389015078545, -0.0007530968287028372, 0.03432326391339302, 0.07268407195806503, -0.04988807812333107, 0.015822505578398705, 0.009060466662049294, 0.011287828907370567, 0.016381818801164627, 0.010309644974768162, -0.04175255447626114, -0.02671809121966362, -0.032299552112817764, 0.0014853717293590307, -0.04632449150085449, -0.047406427562236786, -0.043317604809999466, 0.01230503898113966, 0.027490094304084778, 0.011736889369785786, -0.02845214493572712, 0.004852456506341696, -0.017499659210443497, -0.020099228248000145, 0.009148181416094303, -0.04946252703666687, -0.014106660149991512, 0.06415726989507675, -0.015337374061346054, -0.0015763476258143783, -0.024281827732920647, 0.02005530335009098, -0.00036684225779026747, -0.023935312405228615, -0.009370083920657635, -0.06007684767246246, 0.028001569211483, -0.002882501808926463, 0.04129655659198761, -0.002441288437694311, -0.0001867210230557248, -0.024139413610100746, -0.009682836942374706, -0.004833641462028027, -0.02186095528304577, 0.022902654483914375, -0.028322581201791763, 0.04122665524482727, 0.04997863993048668, 0.009577167220413685, 0.0189655888825655, -0.015681467950344086, -0.012003568932414055, 0.05686774477362633, -0.031617097556591034, -0.020258154720067978, -0.02310284972190857, -0.043357882648706436, 0.022271618247032166, -0.027639158070087433, 0.017941484227776527, -0.0440787635743618, 0.009793072007596493, 0.017076464369893074, 0.027962585911154747, 0.05696827545762062, 0.009569057263433933, 0.023425955325365067, -0.0560201071202755, 0.02678108774125576, -0.09301839768886566, 0.0020184421446174383, 0.0537647120654583, 0.006187446881085634, 0.014790819957852364, 0.0033278947230428457, -0.047003526240587234, 0.020858634263277054, -0.06880491226911545, -0.005496521480381489, 0.050316739827394485, -0.010942744091153145, -0.015300233848392963, 0.025966037064790726, -0.04860636219382286, -0.020939268171787262, -0.0011021931422874331, -0.03897935152053833, 0.0015349691966548562, -0.012652604840695858, 0.055851925164461136, 0.006048803683370352, 0.021148858591914177, -0.01274513453245163, 0.005239061079919338, 0.09235766530036926, 0.03303727135062218, 0.020530056208372116, 0.0506863072514534, -0.018946345895528793, 0.058688294142484665, 0.028171543031930923, 0.02457357943058014, -0.008061431348323822, -0.0010334013495594263, -0.008675903081893921, -0.0728970319032669, 0.02892027236521244, 0.011088754050433636, -0.0360536128282547, -0.04366407170891762, 0.07914610207080841, 0.008525767363607883, -0.039488285779953, -0.0590110681951046, 0.03226017206907272, -0.059415969997644424, -0.01581300050020218, -0.010892883874475956, -0.018964853137731552, -0.027365360409021378, 0.07478230446577072, -0.010190154425799847, 0.01270580105483532, 0.06455393135547638, -0.0319543294608593, -0.023237930610775948, 0.014428246766328812, 0.07863418012857437, 0.09250565618276596, 0.06548570096492767, 0.01572512835264206, 0.06272285431623459, -0.04169274494051933, -0.0377667136490345, 0.006605938542634249, -0.007509109564125538, -0.011162620037794113, -0.03248361870646477, 0.02806483767926693, 0.0349523089826107, -0.03700195625424385, 0.06294752657413483, -0.03438054025173187, -0.030776143074035645, 0.05148054286837578, 0.026919085532426834, -0.023073889315128326, 0.06744595617055893, 0.006295872386544943, 0.0050140684470534325, -0.0007506554247811437, -0.03822527080774307, 0.05754832923412323, -0.023988114669919014, -0.00877686869353056, 0.010425183922052383, -0.012294706888496876, 0.024571549147367477, 0.03094572015106678, 0.03349330648779869, 0.09777712821960449, -0.03623780235648155, 0.011650010012090206, 0.01264948584139347, 0.016324736177921295, -0.0010747888591140509, 0.018326321616768837, -0.012784309685230255, -0.012724158354103565, -0.0007334104739129543, -0.03944910317659378, -0.005283564794808626, -0.02980702556669712, -0.016471760347485542, -0.0018170365365222096, -0.015378490090370178, -0.006101538892835379, 0.04314107447862625, -0.01930464245378971, -0.04186197370290756, -0.04772590473294258, -0.036387551575899124, -0.034738458693027496, -0.08838752657175064, -0.027098974213004112, 0.027675006538629532, -0.019824987277388573, -0.03207516670227051, 0.015513906255364418, -0.019368374720215797, -0.030734924599528313, 0.02338486909866333, -0.03109237551689148, -0.02572713978588581, 0.04104050621390343, 0.0035160095430910587, 0.02376995049417019, 0.022245705127716064, 0.05197608843445778, 0.01920047588646412, -0.023862522095441818, -0.031063662841916084, 0.025861017405986786, 0.04270356521010399, 0.012028452940285206, 0.014351910911500454, -0.06573012471199036, 0.019447412341833115, 0.03610750660300255, -0.03387751802802086, -0.07385368645191193, 0.039543624967336655, -0.0015835323138162494, -0.010161049664020538, 0.05604993924498558, -0.04642660915851593, -0.010733045637607574, -0.08429953455924988, -0.0044349865056574345, -0.029519636183977127, 0.006152237765491009, 0.036106955260038376, -0.042281050235033035, 0.07745230197906494, 0.009365017525851727, -0.03982289507985115, -0.05161600932478905, -0.00239939265884459, -0.011403834447264671, -0.020717578008770943, -0.009097559377551079, -0.017337597906589508, -0.014149438589811325, -0.09591985493898392, 0.010403851978480816, 0.06229003146290779, 0.0005047331214882433, -0.03193630650639534, 0.02807074412703514, 0.000497414031997323, -0.009266403503715992, 0.007971993647515774, -0.029171880334615707, 0.016167378053069115, -0.04493603855371475, 0.003452017204836011, -0.006045644171535969, 0.0043362807482481, -0.039487387984991074, 0.018653199076652527, 0.011486710980534554, -0.046991437673568726, 0.009981290437281132, 0.005403472110629082, -0.005955077707767487, 0.01840945892035961, -0.01564142107963562, -0.011456415057182312 ]
[ -0.1348375678062439, -0.02474374882876873, -0.03149949014186859, -0.031907953321933746, 0.007551361806690693, 0.010445544496178627, 0.01609651744365692, 0.01431975793093443, 0.028844285756349564, 0.007327275350689888, 0.022845614701509476, -0.02876325510442257, 0.007938982918858528, 0.026634875684976578, 0.0323789156973362, 0.00855984352529049, -0.02928786911070347, -0.038149453699588776, 0.0009153828141279519, 0.01738983392715454, -0.007804309483617544, -0.04121313616633415, -0.03946899250149727, -0.029168348759412766, 0.04129612073302269, 0.04607335478067398, 0.03813353180885315, -0.03620460629463196, 0.00927584245800972, -0.24073565006256104, 0.030522046610713005, -0.018409810960292816, 0.020440321415662766, -0.025897489860653877, -0.008547966368496418, 0.012180744670331478, 0.00518480408936739, 0.026959547773003578, 0.00915559846907854, 0.0022970917634665966, 0.014051983132958412, 0.052826933562755585, -0.013442441821098328, -0.009360561147332191, 0.042736154049634933, 0.004075861070305109, -0.025662939995527267, -0.013328076340258121, -0.005954540800303221, 0.00952401477843523, -0.04682648926973343, 0.006883510388433933, -0.02060285024344921, -0.009526648558676243, 0.014353684149682522, 0.017631568014621735, 0.041627977043390274, 0.05949333682656288, 0.004434911999851465, 0.00028256213408894837, 0.018160080537199974, -0.0014051860198378563, -0.136532723903656, 0.09924342483282089, 0.04207088053226471, 0.04665612056851387, -0.029200749471783638, 0.01399031188338995, 0.00039610054227523506, 0.1037527322769165, -0.010674349963665009, -0.010000393725931644, -0.029700782150030136, 0.05374028906226158, 0.02515406906604767, -0.02124703861773014, 0.0028879132587462664, 0.004657249432057142, 0.026329314336180687, -0.014723175205290318, -0.04695012792944908, -0.017547426745295525, -0.011418990790843964, -0.03843669965863228, -0.032872576266527176, 0.031179819256067276, -0.010154022835195065, 0.024710556492209435, 0.04241779446601868, 0.010416558012366295, 0.04494095593690872, 0.07638543844223022, 0.012401622720062733, -0.009208260104060173, -0.07838272303342819, 0.011465930379927158, 0.013046452775597572, 0.020411090925335884, -0.01458456926047802, 0.41157323122024536, 0.009118342772126198, -0.0233251191675663, 0.01999310590326786, 0.04896565154194832, -0.005868123844265938, -0.002289162017405033, -0.0008396372431889176, -0.05959397554397583, 0.002057634061202407, -0.04247291013598442, 0.004728259053081274, -0.013199709355831146, 0.08594360947608948, -0.0239515770226717, 0.010166849941015244, 0.011988906189799309, 0.028001653030514717, 0.03982074186205864, 0.02370154857635498, 0.007493928540498018, -0.02593286894261837, 0.009362063370645046, 0.009170562960207462, -0.00822719931602478, 0.007469988893717527, -0.027472682297229767, -0.011566453613340855, 0.07134373486042023, 0.04030371457338333, -0.019007069990038872, 0.07149600982666016, -0.07222117483615875, -0.07189016789197922, 0.004613672383129597, 0.013851074501872063, -0.0103817293420434, 0.028312228620052338, -0.019274471327662468, 0.011058198288083076, 0.009721637703478336, -0.0058771762996912, -0.0409870445728302, 0.04544132575392723, -0.04124683514237404, -0.0717703178524971, 0.09618021547794342, 0.009782609529793262, -0.04039023444056511, -0.005608657840639353, -0.013143321499228477, -0.002949965186417103, -0.005386011209338903, 0.012013467028737068, -0.07593747228384018, 0.0019686701707541943, 0.047448426485061646, 0.07399691641330719, 0.00034448568476364017, -0.07699461281299591, -0.042643263936042786, -0.06799788773059845, -0.036062367260456085, -0.048893846571445465, 0.06206437200307846, 0.03423304483294487, -0.07532947510480881, -0.02537311054766178, 0.0014996088575571775, 0.020313004031777382, -0.10635387152433395, 0.022288691252470016, 0.020422251895070076, -0.07572442293167114, 0.013364143669605255, 0.05450494959950447, -0.019867006689310074, -0.05450184643268585, -0.009809521026909351, 0.07786417752504349, 0.020847706124186516, -0.00018926835036836565, -0.012906273826956749, -0.017763404175639153, -0.002618158934637904, -0.023532072082161903, -0.06412249058485031, -0.06787394732236862, 0.0026289622765034437, -0.012734603136777878, -0.04032503813505173, 0.008450789377093315, -0.07891839742660522, -0.06577583402395248, 0.09689849615097046, -0.03300970047712326, -0.032893821597099304, 0.025333130732178688, -0.017921121791005135, 0.020252076908946037, -0.04552220553159714, -0.017113611102104187, -0.005300947465002537, -0.018533723428845406, 0.04586225375533104, -0.03582613170146942, 0.040710221976041794, 0.055343128740787506, -0.08443373441696167, 0.07092338055372238, 0.03909388929605484, -0.016875453293323517, -0.025721872225403786, -0.0364961177110672, -0.0013393935514613986, -0.015487820841372013, -0.0060189105570316315, -0.005430912598967552, -0.005677273031324148, -0.005662252195179462, 0.016697730869054794, -0.023898564279079437, -0.02406211569905281, -0.000204860873054713, -0.31720465421676636, -0.04643724486231804, -0.04589132219552994, 0.0025785916950553656, 0.04028288275003433, -0.03344237804412842, -0.009676017798483372, -0.026432523503899574, -0.006810163613408804, -0.005402798298746347, 0.06304401159286499, -0.004817381035536528, -0.01060420460999012, -0.10451360791921616, 0.0025190471205860376, 0.026031380519270897, -0.08575171232223511, -0.007004682440310717, -0.029535407200455666, 0.04172610118985176, 0.0003951229155063629, -0.011778601445257664, -0.04629535228013992, -0.07137712091207504, 0.0037081148475408554, -0.038516879081726074, 0.1313830465078354, -0.00013854977441951632, 0.07161499559879303, -0.00334878358989954, 0.026444222778081894, 0.003093250095844269, -0.01981394924223423, -0.03507054224610329, 0.01953756809234619, -0.020788131281733513, 0.0008702358463779092, -0.01958976686000824, 0.0027195392176508904, -0.045050885528326035, -0.07122685015201569, 0.021840006113052368, -0.026091624051332474, -0.04142899811267853, -0.05571642518043518, 0.024991288781166077, 0.0014119697734713554, 0.0032782943453639746, 0.008933250792324543, 0.07430451363325119, 0.025992220267653465, 0.006255272310227156, 0.014738735742866993, -0.01771053858101368, 0.017539625987410545, -0.0352664552628994, -0.05337681248784065, 0.003879527561366558, -0.013905477710068226, 0.007002369500696659, 0.02008175104856491, 0.028356537222862244, 0.029650911688804626, -0.043045610189437866, -0.007461625151336193, 0.015091713517904282, 0.025085536763072014, -0.046414490789175034, 0.04412943497300148, -0.009342432953417301, -0.018098391592502594, 0.09539135545492172, 0.03645239770412445, -0.009247750043869019, 0.02713833563029766, 0.05787885934114456, 0.008986171334981918, 0.01677415333688259, 0.004964936058968306, 0.015089837834239006, 0.01444125734269619, -0.014257472939789295, 0.025526953861117363, -0.0026529203169047832, 0.022429676726460457, -0.020754268392920494, -0.0006109686801210046, 0.0037134161684662104, 0.05567565932869911, 0.02163754589855671, 0.00008281923510367051, 0.027578335255384445, -0.002078249817714095, -0.00142377067822963, 0.030510662123560905, -0.007397418841719627, -0.28497350215911865, 0.02847176045179367, 0.08135747164487839, 0.07363411784172058, -0.0035659559071063995, -0.006234305910766125, 0.047255564481019974, -0.021945105865597725, -0.015488111414015293, -0.025377631187438965, 0.039618365466594696, 0.05051916092634201, 0.016210556030273438, 0.007364233024418354, 0.009224118664860725, -0.04965703934431076, 0.01209619827568531, -0.029127104207873344, 0.050824787467718124, 0.012661920860409737, 0.052613891661167145, 0.006096405442804098, 0.19282902777194977, 0.00018374764476902783, 0.036993321031332016, 0.0040546986274421215, -0.004186376929283142, 0.029579786583781242, 0.0688314214348793, -0.014668401330709457, -0.020457429811358452, 0.029776763170957565, 0.023023566231131554, 0.02003086544573307, 0.056177303194999695, -0.05503873527050018, -0.034454990178346634, 0.04212184622883797, 0.008385553024709225, -0.008596844971179962, 0.002750774845480919, 0.019803641363978386, -0.02127051167190075, 0.026922326534986496, 0.08993247896432877, 0.042772624641656876, 0.020642714574933052, -0.05329752340912819, -0.04361148923635483, 0.01461094431579113, -0.034857481718063354, -0.03854220360517502, 0.009106447920203209, -0.052061986178159714, -0.006666869856417179, 0.04254397749900818, 0.04351446405053139, -0.043427348136901855, 0.02427869476377964, 0.009158587083220482, -0.007689955644309521, -0.02897374890744686, 0.11548511683940887, 0.010968275368213654, 0.012552285566926003 ]
[ 0.00001616958252270706, 0.055899109691381454, -0.03480621054768562, -0.013647137209773064, -0.024134237319231033, 0.002937805140390992, 0.003156824968755245, -0.011732104234397411, -0.012748438864946365, 0.015868261456489563, -0.02890820987522602, 0.026302402839064598, 0.0546286515891552, -0.0014969228068366647, -0.021989017724990845, 0.010790704749524593, -0.017089685425162315, 0.030192015692591667, 0.029436733573675156, 0.0037825130857527256, -0.05898231267929077, 0.0009353982750326395, 0.010748149827122688, -0.037589192390441895, -0.046362340450286865, 0.0026028042193502188, -0.007004929706454277, 0.02857763133943081, 0.020990023389458656, -0.11719004809856415, -0.02261338196694851, -0.016776565462350845, -0.02068815752863884, -0.005857473239302635, -0.005586215294897556, -0.018311362713575363, -0.009504969231784344, 0.023913703858852386, 0.013819282874464989, 0.01794503815472126, 0.06494167447090149, 0.018871691077947617, 0.03854673355817795, 0.023353181779384613, 0.025105644017457962, -0.029055021703243256, -0.042798589915037155, -0.02282712049782276, -0.003642930882051587, -0.017446713522076607, -0.0381004773080349, 0.028139062225818634, 0.007395343855023384, 0.0015257286140695214, 0.004379009362310171, -0.019347786903381348, 0.007792412303388119, -0.017533762380480766, 0.011566019617021084, -0.01613978110253811, 0.010769816115498543, 0.005288271699100733, -0.04174678027629852, -0.033742520958185196, -0.023961683735251427, -0.019587213173508644, -0.03658251464366913, 0.022258635610342026, 0.004252738319337368, -0.01793993078172207, -0.015402375720441341, -0.008616379462182522, -0.00216499250382185, -0.01049050409346819, 0.008523686788976192, -0.011311201378703117, -0.013348588719964027, -0.02602354809641838, -0.0038913574535399675, 0.014583583921194077, -0.055909473448991776, -0.00671361992135644, 0.02076425962150097, -0.02535821869969368, -0.0038735796697437763, -0.007956151850521564, 0.03798520937561989, 0.012438155710697174, 0.047302573919296265, 0.004587952978909016, -0.0032072849571704865, 0.0021699152421206236, 0.019447527825832367, -0.004171435721218586, -0.08943582326173782, 0.024349132552742958, 0.01779618300497532, -0.019554728642106056, 0.02145807072520256, 0.835593581199646, 0.01561152283102274, 0.00456420611590147, 0.020336801186203957, 0.015070863999426365, 0.03114439733326435, 0.008166978135704994, 0.016251102089881897, 0.010112226940691471, 0.013578885234892368, -0.0324677973985672, -0.002780054695904255, 0.021998245269060135, 0.036544110625982285, 0.04058102145791054, 0.00300420681014657, 0.016989652067422867, -0.020491503179073334, 0.019736595451831818, 0.017229093238711357, -0.006217584945261478, 0.01875641942024231, 0.023705514147877693, 0.029313363134860992, 0.023908307775855064, 0.01195442769676447, -0.1771356463432312, -0.033731572329998016, -7.26104844149644e-33, 0.0037895701825618744, -0.031176747754216194, 0.02545047178864479, -0.014372027479112148, 0.03908461704850197, -0.019567307084798813, -0.0002200220915256068, -0.05138993263244629, 0.019072242081165314, -0.021296169608831406, -0.025874322280287743, -0.007232132833451033, -0.013902781531214714, -0.023901544511318207, 0.016984855756163597, -0.017239876091480255, -0.009118779562413692, 0.033472444862127304, 0.0004093652532901615, -0.004917734768241644, 0.01883012056350708, 0.032466690987348557, 0.019905244931578636, 0.013174302875995636, 0.034563098102808, 0.043503597378730774, 0.005876666866242886, -0.01567613147199154, 0.0041452739387750626, -0.04066353291273117, -0.01580883376300335, 0.015247726812958717, -0.03255000337958336, -0.03169615566730499, -0.010258017107844353, -0.017644517123699188, -0.03197864815592766, 0.007659202441573143, -0.01918923109769821, -0.04451049119234085, -0.025662101805210114, -0.012978673912584782, -0.02260623872280121, -0.022695524618029594, -0.04406740143895149, -0.006323052570223808, 0.05573609843850136, 0.008955850265920162, -0.0062076495960354805, 0.008418604731559753, -0.005876713432371616, -0.015383435413241386, 0.01702641323208809, -0.007027843967080116, -0.021419379860162735, 0.009043924510478973, 0.016859358176589012, 0.005129430443048477, -0.0031682243570685387, 0.02575640007853508, 0.024685563519597054, -0.02728271298110485, -0.015188748948276043, 0.029493574053049088, -0.005261384416371584, -0.005462960340082645, -0.00667393347248435, 0.015714852139353752, 0.04383951798081398, 0.012202206999063492, -0.03195622190833092, -0.012867966666817665, -0.0004439222684595734, -0.03676890954375267, 0.014815771952271461, -0.01759551651775837, -0.007519475184381008, -0.016184981912374496, -0.0014464814448729157, 0.0044477637857198715, 0.03821420669555664, 0.014543218538165092, -0.04634661599993706, -0.047506045550107956, 0.017379652708768845, -0.003236927557736635, -0.009785807691514492, -0.011285456828773022, -0.021445855498313904, 0.048117496073246, 0.013642641715705395, 0.005791507661342621, -0.005244618747383356, 0.01824638620018959, -0.012036565691232681, 7.128296925722202e-33, -0.014504527673125267, 0.00791105069220066, -0.0223085880279541, -0.009747936390340328, 0.026151509955525398, -0.04192464053630829, 0.05038781464099884, 0.011285117827355862, -0.01801494136452675, -0.016047315672039986, -0.010613277554512024, 0.008862335234880447, -0.0036802554968744516, 0.06501322239637375, 0.05321145057678223, -0.011931916698813438, 0.041292812675237656, 0.050972163677215576, 0.009474329650402069, 0.009763930924236774, 0.002022598637267947, -0.0027165487408638, -0.029348844662308693, -0.001631127088330686, 0.03846943750977516, 0.050246261060237885, 0.02623879164457321, 0.01754079945385456, 0.01978774555027485, 0.004602862987667322, 0.001970168435946107, -0.015352158807218075, -0.003770639654248953, 0.029106730595231056, -0.022300392389297485, 0.020274978131055832, 0.02828165329992771, -0.023394085466861725, -0.025661485269665718, -0.00005295481241773814, 0.031045638024806976, 0.007322174962610006, -0.02639920637011528, 0.053976114839315414, 0.010406117886304855, 0.04273095354437828, 0.013223400339484215, 0.04108671098947525, -0.009406964294612408, -0.022381052374839783, -0.005464326590299606, 0.010879695415496826, 0.0013426939258351922, 0.017761915922164917, 0.019670281559228897, -0.018925737589597702, -0.026593726128339767, 0.040012333542108536, -0.03057427704334259, 0.010001609101891518, -0.041004084050655365, 0.004114910494536161, -0.05239633843302727, 0.024524632841348648, 0.0029128994792699814, 0.050962164998054504, -0.04459940269589424, -0.0428042933344841, -0.0599934458732605, 0.005362928844988346, -0.025883466005325317, 0.0005110861966386437, -0.009861175902187824, -0.0015203417278826237, -0.004276781342923641, 0.011991010047495365, -0.03281793370842934, -0.003808910958468914, 0.008118650875985622, 0.00788345281034708, 0.027602914720773697, -0.020422212779521942, -0.02741415612399578, -0.0019930184353142977, -0.010762174613773823, 0.0063385628163814545, -0.024050932377576828, -0.00495041674003005, 0.028673559427261353, -0.027933117002248764, 0.04538033530116081, -0.011904356069862843, -0.0036381464451551437, 0.02536133863031864, 0.008092953823506832, -1.2809078242526084e-8, -0.018690453842282295, 0.028706546872854233, 0.0036642190534621477, 0.02066606841981411, 0.021725645288825035, 0.03722526878118515, 0.014533119276165962, -0.03429947420954704, -0.04011400789022446, -0.019165681675076485, 0.0576169528067112, -0.024367952719330788, -0.016483711078763008, 0.013100355863571167, 0.010562184266746044, -0.05920955911278725, -0.048270806670188904, -0.002270527882501483, 0.03284386545419693, 0.027333419770002365, 0.0024194656871259212, 0.041840557008981705, -0.03161413595080376, 0.020998477935791016, -0.03727024793624878, -0.02060411311686039, 0.02910691313445568, -0.09054159373044968, 0.016190355643630028, -0.027888746932148933, -0.003842804115265608, -0.02406672015786171, -0.020273476839065552, 0.050028108060359955, -0.039139524102211, -0.04319154843688011, 0.0294876080006361, -0.007532309740781784, 0.05716495215892792, 0.0072194612585008144, 0.00698522524908185, -0.0071498011238873005, -0.03131634369492531, -0.03594173863530159, -0.031601499766111374, 0.02072647586464882, -0.055442068725824356, 0.004160596523433924, 0.02110976353287697, -0.04848520830273628, 0.004562385845929384, 0.008292711339890957, 0.004999024793505669, -0.004288975149393082, 0.03951137512922287, 0.0205168928951025, -0.002850672695785761, -0.025327879935503006, -0.024186238646507263, 0.03399307280778885, 0.018987569957971573, 0.02207367680966854, 0.011347029358148575, -0.0356060154736042 ]
r-snakes-and-ladders-markov-chain
https://markhneedham.com/blog/2015/04/09/r-snakes-and-ladders-markov-chain
false
2015-04-30 07:48:38
Deliberate Practice: Building confidence vs practicing
[ "software-development" ]
[ "Software Development", "Deliberate Practice" ]
A few weeks ago I wrote about the http://www.markhneedham.com/blog/2015/04/07/neo4j-the-learning-to-cycle-dependency-graph/[learning to cycle dependency graph] which described some of the skills required to become proficient at riding a bike. image::{{<siteurl>}}/uploads/2015/04/IMG_20150430_073120.jpg[IMG 20150430 073120,300] While we've been practicing various skills/sub skills I've often found myself saying the following: ____ if it's not hard you're not practicing me, April 2015 ____ i.e. you should find the skill you're currently practicing difficult otherwise you're not stretching yourself and therefore aren't getting better. For example, in cycling you could be very comfortable riding with both hands on the handle bars and find using one hand a struggle. However, if you don't practice that you won't be able to indicate and turn corners. This ties in with all my reading about deliberate practice which suggests that the type of exercises you do while deliberately practicing aren't intended to be fun and are meant to http://www.markhneedham.com/blog/2015/04/25/deliberate-practice-watching-yourself-fail/[expose your lack of knowledge]. In an ideal world we would spend all our time practicing these challenging skills but in reality there's some part of us that wants to feel that we're actually improving by spending some of the time doing things that we're good at. Doing things you're not good at is a bit of a slog as well so we might find that we have less motivation for this type of thing. We therefore need to find *a balance between doing challenging exercises and having fun building something* or writing code that we already know how to do. I've found the best way to do this is to combine the two types of work into mini projects which contain some tasks that we're already good at and some that require us to struggle. For me this might involved cleaning up and importing a data set into Neo4j, which I'm comfortable with, and combining that with something else that I want to learn. For example in the middle of last year I did some http://www.markhneedham.com/blog/2014/05/31/neo4jr-analysing-london-nosql-meetup-membership/[meetup analysis] which involved creating a Neo4j graph of London's NoSQL meetups and learning a bit about R, dplyr and linear regression along the way. In January I built a http://www.markhneedham.com/blog/2015/02/19/pythons-pandas-vs-neo4js-cypher-exploring-popular-phrases-in-how-i-met-your-mother-transcripts/[How I met your mother graph] and then spent a few weeks learning various algorithms for extracting topics from free text to give even more ways to explore the dataset. Most recently I've been practicing exercises from http://www.greenteapress.com/thinkbayes/[Think Bayes] and while it's good practice I think I'd probably spend more time doing it if I linked it into a mini project with something I'm already comfortable with. I'll go off and have a think what that should be!
null
null
[ 0.047968775033950806, -0.008031212724745274, 0.012340259738266468, 0.01597719080746174, 0.08742187172174454, 0.007895216345787048, 0.06354471296072006, 0.025040708482265472, 0.014928503893315792, -0.027921954169869423, 0.007825333625078201, 0.0003918956790585071, -0.04276915267109871, 0.013402923010289669, -0.027592714875936508, 0.056798990815877914, 0.07921373099088669, 0.008777298964560032, 0.008606594987213612, -0.006167002022266388, 0.033363860100507736, 0.06322388350963593, 0.03640730679035187, 0.04445809870958328, 0.05352078005671501, 0.0141471978276968, 0.0157732255756855, 0.0051704272627830505, -0.04814119637012482, -0.01796710677444935, 0.03877684473991394, 0.0050553870387375355, 0.02951536886394024, -0.011319712735712528, 0.03972235321998596, -0.013321170583367348, -0.025883609429001808, -0.005932386964559555, 0.010279431939125061, -0.009617101401090622, -0.07282403111457825, 0.0376567579805851, -0.02178211323916912, 0.024005185812711716, -0.03746677190065384, 0.006155319046229124, -0.03634403645992279, 0.009798412211239338, 0.030384883284568787, -0.013457215391099453, -0.07908997684717178, 0.03263567388057709, 0.022144746035337448, 0.02201239764690399, -0.01710445061326027, 0.04525056481361389, 0.02449982613325119, -0.054361458867788315, 0.04509473964571953, -0.03884477913379669, -0.018366927281022072, -0.0036887619644403458, -0.02225521020591259, 0.030859963968396187, 0.004153805319219828, -0.04992043972015381, 0.01725100725889206, 0.0487210638821125, -0.04359203577041626, 0.01454674918204546, -0.005205901805311441, 0.003856773255392909, -0.00604978809133172, -0.0014509550528600812, 0.009534327313303947, -0.0649934858083725, 0.014085733331739902, 0.0583379864692688, 0.027453213930130005, 0.03562893345952034, -0.010561969131231308, 0.03451045975089073, 0.004126477055251598, 0.022847367450594902, -0.013166753575205803, -0.039724189788103104, 0.020943203940987587, -0.04044617712497711, -0.07009027898311615, 0.05173084884881973, -0.002205168129876256, -0.04812322556972504, 0.01664911024272442, 0.03138614818453789, -0.008338866755366325, 0.0030147098004817963, 0.022341398522257805, -0.0033815749920904636, -0.0026030014269053936, -0.03477372229099274, -0.011816094629466534, -0.03465083986520767, -0.008611544966697693, 0.01534942351281643, -0.08225177973508835, -0.01790645718574524, -0.004660894628614187, -0.011115802451968193, 0.0037247079890221357, -0.014000325463712215, -0.030532067641615868, 0.012456318363547325, -0.022063862532377243, 0.0026155144441872835, -0.06623940169811249, 0.05768769234418869, 0.005212896503508091, -0.02222859114408493, -0.049635302275419235, -0.010437133722007275, 0.030792899429798126, 0.021285217255353928, 0.0013272182550281286, 0.08397722989320755, -0.018130948767066002, 0.031378373503685, -0.010760319419205189, 0.05616283416748047, -0.005109012592583895, -0.054179247468709946, -0.008855282329022884, 0.060823705047369, -0.025777844712138176, -0.009406950324773788, -0.005749895703047514, -0.038558196276426315, 0.016460314393043518, 0.009137168526649475, 0.03076663613319397, 0.06059901788830757, -0.005385082680732012, -0.05722943693399429, 0.04847835749387741, 0.009509352967143059, 0.0281950943171978, -0.0000622972147539258, -0.00948550458997488, -0.023025646805763245, -0.03955436125397682, -0.018887190148234367, 0.021857034415006638, 0.023477770388126373, 0.005739101208746433, -0.023942051455378532, 0.013110480271279812, 0.10652559250593185, 0.027530565857887268, 0.019595487043261528, -0.026674184948205948, 0.031183673068881035, 0.04177533835172653, 0.010933054611086845, 0.017520520836114883, 0.027120966464281082, 0.0001459398481529206, -0.024212202057242393, -0.004501798190176487, 0.04136720672249794, -0.02145879529416561, 0.016479134559631348, -0.043725281953811646, -0.035550493746995926, 0.050649505108594894, -0.04743998497724533, -0.05122389271855354, 0.05362221226096153, 0.06753365695476532, 0.022094720974564552, 0.028347013518214226, 0.0036659983452409506, -0.07647021859884262, 0.05284641683101654, 0.027657950296998024, 0.025820009410381317, 0.005461603403091431, -0.018940294161438942, 0.06470639258623123, 0.02316979691386223, 0.004787408281117678, 0.06132645159959793, -0.07100240141153336, -0.09498345106840134, 0.006862433161586523, -0.03703604266047478, 0.06577234715223312, -0.014853443950414658, 0.025112003087997437, 0.05300077050924301, -0.019899824634194374, 0.04975222796201706, 0.010891778394579887, -0.014451086521148682, 0.013017285615205765, -0.03692883998155594, -0.04112042859196663, 0.0809401124715805, 0.023710448294878006, -0.04049017280340195, -0.04901759326457977, 0.005636222194880247, -0.000047360263124573976, -0.022480392828583717, 0.031196095049381256, -0.014902379363775253, 0.025677749887108803, 0.023246217519044876, 0.05555116757750511, 0.005563626065850258, 0.03363734483718872, -0.023458965122699738, -0.0008496611262671649, 0.003729679621756077, -0.019643552601337433, 0.01792481727898121, 0.0012340473476797342, 0.10457409173250198, 0.03900023177266121, -0.04456203430891037, -0.04119311273097992, 0.024753868579864502, 0.01438865065574646, -0.0313652865588665, 0.014735273085534573, 0.020083853974938393, 0.015070169232785702, -0.009882619604468346, -0.04675056040287018, -0.045095715671777725, 0.008067221380770206, -0.05758630111813545, -0.00436306232586503, 0.06506133824586868, -0.035759177058935165, 0.06669887155294418, -0.02457282692193985, 0.00784935150295496, 0.0016688989708200097, 0.007352518383413553, -0.07002487033605576, 0.010509639047086239, 0.007382076699286699, -0.016650283709168434, 0.0573064349591732, -0.004570461343973875, -0.025564806535840034, -0.05308743193745613, -0.04057435318827629, 0.028000924736261368, 0.05790916085243225, 0.05355840176343918, -0.00794375129044056, 0.04818207398056984, -0.015385441482067108, 0.03188782185316086, -0.014227054081857204, -0.03721844032406807, -0.044486988335847855, -0.057366885244846344, 0.033693816512823105, 0.00488666445016861, 0.0085291201248765, 0.01209304854273796, 0.039537183940410614, 0.03107611835002899, 0.006608643103390932, -0.006267528980970383, 0.037011537700891495, 0.015544665046036243, -0.0023760958574712276, -0.03915996477007866, -0.04385724663734436, 0.05673695355653763, -0.026870891451835632, -0.0015565701760351658, 0.0002609590592328459, -0.05797523260116577, 0.051327142864465714, -0.038747936487197876, -0.05388501286506653, 0.005361932795494795, 0.016525547951459885, 0.051586855202913284, 0.035751715302467346, -0.003377198241651058, 0.060100506991147995, 0.011155767366290092, 0.018657071515917778, -0.004224895033985376, -0.011769280768930912, 0.047356270253658295, 0.005505535285919905, 0.013164780102670193, 0.031655363738536835, -0.006358353421092033, 0.008988725952804089, -0.013374282978475094, 0.016374949365854263, -0.018992101773619652, -0.2933536171913147, 0.05465390905737877, -0.001727356924675405, -0.03589485213160515, 0.022666729986667633, -0.048745617270469666, -0.01224237959831953, -0.047017741948366165, -0.04191964492201805, 0.020616857334971428, -0.025889825075864792, -0.03086608462035656, -0.015644652768969536, 0.04322562366724014, 0.002750626066699624, 0.009813656099140644, 0.027112137526273727, -0.06227607652544975, -0.004428803455084562, 0.04998215287923813, -0.001599504379555583, -0.05128219723701477, -0.015084996819496155, 0.020638559013605118, 0.029355734586715698, 0.05898083746433258, -0.10870373249053955, 0.037587400525808334, -0.07975952327251434, -0.009700299240648746, -0.010140436701476574, 0.006641800049692392, 0.015165729448199272, -0.010416088625788689, -0.004939858336001635, -0.0033039723057299852, 0.047692686319351196, 0.00811727438122034, 0.010971161536872387, 0.017591409385204315, -0.04437091574072838, -0.05510884150862694, -0.014153959229588509, 0.01997445710003376, 0.07854121178388596, 0.0073335967026650906, -0.08276742696762085, -0.005745066329836845, -0.01927061192691326, 0.07267505675554276, -0.03927873075008392, -0.041592229157686234, -0.011292664334177971, 0.028105366975069046, 0.0076616243459284306, -0.023813767358660698, -0.001719328691251576, -0.015368081629276276, -0.04205889254808426, -0.04096623510122299, -0.022682473063468933, -0.031696923077106476, -0.0041153328493237495, -0.05747061222791672, -0.0058463215827941895, -0.06846514344215393, -0.06362058967351913, -0.03468530625104904, 0.06332843005657196, 0.021956926211714745, -0.03626253828406334, 0.03548872098326683, 0.0038406981620937586, -0.09650442749261856, -0.015395580790936947, -0.01067790575325489, -0.014770740643143654, -0.0033418431412428617, -0.001456499914638698, 0.05721495673060417, -0.04957040771842003, -0.0687294751405716, 0.023900216445326805, 0.011381060816347599, 0.04487857595086098, 0.008325643837451935, 0.03718288987874985, -0.007348416373133659, -0.022933082655072212, 0.024580741301178932, 0.06779895722866058, 0.019872575998306274, -0.028942778706550598, 0.0018242504447698593, 0.008616514503955841, 0.043268121778964996, 0.02088867872953415, -0.030896607786417007, 0.0038881287910044193, 0.020811188966035843, 0.017209367826581, -0.05602419376373291, 0.03802919015288353, 0.01288523431867361, -0.008315559476613998, -0.02147994190454483, -0.04788763076066971, 0.038159262388944626, 0.04333377629518509, 0.009814045391976833, 0.0014186607440933585, -0.028778964653611183, 0.016574889421463013, -0.02470727637410164, -0.0433376170694828, -0.021468162536621094, 0.01560412161052227, 0.03549106419086456, 0.032280273735523224, -0.013331003487110138, -0.04563001170754433, 0.023268897086381912, 0.004073163960129023, -0.011605768464505672, -0.06624201685190201, -0.007795268669724464, -0.0016255018999800086, -0.04082057252526283, 0.005339645314961672, 0.018274258822202682, -0.011268027126789093, 0.034737732261419296, 0.03219937905669212, -0.03712237998843193, 0.0014828104758635163, -0.02124522626399994, -0.0692475438117981, -0.021516593173146248, 0.026028815656900406, -0.021214697510004044, -0.00906816404312849, 0.021553097292780876, -0.004198317416012287, 0.03631594777107239, 0.04529748484492302, 0.019738242030143738, 0.010515451431274414, -0.029104556888341904, 0.008822886273264885, 0.020264407619833946, 0.019344909116625786, -0.05200543999671936, -0.0003925101482309401, -0.03379017487168312, -0.01624884083867073, -0.006533873733133078, 0.022006049752235413, -0.022941213101148605, -0.01669028215110302, -0.002121142577379942, 0.01574437879025936, -0.06594937294721603, -0.017330816015601158, -0.028194980695843697, 0.02394096925854683, 0.05344344303011894, -0.021397404372692108, 0.0017176972469314933, -0.011176087893545628, -0.018904421478509903, 0.023140139877796173, 0.0062157223001122475, -0.056207120418548584, -0.010289371013641357, 0.002533462131395936, -0.002130830194801092, -0.014610514976084232, -0.0013435502769425511, 0.04842628911137581, 0.0069665564224123955, -0.017628692090511322, -0.024670638144016266, 0.005053345579653978, -0.010672369971871376, 0.051290083676576614, 0.016399797052145004, -0.001990174874663353, -0.02112223021686077, -0.017876263707876205, -0.012701021507382393, -0.01979871466755867, 0.009808458387851715, -0.01005874015390873, 0.03405626118183136, -0.020925264805555344, -0.04682748764753342, 0.0476490780711174, 0.01237539853900671, 0.0019360240548849106, 0.058039892464876175, 0.00010067007679026574, -0.0233929343521595, -0.018137626349925995, 0.03836853802204132, 0.0740584209561348, -0.06371099501848221, -0.015705544501543045, 0.0005022808909416199, 0.003936628345400095, -0.004392344504594803, -0.006211802829056978, -0.053112179040908813, -0.026845674961805344, -0.021533533930778503, 0.018155068159103394, -0.0681242123246193, -0.031534865498542786, -0.027475405484437943, -0.0024535413831472397, 0.00005747694740421139, 0.013920444995164871, 0.005354754626750946, -0.02631702646613121, -0.023951299488544464, -0.008005796000361443, 0.023082222789525986, -0.049674082547426224, -0.00953708030283451, 0.02771063707768917, -0.03769941255450249, -0.00040503984200768173, -0.0053196134977042675, 0.013758247718214989, 0.019188014790415764, -0.03193803131580353, -0.0019074843730777502, -0.03558315709233284, 0.028253141790628433, 0.003629989456385374, 0.04325686767697334, 0.003314846893772483, -0.01018649060279131, -0.04744882136583328, -0.014107363298535347, -0.0254186000674963, 0.0109866913408041, -0.04076578840613365, -0.0042856414802372456, 0.021622788161039352, 0.04172622784972191, 0.041337862610816956, 0.021181071177124977, -0.014854494482278824, -0.025166776031255722, 0.05521596968173981, -0.05269458889961243, -0.04042829945683479, -0.041142892092466354, -0.038659222424030304, 0.0061835055239498615, 0.02761806920170784, 0.02231847494840622, -0.01798790879547596, 0.03476172313094139, 0.026558086276054382, 0.03851892054080963, 0.021072234958410263, -0.023971611633896828, 0.018103204667568207, -0.0570220984518528, -0.022435098886489868, -0.07799145579338074, -0.002274006837978959, 0.01993110030889511, 0.009276270866394043, -0.016606755554676056, -0.0004240515117999166, -0.03804107382893562, 0.02981528639793396, -0.08225779980421066, -0.008309089578688145, 0.04013897851109505, -0.016803104430437088, -0.009244325570762157, -0.014786110259592533, -0.06745654344558716, 0.00939012598246336, 0.01817544549703598, -0.03985443711280823, -0.020339274778962135, -0.02568737417459488, 0.028990069404244423, -0.012751160189509392, 0.026307379826903343, -0.019562575966119766, -0.013042381964623928, 0.08354989439249039, 0.0059048510156571865, 0.0005611146916635334, 0.04937487840652466, -0.02035706862807274, 0.03901181370019913, 0.034937404096126556, 0.014931709505617619, -0.00959525816142559, 0.01625254563987255, -0.009540175087749958, -0.057757921516895294, 0.0384574793279171, 0.001919216476380825, -0.03045322559773922, -0.042529698461294174, 0.06224935129284859, 0.020812444388866425, -0.03591208904981613, -0.04534635320305824, 0.021022211760282516, -0.040406592190265656, -0.021119553595781326, -0.00733135174959898, 0.012160828337073326, -0.039325688034296036, 0.050733525305986404, -0.034669142216444016, 0.009298228658735752, 0.06622370332479477, -0.012365001253783703, -0.04405507817864418, -0.001649448531679809, 0.10457108914852142, 0.07069131731987, 0.049511928111314774, 0.009588864631950855, 0.08149893581867218, 0.00432441383600235, -0.028654830530285835, 0.02008342184126377, -0.005795313511043787, -0.014231058768928051, -0.023053865879774094, 0.024639923125505447, 0.046287901699543, -0.01927405595779419, 0.08564846217632294, -0.01826532557606697, -0.04328145086765289, -0.0006773575441911817, 0.01370950136333704, 0.018199803307652473, 0.06452208012342453, 0.015632715076208115, 0.04700483754277229, -0.02464701049029827, -0.03737353906035423, 0.017049716785550117, -0.02764633484184742, 0.0023924701381474733, 0.030988553538918495, -0.03709352761507034, 0.006833258550614119, 0.04070050269365311, 0.02507433108985424, 0.08658814430236816, -0.07117509841918945, 0.026324870064854622, -0.019522279500961304, 0.034703440964221954, -0.002630123170092702, -0.006032839417457581, -0.007155927363783121, -0.00367721333168447, -0.0029082803521305323, -0.04655176401138306, -0.031938038766384125, -0.027731357142329216, -0.021475067362189293, 0.00569412624463439, -0.03517869859933853, -0.008418797515332699, 0.012587440200150013, -0.017934080213308334, -0.024243725463747978, -0.0635579377412796, -0.02220733091235161, -0.04190845414996147, -0.06558260321617126, -0.008900699205696583, -0.002102595753967762, -0.018115852028131485, -0.025203581899404526, -0.00036390323657542467, -0.02084691822528839, -0.05366962030529976, 0.05977470055222511, -0.05381555110216141, -0.020987994968891144, 0.012017072178423405, 0.04171282425522804, 0.031617119908332825, 0.012006351724267006, 0.03341193124651909, 0.007294432260096073, -0.0005977521650493145, -0.0017655264819040895, -0.008198714815080166, 0.03525451198220253, 0.003932385239750147, 0.007529087830334902, -0.0832940936088562, 0.003783809719607234, 0.015457474626600742, -0.011783383786678314, -0.06847992539405823, 0.016549142077565193, 0.04600236937403679, 0.014783891849219799, 0.054743390530347824, -0.032128460705280304, -0.013610715046525002, -0.045281969010829926, 0.0020431613083928823, 0.006624376401305199, 0.0062018209137022495, 0.0416128896176815, -0.019732439890503883, 0.07909117639064789, 0.006961065344512463, -0.020265916362404823, -0.03440886363387108, -0.03631172701716423, 0.007971945218741894, -0.010235547088086605, -0.04356299713253975, -0.025630634278059006, -0.016713585704565048, -0.1042049303650856, -0.03200221806764603, 0.01393128465861082, -0.006933458149433136, -0.02948937937617302, 0.013336023315787315, 0.005733315832912922, -0.0011904076673090458, 0.034720927476882935, -0.02876320295035839, 0.04256654903292656, -0.020545048639178276, 0.007556813303381205, 0.002532269572839141, 0.006724359001964331, -0.00995201338082552, 0.011788067407906055, 0.017798911780118942, -0.06558387726545334, 0.014163591898977757, -0.009535294026136398, 0.025572756305336952, 0.041333116590976715, 0.005880256649106741, -0.006570562720298767 ]
[ -0.06080421432852745, -0.01992197148501873, 0.009389571845531464, -0.017202913761138916, -0.009515454061329365, 0.019572190940380096, 0.010861949995160103, 0.004615647252649069, 0.0005292481509968638, -0.01614321954548359, -0.0073709250427782536, -0.05106531083583832, -0.00015218681073747575, 0.019623879343271255, 0.06270572543144226, 0.007168609648942947, -0.010201760567724705, -0.028378400951623917, 0.007600058801472187, 0.024424100294709206, -0.04591688513755798, 0.004834935534745455, -0.001492743263952434, -0.020423175767064095, 0.051385749131441116, 0.014457113109529018, 0.03781642019748688, -0.01904415339231491, -0.0021910667419433594, -0.1604185253381729, -0.009326674975454807, 0.01853230595588684, 0.013529918156564236, -0.022119659930467606, -0.02859351597726345, 0.06989549845457077, -0.026121962815523148, 0.043106526136398315, -0.02176416665315628, 0.03867807984352112, 0.033536527305841446, 0.019102461636066437, -0.032932888716459274, -0.014767776243388653, 0.05303233489394188, 0.04995293915271759, 0.0026616863906383514, -0.0345887616276741, 0.019946537911891937, -0.005861796438694, -0.07087191194295883, -0.05497876554727554, -0.0012168900575488806, -0.025730900466442108, 0.01317924726754427, 0.014191151596605778, 0.041458260267972946, 0.06352397799491882, 0.014515799470245838, 0.0475732795894146, 0.002744309836998582, 0.025791330263018608, -0.13233304023742676, 0.07903149724006653, 0.02188863605260849, 0.04780104011297226, -0.032324519008398056, 0.009362972341477871, -0.006220453884452581, 0.09455502778291702, 0.00222427467815578, -0.008019535802304745, -0.02539023756980896, 0.05660510063171387, 0.01454155519604683, 0.009826654568314552, -0.0007194619392976165, -0.022809389978647232, 0.025331765413284302, -0.04256000742316246, -0.009856506250798702, 0.016827454790472984, -0.01048633735626936, -0.01337305549532175, -0.03167767822742462, 0.032765742391347885, -0.051681436598300934, 0.01633015088737011, 0.0206469614058733, 0.05626032128930092, 0.007729232776910067, 0.024548595771193504, 0.023262491449713707, 0.0005319834453985095, -0.07091404497623444, -0.04191797226667404, 0.0026753577403724194, 0.015095646493136883, -0.06940129399299622, 0.4473690092563629, -0.024521181359887123, 0.0013523231027647853, 0.05910433456301689, 0.05743156746029854, -0.009471584111452103, -0.02007986791431904, 0.02781451679766178, -0.06533795595169067, 0.016491590067744255, -0.01841690018773079, 0.03603983670473099, 0.007375229150056839, 0.03225606307387352, -0.053703732788562775, -0.019900938495993614, 0.040172379463911057, 0.04256446287035942, 0.025772910565137863, -0.0023037497885525227, 0.01987433433532715, -0.03506103903055191, -0.0010486927349120378, 0.03262998163700104, -0.007339318282902241, -0.01624864898622036, -0.056569136679172516, 0.0018383513670414686, 0.06504687666893005, 0.05803646519780159, -0.024794364348053932, 0.06790968030691147, -0.027301285415887833, -0.05462032929062843, 0.024284880608320236, 0.0022889068350195885, -0.012076891958713531, 0.03749552369117737, -0.025529969483613968, 0.02067149430513382, 0.054719194769859314, 0.0382099486887455, -0.009369056671857834, 0.054427098482847214, -0.03243853896856308, -0.02503172680735588, 0.09756085276603699, 0.009091878309845924, -0.030855707824230194, 0.004486335441470146, -0.024807801470160484, -0.01870032399892807, 0.006731197237968445, -0.01110375951975584, -0.042242441326379776, 0.025107119232416153, -0.008679294027388096, 0.1168643981218338, -0.02247057668864727, -0.08773912489414215, -0.01335416454821825, -0.03586844354867935, -0.03094607964158058, -0.07635532319545746, 0.026499126106500626, 0.08952372521162033, -0.05590125173330307, -0.02118072472512722, -0.010903846472501755, -0.0065231588669121265, -0.07133372128009796, 0.023646872490644455, -0.012657449580729008, -0.03566260635852814, 0.022837484255433083, 0.09620463103055954, -0.02533644624054432, -0.045530855655670166, -0.00941869430243969, 0.03781703859567642, 0.04501982405781746, 0.05845598131418228, -0.030833175405859947, -0.004300296306610107, -0.005956591572612524, -0.058283112943172455, -0.04175185412168503, -0.06405239552259445, -0.003833245486021042, 0.008813132531940937, -0.020340433344244957, -0.03449023514986038, -0.027583518996834755, -0.10948892682790756, 0.08505667746067047, -0.05254089832305908, -0.03317761793732643, 0.01157902181148529, -0.013272291980683804, -0.052288856357336044, -0.004709532018750906, -0.056518781930208206, 0.012942683883011341, 0.017498526722192764, 0.018990222364664078, -0.04968738555908203, 0.02534674108028412, 0.05212429538369179, -0.05925741419196129, 0.11921003460884094, 0.06551104784011841, -0.046185124665498734, -0.031191250309348106, 0.0305568128824234, 0.016010483726859093, 0.023215753957629204, -0.00822568777948618, 0.020941246300935745, 0.010710288770496845, -0.025222912430763245, 0.020048897713422775, -0.03417292237281799, -0.009308972395956516, -0.013700731098651886, -0.3342941403388977, -0.05518229305744171, 0.0010591124882921576, 0.020070675760507584, 0.040929555892944336, -0.015101597644388676, 0.0145289096981287, -0.002373924944549799, -0.0030347020365297794, -0.007254731375724077, 0.06064748764038086, -0.03204986825585365, -0.023766735568642616, -0.09061083197593689, 0.006141311954706907, 0.017884081229567528, -0.02241547964513302, -0.0384952686727047, -0.019315466284751892, 0.021841995418071747, 0.010010109283030033, -0.018549133092164993, -0.0008688202360644937, -0.06108568236231804, -0.011478631757199764, -0.014433799311518669, 0.10744652152061462, 0.020160064101219177, 0.038933612406253815, -0.024531353265047073, 0.008248668164014816, -0.004714043345302343, 0.00013404033961705863, -0.11491326987743378, -0.013755721040070057, -0.04290705546736717, 0.03458992391824722, -0.04977504536509514, 0.0012412690557539463, -0.042729031294584274, -0.03369218111038208, 0.011486580595374107, -0.06566151976585388, -0.03921499848365784, -0.10275452584028244, 0.019370848312973976, -0.025310169905424118, -0.0076628150418400764, -0.026567133143544197, 0.05868225917220116, 0.04067133367061615, 0.032550711184740067, 0.0014713143464177847, -0.0285918191075325, -0.022910423576831818, -0.014964953064918518, -0.11183149367570877, 0.016986150294542313, 0.0017327331006526947, 0.003196996869519353, -0.005066500045359135, 0.04978383332490921, 0.05896022170782089, -0.08602739125490189, 0.017454558983445168, 0.039663683623075485, -0.009285678155720234, -0.01668749563395977, 0.03908461704850197, -0.016418376937508583, -0.018440766260027885, 0.08170527964830399, 0.009311642497777939, -0.01584363356232643, 0.028835074976086617, 0.01586083136498928, -0.03820149973034859, 0.037571195513010025, 0.04950329661369324, 0.0008489022147841752, -0.008049660362303257, -0.05097344517707825, 0.039673808962106705, -0.008345235139131546, -0.03232182562351227, 0.0011417155619710684, 0.0038215364329516888, -0.060052309185266495, 0.07760891318321228, 0.02172459475696087, -0.010346164926886559, 0.029174592345952988, -0.035998471081256866, -0.0372183658182621, 0.08232209086418152, -0.020685095340013504, -0.24162521958351135, 0.01645006611943245, 0.0636734664440155, 0.07128556072711945, -0.007172414101660252, 0.024185748770833015, 0.05271942913532257, -0.006405035965144634, -0.012930361554026604, 0.019649596884846687, 0.04563707858324051, 0.02609960362315178, -0.0020966341253370047, 0.01807367242872715, 0.0022318146657198668, -0.023495923727750778, 0.04003901407122612, 0.03129418566823006, 0.024276914075016975, -0.02073085680603981, 0.030785556882619858, 0.03243730962276459, 0.13851173222064972, 0.01917378045618534, 0.02911972813308239, -0.003462045919150114, -0.037154268473386765, -0.006914918310940266, 0.07173123210668564, -0.03858763724565506, -0.032453861087560654, 0.025956735014915466, 0.009215844795107841, 0.05181216448545456, 0.017586153000593185, -0.07105696201324463, -0.04391804710030556, 0.0252302885055542, 0.015006707981228828, -0.032386165112257004, 0.03915895149111748, -0.01979202777147293, -0.009039177559316158, 0.057806290686130524, 0.07190398871898651, -0.013452338986098766, 0.004433889407664537, -0.05444146320223808, -0.05809122696518898, -0.02852707728743553, -0.018456200137734413, -0.020018339157104492, 0.009118654765188694, 0.012858504429459572, 0.014270846731960773, 0.05568622797727585, 0.046776384115219116, -0.029569124802947044, 0.014047673903405666, -0.013969078660011292, -0.01022519264370203, -0.013749539852142334, 0.08125603199005127, 0.024667339399456978, -0.007375197019428015 ]
[ 0.0041084554977715015, 0.02740313485264778, 0.010489347390830517, 0.028081446886062622, -0.01583637297153473, -0.014631536789238453, -0.010418610647320747, 0.007209097500890493, -0.02621760405600071, -0.015655335038900375, -0.012940137647092342, 0.03453059867024422, 0.04235221445560455, 0.01365276426076889, 0.033643562346696854, 0.02641422115266323, -0.018494853749871254, 0.009243940934538841, 0.028393061831593513, 0.028851648792624474, -0.012352099642157555, -0.0017121484270319343, 0.020933253690600395, 0.0029695965349674225, -0.018357224762439728, 0.04556940868496895, -0.021227700635790825, -0.02137277089059353, 0.024556687101721764, -0.13133946061134338, -0.03887892886996269, -0.0003317696100566536, -0.03382357582449913, -0.003495618002489209, -0.019464634358882904, 0.0071803852915763855, -0.01723555289208889, 0.02494370937347412, 0.012006408534944057, -0.0016261825803667307, 0.015359458513557911, 0.006659831386059523, 0.009517049416899681, -0.00016645588038954884, 0.03963123634457588, -0.003063608892261982, -0.003140408080071211, -0.043531633913517, 0.0035085168201476336, -0.035100895911455154, -0.029308194294571877, -0.04216555133461952, 0.009118559770286083, -0.01750924624502659, -0.011712459847331047, -0.02135310508310795, 0.01364837121218443, 0.005698301363736391, -0.0024399254471063614, 0.014923238195478916, 0.040229957550764084, -0.018609067425131798, -0.05823897570371628, -0.03190945088863373, -0.0015652033034712076, -0.026996934786438942, 0.029416082426905632, 0.00882318802177906, -0.027427133172750473, 0.0060399300418794155, -0.026541274040937424, 0.04890920966863632, -0.06301020830869675, -0.020419636741280556, 0.011664697900414467, -0.008219132199883461, 0.0203169547021389, -0.010464337654411793, -0.0005370466969907284, -0.00967460684478283, -0.015412837266921997, 0.02161208912730217, 0.033472899347543716, -0.004343160893768072, 0.003376647364348173, -0.014203651808202267, 0.01118159107863903, -0.012131184339523315, 0.025769947096705437, -0.004504714161157608, -0.04459994658827782, 0.019095826894044876, -0.037523455917835236, 0.007024457678198814, -0.1011902317404747, 0.013780969195067883, 0.021124394610524178, 0.005588004365563393, 0.0006682914681732655, 0.842307984828949, 0.013703727163374424, -0.004308587871491909, 0.04258544370532036, 0.022656571120023727, 0.01920151337981224, 0.03303203731775284, 0.01673026755452156, -0.0071061099879443645, 0.008248016238212585, -0.015971390530467033, -0.01005483791232109, 0.006032785400748253, 0.007877959869801998, 0.0076614259742200375, 0.023132124915719032, 0.03494567051529884, 0.012825186364352703, -0.0005127408658154309, -0.021466519683599472, 0.041483599692583084, -0.00914450827986002, 0.03152450546622276, 0.012458247132599354, 0.013700803741812706, 0.0026783710345625877, -0.1796235293149948, -0.017086520791053772, -7.721624025879905e-33, 0.04471658170223236, -0.000004851312951359432, 0.04005773365497589, -0.0011817039921879768, -0.0035218156408518553, -0.019966255873441696, 0.010122784413397312, -0.026954788714647293, -0.0029158652760088444, -0.03198569640517235, 0.0011451196623966098, -0.014722143299877644, 0.009678917936980724, -0.014769721776247025, 0.04400118067860603, -0.008891778998076916, -0.025290869176387787, 0.009110508486628532, 0.012474597431719303, 0.01834062673151493, 0.0006089656963013113, 0.0060017304494977, -0.020104825496673584, 0.006978100631386042, -0.0071066003292799, 0.017489921301603317, 0.02805761806666851, 0.011611045338213444, -0.025662537664175034, -0.04393026977777481, -0.025265181437134743, -0.0032303081825375557, -0.030634306371212006, -0.039284173399209976, 0.02081076055765152, -0.0361514538526535, -0.008787994273006916, 0.018041498959064484, -0.021821733564138412, -0.027158360928297043, -0.011576931923627853, -0.028209678828716278, -0.011328410357236862, -0.02870543859899044, -0.029319150373339653, 0.007388645317405462, 0.017407238483428955, 0.03664073348045349, 0.005558593664318323, 0.010977348312735558, -0.002182156313210726, 0.028914980590343475, -0.0014344220981001854, -0.022130388766527176, -0.032535403966903687, -0.0009241530206054449, 0.0042962487787008286, 0.008162906393408775, -0.03502284362912178, 0.041356127709150314, 0.05664053559303284, -0.0063658347353339195, -0.03226476535201073, 0.04442192614078522, -0.0303940549492836, -0.0038849511183798313, 0.0027011048514395952, -0.004553032107651234, 0.025317085906863213, 0.011022299528121948, -0.06230940297245979, 0.03559599071741104, -0.003324183402583003, -0.02159673161804676, 0.043747302144765854, -0.021844057366251945, -0.006381634622812271, -0.016940008848905563, -0.011117588728666306, 0.06669928878545761, 0.003349448088556528, -0.028723519295454025, -0.03181076794862747, -0.05014009773731232, -0.016697190701961517, -0.00929566565901041, 0.05785759910941124, -0.02160961739718914, 0.010595107451081276, 0.01221237052232027, 0.033253178000450134, 0.010945643298327923, -0.018614770844578743, 0.024493083357810974, -0.014382900670170784, 7.591880306275834e-33, 0.008399629965424538, 0.0008186681661754847, -0.007127461489289999, 0.013675167225301266, 0.0485624335706234, 0.007967116311192513, 0.021230807527899742, 0.010472184047102928, -0.06275711208581924, 0.03322500362992287, 0.006249996367841959, -0.006593206897377968, -0.02041046880185604, 0.026684457436203957, 0.024436116218566895, -0.013485485687851906, -0.006371357012540102, -0.02700585313141346, -0.0009264360414817929, 0.00447531184181571, -0.004883558489382267, 0.029062695801258087, -0.004462915938347578, -0.0013622728874906898, 0.023444702848792076, 0.054568659514188766, -0.03255181387066841, 0.009916328825056553, 0.005908767227083445, 0.0346684604883194, -0.007833250798285007, -0.04320144280791283, 0.016186069697141647, -0.007007877342402935, -0.004731886088848114, 0.03607463091611862, -0.023959649726748466, -0.01262849010527134, -0.006253834348171949, 0.004127047024667263, 0.013188835233449936, 0.0034724294673651457, -0.007112119812518358, 0.06198517605662346, 0.0273351538926363, 0.012684793211519718, -0.009847893379628658, 0.004890161100775003, -0.026122862473130226, 0.006334713660180569, 0.008548435755074024, 0.016337377950549126, -0.004290769342333078, 0.0021186263766139746, 0.021284226328134537, -0.01957809366285801, -0.009799045510590076, 0.02227136865258217, -0.013453051447868347, 0.021794989705085754, -0.029707111418247223, 0.00409456342458725, -0.04995781555771828, 0.0005309729021973908, -0.017886735498905182, -0.01966189406812191, -0.02795586735010147, -0.006628154776990414, -0.007137373089790344, 0.04137676581740379, -0.01298010814934969, 0.041340406984090805, 0.0075472937896847725, 0.008441677317023277, 0.030644066631793976, -0.02846064791083336, -0.009084420278668404, 0.020565688610076904, -0.049801792949438095, -0.00819004513323307, 0.022294966503977776, 0.0040700254030525684, 0.010072006843984127, 0.009108511731028557, -0.014914670959115028, 0.04031246155500412, -0.022811049595475197, 0.001009044237434864, -0.02326016128063202, -0.02612689696252346, 0.010980609804391861, 0.004825144540518522, -0.028577318415045738, 0.04070333391427994, -0.009297479875385761, -1.3163877987665273e-8, -0.02135615609586239, 0.020101437345147133, -0.019306320697069168, -0.006418720353394747, 0.028360754251480103, 0.03795900195837021, 0.00182063365355134, 0.01052539236843586, -0.03265877440571785, 0.05511556565761566, 0.06391013413667679, -0.026764892041683197, 0.001607610727660358, -0.001726882765069604, 0.0031579795759171247, -0.027781590819358826, -0.0012358661042526364, 0.028362564742565155, 0.02773638442158699, -0.009388765320181847, 0.020115984603762627, 0.015952426940202713, -0.03881189227104187, 0.019957710057497025, 0.008042645640671253, -0.05686381086707115, -0.003227463224902749, -0.055650513619184494, -0.002259103814139962, -0.0054058292880654335, -0.0032669492065906525, -0.03013489954173565, -0.009118943475186825, 0.013242348097264767, -0.0302877314388752, -0.05934731662273407, 0.01837250404059887, 0.00588129973039031, 0.00677128229290247, 0.03795705735683441, -0.03423018008470535, 0.018941745162010193, -0.0006332742050290108, -0.028512587770819664, -0.026632174849510193, 0.007804744876921177, -0.03850490227341652, -0.04874257743358612, 0.03197147697210312, -0.05393490940332413, -0.00034728291211649776, -0.016123641282320023, 0.034823644906282425, 0.04691700264811516, 0.01955626718699932, 0.03185275197029114, 0.00034250985481776297, -0.03090270422399044, -0.0542050376534462, 0.0072526391595602036, 0.00583230284973979, 0.030571630224585533, -0.026952696964144707, -0.01925004832446575 ]
deliberate-practice-building-confidence-vs-practicing
https://markhneedham.com/blog/2015/04/30/deliberate-practice-building-confidence-vs-practicing
false
2015-04-01 11:54:03
Neo4j: Cypher - Building the query for a movie's profile page
[ "neo4j" ]
[ "neo4j" ]
image::{{<siteurl>}}/uploads/2015/04/2015-04-01_12-11-51.png[2015 04 01 12 11 51,256] Yesterday I spent the day in Berlin delivering a workshop as part of the http://datascienceretreat.com/[Data Science Retreat] and one of the exercises we did was write a query that would pull back all the information you'd need to create the http://www.imdb.com/title/tt0133093/?ref_=fn_al_tt_1[IMDB page for a movie]. Scanning the page we can see that need to get some basic meta data including the title. Next we'll need to pull in the actors, directors, producers and finally a recommendation for some other movies the viewer might like to see. I'd struggle to be able to write this all in one go - it's non trivial. However, if we break it down there are actually 5 simpler queries that we probably can write. Our final step is then to work out how to glue them all together. Let's get started. _If you want to follow along open up your Neo4j browser and type +++<cite>+++:play movies+++</cite>+++ and import the built in data set._ We're going to create the query for The Matrix home page so the first step is to find the node representing that movie in the database: [source,cypher] ---- match (movie:Movie {title: "The Matrix"}) return movie.title ==> +--------------+ ==> | movie.title | ==> +--------------+ ==> | "The Matrix" | ==> +--------------+ ==> 1 row ---- Easy enough. Now let's get back the producers: [source,cypher] ---- match (movie:Movie {title: "The Matrix"}) optional match (producer)-[:PRODUCED]->(movie) RETURN movie.title, COLLECT(producer.name) AS producers ==> +--------------------------------+ ==> | movie.title | producers | ==> +--------------------------------+ ==> | "The Matrix" | ["Joel Silver"] | ==> +--------------------------------+ ==> 1 row ---- We've introduced the http://neo4j.com/docs/milestone/query-aggregation.html#aggregation-collect[COLLECT] function here as we want to ensure that our final result only has one row regardless of how many producers there are. COLLECT applies an implicit group by 'movie.title' and collects the producers for each movie (in this case just The Matrix) into an array. We've used OPTIONAL MATCH *LINK* because we still want to return a row for the query even if it has no producers. In the case that there are no producers we'd hope to see an empty array. Now let's write the same query to pull back the directors of the movie: [source,cypher] ---- match (movie:Movie {title: "The Matrix"}) optional match (director)-[:DIRECTED]->(movie) RETURN movie.title, COLLECT(director.name) AS directors ==> +----------------------------------------------------+ ==> | movie.title | directors | ==> +----------------------------------------------------+ ==> | "The Matrix" | ["Lana Wachowski","Andy Wachowski"] | ==> +----------------------------------------------------+ ==> 1 row ---- We really want to do both of these in one query so we get back a single result with 3 columns. To do that we're going to introduce the http://neo4j.com/docs/stable/query-with.html[WITH] clause which allows us combine the results of traversals together. In this case we'll first do a traversal to get the producers, collect those into an array and then traverse out again to get the directors and collect those. This is what the query looks like: [source,cypher] ---- match (movie:Movie {title: "The Matrix"}) optional match (producer)-[:PRODUCED]->(movie) with movie, COLLECT(producer.name) AS producers optional match (director)-[:DIRECTED]->(movie) RETURN movie.title, producers, COLLECT(director.name) AS directors ==> +----------------------------------------------------------------------+ ==> | movie.title | producers | directors | ==> +----------------------------------------------------------------------+ ==> | "The Matrix" | ["Joel Silver"] | ["Lana Wachowski","Andy Wachowski"] | ==> +----------------------------------------------------------------------+ ==> 1 row ---- We can follow the same pattern to return the actors: [source,cypher] ---- match (movie:Movie {title: "The Matrix"}) optional match (producer)-[:PRODUCED]->(movie) with movie, COLLECT(producer.name) AS producers optional match (director)-[:DIRECTED]->(movie) with movie, producers, COLLECT(director.name) AS directors optional match (actor)-[:ACTED_IN]->(movie) RETURN movie.title, COLLECT(actor.name) AS actors, producers, directors ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | movie.title | actors | producers | directors | ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | "The Matrix" | ["Hugo Weaving","Laurence Fishburne","Carrie-Anne Moss","Keanu Reeves","Emil Eifrem"] | ["Joel Silver"] | ["Lana Wachowski","Andy Wachowski"] | ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> 1 row ---- So far, so good. We've got everything except the other movies recommendation which is a bit trickier so we'll write it on its own first: [source,cypher] ---- match (movie:Movie {title: "The Matrix"})<-[:ACTED_IN]-(actor)-[:ACTED_IN]->(otherMovie) RETURN otherMovie, COUNT(*) AS score ORDER BY score DESC ==> +---------------------------------------------------------------------------------------------------------------------------+ ==> | otherMovie | score | ==> +---------------------------------------------------------------------------------------------------------------------------+ ==> | Node[348]{title:"The Matrix Revolutions",released:2003,tagline:"Everything that has a beginning has an end"} | 4 | ==> | Node[347]{title:"The Matrix Reloaded",released:2003,tagline:"Free your mind"} | 4 | ==> | Node[490]{title:"Something's Gotta Give",released:2003} | 1 | ==> | Node[349]{title:"The Devil's Advocate",released:1997,tagline:"Evil has its winning ways"} | 1 | ==> | Node[438]{title:"Johnny Mnemonic",released:1995,tagline:"The hottest data on earth. In the coolest head in town"} | 1 | ==> | Node[443]{title:"Cloud Atlas",released:2012,tagline:"Everything is connected"} | 1 | ==> | Node[452]{title:"V for Vendetta",released:2006,tagline:"Freedom! Forever!"} | 1 | ==> | Node[425]{title:"The Replacements",released:2000,tagline:"Pain heals, Chicks dig scars... Glory lasts forever"} | 1 | ==> +---------------------------------------------------------------------------------------------------------------------------+ ==> 8 rows ---- Our recommendation query finds all the actors in The Matrix and then traverses out to find other movies they've acted in and orders those movies based on how many of our actors appeared in them. Not surprisingly the other Matrix movies come out top. In order to plug this into the rest of the query we need a single row to be returned i.e. our other movie suggestions need to be returned as an array rather than individual rows. Let's do that: [source,cypher] ---- match (movie:Movie {title: "The Matrix"})<-[:ACTED_IN]-(actor)-[:ACTED_IN]->(otherMovie) WITH otherMovie, COUNT(*) AS score ORDER BY score DESC RETURN COLLECT({movie: otherMovie.title, score: score}) AS otherMovies ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | recommended | ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | [{movie -> "The Matrix Revolutions", score -> 4},{movie -> "The Matrix Reloaded", score -> 4},{movie -> "Something's Gotta Give", score -> 1},{movie -> "The Devil's Advocate", score -> 1},{movie -> "Johnny Mnemonic", score -> 1},{movie -> "Cloud Atlas", score -> 1},{movie -> "V for Vendetta", score -> 1},{movie -> "The Replacements", score -> 1}] | ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ---- We've introduced a WITH clause for two reasons: . To ensure the order of the movies based on highest score . Because we can't do an aggregation within an aggregation i.e. COLLECT(COUNT(\...)) would be an illegal operation in Cypher. Now we're ready to plug this recommendation query into our main one: [source,cypher] ---- match (movie:Movie {title: "The Matrix"}) optional match (producer)-[:PRODUCED]->(movie) with movie, COLLECT(producer.name) AS producers optional match (director)-[:DIRECTED]->(movie) with movie, producers, COLLECT(director.name) AS directors optional match (actor)-[:ACTED_IN]->(movie) WITH movie, COLLECT(actor.name) AS actors, producers, directors optional match (movie)<-[:ACTED_IN]-(actor)-[:ACTED_IN]->(otherMovie) WITH movie, actors, producers, directors, otherMovie, COUNT(*) AS score ORDER BY score DESC RETURN movie, actors, producers, directors, COLLECT({movie: otherMovie.title, score: score}) AS recommended ==> +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | movie | actors | producers | directors | recommended | ==> +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | Node[338]{title:"The Matrix",released:1999,tagline:"Welcome to the Real World"} | ["Hugo Weaving","Laurence Fishburne","Carrie-Anne Moss","Keanu Reeves","Emil Eifrem"] | ["Joel Silver"] | ["Lana Wachowski","Andy Wachowski"] | [{movie -> "The Matrix Revolutions", score -> 4},{movie -> "The Matrix Reloaded", score -> 4},{movie -> "Johnny Mnemonic", score -> 1},{movie -> "The Replacements", score -> 1},{movie -> "Cloud Atlas", score -> 1},{movie -> "V for Vendetta", score -> 1},{movie -> "Something's Gotta Give", score -> 1},{movie -> "The Devil's Advocate", score -> 1}] | ==> +------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> 1 row ---- Voila! 4 different types of data gathered and just one query to do it all. For the eagle eyed cypher specialists (Hi Michael!), you'll have noticed a bit of duplication in how we traverse out to the actors twice, once to retrieve them and once to make the movie recommendation. We could optimise this by collecting the actors once and then using the http://neo4j.com/docs/stable/query-unwind.html[UNWIND] clause but that's an optimisation which I think slightly obscures the intent of the query so I've left it like this for now.
null
null
[ 0.027022548019886017, 0.009310112334787846, 0.002790998201817274, 0.04427970200777054, 0.08779248595237732, -0.008584413677453995, 0.017215941101312637, 0.03517267480492592, 0.0018928145291283727, -0.0007190327742137015, -0.010715127922594547, -0.00022660514514427632, -0.06676402688026428, 0.028268825262784958, -0.026796577498316765, 0.07639387995004654, 0.056827809661626816, 0.025791995227336884, 0.014509934931993484, 0.0016734945820644498, 0.0057355789467692375, 0.05847158282995224, 0.016029242426156998, 0.04969269409775734, 0.022462522611021996, -0.0073577407747507095, -0.006609134841710329, 0.007498336024582386, -0.05979608744382858, -0.004667661152780056, 0.029639435932040215, -0.02111620269715786, -0.0019374380353838205, -0.000017476977518526837, 0.026552259922027588, 0.003356030210852623, -0.04034196957945824, 0.020117711275815964, -0.0035983857233077288, 0.008283033035695553, -0.06284010410308838, 0.024968940764665604, -0.0033153046388179064, 0.005785004235804081, -0.07160127907991409, 0.00820140726864338, -0.041818588972091675, 0.03479553759098053, -0.0015924220206215978, -0.00229680840857327, -0.05413798615336418, 0.032003045082092285, -0.010464813560247421, 0.0021548413205891848, -0.0046888976357877254, 0.04683627933263779, 0.02544987015426159, -0.07882534712553024, 0.024834653362631798, 0.0014865732518956065, 0.024787791073322296, 0.016726812347769737, 0.016609840095043182, 0.024978015571832657, 0.01149062067270279, -0.03578973188996315, 0.004556507803499699, 0.06094512343406677, -0.04008747637271881, 0.007493963930755854, -0.004555069375783205, 0.010352617129683495, -0.02661939337849617, 0.00039481883868575096, -0.0003230102302040905, -0.05656980723142624, 0.023587556555867195, 0.06337875872850418, 0.031180037185549736, 0.029333442449569702, -0.027935203164815903, 0.027676543220877647, 0.004888680763542652, 0.023142388090491295, -0.017057064920663834, -0.04026623070240021, -0.020505979657173157, -0.04843809828162193, -0.05774934962391853, 0.03236053138971329, 0.02134834975004196, -0.036664240062236786, -0.0022070985287427902, 0.020951692014932632, -0.01004492212086916, -0.014673692174255848, 0.009795497171580791, -0.01938273385167122, 0.016339335590600967, -0.007016352843493223, -0.03051970712840557, -0.03472764045000076, 0.012652530334889889, 0.010460084304213524, -0.0762820616364479, -0.028811773285269737, -0.02684079110622406, 0.015298646874725819, 0.003851940156891942, 0.017710069194436073, -0.02694161795079708, 0.009875834919512272, -0.022555910050868988, 0.004362775944173336, -0.08258840441703796, 0.051011823117733, 0.011984722688794136, -0.024366335943341255, -0.002223868854343891, 0.03897809237241745, 0.04993636906147003, 0.03054797649383545, -0.011215286329388618, 0.08232297748327255, -0.014846798032522202, 0.046947963535785675, 0.006440820172429085, 0.04429596662521362, -0.024317946285009384, -0.059969108551740646, 0.006426237989217043, 0.047466080635786057, -0.017059776932001114, 0.020405860617756844, 0.007886352017521858, -0.04675710201263428, 0.005126151256263256, 0.001681676832959056, 0.04653487354516983, 0.01240563578903675, 0.0055377548560500145, -0.06539937853813171, -0.0032480363734066486, 0.012739469297230244, 0.0632147565484047, -0.0032339077442884445, -0.004071035422384739, -0.03167293965816498, -0.024255970492959023, 0.011745888739824295, -0.023107782006263733, 0.028923366218805313, 0.044688403606414795, -0.0478636734187603, -0.0011791458819061518, 0.08390068262815475, 0.03159504756331444, 0.01999088004231453, -0.014677265658974648, 0.019413139671087265, 0.04956774041056633, 0.019307611510157585, 0.022990738973021507, 0.02943859063088894, -0.007929535582661629, -0.031564075499773026, 0.006866087205708027, 0.042110625654459, -0.01180263888090849, 0.01242779940366745, -0.04334765300154686, -0.05789627134799957, 0.07675937563180923, -0.04600988328456879, -0.03744067624211311, 0.047757089138031006, 0.06807351112365723, 0.044369857758283615, 0.0390581414103508, -0.002239820547401905, -0.09106091409921646, 0.048161234706640244, -0.0009836526587605476, 0.008074317127466202, 0.013682239688932896, -0.01747022196650505, 0.0784277394413948, 0.030074255540966988, 0.008497069589793682, 0.04027000442147255, -0.06585409492254257, -0.0980319008231163, -0.03039589710533619, -0.017294473946094513, 0.05154501646757126, -0.038419511169195175, 0.03451789915561676, 0.0425533764064312, -0.01800934039056301, 0.03677545487880707, -0.012393309734761715, -0.012667498551309109, 0.051281385123729706, -0.02745954319834709, -0.052828531712293625, 0.04345821216702461, 0.033706944435834885, -0.02953447960317135, -0.027049440890550613, 0.011187227442860603, -0.016836799681186676, -0.00581786222755909, 0.04114418849349022, -0.029868673533201218, 0.04434450715780258, 0.049046892672777176, 0.019623804837465286, -0.02206338755786419, 0.0228892769664526, -0.02322256565093994, 0.027129746973514557, -0.0037696692161262035, -0.04640653729438782, -0.02011219970881939, 0.007032973226159811, 0.1314317286014557, 0.05245919153094292, -0.014196045696735382, -0.06323451548814774, 0.033387068659067154, 0.02787499688565731, -0.030965881422162056, -0.0026572339702397585, 0.00248410040512681, -0.03150990605354309, 0.0002778854686766863, -0.03511441498994827, -0.03421872854232788, 0.008994568139314651, -0.03979809582233429, 0.004312868230044842, 0.04135609790682793, -0.04406635835766792, 0.038615304976701736, 0.006461337674409151, -0.01309979148209095, 0.012955572456121445, -0.04035428538918495, -0.05463491752743721, 0.0200487207621336, -0.004743435885757208, -0.01203448511660099, 0.03496990725398064, -0.024008752778172493, 0.011825603432953358, -0.03176460042595863, -0.025414863601326942, 0.03240417689085007, 0.08492094278335571, 0.06147210672497749, -0.016678357496857643, 0.04999074712395668, -0.002260024193674326, 0.03876446187496185, -0.031019214540719986, -0.026849331334233284, -0.05679250881075859, -0.04045448824763298, 0.006909541320055723, 0.02708076871931553, 0.04815439507365227, 0.01333948690444231, 0.012915967963635921, 0.035638898611068726, 0.02517658844590187, 0.004744906909763813, 0.03696221113204956, 0.0068980795331299305, -0.010771605186164379, -0.021487899124622345, -0.008911700919270515, 0.06339898705482483, -0.05283000320196152, -0.038471151143312454, 0.001110121957026422, -0.07175670564174652, 0.042326342314481735, -0.04940389469265938, -0.028415653854608536, -0.018860673531889915, -0.004064915701746941, 0.058065567165613174, 0.0005756152677349746, -0.014021222479641438, 0.0576266273856163, 0.0031574645545333624, -0.001342671806924045, 0.008104083128273487, 0.009332925081253052, 0.04734627902507782, -0.010764948092401028, 0.0528031550347805, 0.045759670436382294, -0.014615203253924847, -0.01744830794632435, -0.023823071271181107, 0.024421827867627144, -0.033152710646390915, -0.2869662344455719, 0.02219543233513832, 0.0067858570255339146, -0.023840565234422684, 0.02558925189077854, -0.05959680676460266, -0.01410310622304678, -0.03082422725856304, -0.013008766807615757, -0.004989803768694401, -0.021723590791225433, -0.04375908523797989, -0.029162270948290825, 0.049625009298324585, 0.025344649329781532, 0.010697095654904842, 0.00662430701777339, -0.038484878838062286, 0.004561933688819408, 0.03958631306886673, 0.006745649501681328, -0.054130129516124725, -0.009487121365964413, 0.03776983544230461, 0.025210242718458176, 0.03721418231725693, -0.07915049046278, 0.04526534676551819, -0.07845576852560043, -0.03566202521324158, 0.0034538249019533396, -0.025340808555483818, 0.004309818614274263, -0.019380664452910423, 0.005396002903580666, -0.009686070494353771, 0.07549627125263214, 0.007979447022080421, -0.013197815045714378, -0.013068677857518196, -0.04110478609800339, -0.039166953414678574, -0.042733293026685715, 0.010367889888584614, 0.10167181491851807, 0.010057290084660053, -0.06076617166399956, -0.016731318086385727, -0.00019016716396436095, 0.047632455825805664, -0.01537928357720375, -0.027922213077545166, -0.022092562168836594, 0.029824456200003624, 0.00045242655323818326, -0.03251628950238228, 0.013004438020288944, -0.0012610170524567366, -0.03573029115796089, -0.021942563354969025, -0.009878639131784439, -0.04671715945005417, 0.0019476268207654357, -0.029538467526435852, 0.00461299903690815, -0.06122750788927078, -0.07129453122615814, -0.03691832721233368, 0.06990257650613785, 0.03426872938871384, -0.025416744872927666, 0.019058991223573685, -0.019607484340667725, -0.10237334668636322, -0.015784330666065216, 0.00013878190657123923, -0.01569879800081253, -0.010869321413338184, -0.014383628033101559, 0.050392359495162964, -0.03198456019163132, -0.06893669068813324, 0.034152183681726456, -0.0007987593999132514, 0.018277300521731377, -0.03319723159074783, 0.028348762542009354, -0.009144889190793037, -0.015475771389901638, -0.0008973200456239283, 0.06580296903848648, -0.030860628932714462, -0.003556876676157117, -0.014491177164018154, -0.010232479311525822, 0.0251492727547884, -0.0016043134965002537, -0.012251723557710648, 0.027789419516921043, 0.05570022389292717, 0.036545831710100174, -0.05703211948275566, 0.03510567545890808, -0.048836421221494675, -0.016972342506051064, -0.019801506772637367, -0.03025663271546364, 0.03788590803742409, 0.0026604444719851017, 0.00374742248095572, -0.00697620864957571, -0.016332747414708138, 0.012179413810372353, -0.04271603003144264, -0.01798573136329651, -0.01890004612505436, -0.00005453448829939589, 0.0476921871304512, 0.010983387939631939, -0.015567242167890072, -0.060041025280952454, 0.0390038937330246, 0.012706399895250797, -0.009720307774841785, -0.050397519022226334, -0.040522146970033646, 0.0006131565314717591, -0.017874477431178093, -0.007451146841049194, 0.014869396574795246, -0.0238577239215374, 0.02872844971716404, 0.002639329992234707, -0.025041965767741203, 0.05208501219749451, -0.04615763947367668, -0.054194316267967224, -0.012633396312594414, 0.008959314785897732, 0.0017056276556104422, 0.017745263874530792, -0.0037991281133145094, 0.0037188814021646976, 0.04120679572224617, 0.0432673841714859, 0.013261406682431698, 0.027964817360043526, -0.00322549301199615, 0.013573563657701015, 0.0007786182686686516, 0.005123623181134462, -0.022032521665096283, 0.015325071290135384, -0.0396081805229187, -0.0069162845611572266, -0.01470932923257351, 0.047473546117544174, -0.029055677354335785, -0.00442470284178853, -0.04055403918027878, 0.02521163783967495, -0.04366656765341759, -0.0014546996681019664, -0.011507123708724976, -0.004909471608698368, 0.04700043424963951, -0.010468934662640095, 0.009789707139134407, -0.007805697154253721, 0.007033755537122488, 0.01119819562882185, 0.023420777171850204, -0.033804211765527725, 0.0038031486328691244, -0.011071902699768543, 0.002640907187014818, 0.009518282487988472, 0.0212240070104599, 0.02612878382205963, 0.023960383608937263, -0.011146480217576027, -0.030871592462062836, 0.009937338531017303, 0.028758754953742027, 0.030094891786575317, 0.03689869865775108, -0.023591727018356323, -0.011593416333198547, -0.028981201350688934, -0.03508242592215538, -0.013906758278608322, -0.0029986626468598843, -0.00582488439977169, -0.018184306100010872, -0.019631581380963326, -0.062352314591407776, 0.06350556015968323, -0.006157117895781994, 0.00014020192611496896, 0.03169719874858856, 0.02682688646018505, 0.013002078048884869, -0.04067232832312584, 0.04661363735795021, 0.0638430193066597, -0.06421558558940887, -0.009502083994448185, 0.007806758396327496, -0.006899098865687847, 0.011797109618782997, 0.021707013249397278, -0.06018438935279846, -0.02368747442960739, -0.03709092736244202, 0.0037187261041253805, -0.03593539446592331, -0.03074883483350277, -0.015658412128686905, 0.025012783706188202, -0.009251335635781288, 0.011464664712548256, 0.0000038281968954834156, 0.010529130697250366, -0.018710488453507423, -0.0399114266037941, 0.04517528787255287, -0.020389029756188393, -0.00007992370228748769, 0.009304119274020195, -0.01672501489520073, 0.004951459355652332, -0.026758719235658646, 0.015107369981706142, 0.02624029479920864, -0.007570508401840925, -0.028294669464230537, -0.05228652432560921, -0.0036246066447347403, 0.0032895260956138372, 0.05391794070601463, 0.010123510845005512, -0.0064387149177491665, -0.029158499091863632, 0.022120164707303047, -0.019582776352763176, 0.020358994603157043, -0.007456862833350897, -0.004636678844690323, 0.018206851556897163, 0.015873296186327934, 0.019049683585762978, 0.02444981038570404, -0.020920682698488235, -0.05300954356789589, 0.05440500006079674, -0.06061367690563202, -0.026461519300937653, -0.023378854617476463, -0.04694997891783714, 0.0400087907910347, 0.018532326444983482, 0.021677039563655853, -0.02360675483942032, 0.04452820494771004, 0.034950677305459976, 0.01150182168930769, 0.04056244716048241, 0.009760236367583275, 0.048151735216379166, -0.028084469959139824, -0.010697318241000175, -0.08491543680429459, -0.02257475070655346, 0.03758964315056801, 0.015464553609490395, -0.011704030446708202, -0.01614229567348957, -0.05575011670589447, 0.03935561329126358, -0.06245286017656326, -0.038204606622457504, 0.03788414224982262, -0.03631795570254326, -0.0059050931595265865, 0.013795781880617142, -0.06356192380189896, -0.0066901990212500095, 0.04364333301782608, -0.03384178876876831, -0.004935995675623417, -0.03204356133937836, 0.06426814198493958, -0.023414164781570435, 0.0535741001367569, -0.0038924189284443855, -0.013090787455439568, 0.08265932649374008, 0.03764105588197708, 0.0009225812973454595, 0.03676417097449303, -0.031932029873132706, 0.012882477603852749, 0.02965393476188183, -0.030199864879250526, 0.0037485803477466106, 0.04726569354534149, -0.005155483260750771, -0.06664860993623734, 0.0053401123732328415, 0.004786991979926825, -0.013365166261792183, -0.0568268820643425, 0.07360248267650604, 0.010823394171893597, -0.03005983494222164, -0.01864463835954666, 0.03381284326314926, -0.03285248950123787, -0.00502224825322628, -0.02371113747358322, -0.016736680641770363, -0.05606364086270332, 0.04791679233312607, -0.04117788001894951, -0.007830568589270115, 0.07479245960712433, 0.0062842718325555325, 0.01323800627142191, -0.008895953185856342, 0.07243648916482925, 0.0879681408405304, 0.041985828429460526, 0.009568274952471256, 0.07719378918409348, -0.009339982643723488, -0.018784523010253906, 0.005579452961683273, -0.016561539843678474, -0.024993814527988434, -0.008530480787158012, -0.007456738036125898, 0.09085611253976822, -0.013344048522412777, 0.07651545107364655, -0.007209340110421181, -0.02186104841530323, 0.014983405359089375, 0.004337691701948643, 0.008844980970025063, 0.05199085548520088, 0.007643001154065132, 0.012643489055335522, -0.016900833696126938, -0.0393175445497036, 0.04086891561746597, 0.002750086598098278, 0.002060530474409461, 0.029466865584254265, -0.001804621540941298, 0.03310902789235115, -0.016055146232247353, 0.07088162750005722, 0.0848725438117981, -0.01916733756661415, -0.023745577782392502, -0.008178604766726494, 0.015712350606918335, -0.02129131555557251, 0.03405606374144554, -0.03165952488780022, -0.027106501162052155, 0.0014499962562695146, -0.0659249946475029, -0.02025657892227173, -0.008707281202077866, -0.011775225400924683, 0.017040429636836052, -0.040370453149080276, -0.022931501269340515, 0.008252972736954689, -0.0009230237337760627, -0.023236505687236786, -0.05024652183055878, -0.04479122906923294, -0.05659483000636101, -0.08380159735679626, -0.026081174612045288, 0.0005798300262540579, 0.009189537726342678, -0.035466358065605164, -0.022568747401237488, -0.048665814101696014, -0.015799757093191147, 0.046809155493974686, -0.0703045129776001, 0.010941635817289352, 0.00131544831674546, 0.02502310834825039, 0.003906796220690012, 0.0016733129741623998, 0.04673418775200844, 0.02993626706302166, 0.009691859595477581, 0.0030413453932851553, 0.038059692829847336, 0.01731082610785961, 0.0028561213985085487, 0.010999550111591816, -0.0948161706328392, 0.01443146076053381, 0.014428719878196716, -0.03884751349687576, -0.07753070443868637, 0.012028365395963192, 0.04652401804924011, 0.017875974997878075, 0.05334355682134628, -0.021531587466597557, -0.005404352210462093, -0.05703067034482956, 0.017320172861218452, -0.029863404110074043, -0.02455490082502365, 0.0621303953230381, -0.03461102768778801, 0.06934427469968796, 0.03049713559448719, -0.01764805242419243, -0.027678925544023514, -0.02191934362053871, -0.007557603530585766, 0.016825376078486443, -0.04069230332970619, -0.022691277787089348, -0.02743108943104744, -0.10492423921823502, -0.036909934133291245, 0.01930677890777588, -0.03351456671953201, -0.029020437970757484, 0.007668571546673775, 0.04985978454351425, -0.008795577101409435, 0.012558495625853539, -0.025092769414186478, 0.009510474279522896, -0.02406182885169983, -0.023132631555199623, -0.02624616026878357, 0.0223799217492342, 0.007155087310820818, 0.005299230106174946, 0.0189278032630682, -0.0638853907585144, -0.023393502458930016, -0.01514327060431242, 0.020406315103173256, 0.03299719840288162, 0.031235825270414352, -0.0029883214738219976 ]
[ -0.07337792217731476, -0.006369853857904673, -0.04871128499507904, -0.010875367559492588, 0.05775785073637962, -0.013967744074761868, -0.03342771530151367, 0.012076080776751041, -0.010353310965001583, -0.02928406000137329, 0.037680864334106445, -0.024464404210448265, 0.003887181170284748, 0.02292206510901451, 0.06687618792057037, 0.006847820244729519, 0.034881919622421265, -0.07550974190235138, -0.023961607366800308, 0.04481101781129837, -0.021106375381350517, -0.02611507475376129, 0.0013206185540184379, -0.027274783700704575, -0.003422413021326065, 0.007556932978332043, 0.04779130220413208, -0.023762591183185577, -0.03292600437998772, -0.19266486167907715, -0.016479380428791046, 0.027438059449195862, 0.039035115391016006, 0.02790258079767227, 0.0016448373207822442, -0.0058044083416461945, 0.04339330643415451, -0.016493313014507294, -0.004404508974403143, -0.003187769092619419, 0.007652193773537874, 0.007770886644721031, -0.008487223647534847, -0.026295693591237068, 0.04038670286536217, 0.022793332114815712, -0.01585305854678154, -0.010921326465904713, -0.005829169414937496, 0.016330573707818985, -0.06653261184692383, -0.026601087301969528, -0.003244084073230624, -0.0030149752274155617, -0.03810739144682884, 0.028741154819726944, 0.03275366872549057, 0.045650988817214966, 0.0348767414689064, 0.023521387949585915, 0.026262352243065834, -0.02438965067267418, -0.11800562590360641, 0.08600351214408875, 0.03873785585165024, 0.024108782410621643, -0.0695769414305687, -0.017797693610191345, -0.005010500084608793, 0.08222568780183792, -0.026944823563098907, -0.009714853949844837, -0.010954384692013264, 0.049468640238046646, -0.0011123738950118423, 0.009681849740445614, 0.022304503247141838, 0.018936699256300926, 0.0010097615886479616, -0.05891231819987297, -0.0193987637758255, 0.03540298715233803, -0.04019245132803917, 0.007636325899511576, -0.035739000886678696, 0.07514896988868713, 0.006186227314174175, 0.07074224203824997, 0.004729459527879953, 0.03713180497288704, 0.005806752946227789, 0.016477329656481743, 0.004427019506692886, 0.017908582463860512, -0.0983738824725151, -0.061908360570669174, 0.05622849240899086, 0.03061591275036335, 0.007103549316525459, 0.42636197805404663, 0.01138373278081417, -0.03715343773365021, 0.09661077708005905, 0.04677843675017357, -0.02561110444366932, -0.03486736863851547, -0.012823410332202911, -0.01668609119951725, 0.036068737506866455, -0.01122049055993557, 0.006487217266112566, -0.009789614006876945, 0.07219648361206055, -0.07775610685348511, 0.06551888585090637, 0.009509541094303131, 0.03639420494437218, 0.04456528648734093, 0.010085226967930794, -0.05202586576342583, 0.0020861634984612465, -0.014010461047291756, 0.009214126504957676, -0.022736946120858192, -0.0005251691909506917, -0.042963020503520966, 0.04087386652827263, 0.05466773360967636, 0.0489874929189682, -0.006942059379070997, 0.060329996049404144, 0.0042767710983753204, -0.09147035330533981, 0.043706610798835754, -0.00527286296710372, 0.017524467781186104, 0.019368460401892662, -0.030586622655391693, -0.00830453634262085, -0.018790744245052338, -0.009374517016112804, -0.020375600084662437, 0.0022557200863957405, 0.013756058178842068, -0.03178645670413971, 0.1321350485086441, 0.011804966256022453, -0.024417925626039505, -0.02893894910812378, -0.050289131700992584, 0.027946798130869865, 0.05818835645914078, 0.0033006269950419664, -0.028939370065927505, 0.014475432224571705, -0.008110949769616127, 0.10862745344638824, -0.03663849085569382, -0.09919288754463196, 0.02307913452386856, -0.036730166524648666, -0.029050983488559723, -0.029949482530355453, 0.039040058851242065, 0.07606887817382812, -0.09002801030874252, -0.01023058407008648, 0.027576623484492302, 0.048251911997795105, -0.05728388950228691, -0.012972689233720303, -0.015777485445141792, -0.04678424075245857, -0.00842451211065054, 0.04806286096572876, -0.023005411028862, -0.05456087738275528, 0.023179540410637856, 0.03467840701341629, 0.010661092586815357, -0.0377868227660656, -0.028776558116078377, -0.05536239221692085, 0.012850516475737095, -0.0618956983089447, -0.07959194481372833, -0.07135272771120071, -0.006014592479914427, -0.014219572767615318, 0.004013896454125643, 0.000837447470985353, -0.007237663026899099, -0.047252435237169266, 0.07248842716217041, -0.03216903284192085, -0.006845265161246061, -0.015000181272625923, 0.011387709528207779, -0.041305236518383026, -0.03226080164313316, -0.0012433987576514482, -0.03268744796514511, -0.039956267923116684, 0.03617485612630844, -0.054762620478868484, 0.05606864392757416, 0.0529760867357254, -0.040647879242897034, 0.06260280311107635, 0.04640418663620949, -0.027418456971645355, -0.020696688443422318, -0.0037313182838261127, 0.03474085405468941, -0.023707903921604156, -0.03202693536877632, 0.0053255087696015835, -0.006208526901900768, 0.020341617986559868, 0.027853112667798996, -0.014925744384527206, -0.013169776648283005, -0.021316830068826675, -0.324604868888855, -0.01169797033071518, -0.04288802295923233, -0.009901323355734348, -0.01580049842596054, -0.051520805805921555, 0.006900462321937084, -0.04183896258473396, 0.039742421358823776, 0.05834861844778061, 0.07135511934757233, -0.009688725695014, 0.012678464874625206, -0.10298657417297363, 0.01635371893644333, 0.0011169762583449483, -0.0016048793913796544, 0.03662612661719322, -0.006064713466912508, 0.010384907945990562, 0.0008255504653789103, -0.05100104585289955, -0.026254352182149887, -0.055763937532901764, -0.024437837302684784, -0.03981746733188629, 0.14028961956501007, 0.07284200191497803, 0.024565329775214195, -0.0354023240506649, 0.05841651186347008, 0.06826694309711456, -0.02357347682118416, -0.07732689380645752, -0.020724093541502953, -0.03580781817436218, 0.05983347073197365, 0.031442251056432724, -0.04187273606657982, -0.033817216753959656, -0.01292186789214611, -0.008298559114336967, -0.05519504100084305, -0.05309257656335831, -0.036276545375585556, 0.014599992893636227, -0.044642124325037, -0.00818879809230566, -0.008178540505468845, 0.07187995314598083, 0.021479126065969467, -0.030767446383833885, -0.017444580793380737, -0.018124809488654137, -0.012268519960343838, 0.010050126351416111, -0.03757656365633011, 0.0019963986705988646, 0.006066804751753807, 0.020983202382922173, 0.006263859570026398, 0.024434762075543404, 0.025864824652671814, -0.08136258274316788, -0.006504352670162916, 0.00011816371988970786, -0.0031084264628589153, 0.01687968708574772, 0.01886187307536602, -0.008670216426253319, -0.035006362944841385, 0.06969544291496277, 0.02625650353729725, 0.010119316168129444, 0.0510980598628521, 0.04455238953232765, 0.007121437694877386, 0.03895830363035202, 0.029900725930929184, 0.003141937544569373, 0.033653922379016876, 0.007895907387137413, 0.005874861031770706, -0.04098237678408623, 0.023738952353596687, 0.043982427567243576, 0.025413766503334045, -0.09746359288692474, 0.05774366110563278, 0.038996703922748566, 0.0010288963094353676, 0.0029361152555793524, -0.04130585491657257, -0.04156649857759476, 0.0475633479654789, -0.01020768191665411, -0.26604148745536804, 0.030579447746276855, 0.04533595219254494, 0.06782598793506622, 0.006994026247411966, -0.03150143474340439, 0.015214633196592331, -0.03603752329945564, 0.022531650960445404, 0.0039972481317818165, 0.06966029852628708, -0.0008282175986096263, -0.016097186133265495, -0.008271608501672745, -0.011034064926207066, 0.004887735936790705, 0.06071874126791954, 0.034552399069070816, 0.03584996610879898, 0.032194364815950394, -0.007238485384732485, -0.015146891586482525, 0.1627262383699417, 0.01911945641040802, 0.0030851815827190876, 0.005780122242867947, -0.028349414467811584, -0.007463458459824324, 0.031151100993156433, -0.013112428598105907, 0.00888642854988575, 0.006371610332280397, -0.010833515785634518, 0.007097102236002684, 0.023829862475395203, -0.05930517986416817, -0.03794427961111069, 0.050813090056180954, 0.027097178623080254, 0.000983554869890213, 0.00017488522280473262, 0.0020312098786234856, -0.018646374344825745, 0.010712341405451298, 0.05744617059826851, 0.019566476345062256, 0.04630112648010254, -0.004055507481098175, -0.10552694648504257, -0.019492074847221375, -0.05577452853322029, -0.019807906821370125, 0.008341914042830467, -0.008878196589648724, -0.013841342180967331, 0.05329320952296257, 0.032267432659864426, -0.015278554521501064, 0.037573378533124924, 0.031479887664318085, -0.030554888769984245, -0.04641260951757431, 0.0814976841211319, -0.0014401975786313415, 0.020342405885457993 ]
[ 0.009578488767147064, 0.022435983642935753, -0.005351247265934944, -0.003139781067147851, 0.01588219590485096, 0.05571119487285614, -0.007741785608232021, -0.012265252880752087, -0.003824466373771429, -0.002026875503361225, -0.008000016212463379, -0.0008697330486029387, 0.023194054141640663, -0.0017933632479980588, -0.028381461277604103, -0.017556319013237953, 0.020829107612371445, 0.028004201129078865, 0.0038091852329671383, -0.005764935165643692, -0.02633516862988472, 0.00033698303741402924, 0.045070040971040726, -0.027577947825193405, -0.008624687790870667, 0.019762728363275528, -0.03086414374411106, 0.011642621830105782, 0.02608483098447323, -0.12252702564001083, -0.03552563861012459, -0.0011963978176936507, -0.01844755932688713, 0.015758361667394638, 0.0019746676553040743, -0.015018362551927567, -0.03442174196243286, -0.0019196285866200924, -0.020207656547427177, 0.018082134425640106, 0.016709554940462112, 0.00929565541446209, 0.0050537423230707645, 0.010940277948975563, 0.019510457292199135, -0.044629715383052826, -0.04145708680152893, -0.030650628730654716, 0.00664578378200531, 0.011751682497560978, -0.06105814874172211, -0.008578347973525524, -0.012292873114347458, 0.005396259017288685, 0.01207529567182064, -0.025355545803904533, -0.01654110476374626, -0.015643471851944923, -0.0005039682728238404, -0.03215903416275978, 0.018800335004925728, -0.05214853957295418, -0.02563341334462166, -0.05127658322453499, 0.02649092487990856, -0.024220185354351997, -0.04283623769879341, 0.022837849333882332, -0.02074609138071537, 0.01768849976360798, -0.04075900837779045, 0.013087342493236065, -0.03164936974644661, -0.024723853915929794, -0.04161550849676132, -0.026695813983678818, 0.006194241810590029, -0.04007832333445549, 0.006544239353388548, -0.006922717206180096, 0.0124890161678195, -0.005787466652691364, -0.01661841571331024, -0.004431609530001879, -0.01929883472621441, -0.006886810064315796, 0.006400647573173046, 0.04152422398328781, 0.008146295323967934, 0.0323781743645668, -0.05338309332728386, 0.011946476995944977, 0.031659986823797226, 0.02375682070851326, -0.08266939222812653, 0.017598075792193413, -0.007507614325731993, -0.002832989674061537, 0.027504323050379753, 0.8163953423500061, 0.017908699810504913, -0.03512391820549965, 0.007467130199074745, 0.01591927744448185, -0.007428446318954229, -0.005957523826509714, 0.008814251981675625, 0.025509679690003395, -0.01797453686594963, -0.02888665162026882, -0.01443046610802412, 0.04687921330332756, 0.00477926479652524, -0.0005317559698596597, 0.02922053635120392, 0.029859444126486778, 0.027268579229712486, 0.01888728141784668, -0.005810724571347237, -0.018787195906043053, 0.0002361225342610851, 0.0017231920501217246, 0.01064752321690321, 0.03025813400745392, -0.0078605767339468, -0.1940891146659851, -0.028542380779981613, -6.65950390114252e-33, 0.05488131567835808, -0.017109256237745285, 0.057064592838287354, 0.0014836374903097749, -0.004127250984311104, 0.02849540300667286, 0.004206217359751463, 0.018116576597094536, -0.01759684644639492, -0.049758732318878174, 0.005354746710509062, -0.020175203680992126, -0.03342824429273605, -0.027038728818297386, -0.023671938106417656, 0.009196373634040356, 0.005204429849982262, 0.0180404931306839, -0.012021944858133793, -0.03864951804280281, 0.0002826349518727511, 0.043511394411325455, -0.028488552197813988, 0.037618238478899, -0.008804451674222946, 0.015756187960505486, -0.013369136489927769, 0.006564069073647261, -0.007366034667938948, -0.051471367478370667, -0.015540034510195255, 0.015112793073058128, -0.008879139088094234, -0.021560126915574074, 0.03630382567644119, -0.05838615074753761, -0.06744100153446198, -0.00015006332250777632, -0.006138158962130547, -0.03906255587935448, -0.05004552751779556, 0.009317300282418728, -0.04242045804858208, -0.030552156269550323, -0.06129421666264534, 0.027956392616033554, -0.018462639302015305, 0.02417949214577675, -0.02779567986726761, 0.04718511179089546, 0.04025653749704361, 0.017292195931077003, 0.016199495643377304, -0.01869800314307213, -0.023686900734901428, 0.045234885066747665, 0.006952276919037104, -0.03169533982872963, 0.0022163172252476215, 0.01184042077511549, 0.004714832175523043, 0.041675686836242676, -0.012114390730857849, 0.0491732619702816, -0.009209695272147655, 0.06475140899419785, 0.037101875990629196, -0.010757898911833763, 0.019161555916070938, 0.03217579424381256, -0.07335805892944336, 0.0260661281645298, 0.008939117193222046, -0.03587823361158371, 0.044830571860075, -0.017619799822568893, -0.02813391387462616, -0.041171617805957794, 0.009578040800988674, 0.061886876821517944, -0.015656108036637306, 0.003140033222734928, 0.0028542487416416407, -0.06556109338998795, -0.05005297809839249, -0.008329788222908974, 0.0001917184126796201, 0.005882255267351866, 0.03083520010113716, 0.046445559710264206, 0.058306846767663956, 0.014707225374877453, -0.01617562584578991, 0.010496036149561405, -0.0038090674206614494, 6.16402862416711e-33, 0.030662816017866135, -0.013590043410658836, -0.014796544797718525, -0.022551074624061584, 0.02519044280052185, -0.05183883011341095, -0.015652749687433243, 0.011227951385080814, -0.015056243166327477, 0.026860488578677177, -0.005290518049150705, -0.010742675513029099, -0.04735525697469711, -0.007796062622219324, 0.04039193317294121, -0.028513915836811066, 0.00030635061557404697, -0.024327823892235756, -0.01927965134382248, 0.010067364200949669, 0.011322541162371635, 0.004622942768037319, 0.01649562269449234, 0.003506405744701624, -0.0006860594148747623, 0.04583771899342537, 0.024115797132253647, 0.036235105246305466, -0.015240482054650784, 0.0007969825528562069, 0.009943735785782337, -0.07621797174215317, -0.015724342316389084, -0.029359616339206696, -0.01467256061732769, 0.028193514794111252, -0.0005187868373468518, -0.02005227468907833, -0.003880128264427185, 0.015213599428534508, -0.009330770932137966, 0.02601391263306141, -0.014822158962488174, 0.054048001766204834, -0.0021322532556951046, 0.008560288697481155, -0.0033730121795088053, 0.004813430365175009, 0.006844033021479845, -0.006201821379363537, -0.007913145236670971, 0.02409140206873417, -0.016027791425585747, -0.0016634789062663913, 0.025456752628087997, -0.022422228008508682, -0.002061657840386033, 0.038479242473840714, 0.010594735853374004, 0.036201197654008865, -0.016104623675346375, -0.035087909549474716, -0.044367630034685135, -0.012798327021300793, -0.018043478950858116, 0.010060315951704979, -0.03311866149306297, 0.03797534108161926, 0.0034083181526511908, 0.0227186381816864, 0.008808787912130356, -0.00001244276518264087, 0.001924261567182839, 0.040452245622873306, -0.0004344258923083544, -0.023263007402420044, -0.015391207300126553, 0.02230880782008171, -0.0008546066819690168, 0.043365657329559326, 0.011027763597667217, 0.011677443981170654, 0.04832124337553978, 0.009431600570678711, 0.02326185069978237, 0.03553802892565727, -0.012842324562370777, 0.023149652406573296, 0.014132061041891575, -0.0206370297819376, 0.046908311545848846, -0.03457142412662506, 0.03977203741669655, 0.04200960323214531, -0.03384210914373398, -1.2320250597497306e-8, -0.08334683626890182, 0.02026127651333809, -0.007674581836909056, 0.010586362332105637, 0.003425735980272293, 0.003637621644884348, 0.003917138557881117, -0.0020045535638928413, 0.05839360132813454, 0.012810937128961086, 0.04206467047333717, -0.03806087002158165, 0.014335228130221367, 0.014336958527565002, 0.005111248232424259, -0.0552140511572361, -0.006616526748985052, 0.0034320903941988945, 0.038262177258729935, -0.0003273709735367447, 0.014938397333025932, 0.026735354214906693, -0.019773585721850395, 0.003321494907140732, -0.01882048510015011, -0.018328873440623283, 0.02569517120718956, -0.07168267667293549, -0.015715882182121277, 0.021415656432509422, 0.008087040856480598, -0.011500608175992966, -0.005219827406108379, 0.0033858963288366795, -0.01598261296749115, -0.05096389353275299, 0.03130611777305603, -0.008677036501467228, 0.0009483140311203897, 0.024190902709960938, -0.002514897845685482, 0.005186769645661116, -0.00541968597099185, -0.029015854001045227, 0.004092466086149216, 0.033861175179481506, 0.007639638613909483, -0.044340211898088455, 0.02168891206383705, -0.023045165464282036, 0.032895177602767944, -0.028080753982067108, 0.010894795879721642, 0.035384126007556915, 0.0527256540954113, -0.022082742303609848, 0.027244482189416885, 0.03430846333503723, -0.015309191308915615, 0.005382604897022247, 0.04357793927192688, -0.0045682811178267, -0.010486012324690819, 0.005300567951053381 ]
neo4j-cypher-building-the-query-for-a-movies-profile-page
https://markhneedham.com/blog/2015/04/01/neo4j-cypher-building-the-query-for-a-movies-profile-page
false
2015-04-24 23:53:12
R: Think Bayes Locomotive Problem - Posterior probabilities for different priors
[ "r-2" ]
[ "R" ]
In my continued reading of Think Bayes the next problem to tackle is the http://www.greenteapress.com/thinkbayes/train2.py[Locomotive problem] which is defined thus: ____ A railroad numbers its locomotives in order 1..N. One day you see a locomotive with the number 60. Estimate how many loco- motives the railroad has. ____ The interesting thing about this question is that it initially seems that we don't have enough information to come up with any sort of answer. However, we can get an estimate if we come up with a prior to work with. The simplest prior is to assume that there's one railroad operator with between say 1 and 1000 railroads with an equal probability of each size. We can then write similar code as with the http://www.markhneedham.com/blog/2015/04/22/r-replacing-for-loops-with-data-frames/[dice problem] to update the prior based on the trains we've seen. First we'll create a data frame which captures the product of 'number of locomotives' and the observations of locomotives that we've seen (in this case we've only seen one locomotive with number '60':) [source,r] ---- library(dplyr) possibleValues = 1:1000 observations = c(60) l = list(value = possibleValues, observation = observations) df = expand.grid(l) > df %>% head() value observation 1 1 60 2 2 60 3 3 60 4 4 60 5 5 60 6 6 60 ---- Next we want to add a column which represents the probability that the observed locomotive could have come from a particular fleet. If the number of railroads is less than 60 then we have a 0 probability, otherwise we have 1 / numberOfRailroadsInFleet: [source,r] ---- prior = 1 / length(possibleValues) df = df %>% mutate(score = ifelse(value < observation, 0, 1/value)) > df %>% sample_n(10) value observation score 179 179 60 0.005586592 1001 1001 60 0.000999001 400 400 60 0.002500000 438 438 60 0.002283105 667 667 60 0.001499250 661 661 60 0.001512859 284 284 60 0.003521127 233 233 60 0.004291845 917 917 60 0.001090513 173 173 60 0.005780347 ---- To find the probability of each fleet size we write the following code: [source,r] ---- weightedDf = df %>% group_by(value) %>% summarise(aggScore = prior * prod(score)) %>% ungroup() %>% mutate(weighted = aggScore / sum(aggScore)) > weightedDf %>% sample_n(10) Source: local data frame [10 x 3] value aggScore weighted 1 906 1.102650e-06 0.0003909489 2 262 3.812981e-06 0.0013519072 3 994 1.005031e-06 0.0003563377 4 669 1.493275e-06 0.0005294465 5 806 1.239455e-06 0.0004394537 6 673 1.484400e-06 0.0005262997 7 416 2.401445e-06 0.0008514416 8 624 1.600963e-06 0.0005676277 9 40 0.000000e+00 0.0000000000 10 248 4.028230e-06 0.0014282246 ---- Let's plot the data frame to see how the probability varies for each fleet size: [source,r] ---- library(ggplot2) ggplot(aes(x = value, y = weighted), data = weightedDf) + geom_line(color="dark blue") ---- image::{{<siteurl>}}/uploads/2015/04/2015-04-25_00-25-47.png[2015 04 25 00 25 47,500] The most likely choice is a fleet size of 60 based on this diagram but an alternative would be to find the mean of the posterior which we can do like so: [source,r] ---- > weightedDf %>% mutate(mean = value * weighted) %>% select(mean) %>% sum() [1] 333.6561 ---- Now let's create a function with all that code in so we can play around with some different priors and observations: [source,R] ---- meanOfPosterior = function(values, observations) { l = list(value = values, observation = observations) df = expand.grid(l) %>% mutate(score = ifelse(value < observation, 0, 1/value)) prior = 1 / length(possibleValues) weightedDf = df %>% group_by(value) %>% summarise(aggScore = prior * prod(score)) %>% ungroup() %>% mutate(weighted = aggScore / sum(aggScore)) return (weightedDf %>% mutate(mean = value * weighted) %>% select(mean) %>% sum()) } ---- If we update our observed railroads to have numbers 60, 30 and 90 we'd get the following means of posteriors assuming different priors: [source,r] ---- > meanOfPosterior(1:500, c(60, 30, 90)) [1] 151.8496 > meanOfPosterior(1:1000, c(60, 30, 90)) [1] 164.3056 > meanOfPosterior(1:2000, c(60, 30, 90)) [1] 171.3382 ---- At the moment the function assumes that we always want to have a uniform prior i.e. every option has an equal opportunity of being chosen, but we might want to vary the prior to see how different assumptions influence the posterior. We can refactor the function to take in values & priors instead of calculating the priors in the function: [source,R] ---- meanOfPosterior = function(values, priors, observations) { priorDf = data.frame(value = values, prior = priors) l = list(value = priorDf$value, observation = observations) df = merge(expand.grid(l), priorDf, by.x = "value", by.y = "value") %>% mutate(score = ifelse(value < observation, 0, 1 / value)) df %>% group_by(value) %>% summarise(aggScore = max(prior) * prod(score)) %>% ungroup() %>% mutate(weighted = aggScore / sum(aggScore)) %>% mutate(mean = value * weighted) %>% select(mean) %>% sum() } ---- Now let's check we get the same posterior means for the uniform priors: [source,r] ---- > meanOfPosterior(1:500, 1/length(1:500), c(60, 30, 90)) [1] 151.8496 > meanOfPosterior(1:1000, 1/length(1:1000), c(60, 30, 90)) [1] 164.3056 > meanOfPosterior(1:2000, 1/length(1:2000), c(60, 30, 90)) [1] 171.3382 ---- Now if instead of a uniform prior let's use a power law one where the assumption is that smaller fleets are more likely: [source,r] ---- > meanOfPosterior(1:500, sapply(1:500, function(x) x ** -1), c(60, 30, 90)) [1] 130.7085 > meanOfPosterior(1:1000, sapply(1:1000, function(x) x ** -1), c(60, 30, 90)) [1] 133.2752 > meanOfPosterior(1:2000, sapply(1:2000, function(x) x ** -1), c(60, 30, 90)) [1] 133.9975 > meanOfPosterior(1:5000, sapply(1:5000, function(x) x ** -1), c(60, 30, 90)) [1] 134.212 > meanOfPosterior(1:10000, sapply(1:10000, function(x) x ** -1), c(60, 30, 90)) [1] 134.2435 ---- Now we get very similar posterior means which converge on 134 and so that's our best prediction.
null
null
[ 0.0019341931911185384, 0.013997930102050304, -0.012974980287253857, 0.04751499369740486, 0.08290219306945801, 0.03881991654634476, 0.03625917807221413, -0.0022289592307060957, -0.0051406389102339745, -0.02826286107301712, 0.011730228550732136, 0.004715068731456995, -0.07005678117275238, 0.03663938492536545, -0.049235399812459946, 0.08168219029903412, 0.056091513484716415, -0.014020005241036415, -0.006342087872326374, -0.0037658815272152424, 0.03391718864440918, 0.05570455268025398, 0.02222924493253231, 0.04115603119134903, 0.02311050333082676, -0.028642870485782623, 0.03928201273083687, 0.01667538471519947, -0.016583368182182312, 0.0030692140571773052, 0.02739597111940384, 0.023343045264482498, -0.005478585138916969, -0.003977679181843996, 0.02712041139602661, 0.013710499741137028, -0.03941342607140541, -0.01949129067361355, -0.00035829219268634915, 0.030636586248874664, -0.06890445202589035, 0.017942259088158607, -0.04942169412970543, 0.024991696700453758, -0.047714605927467346, -0.009829051792621613, -0.03929245471954346, 0.023154333233833313, 0.03470456972718239, 0.003997874911874533, -0.04928004369139671, 0.046277016401290894, -0.01534076314419508, -0.020236924290657043, -0.008740926161408424, 0.05089322850108147, -0.004778478294610977, -0.0676446408033371, 0.04332209751009941, -0.0545114241540432, 0.025316333398222923, -0.004156240727752447, 0.010792632587254047, 0.016288021579384804, 0.01674138940870762, -0.03246297687292099, -0.019891340285539627, 0.05489944666624069, -0.031082678586244583, -0.022280698642134666, -0.06414315104484558, -0.017687471583485603, -0.015242616645991802, 0.008797470480203629, -0.010317813605070114, -0.0461411252617836, 0.014655900187790394, 0.039422180503606796, 0.006495912559330463, 0.025995872914791107, -0.020323848351836205, -0.006890697870403528, 0.020609423518180847, 0.015519516542553902, 0.0172896608710289, -0.0252598375082016, -0.026193585246801376, -0.036093734204769135, -0.0946807861328125, 0.07809121906757355, 0.026215162128210068, -0.04573177546262741, 0.019772345200181007, 0.03533629700541496, -0.05488887056708336, -0.01142865139991045, 0.02625347673892975, -0.015236185863614082, -0.023118479177355766, -0.021290531381964684, -0.0354234054684639, -0.01373731717467308, 0.041081178933382034, 0.030633559450507164, -0.0950850322842598, -0.023516422137618065, 0.00025354771059937775, -0.007665763609111309, -0.028903815895318985, 0.002054771641269326, -0.034072864800691605, 0.022941594943404198, -0.03713598474860191, 0.014308578334748745, -0.08367836475372314, 0.054320015013217926, 0.010235000401735306, -0.04801805317401886, 0.01553258951753378, 0.0024985240306705236, 0.04698209464550018, 0.036514852195978165, -0.006000312976539135, 0.05939050391316414, -0.0030107912607491016, 0.03312843665480614, 0.002217778703197837, 0.051028743386268616, -0.0153254559263587, -0.0656941682100296, 0.00006934567500138655, 0.06792332977056503, -0.04086867719888687, 0.009606019593775272, -0.013312682509422302, -0.028152208775281906, -0.021487131714820862, -0.0005759277264587581, 0.03529473766684532, 0.05144500359892845, -0.005037618335336447, -0.03288871422410011, 0.04851798340678215, 0.007357141003012657, 0.015536428429186344, 0.008727341890335083, -0.003990430850535631, -0.006952365860342979, -0.046747833490371704, 0.0022211915347725153, 0.01960184797644615, 0.02161407098174095, 0.05346977338194847, -0.03556724637746811, 0.012417368590831757, 0.0376238077878952, 0.015297997742891312, -0.006566624157130718, 0.013094819150865078, 0.020075548440217972, 0.03924808278679848, 0.0014525597216561437, 0.027439620345830917, 0.03195275738835335, 0.01437867060303688, -0.025547003373503685, 0.041132692247629166, 0.06853736937046051, -0.03686022013425827, -0.002645872300490737, -0.06566126644611359, -0.06325731426477432, 0.06511081755161285, -0.03812369331717491, 0.003737282007932663, 0.028473209589719772, 0.07165209949016571, 0.03793482109904289, 0.059451162815093994, -0.015560515224933624, -0.07387282699346542, 0.019868604838848114, 0.005199082661420107, 0.03807275369763374, 0.016399890184402466, -0.05623694136738777, 0.07096564024686813, 0.028527481481432915, 0.034412410110235214, 0.024414751678705215, -0.044807642698287964, -0.06545916199684143, 0.0013251439668238163, -0.046916279941797256, 0.06877148151397705, -0.0434313528239727, 0.01844724640250206, 0.0449359267950058, 0.026194604113698006, 0.03171252831816673, 0.025873249396681786, 0.025982700288295746, 0.04202359914779663, -0.02930724248290062, -0.041398484259843826, 0.050069618970155716, 0.033877380192279816, -0.014635073952376842, -0.0461650975048542, 0.03952491283416748, -0.03707510977983475, -0.0032407494727522135, 0.02749277651309967, -0.01459780428558588, 0.04582904279232025, -0.0028993715532124043, 0.05047707259654999, -0.00006365215085679665, 0.053070247173309326, -0.04363654553890228, -0.010630226694047451, 0.007642057724297047, -0.03038771077990532, -0.0003783179563470185, -0.003328978316858411, 0.12149219959974289, 0.05704880505800247, -0.004530583508312702, -0.05292893573641777, 0.009812305681407452, 0.00012230925494804978, -0.026417594403028488, 0.010626210831105709, 0.01684114709496498, 0.004923191852867603, 0.029925547540187836, -0.060501761734485626, -0.022689135745167732, 0.0479157455265522, -0.06456045061349869, 0.0032794144935905933, 0.06862407177686691, -0.02879343554377556, 0.06631191074848175, 0.015246598981320858, -0.017604125663638115, 0.00584854930639267, -0.030489282682538033, -0.0975625291466713, -0.022186720743775368, 0.0031300713308155537, -0.011583175510168076, 0.024197936058044434, -0.02746189944446087, -0.025995522737503052, -0.03162187710404396, -0.023498620837926865, -0.003462337888777256, 0.062340863049030304, 0.06884562224149704, -0.009096597321331501, 0.058878831565380096, -0.015644747763872147, -0.01521192118525505, -0.011100498028099537, -0.06200866773724556, -0.056482188403606415, -0.03607773035764694, 0.00233365292660892, 0.05905609950423241, 0.03112334944307804, -0.006639975123107433, 0.031457461416721344, 0.009916272945702076, -0.010135074146091938, -0.013828768394887447, 0.04026787355542183, 0.025378677994012833, -0.00824456661939621, 0.0021667969413101673, -0.025325162336230278, 0.04719535633921623, -0.011632661335170269, -0.013983406126499176, 0.027851225808262825, -0.06508539617061615, 0.04827502369880676, -0.03919466584920883, -0.019134050235152245, 0.03394736349582672, 0.013281174935400486, 0.03234000504016876, 0.04347299784421921, 0.0015039307763800025, 0.04789084568619728, 0.012389494106173515, 0.009683146141469479, 0.01683691143989563, 0.003207867732271552, 0.028677167370915413, -0.02374223619699478, -0.0216983612626791, 0.04934101179242134, -0.025855595245957375, 0.0018310414161533117, -0.03329215571284294, 0.020069794729351997, 0.0038106327410787344, -0.28284361958503723, 0.0013877958990633488, -0.005874408408999443, -0.03305266797542572, 0.013002523221075535, -0.011901553720235825, 0.005274076014757156, -0.035621657967567444, -0.027717020362615585, 0.03276073932647705, 0.017193961888551712, -0.03211783245205879, -0.037828803062438965, 0.042817749083042145, 0.0049855634570121765, -0.005528239533305168, 0.027676120400428772, -0.03950165957212448, -0.0052143847569823265, 0.041549503803253174, 0.011636628769338131, -0.05283404886722565, -0.02893010526895523, 0.0709380954504013, 0.028974877670407295, 0.07400160282850266, -0.08537480235099792, -0.0060360669158399105, -0.057342156767845154, -0.003700959961861372, 0.02609243430197239, -0.04469679296016693, 0.023089412599802017, -0.010391353629529476, 0.0043858857825398445, -0.047973304986953735, 0.004410839639604092, 0.010620063170790672, -0.014235963113605976, 0.04307142272591591, -0.027759214863181114, -0.0002500311238691211, 0.013007103465497494, 0.00009798254905035719, 0.05650213733315468, 0.004384756553918123, -0.0571250356733799, 0.01562567986547947, -0.02544488199055195, 0.058871131390333176, -0.014931941404938698, 0.003344791941344738, -0.009774401783943176, 0.01854507066309452, -0.03076942451298237, -0.010899262502789497, -0.013063023798167706, -0.007672601379454136, -0.047182343900203705, -0.0416543073952198, 0.010219543240964413, -0.028056049719452858, -0.006450579967349768, -0.02847154065966606, -0.035212982445955276, -0.06475653499364853, -0.07751051336526871, -0.0036826077848672867, 0.07338976860046387, 0.005729518365114927, -0.03713490441441536, -0.004398288670927286, -0.01412708405405283, -0.0945182740688324, -0.026294704526662827, -0.002277648076415062, -0.03437325358390808, -0.006622093729674816, 0.008115296252071857, 0.036625176668167114, -0.0432940274477005, -0.036710985004901886, 0.046221498399972916, 0.023988431319594383, 0.023984331637620926, -0.0050623612478375435, -0.01132963690906763, 0.01806064322590828, -0.019340813159942627, -0.01344668585807085, 0.07186534255743027, 0.00653887540102005, 0.002834707498550415, -0.016531821340322495, 0.006595111917704344, 0.04729523882269859, 0.010699477046728134, 0.018923550844192505, 0.019066663458943367, 0.046959806233644485, 0.02242926135659218, -0.0651526153087616, 0.002329446142539382, -0.04678678885102272, -0.056739892810583115, -0.002509916666895151, -0.025136804208159447, 0.01928659901022911, 0.016640881076455116, 0.008604408241808414, -0.0005913196364417672, -0.030696343630552292, 0.037773143500089645, -0.03264477103948593, -0.0067154052667319775, -0.03134424239397049, 0.01635231450200081, 0.05464649945497513, 0.0011575446696951985, -0.000915632932446897, -0.048202160745859146, 0.03290299326181412, -0.0659029558300972, -0.01737101376056671, -0.048359621316194534, -0.0356861837208271, 0.013091468252241611, -0.017141761258244514, -0.013978531584143639, 0.013256815262138844, -0.011135919019579887, 0.017226871103048325, 0.03460586443543434, -0.01638406701385975, 0.03716890513896942, -0.011716632172465324, -0.04098276421427727, -0.04923064261674881, -0.007554559037089348, 0.019356248900294304, -0.0022056587040424347, -0.00733562745153904, 0.02933773584663868, 0.007008468732237816, 0.041984010487794876, -0.014822418801486492, 0.06073310598731041, -0.003915389068424702, 0.01324614230543375, -0.01989884302020073, 0.01430290937423706, -0.026708198711276054, 0.02173450030386448, -0.03532462194561958, -0.019100714474916458, 0.004239351954311132, 0.04100923612713814, -0.02874113619327545, -0.020429391413927078, -0.025737961754202843, 0.02707924135029316, -0.02853059396147728, -0.024983344599604607, -0.05786089971661568, 0.029999278485774994, 0.05084705725312233, -0.023536918684840202, -0.014387118630111217, 0.01162925735116005, -0.014299471862614155, 0.0013200445100665092, -0.02722516842186451, -0.02217373065650463, -0.0007635384099557996, -0.010204054415225983, -0.010015368461608887, -0.00039623089833185077, -0.028150860220193863, -0.0006083839689381421, -0.009427721612155437, -0.017656780779361725, -0.02016608789563179, 0.016727672889828682, 0.011122578755021095, 0.043674733489751816, 0.045877452939748764, -0.0019293095683678985, -0.00844703707844019, -0.015955904498696327, -0.01653931476175785, -0.05215693637728691, -0.006642603315412998, 0.002014764817431569, 0.022542240098118782, -0.05490665137767792, -0.05714850872755051, -0.0033174881245940924, 0.009200122207403183, 0.021972455084323883, -0.011083954013884068, 0.017278112471103668, 0.0027804013807326555, -0.033352579921483994, -0.010352951474487782, 0.07087209820747375, -0.05566024035215378, 0.027887942269444466, -0.004531449638307095, -0.008023018948733807, 0.0241889338940382, -0.02428162284195423, -0.05601474270224571, -0.01032942347228527, -0.022080715745687485, 0.002965372521430254, -0.03222116455435753, -0.044082675129175186, -0.0460800975561142, 0.014063186943531036, -0.0025906821247190237, 0.03473958000540733, -0.023390980437397957, -0.009594730101525784, -0.025117874145507812, -0.03206433355808258, -0.007722040638327599, -0.020116711035370827, -0.039858441799879074, 0.02506048046052456, -0.02776881493628025, 0.01242708507925272, -0.028134094551205635, -0.002077171579003334, 0.048177607357501984, -0.02146599255502224, -0.009918288327753544, -0.014311511069536209, 0.03320290148258209, 0.03921506181359291, 0.03713976591825485, -0.007709580007940531, 0.004102428909391165, -0.028375599533319473, 0.0006237450870685279, -0.02553461864590645, 0.01027650572359562, -0.008027346804738045, -0.02589910291135311, 0.04407888650894165, 0.057883333414793015, 0.006354563403874636, 0.009872028604149818, -0.05801161751151085, -0.0011531485943123698, 0.07418932765722275, -0.022131139412522316, -0.01715729758143425, -0.004416078794747591, -0.036555126309394836, 0.03678714856505394, -0.013653005473315716, 0.01542407926172018, -0.021511612460017204, 0.010646187700331211, 0.022475842386484146, 0.01722072809934616, 0.03974373638629913, 0.009562515653669834, 0.0257240179926157, -0.055071257054805756, 0.02450423501431942, -0.08198370039463043, 0.00975846964865923, 0.05750391259789467, -0.016187621280550957, 0.025790702551603317, -0.01099784392863512, -0.04418972507119179, 0.054817214608192444, -0.05405895411968231, -0.027986349537968636, 0.026532698422670364, -0.014271282590925694, -0.005861710757017136, 0.014655061066150665, -0.05170309171080589, 0.01968972384929657, 0.021216463297605515, -0.05101701617240906, 0.004319536499679089, -0.018733981996774673, 0.04205961525440216, -0.01685451902449131, 0.0019068206893280149, 0.003560554701834917, -0.0017467315774410963, 0.059502970427274704, 0.04710904881358147, 0.03867245092988014, 0.0640576183795929, -0.038794297724962234, 0.042986176908016205, 0.023743396624922752, 0.0018754849443212152, -0.0030668419785797596, 0.028005274012684822, -0.008113774470984936, -0.04674076288938522, 0.0448136143386364, 0.0023308931849896908, -0.028174009174108505, -0.06327035278081894, 0.06570708751678467, 0.03651087358593941, -0.004523326177150011, -0.04708912968635559, 0.013167557306587696, -0.04038846492767334, -0.016804782673716545, 0.0005763366352766752, -0.021259412169456482, -0.001710770302452147, 0.06801221519708633, -0.018445109948515892, 0.019133705645799637, 0.062281638383865356, -0.01742030866444111, -0.009600521065294743, 0.0006215501925908029, 0.10781259089708328, 0.07953409105539322, 0.06847117841243744, 0.0004711230576504022, 0.08569961041212082, -0.019278811290860176, -0.04301873967051506, 0.010921409353613853, -0.017830677330493927, -0.02382458746433258, -0.03712083399295807, 0.0044578127562999725, 0.06398183107376099, -0.013568581081926823, 0.05154876410961151, -0.025873899459838867, 0.017205480486154556, 0.015429619699716568, 0.009129662998020649, 0.0006397365941666067, 0.06189872324466705, -0.01559374388307333, 0.04326296225190163, -0.02509736642241478, -0.03327955678105354, 0.022305453196167946, 0.004293687175959349, -0.01947842165827751, 0.029313666746020317, -0.033653099089860916, 0.016883425414562225, 0.02101757749915123, 0.02918316051363945, 0.08589337021112442, -0.047378648072481155, -0.015658244490623474, -0.018030721694231033, 0.026789657771587372, -0.00802906509488821, 0.006491347216069698, 0.020436055958271027, -0.02985173650085926, -0.007208734285086393, -0.008743034675717354, -0.0150910010561347, -0.01636902615427971, 0.0034112068824470043, 0.003204154083505273, -0.046151671558618546, 0.015109119936823845, 0.03488848730921745, -0.01942368969321251, -0.038322992622852325, -0.05034472793340683, -0.03895924612879753, -0.05587355047464371, -0.07708495110273361, -0.01268506795167923, 0.010673370212316513, -0.02039233408868313, -0.03242970257997513, -0.03143715113401413, -0.002606686670333147, -0.02590816095471382, 0.03296221047639847, -0.06535430252552032, -0.034416571259498596, 0.018690049648284912, 0.009263372048735619, 0.027239909395575523, 0.01525093987584114, 0.056018367409706116, -0.009543503634631634, -0.0075787766836583614, -0.000583517481572926, 0.020338889211416245, 0.027425823733210564, 0.013525579124689102, 0.03437143564224243, -0.0673750564455986, -0.002213289262726903, 0.014597317203879356, -0.06298021227121353, -0.08462373912334442, 0.02667407877743244, -0.0013287928886711597, -0.007510834373533726, 0.05916367843747139, -0.012377382256090641, 0.014412453398108482, -0.039395034313201904, -0.01237926259636879, -0.0026421069633215666, 0.004574384540319443, 0.037521470338106155, -0.05977407097816467, 0.06521362066268921, 0.012862791307270527, -0.017373813316226006, -0.06221101060509682, 0.005148499738425016, 0.008373324759304523, -0.021081073209643364, -0.05127023532986641, -0.038938309997320175, -0.006229883059859276, -0.09640747308731079, 0.0032792831771075726, 0.02539221942424774, -0.049165595322847366, -0.03187403455376625, 0.0305081345140934, 0.008143364451825619, 0.011587717570364475, 0.03695176914334297, -0.04885377734899521, 0.01294636819511652, -0.029763909056782722, -0.019323548302054405, -0.020612945780158043, 0.06298752874135971, -0.0039027922321110964, 0.03419703617691994, 0.017844995483756065, -0.036399997770786285, 0.01312707457691431, -0.03940950706601143, 0.03623173013329506, 0.021454747766256332, 0.0018884778255596757, -0.014438104815781116 ]
[ -0.07492804527282715, -0.02186453714966774, 0.004003819078207016, -0.013902377337217331, 0.03426090255379677, -0.00823998637497425, -0.018587753176689148, 0.022644057869911194, 0.00980753917247057, -0.03845495730638504, 0.010971225798130035, -0.06481634825468063, -0.03065643459558487, 0.000016471447452204302, 0.026736071333289146, 0.021531768143177032, -0.012036405503749847, -0.06726117432117462, 0.011357004754245281, 0.013890434987843037, 0.0038804621435701847, -0.07859132438898087, -0.07438850402832031, -0.024156741797924042, 0.004052290227264166, 0.019751019775867462, 0.03468380495905876, -0.04714321717619896, -0.005388754885643721, -0.21038956940174103, -0.014563123695552349, -0.022867491468787193, 0.03425687924027443, -0.032837092876434326, -0.003144566435366869, 0.03468048572540283, 0.031229937449097633, 0.04774448275566101, 0.06866753846406937, 0.04914232715964317, -0.010115258395671844, -0.0011050874600186944, -0.038451626896858215, -0.015708940103650093, 0.0353630892932415, 0.017511941492557526, -0.01570430025458336, -0.006453174166381359, -0.004907069727778435, 0.0017582235159352422, -0.025805769488215446, -0.0007682970026507974, 0.0003447344643063843, -0.021463561803102493, -0.011913241818547249, 0.02767813391983509, 0.018578922376036644, 0.03144567459821701, 0.031998176127672195, 0.03827058896422386, -0.0015433270018547773, -0.017924223095178604, -0.1690497100353241, 0.05450896918773651, 0.01672886312007904, 0.0029610339552164078, -0.03263304755091667, -0.026171641424298286, -0.042129792273044586, 0.11174201965332031, 0.01806553639471531, -0.028447823598980904, -0.03620890900492668, 0.041545987129211426, 0.0034771983046084642, -0.014723480679094791, -0.0013481874484568834, 0.031186042353510857, -0.0010734846582636237, -0.05377347767353058, -0.021952511742711067, -0.006564162205904722, -0.025322236120700836, -0.03164416924118996, -0.011342850513756275, 0.003105638548731804, -0.00018459033162798733, 0.04065543785691261, 0.003961426671594381, 0.04071317985653877, 0.04905077815055847, 0.02441992424428463, 0.009540851227939129, -0.0009736585197970271, -0.07537416368722916, -0.011055739596486092, 0.00001422310288035078, 0.026943471282720566, -0.0023421465884894133, 0.4080807566642761, -0.0011866530403494835, 0.012075470760464668, 0.06441204994916916, 0.07216675579547882, -0.020937716588377953, 0.013705081306397915, -0.0496574230492115, -0.05176881328225136, 0.005684584844857454, -0.07232066988945007, 0.0490790531039238, -0.012855065055191517, 0.08710732311010361, -0.01436133123934269, -0.005089242476969957, 0.012742041610181332, 0.058384429663419724, -0.008080225437879562, -0.00784805417060852, 0.007610891479998827, -0.0188624057918787, 0.02235858142375946, 0.04434962943196297, 0.002965587191283703, -0.017105381935834885, -0.02614978328347206, 0.029049420729279518, 0.07290273904800415, 0.006222628057003021, -0.005919226445257664, 0.03231950104236603, -0.06231306120753288, -0.07350187748670578, 0.001325064804404974, -0.006315644830465317, -0.01438690535724163, 0.06008811295032501, -0.017049230635166168, 0.005792990792542696, 0.035485461354255676, -0.03803643584251404, -0.04402095079421997, 0.06666634976863861, -0.02043837681412697, -0.07935546338558197, 0.10048074275255203, 0.025084787979722023, -0.06530965119600296, -0.019537007436156273, -0.05116204917430878, 0.013130524195730686, -0.003593417117372155, 0.0120868980884552, -0.0928044393658638, 0.010343987494707108, 0.03683068975806236, 0.058516066521406174, -0.00492234667763114, -0.08464989066123962, 0.0008376057958230376, -0.014746495522558689, 0.004476475063711405, -0.05453406274318695, 0.04110243171453476, 0.048349183052778244, -0.09060387313365936, -0.016337692737579346, -0.006876974366605282, 0.024861013516783714, -0.0770668089389801, -0.003494555363431573, 0.07096099108457565, -0.011926044709980488, 0.01354683842509985, 0.05598369613289833, -0.00842233281582594, -0.023625092580914497, 0.016285303980112076, 0.03304541856050491, 0.018935946747660637, 0.01255484577268362, 0.007342645898461342, -0.034047357738018036, -0.01129404827952385, -0.03463449329137802, -0.05729745328426361, -0.057538244873285294, -0.01101455744355917, -0.04806779697537422, 0.004528538789600134, 0.016359616070985794, -0.02002418227493763, -0.04591013118624687, 0.08366578072309494, -0.04005141928792, -0.03714404255151749, -0.015359863638877869, -0.005761560518294573, -0.02291143126785755, -0.02937415800988674, -0.04790447652339935, -0.01551908627152443, -0.03237128630280495, 0.01831650175154209, -0.05320071056485176, 0.09588539600372314, 0.05143829807639122, -0.03566339612007141, 0.06890687346458435, 0.03304116800427437, 0.003195457626134157, -0.04167577996850014, 0.005590036977082491, 0.01396564394235611, 0.00007389587699435651, 0.02725742757320404, 0.003965858835726976, 0.011164666153490543, 0.02407470904290676, 0.011766071431338787, 0.03418183699250221, -0.02195090241730213, -0.003496861783787608, -0.36263880133628845, -0.037759553641080856, 0.000699288968462497, 0.010011629201471806, 0.030951213091611862, -0.04926363751292229, -0.00681311497464776, 0.007990382611751556, -0.013035411946475506, 0.04035719856619835, 0.0651482567191124, -0.014688059687614441, -0.011603284627199173, -0.0949903354048729, -0.010756554082036018, 0.01734394207596779, -0.055695753544569016, -0.016238300129771233, -0.034957751631736755, 0.008035539649426937, -0.0008679493912495673, 0.031193898990750313, -0.02541712298989296, -0.060690440237522125, -0.009485015645623207, -0.03251219540834427, 0.13721878826618195, -0.020067647099494934, 0.0682191476225853, -0.04483206570148468, 0.02806428074836731, -0.016980687156319618, 0.009205115027725697, 0.025139810517430305, 0.04028751701116562, -0.05330049991607666, -0.019197043031454086, 0.015002761036157608, 0.023890670388936996, -0.0010214962530881166, -0.06376707553863525, 0.005806454923003912, -0.0331621915102005, 0.013775902800261974, -0.07523665577173233, 0.007061553653329611, -0.02842828445136547, -0.02793087437748909, -0.01774122193455696, 0.07014502584934235, 0.04872826486825943, 0.03586481139063835, 0.03232763335108757, 0.002005347516387701, 0.027390748262405396, -0.045809872448444366, -0.08670168370008469, -0.0010793081019073725, -0.028394019231200218, 0.02353617176413536, 0.017796820029616356, 0.05587497726082802, 0.02737218327820301, -0.025034351274371147, 0.008897519670426846, 0.004476201254874468, -0.0337931290268898, -0.022226523607969284, 0.03782261162996292, 0.008528290316462517, -0.018266094848513603, 0.10242676734924316, -0.0012948057847097516, -0.012797673232853413, 0.02908269315958023, 0.04157206788659096, -0.010503021068871021, 0.05482659488916397, 0.026926331222057343, 0.015133020468056202, 0.038477662950754166, -0.04449872300028801, 0.014283783733844757, 0.040049925446510315, 0.013372180983424187, 0.04156314581632614, 0.01722303405404091, -0.02198999747633934, 0.06169290840625763, 0.05579652637243271, -0.014904657378792763, -0.008948618546128273, 0.004749407060444355, -0.06467963010072708, 0.07445913553237915, -0.007235743571072817, -0.25990739464759827, 0.029182568192481995, 0.06659466028213501, 0.050910938531160355, 0.016218416392803192, 0.020308423787355423, 0.0195505041629076, -0.021503834053874016, 0.04016982391476631, -0.03369186073541641, 0.011329062283039093, 0.05185752362012863, 0.036656785756349564, -0.009415309876203537, -0.0035489993169903755, -0.04935546964406967, 0.029977845028042793, -0.027955597266554832, 0.04803473502397537, 0.0004930325667373836, 0.028500987216830254, -0.008516904897987843, 0.15583622455596924, 0.0397491417825222, 0.03733240067958832, 0.0029109136667102575, -0.024928158149123192, 0.006789469160139561, 0.012387629598379135, -0.004393870010972023, -0.025339143350720406, -0.030820049345493317, 0.04288297891616821, -0.01840164326131344, 0.03290698304772377, -0.002990552457049489, -0.02197732776403427, 0.05338449031114578, 0.026386473327875137, -0.010730510577559471, 0.002573051257058978, -0.004726093262434006, -0.04100131243467331, -0.007859191857278347, 0.09908029437065125, 0.03134814277291298, 0.007376216817647219, -0.0322757214307785, -0.06058153137564659, -0.010578472167253494, -0.007022058591246605, -0.019842777401208878, -0.020653411746025085, -0.024918705224990845, 0.022510584443807602, 0.07838376611471176, 0.030925821512937546, -0.03840482234954834, 0.01917876861989498, -0.008120928891003132, -0.029125362634658813, -0.04039602354168892, 0.0960375964641571, 0.022531813010573387, 0.024392900988459587 ]
[ -0.027329452335834503, 0.00031028632656671107, 0.013600642792880535, 0.03502243384718895, 0.003791271708905697, 0.03385525196790695, -0.002100291196256876, 0.07821952551603317, -0.06674010306596756, -0.007137346547096968, -0.02075054682791233, 0.028890961781144142, 0.01690065674483776, -0.0060210516676306725, -0.02227272093296051, 0.06797250360250473, 0.0368952639400959, 0.000161747942911461, 0.02392854169011116, -0.02569790743291378, 0.003512406488880515, 0.005061593372374773, 0.011228807270526886, 0.0033519472926855087, -0.039526041597127914, 0.005564287770539522, -0.01185778621584177, 0.0089048370718956, 0.020317450165748596, -0.12226569652557373, -0.05997276306152344, -0.044313687831163406, -0.01853240467607975, -0.00628593610599637, -0.02580331638455391, -0.01523954700678587, -0.02809251844882965, -0.002583711640909314, 0.025523381307721138, 0.05121288821101189, -0.01530260406434536, -0.022893758490681648, -0.03182533010840416, 0.044552840292453766, -0.01038554310798645, -0.03382968157529831, 0.011468535289168358, -0.023832930251955986, -0.020897792652249336, -0.008689076639711857, -0.03849756717681885, -0.014599333517253399, 0.018432337790727615, -0.005137630272656679, 0.003601407166570425, -0.043845612555742264, -0.027402395382523537, 0.030028866603970528, 0.01757967472076416, 0.03554000332951546, -0.03230947256088257, -0.008808514103293419, -0.017952634021639824, -0.034381549805402756, -0.018053485080599785, -0.021715078502893448, -0.0716203823685646, 0.03530779480934143, -0.010510586202144623, -0.004852148238569498, 0.04633531719446182, -0.012491592206060886, -0.024606013670563698, -0.016964413225650787, -0.01982654072344303, 0.020970623940229416, -0.03904254734516144, 0.012619099579751492, -0.009416941553354263, -0.008563634939491749, -0.05627415329217911, 0.011042377911508083, -0.007743360474705696, -0.015229130163788795, 0.025383567437529564, -0.025945985689759254, 0.056806787848472595, 0.019959526136517525, 0.03472916781902313, 0.026491401717066765, -0.014820903539657593, 0.006975019350647926, -0.012874454259872437, 0.011550930328667164, -0.08715560287237167, 0.038182955235242844, -0.016441404819488525, 0.01873207278549671, 0.03125260770320892, 0.761951208114624, 0.06444766372442245, 0.03362753614783287, -0.011013045907020569, 0.06646427512168884, -0.02731369063258171, 0.02698543481528759, -0.009058281779289246, 0.03797886520624161, 0.02256081812083721, -0.07320566475391388, 0.03682256489992142, 0.014294084161520004, 0.03856640309095383, 0.061341166496276855, -0.009241745807230473, -0.004257669672369957, -0.04073884338140488, 0.029623987153172493, -0.01776856556534767, -0.004589636344462633, 0.027588168159127235, 0.005994988605380058, 0.056300416588783264, 0.025568239390850067, -0.00369472848251462, -0.1923845112323761, 0.06041073426604271, -6.571338151411002e-33, -0.025258952751755714, -0.013127218931913376, -0.00815240852534771, -0.030885694548487663, 0.019149519503116608, -0.027721485123038292, -0.025054873898625374, 0.012560967355966568, -0.018362469971179962, 0.012102403677999973, 0.001905033364892006, 0.03328648582100868, -0.03772274777293205, -0.05384473502635956, 0.03796831890940666, -0.04253481701016426, -0.019865918904542923, 0.030074335634708405, 0.02265647053718567, 0.026025179773569107, 0.10163441300392151, 0.03154873475432396, -0.01394745334982872, -0.0016327077755704522, 0.02980826608836651, 0.022017711773514748, 0.011546965688467026, 0.007466641254723072, -0.013604898005723953, -0.03385418653488159, -0.02665349468588829, 0.038791168481111526, 0.005020651500672102, -0.01953432522714138, -0.011579201556742191, -0.05959939956665039, 0.005035956855863333, 0.005768457893282175, -0.033523447811603546, -0.02751835063099861, -0.004512832034379244, 0.014146469533443451, -0.030999567359685898, -0.006186219397932291, -0.05143744871020317, -0.010502604767680168, 0.0567476823925972, 0.019100431352853775, -0.015348962508141994, -0.02393456920981407, -0.006042188033461571, -0.04312629625201225, 0.043236151337623596, -0.01164253894239664, -0.01649603433907032, 0.016796477138996124, 0.01290157437324524, -0.0007650398765690625, 0.029251515865325928, -0.02316013164818287, 0.02640308067202568, 0.010858355090022087, 0.03210056200623512, 0.02041272632777691, 0.001571801258251071, -0.022234203293919563, 0.010584346018731594, 0.001821783371269703, 0.01677456498146057, 0.0022544870153069496, -0.05502218008041382, -0.0021325042471289635, -0.002850096672773361, -0.02706247754395008, 0.04026700556278229, -0.027693189680576324, -0.012410842813551426, 0.05548922345042229, -0.034099359065294266, -0.0038513916078954935, -0.0335124135017395, -0.025672702118754387, -0.0196357611566782, -0.006869628094136715, 0.0291382297873497, 0.03904905170202255, 0.030294615775346756, 0.003556166309863329, -0.028827743604779243, 0.025723259896039963, -0.0035462798550724983, 0.012183797545731068, -0.0015936401905491948, 0.024683719500899315, 0.031140225008130074, 7.755967562707117e-33, 0.01367474440485239, 0.02300727739930153, 0.04875858128070831, -0.01702309399843216, -0.0004064158711116761, -0.02823210321366787, 0.07719635218381882, -0.008447566069662571, -0.03566271811723709, 0.044686250388622284, -0.039865054190158844, -0.02173844538629055, -0.013724228367209435, 0.06063603609800339, 0.03696790710091591, -0.04625475034117699, 0.044526658952236176, 0.03750445321202278, -0.00357828545384109, -0.02645535208284855, -0.03889622911810875, -0.009710046462714672, -0.05610409751534462, -0.0052842446602880955, 0.04564303904771805, 0.08189785480499268, 0.007703301962465048, -0.012459391728043556, -0.011770336888730526, -0.00001902123767649755, 0.0056239645928144455, 0.0034838274586945772, 0.026682749390602112, -0.03897560387849808, -0.05230705812573433, 0.04116014018654823, 0.053114958107471466, 0.007954005151987076, 0.008102095685899258, 0.006987263448536396, 0.046965599060058594, -0.022796012461185455, 0.011822708882391453, 0.011001202277839184, 0.0017979085678234696, -0.013128083199262619, -0.014606062322854996, -0.02280055359005928, -0.054315537214279175, 0.016956090927124023, 0.019549189135432243, 0.059449873864650726, -0.03267854452133179, 0.0035758765880018473, 0.030664538964629173, 0.006888117175549269, -0.025781119242310524, 0.00018763964180834591, -0.012057039886713028, 0.005623213481158018, 0.01787560060620308, 0.006262724753469229, -0.008292470127344131, 0.019747719168663025, -0.002719978569075465, 0.008000035770237446, -0.06026507541537285, -0.013731813058257103, -0.025168506428599358, -0.015532596968114376, -0.015720391646027565, 0.004946295637637377, 0.005737507715821266, 0.04186177998781204, -0.003426093840971589, -0.01587325520813465, -0.026286782696843147, 0.016573747619986534, 0.011450250633060932, 0.04850712791085243, 0.019869312644004822, -0.07357049733400345, 0.020998729392886162, -0.0027455154340714216, -0.0018299719085916877, 0.018360251560807228, -0.006532500497996807, 0.03129974380135536, 0.0715804323554039, -0.050501514226198196, 0.05575064569711685, -0.02747373655438423, 0.015166648663580418, 0.007316760253161192, -0.08496221899986267, -1.211830458203167e-8, -0.02195623517036438, -0.02782001718878746, -0.01064087264239788, 0.0520634725689888, 0.0481400266289711, -0.009792786091566086, -0.037085115909576416, -0.0023491501342505217, -0.042437031865119934, -0.01366343442350626, 0.05367571860551834, 0.006646166555583477, -0.037466708570718765, 0.029054148122668266, 0.005715647246688604, -0.06655807793140411, 0.004587383940815926, 0.019442006945610046, 0.04368101432919502, 0.014942271634936333, -0.007849764078855515, 0.051648445427417755, -0.022162696346640587, 0.006140474230051041, 0.01797032169997692, -0.047692250460386276, 0.02004631794989109, -0.07571732997894287, 0.040771808475255966, -0.006986018270254135, -0.007268473040312529, 0.0023430364672094584, -0.018499823287129402, 0.018064482137560844, 0.013820169493556023, -0.00781510304659605, 0.03121502883732319, 0.029514813795685768, 0.03613895922899246, -0.03680546209216118, -0.012700126506388187, -0.020967604592442513, -0.01083267480134964, -0.013356930576264858, 0.03793266415596008, 0.03215106204152107, -0.037564702332019806, -0.007099493406713009, 0.03568515554070473, -0.04055038467049599, -0.00801048707216978, -0.01674557290971279, 0.03511858358979225, 0.03157348558306694, 0.04238293319940567, -0.005655455403029919, 0.022099267691373825, -0.045647017657756805, -0.071940578520298, -0.03609171882271767, -0.007046136539429426, -0.002256253268569708, 0.03774615004658699, -0.04234904795885086 ]
r-think-bayes-locomotive-problem-posterior-probabilities-for-different-priors
https://markhneedham.com/blog/2015/04/24/r-think-bayes-locomotive-problem-posterior-probabilities-for-different-priors
false
2015-04-12 07:55:29
R: Creating an object with functions to calculate conditional probability
[ "r-2", "rstats" ]
[ "R" ]
I've been working through Alan Downey's http://www.greenteapress.com/thinkbayes/[Thinking Bayes] and I thought it'd be an interesting exercise to translate some of the code from Python to R. The first example is a simple one about conditional probablity and the author creates a class 'PMF' (Probability Mass Function) to solve the following problem: ____ Suppose there are two bowls of cookies. Bowl 1 contains 30 vanilla cookies and 10 chocolate cookies. Bowl 2 contains 20 of each. Now suppose you choose one of the bowls at random and, without looking, select a cookie at random. The cookie is vanilla. What is the probability that it came from Bowl 1? ____ In Python the code looks like this: [source,python] ---- pmf = Pmf() pmf.Set('Bowl 1', 0.5) pmf.Set('Bowl 2', 0.5) pmf.Mult('Bowl 1', 0.75) pmf.Mult('Bowl 2', 0.5) pmf.Normalize() print pmf.Prob('Bowl 1') ---- The 'PMF' class is defined http://www.greenteapress.com/thinkbayes/thinkbayes.py[here]. * 'Set' defines the prior probability of picking a cookie from either bowl i.e. in our case it's random. * 'Mult' defines the likelihood of picking a vanilla biscuit from either bowl * 'Normalize' applies a normalisation so that our posterior probabilities add up to 1. We want to create something similar in R and the actual calculation is stragiht forward: [source,r] ---- pBowl1 = 0.5 pBowl2 = 0.5 pVanillaGivenBowl1 = 0.75 pVanillaGivenBowl2 = 0.5 > (pBowl1 * pVanillaGivenBowl1) / ((pBowl1 * pVanillaGivenBowl1) + (PBowl2 * pVanillaGivenBowl2)) 0.6 > (pBowl2 * pVanillaGivenBowl2) / ((pBowl1 * pVanillaGivenBowl1) + (pBowl2 * pVanillaGivenBowl2)) 0.4 ---- The problem is we have quite a bit of duplication and it doesn't read as cleanly as the Python version. I'm not sure of the idiomatic way of handling this type of problem in R with mutable state in R but it seems like we can achieve this http://cran.r-project.org/doc/manuals/r-release/R-intro.html#Writing-your-own-functions[using functions]. I ended up writing the following function which returns a list of other functions to call. [source,r] ---- create.pmf = function() { priors <<- c() likelihoods <<- c() list( prior = function(option, probability) { l = c(probability) names(l) = c(option) priors <<- c(priors, l) }, likelihood = function(option, probability) { l = c(probability) names(l) = c(option) likelihoods <<- c(likelihoods, l) }, posterior = function(option) { names = names(priors) normalised = 0.0 for(name in names) { normalised = normalised + (priors[name] * likelihoods[name]) } (priors[option] * likelihoods[option]) / normalised } ) } ---- I couldn't work out how to get 'priors' and 'likelihoods' to be lexically scoped so I've currently got those defined as global variables. I'm using a http://stackoverflow.com/questions/2858014/working-with-dictionaries-lists-in-r[list as a kind of dictionary following a suggestion on Stack Overflow]. The code doesn't handle the unhappy path very well but it seems to work for the example from the book: [source,r] ---- pmf = create.pmf() pmf$prior("Bowl 1", 0.5) pmf$prior("Bowl 2", 0.5) pmf$likelihood("Bowl 1", 0.75) pmf$likelihood("Bowl 2", 0.5) > pmf$posterior("Bowl 1") Bowl 1 0.6 > pmf$posterior("Bowl 2") Bowl 2 0.4 ---- How would you solve this type of problem? Is there a cleaner/better way?
null
null
[ -0.010806169360876083, 0.0028728076722472906, -0.039917949587106705, 0.011890917085111141, 0.06362171471118927, 0.031865645200014114, 0.012437180615961552, 0.011101973243057728, -0.013209830969572067, -0.012798254378139973, -0.015744296833872795, 0.01162322610616684, -0.05902235209941864, 0.001265830360352993, -0.0201273113489151, 0.07177077233791351, 0.06581789255142212, -0.017173390835523605, -0.01401284709572792, 0.027480129152536392, 0.027063565328717232, 0.08707165718078613, 0.012729346752166748, 0.025932392105460167, 0.045211419463157654, 0.018939433619379997, 0.049096137285232544, 0.03553604334592819, -0.021478576585650444, -0.03555670008063316, 0.04199158400297165, 0.036829624325037, 0.014067701064050198, -0.0025454445276409388, 0.028662674129009247, -0.0074580213986337185, -0.0069028050638735294, 0.021547483280301094, 0.00440988689661026, 0.022970028221607208, -0.03191105276346207, 0.03466486930847168, -0.04261109605431557, 0.0022898828610777855, -0.04722373187541962, -0.009635340422391891, -0.025285571813583374, 0.03133339807391167, -0.015986764803528786, -0.011540381237864494, -0.057040538638830185, 0.048118624836206436, -0.03431589901447296, -0.01982220634818077, -0.006699683144688606, 0.05224144086241722, 0.026024432852864265, -0.059703193604946136, 0.013714548200368881, -0.04141175374388695, -0.03959893807768822, 0.010926012881100178, -0.011649664491415024, 0.011837301775813103, -0.02278147079050541, -0.013928772881627083, -0.019273968413472176, 0.05741778016090393, -0.03242514282464981, -0.026060057803988457, -0.05322445183992386, -0.0295620895922184, -0.024356022477149963, 0.021385880187153816, -0.0225579384714365, -0.05179223045706749, 0.008599645458161831, 0.07166711241006851, -0.009920657612383366, 0.009629257023334503, 0.017734918743371964, -0.021078113466501236, 0.027631079778075218, 0.02068888023495674, 0.004176636692136526, -0.015596416778862476, -0.013956489972770214, -0.022557873278856277, -0.047950416803359985, 0.07029712945222855, 0.011228549294173717, -0.04576372727751732, -0.002492754952982068, 0.0034019623417407274, -0.028503812849521637, -0.00223074690438807, 0.01501692645251751, -0.019022127613425255, 0.00736102182418108, -0.017195573076605797, -0.06078353524208069, -0.0379754863679409, 0.04914287477731705, 0.00542448740452528, -0.06175416707992554, 0.00034994020825251937, -0.0023185673635452986, -0.03548494353890419, -0.04870517551898956, 0.011013242416083813, -0.026631491258740425, 0.032031577080488205, -0.022269852459430695, 0.004177108872681856, -0.060669057071208954, 0.057765621691942215, 0.017487123608589172, -0.024560753256082535, -0.024785377085208893, -0.0002080021658912301, 0.046361882239580154, 0.03141338378190994, -0.03047245368361473, 0.0762750431895256, 0.015097181312739849, 0.0257907435297966, 0.001623869058676064, 0.0645948052406311, 0.009500372223556042, -0.059541966766119, 0.013398882001638412, 0.054422345012426376, -0.0032690027728676796, -0.006698955781757832, -0.017912065610289574, -0.017493637278676033, -0.026675596833229065, -0.008225218392908573, 0.06062578409910202, 0.020164206624031067, 0.01108638197183609, -0.025873830541968346, 0.03788917511701584, -0.0019493550062179565, 0.03222181275486946, -0.000981912948191166, -0.010722440667450428, -0.005436175037175417, -0.025581562891602516, -0.002100133104249835, 0.012655315920710564, -0.0009607613319531083, 0.071922667324543, -0.02964593842625618, 0.009536609053611755, 0.05294673144817352, 0.03689761087298393, 0.02158498391509056, -0.042069029062986374, -0.0020812361035495996, 0.03088272176682949, 0.01979466713964939, 0.00023044113186188042, 0.06919791549444199, 0.019269948825240135, -0.01731843315064907, 0.038927849382162094, 0.09456514567136765, -0.021168384701013565, 0.007192612625658512, -0.07457580417394638, -0.06686486303806305, 0.07331421971321106, -0.02285309135913849, -0.017264695838093758, -0.00978013128042221, 0.06543582677841187, -0.005909878294914961, 0.06537598371505737, -0.0019755123648792505, -0.07275351881980896, 0.03429991379380226, -0.00488450238481164, 0.031244466081261635, 0.029233653098344803, -0.03835798054933548, 0.0711526945233345, 0.005670658778399229, 0.016062403097748756, 0.04833529144525528, -0.06077844277024269, -0.07073479145765305, -0.013215187005698681, -0.03230873867869377, 0.05090691149234772, -0.015099747106432915, -0.022932391613721848, 0.04671197012066841, 0.06452537328004837, 0.006549946963787079, -0.021013429388403893, 0.013445359654724598, 0.029639925807714462, -0.05731656402349472, -0.060065124183893204, 0.0294570904225111, 0.04347239434719086, -0.00604808796197176, -0.03626248240470886, 0.018551884219050407, -0.03300498425960541, 0.02695540338754654, 0.01601237989962101, -0.04656001925468445, 0.02019750326871872, 0.02160792052745819, 0.04905141890048981, 0.01508172694593668, 0.029943738132715225, -0.038334425538778305, 0.00694389920681715, -0.008396493270993233, 0.004030303098261356, -0.023123938590288162, 0.009300850331783295, 0.1329430192708969, 0.08390972018241882, -0.043972913175821304, -0.05083388462662697, 0.05542599782347679, 0.0005861126119270921, -0.02263372577726841, 0.03496534004807472, -0.008361582644283772, -0.0030889397021383047, -0.0021264536771923304, -0.05862175673246384, -0.021588735282421112, 0.014223593287169933, -0.03973116725683212, 0.008658166043460369, 0.09040649235248566, -0.026790469884872437, 0.041003383696079254, -0.04364008828997612, -0.025709301233291626, -0.02220376767218113, -0.019541708752512932, -0.05120745301246643, 0.017472798004746437, -0.015148947946727276, -0.01290267612785101, 0.06071753427386284, -0.0021754875779151917, -0.023362334817647934, -0.011308800429105759, -0.030905647203326225, 0.03917912021279335, 0.09042848646640778, 0.06315161287784576, -0.04883009195327759, 0.07714718580245972, -0.00006662520172540098, -0.019203148782253265, -0.04539492353796959, -0.06573939323425293, -0.04692377150058746, -0.014293042942881584, -0.002186362398788333, 0.030662285163998604, 0.017575670033693314, 0.0062861135229468346, 0.00046636085608042777, 0.015009583905339241, 0.004815458785742521, -0.02266179583966732, 0.02922450751066208, 0.01939031109213829, -0.048550691455602646, -0.036628253757953644, -0.0034023697953671217, 0.04657797887921333, -0.02355363965034485, -0.042132411152124405, -0.0020672737155109644, -0.05332983285188675, 0.03668471425771713, -0.02875118888914585, -0.027635730803012848, 0.02856701985001564, -0.0027520901057869196, 0.032794270664453506, 0.011297961696982384, -0.0005545931053347886, 0.0616595521569252, -0.003838425502181053, 0.0205064844340086, 0.01836380735039711, 0.021969856694340706, 0.03611608222126961, -0.004595896229147911, 0.005734387319535017, 0.011184670962393284, -0.015621669590473175, -0.015133443288505077, -0.04230363294482231, 0.012397765181958675, -0.0010356605052947998, -0.27779605984687805, 0.015996411442756653, 0.015216448344290257, -0.03432035073637962, 0.03131961077451706, -0.02939893677830696, 0.010844144970178604, -0.044619929045438766, -0.01865062676370144, 0.02533460035920143, 0.016217077150940895, -0.0673946738243103, -0.03400244936347008, 0.06070827692747116, 0.04174143448472023, 0.014159897342324257, -0.005464790854603052, -0.027306171134114265, 0.008435763418674469, 0.07594597339630127, 0.043030980974435806, -0.04257262125611305, -0.03061085008084774, 0.0209064818918705, -0.008900259621441364, 0.04043567553162575, -0.013150827027857304, 0.02511601150035858, -0.07827486097812653, -0.023499513044953346, 0.02057282254099846, -0.04732099920511246, 0.007946966215968132, -0.0006808615289628506, 0.010919230990111828, -0.018543362617492676, 0.022861512377858162, -0.0033855552319437265, 0.0002219107554992661, 0.053194623440504074, -0.0335812047123909, -0.04778829962015152, 0.036042720079422, -0.010605618357658386, 0.09703091531991959, 0.009565906599164009, -0.05276286229491234, -0.01968102902173996, -0.05186222866177559, 0.06781978160142899, 0.0018395701190456748, -0.0010420125909149647, -0.020650533959269524, 0.015362674370408058, -0.03960472717881203, -0.008560588583350182, -0.007983245886862278, -0.0249308031052351, -0.03740299493074417, -0.017587898299098015, 0.019774967804551125, -0.013407664373517036, -0.01892033964395523, -0.036640480160713196, -0.018090469762682915, -0.04270053654909134, -0.08693506568670273, -0.021157005801796913, 0.08100379258394241, 0.029781701043248177, -0.029770875349640846, -0.045992400497198105, -0.03268235921859741, -0.0986843854188919, -0.012642241083085537, -0.012205886654555798, 0.00007466308306902647, 0.0036682176869362593, 0.011343921534717083, 0.035876307636499405, -0.027146661654114723, -0.07071574777364731, 0.00404226453974843, -0.004915211349725723, 0.015503513626754284, -0.01163400337100029, -0.0032202082220464945, 0.019125614315271378, -0.025521423667669296, -0.021003972738981247, 0.07409622520208359, -0.004838041495531797, -0.014349264092743397, -0.005966480355709791, -0.008071156218647957, 0.036273129284381866, 0.010045559145510197, -0.0138239162042737, 0.010548734106123447, 0.042109958827495575, 0.01145930215716362, -0.06873805075883865, -0.01773706078529358, -0.028202539309859276, -0.06354553997516632, -0.003835227806121111, -0.05031170696020126, 0.023010309785604477, 0.029033895581960678, -0.013967570848762989, 0.007689048536121845, 0.013280488550662994, 0.03193318843841553, -0.006806528195738792, -0.015001696534454823, -0.038946401327848434, 0.009303794242441654, 0.014242528937757015, 0.016679856926202774, -0.015049891546368599, -0.07576144486665726, 0.027655743062496185, -0.0018163294298574328, -0.05146727338433266, -0.048147618770599365, -0.046304311603307724, -0.005280139856040478, -0.028447741642594337, 0.016899539157748222, 0.0027154500130563974, -0.0045073735527694225, 0.012984860688447952, 0.04602779820561409, -0.009592680260539055, 0.04216130077838898, 0.009957689791917801, -0.03984985128045082, -0.020748071372509003, -0.006121932063251734, -0.013647803105413914, 0.016260918229818344, -0.005911227781325579, 0.02028856985270977, 0.020959552377462387, 0.03270259499549866, -0.01912309043109417, 0.03898346796631813, 0.0028099657502025366, -0.0016828932566568255, -0.002902480773627758, 0.013810803182423115, 0.012862852774560452, 0.028164835646748543, -0.019874921068549156, -0.04121435061097145, -0.0109351621940732, 0.012727388180792332, -0.004632392432540655, -0.028420040383934975, -0.06767196208238602, 0.05408595874905586, -0.029370633885264397, -0.04450006037950516, -0.026146475225687027, 0.01375637948513031, 0.07376241683959961, -0.0006126289372332394, 0.018786409869790077, -0.00640880735591054, -0.009610178880393505, 0.011705600656569004, -0.019230686128139496, -0.008396350778639317, 0.002853094832971692, -0.036291155964136124, 0.023285292088985443, 0.03108452633023262, -0.030840052291750908, -0.04718247056007385, -0.024586794897913933, -0.014599784277379513, -0.01934557966887951, 0.00019811737001873553, -0.016296355053782463, 0.05196061730384827, 0.04135530814528465, -0.04468189552426338, -0.0038458036724478006, -0.03790061175823212, -0.020832154899835587, -0.05875502526760101, -0.02187911607325077, -0.02422993630170822, 0.03116765059530735, -0.03361375257372856, -0.07508426904678345, -0.016752589493989944, 0.006047076545655727, -0.03934034705162048, -0.0019858432933688164, 0.011596748605370522, 0.007774466648697853, -0.00521897291764617, 0.036711953580379486, 0.06285310536623001, -0.05990554392337799, 0.007310087326914072, -0.0057703303173184395, -0.01793898455798626, 0.026066994294524193, 0.012034527026116848, -0.026817478239536285, 0.012253287248313427, -0.02085098624229431, 0.00638267956674099, -0.02330753207206726, -0.06275545060634613, -0.013241173699498177, 0.017763251438736916, 0.004677954595535994, 0.00764523446559906, -0.02800445631146431, 0.0012485901825129986, -0.04174404591321945, -0.024510394781827927, 0.022313175722956657, -0.02634722925722599, -0.0568089596927166, 0.058020446449518204, -0.017076801508665085, 0.02374521642923355, -0.015193258412182331, 0.02149355225265026, 0.00898734014481306, -0.011157586239278316, 0.0029874315951019526, -0.03260643780231476, 0.03250688314437866, -0.016038943082094193, 0.046387724578380585, -0.006250868551433086, -0.006640648934990168, 0.010837392881512642, 0.005550167988985777, -0.04569854959845543, 0.01983114704489708, 0.02835245244204998, -0.011914747767150402, 0.033494021743535995, 0.05702058970928192, -0.04223163425922394, 0.023811889812350273, 0.00006775043584639207, 0.002642102539539337, 0.0591159351170063, -0.000343004910973832, -0.026361120864748955, -0.03051251731812954, -0.028940211981534958, 0.02664095349609852, 0.012575113214552402, 0.0026433297898620367, -0.03814096003770828, 0.034310486167669296, 0.0360381044447422, 0.037276338785886765, 0.08124960958957672, -0.010849070735275745, 0.01502012275159359, -0.048105400055646896, 0.007845984771847725, -0.09352803230285645, -0.01760433055460453, 0.0644606500864029, 0.029259784147143364, -0.025865059345960617, -0.011797977611422539, -0.06283316016197205, 0.04922870919108391, -0.08951140195131302, -0.01895456574857235, 0.025473684072494507, -0.010030030272901058, 0.013910970650613308, 0.01209653913974762, -0.04437665641307831, 0.0054160370491445065, 0.015063068829476833, -0.05467178300023079, -0.00003660139554995112, -0.007550190202891827, 0.05582389980554581, -0.011122663505375385, 0.034850407391786575, 0.01508239097893238, 0.016002122312784195, 0.0741119235754013, 0.0231171902269125, 0.01330314390361309, 0.04777735099196434, -0.018682489171624184, 0.0380997397005558, 0.025399889796972275, 0.011892748065292835, 0.011189643293619156, 0.0018702775705605745, 0.015426895581185818, -0.05846375226974487, 0.010105788707733154, -0.007074309978634119, -0.049316443502902985, -0.047849562019109726, 0.060723740607500076, -0.010435064323246479, -0.03665690869092941, -0.043092839419841766, 0.033033616840839386, -0.039371442049741745, -0.014828772284090519, 0.024741649627685547, -0.02372284233570099, -0.008061060681939125, 0.07136643677949905, -0.020296894013881683, -0.007840557023882866, 0.0669972226023674, -0.010300833731889725, -0.030187077820301056, 0.019393492490053177, 0.05772634223103523, 0.06749226897954941, 0.03607582300901413, -0.0062503633089363575, 0.05787430331110954, -0.020890045911073685, -0.035440560430288315, -0.013414355926215649, -0.04459512606263161, -0.000853956036735326, -0.024481141939759254, 0.03452565148472786, 0.0811416432261467, -0.01195908710360527, 0.040110908448696136, -0.03914367035031319, 0.0011333198053762317, 0.03152218461036682, 0.023353230208158493, 0.009861774742603302, 0.0635991245508194, 0.017272891476750374, 0.04781969264149666, -0.0167508814483881, -0.03952673450112343, 0.02614533342421055, -0.012379821389913559, -0.03785664960741997, 0.010065913200378418, -0.03753228113055229, 0.02535371109843254, 0.044193923473358154, 0.01639350689947605, 0.07690059393644333, -0.012151402421295643, -0.037406135350465775, -0.008500206284224987, 0.004649181384593248, 0.02136138081550598, 0.016679557040333748, 0.008006090298295021, -0.012431390583515167, -0.022642381489276886, -0.030620912089943886, -0.016083532944321632, -0.026251403614878654, -0.006650214549154043, 0.010029509663581848, -0.018668698146939278, 0.03728307783603668, 0.02804662100970745, -0.01461680606007576, -0.056639254093170166, -0.043235182762145996, -0.019907694309949875, -0.052628353238105774, -0.059040457010269165, -0.01926308497786522, 0.015893232077360153, -0.039963796734809875, -0.03142658248543739, 0.0015109418891370296, 0.005803464911878109, -0.0287382360547781, 0.03237034007906914, -0.040992170572280884, -0.026517309248447418, 0.026523631066083908, -0.006337632425129414, 0.04923049733042717, -0.008110500872135162, 0.054189760237932205, -0.007950528524816036, 0.0032963345292955637, -0.0022660167887806892, 0.002302016830071807, 0.0368475578725338, 0.036938369274139404, 0.0059142159298062325, -0.07688447088003159, 0.004280986730009317, 0.015932204201817513, -0.02419275790452957, -0.08047410100698471, -0.006758193485438824, 0.013143632560968399, 0.018446004018187523, 0.024781256914138794, -0.012853077612817287, 0.012208189815282822, -0.04145931079983711, -0.013909487053751945, -0.017741456627845764, 0.0221572108566761, 0.06729894876480103, -0.03401565924286842, 0.07320299744606018, 0.02379683591425419, -0.010897086933255196, -0.04818990081548691, -0.0032170265913009644, -0.02159027010202408, -0.0020900315139442682, -0.055790528655052185, -0.014485095627605915, -0.0077862851321697235, -0.08774633705615997, -0.00006265086267376319, 0.046425867825746536, -0.030484747141599655, -0.014939406886696815, 0.013611596077680588, 0.016179487109184265, 0.008022131398320198, 0.03245222195982933, -0.025427309796214104, 0.041473403573036194, -0.011609463021159172, -0.02081066556274891, 0.0033898004330694675, 0.05790321156382561, 0.012496312148869038, 0.03602210804820061, 0.027977164834737778, -0.039841920137405396, -0.018708888441324234, -0.018569037318229675, 0.015963280573487282, 0.06801097840070724, -0.014070219360291958, -0.007362382486462593 ]
[ -0.09020444005727768, -0.016784697771072388, -0.055726323276758194, -0.03200728818774223, 0.028054723516106606, -0.019284550100564957, 0.02238963171839714, 0.034975748509168625, 0.03923506289720535, 0.006353093311190605, 0.004536398686468601, -0.07076996564865112, 0.013799687847495079, -0.0064650485292077065, 0.06355906277894974, -0.003353486768901348, -0.03203781694173813, -0.05083097144961357, -0.04064055159687996, 0.02477048709988594, 0.04193728789687157, -0.0251777246594429, -0.05761609971523285, -0.06456580013036728, 0.05619894340634346, 0.03599290922284126, 0.04231484979391098, -0.0013240304542705417, -0.0149518558755517, -0.22178645431995392, 0.045522429049015045, -0.026727262884378433, 0.01996183767914772, -0.03386099264025688, 0.015626391395926476, 0.028991183266043663, 0.02637545019388199, 0.01371245738118887, 0.022919461131095886, 0.05667347460985184, 0.02347247675061226, -0.004843615926802158, -0.03421546146273613, -0.011192562989890575, 0.03485359624028206, -0.007147972472012043, -0.04416445270180702, -0.0064575946889817715, -0.03527108207345009, -0.006599067710340023, -0.06776322424411774, 0.006522372364997864, -0.025601504370570183, -0.010995307005941868, -0.011062872596085072, 0.02523685432970524, 0.01571490615606308, 0.05779753625392914, 0.02067863941192627, 0.034745510667562485, -0.008299600332975388, 0.014118836261332035, -0.15181943774223328, 0.09764772653579712, 0.025041302666068077, 0.02896355651319027, -0.029777735471725464, 0.015896959230303764, -0.004430554341524839, 0.08477752655744553, -0.0161067396402359, -0.005408454220741987, -0.022735431790351868, 0.07633963972330093, 0.014172593131661415, -0.02842482551932335, 0.006498807575553656, 0.0027089607901871204, 0.02336728386580944, 0.01414349116384983, -0.025146998465061188, 0.01974351517856121, -0.011461690999567509, -0.014061604626476765, -0.03236205130815506, -0.008893250487744808, -0.008059563115239143, 0.00908387266099453, 0.02232198789715767, 0.009571121074259281, 0.019669169560074806, 0.03805091604590416, -0.007237775716930628, -0.006601413711905479, -0.06869542598724365, 0.04414955899119377, 0.03033754602074623, 0.01438429020345211, -0.0033723460510373116, 0.4242989420890808, -0.030911477282643318, -0.0026402072980999947, 0.01500409934669733, 0.05166506767272949, 0.002601840766146779, -0.01630106382071972, -0.029124317690730095, -0.045644763857126236, 0.007148579694330692, -0.03680909797549248, 0.008615836501121521, -0.038486115634441376, 0.07369422912597656, -0.062479082494974136, -0.006305043585598469, 0.010231970809400082, 0.02620277926325798, -0.01293904148042202, 0.02149798534810543, -0.008282424882054329, -0.034258026629686356, -0.0033743262756615877, 0.05704742670059204, -0.02480362541973591, -0.002544042421504855, 0.009489500895142555, -0.0017505938885733485, 0.09610921144485474, -0.008746713399887085, 0.01613154262304306, 0.062319397926330566, -0.051205433905124664, -0.07172573357820511, 0.0001399243192281574, 0.01624281518161297, 0.007792138494551182, 0.021636929363012314, 0.0005670283571816981, 0.03487364202737808, 0.026961693540215492, -0.029008354991674423, -0.02932407520711422, 0.032883357256650925, -0.02813773788511753, -0.04939134791493416, 0.10723774880170822, 0.010689878836274147, -0.02076885849237442, -0.031522031873464584, -0.02988882176578045, 0.02392052300274372, 0.009469469077885151, 0.01319816429167986, -0.07816930115222931, 0.025172391906380653, 0.04104096069931984, 0.07717220485210419, -0.027454545721411705, -0.04517083987593651, -0.029976263642311096, -0.05076441168785095, -0.030816784128546715, -0.006217667367309332, 0.033249132335186005, 0.011412125080823898, -0.06745518743991852, -0.010174685157835484, 0.0026091665495187044, 0.003178450046107173, -0.08538822829723358, 0.048331908881664276, 0.04371998831629753, -0.04567423090338707, 0.00374187552370131, 0.04340032488107681, -0.006909574382007122, -0.04058273509144783, -0.004829375073313713, 0.09232618659734726, -0.0013847145019099116, -0.006462860852479935, -0.019123563542962074, -0.03689001128077507, -0.015074500814080238, -0.04834194853901863, -0.04776173457503319, -0.05634574964642525, -0.01445549726486206, -0.0335005484521389, -0.015616284683346748, 0.02620021253824234, -0.05140749737620354, -0.06452789157629013, 0.04438535496592522, -0.04319978505373001, -0.020989645272493362, 0.02382531762123108, -0.0013981956290081143, -0.018666161224246025, -0.012920740991830826, -0.029195578768849373, -0.003425709903240204, -0.021008117124438286, 0.004572103265672922, -0.04040585458278656, 0.03945552185177803, 0.07410839945077896, -0.022008799016475677, 0.08182158321142197, 0.04761875420808792, 0.019713399931788445, -0.03789660707116127, -0.047682780772447586, 0.01440959982573986, -0.02292710728943348, -0.001023937831632793, 0.012380809523165226, -0.005871298257261515, 0.013961379416286945, 0.019864529371261597, 0.011577747762203217, -0.06378015875816345, -0.013070669025182724, -0.3497273027896881, -0.04989313706755638, 0.009638388641178608, -0.030495846644043922, 0.07410381734371185, -0.03963758796453476, -0.02124754898250103, 0.007461783476173878, -0.03420940786600113, 0.03844476118683815, 0.07576378434896469, -0.005536418873816729, -0.01679317094385624, -0.07504459470510483, -0.026099693030118942, 0.004208719823509455, -0.05400191992521286, -0.03890794515609741, -0.055762939155101776, 0.03133155405521393, -0.030823195353150368, -0.015659812837839127, -0.03748377040028572, -0.04013638198375702, 0.018505604937672615, -0.01677892357110977, 0.11723515391349792, 0.021729979664087296, 0.07463211566209793, -0.021269436925649643, 0.017068257555365562, 0.002753352513536811, 0.003251235233619809, -0.02164025790989399, 0.0067602661438286304, -0.018715931102633476, -0.002913127886131406, 0.012767110019922256, -0.014984246343374252, -0.023237112909555435, -0.007604094687849283, 0.043749548494815826, -0.037695758044719696, -0.022549422457814217, -0.08923043310642242, 0.01805543340742588, 0.009251725859940052, 0.00691221235319972, -0.006581535097211599, 0.0858219787478447, 0.03286472335457802, 0.04653023183345795, 0.022029604762792587, -0.018332108855247498, -0.007828319445252419, -0.03655562549829483, -0.04473484680056572, -0.012939930893480778, -0.022161347791552544, 0.0036609757225960493, 0.03977853059768677, 0.028516411781311035, 0.050168395042419434, -0.039511602371931076, -0.02605537325143814, -0.021761594340205193, 0.023865031078457832, -0.03517311438918114, 0.025032490491867065, 0.005224858410656452, -0.005285590421408415, 0.11526065319776535, -0.002076137578114867, 0.00806545652449131, 0.05043770372867584, 0.05035276338458061, 0.029278358444571495, 0.020514976233243942, -0.016811231151223183, 0.014028280042111874, 0.05347522348165512, -0.01402618270367384, 0.026745202019810677, -0.02345001883804798, 0.010039763525128365, -0.024572689086198807, -0.01388753391802311, -0.012347215786576271, 0.05907696485519409, 0.012137037701904774, -0.011135408654808998, -0.013492344878613949, -0.012911463156342506, -0.002114164410158992, 0.03021281398832798, 0.003283916274085641, -0.2870475947856903, 0.039407387375831604, 0.058269843459129333, 0.06016900762915611, 0.02275577187538147, 0.01434195227921009, 0.04795093089342117, -0.030924273654818535, -0.02897959202528, -0.004453431814908981, 0.003351521445438266, 0.02364847995340824, 0.0766289234161377, 0.010096492245793343, -0.018114855512976646, -0.06023227795958519, 0.015766538679599762, -0.04387417435646057, 0.030377566814422607, -0.012413864955306053, 0.04789477214217186, -0.020019927993416786, 0.16621065139770508, -0.0016201994149014354, 0.016219718381762505, -0.00891724694520235, 0.013850197196006775, -0.0046120998449623585, 0.05841602012515068, 0.009015225805342197, 0.025438157841563225, 0.015782430768013, 0.014451267197728157, -0.03976227343082428, 0.041595716029405594, -0.011815640144050121, -0.03911205753684044, 0.030187206342816353, 0.03990396857261658, -0.04149668663740158, 0.012779021635651588, 0.004925626330077648, -0.0381549708545208, 0.011412376537919044, 0.0998920276761055, -0.006306335795670748, 0.02793465182185173, -0.06543447077274323, -0.037291839718818665, 0.015136217698454857, 0.0073216138407588005, 0.0008923830464482307, -0.03001384437084198, -0.025624798610806465, 0.02159607969224453, 0.027341043576598167, 0.0425337590277195, -0.026987392455339432, 0.008100274950265884, 0.002891697222366929, 0.005926106590777636, -0.0354032926261425, 0.14261995255947113, 0.007410646881908178, 0.0056184739805758 ]
[ 0.01222973968833685, -0.004118072800338268, 0.013542723841965199, -0.012794899754226208, -0.02807796746492386, -0.013859107159078121, 0.017194122076034546, 0.012141057290136814, 0.01925402507185936, -0.01768013834953308, -0.01961120404303074, 0.008347446098923683, -0.017148839309811592, 0.0010179746896028519, 0.03146377205848694, -0.028105873614549637, 0.010841688141226768, 0.009765337221324444, 0.004149589221924543, -0.0038616342935711145, -0.03195317089557648, 0.030942192301154137, 0.038378581404685974, -0.0034190069418400526, -0.013917267322540283, -0.006672876887023449, -0.007824345491826534, 0.029250603169202805, 0.014972117729485035, -0.13015146553516388, -0.011897318065166473, -0.013256908394396305, -0.010877401567995548, -0.013915675692260265, -0.008432639762759209, -0.03560631722211838, -0.03883372247219086, -0.005044530611485243, 0.005576802417635918, -0.004791887477040291, -0.01178565714508295, 0.0019399231532588601, -0.003232808317989111, 0.01937508024275303, -0.03282211348414421, 0.0003446304181125015, -0.029275543987751007, 0.017872145399451256, 0.007675405591726303, -0.022529499605298042, -0.019971640780568123, 0.027158724144101143, -0.008130896836519241, 0.017039140686392784, 0.022806202992796898, -0.0015103023033589125, -0.020919062197208405, -0.033202797174453735, 0.02689589001238346, -0.027033710852265358, -0.030902810394763947, 0.04749905318021774, -0.026674427092075348, -0.0018094020197167993, -0.01210138387978077, -0.007040739990770817, -0.018755825236439705, 0.014671428129076958, -0.030066894367337227, -0.0027988776564598083, -0.04357770457863808, -0.00949448999017477, -0.008303781040012836, -0.00035930448211729527, 0.007339017000049353, -0.033792644739151, 0.002097916090860963, -0.030382713302969933, -0.01683708280324936, 0.020908894017338753, -0.028793100267648697, -0.004049031995236874, 0.011901766061782837, 0.005729455966502428, 0.001091968733817339, -0.047221340239048004, 0.02394227497279644, 0.031133601441979408, 0.008341212756931782, -0.03294286131858826, -0.023507481440901756, -0.006130306050181389, 0.010257490910589695, -0.007675193250179291, -0.06851544976234436, -0.01194009929895401, -0.009328114800155163, -0.035161156207323074, -0.0008085535955615342, 0.8306520581245422, -0.026115305721759796, 0.02819637954235077, 0.049234021455049515, 0.008018659427762032, 0.014822141267359257, 0.005214882083237171, -0.03689444437623024, 0.008667178452014923, 0.08238587528467178, -0.04544835165143013, 0.0164780430495739, 0.03161212056875229, 0.03461890667676926, 0.030404604971408844, -0.01533691119402647, 0.05925697460770607, 0.014534516260027885, 0.029794566333293915, 0.004194367211312056, 0.004803883843123913, 0.02940370701253414, 0.019708363339304924, 0.006582184694707394, 0.006115557160228491, -0.0045920806005597115, -0.1812668740749359, 0.020801939070224762, -6.933793018279423e-33, -0.010804486460983753, -0.05299253389239311, 0.017550667747855186, 0.004820552188903093, 0.05722499638795853, 0.006727005820721388, 0.02337505668401718, 0.017205120995640755, -0.008785167708992958, -0.026013730093836784, 0.03222845122218132, -0.0005600765580311418, -0.03701389953494072, -0.005067688412964344, 0.060923002660274506, 0.005965872202068567, -0.0303285401314497, 0.050415847450494766, 0.043291039764881134, 0.05030694976449013, -0.022698447108268738, 0.016210034489631653, 0.025590065866708755, 0.02946905605494976, -0.022464297711849213, 0.046405594795942307, 0.014868601225316525, -0.021294541656970978, 0.018226739019155502, -0.04511742666363716, -0.023296380415558815, 0.016930969431996346, -0.027353063225746155, -0.04566344618797302, 0.009789546020328999, -0.03305753320455551, -0.02720508724451065, -0.002148763509467244, -0.0487033873796463, -0.026028255000710487, -0.013560551218688488, 0.004229764454066753, -0.021815035492181778, 0.027973221614956856, -0.05584537982940674, -0.05344836041331291, -0.0015038965502753854, 0.061323508620262146, 0.02229686640202999, 0.05741705000400543, 0.027255788445472717, 0.0055032954551279545, 0.015235422179102898, 0.013466458767652512, -0.028145140036940575, 0.0006222250522114336, 0.020052470266819, 0.05738888308405876, -0.0020592892542481422, -0.037760812789201736, 0.0065091378055512905, -0.021186118945479393, -0.018499180674552917, 0.036348842084407806, -0.004821895156055689, 0.048224207013845444, -0.027215853333473206, 0.02780161239206791, 0.014960221946239471, 0.003326797392219305, -0.04945812746882439, -0.01110999658703804, -0.029009772464632988, -0.026611849665641785, 0.015764666721224785, 0.005851302295923233, -0.014111089520156384, 0.023407267406582832, 0.03724624216556549, 0.04316166788339615, 0.028253691270947456, 0.03286547213792801, -0.036995384842157364, -0.008042793720960617, -0.050800614058971405, 0.013002196326851845, 0.017011528834700584, 0.01568283885717392, -0.007825974375009537, 0.016813088208436966, 0.025627758353948593, -0.0185625609010458, 0.029506608843803406, 0.011884365230798721, -0.005560299381613731, 6.760996818076485e-33, -0.0625704675912857, -0.005020664539188147, -0.0341617725789547, 0.01944621466100216, 0.0028952329885214567, -0.029328923672437668, 0.034487731754779816, -0.010023352690041065, -0.020172901451587677, -0.013373764231801033, -0.022309063002467155, 0.042902059853076935, -0.023354295641183853, 0.05091765895485878, 0.04324775189161301, 0.011661666445434093, 0.023990757763385773, 0.05055880546569824, -0.006276743486523628, 0.006910902447998524, 0.010219377465546131, 0.026945488527417183, -0.008033374324440956, 0.0024434805382043123, -0.012462470680475235, 0.05862300843000412, 0.02450106479227543, -0.0030942459125071764, 0.005620577372610569, -0.022843746468424797, -0.002422827063128352, 0.03937755897641182, -0.0056610107421875, -0.015175634995102882, -0.012069378048181534, 0.029767736792564392, 0.019688863307237625, -0.005039946176111698, -0.002999182092025876, 0.01831038109958172, -0.00451486324891448, 0.011372683569788933, -0.02653358317911625, 0.03297947347164154, 0.0045562852174043655, 0.03530744090676308, 0.00725154671818018, -0.0237851794809103, 0.024219080805778503, 0.061349641531705856, -0.022249216213822365, 0.030389821156859398, -0.008712297305464745, -0.018627505749464035, -0.008673829026520252, -0.011365924961864948, -0.04371579736471176, 0.0006784910801798105, -0.011214302852749825, -0.026172088459134102, -0.02670576050877571, 0.018355604261159897, 0.005532131530344486, 0.0350848026573658, -0.01277475617825985, 0.01673184335231781, -0.03906190022826195, -0.018324194476008415, -0.0009637110633775592, 0.0028921207413077354, -0.03453458845615387, 0.0022526623215526342, 0.03349681198596954, 0.015894802287220955, 0.006497843656688929, 0.02488698810338974, 0.006179538089782, -0.005623743869364262, -0.013999983668327332, 0.0057008047588169575, 0.02209009788930416, -0.01780126988887787, -0.013013720512390137, -0.021159522235393524, -0.01286336500197649, -0.030466757714748383, -0.026063930243253708, 0.007066085934638977, 0.03399835526943207, -0.008192121982574463, 0.008847448043525219, 0.044755969196558, -0.01677052490413189, 0.00128271640278399, 0.037680670619010925, -1.2502573198958089e-8, 0.01891481690108776, -0.044260259717702866, -0.011865026317536831, 0.03165370598435402, 0.06913628429174423, 0.02569541335105896, -0.06049152463674545, -0.02099617011845112, -0.030023684725165367, -0.01060962863266468, 0.018578145653009415, 0.030379770323634148, -0.008607727475464344, 0.0052358731627464294, 0.004145927727222443, -0.006611891556531191, -0.01110704056918621, -0.013174536637961864, 0.02254190295934677, -0.008673543110489845, 0.006263691000640392, 0.018816012889146805, 0.018753886222839355, -0.017480136826634407, -0.01738383248448372, -0.03470046445727348, 0.007466133683919907, -0.057737816125154495, -0.04395177960395813, -0.004455853253602982, -0.002038567326962948, -0.02051694318652153, -0.06473148614168167, 0.038568101823329926, -0.009689049795269966, -0.042150791734457016, -0.0019546232651919127, 0.027057459577918053, -0.009494616650044918, -0.00808847788721323, -0.02592553198337555, -0.01899389922618866, -0.03173818811774254, -0.01831723563373089, -0.0027305425610393286, 0.0004455505113583058, -0.056871477514505386, 0.04008962959051132, 0.02134566940367222, -0.021294860169291496, -0.007116938475519419, 0.01201327983289957, -0.007497861515730619, -0.01240229420363903, 0.022220531478524208, 0.000974268012214452, -0.0006645471439696848, -0.028915811330080032, -0.03366131708025932, -0.03760300949215889, 0.02378460392355919, 0.024727610871195793, -0.008588298223912716, -0.03500353917479515 ]
r-creating-an-object-with-functions-to-calculate-conditional-probability
https://markhneedham.com/blog/2015/04/12/r-creating-an-object-with-functions-to-calculate-conditional-probability
false
2015-04-14 22:56:35
Spark: Generating CSV files to import into Neo4j
[ "neo4j", "spark-2" ]
[ "Spark" ]
About a year ago http://twitter.com/iansrobinson[Ian] pointed me at a https://data.cityofchicago.org/Public-Safety/Crimes-2001-to-present/ijzp-q8t2[Chicago Crime] data set which seemed like a good fit for Neo4j and after much procrastination I've finally got around to importing it. The data set covers crimes committed from 2001 until now. It contains around 4 million crimes and meta data around those crimes such as the location, type of crime and year to name a few. The contents of the file follow this structure: [source,bash] ---- $ head -n 10 ~/Downloads/Crimes_-_2001_to_present.csv ID,Case Number,Date,Block,IUCR,Primary Type,Description,Location Description,Arrest,Domestic,Beat,District,Ward,Community Area,FBI Code,X Coordinate,Y Coordinate,Year,Updated On,Latitude,Longitude,Location 9464711,HX114160,01/14/2014 05:00:00 AM,028XX E 80TH ST,0560,ASSAULT,SIMPLE,APARTMENT,false,true,0422,004,7,46,08A,1196652,1852516,2014,01/20/2014 12:40:05 AM,41.75017626412204,-87.55494559131228,"(41.75017626412204, -87.55494559131228)" 9460704,HX113741,01/14/2014 04:55:00 AM,091XX S JEFFERY AVE,031A,ROBBERY,ARMED: HANDGUN,SIDEWALK,false,false,0413,004,8,48,03,1191060,1844959,2014,01/18/2014 12:39:56 AM,41.729576153145636,-87.57568059471686,"(41.729576153145636, -87.57568059471686)" 9460339,HX113740,01/14/2014 04:44:00 AM,040XX W MAYPOLE AVE,1310,CRIMINAL DAMAGE,TO PROPERTY,RESIDENCE,false,true,1114,011,28,26,14,1149075,1901099,2014,01/16/2014 12:40:00 AM,41.884543798701515,-87.72803579358926,"(41.884543798701515, -87.72803579358926)" 9461467,HX114463,01/14/2014 04:43:00 AM,059XX S CICERO AVE,0820,THEFT,$500 AND UNDER,PARKING LOT/GARAGE(NON.RESID.),false,false,0813,008,13,64,06,1145661,1865031,2014,01/16/2014 12:40:00 AM,41.785633535413176,-87.74148516669783,"(41.785633535413176, -87.74148516669783)" 9460355,HX113738,01/14/2014 04:21:00 AM,070XX S PEORIA ST,0820,THEFT,$500 AND UNDER,STREET,true,false,0733,007,17,68,06,1171480,1858195,2014,01/16/2014 12:40:00 AM,41.766348042591375,-87.64702037047671,"(41.766348042591375, -87.64702037047671)" 9461140,HX113909,01/14/2014 03:17:00 AM,016XX W HUBBARD ST,0610,BURGLARY,FORCIBLE ENTRY,COMMERCIAL / BUSINESS OFFICE,false,false,1215,012,27,24,05,1165029,1903111,2014,01/16/2014 12:40:00 AM,41.889741146006095,-87.66939334853973,"(41.889741146006095, -87.66939334853973)" 9460361,HX113731,01/14/2014 03:12:00 AM,022XX S WENTWORTH AVE,0820,THEFT,$500 AND UNDER,CTA TRAIN,false,false,0914,009,25,34,06,1175363,1889525,2014,01/20/2014 12:40:05 AM,41.85223460427207,-87.63185047834335,"(41.85223460427207, -87.63185047834335)" 9461691,HX114506,01/14/2014 03:00:00 AM,087XX S COLFAX AVE,0650,BURGLARY,HOME INVASION,RESIDENCE,false,false,0423,004,7,46,05,1195052,1847362,2014,01/17/2014 12:40:17 AM,41.73607283858007,-87.56097809501115,"(41.73607283858007, -87.56097809501115)" 9461792,HX114824,01/14/2014 03:00:00 AM,012XX S CALIFORNIA BLVD,0810,THEFT,OVER $500,STREET,false,false,1023,010,28,29,06,1157929,1894034,2014,01/17/2014 12:40:17 AM,41.86498077118534,-87.69571529596696,"(41.86498077118534, -87.69571529596696)" ---- Since I wanted to import this into Neo4j I needed to do some massaging of the data since the http://neo4j.com/docs/2.2.0/import-tool.html[neo4j-import tool] expects to receive CSV files containing the nodes and relationships we want to create. image::{{<siteurl>}}/uploads/2015/04/Spark-logo-192x100px.png[Spark logo 192x100px,96] I'd been looking at https://spark.apache.org/[Spark] towards the end of last year and the pre-processing of the big initial file into smaller CSV files containing nodes and relationships seemed like a good fit. I therefore needed to create a Spark job to do this. We'll then pass this job to a Spark executor running locally and it will spit out CSV files. image::{{<siteurl>}}/uploads/2015/04/2015-04-15_00-51-42.png[2015 04 15 00 51 42,400] We start by creating a Scala object with a main method that will contain our processing code. Inside that main method we'll instantiate a Spark context: [source,scala] ---- import org.apache.spark.{SparkConf, SparkContext} object GenerateCSVFiles { def main(args: Array[String]) { val conf = new SparkConf().setAppName("Chicago Crime Dataset") val sc = new SparkContext(conf) } } ---- Easy enough. Next we'll read in the CSV file. I found the easiest way to reference this was with an environment variable but perhaps there's a more idiomatic way: [source,scala] ---- import java.io.File import org.apache.spark.{SparkConf, SparkContext} object GenerateCSVFiles { def main(args: Array[String]) { var crimeFile = System.getenv("CSV_FILE") if(crimeFile == null || !new File(crimeFile).exists()) { throw new RuntimeException("Cannot find CSV file [" + crimeFile + "]") } println("Using %s".format(crimeFile)) val conf = new SparkConf().setAppName("Chicago Crime Dataset") val sc = new SparkContext(conf) val crimeData = sc.textFile(crimeFile).cache() } ---- The type of +++<cite>+++crimeData+++</cite>+++ is +++<cite>+++RDD[String]+++</cite>+++ - Spark's way of representing the (lazily evaluated) lines of the CSV file. This also includes the header of the file so let's write a function to get rid of that since we'll be generating our own headers for the different files: [source,scala] ---- import org.apache.spark.rdd.RDD // http://mail-archives.apache.org/mod_mbox/spark-user/201404.mbox/%3CCAEYYnxYuEaie518ODdn-fR7VvD39d71=CgB_Dxw_4COVXgmYYQ@mail.gmail.com%3E def dropHeader(data: RDD[String]): RDD[String] = { data.mapPartitionsWithIndex((idx, lines) => { if (idx == 0) { lines.drop(1) } lines }) } ---- Now we're ready to start generating our new CSV files so we'll write a function which parses each line and extracts the appropriate columns. I'm using Open CSV for this: [source,scala] ---- import au.com.bytecode.opencsv.CSVParser def generateFile(file: String, withoutHeader: RDD[String], fn: Array[String] => Array[String], header: String , distinct:Boolean = true, separator: String = ",") = { FileUtil.fullyDelete(new File(file)) val tmpFile = "/tmp/" + System.currentTimeMillis() + "-" + file val rows: RDD[String] = withoutHeader.mapPartitions(lines => { val parser = new CSVParser(',') lines.map(line => { val columns = parser.parseLine(line) fn(columns).mkString(separator) }) }) if (distinct) rows.distinct() saveAsTextFile tmpFile else rows.saveAsTextFile(tmpFile) } ---- We then call this function like this: [source,scala] ---- generateFile("/tmp/crimes.csv", withoutHeader, columns => Array(columns(0),"Crime", columns(2), columns(6)), "id:ID(Crime),:LABEL,date,description", false) ---- The output into 'tmpFile' is actually 32 'part files' but I wanted to be able to http://www.markhneedham.com/blog/2014/11/30/spark-write-to-csv-file-with-header-using-saveasfile/[merge those together into individual CSV files] that were easier to work with. I won't paste the the full job here but if you want to take a look https://github.com/mneedham/neo4j-spark-chicago/blob/master/src/main/scala/GenerateCSVFiles.scala[it's on github]. Now we need to submit the job to Spark. I've wrapped this in a https://github.com/mneedham/neo4j-spark-chicago/blob/master/create_files.sh[script] if you want to follow along but these are the contents: [source,bash] ---- ./spark-1.1.0-bin-hadoop1/bin/spark-submit \ --driver-memory 5g \ --class GenerateCSVFiles \ --master local[8] \ target/scala-2.10/playground_2.10-1.0.jar \ $@ ---- If we execute that we'll see the following output..." [source,bash] ---- Spark assembly has been built with Hive, including Datanucleus jars on classpath Using Crimes_-_2001_to_present.csv Using Spark's default log4j profile: org/apache/spark/log4j-defaults.properties 15/04/15 00:31:44 INFO SparkContext: Running Spark version 1.3.0 ... 15/04/15 00:47:26 INFO TaskSchedulerImpl: Removed TaskSet 8.0, whose tasks have all completed, from pool 15/04/15 00:47:26 INFO DAGScheduler: Stage 8 (saveAsTextFile at GenerateCSVFiles.scala:51) finished in 2.702 s 15/04/15 00:47:26 INFO DAGScheduler: Job 4 finished: saveAsTextFile at GenerateCSVFiles.scala:51, took 8.715588 s real 0m44.935s user 4m2.259s sys 0m14.159s ---- and these CSV files will be generated: [source,bash] ---- $ ls -alh /tmp/*.csv -rwxrwxrwx 1 markneedham wheel 3.0K 14 Apr 07:37 /tmp/beats.csv -rwxrwxrwx 1 markneedham wheel 217M 14 Apr 07:37 /tmp/crimes.csv -rwxrwxrwx 1 markneedham wheel 84M 14 Apr 07:37 /tmp/crimesBeats.csv -rwxrwxrwx 1 markneedham wheel 120M 14 Apr 07:37 /tmp/crimesPrimaryTypes.csv -rwxrwxrwx 1 markneedham wheel 912B 14 Apr 07:37 /tmp/primaryTypes.csv ---- Let's have a quick check what they contain: [source,bash] ---- $ head -n 10 /tmp/beats.csv id:ID(Beat),:LABEL 1135,Beat 1421,Beat 2312,Beat 1113,Beat 1014,Beat 2411,Beat 1333,Beat 2521,Beat 1652,Beat ---- [source,bash] ---- $ head -n 10 /tmp/crimes.csv id:ID(Crime),:LABEL,date,description 9464711,Crime,01/14/2014 05:00:00 AM,SIMPLE 9460704,Crime,01/14/2014 04:55:00 AM,ARMED: HANDGUN 9460339,Crime,01/14/2014 04:44:00 AM,TO PROPERTY 9461467,Crime,01/14/2014 04:43:00 AM,$500 AND UNDER 9460355,Crime,01/14/2014 04:21:00 AM,$500 AND UNDER 9461140,Crime,01/14/2014 03:17:00 AM,FORCIBLE ENTRY 9460361,Crime,01/14/2014 03:12:00 AM,$500 AND UNDER 9461691,Crime,01/14/2014 03:00:00 AM,HOME INVASION 9461792,Crime,01/14/2014 03:00:00 AM,OVER $500 ---- [source,bash] ---- $ head -n 10 /tmp/crimesBeats.csv :START_ID(Crime),:END_ID(Beat),:TYPE 5896915,0733,ON_BEAT 9208776,2232,ON_BEAT 8237555,0111,ON_BEAT 6464775,0322,ON_BEAT 6468868,0411,ON_BEAT 4189649,0524,ON_BEAT 7620897,0421,ON_BEAT 7720402,0321,ON_BEAT 5053025,1115,ON_BEAT ---- Looking good. Let's get them imported into Neo4j: [source,bash] ---- $ ./neo4j-community-2.2.0/bin/neo4j-import --into /tmp/my-neo --nodes /tmp/crimes.csv --nodes /tmp/beats.csv --nodes /tmp/primaryTypes.csv --relationships /tmp/crimesBeats.csv --relationships /tmp/crimesPrimaryTypes.csv Nodes [*>:45.76 MB/s----------------------------------|PROPERTIES(2)=============|NODE:3|v:118.05 MB/] 4M Done in 5s 605ms Prepare node index [*RESOLVE:64.85 MB-----------------------------------------------------------------------------] 4M Done in 4s 930ms Calculate dense nodes [>:42.33 MB/s-------------------|*PREPARE(7)===================================|CALCULATOR-----] 8M Done in 5s 417ms Relationships [>:42.33 MB/s-------------|*PREPARE(7)==========================|RELATIONSHIP------------|v:44.] 8M Done in 6s 62ms Node --> Relationship [*>:??-----------------------------------------------------------------------------------------] 4M Done in 324ms Relationship --> Relationship [*LINK-----------------------------------------------------------------------------------------] 8M Done in 1s 984ms Node counts [*>:??-----------------------------------------------------------------------------------------] 4M Done in 360ms Relationship counts [*>:??-----------------------------------------------------------------------------------------] 8M Done in 653ms IMPORT DONE in 26s 517ms ---- Next I updated +++<cite>+++conf/neo4j-server.properties+++</cite>+++ to point to my new database: [source,text] ---- #*************************************************************** # Server configuration #*************************************************************** # location of the database directory #org.neo4j.server.database.location=data/graph.db org.neo4j.server.database.location=/tmp/my-neo ---- Now I can start up Neo and start exploring the data: [source,bash] ---- $ ./neo4j-community-2.2.0/bin/neo4j start ---- [source,cypher] ---- MATCH (:Crime)-[r:CRIME_TYPE]->() RETURN r LIMIT 10 ---- image::{{<siteurl>}}/uploads/2015/04/graph-15.png[Graph 15,600] There's lots more relationships and entities that we could pull out of this data set - what I've done is just a start. So if you're up for some more Chicago crime exploration the https://github.com/mneedham/neo4j-spark-chicago[code and instructions explaining how to run it are on github].
null
null
[ 0.028990164399147034, -0.018468867987394333, -0.015065114945173264, 0.04361874982714653, 0.08377859741449356, 0.018815040588378906, 0.041186343878507614, 0.02078535407781601, 0.013838570564985275, -0.013550114817917347, 0.0037200718652457, -0.010417131707072258, -0.0861336886882782, 0.019241496920585632, -0.011106530204415321, 0.07781791687011719, 0.06596195697784424, 0.023201579228043556, 0.016675204038619995, -0.017326654866337776, 0.039776723831892014, 0.04524533823132515, 0.019845670089125633, 0.036717094480991364, 0.01418829895555973, 0.007067096885293722, 0.015704264864325523, 0.000427325809141621, -0.06533196568489075, 0.032206352800130844, 0.04930915683507919, 0.011836349032819271, 0.019802041351795197, 0.004926072899252176, 0.021905608475208282, 0.023969175294041634, -0.050414685159921646, -0.007529320195317268, -0.00398826040327549, 0.025288371369242668, -0.05822864919900894, 0.04354781284928322, -0.034023262560367584, 0.009959720075130463, -0.05297604203224182, -0.014714241027832031, -0.02825401909649372, 0.04180249571800232, 0.011791057884693146, -0.004415090195834637, -0.044831763952970505, 0.03747843578457832, -0.029233809560537338, 0.01027375366538763, -0.024968786165118217, 0.0555465966463089, -0.008482245728373528, -0.08015226572751999, 0.031727347522974014, -0.02349807322025299, 0.009740496054291725, -0.015649503096938133, 0.03016781248152256, -0.007645100820809603, 0.010577789507806301, -0.01723567768931389, 0.001193996868096292, 0.07423149049282074, -0.012681313790380955, -0.01125647034496069, 0.007231522351503372, 0.0363425612449646, -0.008200213313102722, -0.01085895486176014, -0.019334472715854645, -0.04466615989804268, 0.014424039050936699, 0.04628593474626541, -0.016051042824983597, 0.04948437586426735, -0.03687728941440582, 0.009991893544793129, 0.002094562165439129, 0.03271883353590965, -0.012382810935378075, -0.05314842611551285, -0.04894852265715599, -0.028331609442830086, -0.050588060170412064, 0.04596535861492157, 0.004546209238469601, -0.03004702739417553, 0.022823631763458252, 0.03663373738527298, -0.01036662608385086, 0.017509859055280685, 0.019974028691649437, -0.0076694912277162075, 0.005301665514707565, -0.0247427336871624, -0.027421386912465096, -0.03713070973753929, 0.023486873134970665, 0.03572392836213112, -0.07590770721435547, -0.019996192306280136, -0.01691979356110096, 0.013813835568726063, 0.006782532669603825, -0.025371229276061058, -0.00989000964909792, 0.023494839668273926, -0.011878187768161297, -0.005195995792746544, -0.06726019084453583, 0.05000098794698715, 0.03989536315202713, -0.03707021474838257, 0.0037277371156960726, 0.0010156919015571475, 0.027678823098540306, 0.011797317303717136, -0.005852702539414167, 0.08119621127843857, 0.0031686972361057997, 0.015480990521609783, 0.028269954025745392, 0.052566155791282654, 0.003925831522792578, -0.0445701964199543, -0.02410738915205002, 0.04895547404885292, -0.013162359595298767, -0.01017928309738636, -0.006586457137018442, -0.050708603113889694, -0.016760434955358505, 0.012463378719985485, 0.0331091545522213, 0.02425127476453781, 0.03190265968441963, -0.054717354476451874, 0.020112590864300728, -0.007135686464607716, 0.05704343691468239, -0.009707962162792683, -0.031034298241138458, -0.00978434830904007, -0.023393770679831505, 0.00422690762206912, 0.03540113940834999, 0.03699249029159546, 0.03443887084722519, -0.046140335500240326, 0.01770446076989174, 0.07583659142255783, 0.0318625308573246, -0.0019291533390060067, -0.013608028180897236, 0.025889554992318153, 0.05866727977991104, 0.04664531350135803, 0.0003501954488456249, 0.03484729677438736, -0.008465158753097057, -0.028050728142261505, -0.02286248467862606, 0.04551082104444504, -0.03927015885710716, 0.01268854457885027, -0.038321491330862045, -0.04274347051978111, 0.07049565762281418, -0.02317657880485058, -0.035123080015182495, 0.04411572590470314, 0.07195696234703064, 0.04716968163847923, 0.018832040950655937, -0.029017776250839233, -0.08782047778367996, 0.03710988909006119, 0.016530446708202362, 0.03381470963358879, 0.0009145158110186458, -0.01121348887681961, 0.07082755118608475, 0.02249661460518837, 0.03373127058148384, 0.0522371307015419, -0.045214079320430756, -0.06777273863554001, -0.013705630786716938, -0.02318553812801838, 0.0508979856967926, -0.01895260624587536, 0.03935869038105011, 0.04215652868151665, -0.01894025318324566, 0.055814385414123535, -0.02068408392369747, -0.014631383121013641, 0.04466000944375992, -0.05517876148223877, -0.05104782432317734, 0.03811834752559662, 0.02683868631720543, -0.01267653051763773, -0.02868502587080002, 0.02046794258058071, -0.01820622943341732, -0.009066757746040821, 0.03293931856751442, -0.029832135885953903, 0.02369658835232258, 0.020267382264137268, 0.06018858030438423, -0.0022530811838805676, 0.034985851496458054, -0.03630372881889343, 0.014732657000422478, -0.008264699950814247, -0.03175194188952446, -0.003198085119947791, -0.013239540159702301, 0.11701197177171707, 0.06296227127313614, -0.03368077054619789, -0.03243421018123627, 0.0012171390699222684, 0.03494519367814064, -0.03218589350581169, -0.0015590620459988713, -0.013345359824597836, -0.006245426833629608, 0.01617460697889328, -0.029634853824973106, -0.03451883792877197, 0.008491475135087967, -0.03497195616364479, 0.021451177075505257, 0.04256254434585571, 0.00753014674410224, 0.06521254032850266, -0.014989365823566914, -0.01489980984479189, -0.0014982547145336866, -0.016992883756756783, -0.034455638378858566, -0.0070573086850345135, -0.0033271971624344587, 0.004635853227227926, 0.033947646617889404, -0.036353807896375656, 0.022171061486005783, -0.039378419518470764, -0.020459920167922974, 0.03295049071311951, 0.05271691083908081, 0.0542822889983654, -0.0005343073280528188, 0.05113023892045021, -0.054109297692775726, 0.009263934567570686, -0.014905388467013836, -0.03179316222667694, -0.04255964607000351, -0.023595886304974556, -0.0006003747694194317, 0.01031959056854248, 0.029864061623811722, 0.013067438267171383, 0.014737270772457123, 0.030928468331694603, 0.05236734077334404, -0.0029933610931038857, 0.02731783129274845, -0.0010932320728898048, -0.02544395439326763, -0.0252484530210495, -0.03224245458841324, 0.053098857402801514, -0.03381016477942467, -0.022070517763495445, 0.009834841825067997, -0.10206259787082672, 0.0580744594335556, -0.03346772491931915, -0.04967926815152168, 0.010337518528103828, -0.004446171224117279, 0.014751266688108444, 0.036577388644218445, -0.010743432678282261, 0.030111826956272125, 0.003423424204811454, 0.005178356077522039, 0.01182787586003542, 0.018760133534669876, 0.017912717536091805, -0.003419926855713129, 0.031213892623782158, 0.014415442012250423, -0.010339089669287205, 0.026973595842719078, -0.02622171863913536, 0.017506500706076622, -0.006322958506643772, -0.27401599287986755, 0.055335137993097305, -0.011894372291862965, -0.03505370765924454, 0.01121547631919384, -0.020614774897694588, 0.030525583773851395, -0.05421537160873413, -0.02756740339100361, 0.001688536023721099, -0.009525226429104805, -0.063455730676651, -0.015394601970911026, 0.03474130108952522, 0.027837082743644714, -0.03981268033385277, 0.005778830032795668, -0.03810649365186691, -0.010193589143455029, 0.0351395346224308, 0.024815257638692856, -0.05272912606596947, -0.02892952412366867, 0.03632685914635658, 0.034874558448791504, 0.08803249895572662, -0.07809308171272278, 0.007186661474406719, -0.06797358393669128, -0.037961412221193314, 0.007339151110500097, -0.03270931541919708, 0.01257688831537962, -0.011361065320670605, -0.011690892279148102, -0.013408299535512924, 0.04264405369758606, 0.0006782321142964065, -0.04045649990439415, 0.011654314585030079, -0.021112561225891113, -0.031110094860196114, -0.019158871844410896, 0.005760887637734413, 0.10487249493598938, 0.026333408430218697, -0.0642508789896965, -0.007259930018335581, -0.008872650563716888, 0.04562758654356003, -0.03633081912994385, -0.027120530605316162, -0.0332893431186676, 0.03463314101099968, -0.02101322077214718, -0.01017504371702671, -0.015394124202430248, -0.005669827573001385, -0.04758240282535553, -0.04433714225888252, 0.024020252749323845, -0.03300769254565239, -0.012070911005139351, -0.02371210977435112, -0.025950096547603607, -0.0669148787856102, -0.05860326066613197, -0.040910303592681885, 0.07634533196687698, 0.011825582943856716, -0.02746698632836342, 0.04985444247722626, 0.012573293410241604, -0.10181967169046402, -0.028008004650473595, -0.003242878708988428, -0.030328718945384026, 0.00002441931064822711, 0.0066083199344575405, 0.04804511368274689, -0.05271906033158302, -0.05257058143615723, 0.03600374236702919, 0.013703180477023125, 0.01619044505059719, -0.0278787724673748, 0.023380830883979797, 0.026002736762166023, -0.03890670835971832, -0.014145046472549438, 0.057981159538030624, -0.013934660702943802, -0.009053748100996017, -0.005259932484477758, -0.02736721560359001, 0.022240836173295975, 0.010284638963639736, -0.00982535257935524, 0.004741348791867495, 0.035995617508888245, 0.018188271671533585, -0.056529637426137924, 0.033015377819538116, -0.07316401600837708, -0.019354019314050674, -0.01748025231063366, -0.010651687160134315, 0.02393866516649723, 0.01901569962501526, 0.009273496456444263, 0.02088666707277298, -0.04559970274567604, 0.03610765561461449, -0.04756274074316025, -0.0046282000839710236, -0.018617743626236916, 0.029914535582065582, 0.027028072625398636, 0.04023068770766258, -0.02290697768330574, -0.04230411350727081, 0.023678699508309364, 0.0014811409637331963, 0.00790291279554367, -0.06689777225255966, -0.05974944308400154, -0.02077767252922058, 0.0018666349351406097, 0.018746348097920418, 0.02093021757900715, -0.02225644327700138, 0.02555052563548088, -0.005050675943493843, -0.026531055569648743, 0.04168669879436493, -0.02268012799322605, -0.04408618062734604, -0.07757776230573654, 0.01939336769282818, 0.024493196979165077, 0.019024023786187172, 0.0205313079059124, -0.004117216914892197, 0.013767141848802567, 0.042991578578948975, 0.014520137570798397, 0.04420749843120575, -0.023564066737890244, 0.005500668194144964, 0.007026704028248787, -0.010981333442032337, -0.04655968025326729, 0.014692516066133976, -0.040193889290094376, -0.02896619588136673, 0.0043735867366194725, 0.06672364473342896, 0.0002035228390013799, -0.06690911203622818, -0.005402576178312302, 0.02457108162343502, -0.05334148555994034, -0.007260120008140802, -0.015791451558470726, -0.005885506980121136, 0.0569147989153862, -0.023500584065914154, 0.018173648044466972, 0.002818652428686619, 0.025046193972229958, 0.009023342281579971, -0.013453672640025616, -0.026965979486703873, 0.005137516651302576, 0.0025651254691183567, -0.012726940214633942, -0.006910189986228943, 0.0016969507560133934, 0.030052244663238525, 0.03242410719394684, -0.037970952689647675, -0.021228181198239326, -0.004270654171705246, 0.03324349969625473, 0.06592757254838943, 0.04444204270839691, -0.03414691984653473, -0.008209745399653912, -0.014530373737215996, -0.028343062847852707, -0.02600073255598545, -0.011849604547023773, -0.0373624749481678, 0.003439276944845915, -0.027444971725344658, -0.09152965992689133, 0.042668137699365616, -0.0034602356608957052, 0.007655211724340916, 0.047064948827028275, 0.009853962808847427, -0.005137764848768711, -0.005913891829550266, 0.04465761408209801, 0.02207307703793049, -0.05520531162619591, -0.010979383252561092, 0.013786504045128822, 0.014223335310816765, 0.002970051020383835, -0.0035916154738515615, -0.041148796677589417, -0.033593617379665375, -0.022537846118211746, 0.03934517130255699, -0.045683447271585464, -0.001187349553219974, -0.028081770986318588, -0.013002580963075161, -0.029294250532984734, 0.005571799818426371, 0.00037433032412081957, 0.007387406658381224, -0.0030998827423900366, -0.005263025872409344, 0.05434654280543327, -0.03443460538983345, -0.016544271260499954, 0.020131239667534828, -0.019376704469323158, -0.003293081186711788, -0.015844516456127167, 0.003689453238621354, 0.040707364678382874, -0.033652063459157944, -0.009650852531194687, -0.03635933995246887, 0.001675745821557939, -0.018375961109995842, 0.05799474939703941, -0.013346449472010136, -0.02383999340236187, -0.03141174465417862, -0.003633597632870078, -0.015035171061754227, 0.019560247659683228, 0.004741542972624302, 0.020319756120443344, 0.048959892243146896, 0.03663751110434532, 0.0028804705943912268, 0.006807283032685518, -0.01767241396009922, -0.038472581654787064, 0.047111403197050095, -0.05155876651406288, -0.011198439635336399, -0.0296540018171072, -0.031685277819633484, 0.005921187810599804, -0.001740270759910345, -0.010986792854964733, -0.02346022054553032, 0.038511112332344055, 0.024033186957240105, 0.013910758309066296, 0.03846554085612297, 0.0024661561474204063, 0.02526172809302807, -0.041164953261613846, -0.005846771877259016, -0.0871874988079071, 0.027652373537421227, 0.03625946119427681, -0.010840692557394505, -0.007074819412082434, 0.018209880217909813, -0.01705384999513626, 0.002000306034460664, -0.08289319276809692, -0.023462528362870216, 0.032768603414297104, -0.03304320573806763, -0.02063942886888981, 0.01651393063366413, -0.048041317611932755, 0.02518373355269432, 0.036539312452077866, -0.0682089626789093, -0.029757022857666016, -0.020884694531559944, 0.06974007934331894, -0.0034484060015529394, 0.02824685350060463, 0.000007385678600257961, 0.009871759451925755, 0.061116158962249756, 0.04098213091492653, 0.026050250977277756, 0.05687875300645828, -0.020006485283374786, 0.03298606351017952, -0.002499881898984313, -0.029512908309698105, -0.0018861186690628529, 0.011472193524241447, -0.009797150269150734, -0.06620465219020844, 0.011239678598940372, 0.004029790870845318, -0.028481334447860718, -0.04176639765501022, 0.09972518682479858, 0.016365326941013336, -0.028156843036413193, -0.04000033438205719, 0.024746976792812347, -0.0318664126098156, -0.035474278032779694, -0.039629977196455, -0.005022077355533838, -0.03422113135457039, 0.06144178658723831, 0.017471814528107643, 0.025383347645401955, 0.059110499918460846, -0.011678442358970642, 0.02878834307193756, -0.00474642775952816, 0.10610495507717133, 0.07070297747850418, 0.04065091162919998, -0.022583719342947006, 0.06511596590280533, -0.033577147871255875, -0.027959682047367096, 0.008653759956359863, -0.010639212094247341, -0.029736196622252464, 0.0016265468439087272, 0.014953214675188065, 0.06888079643249512, -0.057419996708631516, 0.07602586597204208, -0.018604537472128868, -0.0184316523373127, 0.0031171878799796104, -0.007086693309247494, 0.04356154426932335, 0.08197355270385742, -0.004108851309865713, 0.026211680844426155, -0.03520474210381508, -0.032573625445365906, 0.04552717134356499, 0.011625725775957108, -0.027831895276904106, 0.040229544043540955, -0.03829750046133995, 0.0015973066911101341, -0.019425462931394577, 0.036648280918598175, 0.08896144479513168, -0.040425855666399, 0.011677034199237823, -0.0024717615451663733, 0.0021172899287194014, 0.01683199591934681, -0.000012999793398194015, -0.045260943472385406, -0.009586604312062263, -0.001114439102821052, -0.057606808841228485, -0.02880246564745903, -0.01366292405873537, -0.03268442675471306, 0.019620398059487343, -0.0240053441375494, -0.02110901288688183, 0.011758433654904366, -0.030651036649942398, -0.006369695067405701, -0.06516367197036743, -0.03523453697562218, -0.015158748254179955, -0.07595431059598923, -0.0033234572038054466, 0.01767023466527462, -0.0193802323192358, -0.03497502580285072, 0.009760142304003239, -0.027521887794137, -0.04267178475856781, 0.0725477859377861, -0.039711058139801025, -0.011637129820883274, 0.009515657089650631, 0.03364451974630356, 0.018888387829065323, 0.021959180012345314, 0.054258670657873154, -0.006595972925424576, -0.028262877836823463, -0.0095426170155406, 0.007342212367802858, 0.051154088228940964, 0.0032296753488481045, -0.014051912352442741, -0.09306354820728302, 0.01561672892421484, 0.013125472702085972, -0.050586871802806854, -0.08599285781383514, 0.028330402448773384, 0.030001915991306305, 0.03629598021507263, 0.04846731200814247, -0.010369247756898403, -0.04021921753883362, -0.03179958090186119, 0.013459763489663601, -0.019414301961660385, -0.0038025001995265484, 0.06478307396173477, -0.04555739834904671, 0.07148593664169312, 0.03758604824542999, -0.03825627639889717, -0.047415174543857574, -0.025190185755491257, 0.02224680595099926, -0.0029674936085939407, -0.031732335686683655, -0.01293736882507801, -0.011199621483683586, -0.10665744543075562, -0.028294090181589127, 0.011688019149005413, -0.013994485139846802, -0.04658111557364464, 0.021532975137233734, 0.0071316128596663475, -0.025439849123358727, 0.014694539830088615, -0.021967342123389244, 0.05354651063680649, -0.029984332621097565, -0.008318392559885979, -0.01455128937959671, 0.024962836876511574, -0.009545102715492249, 0.018186300992965698, -0.0058169886469841, -0.04382394626736641, 0.008577000349760056, -0.019056139513850212, 0.04235021024942398, 0.021921897307038307, 0.016800900921225548, -0.00812293030321598 ]
[ -0.04988803341984749, -0.03770580515265465, -0.012650120072066784, -0.04471512511372566, 0.10362298786640167, -0.03426133468747139, 0.023917483165860176, 0.0015901001170277596, -0.01602150686085224, -0.02695653960108757, 0.044666096568107605, -0.0013429211685433984, -0.02989858388900757, 0.02384025976061821, 0.030388476327061653, 0.02011442370712757, 0.010824658907949924, -0.0885932594537735, -0.0027968152426183224, 0.06264933943748474, -0.030933301895856857, -0.034390874207019806, -0.005355540197342634, -0.022295380011200905, -0.01484805066138506, 0.0325792171061039, 0.0490698479115963, -0.004107411950826645, -0.0347653366625309, -0.1694936901330948, 0.015426392666995525, -0.010181664489209652, 0.04390871152281761, 0.005519879050552845, -0.008773492649197578, 0.02518322505056858, 0.03448045626282692, 0.021503742784261703, 0.037921782582998276, 0.050466060638427734, 0.016764145344495773, 0.045470140874385834, -0.0440237857401371, -0.031659409403800964, 0.029588527977466583, 0.0039718057960271835, 0.01052001491189003, 0.01351044699549675, 0.0028446922078728676, 0.015537985600531101, -0.07468894869089127, -0.016565872356295586, -0.002169575309380889, 0.042260341346263885, -0.009556803852319717, 0.006277123931795359, 0.04387208819389343, 0.03578054532408714, 0.007370872888714075, 0.0471135638654232, 0.04456831514835358, 0.016413943842053413, -0.1269185096025467, 0.0671893060207367, -0.0041751014068722725, 0.03093329630792141, -0.034110959619283676, -0.0430411696434021, 0.00333723914809525, 0.03517608344554901, 0.006194064859300852, -0.006906244903802872, -0.05018325522542, 0.0438290573656559, -0.03152461722493172, -0.009340634569525719, 0.012713972479104996, 0.032026294618844986, -0.00270442315377295, -0.06076876074075699, -0.018477443605661392, 0.005726022645831108, 0.0030556614510715008, -0.004272142890840769, -0.06081777065992355, 0.003424005815759301, -0.03469809144735336, 0.04435417428612709, -0.0039103077724576, 0.018560202792286873, 0.05217970535159111, 0.02462822198867798, 0.06350134313106537, 0.0031184672843664885, -0.08259043097496033, -0.04496872425079346, -0.011181694455444813, 0.0690251961350441, 0.008853568695485592, 0.4102812111377716, 0.002415045630186796, -0.05827156454324722, 0.044928696006536484, 0.02052508480846882, -0.01997029036283493, 0.007014577277004719, 0.015801172703504562, -0.0883275717496872, 0.015345960855484009, -0.01321552973240614, 0.030538015067577362, -0.0006134531577117741, 0.07843323051929474, -0.049743134528398514, 0.05971788242459297, 0.013416549190878868, 0.0694928988814354, 0.0320185050368309, -0.01633717492222786, 0.024209067225456238, -0.00948360189795494, 0.00421980069950223, 0.02362225204706192, 0.003492616582661867, 0.022100217640399933, -0.04515457898378372, 0.016372177749872208, 0.06568515300750732, 0.023361416533589363, 0.02605980634689331, -0.006315476261079311, -0.017711836844682693, -0.07319542020559311, 0.001610017498023808, -0.017326360568404198, 0.015564496628940105, 0.0029475297778844833, -0.012240421958267689, 0.0012923994800075889, -0.014234769158065319, -0.02864319644868374, -0.034882448613643646, 0.009607105515897274, 0.01576128602027893, -0.037021055817604065, 0.12885721027851105, -0.024528630077838898, -0.07767846435308456, 0.0006917410646565259, -0.049299318343400955, 0.013212245889008045, 0.05271616205573082, 0.011737979017198086, -0.06373032182455063, -0.008519697934389114, 0.02363273873925209, 0.08988143503665924, -0.030976129695773125, -0.0873289629817009, 0.007939619943499565, 0.028100179508328438, -0.01915259100496769, -0.01734830066561699, 0.0825091153383255, 0.07275676727294922, -0.08221922069787979, -0.011445949785411358, 0.023519491776823997, 0.04656875878572464, -0.06926918029785156, 0.03867394104599953, 0.010814402252435684, -0.015044274739921093, 0.002940801903605461, 0.004558792803436518, -0.040896251797676086, -0.029046278446912766, 0.01201461162418127, 0.0073509979993104935, 0.008402429521083832, -0.03918970003724098, -0.023320944979786873, -0.07444709539413452, 0.03395874425768852, -0.07123542577028275, -0.049786441028118134, -0.053790491074323654, 0.033445294946432114, 0.004497879650443792, 0.053111132234334946, -0.03648502752184868, -0.012699807062745094, -0.04816851019859314, 0.01775990054011345, -0.05965865030884743, -0.011624416336417198, -0.012059436179697514, 0.008703297935426235, -0.03624545782804489, -0.034595783799886703, 0.02365090139210224, -0.006803588941693306, -0.022876879200339317, -0.003219089237973094, -0.03622810170054436, 0.06238755211234093, 0.06140449643135071, -0.06275012344121933, 0.036555442959070206, 0.04327410086989403, 0.01405694242566824, -0.005276071839034557, 0.0016289516352117062, 0.00813885498791933, 0.018707627430558205, -0.07201507687568665, -0.006469725165516138, -0.017617201432585716, 0.051176607608795166, 0.01645275205373764, -0.07356776297092438, -0.006712842267006636, -0.009352615103125572, -0.34033235907554626, -0.057700011879205704, -0.029673028737306595, 0.018758313730359077, -0.0033668100368231535, -0.07615850865840912, 0.017117705196142197, -0.04109707474708557, 0.026115426793694496, 0.08684525638818741, 0.04217804968357086, -0.0048100994899868965, -0.008566915057599545, -0.04323442280292511, 0.015539977699518204, 0.04002106562256813, 0.0005611540982499719, 0.0064028301276266575, -0.02814926952123642, -0.01316143199801445, -0.0031682036351412535, -0.04687652364373207, -0.06817197054624557, -0.046635910868644714, 0.0027087260968983173, -0.039518117904663086, 0.12348629534244537, 0.042244959622621536, 0.009392828680574894, -0.03248105198144913, 0.0366508848965168, -0.01701923832297325, 0.025104526430368423, -0.0920245349407196, 0.009575791656970978, -0.06092849746346474, 0.018044576048851013, 0.06980406492948532, -0.029305139556527138, -0.0030078282579779625, -0.08228927105665207, -0.021693361923098564, -0.02041061967611313, -0.026999566704034805, -0.03782275319099426, 0.004535295534878969, -0.027909448370337486, -0.00814006756991148, 0.013693086802959442, 0.06267092376947403, 0.004461463075131178, -0.009874868206679821, 0.021454010158777237, 0.016338622197508812, 0.011745053343474865, -0.05257336050271988, -0.0687355250120163, 0.02990845777094364, 0.012073904275894165, 0.011469307355582714, 0.01031349878758192, 0.05797652155160904, 0.04641891270875931, -0.0954214408993721, 0.008595380932092667, 0.030757827684283257, -0.022807510569691658, 0.00036376179195940495, 0.0002914272481575608, -0.0035189504269510508, -0.05121918395161629, 0.10573488473892212, -0.015406016260385513, 0.03440210968255997, 0.015662794932723045, 0.0428253598511219, -0.02829865552484989, 0.009287434630095959, 0.013974469155073166, 0.004491842817515135, 0.06951232254505157, 0.007205983158200979, 0.02763436548411846, -0.03272600099444389, 0.012976177036762238, 0.06643073260784149, 0.03840794786810875, -0.012671707198023796, 0.0711941048502922, 0.039467912167310715, -0.0049199070781469345, -0.02895558811724186, -0.008085154928267002, -0.09006369113922119, 0.044324737042188644, -0.0219527967274189, -0.2536073327064514, -0.004838154651224613, 0.026249298825860023, 0.05795484408736229, 0.022373141720891, -0.021975398063659668, 0.058054596185684204, -0.015034977346658707, 0.033099956810474396, -0.004006005823612213, 0.0504082590341568, 0.034367818385362625, -0.0005853245384059846, -0.030491704121232033, -0.0012485083425417542, -0.058076050132513046, -0.0305804293602705, 0.018833188340067863, 0.001439792918972671, 0.022147653624415398, 0.009726195596158504, 0.002741442061960697, 0.15445604920387268, 0.04562348127365112, -0.008033163845539093, 0.04588525369763374, 0.0051304856315255165, 0.01389178168028593, 0.0446174256503582, -0.027902554720640182, 0.005316005554050207, -0.007982500828802586, -0.0013908549444749951, 0.014810587279498577, 0.01913818158209324, -0.06448091566562653, -0.04629020020365715, 0.07194700837135315, 0.018070673570036888, -0.031847234815359116, -0.04457952827215195, 0.011098877526819706, -0.01793784461915493, 0.04717491194605827, 0.06001976132392883, 0.005159030202776194, -0.0006302950787357986, -0.02972707897424698, -0.055086780339479446, 0.022831978276371956, -0.03614257648587227, -0.07078514248132706, -0.02662263810634613, -0.045055046677589417, 0.04182547703385353, 0.09939304739236832, -0.013118959031999111, -0.020418725907802582, 0.05872028321027756, 0.03587058559060097, -0.036086004227399826, -0.019219517707824707, 0.09468989819288254, 0.00029912343597970903, -0.00042168551590293646 ]
[ 0.033942434936761856, 0.051311198621988297, -0.041826121509075165, -0.008210883475840092, 0.03669134899973869, 0.013832797296345234, 0.0010432275012135506, 0.020002570003271103, -0.005928886588662863, 0.015190033242106438, -0.009552007541060448, 0.013005095534026623, 0.05192156881093979, -0.0006701310048811138, -0.016085172072052956, -0.005267089232802391, -0.008243574760854244, 0.018127182498574257, 0.021757183596491814, -0.017337480559945107, -0.04142981022596359, 0.0025919415056705475, 0.04438065364956856, -0.014295659959316254, -0.04824706166982651, 0.059855036437511444, -0.03396192938089371, -0.008540910668671131, 0.0022855596616864204, -0.12395875155925751, -0.002910749753937125, -0.025448622182011604, -0.005388053134083748, 0.0188277754932642, 0.009070494212210178, -0.010809634812176228, 0.035540223121643066, 0.0267503522336483, 0.013684368692338467, 0.054062481969594955, 0.030599379912018776, 0.0038175354711711407, -0.01860954426229, 0.00157926045358181, -0.016513582319021225, -0.02831888012588024, -0.0423780158162117, 0.00432812562212348, 0.004171488806605339, -0.008233689703047276, -0.04222985729575157, 0.010461843572556973, -0.036105405539274216, 0.03734080493450165, -0.020909158512949944, -0.023512225598096848, -0.014089073985815048, 0.01735391840338707, 0.0017246906645596027, -0.01141770277172327, 0.012010141275823116, 0.04482433572411537, -0.03286955505609512, -0.010950393043458462, 0.007404340896755457, -0.02067078836262226, -0.012912623584270477, 0.014456667937338352, 0.0024602676276117563, 0.025846898555755615, 0.009924258105456829, 0.03573761507868767, -0.04832568019628525, -0.012353161349892616, -0.0192156620323658, -0.006843756418675184, 0.029240988194942474, -0.00617928197607398, -0.02335476316511631, -0.00015704994439147413, -0.047556620091199875, 0.012781539000570774, 0.0070531489327549934, 0.00042399123776704073, -0.021591316908597946, 0.009958349168300629, -0.02409437857568264, 0.010055250488221645, 0.00557721545919776, 0.006310400553047657, 0.019641440361738205, 0.009652652777731419, -0.016789952293038368, -0.014538119547069073, -0.08433535695075989, -0.025949930772185326, -0.009576667100191116, 0.032828137278556824, -0.008888348937034607, 0.8379424810409546, 0.009609821252524853, -0.031152930110692978, -0.017029594630002975, -0.022223245352506638, 0.005247135646641254, -0.006843000650405884, 0.013294484466314316, 0.0003660837537609041, -0.036360397934913635, -0.008364632725715637, 0.02876845933496952, 0.013500455766916275, 0.04228704795241356, 0.0010812614345923066, 0.04705466330051422, 0.0313614159822464, -0.03979448229074478, 0.03368251025676727, -0.0029436093755066395, 0.04941646754741669, 0.029336612671613693, 0.025139721110463142, -0.010041571222245693, 0.02800283581018448, -0.004593303892761469, -0.17811091244220734, -0.01922108232975006, -7.673212025725259e-33, 0.029724564403295517, 0.00908193364739418, 0.00042708386899903417, -0.02689248137176037, -0.015909714624285698, -0.017009811475872993, -0.016381505876779556, -0.015056460164487362, -0.029365114867687225, 0.01341201737523079, 0.014272150583565235, -0.0295887254178524, -0.012613634578883648, -0.02953111194074154, 0.014321205206215382, -0.016281263902783394, 0.030189765617251396, 0.01175517775118351, -0.016787128522992134, 0.009676909074187279, 0.006335373967885971, 0.030687004327774048, 0.016232801601290703, 0.04674581065773964, 0.009516325779259205, 0.0356135219335556, -0.02389620430767536, 0.02079828642308712, -0.01258495170623064, -0.04855976998806, -0.05045333877205849, 0.053020793944597244, 0.003715509781613946, -0.012226799502968788, 0.025744279846549034, -0.047705117613077164, -0.016821222379803658, -0.0008776769391261041, -0.01979532092809677, -0.0567345954477787, -0.02670477330684662, 0.028366709128022194, -0.025319185107946396, -0.020207403227686882, 0.003760936204344034, 0.0034236744977533817, -0.0074137551710009575, -0.000441875250544399, 0.012562341056764126, -0.01645483449101448, 0.033392149955034256, -0.015044956468045712, -0.010543832555413246, 0.017058992758393288, -0.06524980068206787, 0.048492513597011566, -0.006455148104578257, 0.021146629005670547, 0.01829843781888485, 0.05156911164522171, 0.021829430013895035, 0.00196035485714674, 0.004115935880690813, 0.015574737451970577, 0.030429180711507797, -0.03780060634016991, 0.019929971545934677, 0.017723411321640015, 0.034500494599342346, 0.0035722912289202213, -0.05244819447398186, 0.02770373225212097, 0.005247377324849367, -0.0044331904500722885, 0.042967475950717926, -0.0360422246158123, 0.0014380592620000243, -0.005041583441197872, 0.03147159889340401, 0.008515949361026287, -0.02589576132595539, -0.01512286625802517, 0.0183965265750885, -0.02115304209291935, -0.0075295111164450645, -0.018647946417331696, 0.03402666747570038, 0.007630142383277416, -0.02165360376238823, 0.007779840845614672, 0.02958511747419834, 0.009574961848556995, -0.013873295858502388, -0.022495664656162262, -0.02238438092172146, 7.636818720623801e-33, -0.006833161227405071, -0.03756736218929291, -0.012513559311628342, -0.012905779294669628, -0.007625056430697441, 0.0168681051582098, 0.008894525468349457, -0.003568515181541443, -0.031130855903029442, 0.03823425620794296, -0.021227847784757614, -0.029868198558688164, -0.007921176962554455, 0.037618499249219894, 0.060729723423719406, 0.01520147267729044, 0.020118078216910362, -0.0061865309253335, -0.03863532841205597, -0.005673075094819069, -0.022519303485751152, -0.012456263415515423, -0.010619292967021465, 0.03363437578082085, 0.03436421602964401, 0.02239629626274109, 0.007848935201764107, 0.02964535728096962, 0.0011880019446834922, -0.0010149824665859342, -0.011762605980038643, -0.017933513969182968, -0.025301292538642883, -0.009944475255906582, -0.017168762162327766, 0.030668795108795166, 0.029958780854940414, -0.003155701793730259, 0.0032440528739243746, -0.012283283285796642, 0.017106086015701294, 0.03821317106485367, -0.01870361901819706, 0.019830651581287384, -0.021766861900687218, 0.02634543925523758, 0.012338914908468723, 0.037972744554281235, -0.01056688092648983, 0.007498522289097309, -0.030756715685129166, 0.04102727770805359, -0.007291446439921856, 0.013178474269807339, 0.017666911706328392, -0.03565359115600586, -0.01968156173825264, -0.004095116630196571, -0.05495132878422737, 0.004238081630319357, -0.032514866441488266, 0.04678814485669136, -0.027617856860160828, 0.033508118242025375, 0.0027269539423286915, -0.037835877388715744, -0.03050343506038189, -0.05767890065908432, 0.001408762065693736, 0.004751021508127451, 0.025903088971972466, -0.008978957310318947, 0.0023272524122148752, 0.004966905806213617, 0.005734448321163654, -0.025503801181912422, -0.035264331847429276, 0.014418166130781174, -0.03281484544277191, 0.03644831106066704, 0.03405645117163658, -0.008874870836734772, -0.010766373947262764, 0.011085961945354939, 0.016800960525870323, 0.04048691689968109, -0.012690565548837185, 0.027196936309337616, 0.025579817593097687, -0.008240962401032448, 0.021102460101246834, -0.030857551842927933, -0.014841463416814804, 0.02122366614639759, -0.02848307229578495, -1.313838637884146e-8, -0.02894253097474575, -0.0014558897819370031, -0.006103208754211664, 0.029517004266381264, 0.00011253553384449333, 0.015254567377269268, -0.023291366174817085, -0.01563957892358303, -0.01009168941527605, 0.004324005451053381, 0.0558832623064518, -0.024457864463329315, 0.012934413738548756, -0.024184299632906914, 0.0005393809988163412, -0.03688787668943405, 0.018390629440546036, -0.02131607197225094, 0.02949153259396553, -0.004615542478859425, 0.02348400093615055, 0.05111561715602875, -0.033403705805540085, 0.005830012261867523, 0.013632063753902912, -0.01063663698732853, -0.016130592674016953, -0.07491648942232132, -0.007594612892717123, 0.008201937191188335, 0.011070861481130123, -0.03168105334043503, -0.03778133913874626, 0.0014042846160009503, -0.01088002696633339, -0.04365874454379082, 0.045707058161497116, 0.005112216807901859, -0.0017426353879272938, 0.02149146981537342, 0.012029587291181087, -0.01995977945625782, -0.02356559783220291, -0.03934888169169426, -0.03271053358912468, -0.008253132924437523, -0.025149619206786156, -0.02391703799366951, 0.04669922962784767, -0.05164971202611923, 0.009619665332138538, 0.010046941228210926, -0.005603475961834192, 0.05185016989707947, 0.06076022610068321, 0.013003384694457054, 0.02511606365442276, -0.009369447827339172, -0.009456067346036434, -0.030981743708252907, 0.016066180542111397, -0.012678602710366249, -0.00693045649677515, -0.030049091205000877 ]
spark-generating-csv-files-to-import-into-neo4j
https://markhneedham.com/blog/2015/04/14/spark-generating-csv-files-to-import-into-neo4j
false
2015-04-22 22:18:00
R: Replacing for loops with data frames
[ "r-2" ]
[ "R" ]
In my last blog post I showed how to http://www.markhneedham.com/blog/2015/04/21/r-numeric-keys-in-the-nested-listdictionary/[derive posterior probabilities for the Think Bayes dice problem]: ____ Suppose I have a box of dice that contains a 4-sided die, a 6-sided die, an 8-sided die, a 12-sided die, and a 20-sided die. If you have ever played Dungeons & Dragons, you know what I am talking about. Suppose I select a die from the box at random, roll it, and get a 6.
What is the probability that I rolled each die? ____ To recap, this was my final solution: [source,R] ---- likelihoods = function(names, observations) { scores = rep(1.0 / length(names), length(names)) names(scores) = names for(name in names) { for(observation in observations) { if(name < observation) { scores[paste(name)] = 0 } else { scores[paste(name)] = scores[paste(name)] * (1.0 / name) } } } return(scores) } dice = c(4,6,8,12,20) l1 = likelihoods(dice, c(6)) > l1 / sum(l1) 4 6 8 12 20 0.0000000 0.3921569 0.2941176 0.1960784 0.1176471 ---- Although it works we have nested for loops which aren't very idiomatic R so let's try and get rid of them. The first thing we want to do is return a data frame rather than a vector so we tweak the first two lines to read like this: [source,r] ---- scores = rep(1.0 / length(names), length(names)) df = data.frame(score = scores, name = names) ---- Next we can get rid of the inner for loop and replace it with a call to ifelse wrapped inside a dplyr mutate call: [source,r] ---- library(dplyr) likelihoods2 = function(names, observations) { scores = rep(1.0 / length(names), length(names)) df = data.frame(score = scores, name = names) for(observation in observations) { df = df %>% mutate(score = ifelse(name < observation, 0, score * (1.0 / name)) ) } return(df) } dice = c(4,6,8,12,20) l1 = likelihoods2(dice, c(6)) > l1 score name 1 0.00000000 4 2 0.03333333 6 3 0.02500000 8 4 0.01666667 12 5 0.01000000 20 ---- Finally we'll tidy up the scores so they're relatively weighted against each other: [source,r] ---- likelihoods2 = function(names, observations) { scores = rep(1.0 / length(names), length(names)) df = data.frame(score = scores, name = names) for(observation in observations) { df = df %>% mutate(score = ifelse(name < observation, 0, score * (1.0 / name)) ) } return(df %>% mutate(weighted = score / sum(score)) %>% select(name, weighted)) } dice = c(4,6,8,12,20) l1 = likelihoods2(dice, c(6)) > l1 name weighted 1 4 0.0000000 2 6 0.3921569 3 8 0.2941176 4 12 0.1960784 5 20 0.1176471 ---- Now we're down to just the one for loop. Getting rid of that one is a bit trickier. First we'll create a data frame which contains a row for every (observation, dice) pair, simulating the nested for loops: [source,r] ---- likelihoods3 = function(names, observations) { l = list(observation = observations, roll = names) obsDf = do.call(expand.grid,l) %>% mutate(likelihood = 1.0 / roll, score = ifelse(roll < observation, 0, likelihood)) return(obsDf) } dice = c(4,6,8,12,20) l1 = likelihoods3(dice, c(6)) > l1 observation roll likelihood score 1 6 4 0.25000000 0.00000000 2 6 6 0.16666667 0.16666667 3 6 8 0.12500000 0.12500000 4 6 12 0.08333333 0.08333333 5 6 20 0.05000000 0.05000000 l2 = likelihoods3(dice, c(6, 4, 8, 7, 7, 2)) > l2 observation roll likelihood score 1 6 4 0.25000000 0.00000000 2 4 4 0.25000000 0.25000000 3 8 4 0.25000000 0.00000000 4 7 4 0.25000000 0.00000000 5 7 4 0.25000000 0.00000000 6 2 4 0.25000000 0.25000000 7 6 6 0.16666667 0.16666667 8 4 6 0.16666667 0.16666667 9 8 6 0.16666667 0.00000000 10 7 6 0.16666667 0.00000000 11 7 6 0.16666667 0.00000000 12 2 6 0.16666667 0.16666667 13 6 8 0.12500000 0.12500000 14 4 8 0.12500000 0.12500000 15 8 8 0.12500000 0.12500000 16 7 8 0.12500000 0.12500000 17 7 8 0.12500000 0.12500000 18 2 8 0.12500000 0.12500000 19 6 12 0.08333333 0.08333333 20 4 12 0.08333333 0.08333333 21 8 12 0.08333333 0.08333333 22 7 12 0.08333333 0.08333333 23 7 12 0.08333333 0.08333333 24 2 12 0.08333333 0.08333333 25 6 20 0.05000000 0.05000000 26 4 20 0.05000000 0.05000000 27 8 20 0.05000000 0.05000000 28 7 20 0.05000000 0.05000000 29 7 20 0.05000000 0.05000000 30 2 20 0.05000000 0.05000000 ---- Now we need to iterate over the data frame, grouping by 'roll' so that we end up with one row for each one. We'll add a new column which stores the posterior probability for each dice. This will be calculated by multiplying the prior probability by the product of the 'score' entries. This is what our new likelihood function looks like: [source,r] ---- likelihoods3 = function(names, observations) { l = list(observation = observations, roll = names) obsDf = do.call(expand.grid,l) %>% mutate(likelihood = 1.0 / roll, score = ifelse(roll < observation, 0, likelihood)) return (obsDf %>% group_by(roll) %>% summarise(s = (1.0/length(names)) * prod(score) ) %>% ungroup() %>% mutate(weighted = s / sum(s)) %>% select(roll, weighted)) } l1 = likelihoods3(dice, c(6)) > l1 Source: local data frame [5 x 2] roll weighted 1 4 0.0000000 2 6 0.3921569 3 8 0.2941176 4 12 0.1960784 5 20 0.1176471 l2 = likelihoods3(dice, c(6, 4, 8, 7, 7, 2)) > l2 Source: local data frame [5 x 2] roll weighted 1 4 0.000000000 2 6 0.000000000 3 8 0.915845272 4 12 0.080403426 5 20 0.003751302 ---- We've now got the same result as we did with our nested for loops so I think the refactoring has been a success.
null
null
[ 0.0026778525207191706, 0.03840215876698494, -0.000639169302303344, 0.02170855738222599, 0.0665995255112648, 0.04162228852510452, 0.005500386469066143, -0.029216689988970757, 0.001469103037379682, -0.01601048931479454, 0.007945939898490906, 0.017095867544412613, -0.04995030164718628, 0.016444820910692215, -0.013596777804195881, 0.08874328434467316, 0.05765586346387863, -0.029338782653212547, 0.018462199717760086, 0.006446260027587414, 0.014055621810257435, 0.051552463322877884, -0.01235941331833601, 0.04665430635213852, 0.048797279596328735, 0.004133110865950584, 0.015107858926057816, 0.015946555882692337, -0.030157383531332016, 0.003399882698431611, 0.04506049305200577, 0.04202558472752571, -0.004759296774864197, -0.01656748540699482, 0.02839125134050846, -0.004560964647680521, -0.03292685002088547, 0.019500616937875748, -0.005895988550037146, 0.023257747292518616, -0.057880133390426636, 0.02751755528151989, -0.0282755009829998, 0.008286802098155022, -0.025796668604016304, -0.012119865044951439, -0.04791571572422981, 0.011708276346325874, -0.0008567318436689675, 0.002735302085056901, -0.05014732480049133, 0.04244953393936157, -0.04389866068959236, -0.028679758310317993, 0.015608517453074455, 0.04941360279917717, 0.036063335835933685, -0.07056445628404617, 0.02989013120532036, -0.037889689207077026, -0.0005432481411844492, 0.01212618499994278, -0.008678075857460499, 0.02196429669857025, 0.018728837370872498, -0.023119183257222176, -0.012440141290426254, 0.04449961334466934, -0.036473870277404785, -0.004453886765986681, -0.06972352415323257, -0.015873711556196213, 0.00563141331076622, -0.020134935155510902, -0.01569533348083496, -0.04681858420372009, 0.02008689194917679, 0.053445857018232346, 0.01839037425816059, -0.005383549258112907, -0.0033034086227416992, -0.03651868551969528, 0.03220337629318237, 0.01398477889597416, 0.012556955218315125, -0.028727689757943153, -0.023374540731310844, -0.04363132268190384, -0.05832071602344513, 0.056431565433740616, -0.004769844468683004, -0.049218177795410156, 0.017378294840455055, 0.020519889891147614, -0.060330674052238464, -0.009671702980995178, 0.003470456460490823, -0.002900872379541397, -0.01323020365089178, -0.027427710592746735, -0.058452434837818146, -0.025754541158676147, 0.07484427839517593, 0.005720505025237799, -0.07590161263942719, 0.0068127186968922615, -0.018203606829047203, -0.02345254272222519, -0.01548786461353302, 0.02498544380068779, -0.03859132155776024, 0.03607878461480141, 0.0024772288743406534, 0.0034288258757442236, -0.06789343804121017, 0.07136854529380798, 0.03885475918650627, -0.007625368889421225, 0.007714524399489164, -0.008294760249555111, 0.059392426162958145, 0.02335493452847004, -0.01352880522608757, 0.07864262908697128, 0.02994639240205288, 0.04228881374001503, -0.002097297925502062, 0.051972322165966034, -0.01828276552259922, -0.07722879946231842, 0.014139100909233093, 0.06380059570074081, -0.043664079159498215, 0.014403106644749641, -0.004141898360103369, -0.0307665653526783, -0.022133415564894676, -0.006702256854623556, 0.06927639991044998, 0.030070502310991287, 0.02003539353609085, -0.02087884582579136, 0.008345828391611576, 0.0019422346958890557, 0.03105848655104637, 0.0027101861778646708, 0.0044605303555727005, -0.023216750472784042, -0.06217118725180626, 0.017226040363311768, 0.04320096597075462, 0.018969031050801277, 0.06674812734127045, -0.03385666012763977, 0.0140446862205863, 0.047195401042699814, 0.0057574487291276455, -0.0011965177254751325, 0.0051175374537706375, 0.0033364815171808004, 0.04776521772146225, 0.035496216267347336, 0.009626144543290138, 0.03616996482014656, 0.01036881934851408, -0.0428442656993866, 0.05173572525382042, 0.05178842321038246, -0.041666179895401, -0.0035028611309826374, -0.05929417163133621, -0.0483558252453804, 0.05885119363665581, -0.02915770746767521, -0.006310753058642149, 0.01827637292444706, 0.06121854856610298, 0.03764183446764946, 0.05343777686357498, -0.010142114944756031, -0.07450754195451736, 0.013496722094714642, -0.013875226490199566, 0.024823158979415894, -0.003695473074913025, -0.03873537853360176, 0.08783866465091705, 0.006760878022760153, 0.03046402707695961, 0.04704831540584564, -0.07236822694540024, -0.05638391152024269, 0.004719115793704987, 0.0016344563337042928, 0.060374606400728226, -0.04138028994202614, 0.007073897868394852, 0.08928932994604111, 0.021909615024924278, 0.008200155571103096, -0.009480088949203491, 0.03694000095129013, 0.0491885244846344, -0.018830521032214165, -0.032848063856363297, 0.02911914885044098, 0.028427468612790108, -0.00186447543092072, -0.005138417240232229, 0.02531759813427925, -0.024031270295381546, 0.0017065525753423572, -0.0011965283192694187, -0.03787172958254814, 0.043589115142822266, 0.03886590525507927, 0.055766358971595764, 0.024381471797823906, 0.050455302000045776, -0.03238039091229439, -0.0055851563811302185, 0.024389557540416718, -0.0033069313503801823, -0.03690445050597191, 0.024252301082015038, 0.13821497559547424, 0.06403923779726028, -0.026751596480607986, -0.06035062298178673, 0.036327511072158813, -0.034437261521816254, -0.007635646499693394, 0.04069612920284271, -0.008102796040475368, -0.01822405494749546, 0.014967097900807858, -0.052336789667606354, -0.050785131752491, 0.030379140749573708, -0.057197023183107376, 0.008639522828161716, 0.053783804178237915, -0.006988603621721268, 0.04794975370168686, -0.010604039765894413, -0.004160659853368998, -0.010377651080489159, -0.043671634048223495, -0.06127344071865082, 0.0035537872463464737, 0.02003161422908306, -0.02085106447339058, 0.03946457430720329, -0.0002843535039573908, 0.0020996700040996075, -0.00847003236413002, -0.03666304424405098, 0.021906735375523567, 0.06963426619768143, 0.04457865655422211, -0.0370013527572155, 0.04306282103061676, 0.010625599883496761, -0.028655683621764183, -0.02404024451971054, -0.06582383066415787, -0.05725971236824989, -0.036058925092220306, -0.00965670682489872, 0.04720030725002289, 0.03623605892062187, 0.016852950677275658, -0.007890882901847363, -0.004915985278785229, -0.0018488821806386113, -0.02723739668726921, 0.03620870038866997, 0.004832169972360134, -0.025278817862272263, -0.020017195492982864, 0.00013245962327346206, 0.05348857119679451, 0.0008455076022073627, -0.03994154930114746, 0.002845709677785635, -0.047052737325429916, 0.03607356548309326, -0.06308693438768387, -0.021872997283935547, 0.020127106457948685, 0.009963166899979115, 0.05693404749035835, 0.003579712240025401, 0.018257956951856613, 0.06027457118034363, -0.013825252652168274, 0.03383281081914902, 0.005765369161963463, 0.010549603961408138, 0.04434485360980034, 0.011570144444704056, 0.008625013753771782, 0.04652724415063858, -0.002996276831254363, 0.0070562842302024364, -0.0492779016494751, 0.026338471099734306, 0.007147879805415869, -0.26748642325401306, 0.0038381144404411316, 0.0022687583696097136, -0.022904187440872192, 0.024853136390447617, -0.014138738624751568, 0.025026515126228333, -0.02410540170967579, -0.015403333120048046, 0.0035819890908896923, 0.013491807505488396, -0.04029637947678566, -0.03035508282482624, 0.052317727357149124, 0.04419085755944252, 0.02358989417552948, 0.0072082336992025375, -0.019885685294866562, -0.004180252086371183, 0.07156329602003098, 0.04093770682811737, -0.050336990505456924, -0.03471089527010918, 0.0443522185087204, 0.032988861203193665, 0.05333014577627182, -0.03841429948806763, 0.018813157454133034, -0.07493656128644943, -0.01776532270014286, 0.004133472219109535, -0.016274377703666687, 0.01850935071706772, -0.019579468294978142, 0.015826700255274773, -0.015791671350598335, 0.022897399961948395, 0.006126366090029478, -0.017887931317090988, 0.044341422617435455, -0.0373011939227581, -0.023638630285859108, 0.02911049872636795, -0.012651181779801846, 0.08566758781671524, 0.008888042531907558, -0.04912436380982399, 0.017318032681941986, -0.04624234139919281, 0.056348301470279694, 0.004451403394341469, -0.00829407200217247, -0.03383985534310341, 0.011208121664822102, -0.04164312779903412, -0.0042212409898638725, -0.02918025106191635, -0.0049308608286082745, -0.05547810718417168, -0.033468734472990036, 0.020276760682463646, -0.027041194960474968, -0.009674744680523872, -0.01956085115671158, -0.0028701205737888813, -0.08110295236110687, -0.0715918317437172, 0.011801310814917088, 0.05545615032315254, 0.04087710380554199, -0.035879041999578476, -0.02931826375424862, -0.013109901919960976, -0.11409714818000793, 0.0018944726325571537, -0.018501562997698784, -0.022431964054703712, -0.011931710876524448, 0.01715684123337269, 0.04099021106958389, -0.04227471724152565, -0.041790369898080826, 0.03237639367580414, 0.00623188866302371, 0.01651768386363983, 0.016627617180347443, 0.004259722772985697, 0.0076726870611310005, -0.024572627618908882, -0.01014240738004446, 0.07797026634216309, 0.005080452188849449, 0.00855797715485096, 0.002376074902713299, -0.03460951894521713, 0.06194660812616348, 0.019843382760882378, -0.0027227874379605055, 0.024384399875998497, 0.04609489068388939, 0.03674151003360748, -0.050729334354400635, 0.009179159998893738, -0.07500232011079788, -0.04969154670834541, 0.0068783992901444435, -0.03831661492586136, 0.006883204448968172, 0.02068403549492359, -0.008357089944183826, -0.010178695432841778, -0.01988915354013443, 0.04029564931988716, -0.06632796674966812, 0.013063219375908375, -0.03436378762125969, 0.02965102717280388, 0.04185623675584793, -0.0283794105052948, -0.02453508786857128, -0.07353007793426514, 0.02158512733876705, -0.042885515838861465, -0.03114268369972706, -0.03151439502835274, -0.04326727241277695, -0.004293318372219801, -0.03238864615559578, -0.010004117153584957, 0.004679581616073847, -0.016355765983462334, 0.013648409396409988, 0.06711861491203308, -0.0134270079433918, 0.030150391161441803, -0.014068848453462124, -0.043077971786260605, -0.006315052043646574, -0.014507086016237736, 0.0006869260687381029, 0.009049644693732262, -0.027272850275039673, 0.0011159448185935616, 0.03534863516688347, 0.015661604702472687, -0.01936279982328415, 0.05023697763681412, 0.006604898255318403, -0.007960827089846134, 0.02266617678105831, -0.001597228809259832, -0.0071777524426579475, 0.02466789074242115, -0.044675350189208984, -0.03769240900874138, -0.004515371285378933, 0.03479936718940735, -0.0204860121011734, -0.013841386884450912, -0.07079660147428513, 0.017926352098584175, -0.02803586795926094, -0.03476512432098389, -0.03366338834166527, -0.008705992251634598, 0.057394906878471375, -0.0212411992251873, 0.016018444672226906, 0.025676202028989792, -0.0054723783396184444, 0.010051918216049671, -0.021814826875925064, -0.013196130283176899, 0.02813030779361725, -0.033747028559446335, -0.009793654084205627, 0.01934346742928028, -0.02433730475604534, -0.001678371918387711, -0.014837734401226044, -0.006431997753679752, -0.01642976887524128, 0.005284725222736597, -0.0022325997706502676, 0.03693442419171333, 0.05315700173377991, -0.014167465269565582, -0.008677893318235874, -0.046007927507162094, -0.03440951183438301, -0.0651797205209732, -0.017480580136179924, -0.0015810506884008646, 0.016468163579702377, -0.06023392826318741, -0.05120544135570526, -0.014137416146695614, 0.017380336299538612, -0.016838442534208298, 0.016931194812059402, 0.0007239924743771553, -0.017359789460897446, -0.0298316553235054, 0.007534614764153957, 0.07276681810617447, -0.05615836754441261, -0.0009978055022656918, 0.014867433346807957, 0.020205140113830566, 0.014432194642722607, 0.0014028470031917095, -0.04253187030553818, -0.017322488129138947, -0.036766599863767624, 0.029517287388443947, -0.01939103752374649, -0.0402081236243248, -0.05515019968152046, 0.003182533197104931, 0.0017514183418825269, 0.03072761744260788, -0.040742963552474976, -0.011418158188462257, -0.008445652201771736, -0.022042427211999893, 0.004052687902003527, -0.030827345326542854, -0.07442571967840195, 0.053414445370435715, -0.021069791167974472, 0.010046293027698994, -0.005149116273969412, 0.007501889951527119, 0.02568899840116501, -0.02674534171819687, 0.007906835526227951, -0.06403512507677078, 0.03482956811785698, 0.024498315528035164, 0.045279961079359055, -0.009398524649441242, 0.0073089599609375, -0.03002074733376503, 0.01445541251450777, -0.03135295584797859, -0.013427126221358776, -0.011765704490244389, -0.009848672896623611, 0.03688563406467438, 0.04255583509802818, -0.010875553824007511, -0.005280318669974804, -0.027496974915266037, -0.024486318230628967, 0.06525886058807373, -0.0237691942602396, -0.016649659723043442, -0.012888678349554539, -0.03952016308903694, 0.02653341554105282, -0.007217367645353079, 0.008306445553898811, -0.024939943104982376, 0.03194652497768402, 0.041302021592855453, 0.012492472305893898, 0.07817868888378143, 0.001311503816395998, 0.0059173833578825, -0.034607935696840286, 0.014158511534333229, -0.0678776353597641, -0.004251823294907808, 0.04742103070020676, -0.016149219125509262, -0.001066965633071959, -0.0007070454303175211, -0.046896014362573624, 0.036284659057855606, -0.06560789793729782, -0.026067709550261497, 0.04212690144777298, 0.0059236497618258, -0.006559479981660843, 0.016339588910341263, -0.0543445460498333, -0.027029523625969887, 0.020864583551883698, -0.04217211529612541, -0.002201569965109229, -0.003137727500870824, 0.05867881327867508, -0.006064480170607567, 0.01653769612312317, -0.001322273281402886, 0.0039260112680494785, 0.054267462342977524, 0.04352251812815666, 0.04645277559757233, 0.06406185030937195, -0.03335663303732872, 0.038178157061338425, 0.0092732273042202, 0.010445910505950451, -0.019178735092282295, -0.005186925176531076, 0.01400210801512003, -0.05969849228858948, 0.022020870819687843, 0.013797584921121597, -0.0254779364913702, -0.0595187246799469, 0.0718931183218956, 0.01484462060034275, -0.03420884907245636, -0.05297942832112312, 0.016096189618110657, -0.03970971703529358, 0.0001706331386230886, 0.010080465115606785, -0.03154207393527031, -0.0196772962808609, 0.08599087595939636, -0.013028009794652462, 0.010316110216081142, 0.05211201310157776, -0.02139466255903244, -0.00732820387929678, 0.025200987234711647, 0.07027395814657211, 0.09058640897274017, 0.057835642248392105, 0.009060082025825977, 0.06909453868865967, -0.03914996236562729, -0.047881342470645905, 0.014521099627017975, -0.056158389896154404, -0.019758589565753937, -0.03918961435556412, 0.007378565147519112, 0.0488256998360157, -0.007678807247430086, 0.0405183881521225, -0.03677624091506004, -0.00322249555028975, 0.02970149554312229, 0.009442856535315514, 0.00900556705892086, 0.06497325003147125, -0.01783733442425728, 0.011553462594747543, -0.005738499574363232, -0.04157399758696556, 0.020983589813113213, -0.03423489257693291, -0.02584223449230194, 0.016186106950044632, -0.013029094785451889, 0.02610659785568714, 0.018959417939186096, 0.016540685668587685, 0.08378737419843674, -0.03721386566758156, -0.024791482836008072, -0.000988480867817998, 0.03766721487045288, -0.006573776714503765, 0.005139471031725407, 0.01670899987220764, -0.03956659138202667, -0.0008042051922529936, -0.03502257540822029, -0.013282561674714088, -0.04863326624035835, -0.006748712621629238, 0.017065156251192093, -0.038530346006155014, 0.006873514503240585, 0.03265419229865074, -0.027983352541923523, -0.042462073266506195, -0.05939709022641182, -0.0540652871131897, -0.03724196180701256, -0.08947369456291199, 0.000041192197386408225, 0.02708401530981064, 0.004164584446698427, -0.020768068730831146, 0.0017831380246207118, -0.012598646804690361, -0.010978036560118198, 0.0039054397493600845, -0.036434613168239594, -0.020156705752015114, 0.02281266264617443, -0.0032423099037259817, 0.0279683955013752, 0.03367454186081886, 0.03955058008432388, 0.01408871915191412, -0.006535544525831938, -0.00984480232000351, 0.028766412287950516, 0.04463241621851921, 0.029292721301317215, 0.00877559557557106, -0.04745133966207504, 0.018631283193826675, 0.0032429122366011143, -0.03509378060698509, -0.0791015550494194, 0.012859825044870377, -0.0014373583253473043, 0.007402220740914345, 0.05961092934012413, -0.005909773986786604, 0.016262894496321678, -0.048975661396980286, -0.01650531031191349, 0.020708147436380386, 0.01429262850433588, 0.03568931296467781, -0.06378493458032608, 0.058088269084692, 0.009311561472713947, -0.025026917457580566, -0.06901748478412628, -0.010695833712816238, -0.01129834819585085, -0.013404943980276585, -0.041811615228652954, -0.025262119248509407, -0.02248380146920681, -0.10647185146808624, 0.0010367558570578694, 0.02387750707566738, -0.05856478959321976, -0.018153738230466843, 0.02038695476949215, 0.009714962914586067, -0.033281318843364716, 0.040185052901506424, -0.03859708458185196, 0.04728396236896515, -0.03176577016711235, -0.028731724247336388, -0.008276110514998436, 0.05439632013440132, -0.017764095216989517, 0.029145054519176483, 0.02522874064743519, -0.04766390845179558, -0.023082522675395012, -0.009664359502494335, 0.012267615646123886, 0.045512665063142776, 0.003663226030766964, -0.001038099406287074 ]
[ -0.08846594393253326, -0.01520770974457264, -0.021731695160269737, -0.04000886157155037, 0.054010603576898575, -0.009023412130773067, 0.023664815351366997, 0.04138096421957016, 0.058197155594825745, 0.00015390444605145603, 0.011274898424744606, -0.050206754356622696, 0.00712676253169775, -0.01541636697947979, 0.03993978723883629, 0.009756756946444511, -0.024427292868494987, -0.05402316153049469, -0.02079690620303154, 0.013660455122590065, -0.01398769672960043, -0.03748168423771858, -0.040186166763305664, -0.0270261000841856, 0.03215324878692627, 0.04207809269428253, 0.014363068155944347, -0.04078882187604904, -0.021698709577322006, -0.23727869987487793, 0.002133437665179372, -0.013965708203613758, 0.012880937196314335, -0.03141116723418236, -0.020020468160510063, 0.038767941296100616, 0.023759158328175545, 0.033431556075811386, 0.017819974571466446, 0.0368555411696434, 0.022904468700289726, 0.01796296052634716, -0.02288731373846531, -0.01356047298759222, 0.052822086960077286, -0.0029700607992708683, -0.023211129009723663, -0.013258102349936962, 0.009157108142971992, 0.018603991717100143, -0.04274709150195122, -0.01645994558930397, -0.03466775640845299, -0.024253562092781067, 0.009018626064062119, 0.005846624728292227, 0.021927140653133392, 0.043910857290029526, 0.034960586577653885, 0.04354646056890488, 0.013360903598368168, 0.010615992359817028, -0.14233481884002686, 0.09855547547340393, 0.0031889670062810183, 0.03121800534427166, -0.027161411941051483, -0.01795576699078083, 0.0013814044650644064, 0.10256694257259369, 0.003971088211983442, 0.008690020069479942, -0.008195785805583, 0.0779712051153183, -0.006698582787066698, -0.022643405944108963, 0.011611709371209145, -0.007153479382395744, 0.029774116352200508, -0.025893263518810272, -0.04534192010760307, 0.033139996230602264, -0.010048581287264824, -0.017552504315972328, -0.022141113877296448, 0.001412904472090304, -0.00020319120085332543, 0.022747505456209183, 0.02634352259337902, 0.010189789347350597, 0.01594090275466442, 0.04712416231632233, 0.004122230689972639, -0.00800585187971592, -0.08434726297855377, 0.005830898880958557, 0.038228973746299744, 0.013192456215620041, -0.013630463741719723, 0.41440147161483765, -0.02073737420141697, -0.03763357922434807, 0.017032058909535408, 0.04372423142194748, -0.007082133088260889, -0.02395341545343399, -0.051665060222148895, -0.07819607853889465, -0.011235564947128296, -0.02426277846097946, 0.017345592379570007, -0.01621999964118004, 0.06620635837316513, -0.022301940247416496, -0.018182383850216866, 0.004818825516849756, 0.04378809034824371, 0.007767204195261002, 0.028408119454979897, -0.01166634913533926, -0.028831349685788155, -0.018894905224442482, 0.040541358292102814, -0.013477909378707409, 0.02970154583454132, -0.016347184777259827, 0.01233857125043869, 0.08853026479482651, 0.031689420342445374, -0.0038141626864671707, 0.058993902057409286, -0.055671386420726776, -0.08507192134857178, -0.010243215598165989, 0.013144684955477715, 0.0046613882295787334, 0.04573117941617966, -0.004718955606222153, 0.01335038524121046, -0.0037381192669272423, -0.027388697490096092, -0.019898636266589165, 0.047302860766649246, -0.00855955295264721, -0.06936808675527573, 0.10797952860593796, 0.007426555268466473, -0.036972060799598694, -0.033476974815130234, -0.06774379312992096, 0.024405863136053085, 0.02832246758043766, 0.030062614008784294, -0.06257881969213486, 0.01657116785645485, 0.03511669114232063, 0.051648180931806564, -0.014591333456337452, -0.08354408293962479, -0.02124558947980404, -0.0352945551276207, -0.01867993362247944, -0.025211818516254425, 0.04250781238079071, 0.013625233434140682, -0.03431859612464905, -0.011001124046742916, 0.018329141661524773, 0.03693472594022751, -0.0717177763581276, 0.016854068264365196, 0.009167468175292015, -0.03593838959932327, -0.0003907611535396427, 0.050078243017196655, 0.008817940019071102, -0.04571337252855301, -0.011194771155714989, 0.09416219592094421, 0.017523394897580147, 0.0026569394394755363, -0.008352238684892654, -0.03567381575703621, 0.0016732789808884263, -0.03685711696743965, -0.07631111145019531, -0.07118809968233109, -0.008853561244904995, -0.02313794195652008, -0.019108450040221214, 0.010001949034631252, -0.06753136217594147, -0.039647672325372696, 0.06629819422960281, -0.03506455570459366, -0.04962554946541786, 0.015827840194106102, -0.005063622258603573, -0.015773283317685127, -0.05840013176202774, -0.003338246140629053, -0.0029428531415760517, -0.016462942585349083, 0.022157875820994377, -0.04480624571442604, 0.040993742644786835, 0.0649089515209198, -0.03910951316356659, 0.08410398662090302, 0.014286640100181103, 0.011843277141451836, -0.01989229954779148, -0.012176264077425003, 0.023426158353686333, -0.015124333091080189, 0.02165599912405014, 0.014074604026973248, -0.014198001474142075, 0.00429477309808135, 0.03654899448156357, 0.015682708472013474, -0.05677929148077965, -0.004941641353070736, -0.34888339042663574, -0.06794178485870361, -0.009623950347304344, -0.019619697704911232, 0.04288918152451515, -0.03932924568653107, -0.01393202692270279, 0.009746646508574486, 0.016664134338498116, 0.031154073774814606, 0.04216734692454338, 0.011069214902818203, -0.002051449613645673, -0.10497010499238968, -0.00805729627609253, 0.01858619973063469, -0.05599255859851837, -0.04347929358482361, -0.05960635095834732, 0.018640650436282158, -0.028981948271393776, -0.022190183401107788, -0.040922462940216064, -0.060464341193437576, 0.021822655573487282, 0.0028646669816225767, 0.12393132597208023, 0.011402873322367668, 0.053141094744205475, -0.015178093686699867, 0.012075092643499374, 0.00006654445314779878, 0.016046063974499702, 0.013911683112382889, 0.026818273589015007, -0.020704833790659904, -0.013377891853451729, 0.02708236500620842, -0.03804687410593033, -0.015148650854825974, -0.05720503255724907, 0.03542318567633629, -0.041464079171419144, -0.030812805518507957, -0.09887095540761948, 0.003939974121749401, -0.019134080037474632, 0.017071738839149475, -0.016690080985426903, 0.09182774275541306, 0.034128230065107346, 0.012105808593332767, 0.03809211403131485, -0.01615956798195839, 0.007751031778752804, -0.01659398525953293, -0.07524605095386505, 0.0034086182713508606, -0.03188897296786308, 0.0017708090599626303, 0.04447917267680168, 0.05244339257478714, 0.046314019709825516, -0.06779429316520691, -0.0080625144764781, 0.0004464632656890899, 0.014947081916034222, -0.05223267897963524, 0.0462048314511776, -0.024151846766471863, -0.003515047486871481, 0.0926239863038063, -0.011559865437448025, 0.017279407009482384, 0.04785016179084778, 0.05811462178826332, 0.006830824073404074, -0.006427707150578499, -0.012499476782977581, 0.01824863627552986, 0.06466484069824219, -0.025063419714570045, 0.007343282923102379, -0.0008818725473247468, 0.010372068732976913, 0.009568489156663418, -0.004744714125990868, 0.01246329303830862, 0.06688090413808823, 0.03991442918777466, -0.004618422128260136, -0.015386783517897129, -0.017415523529052734, -0.030447859317064285, 0.01354705635458231, 0.01703854650259018, -0.28844138979911804, 0.017645375803112984, 0.06576158851385117, 0.03885725140571594, -0.0022555687464773655, -0.008607146330177784, 0.017260035499930382, -0.03593820333480835, 0.010324273258447647, -0.012787912040948868, 0.005773061886429787, 0.053565073758363724, 0.007028833031654358, 0.004315911326557398, -0.011154191568493843, -0.053167566657066345, 0.017933929339051247, -0.04092424735426903, 0.032315853983163834, -0.01329334732145071, 0.037376560270786285, -0.022241629660129547, 0.1824163794517517, -0.002841351553797722, 0.005123496986925602, 0.01108246948570013, 0.009791155345737934, -0.013929200358688831, 0.05335129797458649, 0.0007670727791264653, -0.0002152229571947828, -0.005576782394200563, 0.031657274812459946, -0.0041211796924471855, 0.044964876025915146, -0.013602281920611858, -0.047513559460639954, 0.04882701486349106, 0.026196323335170746, -0.020708002150058746, 0.030863082036376, 0.01366486307233572, -0.018551358953118324, 0.04464826360344887, 0.11173608899116516, 0.032404929399490356, 0.024435939267277718, -0.01795162260532379, -0.04654764011502266, 0.004601595923304558, -0.013342619873583317, -0.004418124910444021, 0.000872069678734988, -0.03627121448516846, 0.008661576546728611, 0.03532444313168526, 0.06041741371154785, -0.005980062764137983, 0.034575000405311584, -0.010891731828451157, 0.008257589302957058, -0.05939635634422302, 0.1272866278886795, 0.014756754040718079, 0.017121020704507828 ]
[ 0.01636229269206524, 0.014029460027813911, -0.014024635776877403, -0.027103619650006294, -0.009856057353317738, 0.006805513985455036, -0.0005369147984310985, 0.02058451436460018, 0.02660308964550495, 0.020434169098734856, -0.011856865137815475, 0.022724226117134094, -0.009302341379225254, -0.029415816068649292, -0.007840570993721485, 0.004895424470305443, 0.007264311425387859, -0.005849616136401892, 0.0228084996342659, 0.010513145476579666, -0.06022410839796066, 0.03062841109931469, 0.03300883620977402, -0.011702414602041245, -0.00517747038975358, -0.01156938262283802, 0.007410454098135233, 0.006468468811362982, 0.021107126027345657, -0.13357119262218475, 0.005883859004825354, -0.028585165739059448, -0.008198503404855728, 0.029499826952815056, -0.0015916379634290934, -0.0005787029513157904, -0.03096504509449005, 0.006041696760803461, -0.012619447894394398, 0.036139629781246185, 0.0034526886884123087, 0.027999335899949074, 0.036607302725315094, 0.012911172583699226, 0.007391719147562981, -0.016923250630497932, -0.05355198308825493, -0.010116650722920895, 0.01578022912144661, -0.03306267783045769, -0.02410530298948288, -0.016726426780223846, -0.02069832757115364, 0.011027700267732143, -0.008702329359948635, -0.038568176329135895, -0.032583218067884445, -0.0033265212550759315, 0.00125927256885916, -0.036305736750364304, -0.06287326663732529, 0.023380815982818604, -0.025008803233504295, -0.024212023243308067, -0.03103751502931118, -0.001576904091052711, -0.00046637668856419623, 0.02113700658082962, -0.011457052081823349, 0.005647299345582724, -0.02932494506239891, 0.03488130494952202, -0.01661505363881588, -0.04410484433174133, -0.012941976077854633, -0.02185293659567833, 0.005415807478129864, -0.08715518563985825, -0.0006261449889279902, 0.02212061733007431, -0.02724665403366089, 0.01319019217044115, 0.01460187416523695, -0.011790288612246513, 0.001578303286805749, -0.022534383460879326, 0.005670336540788412, 0.006116345524787903, 0.027084074914455414, -0.013558514416217804, -0.006673863623291254, 0.02519257180392742, -0.022557344287633896, 0.01423648651689291, -0.11514954268932343, 0.06470044702291489, 0.014042887836694717, -0.032011765986680984, -0.0011639324948191643, 0.8277442455291748, -0.005096582230180502, 0.003118450054898858, 0.014259628020226955, -0.004104315768927336, 0.00479092774912715, -0.012005381286144257, -0.009527541697025299, -0.012017970904707909, 0.003034355351701379, -0.046477243304252625, -0.010343408212065697, 0.026930542662739754, 0.03842803090810776, 0.052904557436704636, -0.024486450478434563, 0.046433355659246445, 0.0012320766691118479, 0.049456022679805756, -0.02254241518676281, -0.006574720609933138, 0.01205765176564455, 0.01017051748931408, 0.020757010206580162, -0.01798996329307556, 0.02174752578139305, -0.17859002947807312, 0.004597420338541269, -7.985864135685217e-33, 0.052285149693489075, -0.062271710485219955, 0.022613273933529854, 0.02685900591313839, 0.025502922013401985, -0.017390023916959763, -0.014908517710864544, 0.02277856320142746, 0.007569136098027229, -0.01928461343050003, -0.007209053263068199, -0.013902976177632809, -0.03687788546085358, -0.03209128603339195, 0.0586334727704525, 0.013423790223896503, -0.015146873891353607, 0.05745340883731842, -0.017218444496393204, 0.03094487264752388, -0.022891687229275703, 0.013644088059663773, 0.006021680776029825, 0.02523072250187397, -0.01580079086124897, 0.046246353536844254, 0.045773107558488846, 0.007157421670854092, -0.006085572764277458, -0.04707549884915352, -0.04623338207602501, 0.010908199474215508, -0.004397934768348932, -0.00833381712436676, 0.05146568641066551, -0.03212813287973404, -0.02629636600613594, 0.0018684903625398874, -0.012224843725562096, 0.011774827726185322, 0.007214662153273821, 0.004192164167761803, -0.028175942599773407, -0.012721487320959568, -0.030999252572655678, -0.017404278740286827, 0.06069079786539078, 0.016454359516501427, 0.028472935780882835, -0.008332696743309498, 0.022717002779245377, -0.021259570494294167, 0.02444172091782093, 0.013501285575330257, 0.020160475745797157, 0.04207402840256691, -0.0035874352324754, 0.030778493732213974, 0.02715284191071987, 0.017530018463730812, -0.007117665372788906, -0.005481832195073366, -0.0009824295993894339, 0.02096134051680565, 0.008704030886292458, -0.024768592789769173, -0.017999373376369476, -0.01885118894279003, 0.03791845589876175, 0.0046284738928079605, -0.02105891704559326, 0.019759444519877434, -0.024357793852686882, -0.021996568888425827, 0.031473103910684586, 0.029308823868632317, 0.01030796766281128, -0.0011065169237554073, 0.04866451770067215, 0.004928594455122948, 0.03946458548307419, 0.011050276458263397, -0.054740384221076965, -0.026780864223837852, 0.0072975317016243935, 0.013962319120764732, 0.004299475811421871, 0.0006311569013632834, -0.017098966985940933, -0.023808268830180168, 0.02434469573199749, -0.00289877294562757, 0.0006337822997011244, -0.026823176071047783, -0.015750886872410774, 7.577045567568457e-33, -0.04386952146887779, 0.001976498868316412, 0.009042826481163502, -0.014404647052288055, 0.05948818475008011, -0.013520503416657448, 0.02026038058102131, 0.002960520563647151, -0.007984618656337261, 0.00591679522767663, -0.01953417994081974, -0.006780971307307482, -0.002602687804028392, 0.03399929031729698, 0.06598775088787079, -0.024815093725919724, -0.0045365565456449986, 0.027828022837638855, -0.01815667934715748, -0.022438498213887215, -0.03070692904293537, -0.004784649237990379, -0.0011466926662251353, 0.00824273657053709, 0.015018681064248085, 0.04337259754538536, -0.006623351946473122, 0.01705222949385643, 0.004712436348199844, 0.0009359426912851632, 0.0524754673242569, 0.024264393374323845, 0.0012713174801319838, 0.023963861167430878, -0.038407888263463974, 0.022593442350625992, 0.04005818068981171, -0.04037272185087204, -0.025822339579463005, -0.028758656233549118, 0.006561434827744961, -0.01998087204992771, -0.014946955256164074, -0.0011067992309108377, 0.007803494576364756, -0.028622133657336235, -0.010568307712674141, -0.010118859820067883, 0.02500012330710888, -0.013438891619443893, -0.04296885058283806, 0.022236429154872894, -0.021490611135959625, 0.029250236228108406, 0.012595550157129765, -0.00906167272478342, -0.083574078977108, -0.0005835442570969462, 0.034344036132097244, -0.014337322674691677, -0.025852175429463387, -0.021153083071112633, -0.03641524165868759, 0.04802418872714043, 0.002833238337188959, 0.03412768617272377, -0.005014160182327032, -0.04642116278409958, -0.0411052443087101, 0.041508860886096954, -0.008195552043616772, 0.01116106752306223, -0.010585525073111057, -0.0036488694604486227, -0.0010990031296387315, -0.021644379943609238, -0.0439889058470726, -0.03299154341220856, 0.002898924984037876, 0.02648080699145794, 0.02494802139699459, -0.07104131579399109, -0.020421387627720833, 0.006254654843360186, 0.007091968785971403, -0.03437148779630661, 0.0024658667389303446, 0.0007979848887771368, 0.029781121760606766, -0.029864635318517685, 0.009104609489440918, -0.000782653340138495, 0.006886093877255917, 0.043831050395965576, -0.0284062959253788, -1.3189474401542611e-8, 0.00007034767622826621, 0.008079434745013714, -0.008920684456825256, 0.015182512812316418, 0.012512856163084507, 0.020684391260147095, -0.005566397216171026, 0.001284214318729937, -0.014959550462663174, -0.009837906807661057, 0.04886128753423691, -0.006485045421868563, -0.0032254999969154596, -0.01756523922085762, 0.025842590257525444, -0.019909236580133438, -0.049945637583732605, 0.01989881694316864, 0.0401315912604332, 0.013338266871869564, 0.052403293550014496, 0.03364070877432823, -0.0044783842749893665, -0.01888127252459526, -0.004046324640512466, -0.01646229438483715, 0.041121162474155426, -0.05853544548153877, -0.00014253977860789746, -0.027880776673555374, -0.0111980140209198, -0.019226057454943657, 0.01968226209282875, 0.0475512333214283, -0.030151493847370148, -0.04458966478705406, 0.04490083456039429, 0.024066632613539696, 0.028163107112050056, 0.03488267585635185, 0.018251946195960045, -0.020598232746124268, -0.042660217732191086, -0.018838994204998016, -0.007054758258163929, 0.024227244779467583, -0.0014832738088443875, 0.018850907683372498, 0.010738196782767773, -0.023862963542342186, 0.007839271798729897, -0.017115052789449692, -0.0023249948862940073, 0.002851505996659398, 0.0361584797501564, 0.008209219202399254, -0.007344450335949659, 0.00902906246483326, -0.033591922372579575, -0.01591016910970211, 0.0009401223505847156, 0.019970661029219627, 0.004766026046127081, -0.0202472023665905 ]
r-replacing-for-loops-with-data-frames
https://markhneedham.com/blog/2015/04/22/r-replacing-for-loops-with-data-frames
false
2015-04-25 22:26:51
Deliberate Practice: Watching yourself fail
[ "software-development" ]
[ "Software Development", "Deliberate Practice" ]
image::{{<siteurl>}}/uploads/2015/04/think_bayes_cover_medium.png[Think bayes cover medium,125] I've recently been reading the literature written by K. Anders Eriksson and co on https://www.scribd.com/doc/54636778/2009-Ericsson-K-a-Discovering-Deliberate-Practice-Activities-That-Overcome-Plateaus-and-Limits-on-Improvement-of-Performance[Deliberate] https://www.scribd.com/doc/194207680/The-Rigorous-Aplication-of-Deliberate-Practice[Practice] and one of the suggestions for increasing our competence at a skill is to put ourselves in a situation where we can fail. I've been reading http://greenteapress.com/thinkbayes/[Think Bayes] - an introductory text on Bayesian statistics, something I know nothing about - and each chapter concludes with a set of exercises to practice, a potentially perfect exercise in failure! I've been going through the exercises and https://www.techsmith.com/camtasia.html[capturing my screen] while I do so, an idea I picked up from one of the papers: ____ our most important breakthrough was developing a relatively inexpensive and efficient way for students to record their exercises on video and to review and analyze their own performances against well-defined criteria ____ Ideally I'd get a coach to review the video but that seems too much of an ask of someone. https://twitter.com/tonkouts[Antonios] has taken a look at some of my answers, however, and made suggestions for how he'd solve them which has been really helpful. After each exercise I watch the video and look for areas where I get stuck or don't make progress so that I can go and practice more in that area. I also try to find inefficiencies in how I solve a problem as well as the types of approaches I'm taking. These are some of the observations from watching myself back over the last week or so: * I was most successful when I had some *idea of what I was going to try first*. Most of the time the first code I wrote didn't end up being correct but it moved me closer to the answer or ruled out an approach. It's much easier to see the error in approach if there is an approach! On one occasion where I hadn't planned out an approach I ended up staring at the question for 10 minutes and didn't make any progress at all. * I could either solve the problems within 20 minutes or I wasn't going to solve them and needed to chunk down to a simpler problem and then try the original exercise again. e.g. one exercise was to calculate the 5th percentile of a posterior distribution which I flailed around with for 15 minutes before giving up. Watching back on the video it was obvious that I hadn't completely understood what a http://en.wikipedia.org/wiki/Probability_mass_function[probability mass function] was. I read the Wikipedia entry and retried the exercise and this time got the answer. * Knowing that you're going to watch the video back stops you from getting distracted by email, twitter, Facebook etc. * It's a painful experience watching yourself struggle - you can see exactly which functions you don't know or things you need to look up on Google. * I deliberately don't copy/paste any code while doing these exercises. I want to see how well I can do the exercises from scratch so that would defeat the point. One of the suggestions that Eriksson makes for practice sessions is to focus on 'technique' during practice sessions rather than only on outcome but I haven't yet been able to translate what exactly that would involved in a programming context. If you have any ideas or thoughts on this approach do let me know in the comments.
null
null
[ 0.026133423671126366, 0.020872268825769424, 0.0009504601475782692, 0.03314107656478882, 0.10350290685892105, 0.032297730445861816, 0.05356863513588905, 0.016525210812687874, 0.013826022855937481, -0.031152542680501938, -0.0007849140092730522, 0.00949480663985014, -0.04373195394873619, -0.013187568634748459, -0.03752809017896652, 0.07994107902050018, 0.06436973810195923, 0.014912181533873081, 0.01938547194004059, 0.0011614304967224598, 0.028394268825650215, 0.0648721233010292, 0.040838826447725296, 0.02809235267341137, 0.045493461191654205, 0.008170204237103462, 0.030702942982316017, 0.027796920388936996, -0.03641097992658615, -0.023372286930680275, 0.03880543261766434, -0.00030896253883838654, 0.007647099904716015, -0.011294356547296047, 0.03577059879899025, -0.01090613380074501, -0.021070148795843124, 0.022745810449123383, 0.005815962795168161, 0.014657052233815193, -0.06960713863372803, 0.03181814029812813, -0.03112657554447651, 0.006863571237772703, -0.04426397755742073, -0.0171323474496603, -0.03356051817536354, 0.004616458900272846, 0.007442898582667112, -0.024201761931180954, -0.05290299654006958, 0.05040116235613823, -0.005111741833388805, -0.005072616506367922, -0.03877396881580353, 0.053268641233444214, 0.03168201074004173, -0.05905866622924805, 0.01794240064918995, -0.04729040339589119, -0.020317772403359413, 0.0007079893839545548, 0.002514550695195794, 0.055077601224184036, 0.02750230021774769, -0.027360927313566208, 0.022023240104317665, 0.052629292011260986, -0.024302804842591286, -0.0036701555363833904, -0.04137285426259041, 0.011738440953195095, -0.00683056004345417, -0.012763618491590023, -0.010528241284191608, -0.05980183184146881, 0.024725040420889854, 0.06421977281570435, 0.025007927790284157, 0.009374056942760944, 0.006023803725838661, -0.007706074975430965, -0.002304788213223219, 0.030447786673903465, -0.022084789350628853, -0.04090364649891853, -0.009486854076385498, -0.021949071437120438, -0.08406952768564224, 0.07800332456827164, 0.014987839385867119, -0.042724527418613434, 0.01871904358267784, 0.03508610650897026, -0.024615729227662086, 0.010468530468642712, 0.027908606454730034, -0.010571890510618687, -0.02047906629741192, -0.030404921621084213, -0.040529582649469376, -0.0242979284375906, 0.03806815668940544, 0.033705830574035645, -0.08307310938835144, 0.005443787667900324, -0.006328980904072523, 0.005644626449793577, -0.025096222758293152, 0.027611371129751205, -0.028806373476982117, 0.02147628925740719, -0.013349181972444057, 0.002684202743694186, -0.08750943839550018, 0.05873475968837738, 0.025236058980226517, -0.019231947138905525, -0.015728620812296867, 0.0026594740338623524, 0.023002009838819504, 0.025273866951465607, -0.012975926510989666, 0.07330822199583054, 0.014897876419126987, 0.013222492299973965, 0.000466824829345569, 0.05967070534825325, -0.010983205400407314, -0.035318341106176376, -0.01224896777421236, 0.03701970353722572, -0.014567052014172077, 0.011898440308868885, 0.013273380696773529, -0.016029275953769684, 0.010203897953033447, 0.00483334856107831, 0.020996617153286934, 0.06127727031707764, -0.004393949173390865, -0.06064363941550255, 0.031578198075294495, 0.01745310053229332, 0.027221165597438812, -0.0038273127283900976, -0.005346017889678478, -0.016600003466010094, -0.030059073120355606, -0.0015296119963750243, 0.013484342023730278, -0.004512697923928499, 0.030668731778860092, -0.029720740392804146, -0.005489894654601812, 0.07387802749872208, 0.022500600665807724, 0.01394533272832632, -0.007737518288195133, 0.02271251007914543, 0.03423517197370529, 0.023967327550053596, 0.026426037773489952, 0.02290554717183113, 0.016674989834427834, -0.02826319821178913, 0.020250452682375908, 0.07028219848871231, -0.04042566567659378, 0.010262812487781048, -0.06293777376413345, -0.04679383337497711, 0.06409287452697754, -0.04526819288730621, -0.04178526997566223, 0.05507791042327881, 0.07096971571445465, 0.04872657358646393, 0.04684816673398018, 0.007923542521893978, -0.0898456797003746, 0.04287227988243103, 0.030618268996477127, 0.02877797931432724, 0.01461474597454071, -0.038013968616724014, 0.06621282547712326, 0.028464246541261673, 0.007378812879323959, 0.04742499068379402, -0.06835523247718811, -0.09484291821718216, -0.010806819424033165, -0.0217681173235178, 0.0518353208899498, -0.03682204335927963, 0.0270690880715847, 0.060486894100904465, 0.015150558203458786, 0.028848769143223763, 0.020031431689858437, 0.001958196284249425, 0.027004804462194443, -0.025808418169617653, -0.04804103448987007, 0.06597714871168137, 0.030032072216272354, -0.01812741719186306, -0.04177331551909447, 0.0061850170604884624, -0.019961213693022728, -0.01749126799404621, 0.0269770585000515, -0.022891491651535034, 0.0111005250364542, 0.00758987944573164, 0.05847429111599922, -0.010690093971788883, 0.0526125468313694, -0.027439378201961517, -0.002558192703872919, -0.0010014032013714314, -0.013917780481278896, 0.012564095668494701, 0.007813800126314163, 0.11850233376026154, 0.06581799685955048, -0.03598405420780182, -0.05314726009964943, 0.0024301332887262106, 0.015392642468214035, -0.04654945433139801, 0.017879541963338852, 0.008827888406813145, 0.00453367130830884, 0.00650025112554431, -0.06768839806318283, -0.04554346576333046, 0.033534467220306396, -0.06723133474588394, 0.0004046251706313342, 0.057391081005334854, -0.00855177454650402, 0.06508803367614746, -0.008588315919041634, 0.0036482566501945257, -0.020553549751639366, 0.013210417702794075, -0.033967118710279465, -0.0013521320652216673, 0.0019717717077583075, -0.016566704958677292, 0.028456566855311394, -0.016165772452950478, -0.015624417923390865, -0.04740706458687782, -0.035136736929416656, 0.025299208238720894, 0.0772351399064064, 0.05330504849553108, -0.014712858013808727, 0.0711604580283165, 0.0006191522697918117, 0.03407695144414902, 0.0013740758877247572, -0.05059647932648659, -0.06045199930667877, -0.04814764857292175, -0.005761804059147835, 0.011740238405764103, 0.019692447036504745, 0.015694070607423782, 0.018400399014353752, 0.015506992116570473, -0.01063359621912241, -0.006310798693448305, 0.05176417902112007, 0.012107769958674908, -0.018186505883932114, -0.0025325336027890444, -0.008403000421822071, 0.07230578362941742, -0.022325115278363228, -0.017675496637821198, 0.028335275128483772, -0.09091184288263321, 0.02275056578218937, -0.04814435914158821, -0.040101952850818634, 0.014699101448059082, -0.011154547333717346, 0.053213171660900116, 0.029424438253045082, 0.013112039305269718, 0.05380656570196152, -0.008415997959673405, 0.011176642030477524, -0.006587553303688765, -0.005660054739564657, 0.04115255922079086, -0.010062608867883682, 0.008863736875355244, 0.03756619989871979, -0.00045546505134552717, 0.0034688087180256844, -0.052082568407058716, 0.02453535422682762, -0.01491451170295477, -0.2873489260673523, 0.036812979727983475, 0.024293238297104836, -0.017960725352168083, 0.022819727659225464, -0.050883643329143524, 0.010289275087416172, -0.058918558061122894, -0.03954216465353966, 0.02671252191066742, -0.009380991570651531, -0.029212430119514465, -0.02133137173950672, 0.047326117753982544, 0.03114553913474083, 0.015074575319886208, 0.008429025299847126, -0.04129492864012718, 0.013983113691210747, 0.0667247399687767, 0.02229594998061657, -0.05294466391205788, -0.02544773370027542, 0.045017536729574203, 0.01627679355442524, 0.06685668975114822, -0.0803070068359375, 0.024152930825948715, -0.07791981101036072, -0.012672326527535915, 0.006076775956898928, -0.018396342173218727, 0.013181081973016262, -0.010602417401969433, -0.010164444334805012, -0.022764049470424652, 0.051023054867982864, -0.01989758387207985, -0.01364448107779026, 0.0262173879891634, -0.017196936532855034, -0.032508302479982376, -0.006528865545988083, 0.0221998430788517, 0.08603759855031967, 0.01069493219256401, -0.045872993767261505, -0.001158817787654698, -0.02861960418522358, 0.06475700438022614, -0.029194295406341553, -0.015450414270162582, -0.02608681283891201, 0.022804759442806244, -0.012355809099972248, -0.0075531513430178165, 0.0047284746542572975, -0.0263066366314888, -0.031224455684423447, -0.04479146748781204, -0.0029868148267269135, -0.03396568447351456, -0.0032137013040483, -0.0453420989215374, 0.005413546692579985, -0.07845796644687653, -0.04713504761457443, -0.02910797670483589, 0.07730067521333694, 0.02600962668657303, -0.048328593373298645, -0.0030901050195097923, -0.011629872024059296, -0.10005249828100204, -0.012896006926894188, 0.019525112584233284, -0.000996357761323452, 0.006274875719100237, 0.019016554579138756, 0.0507904477417469, -0.04144809767603874, -0.055443260818719864, 0.039313822984695435, 0.01276564970612526, 0.05192454531788826, -0.008840296417474747, 0.025306539610028267, 0.01081105973571539, -0.0006906103808432817, 0.010114294476807117, 0.07192215323448181, 0.018497662618756294, -0.010756763629615307, -0.0033641625195741653, 0.002361197490245104, 0.05232248827815056, 0.004713314585387707, -0.021797535941004753, 0.02380737103521824, 0.02397456392645836, 0.010423767380416393, -0.05746382474899292, 0.037632498890161514, -0.029018549248576164, -0.03303280472755432, -0.011688321828842163, -0.05023391172289848, 0.027006136253476143, 0.027287747710943222, -0.006917440332472324, -0.0005234166164882481, -0.024759085848927498, 0.017209528014063835, -0.007514978758990765, -0.014311598613858223, -0.036899566650390625, 0.009208944626152515, 0.03706448897719383, 0.0011471566976979375, -0.01913793571293354, -0.0569356232881546, 0.011312306858599186, -0.023437026888132095, -0.02801419422030449, -0.047742437571287155, -0.03408221900463104, 0.0036658509634435177, -0.020016616210341454, -0.015609833411872387, 0.0012445423053577542, -0.009057611227035522, 0.00872458703815937, 0.034797247499227524, -0.030940888449549675, 0.035707131028175354, -0.030474580824375153, -0.06047957390546799, -0.03174416348338127, 0.0030586514621973038, -0.010480518452823162, -0.009667661041021347, 0.009285596199333668, 0.006982224527746439, 0.028780007734894753, 0.049632467329502106, -0.007248673588037491, 0.019434241577982903, -0.026980016380548477, 0.006283513270318508, 0.021767396479845047, 0.015804987400770187, -0.047514691948890686, 0.01056812796741724, -0.029204614460468292, -0.01905207708477974, -0.003360660746693611, 0.017539260908961296, -0.012888847850263119, -0.02395353838801384, -0.01723659783601761, 0.018221328034996986, -0.02617032453417778, -0.06341313570737839, -0.04754447191953659, 0.00827854871749878, 0.06805206835269928, -0.02714693918824196, 0.007918627001345158, -0.020912330597639084, 0.00039001015829853714, 0.02476743422448635, -0.048871323466300964, -0.04276910796761513, 0.0046301293186843395, -0.011115838773548603, 0.003075833199545741, 0.005044403485953808, -0.006616747938096523, 0.013601891696453094, -0.000768486235756427, -0.005907656159251928, -0.04541977494955063, -0.00374226295389235, 0.001967045711353421, 0.06592529267072678, 0.019235514104366302, -0.006101620849221945, -0.02511151134967804, -0.024947091937065125, -0.021288027986884117, -0.022678576409816742, -0.021530570462346077, 0.006971149705350399, 0.02341117523610592, -0.038888514041900635, -0.053074318915605545, 0.03898876532912254, 0.028370752930641174, -0.0139592494815588, 0.04768369346857071, 0.008000927045941353, 0.004057576879858971, -0.01623585820198059, 0.028096484020352364, 0.06052979454398155, -0.06867866218090057, 0.01014728844165802, -0.009889530017971992, -0.022430291399359703, 0.012825648300349712, -0.016360899433493614, -0.02853167988359928, -0.004380539059638977, -0.025784073397517204, -0.007137582171708345, -0.061972375959157944, -0.038427017629146576, -0.03186580538749695, 0.025731844827532768, -0.006342215929180384, 0.01862945407629013, -0.03366881608963013, -0.017104532569646835, -0.016477277502417564, -0.015833724290132523, 0.02467161975800991, -0.04690968245267868, 0.01189156249165535, 0.05005449429154396, -0.039923734962940216, 0.01200266182422638, -0.05416634678840637, 0.0020431228913366795, 0.032312337309122086, -0.04286723583936691, -0.005378331523388624, -0.03528163209557533, 0.01167384348809719, 0.009836076758801937, 0.038546301424503326, -0.003778478829190135, -0.012545069679617882, -0.04471416398882866, 0.0029608362819999456, -0.026246948167681694, 0.010443922132253647, -0.010867557488381863, -0.026730714365839958, 0.05866100639104843, 0.04829186201095581, 0.012579292058944702, 0.006901910062879324, -0.027238808572292328, -0.013230503536760807, 0.052992358803749084, -0.04596002772450447, -0.016713768243789673, -0.03166162222623825, -0.053709883242845535, 0.03776038438081741, 0.01022010575979948, 0.006088328082114458, -0.02319161407649517, 0.03277954086661339, 0.019109802320599556, 0.01593969017267227, 0.034989938139915466, 0.004589290823787451, 0.01727656088769436, -0.05690877512097359, 0.01345719676464796, -0.08933304995298386, -0.00795786827802658, 0.03239145502448082, -0.021426567807793617, -0.01220691204071045, 0.012481068260967731, -0.051397740840911865, 0.057377349585294724, -0.07493457198143005, -0.026800135150551796, 0.02661009132862091, -0.023116102442145348, -0.014869529753923416, -0.00024009772459976375, -0.05288822203874588, 0.021554559469223022, 0.022255491465330124, -0.04666835442185402, 0.011898615397512913, -0.009443923830986023, 0.053793516010046005, -0.007675364147871733, 0.03411258012056351, -0.0031486083753407, 0.018786681815981865, 0.06284502148628235, 0.033817704766988754, 0.01714821718633175, 0.04035395011305809, -0.020405428484082222, 0.04513293877243996, 0.025909705087542534, 0.020869148895144463, 0.01065225899219513, 0.010546627454459667, -0.019838152453303337, -0.0704418495297432, 0.038627903908491135, -0.006082224193960428, -0.042747680097818375, -0.04679536819458008, 0.05089176818728447, 0.016483575105667114, -0.018968861550092697, -0.06867734342813492, 0.01865313947200775, -0.062104519456624985, -0.0228691678494215, -0.005337918177247047, -0.012779510580003262, -0.04096764698624611, 0.041860271245241165, -0.018187519162893295, 0.005550158675760031, 0.05609336122870445, -0.009855804964900017, -0.008649024181067944, -0.001448222086764872, 0.08949234336614609, 0.07880260795354843, 0.04674752056598663, 0.013831790536642075, 0.08641530573368073, -0.020554130896925926, -0.029548022896051407, 0.006989199202507734, -0.023907460272312164, -0.024963827803730965, -0.042092323303222656, 0.041163936257362366, 0.06581242382526398, -0.011903838254511356, 0.05782312527298927, -0.04138164594769478, -0.03979109972715378, 0.009439659304916859, 0.021323373541235924, 0.005073662381619215, 0.048273906111717224, 0.001575264846906066, 0.018031252548098564, -0.023876739665865898, -0.06476052105426788, 0.013409111648797989, -0.008881203830242157, -0.012896702624857426, 0.020504003390669823, -0.05362273007631302, 0.02157275192439556, 0.002891144249588251, 0.017148545011878014, 0.08511491119861603, -0.049624986946582794, 0.0023609797935932875, -0.00466229347512126, 0.032256923615932465, 0.006523106247186661, 0.020967256277799606, -0.009373510256409645, -0.019961362704634666, -0.0068972548469901085, -0.02747945860028267, -0.001317410496994853, -0.01712874509394169, -0.012463916093111038, -0.010234374552965164, -0.013736952096223831, -0.0061990306712687016, 0.03171823173761368, -0.015765106305480003, -0.04497585818171501, -0.06492781639099121, -0.032739799469709396, -0.04433295503258705, -0.06618548929691315, -0.013656817376613617, 0.026368023827672005, -0.0186142735183239, -0.025127319619059563, -0.02452000603079796, -0.01749506965279579, -0.031511928886175156, 0.04931815341114998, -0.04772423952817917, -0.027376819401979446, 0.024005739018321037, 0.019543960690498352, 0.029722947627305984, -0.0064485082402825356, 0.04293806850910187, -0.007126207929104567, -0.00491506140679121, 0.00047854744479991496, -0.00008613266982138157, 0.01745166815817356, 0.006309261079877615, 0.046126969158649445, -0.07335425168275833, 0.007219073828309774, 0.025017814710736275, -0.019105784595012665, -0.06890819221735, 0.022335924208164215, 0.019077667966485023, 0.014843727461993694, 0.05862139165401459, -0.03729357570409775, -0.0022652342449873686, -0.05903282389044762, 0.0022347469348460436, -0.025318756699562073, 0.01837054453790188, 0.03608332574367523, -0.03366680070757866, 0.09917348623275757, 0.0008280249312520027, -0.005535575095564127, -0.05912268906831741, -0.011128982529044151, 0.024584835395216942, 0.002444563200697303, -0.03212558478116989, -0.011421814560890198, -0.015961788594722748, -0.10047612339258194, -0.031206389889121056, 0.010039178654551506, -0.02557605691254139, -0.03994765877723694, 0.027984008193016052, 0.001603195909410715, 0.004281398840248585, 0.03191366791725159, -0.03886280953884125, 0.028921741992235184, -0.03236681595444679, -0.002618468599393964, 0.005339182447642088, 0.03410997614264488, -0.008379288949072361, 0.0033778157085180283, 0.01740410551428795, -0.0524708554148674, -0.004319717176258564, -0.010290130972862244, 0.015372580848634243, 0.03922956436872482, -0.013172022067010403, -0.02009091153740883 ]
[ -0.08514809608459473, -0.004737947601824999, -0.01697750948369503, -0.018127094954252243, 0.03981662914156914, 0.007031498942524195, 0.021353626623749733, 0.028849085792899132, 0.010898793116211891, -0.010564543306827545, 0.008282427676022053, -0.05866153538227081, -0.002376290038228035, 0.002768173348158598, 0.0677286684513092, 0.021468494087457657, -0.002474987879395485, -0.06729206442832947, 0.00104199955239892, 0.032004497945308685, -0.013514391146600246, -0.02685878984630108, -0.026131656020879745, -0.011345220729708672, 0.03370034322142601, 0.01647501438856125, 0.05482988804578781, -0.04842082038521767, -0.012634923681616783, -0.16290779411792755, -0.010443242266774178, -0.019332464784383774, 0.042976755648851395, -0.013325875625014305, -0.02996435947716236, 0.06550683826208115, -0.00794890709221363, 0.03640660271048546, -0.0028905877843499184, 0.04257553815841675, 0.014641624875366688, 0.017816796898841858, -0.030705861747264862, 0.001519471756182611, 0.045373160392045975, 0.01643223688006401, 0.009234956465661526, -0.033401016145944595, 0.016276052221655846, -0.0016422230983152986, -0.08764433115720749, -0.04933645576238632, -0.01746767945587635, -0.011891772970557213, -0.008400766178965569, 0.023418612778186798, 0.03967605158686638, 0.06219613924622536, 0.00990068819373846, 0.04093042388558388, 0.02549860067665577, -0.0007749096839688718, -0.1550654172897339, 0.08698315173387527, 0.034349143505096436, 0.0466136634349823, -0.02258331887423992, 0.007035720162093639, -0.0018306467682123184, 0.07747910916805267, 0.01467912457883358, -0.02423543483018875, 0.002202849369496107, 0.05796275660395622, 0.042611319571733475, 0.011518791317939758, 0.013442174531519413, 0.012859130278229713, 0.023168953135609627, -0.04277137294411659, -0.0071941642090678215, 0.02516826055943966, -0.005341590382158756, -0.03446795791387558, -0.042513586580753326, 0.025005606934428215, -0.026401422917842865, 0.020018815994262695, 0.03423573449254036, 0.0199475958943367, 0.033757589757442474, 0.016357215121388435, -0.020337093621492386, -0.014052657410502434, -0.07555203139781952, -0.0477539524435997, -0.005491447169333696, 0.026349419727921486, -0.036349158734083176, 0.4450080096721649, -0.017424531280994415, 0.004630585201084614, 0.0767860934138298, 0.048814088106155396, -0.01484991516917944, -0.027324128895998, 0.017130538821220398, -0.06331027299165726, 0.0227874293923378, -0.014555602334439754, 0.0424254909157753, -0.0005129791097715497, 0.06304894387722015, -0.028968390077352524, -0.0000704439589753747, 0.039647426456213, 0.052057765424251556, 0.0011660360032692552, 0.0046932208351790905, -0.008971297182142735, -0.046374157071113586, 0.00941399484872818, 0.046203672885894775, -0.036669958382844925, -0.035399846732616425, -0.06794091314077377, 0.014089426957070827, 0.0766860619187355, 0.04201053828001022, -0.03709738329052925, 0.07453761994838715, -0.056271992623806, -0.07330124825239182, -0.013500867411494255, 0.006221469957381487, -0.005231267306953669, 0.03992640599608421, -0.018119467422366142, 0.026231728494167328, 0.042448509484529495, 0.011936374939978123, -0.0013462186325341463, 0.034545477479696274, -0.030377743765711784, -0.03424926847219467, 0.1309816837310791, 0.033834394067525864, -0.032573357224464417, 0.002013197634369135, -0.045510388910770416, 0.023944852873682976, 0.01931368187069893, -0.010780253447592258, -0.05795145407319069, 0.020844632759690285, 0.006878736894577742, 0.10228393226861954, -0.001346962759271264, -0.0726957842707634, -0.013010955415666103, -0.04891997575759888, -0.02490883506834507, -0.05955595523118973, 0.04642185941338539, 0.06934554129838943, -0.05447373166680336, -0.030089782550930977, 0.001553006237372756, 0.011599954217672348, -0.07059761136770248, 0.02771540731191635, 0.004127629566937685, -0.03462153300642967, 0.008409140631556511, 0.0423160046339035, -0.026849957183003426, -0.04050964117050171, 0.005354706663638353, 0.04235729202628136, 0.021482447162270546, 0.03007105179131031, -0.02105753868818283, -0.02919875830411911, 0.01252328883856535, -0.05783814936876297, -0.05516103655099869, -0.03943249210715294, -0.02033860795199871, -0.003434708109125495, -0.003121279878541827, -0.000861465057823807, -0.04880464822053909, -0.10792988538742065, 0.06759414076805115, -0.05813629552721977, -0.03914537653326988, 0.009830109775066376, -0.011080095544457436, -0.05131256580352783, -0.020526746287941933, -0.0455177016556263, -0.016062047332525253, -0.03043816238641739, 0.035925235599279404, -0.03722509741783142, 0.04448338598012924, 0.06483222544193268, -0.04226061701774597, 0.1303667277097702, 0.03889437019824982, -0.010845771059393883, -0.03810054808855057, 0.004411296918988228, 0.02279442362487316, 0.007959929294884205, -0.015175774693489075, 0.007128506898880005, 0.0021717760246247053, -0.02271628938615322, 0.033407241106033325, 0.013664859347045422, -0.030158594250679016, -0.027936182916164398, -0.33670827746391296, -0.061249732971191406, -0.027810364961624146, 0.012391524389386177, 0.023448579013347626, -0.033675115555524826, 0.011080930009484291, 0.016514137387275696, -0.0010525040561333299, 0.005984565243124962, 0.05598634481430054, -0.012172616086900234, -0.008799591101706028, -0.0806998610496521, 0.00029338718741200864, -0.01567983813583851, -0.05329487472772598, -0.021731548011302948, -0.0430852547287941, -0.0006758428062312305, -0.00925263948738575, 0.010573700070381165, -0.029654130339622498, -0.04979171231389046, 0.004802803974598646, -0.029035789892077446, 0.08788454532623291, 0.05580739304423332, 0.04891624301671982, -0.020752297714352608, 0.02751936763525009, 0.013852632604539394, 0.020555460825562477, -0.0789775550365448, 0.008764256723225117, -0.03041009232401848, -0.0015372619964182377, -0.033211927860975266, -0.009303640574216843, -0.05888229236006737, -0.05945777893066406, 0.041749007999897, -0.05456705391407013, -0.0222084429115057, -0.11546919494867325, 0.009100385941565037, -0.0324336439371109, 0.012380541302263737, -0.037691064178943634, 0.06716373562812805, 0.03801936283707619, 0.005112607032060623, 0.023924604058265686, -0.030898846685886383, -0.003200674196705222, -0.01749848946928978, -0.11457947641611099, 0.008824345655739307, -0.027960795909166336, -0.015279579907655716, 0.016702301800251007, 0.06931368261575699, 0.05920625850558281, -0.0418834313750267, 0.010316967032849789, -0.006595154758542776, 0.008271969854831696, -0.005779473576694727, 0.025772694498300552, -0.01801268570125103, -0.017300007864832878, 0.08076533675193787, -0.010760131292045116, -0.027361350134015083, 0.04392094165086746, 0.027689825743436813, -0.016310784965753555, 0.010544697754085064, 0.008443483151495457, 0.0005206040223129094, 0.036013443022966385, -0.018983956426382065, 0.0187001321464777, -0.018302569165825844, -0.015491838566958904, 0.0005485116853378713, -0.010675529018044472, -0.05151459202170372, 0.07436468452215195, 0.02200373262166977, -0.0178830586373806, 0.021633967757225037, -0.03410455211997032, -0.05111142620444298, 0.053823042660951614, 0.003171423217281699, -0.2570829689502716, 0.019024355337023735, 0.07444371283054352, 0.0504625141620636, 0.0075894808396697044, 0.02241700328886509, 0.041867684572935104, -0.015576768666505814, 0.0144887650385499, 0.020354604348540306, 0.004195145331323147, 0.00794291216880083, -0.004995228257030249, 0.009881876409053802, -0.012374918907880783, -0.050523340702056885, 0.021342618390917778, 0.004164970479905605, 0.03704921901226044, 0.0010995317716151476, 0.026191113516688347, 0.009292859584093094, 0.14534571766853333, 0.025308875367045403, 0.007415276952087879, 0.017297858372330666, 0.015266689471900463, -0.007124907802790403, 0.06539573520421982, -0.02294309064745903, 0.010938617400825024, 0.009304601699113846, 0.004119374323636293, 0.02051607146859169, 0.03572617098689079, -0.054012663662433624, -0.035452648997306824, 0.039602044969797134, 0.018719956278800964, -0.01457605604082346, 0.04194515943527222, -0.014866583049297333, -0.010018247179687023, 0.05607873573899269, 0.09689496457576752, 0.005127985030412674, 0.02250952273607254, -0.04878396913409233, -0.07373202592134476, -0.008434606716036797, -0.024983344599604607, -0.01645921729505062, 0.0269717276096344, -0.030296068638563156, 0.011109025217592716, 0.06744688749313354, 0.04341627657413483, -0.020651722326874733, 0.018825910985469818, -0.0331897996366024, -0.00609474815428257, 0.0016037283930927515, 0.09924200922250748, 0.02124510332942009, 0.03578665107488632 ]
[ -0.00029472302412614226, -0.02301429957151413, 0.018009085208177567, -0.0328696072101593, 0.008662063628435135, 0.01841992698609829, 0.012467524968087673, 0.048003990203142166, 0.005524753592908382, 0.008470991626381874, 0.005496209487318993, 0.022356057539582253, 0.04134721681475639, 0.008986890316009521, 0.015513992868363857, 0.005961555987596512, 0.004340639337897301, -0.0034433461260050535, 0.015875425189733505, 0.028744930401444435, -0.03655683621764183, 0.007334299851208925, 0.022981995716691017, -0.014321773312985897, -0.035692717880010605, 0.02699117548763752, 0.009536908939480782, -0.005387923214584589, 0.023081252351403236, -0.1272507607936859, -0.04875052720308304, -0.030393043532967567, -0.013718506321310997, 0.013144156895577908, 0.0026165200397372246, -0.031573016196489334, -0.05024975165724754, -0.0084520373493433, -0.031059855595231056, 0.026328137144446373, -0.03313513100147247, 0.004698769189417362, 0.022899432107806206, 0.04371827468276024, 0.01318129152059555, 0.014107098802924156, -0.017222553491592407, -0.024302305653691292, 0.006320658605545759, -0.029232610017061234, -0.05712555721402168, -0.03523648530244827, -0.00988948717713356, -0.008914070203900337, 0.008808372542262077, 0.003626351710408926, 0.017140181735157967, -0.006234470289200544, 0.034154802560806274, -0.008787762373685837, 0.007581004872918129, -0.013457166962325573, -0.0330023467540741, -0.021323882043361664, 0.01669244095683098, 0.010627778246998787, -0.016408246010541916, 0.013067212887108326, -0.029559718444943428, 0.045933663845062256, -0.033913563936948776, 0.037897754460573196, -0.046494003385305405, -0.0014232411049306393, -0.004778902977705002, -0.026264697313308716, -0.030475104227662086, -0.02858823351562023, 0.010764861479401588, -0.002983560785651207, -0.029665648937225342, 0.011356547474861145, -0.009393657557666302, -0.005357122514396906, 0.010619507171213627, -0.009267405606806278, 0.015959709882736206, -0.022359047085046768, 0.031845588237047195, 0.012602007947862148, -0.04622579365968704, 0.025969015434384346, -0.029391350224614143, 0.0021944146137684584, -0.09084409475326538, 0.00868973694741726, -0.0011311945272609591, -0.02999395690858364, -0.009588979184627533, 0.8525385856628418, 0.013672223314642906, 0.02988811582326889, 0.04529404267668724, 0.013635305687785149, -0.0013823225162923336, -0.010112905874848366, 0.012144846841692924, 0.017790231853723526, 0.02045907825231552, -0.02938716486096382, -0.006503172684460878, -0.00450998404994607, 0.022330153733491898, 0.017279120162129402, 0.00020796875469386578, 0.05773263797163963, 0.02609783597290516, 0.024357551708817482, -0.03713895380496979, 0.02493520826101303, 0.01732664555311203, -0.002931607188656926, -0.004454293288290501, -0.004959709011018276, 0.00714587839320302, -0.17560625076293945, 0.02000848390161991, -8.19114365290519e-33, 0.0787186399102211, -0.042734552174806595, 0.01976204104721546, 0.012213468551635742, -0.01975356601178646, -0.0190435778349638, 0.013243099674582481, 0.00512800132855773, -0.02654212899506092, -0.03493209555745125, 0.0033595599234104156, -0.01882595755159855, -0.023570384830236435, -0.017199693247675896, 0.04050614312291145, 0.010069425217807293, -0.016105370596051216, 0.0411224290728569, -0.021102339029312134, 0.042266011238098145, 0.06122482195496559, 0.011025907471776009, 0.0049611590802669525, 0.0026237270794808865, 0.004621227737516165, 0.022010229527950287, 0.026312118396162987, 0.011225768364965916, -0.011553174816071987, -0.04673768952488899, -0.03874744474887848, -0.009692913852632046, -0.023806605488061905, -0.04554225876927376, -0.008118565194308758, -0.0357077457010746, -0.006463394500315189, 0.011809415183961391, 0.019171081483364105, -0.02970632165670395, -0.012967352755367756, 0.023228973150253296, 0.0036917715333402157, -0.018565628677606583, -0.018294719979166985, -0.01771906204521656, 0.015663597732782364, 0.0021599717438220978, 0.010536691173911095, -0.037655945867300034, 0.02452002465724945, -0.0036553065292537212, 0.012200606055557728, -0.025815414264798164, -0.0060802968218922615, 0.027954667806625366, 0.006126349791884422, 0.019562827423214912, -0.008719073608517647, -0.008724275045096874, 0.06060950830578804, -0.0023559555411338806, -0.03452899679541588, 0.03884788230061531, -0.029310565441846848, 0.00020511461480055004, 0.004826901946216822, 0.00360497017391026, 0.03190402314066887, -0.026066195219755173, -0.06376592814922333, 0.011833523400127888, 0.00230980571359396, -0.027200398966670036, 0.04181396961212158, 0.0065381694585084915, -0.018750833347439766, 0.008661658503115177, -0.011120179668068886, 0.033571191132068634, 0.000608753995038569, -0.022434359416365623, -0.029685715213418007, -0.036762747913599014, -0.01168893650174141, 0.02688775025308132, 0.03717692196369171, -0.04545524716377258, -0.017515501007437706, -0.005860029254108667, 0.02551245503127575, -0.0013540511718019843, -0.008222139440476894, -0.004497997462749481, -0.015013647265732288, 7.956085925043011e-33, -0.01866963692009449, -0.009557588025927544, 0.011490508913993835, 0.0019790823571383953, 0.040661152452230453, -0.02654174529016018, 0.024520860984921455, -0.0026165181770920753, -0.045278847217559814, -0.00181839638389647, -0.05009661242365837, -0.012863056734204292, -0.06002851948142052, 0.003125661751255393, 0.005878683645278215, -0.034939467906951904, 0.011710123158991337, -0.006334652192890644, -0.012298071756958961, -0.02247515879571438, 0.03667447343468666, 0.009019499644637108, 0.02697218582034111, -0.00836371909826994, 0.01100952085107565, 0.07342276722192764, 0.0038167983293533325, 0.021531149744987488, -0.006937675178050995, -0.006700839847326279, 0.026681462302803993, 0.006453308742493391, 0.015258095227181911, 0.010858118534088135, -0.01606704667210579, 0.03407568484544754, -0.0004420435579959303, -0.0030498672276735306, -0.018792055547237396, -0.006979945115745068, 0.00904768705368042, -0.004697879776358604, -0.006850311066955328, 0.007155185099691153, 0.012016216292977333, 0.019767604768276215, -0.0049951206892728806, -0.0213623046875, -0.019925154745578766, -0.04427877441048622, -0.008197812363505363, 0.019212203100323677, -0.015207845717668533, 0.025446195155382156, 0.003336935304105282, 0.010132973082363605, -0.046920470893383026, 0.009649625048041344, -0.0076759192161262035, 0.023313216865062714, -0.008728651329874992, 0.0033774578478187323, -0.02890496328473091, 0.0028206713031977415, -0.009475414641201496, 0.017980411648750305, -0.029033873230218887, 0.03019089624285698, -0.024856258183717728, 0.038458745926618576, -0.029942605644464493, 0.031804416328668594, 0.024235203862190247, 0.029740916565060616, 0.01962679624557495, -0.0034334645606577396, -0.016880221664905548, 0.013855759054422379, -0.021420584991574287, 0.019860150292515755, 0.001129402662627399, -0.02690601721405983, -0.03610064089298248, 0.0252321045845747, -0.005926647689193487, 0.037685468792915344, -0.0016961038345471025, -0.014094782061874866, 0.007380440831184387, -0.029111472889780998, -0.034105367958545685, -0.0006787536549381912, 0.0016963406233116984, 0.012788702733814716, -0.0127802025526762, -1.3604443793724386e-8, -0.024038469418883324, 0.031001724302768707, -0.008593629114329815, 0.035535771399736404, 0.012344718910753727, 0.002495789434760809, -0.0007712796796113253, 0.030408596619963646, 0.009313352406024933, 0.002974387491121888, 0.040158964693546295, -0.0377376414835453, 0.012969487346708775, 0.00823757890611887, 0.011747420765459538, -0.01791450008749962, -0.0019895369186997414, 0.023312866687774658, 0.021853195503354073, 0.006568365264683962, 0.0515584796667099, 0.03024439327418804, -0.0035320594906806946, 0.007131374441087246, -0.01069458294659853, -0.0007134209736250341, -0.021125346422195435, -0.060468997806310654, -0.03245389461517334, -0.0006286181742325425, 0.009834439493715763, -0.03871522098779678, 0.0029591184575110674, 0.032717227935791016, 0.0009983100462704897, -0.027365639805793762, 0.004547117277979851, -0.0009671142906881869, 0.010981702245771885, -0.006013690494000912, -0.012774010188877583, -0.018617408350110054, 0.011024647392332554, -0.012693556025624275, -0.018041696399450302, 0.025104526430368423, -0.005255797412246466, -0.011085489764809608, 0.01659872941672802, -0.024169182404875755, -0.006408317945897579, -0.010904901660978794, 0.008061482571065426, 0.027285724878311157, 0.01018168032169342, 0.03400595113635063, 0.03678349778056145, -0.01298944279551506, -0.07093250751495361, -0.0022955837193876505, 0.015351517125964165, 0.004645712673664093, -0.01915479078888893, 0.016766175627708435 ]
deliberate-practice-watching-yourself-fail
https://markhneedham.com/blog/2015/04/25/deliberate-practice-watching-yourself-fail
false
2015-05-03 00:19:51
Coding: Visualising a bitmap
[ "coding" ]
[ "Coding", "Java" ]
Over the last month or so I've spent some time each day reading a new part of the Neo4j code base to get more familiar with it, and one of my favourite classes is the https://github.com/neo4j/neo4j/blob/2.3/community/kernel/src/main/java/org/neo4j/kernel/impl/util/Bits.java[Bits] class which does all things low level on the wire and to disk. In particular I like its toString method which returns a binary representation of the values that we're storing in bytes, ints and longs. I thought it'd be a fun exercise to try and write my own function which takes in a 32 bit map and returns a string containing a 1 or 0 depending if a bit is set or not. The key insight is that we need to iterate down from the highest order bit and then create a bit mask of that value and do a bitwise and with the full bitmap. If the result of that calculation is 0 then the bit isn't set, otherwise it is. For example, to check if the highest order bit (index 31) was set our bit mask would have the 32nd bit set and all of the others 0'd out. [source,java] ---- java> (1 << 31) & 0x80000000 java.lang.Integer res5 = -2147483648 ---- If we wanted to check if lowest order bit was set then we'd run this computation instead: [source,java] ---- java> (1 << 0) & 0x00000001 java.lang.Integer res7 = 0 java> (1 << 0) & 0x00000001 java.lang.Integer res8 = 1 ---- Now let's put that into a function which checks all 32 bits of the bitmap rather than just the ones we define: [source,java] ---- private String asString( int bitmap ) { StringBuilder sb = new StringBuilder(); sb.append( "[" ); for ( int i = Integer.SIZE - 1; i >= 0; i-- ) { int bitMask = 1 << i; boolean bitIsSet = (bitmap & bitMask) != 0; sb.append( bitIsSet ? "1" : "0" ); if ( i > 0 && i % 8 == 0 ) { sb.append( "," ); } } sb.append( "]" ); return sb.toString(); } ---- And a quick test to check it works: [source,java] ---- @Test public void shouldInspectBits() { System.out.println(asString( 0x00000001 )); // [00000000,00000000,00000000,00000001] System.out.println(asString( 0x80000000 )); // [10000000,00000000,00000000,00000000] System.out.println(asString( 0xA0 )); // [00000000,00000000,00000000,10100000] System.out.println(asString( 0xFFFFFFFF )); // [11111111,11111111,11111111,11111111] } ---- Neat!
null
null
[ 0.00395077234134078, -0.02919691614806652, -0.019049420952796936, 0.03677860274910927, 0.07995118200778961, 0.020624671131372452, 0.03565485402941704, 0.010117104277014732, -0.0007942817755974829, -0.005632353015244007, -0.028326740488409996, -0.004769861698150635, -0.05900485813617706, 0.03446468338370323, -0.015145274810492992, 0.05548308789730072, 0.07609439641237259, -0.009516737423837185, 0.030190205201506615, -0.026663271710276604, 0.013612911105155945, 0.02469545044004917, 0.004779495764523745, 0.03265584632754326, 0.02210131101310253, 0.0236643198877573, -0.01339112687855959, 0.0029296288266777992, -0.045056771486997604, 0.0032222738955169916, 0.038739241659641266, 0.01472470723092556, 0.027165446430444717, -0.00002084142943203915, 0.015990646556019783, -0.026895377784967422, -0.04354248568415642, -0.004270716570317745, 0.0013963556848466396, 0.012417432852089405, -0.051295291632413864, 0.04142013192176819, 0.01463827770203352, 0.03142949193716049, -0.06199609488248825, -0.013567924499511719, -0.05152986943721771, 0.018262609839439392, 0.0038160996045917273, 0.011800303123891354, -0.07649515569210052, 0.04209271818399429, -0.03472435474395752, 0.03174424171447754, 0.015550829470157623, 0.05520002171397209, 0.03624529391527176, -0.06935663521289825, 0.03512629121541977, -0.04438410699367523, -0.012209505774080753, -0.029051028192043304, -0.012431926093995571, 0.01569499261677265, -0.013727166689932346, -0.03479951620101929, -0.017708562314510345, 0.06615933030843735, -0.0482352189719677, -0.019581608474254608, -0.0012314474442973733, 0.01945401541888714, -0.0038463810924440622, -0.01580074243247509, 0.003181508742272854, -0.06429208815097809, 0.014487164095044136, 0.05232914537191391, 0.007676515728235245, 0.044743288308382034, -0.033226147294044495, 0.02099168859422207, 0.04500037431716919, 0.01897413469851017, 0.017597412690520287, -0.041514307260513306, -0.03557989001274109, -0.026472605764865875, -0.049998894333839417, 0.045402832329273224, -0.0027889576740562916, -0.04794110357761383, -0.008046332746744156, 0.010621163994073868, -0.03351299837231636, 0.006174788344651461, -0.004004055634140968, -0.0039474451914429665, 0.02839372120797634, -0.008944952860474586, -0.019228504970669746, -0.025003960356116295, 0.012401368468999863, 0.005694668274372816, -0.08268415927886963, -0.016963696107268333, -0.018441716209053993, -0.035367004573345184, 0.023276951164007187, -0.001445100991986692, -0.035158637911081314, -0.0044674500823020935, -0.003305169055238366, 0.001442554173991084, -0.07334975898265839, 0.056593265384435654, -0.001691589830443263, -0.018954280763864517, -0.026991238817572594, 0.03748704865574837, 0.06842731684446335, 0.028992945328354836, -0.019795948639512062, 0.08279028534889221, 0.0060701509937644005, 0.023984503000974655, -0.0010748207569122314, 0.06812983751296997, -0.003235143143683672, -0.05922391265630722, -0.032048549503088, 0.06067560613155365, 0.008315123617649078, -0.0025117150507867336, -0.00389463035389781, -0.028343308717012405, -0.02322067692875862, -0.005367915146052837, 0.0381055623292923, 0.017484625801444054, 0.0067665064707398415, -0.04961295425891876, 0.026447119191288948, -0.025646576657891273, 0.023687321692705154, 0.0038012233562767506, -0.036400336772203445, -0.015381911769509315, -0.005622582510113716, 0.010024672374129295, -0.008921955712139606, 0.046220600605010986, 0.04359837621450424, -0.02539251372218132, 0.0007826762739568949, 0.07912500202655792, -0.001906202407553792, 0.026241067796945572, -0.017064813524484634, 0.02618272602558136, 0.0464000478386879, 0.004711376037448645, 0.01964319683611393, 0.03800748288631439, 0.009615929797291756, 0.0018692637095227838, 0.011488444171845913, 0.07771347463130951, -0.022998129948973656, 0.0163788553327322, -0.033952318131923676, -0.035718634724617004, 0.05048641189932823, -0.039876535534858704, -0.00489736208692193, 0.023609329015016556, 0.04759596288204193, -0.00013491581194102764, 0.04307742789387703, -0.01412894856184721, -0.07100897282361984, 0.02763666957616806, 0.01974489539861679, 0.010484202764928341, 0.006417056545615196, 0.0018233874579891562, 0.06367737799882889, 0.04115043208003044, 0.01727430336177349, 0.023973161354660988, -0.09103628247976303, -0.07838263362646103, -0.008841168135404587, -0.008295251056551933, 0.07246697694063187, -0.006369907408952713, 0.023517323657870293, 0.0029000546783208847, -0.010906423442065716, 0.02126973308622837, 0.0333937332034111, -0.01522002462297678, 0.02016538567841053, -0.02855742536485195, -0.03448665887117386, 0.06319817155599594, 0.040666963905096054, -0.05333518609404564, -0.03773808106780052, 0.02785506099462509, 0.0007410976686514914, 0.010999555699527264, 0.03203263506293297, -0.03071528673171997, 0.039231378585100174, 0.023252246901392937, 0.024520233273506165, -0.012595153413712978, 0.038609281182289124, -0.05360686406493187, 0.021481310948729515, 0.0278792604804039, -0.03408900275826454, 0.00966355949640274, 0.02293499745428562, 0.13073104619979858, 0.058828845620155334, -0.042650770395994186, -0.04342861846089363, 0.02075372450053692, 0.0062101236544549465, -0.05590365082025528, 0.005614235997200012, -0.0042432560585439205, 0.0136953704059124, 0.012701022438704967, -0.035250432789325714, -0.010886355303227901, 0.02368571236729622, -0.03950415179133415, 0.0027291656006127596, 0.05676394701004028, -0.03490028902888298, 0.058039937168359756, 0.01158022042363882, 0.00788565631955862, 0.011914846487343311, -0.05021379888057709, -0.06022370606660843, 0.027728261426091194, 0.007974332198500633, -0.013887327164411545, 0.06038253754377365, -0.027331937104463577, -0.02526741288602352, -0.03151300922036171, -0.010649263858795166, 0.031116291880607605, 0.050674378871917725, 0.05190961807966232, -0.018145330250263214, 0.01610414870083332, -0.034003324806690216, -0.008388949558138847, -0.03566262125968933, -0.04447263106703758, -0.033168718218803406, -0.010886982083320618, 0.04365333914756775, 0.010376046411693096, 0.014147927053272724, 0.008031210862100124, 0.03907543420791626, 0.012814597226679325, -0.006951291114091873, -0.036635130643844604, 0.053266871720552444, 0.015426820144057274, -0.010810673236846924, -0.027079463005065918, -0.02126173861324787, 0.056675687432289124, -0.06365944445133209, -0.03896283730864525, -0.005372281651943922, -0.04855616018176079, 0.07188902050256729, -0.06455159932374954, -0.04255281388759613, 0.004840128589421511, 0.035519178956747055, 0.050340548157691956, -0.0005284622893668711, 0.020310919731855392, 0.09362360090017319, -0.005899019539356232, 0.010509696789085865, -0.0009849091293290257, -0.009616863913834095, 0.02170434594154358, -0.009897543117403984, 0.0426865853369236, 0.011466708965599537, -0.007076782640069723, -0.007948231883347034, -0.013242498971521854, 0.011129357852041721, -0.010500464588403702, -0.27302971482276917, 0.0674952045083046, -0.03792108967900276, -0.05570923909544945, 0.024488557130098343, -0.04323679208755493, -0.004096658900380135, -0.023483527824282646, -0.018954172730445862, 0.02232678048312664, -0.025801613926887512, -0.047474414110183716, -0.021446147933602333, 0.05284641683101654, 0.01601674221456051, -0.00025115712196566164, -0.02892586588859558, -0.04762370139360428, -0.0004466037207748741, 0.04378503933548927, 0.017398178577423096, -0.05722358450293541, 0.01889199949800968, 0.03160007297992706, 0.018212102353572845, 0.052448712289333344, -0.09354192018508911, 0.02226237580180168, -0.03761563077569008, -0.03337346762418747, -0.011719043366611004, -0.015675701200962067, 0.02374686673283577, -0.0013568239519372582, -0.022572075948119164, 0.008332744240760803, 0.010794548317790031, 0.017747048288583755, 0.0012171767884865403, 0.052570492029190063, -0.05008113011717796, -0.06771010905504227, -0.009121611714363098, -0.001681012217886746, 0.09222313016653061, -0.0005284952349029481, -0.07049769908189774, -0.030621152371168137, -0.022370383143424988, 0.06836624443531036, -0.026096301153302193, -0.027913397178053856, -0.004209915176033974, 0.03732117637991905, -0.029169168323278427, -0.02605116181075573, -0.008574619889259338, -0.002942664548754692, -0.04531931132078171, -0.033098798245191574, -0.0007152229663915932, -0.0453600138425827, 0.015361228957772255, -0.04777226224541664, 0.0023559769615530968, -0.05555156245827675, -0.07642368972301483, 0.002131595043465495, 0.05697624385356903, 0.012339072301983833, -0.011287073604762554, 0.037764620035886765, 0.0028699871618300676, -0.1029757484793663, -0.04219741001725197, -0.03001357987523079, -0.01483937632292509, -0.027914132922887802, 0.002659526187926531, 0.04562690109014511, -0.04461902379989624, -0.051277875900268555, 0.02791360206902027, 0.028519265353679657, 0.03601809963583946, -0.02884390391409397, 0.0038760127499699593, -0.04290067031979561, -0.021885400637984276, 0.004422743339091539, 0.07030528783798218, -0.01410280168056488, -0.033381085842847824, -0.03237610310316086, 0.019386131316423416, 0.038280319422483444, 0.015515336766839027, -0.003973736427724361, 0.01814144290983677, 0.03844400867819786, 0.0597882904112339, -0.03534065559506416, 0.01924217864871025, -0.022649196907877922, -0.020184924826025963, -0.007154595106840134, -0.04044010490179062, 0.015435420908033848, 0.03170398622751236, 0.0045335376635193825, -0.005507009103894234, -0.004378440789878368, 0.025652101263403893, -0.04009034112095833, -0.03164811059832573, -0.02120095305144787, 0.005067610647529364, 0.017434921115636826, 0.054762102663517, -0.02448400668799877, -0.023298537358641624, 0.019884830340743065, 0.0483170710504055, -0.0006539414753206074, -0.04940829426050186, -0.04136502370238304, -0.055832840502262115, -0.01562267541885376, -0.0031548645347356796, 0.0056290049105882645, 0.00423356844112277, 0.04368981346487999, 0.0008047487353906035, -0.019487155601382256, 0.036540113389492035, 0.004007790703326464, -0.01803014986217022, -0.03561488166451454, -0.0008955829543992877, -0.00480374600738287, 0.0125723946839571, 0.009483234025537968, 0.0017652623355388641, 0.04171282425522804, 0.012213247828185558, 0.005589401349425316, 0.02304714359343052, -0.02409122884273529, 0.018473802134394646, -0.008156858384609222, -0.001415515667758882, -0.04662711173295975, 0.02013510651886463, -0.05269593745470047, -0.035459667444229126, -0.0071942671202123165, 0.05283418297767639, -0.0248360987752676, -0.020381160080432892, -0.02641834132373333, 0.04613552615046501, -0.04345346987247467, 0.00989057868719101, -0.021700328215956688, 0.0010755870025604963, 0.06186732277274132, -0.02273767814040184, 0.022067835554480553, -0.03537996485829353, 0.0015745338751003146, 0.010050579905509949, 0.00650379341095686, -0.030224788933992386, 0.027513403445482254, 0.019209785386919975, 0.0038960673846304417, -0.0012224609963595867, 0.02219025231897831, 0.01629616878926754, 0.02148003876209259, 0.013819114305078983, -0.005411702673882246, 0.020799947902560234, -0.0005020230310037732, 0.05506665259599686, 0.03578060120344162, -0.008842895738780499, 0.007409051060676575, -0.03596000745892525, -0.010292238555848598, -0.01581297069787979, -0.01722586341202259, -0.03102049045264721, 0.04755066707730293, -0.039019495248794556, -0.07699192315340042, 0.023676779121160507, 0.009593983180820942, 0.010337753221392632, 0.0380697138607502, 0.022415293380618095, -0.001358760753646493, -0.020932534709572792, 0.03882283344864845, 0.06311545521020889, -0.057337455451488495, 0.014280608855187893, 0.01570354588329792, 0.007438378874212503, 0.006213642656803131, 0.006622384302318096, -0.054699111729860306, -0.015426303260028362, -0.031319085508584976, 0.011629008688032627, -0.024797668680548668, -0.04328364133834839, -0.011272761039435863, -0.0037445183843374252, -0.025224817916750908, 0.0036860343534499407, 0.009720370173454285, 0.001730274991132319, -0.03277994692325592, -0.004566409159451723, 0.03879071772098541, -0.03514429181814194, -0.00044851022539660335, 0.016678566113114357, -0.03340069204568863, 0.002029651077464223, -0.013888310641050339, 0.0218768659979105, 0.023543475195765495, -0.015098543837666512, -0.01892728917300701, -0.06806732714176178, 0.024809326976537704, -0.008573886938393116, 0.06520666182041168, -0.008768672123551369, -0.006634662859141827, -0.039167363196611404, 0.02912430465221405, -0.04786347970366478, 0.017165636643767357, -0.003933474887162447, -0.02900288626551628, 0.006308159790933132, 0.03382248058915138, -0.0025041254702955484, 0.0490560345351696, 0.0014031862374395132, -0.02992674708366394, 0.06132883206009865, -0.02527877502143383, -0.03890199959278107, -0.01852967031300068, -0.04743991792201996, -0.002893715864047408, 0.002142690122127533, 0.018523575738072395, -0.020811129361391068, 0.05939352884888649, 0.061695631593465805, 0.015935178846120834, -0.006411528680473566, -0.01650928519666195, 0.029836786910891533, -0.025560399517416954, -0.012644619680941105, -0.06330029666423798, 0.013325567357242107, 0.0513007789850235, 0.021903760731220245, 0.0028609787113964558, -0.031424298882484436, -0.027965305373072624, -0.015823926776647568, -0.06961764395236969, -0.024677898734807968, 0.03366154804825783, -0.002016955753788352, 0.01866740919649601, -0.005453083664178848, -0.07397700846195221, -0.007565815933048725, 0.02044801600277424, -0.037983670830726624, -0.0388711579144001, -0.04924098402261734, 0.04227546602487564, -0.01829369179904461, 0.033030733466148376, -0.02640223316848278, -0.020207995548844337, 0.046648457646369934, 0.0248500257730484, 0.07046134024858475, 0.049927327781915665, -0.021591894328594208, 0.04038272798061371, 0.043397217988967896, 0.008932173252105713, -0.017409825697541237, 0.014768695458769798, -0.017866546288132668, -0.07309526205062866, -0.004784508608281612, -0.006160087417811155, -0.027728987857699394, -0.041786909103393555, 0.05840351805090904, 0.014759989455342293, -0.033259499818086624, -0.04439098387956619, 0.04664691537618637, -0.03295440226793289, -0.021138625219464302, -0.053599387407302856, 0.0037734340876340866, -0.05041620507836342, 0.06086057797074318, -0.008703206665813923, 0.003043314442038536, 0.08440995216369629, -0.019907698035240173, -0.0032006660476326942, 0.0022878365125507116, 0.10393897444009781, 0.07376686483621597, 0.03770839422941208, 0.011303218081593513, 0.06088948994874954, -0.018073732033371925, -0.029465647414326668, -0.018560295924544334, -0.016099365428090096, -0.02293654903769493, 0.018743351101875305, 0.02078636735677719, 0.06734279543161392, -0.04563676565885544, 0.07768095284700394, -0.05453291907906532, 0.0020328040700405836, 0.0043651931919157505, 0.0071779703721404076, 0.020121362060308456, 0.06692684441804886, 0.026401972398161888, 0.02786349132657051, -0.03737737983465195, -0.03958877548575401, 0.02813669480383396, -0.016370490193367004, -0.028465241193771362, 0.024219853803515434, -0.0027630962431430817, 0.004292870406061411, 0.012195808812975883, 0.02476176992058754, 0.09099157154560089, -0.017602108418941498, -0.013464781455695629, 0.01128308568149805, 0.01752554252743721, -0.006316644139587879, 0.0037097556050866842, -0.025730036199092865, -0.019117753952741623, -0.018881652504205704, -0.027899159118533134, -0.02264023758471012, -0.0075148772448301315, -0.037929609417915344, 0.011477876454591751, -0.025249071419239044, -0.009204050526022911, -0.0035979433450847864, -0.01668238453567028, -0.03543027490377426, -0.06756041198968887, -0.05703646317124367, -0.03855324164032936, -0.0832165852189064, 0.0027245646342635155, -0.0004148708831053227, -0.0057893251068890095, -0.03455732762813568, 0.0031716814264655113, -0.028610095381736755, -0.035675980150699615, 0.0831170529127121, -0.05233440175652504, -0.013400627300143242, 0.02966613508760929, 0.02051929198205471, 0.021191058680415154, 0.042724307626485825, 0.05383354425430298, -0.005298609379678965, 0.010955006815493107, -0.01910669170320034, -0.023974403738975525, 0.05046626552939415, 0.05098951235413551, -0.00542306387796998, -0.08784054219722748, 0.0008066613809205592, 0.04232856631278992, -0.014546954073011875, -0.0724918320775032, -0.02115347422659397, 0.03956861421465874, 0.01018099207431078, 0.04340112581849098, -0.01925012841820717, -0.016758129000663757, -0.01979931816458702, 0.013904161751270294, -0.005078102927654982, -0.015461310744285583, 0.04928228259086609, -0.04352893680334091, 0.08251205086708069, 0.03562863916158676, -0.03937259688973427, -0.018781861290335655, -0.01441317331045866, -0.01664416678249836, 0.0026921150274574757, -0.0471220463514328, -0.03097212128341198, -0.03084360435605049, -0.08579089492559433, -0.0062034595757722855, 0.015379262156784534, -0.019794585183262825, -0.028008390218019485, 0.02595647983253002, 0.06999709457159042, -0.020655443891882896, 0.028540972620248795, -0.03499174490571022, 0.05489768460392952, -0.03139085695147514, -0.01725691184401512, -0.021652132272720337, 0.012319856323301792, -0.023558761924505234, 0.008907285518944263, 0.022127503529191017, -0.039395593106746674, 0.002406728221103549, -0.017175372689962387, 0.031745631247758865, 0.050838351249694824, 0.014313566498458385, 0.014965040609240532 ]
[ -0.09613166004419327, -0.03044053725898266, -0.0427856519818306, -0.051452331244945526, 0.0405106395483017, -0.03209256753325462, -0.00772290863096714, 0.030759023502469063, 0.015232875943183899, -0.012596078217029572, 0.015035034157335758, -0.05992446839809418, -0.014809045940637589, 0.021556098014116287, 0.08101353794336319, -0.014198340475559235, -0.030460407957434654, -0.054905910044908524, 0.00379734393209219, 0.05726701021194458, 0.03347513824701309, -0.039546508342027664, -0.021565403789281845, -0.04321453347802162, 0.015228706412017345, 0.03479833900928497, 0.05117253586649895, -0.03691578656435013, -0.003021560376510024, -0.2272031605243683, 0.007083284668624401, 0.029438605532050133, 0.039662063121795654, -0.04312405362725258, -0.005569675471633673, 0.011547732166945934, 0.014387807808816433, 0.007143787108361721, -0.002613016637042165, 0.03975297510623932, 0.017416851595044136, 0.012763283215463161, -0.05342812091112137, -0.026690714061260223, 0.043331924825906754, 0.017418747767806053, -0.029324263334274292, -0.03167013078927994, -0.00168190139811486, 0.013392875902354717, -0.05707930773496628, 0.023980481550097466, 0.0019395468989387155, -0.001135548111051321, 0.009625968523323536, 0.01524389162659645, 0.04118950292468071, 0.06496868282556534, 0.03444024547934532, 0.013401104137301445, 0.0133329713717103, -0.0028733154758810997, -0.10812640935182571, 0.0726211667060852, 0.030130252242088318, 0.03763569891452789, -0.008960174396634102, -0.029097696766257286, -0.011356042698025703, 0.07800212502479553, 0.03915392979979515, 0.0032151108607649803, -0.02814614027738571, 0.059372805058956146, -0.00861592497676611, -0.0023430439177900553, 0.01561110932379961, 0.029673513025045395, 0.024906395003199577, -0.04084354639053345, -0.07572262734174728, -0.004617368336766958, -0.02080872468650341, -0.009509596973657608, -0.04387523606419563, 0.01585388369858265, -0.017353937029838562, 0.06410786509513855, -0.019911041483283043, 0.03235722333192825, 0.0009819307597354054, 0.03742559254169464, 0.031201334670186043, 0.0041139936074614525, -0.0587211512029171, 0.011533576063811779, -0.01640823297202587, 0.028880545869469643, 0.003845053492113948, 0.4111744165420532, 0.0031342082656919956, -0.030051343142986298, 0.02602090686559677, 0.02952231839299202, 0.0019563683308660984, -0.012258513830602169, -0.012751965783536434, -0.06146480143070221, 0.011363009922206402, -0.018474897369742393, 0.003277909243479371, -0.03277893736958504, 0.058479271829128265, -0.06636670976877213, -0.006381584331393242, 0.008311331272125244, 0.0631808415055275, 0.019503140822052956, -0.01650710217654705, 0.025151386857032776, -0.03938652575016022, 0.013363095000386238, 0.031615592539310455, 0.005668288096785545, 0.04741731286048889, -0.013754586689174175, -0.01292774360626936, 0.04855953902006149, 0.01647648587822914, 0.040546610951423645, 0.04024980217218399, -0.017236128449440002, -0.07478336989879608, 0.006895187310874462, 0.011048277840018272, 0.011662410572171211, 0.027408871799707413, -0.031764134764671326, -0.02022946998476982, 0.0035733391996473074, -0.025464361533522606, -0.02113865688443184, 0.035045940428972244, 0.0061394344083964825, -0.05427524074912071, 0.09849991649389267, -0.021577084437012672, -0.025849469006061554, -0.001952627208083868, -0.0421491414308548, 0.013159273192286491, 0.02559993974864483, -0.01832490600645542, -0.06434553861618042, -0.007244748529046774, 0.025587214156985283, 0.07857713103294373, -0.02377253584563732, -0.0921144112944603, -0.007429121527820826, -0.019541220739483833, -0.010394235141575336, -0.033462610095739365, 0.06665615737438202, 0.047258298844099045, -0.06192346289753914, -0.010487730614840984, 0.01261621993035078, 0.03752879053354263, -0.08828072994947433, 0.00792353693395853, 0.011329940520226955, -0.04930209740996361, -0.028362557291984558, 0.07741740345954895, -0.025437932461500168, -0.016746975481510162, -0.018616551533341408, 0.03319721296429634, 0.019106043502688408, -0.03257736936211586, 0.00009582692291587591, -0.028801769018173218, -0.020555026829242706, -0.041658174246549606, -0.06930849701166153, -0.08963655680418015, 0.020637935027480125, -0.02110062539577484, -0.02704254351556301, 0.0005485066794790328, -0.004501547198742628, -0.08200830966234207, 0.10080462694168091, -0.04007690027356148, -0.05565192922949791, -0.0037979548797011375, 0.01745268888771534, -0.04676014184951782, -0.016637714579701424, 0.032135408371686935, 0.0312548466026783, -0.006015946622937918, 0.03828487917780876, -0.033818647265434265, 0.014251823537051678, 0.08992388844490051, -0.03855225071310997, 0.06530392915010452, 0.064557284116745, -0.02327325940132141, -0.018195664510130882, -0.003830473870038986, 0.017909962683916092, 0.0011733946157619357, -0.04058622196316719, 0.012521844357252121, 0.0018508575158193707, 0.01891648769378662, 0.03090672567486763, -0.048763517290353775, -0.04517614096403122, -0.03207910433411598, -0.35535699129104614, -0.055744461715221405, -0.02031436190009117, -0.02071996033191681, 0.05890175327658653, -0.029047679156064987, 0.024836190044879913, -0.03744630888104439, 0.024921944364905357, -0.0021637894678860903, 0.08480186760425568, -0.028088152408599854, -0.013382396660745144, -0.08812163770198822, -0.015094330534338951, 0.05417896434664726, -0.010669433511793613, -0.023515040054917336, -0.041856538504362106, 0.014352153986692429, -0.009073182940483093, -0.032866470515728, -0.02996879070997238, -0.05027051270008087, -0.026358285918831825, -0.028132164850831032, 0.11243975162506104, -0.013935496099293232, 0.07558804005384445, -0.0325750932097435, 0.026584787294268608, -0.023091858252882957, -0.013503659516572952, -0.060968171805143356, 0.002159061608836055, -0.02081306092441082, 0.007793957367539406, 0.04337950795888901, 0.0010667623719200492, 0.0039037540555000305, -0.06285727769136429, -0.0214589461684227, -0.060577571392059326, -0.04869738593697548, -0.008008957840502262, 0.024324392899870872, -0.03343589976429939, -0.020056113600730896, 0.01902017369866371, 0.055126722902059555, 0.00532968994230032, -0.0002432950568618253, -0.00019809602235909551, 0.03346917778253555, 0.0404670313000679, -0.04011080414056778, -0.06003686040639877, -0.02199575863778591, 0.02508542314171791, 0.02140827104449272, 0.03808311000466347, 0.030607562512159348, 0.0022805912885814905, -0.07245949655771255, 0.009331266395747662, 0.025490567088127136, -0.02018115669488907, -0.01057007722556591, 0.05641273036599159, -0.04109523817896843, -0.023190947249531746, 0.12107212096452713, 0.009996875189244747, 0.0013396291760727763, 0.05709613859653473, 0.0323982760310173, 0.01551190484315157, 0.0016717116814106703, 0.044246260076761246, 0.005856310483068228, 0.03465879708528519, -0.005949067417532206, 0.06490284949541092, -0.03731020167469978, -0.02585010603070259, 0.05795429274439812, 0.021705372259020805, -0.020000170916318893, 0.048968032002449036, 0.009102989919483662, -0.015749525278806686, 0.010345094837248325, -0.00943172350525856, -0.06555862724781036, 0.04635435715317726, -0.031177107244729996, -0.2639610469341278, 0.039225101470947266, 0.023183517158031464, 0.06399325281381607, -0.0068983715027570724, -0.0031574673485010862, 0.047005124390125275, -0.04034300148487091, -0.020213667303323746, -0.00015200377674773335, 0.009119255468249321, 0.04760362580418587, 0.0046089994721114635, -0.017629142850637436, 0.031475674360990524, -0.024845745414495468, 0.00875184591859579, 0.009695131331682205, 0.04160916060209274, 0.009607606567442417, 0.033617228269577026, 0.007861096411943436, 0.18598370254039764, 0.028460422530770302, 0.022587379440665245, 0.043870288878679276, -0.014347714371979237, 0.03142707794904709, 0.07351885735988617, 0.007699435111135244, -0.017065484076738358, 0.03848975524306297, 0.04138227552175522, 0.012966874055564404, 0.00953578669577837, -0.032357022166252136, -0.02813073992729187, 0.05964541807770729, 0.027759740129113197, -0.009299403987824917, 0.02305411361157894, 0.03669406473636627, -0.06175246462225914, 0.04666176438331604, 0.08428244292736053, -0.00728028267621994, 0.0010565462289378047, 0.0028594299219548702, -0.046921152621507645, -0.016488272696733475, -0.03077320195734501, -0.01981499046087265, -0.012148149311542511, -0.029569346457719803, -0.0011624412145465612, 0.09089883416891098, -0.004888672381639481, -0.04601164162158966, 0.0005700027686543763, 0.018713099882006645, -0.0020123745780438185, -0.05174386501312256, 0.08729230612516403, -0.0020535553339868784, -0.01731548272073269 ]
[ 0.059978920966386795, 0.06511235237121582, -0.022170955315232277, 0.002078667748719454, -0.0425683856010437, -0.04817477613687515, 0.005735167767852545, 0.03048672527074814, -0.03316931053996086, 0.006982375402003527, -0.06249932572245598, 0.0032802764326334, 0.056032247841358185, -0.012435917742550373, -0.022909358143806458, -0.001457899808883667, -0.001963449874892831, 0.052655063569545746, 0.010594301857054234, -0.018532050773501396, -0.018910223618149757, 0.016747286543250084, 0.052166953682899475, -0.03749924525618553, 0.007217315956950188, 0.03442780673503876, 0.006902168970555067, -0.005232463125139475, 0.015347180888056755, -0.1372397541999817, -0.0289109256118536, 0.00047545452252961695, 0.004392681643366814, -0.006911361590027809, -0.024674445390701294, 0.0249736737459898, 0.013689367100596428, 0.006606904324144125, 0.00045586362830363214, 0.02707999385893345, -0.007213654927909374, -0.0004535485932137817, -0.01684584654867649, 0.02184978500008583, 0.01650383695960045, -0.007255252450704575, 0.0007294205133803189, -0.015856139361858368, 0.03527216613292694, -0.012994254007935524, -0.03375375643372536, 0.0276743546128273, 0.0028866876382380724, 0.02971523441374302, -0.00801014993339777, -0.04592311009764671, -0.029188241809606552, -0.002330765826627612, -0.012926846742630005, 0.02522955648601055, 0.0045072296634316444, -0.00016551659791730344, -0.03104597143828869, -0.03613528236746788, -0.017308559268712997, -0.020369313657283783, 0.04045034572482109, 0.02042388916015625, 0.007420568726956844, -0.021996155381202698, -0.01070353202521801, 0.06284542381763458, -0.06515229493379593, 0.025886526331305504, -0.03198470175266266, 0.028870172798633575, 0.05165085941553116, -0.006943503860384226, 0.01751040108501911, -0.012157224118709564, -0.020096054300665855, -0.0009938955772668123, 0.03038959763944149, -0.004948657937347889, -0.021546728909015656, -0.002176175592467189, -0.002800594549626112, 0.008094342425465584, 0.008284097537398338, 0.03803890198469162, -0.036753833293914795, 0.02686164714396, -0.030394859611988068, -0.03913483768701553, -0.061812128871679306, 0.00294443778693676, -0.021813543513417244, -0.012844457291066647, 0.012745240703225136, 0.806639552116394, -0.012151946313679218, -0.006824375595897436, -0.007829418405890465, -0.003923344425857067, -0.006261343136429787, 0.009981303475797176, -0.011488828808069229, 0.013022045604884624, -0.022416977211833, -0.03484201803803444, 0.000817102612927556, -0.017642678692936897, 0.020881570875644684, -0.004271870478987694, 0.025125322863459587, 0.0076687149703502655, 0.002999807707965374, 0.04403003305196762, -0.002674364484846592, 0.004164055921137333, -0.0047088204883039, 0.004589558113366365, -0.014324831776320934, 0.015245554968714714, -0.008154697716236115, -0.14141054451465607, -0.027931947261095047, -7.063250211135482e-33, 0.03427961841225624, -0.010853604413568974, 0.025074228644371033, 0.0211565513163805, 0.006928018294274807, 0.015931248664855957, 0.01876264251768589, 0.0025168797001242638, -0.007280832156538963, -0.031968533992767334, 0.007161466404795647, -0.008390654809772968, 0.019266841933131218, -0.015673331916332245, 0.020157476887106895, -0.00997897144407034, 0.005491742864251137, -0.021446943283081055, -0.03392321616411209, 0.010014978237450123, -0.0071531981229782104, 0.030009424313902855, -0.023539984598755836, -0.0013732342049479485, 0.02475580759346485, 0.006854726001620293, 0.03074079193174839, -0.025009555742144585, 0.015503759495913982, -0.051243603229522705, -0.05069085210561752, 0.006792898755520582, -0.016258714720606804, -0.04720151796936989, 0.05690779909491539, -0.07278435677289963, 0.0007410867256112397, 0.028871839866042137, -0.04985218867659569, -0.06074115261435509, -0.03335484862327576, -0.013439245522022247, -0.014237909577786922, -0.02607324905693531, -0.004825254436582327, -0.018017776310443878, -0.013724452815949917, 0.05072407051920891, 0.005139876622706652, 0.027236705645918846, 0.025287650525569916, 0.041796498000621796, -0.011100063100457191, -0.013507228344678879, -0.02280392125248909, -0.014789331704378128, 0.03582626208662987, 0.005045974627137184, -0.02678297646343708, 0.07064124941825867, 0.003929161466658115, 0.0416640043258667, 0.006417867727577686, 0.03678571432828903, 0.0020814540330320597, 0.016160449013113976, 0.017969898879528046, -0.009420356713235378, -0.014176939614117146, 0.051830045878887177, -0.05543128401041031, 0.010631181299686432, 0.008193418383598328, -0.017702078446745872, -0.03392860293388367, -0.04237959161400795, -0.02406662330031395, -0.0252512376755476, -0.019402654841542244, -0.005806066561490297, -0.0024271958973258734, -0.03960921987891197, 0.03292769193649292, -0.03653860464692116, -0.008795780129730701, 0.00001287616032641381, 0.027485672384500504, -0.011305357329547405, 0.04964509233832359, 0.009313889779150486, 0.055614981800317764, 0.01416572742164135, 0.0023777743335813284, -0.005700245033949614, -0.023392779752612114, 6.552816768545858e-33, -0.027809586375951767, -0.0043420447036623955, -0.028672343119978905, 0.020964499562978745, -0.012489275075495243, -0.002221258357167244, 0.05155587196350098, 0.010928460396826267, -0.03453534469008446, 0.05932752415537834, -0.0038626331370323896, 0.01052300538867712, 0.01328726764768362, 0.026361122727394104, 0.09388995170593262, -0.04059234634041786, 0.009081308729946613, -0.02421688288450241, 0.02852107211947441, 0.050654251128435135, -0.024525107815861702, 0.02922503463923931, 0.030062036588788033, 0.011941834352910519, 0.04497097432613373, 0.024682385846972466, -0.030489763244986534, 0.03738098591566086, -0.02432887628674507, 0.004225905053317547, 0.04489430412650108, -0.05188475921750069, -0.006604663096368313, -0.0500011146068573, 0.012552052736282349, -0.001607234007678926, 0.03327840939164162, -0.022347524762153625, 0.035968441516160965, 0.02620091661810875, 0.016909677535295486, -0.03656040132045746, -0.03752995654940605, 0.05819833651185036, -0.008806491270661354, -0.009840807877480984, -0.0008905329159460962, 0.03973211720585823, 0.0036038535181432962, -0.03366033360362053, 0.023457268252968788, 0.028636718168854713, 0.0003811714123003185, -0.003463927423581481, 0.03419780358672142, -0.024540862068533897, -0.05909143388271332, 0.011500861495733261, 0.03427058085799217, 0.0330013707280159, -0.03678987920284271, -0.06207100301980972, 0.029270458966493607, 0.009217449463903904, -0.013422515243291855, -0.015780597925186157, -0.020638825371861458, -0.048165738582611084, -0.038671236485242844, 0.023556234315037727, 0.0009954569395631552, -0.01856732927262783, -0.004984328988939524, 0.05522550642490387, -0.0012171808630228043, -0.005946482997387648, -0.03752594441175461, 0.019449831917881966, -0.037508100271224976, 0.05047683045268059, 0.020396091043949127, 0.039826586842536926, -0.023127634078264236, 0.008158980868756771, 0.01573500595986843, -0.007657177280634642, -0.021395578980445862, 0.01217006053775549, -0.034007396548986435, -0.035946350544691086, 0.006265383213758469, 0.024643147364258766, -0.010030914098024368, 0.04553023353219032, -0.003724008100107312, -1.222534429246025e-8, 0.025108495727181435, -0.016539305448532104, -0.035301219671964645, 0.002988311229273677, 0.05129299685359001, -0.007600291632115841, -0.05158162862062454, -0.011324671097099781, -0.0019683230202645063, 0.011227576062083244, 0.027030739933252335, 0.0002970517671201378, -0.010242859832942486, -0.009186666458845139, 0.03570680320262909, -0.0338091216981411, 0.02885022573173046, -0.04315583035349846, 0.022912761196494102, 0.017785554751753807, 0.04147300869226456, -0.0018953023245558143, -0.0347062312066555, 0.026933422312140465, 0.015244761481881142, -0.03694074600934982, 0.07562442123889923, -0.05690743401646614, 0.018974309787154198, -0.014693433418869972, 0.007215287070721388, -0.00889599695801735, -0.0016974012833088636, 0.030353881418704987, -0.02221953310072422, -0.03217201307415962, 0.023522621020674706, 0.06488911807537079, 0.016398953273892403, 0.019245527684688568, -0.024490097537636757, -0.0134035125374794, -0.030010145157575607, -0.025798946619033813, -0.031521257013082504, -0.01907402090728283, -0.028199702501296997, -0.023935383185744286, 0.015643946826457977, -0.012713049538433552, -0.039869893342256546, 0.03703366592526436, 0.01110665313899517, 0.03884129598736763, 0.03435277193784714, -0.010145372711122036, -0.01737986132502556, -0.0488833412528038, -0.02106481045484543, 0.05281849950551987, -0.005033225752413273, -0.01631919853389263, -0.04862981289625168, -0.01746186427772045 ]
coding-visualising-a-bitmap
https://markhneedham.com/blog/2015/05/03/coding-visualising-a-bitmap
false
2015-05-04 09:56:22
Neo4j: LOAD CSV - java.io.InputStreamReader there's a field starting with a quote and whereas it ends that quote there seems to be character in that field after that ending quote. That isn't supported.
[ "neo4j", "cypher" ]
[ "neo4j" ]
I recently came across the http://www.dtic.upf.edu/~ocelma/MusicRecommendationDataset/lastfm-360K.html[last.fm dataset] via http://www.benfrederickson.com/distance-metrics/[Ben Frederickson's blog] and thought it'd be an interesting one to load into Neo4j and explore. I started with a simple query to parse the CSV file and count the number of rows: [source,cypher] ---- LOAD CSV FROM "file:///Users/markneedham/projects/neo4j-recommendations/lastfm-dataset-360K/usersha1-artmbid-artname-plays.tsv" AS row FIELDTERMINATOR "\t" return COUNT(*) At java.io.InputStreamReader@4d307fda:6484 there's a field starting with a quote and whereas it ends that quote there seems to be character in that field after that ending quote. That isn't supported. This is what I read: 'weird al"' ---- This blows up because (as the message says) we've got a field which uses double quotes but then has other characters either side of the quotes. A quick search through the file reveals one of the troublesome lines: [source,bash] ---- $ grep "\"weird" lastfm-dataset-360K/usersha1-artmbid-artname-plays.tsv | head -n 1 0015371426d2cbef354b2f680340de38d0ebd2f0 7746d775-9550-4360-b8d5-c37bd448ce01 "weird al" yankovic 4099 ---- I ran a file containing only that line through http://csvlint.io/validation/55473958637376058f000000[CSV Lint] to see what it thought and indeed it is invalid: image::{{<siteurl>}}/uploads/2015/05/2015-05-04_10-50-43.png[2015 05 04 10 50 43,597] Let's clean up our file to use single quotes instead of double quotes and try the query again: [source,bash] ---- $ tr "\"" "'" < lastfm-dataset-360K/usersha1-artmbid-artname-plays.tsv > lastfm-dataset-360K/clean.tsv ---- [source,cypher] ---- LOAD CSV FROM "file:///Users/markneedham/projects/neo4j-recommendations/lastfm-dataset-360K/clean.tsv" as row FIELDTERMINATOR "\t" return COUNT(*) 17559530 ---- And we're back in business! Interestingly Python's CSV reader chooses to strip out the double quotes rather than throw an exception: [source,python] ---- import csv with open("smallWeird.tsv", "r") as file: reader = csv.reader(file, delimiter="\t") for row in reader: print row ---- [source,bash] ---- $ python explore.py ['0015371426d2cbef354b2f680340de38d0ebd2f0', '7746d775-9550-4360-b8d5-c37bd448ce01', 'weird al yankovic', '4099'] ---- I prefer LOAD CSV's approach but it's an interesting trade off I hadn't considred before.
null
null
[ -0.00671295216307044, -0.03627089038491249, 0.0046431878581643105, 0.027520649135112762, 0.08150766789913177, -0.006625469774007797, 0.02234385721385479, 0.029224293306469917, 0.028366105630993843, -0.014687727205455303, -0.00548304570838809, 0.0035631272476166487, -0.048771169036626816, 0.016235575079917908, 0.008195672184228897, 0.05876518040895462, 0.0379515066742897, 0.015238987281918526, 0.030039161443710327, -0.018726762384176254, 0.0187742467969656, 0.033267855644226074, -0.010811752639710903, 0.03217637166380882, 0.0008383412496186793, -0.015032138675451279, -0.015880731865763664, 0.0016417920123785734, -0.05024933069944382, 0.013338759541511536, 0.02956710383296013, -0.004948971793055534, 0.041867952793836594, -0.0059196678921580315, 0.013749372214078903, 0.03172248601913452, -0.04123234376311302, 0.014283191412687302, -0.009153074584901333, 0.029703812673687935, -0.06171629577875137, 0.01897204853594303, -0.011950036510825157, 0.0312747023999691, -0.045484233647584915, 0.003246583975851536, -0.023466361686587334, 0.0162653848528862, -0.023990148678421974, 0.016379235312342644, -0.05267728492617607, 0.025176620110869408, -0.006423622369766235, -0.0013867533998563886, 0.028395574539899826, 0.03395799174904823, 0.009547773748636246, -0.07679858058691025, 0.06237172335386276, -0.011683311313390732, 0.002889808500185609, -0.04782586172223091, -0.013521889224648476, 0.0185753982514143, 0.01155033428221941, -0.047530535608530045, 0.0002508671022951603, 0.07160387188196182, -0.051713429391384125, -0.02912837266921997, 0.001176401972770691, 0.03575725853443146, -0.007279696874320507, -0.03332808241248131, -0.008723382838070393, -0.05352079123258591, -0.004408716689795256, 0.03084220178425312, 0.02363784983754158, 0.06923655420541763, -0.07750631868839264, 0.010429253801703453, 0.018211886286735535, 0.0018483601743355393, 0.004651313181966543, -0.055788442492485046, -0.014998098835349083, -0.024170847609639168, -0.03915134817361832, 0.027545511722564697, 0.0278933048248291, -0.04482657462358475, 0.003862075973302126, 0.005128152202814817, -0.008654104545712471, 0.015461783856153488, -0.021627122536301613, 0.0074798669666051865, -0.03171037510037422, -0.024564117193222046, -0.07575534284114838, -0.023101970553398132, -0.007897715084254742, 0.03377954289317131, -0.07176905125379562, -0.014412379823625088, -0.005208850838243961, 0.009785555303096771, 0.034836240112781525, 0.009277707897126675, -0.03979905694723129, -0.01576979272067547, -0.024895982816815376, -0.005142970941960812, -0.08821047097444534, 0.027242930606007576, 0.030423881486058235, -0.015111466869711876, 0.001672946149483323, 0.05633172765374184, 0.05344177410006523, 0.030559349805116653, -0.007071536500006914, 0.04934275522828102, -0.015817468985915184, 0.027061378583312035, 0.013064460828900337, 0.04181798920035362, -0.005694857332855463, -0.05705689638853073, -0.03833295777440071, 0.05951744690537453, -0.014302332885563374, 0.02372482232749462, 0.012556538917124271, -0.04514509066939354, -0.030564941465854645, 0.01011231355369091, 0.06198917701840401, 0.016338128596544266, 0.019580986350774765, -0.058993883430957794, -0.011325581930577755, 0.010979138314723969, 0.04785459116101265, -0.0007981895469129086, -0.042447660118341446, -0.03586863353848457, -0.02567962557077408, 0.013839003629982471, 0.027018148452043533, 0.044339440762996674, 0.0771486759185791, -0.0034135994501411915, 0.002971925772726536, 0.10454054176807404, 0.03614448755979538, 0.021798569709062576, -0.010118973441421986, 0.025135163217782974, 0.05480336397886276, 0.0674704760313034, 0.006957108620554209, 0.07362712919712067, -0.00154301302973181, -0.028379974886775017, -0.0006319076637737453, 0.05519148334860802, -0.03425178304314613, 0.023033026605844498, -0.04846663028001785, -0.06191714480519295, 0.08613073080778122, -0.026334969326853752, 0.012152902781963348, 0.028840547427535057, 0.07249239832162857, 0.0009227463160641491, 0.021643102169036865, -0.003563028760254383, -0.07719564437866211, 0.0739695280790329, 0.021276930347085, 0.01960800774395466, 0.01181745808571577, 0.023723524063825607, 0.06307600438594818, 0.040860630571842194, 0.002525375923141837, 0.05809323862195015, -0.07739131152629852, -0.0645994171500206, -0.02285630628466606, -0.01090770959854126, 0.04159662500023842, -0.03754303976893425, 0.030821342021226883, 0.0520302876830101, 0.004799232818186283, 0.03507596626877785, 0.0017826856346800923, -0.004946780391037464, 0.03871334344148636, -0.057471852749586105, -0.03867090120911598, 0.07585091888904572, 0.05270244553685188, -0.044432591646909714, -0.012862583622336388, 0.02378159761428833, -0.02714921347796917, 0.017108207568526268, 0.02489854395389557, -0.018496936187148094, 0.021513115614652634, 0.023670298978686333, 0.023774750530719757, -0.0038099875673651695, -0.0010215957881882787, -0.06614786386489868, 0.016144225373864174, 0.01224193349480629, -0.014141127467155457, -0.011217678897082806, -0.061085399240255356, 0.11480925977230072, 0.047184012830257416, -0.005432832986116409, -0.0834975391626358, 0.024309445172548294, 0.013135237619280815, -0.009715291671454906, 0.032516058534383774, 0.009881092235445976, -0.020789911970496178, -0.012183140963315964, -0.01954648643732071, -0.04336037114262581, -0.001423800946213305, -0.020284997299313545, -0.0002232603292213753, 0.05189516395330429, -0.02732672356069088, 0.02572171576321125, -0.0021348746959120035, -0.018901579082012177, 0.009815281257033348, -0.06290633231401443, -0.0647066980600357, 0.021057426929473877, 0.032764140516519547, 0.006375026423484087, 0.047661781311035156, -0.013504245318472385, -0.02997365966439247, -0.019389044493436813, -0.0481155626475811, 0.048400070518255234, 0.05936206132173538, 0.04691236466169357, -0.007834023796021938, 0.04658588767051697, -0.040794067084789276, -0.005038036033511162, -0.03312522917985916, -0.038679175078868866, -0.03310568630695343, -0.021270599216222763, 0.030454080551862717, -0.010709775611758232, 0.0354604534804821, 0.023711837828159332, 0.0007818876183591783, 0.014692978002130985, 0.014536114409565926, -0.004016357474029064, 0.029046647250652313, -0.0036636253353208303, 0.014490338042378426, -0.03864933177828789, -0.022742358967661858, 0.06122925505042076, -0.06661859899759293, -0.04166605323553085, 0.008514889515936375, -0.052883800119161606, 0.026558546349406242, -0.03064621612429619, -0.02219807356595993, 0.005467849317938089, 0.010504566133022308, 0.05294169485569, 0.009915295988321304, 0.010206819511950016, 0.05221462622284889, 0.012120108120143414, 0.031805697828531265, 0.0218092929571867, 0.03602321073412895, 0.07781863212585449, -0.025217674672603607, 0.030584972351789474, 0.05990901589393616, -0.024188365787267685, -0.013254274614155293, -0.0702575072646141, -0.029431384056806564, -0.002074328949674964, -0.26778650283813477, 0.06544522941112518, -0.06125862896442413, -0.05713094025850296, 0.028165096417069435, -0.03366994857788086, 0.014530865475535393, -0.019031565636396408, -0.019667504355311394, 0.0022460129112005234, 0.0037995430175215006, -0.01929387077689171, -0.012757587246596813, 0.045657917857170105, 0.0068202693946659565, 0.009812792763113976, -0.012799105606973171, -0.05482505261898041, 0.005322035867720842, 0.032279886305332184, -0.004512789659202099, -0.037645697593688965, -0.013071796856820583, 0.0548844188451767, 0.0343218557536602, 0.06369666755199432, -0.09235381335020065, 0.020232615992426872, -0.04424472153186798, -0.032249558717012405, -0.0013281757710501552, -0.033780958503484726, 0.001204939209856093, 0.010880479589104652, -0.012862875126302242, -0.02026556432247162, 0.028014082461595535, 0.005232701543718576, 0.0037829286884516478, 0.009250391274690628, -0.04708830267190933, -0.05107031762599945, -0.009291532449424267, -0.030196137726306915, 0.0762944221496582, -0.004935777746140957, -0.07042273133993149, 0.01620367355644703, -0.017766254022717476, 0.06323728710412979, -0.03839986398816109, -0.030192717909812927, -0.024588394910097122, 0.02102171815931797, 0.00005455283826449886, -0.020806213840842247, -0.0018732438329607248, -0.005613218992948532, -0.03561052307486534, -0.022505851462483406, 0.005281906109303236, -0.03273933753371239, -0.0021014800295233727, -0.03791242092847824, -0.04568401351571083, -0.05795770138502121, -0.07434312999248505, -0.02436329424381256, 0.07036731392145157, 0.029423778876662254, -0.025636138394474983, 0.01294879149645567, 0.029320765286684036, -0.11229489743709564, -0.03689495846629143, -0.04787023738026619, -0.006982517894357443, 0.008119102567434311, -0.00006534448766615242, 0.0717087835073471, -0.03963485360145569, -0.04701387882232666, 0.04026290029287338, 0.008785007521510124, 0.0023801762145012617, -0.02017829567193985, -0.003667849116027355, -0.008303437381982803, -0.012802478857338428, -0.00819176435470581, 0.050417836755514145, -0.04501458257436752, -0.02638758160173893, -0.021059967577457428, -0.03248100355267525, 0.04273000732064247, -0.015247750096023083, -0.005425072740763426, 0.02305632270872593, 0.06784997135400772, 0.05516800656914711, -0.057636808604002, -0.009787244722247124, -0.06406553089618683, -0.01463447418063879, -0.043421048671007156, -0.03170514479279518, 0.008597193285822868, -0.0009157450986094773, 0.030636845156550407, 0.0014695761492475867, -0.01986747793853283, 0.011028244160115719, -0.05321625992655754, -0.037946585565805435, -0.016662709414958954, 0.010147491469979286, 0.01444567646831274, 0.03352056443691254, -0.031731799244880676, -0.023531479761004448, 0.01524447649717331, 0.025042328983545303, -0.03128523752093315, -0.045854296535253525, -0.006626768968999386, 0.001065314980223775, -0.01905297301709652, -0.009554911404848099, -0.029290251433849335, -0.04333812743425369, 0.011008177883923054, 0.02143373340368271, 0.010023851878941059, 0.05310200899839401, -0.041891515254974365, -0.02925727516412735, -0.029889976605772972, 0.02918115071952343, -0.023746052756905556, 0.01352123636752367, -0.02739151567220688, 0.004963189363479614, 0.05881591513752937, 0.038194674998521805, 0.0011801297077909112, 0.03222879767417908, -0.005816925782710314, 0.014851872809231281, -0.029790939763188362, 0.0011697993613779545, -0.03132284805178642, 0.023798856884241104, -0.032997164875268936, -0.04610415920615196, -0.007482149172574282, 0.02275325544178486, -0.008932465687394142, 0.0021898639388382435, -0.03808039426803589, 0.03424432501196861, -0.03119313344359398, 0.01164788194000721, 0.002732046414166689, -0.017491301521658897, 0.03978687524795532, 0.008242631331086159, 0.007145662792026997, -0.01901760697364807, 0.022319357842206955, -0.017763720825314522, 0.010252690874040127, -0.02336178347468376, -0.017471782863140106, -0.006009354721754789, 0.023228343576192856, 0.04783414304256439, 0.000974681752268225, 0.029483094811439514, 0.06251854449510574, -0.013560780324041843, -0.021567733958363533, -0.005793110467493534, 0.03489117696881294, 0.03146001324057579, 0.06290388107299805, -0.018006278201937675, -0.009013541042804718, -0.005302983336150646, -0.0071895550936460495, -0.033985789865255356, -0.003863428719341755, -0.03214196488261223, 0.012185015715658665, -0.037777021527290344, -0.039196524769067764, 0.05168285593390465, 0.01931210421025753, 0.028504228219389915, 0.03553393483161926, -0.01689901575446129, 0.0011095923837274313, -0.010227061808109283, 0.020168954506516457, 0.0414748340845108, -0.04959985241293907, 0.003169603878632188, -0.010949505493044853, 0.0029541952535510063, 0.009778817184269428, 0.01424743514508009, -0.06980384886264801, -0.012020616792142391, -0.03470909222960472, 0.033301763236522675, -0.041820622980594635, -0.018479332327842712, -0.03814969211816788, 0.009039762429893017, -0.0029273824766278267, 0.012609345838427544, 0.005578508134931326, 0.01822081208229065, -0.023180820047855377, 0.008503202348947525, 0.029776930809020996, 0.012742117047309875, -0.007958152331411839, -0.005226890556514263, -0.005364818032830954, 0.015325757674872875, -0.023711156100034714, 0.045339107513427734, 0.03327648714184761, -0.024997688829898834, -0.031868502497673035, -0.04321001470088959, 0.03499682992696762, -0.027260303497314453, 0.027579890564084053, 0.014359568245708942, -0.029989248141646385, -0.004122053738683462, 0.020056482404470444, -0.013820893131196499, 0.00031987769762054086, 0.006928771268576384, -0.01615331694483757, 0.008136125281453133, 0.04268479719758034, 0.026418227702379227, 0.023017242550849915, -0.04630121961236, -0.04559463635087013, 0.05294088274240494, -0.003623389406129718, -0.021477457135915756, -0.003474437864497304, -0.049956388771533966, 0.025793395936489105, 0.018386030569672585, 0.003847536165267229, -0.017373496666550636, 0.0530201680958271, 0.046540822833776474, 0.023523613810539246, 0.06435871124267578, -0.005079393275082111, 0.034559741616249084, -0.025729889050126076, -0.043795980513095856, -0.09534936398267746, 0.01603149063885212, 0.02652258239686489, 0.0028187595307826996, -0.008540881797671318, -0.021305745467543602, -0.02356305532157421, -0.010506418533623219, -0.04031497985124588, -0.05533576011657715, 0.02868952788412571, -0.044257208704948425, 0.029299212619662285, 0.01176262367516756, -0.047493234276771545, 0.011994964443147182, 0.046803880482912064, -0.015350393950939178, -0.04453988000750542, -0.03929516673088074, 0.03917881101369858, -0.010424160398542881, 0.01964191533625126, -0.02695535495877266, -0.04094981402158737, 0.06258276104927063, 0.019673408940434456, 0.04996576905250549, 0.03559201955795288, -0.01921897567808628, 0.04365665093064308, 0.0430217981338501, -0.04282386228442192, -0.00038780327304266393, 0.010109652765095234, -0.017431743443012238, -0.03951411321759224, 0.01725890301167965, 0.04051025211811066, -0.00940202921628952, -0.026941247284412384, 0.06346408277750015, 0.018971357494592667, -0.010739246383309364, -0.04470682889223099, 0.0007491536089219153, 0.013256094418466091, -0.01902647502720356, -0.02185342274606228, 0.012230122461915016, -0.051948774605989456, 0.03007648140192032, 0.001475561992265284, 0.027637749910354614, 0.07666736096143723, -0.02956421859562397, 0.009875667281448841, -0.00405987910926342, 0.07629834860563278, 0.09014977514743805, 0.018773581832647324, 0.0014748253161087632, 0.053885214030742645, -0.024118321016430855, -0.032906025648117065, 0.009224108420312405, -0.017408259212970734, 0.001492773648351431, -0.002709013409912586, -0.04045090451836586, 0.0787920206785202, -0.003959110006690025, 0.08597651869058609, -0.02969066984951496, -0.01599048636853695, -0.021309824660420418, -0.002176853595301509, 0.018988672643899918, 0.012476714327931404, -0.017817961052060127, 0.03542685508728027, -0.03280218318104744, -0.030184097588062286, 0.050816088914871216, 0.018451372161507607, -0.02560333162546158, 0.0237798523157835, -0.01614808477461338, -0.002602923661470413, -0.009174110367894173, 0.05220293998718262, 0.06893902271986008, -0.029245909303426743, -0.014706850983202457, 0.006200785282999277, 0.0301359836012125, -0.01922239549458027, 0.022136442363262177, 0.012284192256629467, -0.0029224639292806387, -0.023852862417697906, -0.0390796959400177, -0.0370340570807457, -0.029450779780745506, -0.05402154475450516, 0.0076565793715417385, -0.007327391300350428, -0.0009725380805321038, 0.05527850612998009, -0.026128754019737244, -0.02238251268863678, -0.0419960618019104, -0.026145361363887787, -0.06115691736340523, -0.09672988206148148, -0.012780575081706047, 0.010973170399665833, -0.011852226220071316, -0.026176638901233673, 0.009168160147964954, -0.05612897127866745, -0.007845818065106869, 0.037110429257154465, -0.03487134724855423, -0.018236635252833366, 0.010391478426754475, 0.02884148806333542, 0.01574399322271347, 0.03637530654668808, 0.02014695294201374, 0.0018775345524773002, 0.011208855547010899, 0.007134329993277788, 0.00026582623831927776, 0.05356602743268013, 0.05312094837427139, 0.003509039292111993, -0.07603386789560318, 0.00918249785900116, 0.02147911675274372, -0.022121978923678398, -0.0689430981874466, 0.021793464198708534, 0.049519822001457214, 0.00410622451454401, 0.037771936506032944, -0.014767615124583244, -0.010744837112724781, -0.03269067406654358, -0.022838152945041656, -0.0037687497679144144, -0.011321083642542362, 0.02071714587509632, -0.030549421906471252, 0.06396836787462234, 0.03820646554231644, -0.030979938805103302, -0.012567310594022274, -0.02776910923421383, 0.002094310475513339, 0.02110450714826584, -0.04545306786894798, -0.05507143586874008, -0.07452628761529922, -0.08679278939962387, -0.012130003422498703, 0.018072549253702164, -0.029923854395747185, -0.03690005838871002, 0.020061345770955086, 0.03110860101878643, -0.04678766801953316, 0.010578342713415623, -0.02826973982155323, 0.03293756768107414, -0.0267484188079834, -0.03062119521200657, -0.0452132485806942, 0.03551735728979111, 0.030388496816158295, -0.0049865092150866985, 0.03826873376965523, -0.058068983256816864, 0.02467886172235012, -0.009790943004190922, 0.007243014872074127, 0.05680159479379654, 0.009197279810905457, 0.016110364347696304 ]
[ -0.04332881420850754, -0.00010104831744683906, -0.02085573598742485, -0.032050106674432755, 0.051950015127658844, -0.03621212765574455, -0.0261471476405859, -0.003044437849894166, 0.015438414178788662, -0.04630491882562637, 0.037451114505529404, -0.016785722225904465, -0.002676592208445072, -0.010582365095615387, 0.03357090801000595, -0.02150508016347885, -0.029675908386707306, -0.039324041455984116, -0.010102933272719383, 0.08322751522064209, -0.01683998852968216, -0.029064731672406197, 0.02511795423924923, -0.05528358370065689, 0.00006381798448273912, 0.037108130753040314, 0.010547246783971786, -0.04353899508714676, -0.03424746170639992, -0.20627030730247498, -0.006660634186118841, -0.005757468752563, 0.017133764922618866, -0.017254607751965523, -0.0021351445466279984, 0.005799719598144293, 0.03961889445781708, -0.04405335336923599, 0.029955077916383743, 0.044878773391246796, 0.00463837431743741, -0.005971135105937719, -0.05872887372970581, 0.009721051901578903, 0.012900608591735363, 0.019972164183855057, -0.02778030000627041, -0.012650243006646633, -0.013553754426538944, 0.045389123260974884, -0.01925596222281456, 0.022892843931913376, -0.016900911927223206, 0.02560778707265854, 0.015138891525566578, 0.03679029271006584, 0.03377479314804077, 0.07755634188652039, 0.008812081068754196, 0.008509907871484756, -0.01612553931772709, 0.0025684614665806293, -0.14479921758174896, 0.07722354680299759, -0.015735100954771042, -0.012043602764606476, -0.06188720464706421, -0.01822582632303238, -0.06490661203861237, 0.04645047336816788, 0.00944228284060955, -0.020173225551843643, -0.047232042998075485, 0.09054611623287201, -0.01360571850091219, 0.03328714147210121, -0.028205150738358498, 0.023780126124620438, 0.023629192262887955, -0.012966680340468884, -0.022271765395998955, 0.01877952367067337, -0.042801301926374435, -0.01914849691092968, -0.05426788702607155, 0.04968655854463577, -0.0166571494191885, 0.036301784217357635, 0.006484063342213631, 0.04455726593732834, 0.011643439531326294, 0.020569005981087685, 0.047799982130527496, 0.03972714766860008, -0.08925163745880127, -0.0532672293484211, -0.01178468856960535, 0.018194617703557014, 0.018088869750499725, 0.4015752375125885, -0.01194994617253542, -0.01957917958498001, 0.017848586663603783, 0.05108589679002762, 0.0009915587725117803, 0.0006647517438977957, 0.0033978570718318224, -0.04852447286248207, 0.05509388819336891, -0.012743025086820126, -0.015320300124585629, -0.0286855548620224, 0.037887439131736755, -0.0923381894826889, 0.015073705464601517, -0.007819433696568012, 0.04123401641845703, -0.002759327180683613, -0.0258380975574255, 0.030737262219190598, -0.035791441798210144, -0.01636461913585663, 0.017502158880233765, -0.023817768320441246, 0.04245143383741379, 0.0016762088052928448, 0.026316188275814056, 0.07153075188398361, 0.05062219873070717, 0.015004312619566917, 0.06455916166305542, -0.018939396366477013, -0.07961206883192062, 0.013567047193646431, -0.02138342522084713, 0.024515284225344658, 0.05347612127661705, -0.013900202699005604, -0.00042197617585770786, 0.026486406102776527, 0.012315242551267147, -0.06172150373458862, 0.00949513167142868, 0.036610279232263565, -0.02159861847758293, 0.11050859093666077, -0.0137495007365942, -0.010881908237934113, -0.005515695083886385, -0.0476677268743515, 0.01478425320237875, 0.044145211577415466, -0.010667858645319939, -0.02987443096935749, -0.012601841241121292, 0.010331171564757824, 0.0852365493774414, -0.005140627268701792, -0.10407282412052155, -0.014104735106229782, 0.011924094520509243, -0.0390213243663311, -0.0040984684601426125, 0.08110997080802917, 0.05671039596199989, -0.07994882762432098, -0.02406630665063858, 0.018319610506296158, 0.034769367426633835, -0.07618431001901627, 0.0373658612370491, -0.03393398970365524, -0.08885575830936432, -0.029237905517220497, 0.044644854962825775, -0.028453286737203598, -0.018031081184744835, -0.0032866953406482935, 0.047720231115818024, 0.04081503674387932, -0.017851905897259712, 0.0169743150472641, -0.0322703942656517, 0.00927640125155449, -0.07590440660715103, -0.0482318215072155, -0.08363122493028641, 0.023907583206892014, -0.018428664654493332, -0.03347145393490791, 0.013205147348344326, 0.0046007512137293816, -0.051619671285152435, 0.05097474902868271, -0.06399434804916382, -0.024222156032919884, 0.01106208935379982, 0.030884046107530594, 0.005095114931464195, -0.046741146594285965, 0.053458843380212784, 0.010329426266252995, -0.0148844625800848, 0.026850439608097076, -0.02247273363173008, -0.01415395736694336, 0.06434832513332367, -0.028215080499649048, 0.04544317349791527, 0.035161592066287994, -0.030084354802966118, 0.005008881911635399, -0.061300091445446014, 0.022513126954436302, -0.01311594806611538, -0.022096218541264534, -0.0053692893125116825, -0.050218064337968826, 0.03503120318055153, 0.052822452038526535, -0.06163793057203293, -0.05409139022231102, -0.0462154783308506, -0.353299617767334, -0.0350315161049366, 0.004102687351405621, -0.02595277689397335, 0.013153649866580963, -0.012913048267364502, 0.009109488688409328, -0.012042964808642864, 0.025844868272542953, 0.060149990022182465, 0.07748062908649445, -0.0005474868230521679, 0.004999150056391954, -0.11584745347499847, -0.01393004972487688, 0.07175879180431366, -0.0021187355741858482, -0.011354313232004642, -0.02364317700266838, 0.025035126134753227, 0.020947130396962166, -0.039643947035074234, -0.04510290175676346, -0.03146451339125633, 0.0017720188479870558, -0.009591897949576378, 0.10716131329536438, 0.038548827171325684, 0.009848617017269135, -0.05905520170927048, 0.022455161437392235, 0.029418325051665306, -0.02709454670548439, -0.06662482023239136, 0.010213824920356274, -0.0444982536137104, 0.007007888052612543, 0.02630038373172283, -0.038521695882081985, 0.029393918812274933, -0.04398667812347412, -0.029854124411940575, -0.04878642037510872, -0.033111125230789185, 0.009716691449284554, 0.014777002856135368, -0.020120769739151, 0.002202997449785471, 0.008198495022952557, 0.0698908194899559, -0.006555529776960611, 0.0309306588023901, -0.018494877964258194, 0.04576210305094719, 0.04419460892677307, -0.02475091628730297, -0.08161349594593048, -0.01193271204829216, 0.007447751704603434, 0.03368464484810829, 0.007725863717496395, 0.02035081572830677, 0.055578894913196564, -0.08901450783014297, -0.00021086129709146917, 0.020235732197761536, -0.018353313207626343, 0.006285366602241993, 0.021092122420668602, -0.029694052413105965, -0.02196558378636837, 0.08607812970876694, -0.018358444795012474, 0.04105067253112793, 0.047623489052057266, 0.008319495245814323, -0.038327980786561966, -0.0024454703088849783, 0.051153115928173065, -0.001832919311709702, 0.061085548251867294, -0.022194916382431984, 0.07370691746473312, -0.00829109363257885, 0.00769063038751483, 0.05945415794849396, 0.008723017759621143, -0.014080450870096684, 0.04806675389409065, -0.025229530408978462, 0.006259246729314327, -0.006306889932602644, -0.02115834318101406, -0.0494992695748806, 0.07602463662624359, -0.021430766209959984, -0.2668813169002533, 0.03817589208483696, 0.002769511193037033, 0.05735864117741585, 0.0032628898043185472, -0.00019761951989494264, 0.02922019734978676, -0.043026234954595566, 0.00024317417410202324, -0.0036785854026675224, 0.028047403320670128, 0.07372680306434631, -0.012262525968253613, -0.042433962225914, -0.01784241572022438, -0.017504626885056496, 0.02528279833495617, 0.031080683693289757, 0.07256550341844559, 0.031614840030670166, 0.030259499326348305, -0.03667556867003441, 0.1628066897392273, 0.03979187458753586, -0.01423913799226284, 0.004347504582256079, -0.01342824101448059, 0.019642094150185585, 0.04508555307984352, -0.00008091302879620343, -0.016945505514740944, 0.039649926126003265, 0.029367778450250626, 0.042472220957279205, 0.028533469885587692, -0.03795824944972992, -0.0011514208745211363, 0.05579451099038124, 0.02767985127866268, -0.05015954747796059, -0.011448031291365623, 0.03809990733861923, -0.032411471009254456, 0.048003096133470535, 0.06360244750976562, -0.01881800778210163, 0.012301778420805931, 0.0010318034328520298, -0.04327007755637169, -0.01149875856935978, -0.032205525785684586, -0.010031121782958508, -0.026778025552630424, -0.03023110330104828, -0.004837912041693926, 0.08121875673532486, -0.005510253366082907, -0.029404448345303535, 0.05429448187351227, 0.024822402745485306, -0.020185716450214386, -0.040506478399038315, 0.1026889830827713, 0.0012350488686934114, 0.003631727071478963 ]
[ 0.011767683550715446, 0.04201362282037735, -0.008086434565484524, 0.013541096821427345, -0.0283963680267334, 0.013437059707939625, -0.030541833490133286, 0.01748781092464924, 0.005043618381023407, 0.0038773680571466684, -0.029360242187976837, -0.013818547129631042, 0.06345298141241074, -0.017114268615841866, -0.004406269174069166, -0.01902906596660614, -0.018849680200219154, 0.0210306104272604, 0.022904349491000175, -0.003792191157117486, -0.035215962678194046, -0.004825990181416273, 0.032245032489299774, -0.030643409118056297, 0.0015866465400904417, 0.03775744512677193, -0.04265660420060158, 0.0002996278344653547, -0.0038044387474656105, -0.1268550306558609, -0.028415851294994354, -0.01492050476372242, -0.012036408297717571, 0.030806079506874084, -0.021838070824742317, -0.013390273787081242, 0.01101528201252222, 0.04031945392489433, -0.021922478452324867, 0.02718164585530758, 0.0001617875532247126, -0.010836755856871605, -0.023855729028582573, 0.008580516092479229, -0.009827353991568089, -0.03632562980055809, -0.02403969131410122, -0.03598380088806152, 0.017893284559249878, 0.019019419327378273, -0.051485903561115265, 0.0034341015852987766, 0.007467824500054121, 0.02184424176812172, 0.012075889855623245, -0.0042060441337525845, -0.024317720904946327, 0.02718023955821991, 0.0012166367378085852, 0.006042834836989641, 0.0348784402012825, -0.028116915374994278, -0.0528705008327961, -0.017357492819428444, 0.0029065008275210857, -0.028712233528494835, -0.033324506133794785, 0.01039957907050848, -0.017502257600426674, -0.0035338308662176132, -0.025556515902280807, 0.03950595483183861, -0.045297082513570786, -0.0008573875529691577, -0.04004139080643654, 0.02236880362033844, 0.035937435925006866, -0.05288559943437576, 0.027181725949048996, -0.005296615418046713, -0.016989266499876976, -0.004829915706068277, -0.01620546542108059, -0.02858974225819111, -0.008913753554224968, 0.0033695080783218145, -0.0219293050467968, -0.0010175015777349472, 0.011765890754759312, 0.013008883222937584, 0.016547294333577156, 0.008860134519636631, -0.018258534371852875, 0.030597632750868797, -0.09383764117956161, 0.0025134116876870394, -0.023841876536607742, -0.0011002970859408379, 0.014747655019164085, 0.85567706823349, 0.026324288919568062, -0.010094312950968742, 0.004183268640190363, 0.013851156458258629, 0.011458608321845531, -0.0006070146337151527, 0.0311613529920578, 0.008873521350324154, -0.002881404710933566, -0.027441520243883133, 0.013329359702765942, 0.01794661395251751, 0.0005355026805773377, 0.01435166411101818, -0.0022841296158730984, 0.0492817685008049, 0.016277819871902466, 0.006217445712536573, -0.022332368418574333, 0.00937525276094675, -0.015561949461698532, -0.017642302438616753, -0.011648006737232208, 0.011555206030607224, 0.023247724398970604, -0.15644893050193787, 0.023156121373176575, -7.386693359235988e-33, 0.02963496558368206, -0.019760213792324066, 0.07850303500890732, 0.0007554357871413231, 0.005711453501135111, 0.007277711760252714, -0.007997320033609867, 0.03987862914800644, -0.024747833609580994, -0.03294268622994423, 0.007151871453970671, -0.011447165161371231, 0.004658428020775318, -0.015495599247515202, 0.005022598430514336, -0.037305258214473724, 0.009013477712869644, 0.0009892306989058852, -0.004000479355454445, -0.02752653695642948, 0.022335132583975792, 0.03597559779882431, 0.005946728400886059, 0.0512186698615551, 0.006265502423048019, 0.028986595571041107, 0.007426689378917217, -0.020807353779673576, -0.01982404850423336, -0.03735376521945, -0.03963962942361832, -0.006734167225658894, -0.027325160801410675, -0.02405248023569584, 0.02339797280728817, -0.06895245611667633, -0.01957307569682598, 0.02960270270705223, -0.04037312790751457, -0.03959847614169121, -0.05082150548696518, 0.005014919675886631, -0.010676038451492786, 0.0032796617597341537, -0.04265628010034561, -0.01971680298447609, -0.002245394280180335, 0.007356172427535057, -0.017024584114551544, 0.01757117360830307, 0.011844341643154621, 0.03022618032991886, -0.0007541478844359517, 0.0057632457464933395, -0.0015879019629210234, 0.02393716387450695, 0.0023774707224220037, -0.01000357884913683, -0.01678423583507538, 0.020474553108215332, 0.05032551288604736, -0.0036913088988512754, -0.017734944820404053, 0.02809191308915615, 0.02887754701077938, 0.007851336151361465, 0.02516169100999832, -0.026613596826791763, -0.008976615965366364, 0.045401640236377716, -0.014243068173527718, 0.04087049886584282, 0.013741984963417053, -0.022456994280219078, 0.02877276949584484, -0.03850003331899643, -0.005741902627050877, -0.014957788400352001, 0.024664826691150665, 0.013919498771429062, -0.0243057981133461, -0.033096008002758026, 0.003872955683618784, -0.03093317151069641, -0.039110537618398666, -0.010319346562027931, 0.018367767333984375, 0.0013463548384606838, -0.003341973526403308, 0.0011378128547221422, 0.04118220508098602, 0.061681631952524185, -0.030747974291443825, -0.025088122114539146, -0.03623153269290924, 7.15208378859506e-33, 0.00987356249243021, 0.02392682433128357, -0.024761267006397247, 0.0002982524747494608, 0.05164587125182152, 0.007253868971019983, 0.005270509049296379, 0.00588213512673974, -0.0273694209754467, 0.023189380764961243, -0.0033523165620863438, 0.00433432636782527, -0.002813032129779458, 0.019943471997976303, 0.06510338932275772, -0.005252393428236246, 0.008004141971468925, -0.0075555844232439995, -0.02123922109603882, 0.006891193334013224, 0.010867900215089321, 0.013933840207755566, 0.013311282731592655, 0.017555322498083115, 0.04659205302596092, 0.0005568676278926432, -0.00009003887680592015, 0.012713251635432243, -0.020421532914042473, 0.03533819690346718, 0.020899903029203415, -0.02688964642584324, -0.006316208280622959, -0.02452441118657589, -0.010513109154999256, 0.01423587929457426, 0.020510805770754814, 0.006434803828597069, 0.008733757771551609, 0.022035686299204826, 0.013395545072853565, 0.031309306621551514, -0.014252881519496441, 0.06449064612388611, 0.008984988555312157, 0.0170284491032362, 0.011187638156116009, 0.016075797379016876, 0.0018612348940223455, 0.020141834393143654, -0.009665152058005333, 0.020339664071798325, -0.018016736954450607, 0.032575398683547974, 0.026049813255667686, -0.02758674882352352, -0.01451695617288351, 0.010882794857025146, -0.01916428469121456, -0.014346309006214142, -0.030366946011781693, -0.02456958219408989, -0.02798277698457241, -0.00896394718438387, -0.008390573784708977, -0.0026291494723409414, -0.02466774731874466, 0.017236890271306038, -0.010774017311632633, -0.01634618453681469, -0.0020721338223665953, -0.003999453037977219, -0.005766473710536957, 0.03873133286833763, -0.01263417862355709, -0.021025780588388443, -0.022613678127527237, -0.008333495818078518, -0.02144046686589718, 0.0316661037504673, 0.022860797122120857, 0.0012018891284242272, 0.04264862835407257, 0.015209591016173363, 0.009956256486475468, 0.007028865162283182, -0.013868136331439018, -0.0020678273867815733, -0.007141716778278351, 0.004621708765625954, 0.007970129139721394, -0.031201759353280067, -0.021358178928494453, 0.03778963163495064, -0.02520938217639923, -1.2965249318597216e-8, -0.04505489766597748, -0.0021218881011009216, -0.018934164196252823, -0.0077133444137871265, 0.022436536848545074, 0.011274183169007301, -0.028603142127394676, 0.002548455260694027, 0.011240550316870213, 0.0041939266957342625, 0.04523057863116264, -0.018241804093122482, 0.027381790801882744, 0.010064268484711647, 0.011821265332400799, -0.02456624060869217, -0.011070658452808857, -0.002589779207482934, 0.018457401543855667, 0.026304788887500763, 0.008140813559293747, 0.05395660549402237, -0.040638577193021774, 0.007797242607921362, 0.016886351630091667, 0.023559879511594772, -0.02377317100763321, -0.08816246688365936, 0.009421727620065212, -0.006656288634985685, 0.011766251176595688, -0.019615259021520615, -0.005383366718888283, -0.0036426715087145567, -0.03499031811952591, -0.02947877161204815, 0.004372240975499153, 0.023095397278666496, -0.016260478645563126, 0.038749974220991135, -0.009080526418983936, -0.005262219347059727, -0.021441088989377022, -0.023908717557787895, -0.02889297902584076, -0.008877088315784931, -0.039406489580869675, -0.014458412304520607, 0.012808602303266525, -0.029127463698387146, 0.020514875650405884, -0.003672950202599168, 0.021344389766454697, 0.037699684500694275, 0.045954570174217224, -0.00015688456187490374, -0.0042213755659759045, 0.015605665743350983, -0.009723004885017872, -0.017937147989869118, 0.017066430300474167, 0.023848723620176315, -0.02847343124449253, -0.014249731786549091 ]
neo4j-load-csv-java-io-inputstreamreader-theres-a-field-starting-with-a-quote-and-whereas-it-ends-that-quote-there-seems-to-be-character-in-that-field-after-that-ending-quote-that-isnt-suppor
https://markhneedham.com/blog/2015/05/04/neo4j-load-csv-java-io-inputstreamreader-theres-a-field-starting-with-a-quote-and-whereas-it-ends-that-quote-there-seems-to-be-character-in-that-field-after-that-ending-quote-that-isnt-suppor
false
2015-05-05 21:39:24
Python: Selecting certain indexes in an array
[ "python" ]
[ "Python" ]
A couple of days ago I was scrapping the http://en.wikipedia.org/wiki/List_of_United_Kingdom_Parliament_constituencies[UK parliament constituencies] from Wikipedia in preparation for the http://www.meetup.com/graphdb-london/events/221364888/[Graph Connect hackathon] and had got to the point where I had an array with one entry per column in the table. image::{{<siteurl>}}/uploads/2015/05/2015-05-05_22-22-57.png[2015 05 05 22 22 57,600] [source,python] ---- import requests from bs4 import BeautifulSoup from soupselect import select page = open("constituencies.html", 'r') soup = BeautifulSoup(page.read()) for row in select(soup, "table.wikitable tr"): if select(row, "th"): print [cell.text for cell in select(row, "th")] if select(row, "td"): print [cell.text for cell in select(row, "td")] ---- [source,bash] ---- $ python blog.py [u'Constituency', u'Electorate (2000)', u'Electorate (2010)', u'Largest Local Authority', u'Country of the UK'] [u'Aldershot', u'66,499', u'71,908', u'Hampshire', u'England'] [u'Aldridge-Brownhills', u'58,695', u'59,506', u'West Midlands', u'England'] [u'Altrincham and Sale West', u'69,605', u'72,008', u'Greater Manchester', u'England'] [u'Amber Valley', u'66,406', u'69,538', u'Derbyshire', u'England'] [u'Arundel and South Downs', u'71,203', u'76,697', u'West Sussex', u'England'] [u'Ashfield', u'74,674', u'77,049', u'Nottinghamshire', u'England'] [u'Ashford', u'72,501', u'81,947', u'Kent', u'England'] [u'Ashton-under-Lyne', u'67,334', u'68,553', u'Greater Manchester', u'England'] [u'Aylesbury', u'72,023', u'78,750', u'Buckinghamshire', u'England'] ... ---- I wanted to get rid of the 2nd and 3rd columns (containing the electorates) from the array since those aren't interesting to me as I have another source where I've got that data from. I was struggling to do this but http://stackoverflow.com/questions/3179106/python-select-subset-from-list-based-on-index-set[two] http://stackoverflow.com/questions/522563/accessing-the-index-in-python-for-loops[different] Stack Overflow questions came to the rescue with suggestions to use enumerate to get the index of each column and then add to the list comprehension to filter appropriately. First we'll look at the filtering on a simple example. Imagine we have a list of 5 people: [source,python] ---- people = ["mark", "michael", "brian", "alistair", "jim"] ---- And we only want to keep the 1st, 4th and 5th people. We therefore only want to keep the values that exist in index positions 0,3 and 4 which we can do like this: ~~~python >>> [x[1] for x in enumerate(people) if x[0] in [0,3,4]] ['mark', 'alistair', 'jim'] ~~~ Now let's apply the same approach to our constituencies data set: ~~~python import requests from bs4 import BeautifulSoup from soupselect import select page = open("constituencies.html", 'r') soup = BeautifulSoup(page.read()) for row in select(soup, "table.wikitable tr"): if select(row, "th"): print [entry[1].text for entry in enumerate(select(row, "th")) if entry[0] in [0,3,4]] if select(row, "td"): print [entry[1].text for entry in enumerate(select(row, "td")) if entry[0] in [0,3,4]] ~~~ ~~~bash $ python blog.py [u'Constituency', u'Largest Local Authority', u'Country of the UK'] [u'Aldershot', u'Hampshire', u'England'] [u'Aldridge-Brownhills', u'West Midlands', u'England'] [u'Altrincham and Sale West', u'Greater Manchester', u'England'] [u'Amber Valley', u'Derbyshire', u'England'] [u'Arundel and South Downs', u'West Sussex', u'England'] [u'Ashfield', u'Nottinghamshire', u'England'] [u'Ashford', u'Kent', u'England'] [u'Ashton-under-Lyne', u'Greater Manchester', u'England'] [u'Aylesbury', u'Buckinghamshire', u'England'] ~~~
null
null
[ -0.001672358950600028, -0.023840397596359253, -0.0007724897586740553, 0.017094090580940247, 0.0520346537232399, 0.006106319837272167, 0.014374453574419022, 0.02718239091336727, -0.0010046630632132292, -0.0017789015546441078, -0.018499333411455154, -0.027290260419249535, -0.06944402307271957, 0.004974976647645235, 0.0017547684255987406, 0.07252851873636246, 0.053374748677015305, -0.002466996666043997, 0.010827057994902134, -0.02407730184495449, 0.06600045412778854, 0.0690038651227951, -0.0031898978631943464, 0.029208634048700333, 0.031433142721652985, -0.0019170624436810613, 0.03232331946492195, -0.007132925558835268, -0.06349311769008636, 0.0014651244273409247, 0.02861887589097023, 0.0017041468527168036, 0.002706683473661542, 0.002194051630795002, 0.04509630426764488, -0.030356768518686295, -0.02568991109728813, -0.0019289826741442084, -0.01057901419699192, 0.009812398813664913, -0.06358736008405685, 0.015182866714894772, -0.0017379875062033534, 0.03572555258870125, -0.034454211592674255, -0.019487133249640465, -0.035653602331876755, 0.047239843755960464, -0.012392803095281124, 0.008281402289867401, -0.045223504304885864, 0.03672299534082413, -0.007351104170084, -0.016128486022353172, -0.006253484170883894, 0.055732641369104385, 0.008977601304650307, -0.04431102052330971, 0.021402399986982346, -0.027392331510782242, 0.01062109787017107, -0.009906045161187649, 0.01120852492749691, 0.012842902913689613, 0.009158547036349773, -0.011863922700285912, -0.012791314162313938, 0.04510640725493431, -0.041296787559986115, -0.0036081471480429173, -0.016607090830802917, 0.015362606383860111, -0.0032152084168046713, 0.009884252212941647, 0.02217003144323826, -0.04469969868659973, 0.005932980682700872, 0.0801922157406807, 0.026989761739969254, 0.029965460300445557, -0.0006652500596828759, -0.007596754468977451, -0.0008612300152890384, 0.045948777347803116, -0.015047742053866386, -0.04363738372921944, -0.04276353493332863, -0.030710026621818542, -0.04422775283455849, 0.04569762200117111, -0.011831332929432392, -0.04509510472416878, 0.03158460184931755, 0.04449846222996712, -0.021650830283761024, -0.016378596425056458, 0.033181555569171906, 0.006458488292992115, -0.014046675525605679, -0.04103071615099907, -0.02254599519073963, -0.031745873391628265, 0.05999787524342537, 0.014166748151183128, -0.0948585793375969, 0.007271187845617533, -0.04593516141176224, 0.005303621292114258, 0.03070640377700329, 0.002494740067049861, 0.0050425115041434765, -0.013166925869882107, -0.016503751277923584, 0.008963757194578648, -0.08288340270519257, 0.03785180300474167, 0.010741475969552994, -0.0403079017996788, 0.0038524861447513103, 0.00042310141725465655, 0.028752584010362625, 0.040569134056568146, 0.005158513318747282, 0.09835491329431534, 0.022550949826836586, -0.0030822823755443096, -0.0011187265627086163, 0.053508177399635315, -0.019299745559692383, -0.04266224056482315, -0.0106523921713233, 0.0645984634757042, -0.02399221621453762, 0.007362499367445707, -0.004994407761842012, -0.03197164461016655, -0.03242342174053192, 0.02614845149219036, 0.06408829241991043, 0.048364341259002686, 0.028322508558630943, -0.029352203011512756, 0.029932156205177307, 0.011483396403491497, 0.01182827539741993, -0.004733041860163212, -0.021196359768509865, -0.02604309469461441, -0.0215570330619812, 0.005853430833667517, 0.007348845712840557, 0.027217619121074677, 0.06016972288489342, -0.0182794276624918, 0.014918976463377476, 0.09410902112722397, 0.02073012664914131, 0.012792499735951424, -0.0015149497194215655, 0.03532083332538605, 0.02396273799240589, 0.021298803389072418, 0.01891718991100788, 0.04198070615530014, 0.01812955178320408, -0.01412141416221857, 0.002318844897672534, 0.05488031730055809, -0.0150742894038558, 0.004852714482694864, -0.057990267872810364, -0.05656150355935097, 0.0827505886554718, -0.03002901002764702, -0.02906883880496025, 0.03930250182747841, 0.09098607301712036, 0.02867027185857296, 0.036473970860242844, -0.009834151715040207, -0.07790718227624893, 0.01824287138879299, -0.011180631816387177, 0.028385883197188377, 0.02511312998831272, -0.007239425089210272, 0.06900040060281754, 0.0490105114877224, 0.018873121589422226, 0.02353142760694027, -0.0650971531867981, -0.08417688310146332, -0.039881397038698196, -0.02418946847319603, 0.06887410581111908, -0.024338791146874428, 0.02696409821510315, 0.06329536437988281, -0.006637037266045809, 0.065521240234375, -0.006001010537147522, 0.013463957235217094, 0.03868073225021362, -0.031476374715566635, -0.05332184582948685, 0.021986041218042374, 0.024210477247834206, -0.006382104475051165, -0.029597649350762367, 0.03335389122366905, -0.03460308164358139, 0.0016966784605756402, 0.013028683140873909, -0.012494231574237347, 0.012660401873290539, 0.00887642428278923, 0.07684009522199631, -0.0293097123503685, 0.033322714269161224, -0.07293089479207993, 0.03633240610361099, 0.0355391651391983, -0.035638295114040375, -0.0005904489080421627, 0.013814982958137989, 0.13427132368087769, 0.05725185573101044, -0.003735251957550645, -0.03561439737677574, -0.011170744895935059, -0.0024435860104858875, -0.018274420872330666, -0.002678093034774065, -0.023669570684432983, -0.024830279871821404, -0.021111570298671722, -0.04391275346279144, -0.02743258699774742, 0.03014407679438591, -0.05664559081196785, 0.002113921567797661, 0.05768682435154915, 0.00822860561311245, 0.048819538205862045, 0.009810161776840687, 0.009756539948284626, -0.005910797975957394, -0.012811355292797089, -0.021573636680841446, -0.017383072525262833, 0.017440548166632652, -0.024957479909062386, 0.032722294330596924, -0.028009044006466866, -0.004750733729451895, -0.01940925046801567, -0.027469752356410027, 0.008808334358036518, 0.06161397695541382, 0.05755409225821495, -0.055869631469249725, 0.04094080254435539, -0.021373257040977478, 0.0102258725091815, -0.016932621598243713, -0.04236864298582077, -0.05227937921881676, -0.07026489824056625, 0.016172001138329506, 0.0035554468631744385, 0.05214138329029083, 0.016071742400527, -0.003430685494095087, 0.0034365898463875055, 0.010449850931763649, 0.00088267563842237, 0.053009793162345886, 0.003752661868929863, -0.021091410890221596, -0.04907064512372017, -0.027121324092149734, 0.06032032519578934, -0.057067837566137314, -0.032010309398174286, 0.0112770926207304, -0.0705634355545044, 0.05052567273378372, -0.05512334406375885, -0.02336280606687069, 0.039874885231256485, 0.021850010380148888, 0.032187215983867645, 0.0048945024609565735, -0.03497491776943207, 0.05922069773077965, -0.01255025528371334, 0.014130673371255398, 0.009283642284572124, -0.018416879698634148, 0.02666298672556877, -0.001663721865043044, 0.047528013586997986, 0.019876686856150627, -0.005502296611666679, 0.028721390292048454, -0.05547396093606949, 0.0073821572586894035, -0.036363232880830765, -0.27350878715515137, 0.011140004731714725, -0.006156396120786667, -0.029241550713777542, 0.03755174204707146, -0.01926356740295887, 0.009863563813269138, -0.04615241661667824, -0.020860446617007256, 0.00536841107532382, -0.01394702773541212, -0.039128679782152176, -0.03670966252684593, 0.029904397204518318, 0.037868108600378036, -0.0032268106006085873, -0.0015657736221328378, -0.04302757978439331, 0.027139417827129364, 0.05265981703996658, 0.01015663892030716, -0.06220223009586334, 0.011481223627924919, 0.05750945582985878, 0.030319930985569954, 0.06261841207742691, -0.04645581170916557, -0.017830105498433113, -0.049923837184906006, -0.021846862509846687, 0.022856177762150764, 0.005356236826628447, 0.04001598060131073, -0.012748326174914837, -0.012669268064200878, -0.02680535987019539, 0.05317188426852226, 0.0022252327762544155, -0.018065616488456726, 0.003282475285232067, -0.041061654686927795, -0.030043499544262886, 0.015003683045506477, 0.0072744302451610565, 0.0780981183052063, 0.01636466570198536, -0.06231808662414551, -0.00731482170522213, -0.035104479640722275, 0.05565418303012848, -0.029905786737799644, -0.011193613521754742, -0.0009205686510540545, 0.05321081727743149, -0.03546767681837082, 0.03905867040157318, -0.014683091081678867, 0.02093450352549553, -0.07483447343111038, -0.04646430164575577, -0.03339165449142456, -0.04753977805376053, -0.015515084378421307, -0.0449926033616066, 0.0021378197707235813, -0.0533517561852932, -0.04611228406429291, 0.007141799200326204, 0.0640111044049263, 0.0411175936460495, -0.0290970541536808, -0.02454705722630024, -0.006766701582819223, -0.09730087220668793, -0.002150076674297452, -0.01846112310886383, -0.012233022600412369, 0.0402713268995285, 0.013581833802163601, 0.04482702165842056, -0.06418602168560028, -0.05943283066153526, 0.029722198843955994, 0.005812252406030893, 0.025874361395835876, -0.0779319629073143, 0.012856213375926018, 0.026463057845830917, -0.0431935153901577, -0.020741818472743034, 0.06241760402917862, -0.01016334630548954, -0.004017076920717955, -0.02112998254597187, -0.00339439045637846, 0.037917982786893845, 0.001726302201859653, -0.0030382571276277304, 0.015454832464456558, 0.03446051478385925, -0.006559228990226984, -0.056595176458358765, -0.007914428599178791, -0.04426056519150734, -0.03258676454424858, 0.007402763236314058, -0.04858888313174248, 0.014047848992049694, 0.007251169998198748, 0.011642362922430038, 0.0027175049763172865, -0.04861598461866379, 0.004189987201243639, -0.041345275938510895, -0.017487065866589546, -0.029476571828126907, 0.03335687145590782, 0.010961439460515976, 0.0038484297692775726, -0.006123479455709457, -0.06302999705076218, 0.02538435533642769, -0.006069084629416466, -0.018114866688847542, -0.06937002390623093, -0.03312734141945839, -0.029457200318574905, -0.022738521918654442, 0.018470730632543564, 0.009204418398439884, 0.023587355390191078, -0.004183846991509199, 0.002578751416876912, -0.045024652034044266, 0.0338253527879715, -0.005032116547226906, -0.03191177919507027, -0.020255737006664276, -0.004225927870720625, 0.02631382830440998, 0.0001259701675735414, -0.01097902376204729, 0.013459322042763233, 0.0005411836318671703, 0.03194061666727066, 0.006871889345347881, 0.0009198456536978483, 0.023794246837496758, 0.0017028984148055315, 0.041878439486026764, -0.03489810228347778, 0.004623503889888525, 0.03445402532815933, -0.04126383736729622, 0.0009872756199911237, -0.009851238690316677, 0.038725703954696655, -0.01819354109466076, -0.02589820697903633, -0.03228427842259407, -0.02685237117111683, -0.030323026701807976, -0.013432441279292107, -0.0005668079829774797, 0.006036052480340004, 0.0521429143846035, -0.00005684719872078858, 0.03147658705711365, 0.01610485464334488, 0.014479045756161213, 0.026132624596357346, 0.024861780926585197, -0.03551815450191498, 0.020424840971827507, -0.02007678523659706, -0.04344569891691208, 0.0046694353222846985, 0.026260416954755783, 0.02224116027355194, 0.024577954784035683, -0.025187721475958824, -0.003322112839668989, 0.028781114146113396, 0.01914251782000065, 0.07712052762508392, 0.03539944812655449, -0.04315273091197014, -0.007548046763986349, -0.0027792993932962418, -0.04287135973572731, -0.005241227336227894, 0.012718734331429005, -0.012392433360219002, -0.023040782660245895, -0.04442991316318512, -0.045220136642456055, 0.003465303685516119, -0.01038416475057602, -0.001198434503749013, -0.0003418752457946539, -0.0033650624100118876, -0.02255336195230484, -0.020050790160894394, 0.029838288202881813, 0.03494726121425629, -0.07307364791631699, 0.0006623020744882524, 0.00048661924665793777, -0.003255188465118408, 0.006409367546439171, 0.005364925600588322, -0.04845624044537544, -0.007202712818980217, -0.02419220469892025, -0.002039664890617132, -0.019412558525800705, -0.0337861143052578, -0.016566285863518715, 0.008952210657298565, -0.03492753580212593, -0.004937818739563227, -0.00767953647300601, 0.007123454008251429, -0.016435354948043823, -0.008416146039962769, 0.018597448244690895, -0.01934080757200718, -0.014581222087144852, 0.02996470406651497, -0.023922748863697052, 0.002041799249127507, -0.02313072420656681, 0.017168838530778885, 0.045596856623888016, 0.0021508389618247747, 0.013420444913208485, -0.038456641137599945, -0.008716360665857792, 0.0017938214587047696, 0.06087964028120041, 0.015486203134059906, 0.01631549932062626, -0.04280871897935867, -0.0023968785535544157, -0.028739066794514656, 0.04633031412959099, 0.0155852772295475, -0.021069562062621117, 0.017727117985486984, 0.03362409025430679, -0.0022494683507829905, 0.03577209264039993, -0.0025876241270452738, -0.033525142818689346, 0.060314323753118515, -0.051333244889974594, -0.01844896376132965, -0.008527458645403385, -0.06289703398942947, 0.02428627386689186, -0.022831326350569725, 0.01787901297211647, -0.04646892473101616, 0.044880371540784836, 0.027241215109825134, 0.006897994317114353, 0.04424947500228882, -0.013158871792256832, 0.014706425368785858, -0.04391937702894211, -0.015408003702759743, -0.07825078815221786, -0.02992342971265316, 0.026635706424713135, 0.01936139538884163, -0.015785176306962967, 0.005200663115829229, -0.02885659970343113, 0.017080407589673996, -0.08872389793395996, -0.013987851329147816, 0.037622030824422836, -0.013767560012638569, -0.005818189587444067, 0.03308732062578201, -0.05193733051419258, 0.014387091621756554, 0.03158349171280861, -0.03728010505437851, -0.03569645434617996, 0.00981027539819479, 0.06645134091377258, -0.011127046309411526, 0.017471956089138985, -0.009136920794844627, 0.012440999038517475, 0.055113695561885834, 0.033376820385456085, 0.02590472251176834, 0.04520483314990997, -0.05986779183149338, 0.034525539726018906, 0.015862302854657173, 0.0006276495987549424, -0.036052096635103226, 0.03497214987874031, -0.016009623184800148, -0.07106456905603409, 0.011770324781537056, 0.01094148587435484, 0.014610247686505318, -0.0598214827477932, 0.08212687075138092, 0.000011514129255374428, -0.03133900836110115, -0.0657251626253128, 0.026649802923202515, -0.07178815454244614, -0.006498402915894985, -0.03084014356136322, 0.008659745566546917, -0.04671873524785042, 0.049789465963840485, 0.018650714308023453, 0.015887748450040817, 0.06690134853124619, -0.017476527020335197, 0.009553567506372929, 0.015591315925121307, 0.09754808247089386, 0.06768901646137238, 0.06148090586066246, -0.017191749066114426, 0.06902320683002472, -0.023605287075042725, -0.061551306396722794, -0.008338090032339096, -0.031362589448690414, -0.0030941765289753675, 0.008564285933971405, -0.024826163426041603, 0.0750543549656868, -0.03491588309407234, 0.06780502200126648, -0.009054867550730705, -0.0076322415843605995, -0.0017123364377766848, -0.006846216972917318, 0.036903273314237595, 0.08338889479637146, 0.010370085947215557, 0.046069249510765076, -0.023404937237501144, -0.03219824656844139, 0.04937104135751724, 0.010056914761662483, -0.0260230153799057, 0.04062270000576973, -0.04490956664085388, 0.031153304502367973, 0.0029236695263534784, 0.06239471212029457, 0.07086171209812164, -0.00882248766720295, -0.027740905061364174, -0.017841963097453117, 0.028815390542149544, 0.013423876836895943, 0.035344917327165604, -0.010789398103952408, 0.029038023203611374, -0.016403237357735634, -0.03445067256689072, -0.0420636385679245, -0.05445333570241928, -0.038330815732479095, 0.027538400143384933, -0.0360841304063797, -0.00835183635354042, 0.01036024745553732, 0.0066827875562012196, -0.025199631229043007, -0.04230843856930733, -0.0634559914469719, -0.035788338631391525, -0.06622849404811859, -0.024561893194913864, 0.028228862211108208, -0.030864641070365906, -0.03748230263590813, -0.01634358800947666, -0.01807394064962864, -0.014570890925824642, 0.021150540560483932, -0.050208672881126404, -0.022892318665981293, 0.010512949898838997, 0.021157683804631233, 0.019737321883440018, 0.006928442977368832, 0.05904476344585419, -0.0016942024230957031, -0.03145662322640419, -0.012740269303321838, 0.012946043163537979, 0.06208381801843643, -0.004144194535911083, -0.005151498597115278, -0.12528041005134583, 0.010279218666255474, 0.027522822842001915, -0.0060804435051977634, -0.06301867961883545, 0.03244030103087425, 0.02072460763156414, 0.005260853096842766, 0.027819238603115082, -0.017843157052993774, 0.0020703489426523447, -0.02713395282626152, -0.0198055412620306, 0.00589416129514575, 0.006223204080015421, 0.038254816085100174, -0.03251337260007858, 0.08457588404417038, 0.04675142094492912, 0.007908995263278484, -0.04198523983359337, -0.009729590266942978, -0.017487982288002968, 0.027261147275567055, -0.02951968088746071, -0.046188175678253174, -0.058781515806913376, -0.07828252017498016, -0.022051388397812843, 0.0453016497194767, -0.03287540748715401, -0.029174698516726494, -0.0006051791715435684, 0.016219181939959526, -0.027797363698482513, 0.021842090412974358, -0.02026320993900299, 0.001179809682071209, -0.03251234069466591, -0.013430519960820675, -0.022960074245929718, 0.030322259292006493, 0.010354849509894848, 0.041008368134498596, 0.01448314543813467, -0.04513389617204666, 0.02744314819574356, -0.01694933883845806, 0.024032222107052803, 0.026234909892082214, -0.016860472038388252, 0.025486771017313004 ]
[ -0.06904008239507675, -0.050789881497621536, -0.017354890704154968, -0.025119619444012642, 0.07346143573522568, -0.0291010569781065, -0.015396954491734505, 0.003030613763257861, 0.03669276833534241, 0.017769386991858482, 0.022976286709308624, -0.0479637049138546, 0.004986277781426907, -0.028994569554924965, 0.05449777841567993, 0.004332005046308041, -0.022443752735853195, -0.08369433134794235, -0.029089035466313362, 0.05826588720083237, -0.008306154981255531, -0.007326849270612001, -0.04370775446295738, -0.03246697038412094, 0.010745014995336533, 0.013715180568397045, 0.0659828707575798, -0.024278903380036354, -0.012142566032707691, -0.200748473405838, 0.030668873339891434, -0.015466163866221905, 0.0020101165864616632, 0.003905495163053274, 0.05497491732239723, -0.0026100242976099253, 0.038315337151288986, 0.007576316595077515, 0.02417868562042713, 0.028308074921369553, 0.011197533458471298, -0.011096357367932796, -0.0612545870244503, 0.0021031582728028297, 0.05329044163227081, 0.0180069413036108, -0.04921598359942436, 0.013138067908585072, -0.006469035986810923, 0.021579401567578316, -0.059228070080280304, 0.03163584694266319, -0.009255585260689259, -0.027690233662724495, 0.030793646350502968, 0.032662175595760345, 0.042376622557640076, 0.0675763264298439, 0.016897184774279594, 0.03181920200586319, 0.035415999591350555, 0.01694289594888687, -0.15368284285068512, 0.10849963873624802, 0.009579624980688095, 0.040537770837545395, -0.03745273873209953, -0.012582581490278244, -0.026682211086153984, 0.06048751622438431, -0.005605640355497599, -0.02286902442574501, -0.02554902620613575, 0.04840758442878723, 0.020974023267626762, -0.027912309393286705, -0.03829742595553398, 0.03734569251537323, 0.016597801819443703, -0.02034795470535755, -0.042982928454875946, 0.019288601353764534, -0.03200683742761612, -0.03134074807167053, 0.009323963895440102, 0.007203917950391769, -0.04344896227121353, 0.030617864802479744, -0.006059819832444191, -0.001297369715757668, 0.037486109882593155, -0.007330187130719423, 0.021466312929987907, 0.0526520200073719, -0.08906179666519165, -0.050803229212760925, 0.009319718927145004, 0.030863098800182343, -0.0212100837379694, 0.40176594257354736, -0.037608738988637924, 0.003566656494513154, 0.05621481314301491, 0.03720489889383316, -0.007944253273308277, -0.02694011852145195, -0.006018320098519325, -0.050591181963682175, -0.00040935137076303363, -0.03162235766649246, 0.025175167247653008, -0.04052652791142464, 0.068545863032341, -0.05910060182213783, 0.024292239919304848, 0.008870705030858517, 0.007813469506800175, -0.00010988904978148639, -0.035309500992298126, 0.019344227388501167, -0.0492323562502861, 0.010813330300152302, -0.002581204054877162, -0.01699773408472538, 0.0024089927319437265, 0.03676934912800789, 0.060231249779462814, 0.059315066784620285, 0.0439864918589592, 0.01473831944167614, 0.029096411541104317, 0.0014491599285975099, -0.06719970703125, 0.004726912826299667, -0.028244636952877045, -0.010843244381248951, 0.036384180188179016, -0.011446627788245678, 0.00941423512995243, 0.03233065456151962, 0.0014010705053806305, -0.10079223662614822, 0.011371657252311707, 0.01817050762474537, -0.014738695695996284, 0.13549838960170746, -0.035019759088754654, -0.04149466007947922, -0.04039870947599411, -0.006050292402505875, -0.029323797672986984, 0.03759842738509178, 0.0064252582378685474, -0.06419200450181961, -0.017374446615576744, 0.029868455603718758, 0.0745367705821991, -0.013032211922109127, -0.039895180612802505, -0.04189450293779373, 0.03093390353024006, -0.06069251894950867, -0.03725068271160126, 0.031961970031261444, 0.04895143210887909, -0.15558156371116638, -0.04122735559940338, 0.006091058719903231, -0.011079743504524231, -0.06563618034124374, 0.02845907025039196, 0.02449793927371502, -0.03671998530626297, 0.016022777184844017, 0.08987879008054733, -0.01682625338435173, -0.018310386687517166, 0.024310994893312454, 0.059895649552345276, -0.027333250269293785, -0.017320655286312103, 0.01622227020561695, -0.058953188359737396, -0.011631328612565994, -0.05156479775905609, -0.03508288413286209, -0.085639588534832, -0.005799854639917612, -0.006943742278963327, -0.022705506533384323, -0.03302682563662529, -0.02016981691122055, -0.07230395823717117, 0.056337643414735794, -0.04858218505978584, -0.021897772327065468, -0.0022362947929650545, -0.02034536562860012, 0.02259860560297966, -0.017287807539105415, 0.009383775293827057, -0.013198107481002808, -0.07232832908630371, 0.025832466781139374, -0.025717247277498245, 0.02048417553305626, 0.05878029391169548, -0.03408703953027725, 0.08736152201890945, 0.018903758376836777, -0.02436858043074608, -0.004529461730271578, -0.0016122224042192101, -0.003420946653932333, 0.02247920259833336, -0.060471877455711365, -0.0015573797281831503, -0.00583329563960433, 0.05831616744399071, 0.025247899815440178, -0.022498497739434242, -0.06661860644817352, -0.009629890322685242, -0.35029399394989014, -0.05879729986190796, -0.010730685666203499, 0.001396316452883184, -0.03167502582073212, -0.07676750421524048, 0.009242796339094639, 0.0046388073824346066, -0.033265553414821625, 0.07692179083824158, 0.06888389587402344, 0.002419062191620469, 0.023949777707457542, -0.016558988019824028, -0.021596383303403854, 0.017655426636338234, -0.03225190192461014, 0.006086793262511492, -0.0045577529817819595, 0.04512656480073929, 0.017516283318400383, -0.005825982429087162, -0.05417506396770477, -0.024507155641913414, 0.0010401034960523248, -0.02297811023890972, 0.1642337143421173, 0.033834058791399, 0.011183775030076504, -0.0436527356505394, 0.049010418355464935, 0.016493581235408783, -0.00831734947860241, -0.05607607215642929, 0.012770756147801876, -0.005652999971061945, -0.028861019760370255, 0.023107735440135002, 0.008346430025994778, -0.013006845489144325, -0.05742854252457619, 0.014624882489442825, -0.0308852456510067, -0.0165693499147892, -0.008054622448980808, 0.00889158807694912, 0.0016596480272710323, -0.020930133759975433, -0.009778893552720547, 0.10225691646337509, 0.034525319933891296, -0.00763452984392643, 0.05511566624045372, 0.06110086664557457, 0.010928688570857048, -0.008115090429782867, -0.06640319526195526, -0.009203621186316013, -0.02046358399093151, 0.005960958078503609, 0.016243888065218925, 0.020599646493792534, 0.039256878197193146, -0.06258729845285416, -0.020860586315393448, 0.02373873069882393, 0.0019241758855059743, 0.005131277721375227, 0.0008320093038491905, 0.013745132833719254, -0.027353351935744286, 0.06081327795982361, 0.0031137869227677584, 0.009956964291632175, 0.013168726116418839, 0.05418995022773743, -0.006704323459416628, 0.05691566318273544, 0.052470073103904724, -0.00016740003775339574, 0.0334145613014698, -0.010036583989858627, 0.034716133028268814, 0.0024758726358413696, 0.012923486530780792, 0.05026613175868988, 0.012723260559141636, 0.0032568967435508966, 0.08003991097211838, 0.02082444168627262, 0.0011827220441773534, -0.005394614301621914, -0.03422302380204201, 0.00003588226900319569, 0.03745061531662941, -0.03142011910676956, -0.2681427001953125, 0.04519808664917946, 0.03988930210471153, 0.0628604143857956, 0.013255677185952663, -0.005512128118425608, 0.014137476682662964, -0.03703951835632324, -0.013911082409322262, 0.014490810222923756, 0.014613363891839981, 0.04894935339689255, -0.007904102094471455, -0.04717135801911354, -0.00895666517317295, -0.012453698553144932, 0.040536101907491684, 0.021966883912682533, -0.012899528257548809, 0.026000721380114555, 0.026379482820630074, -0.010255486704409122, 0.16663114726543427, 0.036216553300619125, -0.003430871292948723, 0.005564299412071705, -0.011114111170172691, -0.006204236298799515, 0.018760887905955315, 0.006075224839150906, 0.019710969179868698, -0.020391812548041344, 0.03177318349480629, -0.021864449605345726, 0.025405747815966606, -0.05605050176382065, -0.02707194909453392, 0.02699444629251957, 0.02596260793507099, -0.03883305937051773, -0.03678114712238312, 0.03781850263476372, -0.057492680847644806, 0.020307276397943497, 0.051957473158836365, 0.031074440106749535, 0.009487830102443695, -0.04081082344055176, -0.03617474436759949, 0.021962616592645645, -0.008149078115820885, -0.04818294942378998, -0.030692504718899727, -0.005554980132728815, 0.02289312332868576, 0.0758146122097969, 0.0183199942111969, -0.02726772241294384, 0.03138193488121033, 0.019419992342591286, -0.018522633239626884, -0.04613185673952103, 0.11325890570878983, -0.0011436165077611804, 0.021687215194106102 ]
[ 0.0161331444978714, 0.020711110904812813, 0.005912207532674074, 0.00436473498120904, -0.01368758361786604, -0.023123476654291153, 0.00914296880364418, -0.03946355730295181, -0.03342270106077194, -0.008056441321969032, -0.042846739292144775, 0.028799697756767273, 0.0328579805791378, -0.023700669407844543, 0.020777590572834015, 0.023743337020277977, -0.017425790429115295, -0.04116961732506752, 0.02080538310110569, 0.029819907620549202, -0.03760966286063194, 0.026734214276075363, 0.004612549673765898, -0.005475205834954977, 0.0008715830626897514, 0.03309435024857521, -0.021237052977085114, 0.06597410887479782, 0.033512864261865616, -0.1067030057311058, -0.009939445182681084, -0.05326405540108681, 0.008712020702660084, -0.009915083646774292, -0.007991861552000046, -0.017237311229109764, -0.03186457231640816, -0.010971076786518097, 0.015857132151722908, -0.009054448455572128, -0.0016204185085371137, -0.046986743807792664, -0.037202004343271255, 0.017259417101740837, -0.014497863128781319, 0.005501157604157925, -0.018381986767053604, 0.017861073836684227, -0.006511402316391468, -0.020686592906713486, -0.04411102086305618, 0.009285187348723412, -0.004838030785322189, -0.030810091644525528, 0.01706489361822605, -0.03087957389652729, -0.030326619744300842, 0.0028507502283900976, 0.003982351627200842, -0.019406678155064583, -0.00843127816915512, 0.011860677041113377, -0.034980226308107376, -0.02087566815316677, 0.0044792573899030685, -0.010187599807977676, -0.030357198789715767, 0.005670246668159962, 0.003401628229767084, 0.011230618692934513, -0.01092764362692833, 0.010017233900725842, -0.032088086009025574, -0.019830556586384773, -0.003021223470568657, -0.004130614455789328, 0.00464605400338769, -0.012453627772629261, 0.02161313034594059, -0.026458222419023514, -0.03298703208565712, 0.014664508402347565, 0.0180791188031435, 0.0340777188539505, 0.032901111990213394, -0.055914223194122314, -0.012601371854543686, -0.008108912967145443, 0.002082980237901211, -0.015924489125609398, -0.030438344925642014, -0.03548349812626839, 0.017398346215486526, 0.0665421336889267, -0.09334103018045425, 0.007794796489179134, 0.05962878838181496, -0.00028010725509375334, -0.003431296208873391, 0.8377789258956909, -0.027653124183416367, 0.026994014158844948, -0.030649350956082344, -0.008617316372692585, -0.024048103019595146, -0.007949265651404858, -0.00727252010256052, 0.002406367100775242, 0.029543805867433548, -0.05732050538063049, -0.0003020530566573143, 0.028492925688624382, 0.03269808366894722, 0.023801343515515327, -0.017183929681777954, 0.010865632444620132, -0.023242587223649025, -0.0009296059142798185, 0.007459750398993492, 0.04752363637089729, 0.010354701429605484, 0.01796085201203823, -0.00891174841672182, 0.019508447498083115, 0.025109749287366867, -0.16484668850898743, 0.019888509064912796, -7.593644282486037e-33, 0.03868125006556511, -0.021038353443145752, 0.011028265580534935, -0.00009936981950886548, 0.016245367005467415, 0.010046176612377167, -0.02325504831969738, -0.027485115453600883, -0.008521906100213528, -0.01279377844184637, 0.01792738400399685, 0.0029409935232251883, 0.004311125725507736, -0.012360746040940285, 0.06239154562354088, 0.017239227890968323, 0.0008066559676080942, 0.0477665551006794, 0.0021570229437202215, 0.005968189332634211, -0.00588349811732769, 0.03303536772727966, 0.03640695661306381, 0.01937374286353588, 0.0027483857702463865, 0.03415960446000099, -0.003392099170014262, 0.017772575840353966, 0.009774935431778431, -0.028611473739147186, -0.021778924390673637, 0.025370201095938683, -0.04524451121687889, -0.03895394876599312, -0.025898315012454987, -0.05252982676029205, -0.041503433138132095, -0.015755165368318558, -0.0352296382188797, -0.006562688387930393, -0.03925998881459236, 0.001939198118634522, -0.019668299704790115, -0.03046371228992939, -0.007702311035245657, 0.004116751719266176, -0.025274774059653282, 0.024377988651394844, -0.013582135550677776, 0.0049636331386864185, 0.010087177157402039, -0.021282833069562912, 0.015275208279490471, 0.028915071859955788, -0.03086935728788376, -0.003446336602792144, 0.005666526034474373, 0.019163023680448532, -0.010553755797445774, -0.008935773745179176, 0.0349557138979435, -0.015572034753859043, 0.013038191013038158, 0.04136146977543831, -0.029022667557001114, -0.0035063638351857662, 0.01863623596727848, 0.0018266461556777358, 0.012247230857610703, -0.00931721180677414, -0.04633767902851105, 0.05026845633983612, -0.017790835350751877, -0.043136194348335266, -0.007444326300173998, -0.0417313277721405, 0.006242400500923395, -0.030998002737760544, 0.007207858841866255, 0.04243845120072365, 0.023042956367135048, -0.006960728205740452, -0.027720032259821892, -0.03857750445604324, -0.004744670819491148, -0.03183681517839432, 0.01831926219165325, 0.004242829512804747, 0.03102979250252247, -0.0017707392107695341, 0.005768687929958105, 0.005932943895459175, -0.016957243904471397, -0.032509882003068924, -0.015994979068636894, 6.958327789432992e-33, 0.00006622381624765694, -0.007923709228634834, 0.015068509615957737, 0.011551589705049992, 0.01611289381980896, -0.006286691874265671, 0.07982439547777176, 0.007790536154061556, -0.014706194400787354, 0.0516853928565979, -0.01025702990591526, 0.01112713385373354, 0.024287400767207146, 0.03085624799132347, 0.050843335688114166, 0.005585916806012392, 0.008471458218991756, 0.0018831476336345077, 0.021021755412220955, 0.00351914600469172, -0.01360588800162077, -0.001135373837314546, 0.013844843953847885, 0.012155776843428612, 0.019688408821821213, 0.02353375218808651, -0.035445231944322586, -0.015448613092303276, 0.015041823498904705, -0.00040989325498230755, 0.004706607200205326, -0.003064264077693224, 0.0003966551157645881, 0.009188968688249588, 0.0061867074109613895, 0.04972440004348755, -0.005862038116902113, -0.028506623581051826, 0.022863101214170456, 0.008495680056512356, 0.030838027596473694, -0.025774093344807625, 0.00001877800968941301, 0.042148884385824203, 0.01703554578125477, -0.018191739916801453, -0.01418229378759861, 0.014319893904030323, -0.021643448621034622, 0.01990569941699505, 0.017910540103912354, 0.05389837548136711, -0.00006050898809917271, 0.03145785629749298, 0.026902126148343086, -0.03438075631856918, -0.025024615228176117, 0.007097262889146805, -0.021724222227931023, -0.0021264823153615, -0.033040888607501984, 0.03415583819150925, -0.04277157038450241, 0.035348158329725266, 0.0014641861198469996, -0.004013767931610346, -0.08272643387317657, -0.028713107109069824, 0.017653916031122208, 0.013213394209742546, -0.01091153547167778, -0.03244812414050102, 0.014330968260765076, 0.015829818323254585, 0.031972311437129974, 0.010175884701311588, -0.03387146815657616, 0.033811163157224655, -0.029590247198939323, 0.01885690912604332, 0.02894376777112484, 0.012460184283554554, 0.041912201792001724, -0.027125608175992966, -0.01175123080611229, 0.02745896577835083, -0.006345007568597794, 0.02682301588356495, -0.003576637012884021, -0.010908389464020729, 0.032364167273044586, -0.016389714553952217, 0.001970987766981125, 0.004628641065210104, 0.03766133263707161, -1.3023424116909155e-8, -0.0663331151008606, 0.007956276647746563, -0.004493061453104019, -0.0031706453301012516, 0.0343879871070385, -0.012776055373251438, -0.00020207716443110257, 0.005183960311114788, -0.02634381875395775, 0.022337768226861954, 0.08014921844005585, -0.01386988628655672, -0.0046805525198578835, 0.014137404039502144, 0.019650470465421677, -0.0564570389688015, 0.00400954857468605, -0.024274485185742378, 0.01653662510216236, 0.019045965746045113, 0.013974151574075222, 0.026217995211482048, -0.0065759881399571896, 0.005395776592195034, -0.011802458204329014, -0.02957461029291153, -0.019554240629076958, -0.09605790674686432, -0.027593569830060005, -0.012863376177847385, 0.0172512736171484, -0.027678022161126137, -0.008434967137873173, 0.018563857302069664, -0.03432869166135788, -0.024646827951073647, 0.005141029134392738, 0.018761856481432915, 0.012133355252444744, 0.012079652398824692, -0.01374513003975153, -0.024889208376407623, -0.026132380589842796, -0.035835567861795425, -0.0173694659024477, 0.015173396095633507, -0.02801424451172352, 0.013827473856508732, 0.014735928736627102, -0.057630859315395355, -0.009877674281597137, -0.02635456994175911, 0.013331825844943523, 0.027369502931833267, 0.04418496787548065, 0.01680086739361286, 0.018424058333039284, 0.0020698695443570614, 0.025136571377515793, 0.0033116850536316633, 0.010324067436158657, 0.04423985630273819, -0.03592753782868385, -0.04119370877742767 ]
python-selecting-certain-indexes-in-an-array
https://markhneedham.com/blog/2015/05/05/python-selecting-certain-indexes-in-an-array
false
2015-05-11 23:16:07
R: Cohort heatmap of Neo4j London meetup
[ "r-2", "rstats" ]
[ "R" ]
A few months ago I had a go at doing some http://www.markhneedham.com/blog/2015/02/24/r-cohort-analysis-of-neo4j-meetup-members/[cohort analysis of the Neo4j London meetup group] which was an interesting experiment but unfortunately resulted in a chart that was completely illegible. image::{{<siteurl>}}/uploads/2015/02/unnamed-chunk-5-3.png[] I wasn't sure how to progress from there but a few days ago I came across the http://www.r-bloggers.com/cohort-analysis-with-heatmap/[cohort heatmap] which seemed like a better way of visualising things over time. The underlying idea is still the same - we've comparing different cohorts of users against each other to see whether a change or intervention we did at a certain time had any impact. However, the way we display the cohorts changes and I think for the better. To recap, we start with the following data frame: [source,r] ---- df = read.csv("/tmp/df.csv") > df %>% sample_n(5) rsvp.time person.id time date 255 1.354277e+12 12228948 2012-11-30 12:05:08 2012-11 2475 1.407342e+12 19057581 2014-08-06 16:26:04 2014-08 3988 1.421769e+12 66122172 2015-01-20 15:58:02 2015-01 4411 1.419377e+12 165750262 2014-12-23 23:27:44 2014-12 1010 1.383057e+12 74602292 2013-10-29 14:24:32 2013-10 ---- And we need to transform this into a data frame which is grouped by cohort (members who attended their first meetup in a particular month). The following code gets us there: [source,r] ---- firstMeetup = df %>% group_by(person.id) %>% summarise(firstEvent = min(time), count = n()) %>% arrange(desc(count)) firstMeetup$date = format(as.Date(firstMeetup$firstEvent), "%Y-%m") countsForCohort = function(df, firstMeetup, cohort) { members = (firstMeetup %>% filter(date == cohort))$person.id attendance = df %>% filter(person.id %in% members) %>% count(person.id, date) %>% ungroup() %>% count(date) allCohorts = df %>% select(date) %>% unique cohortAttendance = merge(allCohorts, attendance, by = "date", all.x = TRUE) cohortAttendance[is.na(cohortAttendance) & cohortAttendance$date > cohort] = 0 cohortAttendance %>% mutate(cohort = cohort, retention = n / length(members), members = n) } cohorts = collect(df %>% select(date) %>% unique())[,1] cohortAttendance = data.frame() for(cohort in cohorts) { cohortAttendance = rbind(cohortAttendance,countsForCohort(df, firstMeetup, cohort)) } monthNumber = function(cohort, date) { cohortAsDate = as.yearmon(cohort) dateAsDate = as.yearmon(date) if(cohortAsDate > dateAsDate) { "NA" } else { paste(round((dateAsDate - cohortAsDate) * 12), sep="") } } cohortAttendanceWithMonthNumber = cohortAttendance %>% group_by(row_number()) %>% mutate(monthNumber = monthNumber(cohort, date)) %>% filter(monthNumber != "NA") %>% filter(!is.na(members)) %>% mutate(monthNumber = as.numeric(monthNumber)) %>% arrange(monthNumber) > cohortAttendanceWithMonthNumber %>% head(10) Source: local data frame [10 x 7] Groups: row_number() date n cohort retention members row_number() monthNumber 1 2011-06 4 2011-06 1.00 4 1 0 2 2011-07 1 2011-06 0.25 1 2 1 3 2011-08 1 2011-06 0.25 1 3 2 4 2011-09 2 2011-06 0.50 2 4 3 5 2011-10 1 2011-06 0.25 1 5 4 6 2011-11 1 2011-06 0.25 1 6 5 7 2012-01 1 2011-06 0.25 1 7 7 8 2012-04 2 2011-06 0.50 2 8 10 9 2012-05 1 2011-06 0.25 1 9 11 10 2012-06 1 2011-06 0.25 1 10 12 ---- Now let's create our first heatmap. [source,r] ---- t <- max(cohortAttendanceWithMonthNumber$members) cols <- c("#e7f0fa", "#c9e2f6", "#95cbee", "#0099dc", "#4ab04a", "#ffd73e", "#eec73a", "#e29421", "#e29421", "#f05336", "#ce472e") ggplot(cohortAttendanceWithMonthNumber, aes(y=cohort, x=date, fill=members)) + theme_minimal() + geom_tile(colour="white", linewidth=2, width=.9, height=.9) + scale_fill_gradientn(colours=cols, limits=c(0, t), breaks=seq(0, t, by=t/4), labels=c("0", round(t/4*1, 1), round(t/4*2, 1), round(t/4*3, 1), round(t/4*4, 1)), guide=guide_colourbar(ticks=T, nbin=50, barheight=.5, label=T, barwidth=10)) + theme(legend.position='bottom', legend.direction="horizontal", plot.title = element_text(size=20, face="bold", vjust=2), axis.text.x=element_text(size=8, angle=90, hjust=.5, vjust=.5, face="plain")) + ggtitle("Cohort Activity Heatmap (number of members who attended event)") ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-11_23-55-56.png[2015 05 11 23 55 56,598] 't' is the maximum number of members within a cohort who attended a meetup in a given month. This makes it easy to see which cohorts started with the most members but makes it difficult to compare their retention over time. We can fix that by showing the percentage of members in the cohort who attend each month rather than using absolute values. To do that we must first add an extra column containing the percentage values: [source,r] ---- cohortAttendanceWithMonthNumber$retentionPercentage = ifelse(!is.na(cohortAttendanceWithMonthNumber$retention), cohortAttendanceWithMonthNumber$retention * 100, 0) t <- max(cohortAttendanceWithMonthNumber$retentionPercentage) cols <- c("#e7f0fa", "#c9e2f6", "#95cbee", "#0099dc", "#4ab04a", "#ffd73e", "#eec73a", "#e29421", "#e29421", "#f05336", "#ce472e") ggplot(cohortAttendanceWithMonthNumber, aes(y=cohort, x=date, fill=retentionPercentage)) + theme_minimal() + geom_tile(colour="white", linewidth=2, width=.9, height=.9) + scale_fill_gradientn(colours=cols, limits=c(0, t), breaks=seq(0, t, by=t/4), labels=c("0", round(t/4*1, 1), round(t/4*2, 1), round(t/4*3, 1), round(t/4*4, 1)), guide=guide_colourbar(ticks=T, nbin=50, barheight=.5, label=T, barwidth=10)) + theme(legend.position='bottom', legend.direction="horizontal", plot.title = element_text(size=20, face="bold", vjust=2), axis.text.x=element_text(size=8, angle=90, hjust=.5, vjust=.5, face="plain")) + ggtitle("Cohort Activity Heatmap (number of members who attended event)") ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-12_00-01-55.png[2015 05 12 00 01 55,599] This version allows us to compare cohorts against each other but now we don't have the exact numbers which means earlier cohorts will look better since there are less people in them. We can get the best of both worlds by keeping this visualisation but showing the actual values inside each box: [source,r] ---- t <- max(cohortAttendanceWithMonthNumber$retentionPercentage) cols <- c("#e7f0fa", "#c9e2f6", "#95cbee", "#0099dc", "#4ab04a", "#ffd73e", "#eec73a", "#e29421", "#e29421", "#f05336", "#ce472e") ggplot(cohortAttendanceWithMonthNumber, aes(y=cohort, x=date, fill=retentionPercentage)) + theme_minimal() + geom_tile(colour="white", linewidth=2, width=.9, height=.9) + scale_fill_gradientn(colours=cols, limits=c(0, t), breaks=seq(0, t, by=t/4), labels=c("0", round(t/4*1, 1), round(t/4*2, 1), round(t/4*3, 1), round(t/4*4, 1)), guide=guide_colourbar(ticks=T, nbin=50, barheight=.5, label=T, barwidth=10)) + theme(legend.position='bottom', legend.direction="horizontal", plot.title = element_text(size=20, face="bold", vjust=2), axis.text.x=element_text(size=8, angle=90, hjust=.5, vjust=.5, face="plain")) + ggtitle("Cohort Activity Heatmap (number of members who attended event)") + geom_text(aes(label=members),size=3) ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-12_00-04-31.png[2015 05 12 00 04 31,599] What we can learn overall is that the majority of people seem to have a passing interest and then we have a smaller percentage who will continue to come to events. It seems like we did a better job at retaining attendees in the middle of last year - one hypothesis is that the events we ran around then were more compelling but I need to do more analysis. Next I'm going to drill further into some of the recent events and see what cohorts the attendees came from.
null
null
[ 0.031806379556655884, -0.040724460035562515, 0.004006223753094673, 0.02956586889922619, 0.07800581306219101, 0.014423759654164314, 0.03957682475447655, 0.02023041993379593, 0.01812349073588848, -0.009393210522830486, 0.0077471560798585415, -0.019021065905690193, -0.04948761314153671, 0.0254412479698658, -0.010355093516409397, 0.06890788674354553, 0.06180531531572342, -0.015209482051432133, 0.004899091552942991, 0.01254305150359869, 0.04893127456307411, 0.034647636115550995, 0.008390633389353752, 0.03429443761706352, 0.03190303593873978, -0.016274450346827507, 0.02563018724322319, -0.01733379252254963, -0.043797727674245834, 0.016212044283747673, 0.03278324007987976, 0.013467159122228622, 0.01753394305706024, 0.002058035461232066, 0.044781383126974106, -0.0015655092429369688, -0.03231333568692207, 0.014991078525781631, 0.009750443510711193, -0.014895188622176647, -0.07178103178739548, 0.031216030940413475, -0.021512344479560852, 0.024378696456551552, -0.02061358466744423, 0.015158383175730705, -0.036638855934143066, 0.019871434196829796, 0.01644991524517536, 0.010273754596710205, -0.0767575278878212, 0.009254480712115765, 0.029989255592226982, -0.012990408577024937, -0.024127915501594543, 0.03469455614686012, 0.01765889674425125, -0.06258898228406906, 0.032419800758361816, -0.03445568308234215, 0.007297595497220755, -0.005262670572847128, -0.007706901058554649, 0.02526813931763172, -0.017889130860567093, -0.047870658338069916, 0.006660183425992727, 0.05497478321194649, -0.022888600826263428, -0.0043067666701972485, -0.0035757357254624367, 0.006531211081892252, -0.025067802518606186, 0.001871728920377791, 0.0024670178536325693, -0.04513884335756302, -0.010647380724549294, 0.062117211520671844, 0.028840472921729088, 0.008898390457034111, -0.009806230664253235, -0.019684499129652977, 0.021697456017136574, 0.01987445168197155, 0.0024580860044807196, -0.03140486404299736, -0.006955163553357124, -0.05614549294114113, -0.06240241602063179, 0.03449205681681633, -0.019361799582839012, -0.04418834298849106, 0.029071707278490067, 0.02488289773464203, -0.01132320798933506, 0.005721328780055046, 0.023618794977664948, -0.00019455609435681254, 0.0037666652351617813, -0.026785850524902344, -0.03870765119791031, -0.02352505922317505, 0.01574110798537731, 0.032289039343595505, -0.08243012428283691, -0.010634913109242916, -0.026104889810085297, -0.01844966970384121, -0.0041117616929113865, -0.011006895452737808, -0.014146323315799236, 0.023071471601724625, -0.022945530712604523, 0.018593955785036087, -0.07028213888406754, 0.07167998701334, 0.03157283738255501, -0.008178540505468845, -0.007342183031141758, -0.011169142089784145, 0.023621056228876114, 0.035676825791597366, 0.000874499324709177, 0.06824326515197754, -0.029029859229922295, 0.06974531710147858, 0.027262458577752113, 0.029649555683135986, -0.026753444224596024, -0.06757353991270065, -0.016653520986437798, 0.0517759770154953, -0.03813741356134415, -0.006714313756674528, -0.006821334362030029, -0.04340336099267006, -0.008827968500554562, 0.0003927055513486266, 0.07211251556873322, 0.03768378496170044, 0.027765747159719467, -0.041935402899980545, 0.019758086651563644, 0.00891131442040205, 0.030384628102183342, 0.02580045536160469, -0.035757701843976974, -0.045961108058691025, -0.05195176228880882, -0.02002316154539585, 0.036627303808927536, 0.019042665138840675, 0.061022646725177765, -0.018049798905849457, 0.028014136478304863, 0.0946737602353096, 0.02158370055258274, -0.003963351249694824, 0.0009014634415507317, 0.006468415260314941, 0.050318971276283264, 0.045175403356552124, 0.009282241575419903, 0.0665411725640297, 0.0006538967718370259, -0.02680407650768757, -0.003927023150026798, 0.022473357617855072, -0.03721340745687485, 0.022478241473436356, -0.03773859515786171, -0.05456709489226341, 0.04689498245716095, -0.02233710139989853, -0.008813760243356228, 0.05255148187279701, 0.07549528777599335, 0.04304257035255432, 0.018692538142204285, 0.0049087880179286, -0.08089642226696014, 0.051091380417346954, 0.02265252359211445, 0.03055468760430813, 0.04087797552347183, -0.025037972256541252, 0.07583430409431458, 0.024195736274123192, 0.01754894107580185, 0.03692738339304924, -0.0666879341006279, -0.0777287483215332, 0.0027288568671792746, -0.0367557629942894, 0.0539342537522316, -0.04290064051747322, 0.0447731614112854, 0.06002422794699669, 0.002621627412736416, 0.034226227551698685, 0.002050278475508094, -0.0010154701303690672, 0.03364172950387001, -0.0067329928278923035, -0.05076082423329353, 0.02282831445336342, 0.013450002297759056, -0.03391401097178459, -0.03127158433198929, 0.013369053602218628, -0.036522623151540756, 0.0384800061583519, 0.008174537681043148, -0.018209218978881836, 0.041495431214571, 0.02880987524986267, 0.07703681290149689, 0.032836198806762695, 0.011044957675039768, -0.038168758153915405, 0.04922757297754288, -0.013712841086089611, -0.026089858263731003, -0.032906632870435715, -0.01752065308392048, 0.11743520945310593, 0.07002390176057816, -0.02080688439309597, -0.036543384194374084, 0.0018295104382559657, 0.022620808333158493, -0.009466070681810379, 0.004142968449741602, -0.009825330227613449, 0.00958099216222763, 0.004070401657372713, -0.03728161379694939, -0.040521055459976196, -0.0029967003501951694, -0.05201636999845505, 0.03846004977822304, 0.050014495849609375, 0.00034601829247549176, 0.0421668104827404, -0.01323771383613348, 0.007386111654341221, -0.008700311183929443, -0.011214470490813255, -0.09447532892227173, 0.014520111493766308, 0.01785167306661606, 0.0032426537945866585, 0.0563737116754055, -0.04049481078982353, -0.006043792702257633, -0.0020391966681927443, -0.03402547538280487, 0.030198633670806885, 0.07783853262662888, 0.057315893471241, 0.010346267372369766, 0.04740871489048004, -0.045282743871212006, -0.0032384309452027082, -0.004404984414577484, -0.043432775884866714, -0.06098086014389992, -0.045698363333940506, 0.011698014102876186, -0.010200222954154015, 0.038575392216444016, -0.0297133456915617, -0.004883472807705402, 0.03656540438532829, 0.006014771293848753, -0.034751519560813904, 0.049223240464925766, -0.0020588075276464224, -0.000018714450561674312, -0.005607197061181068, -0.014000526629388332, 0.04544635862112045, -0.01729637011885643, -0.011458070017397404, -0.0058091976679861546, -0.04542288929224014, 0.036184098571538925, -0.021843597292900085, -0.020416997373104095, 0.027917832136154175, 0.02679532952606678, 0.06036245822906494, 0.03870910406112671, -0.009668693877756596, 0.056124623864889145, 0.014359409920871258, 0.0069548566825687885, 0.005061101634055376, -0.015593789517879486, 0.059643976390361786, -0.008352027274668217, 0.023983387276530266, 0.06572049856185913, -0.025594770908355713, -0.009064946323633194, -0.04391345754265785, 0.012886798940598965, -0.03207959234714508, -0.28155890107154846, 0.03387996926903725, -0.03500989452004433, -0.04837239161133766, 0.0032794387079775333, -0.05761086195707321, 0.024647146463394165, -0.01706685684621334, -0.03440750390291214, -0.000038747661164961755, 0.026312565430998802, -0.032538384199142456, -0.034047093242406845, 0.050626665353775024, 0.022896738722920418, 0.03185516968369484, -0.013697262853384018, -0.052560992538928986, 0.006418106611818075, 0.046242304146289825, 0.029537910595536232, -0.029211876913905144, -0.01540489960461855, 0.045144807547330856, 0.0107471514493227, 0.07096739858388901, -0.07573400437831879, 0.010060888715088367, -0.0747908279299736, -0.04650991037487984, 0.022879119962453842, -0.03798472508788109, 0.04140952229499817, 0.0005427465657703578, -0.004225701559334993, -0.028833020478487015, 0.03610130771994591, 0.028612740337848663, 0.00013963425590191036, -0.011786426417529583, -0.031454719603061676, -0.028669441118836403, -0.007302943151444197, -0.0180139672011137, 0.08380083739757538, 0.021886151283979416, -0.0548308864235878, 0.01777230016887188, -0.016257179901003838, 0.06326848268508911, -0.011014510877430439, -0.019841888919472694, -0.019099589437246323, 0.033541060984134674, -0.04334598034620285, -0.05478328466415405, -0.02239908277988434, -0.0008681824547238648, -0.03907899186015129, -0.030731741338968277, -0.025892645120620728, -0.03770911693572998, 0.02565711922943592, -0.055320799350738525, -0.0278753861784935, -0.06467456370592117, -0.0936543270945549, -0.029138680547475815, 0.05473112314939499, 0.008562808856368065, -0.02780301310122013, 0.01221657544374466, -0.025449033826589584, -0.0930071771144867, -0.018168970942497253, -0.044341810047626495, 0.004977099131792784, -0.005500958301126957, -0.004226430784910917, 0.06532719731330872, -0.041314899921417236, -0.06055364012718201, 0.022867949679493904, 0.010253237560391426, 0.02409857138991356, 0.006930449511855841, 0.004674235824495554, -0.0014639809960499406, -0.05617186799645424, -0.002629799535498023, 0.06108677387237549, -0.035690341144800186, -0.024542273953557014, 0.012101239524781704, -0.013317937031388283, 0.03612056374549866, 0.003923157695680857, 0.01486393716186285, 0.029833218082785606, 0.03402216359972954, 0.030163966119289398, -0.05691640451550484, 0.011805098503828049, -0.0517142117023468, -0.052543431520462036, -0.012752970680594444, -0.05624271556735039, 0.018139740452170372, 0.025481579825282097, 0.006422525271773338, 0.021641835570335388, -0.026431826874613762, 0.026988664641976357, -0.06927937269210815, -0.005522712599486113, 0.008867023512721062, -0.0005965233431197703, 0.02098195254802704, 0.03655986487865448, -0.01599685288965702, -0.05159137025475502, 0.004417814780026674, -0.007040841039270163, -0.011377008631825447, -0.041539039462804794, -0.01816687174141407, -0.009559856727719307, -0.01784639246761799, 0.016032781451940536, 0.0224774107336998, -0.020941371098160744, 0.022475743666291237, 0.036814115941524506, -0.03857941925525665, 0.053831540048122406, -0.019286755472421646, -0.049244482070207596, -0.02020156942307949, 0.013579699210822582, 0.006332624703645706, -0.017893481999635696, 0.021740494295954704, 0.0008728356333449483, 0.0442424975335598, 0.00018090476805809885, 0.005317820701748133, 0.012762865051627159, -0.014299173839390278, 0.01639535464346409, -0.00013170497550163418, 0.007820524275302887, -0.002460759598761797, -0.005523075349628925, -0.027458110824227333, -0.02733963541686535, -0.01088996883481741, 0.05281062424182892, -0.006279462017118931, -0.021779123693704605, -0.04237974435091019, 0.014483686536550522, -0.043373968452215195, -0.009189905598759651, -0.02640722133219242, 0.021901216357946396, 0.061154548078775406, -0.005856621079146862, 0.010367130860686302, 0.006179478485137224, -0.011267692781984806, -0.0030290065333247185, 0.012511386536061764, -0.033393505960702896, 0.015148944221436977, -0.015264862217009068, -0.011436914093792439, 0.02616214193403721, 0.010648304596543312, 0.03321035951375961, 0.010249878279864788, -0.013932641595602036, -0.016856824979186058, 0.016514306887984276, -0.007512458600103855, 0.05293339118361473, 0.06719395518302917, -0.008884025737643242, -0.01492886058986187, -0.007765765767544508, -0.010412180796265602, -0.01446028146892786, -0.012675409205257893, -0.025056345388293266, -0.0011293235002085567, -0.04448726400732994, -0.07228900492191315, 0.021099872887134552, 0.005080852657556534, 0.0030758464708924294, 0.025791514664888382, -0.006859534420073032, 0.0031532275024801493, -0.00800783559679985, 0.03696945682168007, 0.05728473514318466, -0.061481911689043045, -0.02176709845662117, -0.008031565696001053, -0.03761957958340645, 0.010293948464095592, 0.010832597501575947, -0.058064479380846024, -0.029914600774645805, -0.042107805609703064, 0.04031587764620781, -0.026824185624718666, -0.056412309408187866, -0.06027858704328537, 0.01649046689271927, 0.022295964881777763, 0.029720036312937737, 0.005308923777192831, -0.010868099518120289, -0.007272569928318262, 0.005203780252486467, 0.029691798612475395, -0.030388319864869118, -0.023699427023530006, 0.015845900401473045, -0.0164783988147974, 0.0010784963378682733, -0.01145503856241703, 0.016891727223992348, 0.020888395607471466, -0.040320757776498795, -0.001972265774384141, -0.03471582010388374, 0.013304407708346844, 0.015851853415369987, 0.04470163583755493, -0.020661352202296257, -0.00965583510696888, -0.0387469045817852, 0.011533158831298351, -0.012472130358219147, 0.01308596320450306, -0.004686188884079456, -0.0016930557321757078, 0.022383105009794235, 0.04424166679382324, 0.02806396782398224, -0.015509768389165401, -0.024870803579688072, -0.05439412593841553, 0.05321115627884865, -0.02394317463040352, -0.04627157747745514, -0.049003392457962036, -0.04036780074238777, 0.0013407564256340265, 0.003381934016942978, 0.007091835141181946, -0.011472519487142563, 0.03946765884757042, 0.03687676042318344, 0.036375049501657486, 0.056120261549949646, -0.0057127042673528194, 0.02927320823073387, -0.044455964118242264, 0.0030133365653455257, -0.08079574257135391, -0.0042701889760792255, 0.037046920508146286, 0.018435131758451462, -0.013800733722746372, -0.009381133131682873, -0.03239670768380165, 0.026820236817002296, -0.07173522561788559, -0.04608330875635147, 0.027173448354005814, -0.04490641877055168, 0.040922265499830246, 0.014103672467172146, -0.051194410771131516, -0.005090904422104359, 0.02560948021709919, -0.04952634871006012, -0.026611916720867157, -0.020458891987800598, 0.05633145198225975, -0.049140337854623795, 0.021746518090367317, -0.017380887642502785, -0.010169560089707375, 0.061024751514196396, 0.007719237357378006, 0.011990495026111603, 0.05433347821235657, -0.0205656960606575, 0.020893501117825508, 0.029279761016368866, -0.007708744611591101, -0.01320742443203926, 0.015460772439837456, 0.0097409188747406, -0.029154855757951736, 0.021265652030706406, 0.03330637887120247, 0.004737368784844875, -0.04771212860941887, 0.08894333988428116, -0.00047248005284927785, -0.03729807958006859, -0.04303910583257675, 0.018740516155958176, -0.02420673705637455, 0.005861199460923672, -0.01717640645802021, 0.004185165278613567, -0.021975798532366753, 0.05967340245842934, -0.020389659330248833, 0.009203150868415833, 0.06851182132959366, -0.007257845252752304, 0.008283481933176517, -0.00913575105369091, 0.07801719009876251, 0.10656723380088806, 0.06841646134853363, 0.00925116240978241, 0.07037395238876343, -0.045407287776470184, -0.03799939528107643, 0.011766058392822742, -0.01666499301791191, -0.025047875940799713, -0.018463151529431343, 0.016753269359469414, 0.09013289213180542, -0.042057786136865616, 0.07047788798809052, -0.01181680615991354, -0.022393709048628807, -0.030290434136986732, 0.0058091189712285995, 0.04260189086198807, 0.04746809974312782, 0.009135322645306587, 0.029906952753663063, -0.04995814710855484, -0.027679404243826866, 0.03303133696317673, -0.007264202926307917, 0.0004759759467560798, 0.02545924484729767, -0.007455781102180481, 0.010160890407860279, 0.01663189008831978, 0.022709209471940994, 0.06726707518100739, -0.04390477016568184, -0.005206276662647724, -0.007540171500295401, 0.016553562134504318, -0.009141304530203342, 0.033003538846969604, 0.0014536569360643625, 0.0002906490408349782, -0.007426666095852852, -0.044620122760534286, -0.04508000612258911, -0.00380132207646966, -0.04138188809156418, 0.03029964119195938, -0.041522033512592316, 0.0054941438138484955, 0.0017296989681199193, -0.030707115307450294, -0.04255726933479309, -0.048054039478302, -0.02510596625506878, -0.0639515370130539, -0.07319940626621246, -0.0010309888748452067, 0.014130801893770695, -0.020863832905888557, -0.02283935621380806, -0.007967988029122353, -0.03604072704911232, -0.00868142582476139, 0.02876603789627552, -0.05527827516198158, -0.01281063910573721, 0.0076036518439650536, 0.00671907514333725, 0.011611662805080414, 0.01699206233024597, 0.021407024934887886, 0.013552157208323479, 0.0031628147698938847, -0.02789323590695858, 0.03455357626080513, 0.06238889321684837, 0.03226391598582268, -0.011739482171833515, -0.0801856517791748, 0.01266211736947298, 0.017836570739746094, -0.017765698954463005, -0.0895383208990097, 0.04563481733202934, 0.03215593472123146, 0.012348023243248463, 0.01848722994327545, -0.019403126090765, -0.028769759461283684, -0.009689456783235073, -0.01338275708258152, -0.00919457245618105, 0.025029953569173813, 0.021777819842100143, -0.031000955030322075, 0.06914719939231873, 0.059028614312410355, -0.027517875656485558, -0.024478912353515625, -0.05466350167989731, 0.004305546171963215, -0.011670861393213272, -0.05955616012215614, -0.043541207909584045, -0.06616488844156265, -0.10633198916912079, -0.0022254253271967173, 0.02411181852221489, -0.027539459988474846, -0.017809201031923294, -0.006594654638320208, 0.007047644350677729, -0.016013262793421745, 0.019654160365462303, -0.015105034224689007, 0.041645798832178116, -0.015519257634878159, -0.009873625822365284, -0.031428687274456024, 0.011429526843130589, -0.011211003176867962, 0.027863727882504463, -0.018037384375929832, -0.07147303968667984, 0.022526634857058525, -0.008865483105182648, 0.003945573698729277, 0.043013256043195724, 0.01910221576690674, 0.028809724375605583 ]
[ -0.05528128892183304, -0.013296528719365597, -0.033544134348630905, 0.009581872262060642, 0.0737793892621994, -0.014277973212301731, -0.018652647733688354, 0.00889429822564125, -0.010276013985276222, -0.046136584132909775, 0.060682591050863266, -0.04772457107901573, 0.024345695972442627, 0.00027324233087711036, 0.03247268125414848, -0.0012328210286796093, -0.024737587198615074, -0.08702521026134491, -0.017053840681910515, 0.07349321991205215, -0.06717965006828308, -0.03201162815093994, -0.010666989721357822, -0.010813308879733086, 0.04608207941055298, 0.038170602172613144, 0.035400062799453735, -0.05157388001680374, -0.029188545420765877, -0.1890919953584671, 0.023444363847374916, 0.02323067933320999, 0.06674026697874069, -0.02005656808614731, -0.0003703873953782022, 0.039839696139097214, 0.06261260062456131, 0.004947628825902939, 0.02258823625743389, 0.04242108389735222, 0.010171612724661827, 0.006636087317019701, -0.037581223994493484, 0.0034596070181578398, 0.035132307559251785, 0.03887707740068436, -0.050502095371484756, -0.002782398834824562, -0.04542164131999016, 0.034761860966682434, -0.04019287973642349, -0.024642737582325935, -0.0025227819569408894, 0.02933276630938053, 0.012729681096971035, 0.04338151216506958, 0.024684611707925797, 0.020811403170228004, 0.024218667298555374, 0.010924170725047588, 0.001917854999192059, 0.011633242480456829, -0.1840399205684662, 0.08349508792161942, 0.009057031013071537, 0.03845103457570076, -0.02157512865960598, -0.018238753080368042, 0.013332231901586056, 0.056116338819265366, 0.008053665049374104, 0.00937122106552124, -0.020629897713661194, 0.023196233436465263, 0.0285155288875103, 0.013641543686389923, 0.0005101303104311228, 0.01887507364153862, 0.04522579535841942, -0.02741840109229088, -0.012941996566951275, 0.07171660661697388, -0.004847776610404253, -0.033966898918151855, -0.0017668921500444412, -0.021469350904226303, -0.022187303751707077, 0.014085349626839161, -0.02365947514772415, 0.0268026664853096, 0.020319126546382904, 0.020570335909724236, 0.025741182267665863, 0.007109794765710831, -0.08699315786361694, -0.012865460477769375, 0.048880819231271744, 0.03156643360853195, 0.015260972082614899, 0.4089614748954773, -0.03230241686105728, 0.014010769315063953, 0.042419638484716415, 0.08412443101406097, -0.013337991200387478, -0.043818388134241104, 0.013653759844601154, -0.07320623844861984, 0.05470990389585495, -0.010349550284445286, 0.005776716861873865, -0.006594148464500904, 0.047203097492456436, -0.0782870277762413, 0.015352641232311726, -0.010818284004926682, 0.05629171431064606, 0.012384367175400257, 0.02807728201150894, 0.02417883835732937, -0.00820392370223999, -0.011362734250724316, 0.042623963207006454, -0.013377255760133266, 0.020614394918084145, 0.012269645929336548, 0.029368918389081955, 0.05679111182689667, 0.06308770179748535, -0.03330127149820328, 0.07454925030469894, 0.0036315505858510733, -0.09101232886314392, 0.030583539977669716, -0.025365833193063736, -0.020057236775755882, 0.010283943265676498, -0.02886674739420414, -0.006088725291192532, 0.020112229511141777, 0.02460685558617115, -0.02173498645424843, 0.029404042288661003, -0.024105440825223923, -0.03643856570124626, 0.18429529666900635, -0.04471883922815323, -0.014931386336684227, -0.019110897555947304, -0.02336861751973629, 0.030640294775366783, 0.03491860628128052, -0.03205496072769165, -0.04284890368580818, -0.009671132080256939, 0.01791115663945675, 0.09738477319478989, -0.030447550117969513, -0.054237570613622665, -0.006179900374263525, -0.007537902798503637, -0.05650366097688675, -0.029773296788334846, 0.04248615726828575, 0.08633273839950562, -0.1067860797047615, 0.013132018968462944, 0.01798243075609207, 0.037960853427648544, -0.07013530284166336, 0.03523982688784599, -0.010890120640397072, -0.011181404814124107, 0.009323925711214542, 0.04523275047540665, -0.008705920539796352, -0.0158216655254364, 0.01441197283565998, 0.04073970392346382, 0.010685895569622517, 0.0057675945572555065, -0.013410142622888088, -0.05881478264927864, 0.015306354500353336, -0.06065972149372101, -0.0679425299167633, -0.06884708255529404, 0.007334832102060318, -0.0021668472327291965, -0.0067127966322004795, -0.022125152871012688, -0.03158993646502495, -0.11302924156188965, 0.07915104925632477, -0.057998158037662506, -0.030832847580313683, -0.004500146023929119, -0.0007884798687882721, -0.0343417190015316, -0.02948886528611183, -0.04083407670259476, 0.016622867435216904, -0.014830791391432285, 0.04407130554318428, -0.034731898456811905, 0.03151911497116089, 0.056291427463293076, -0.05629396811127663, 0.11654772609472275, 0.024116715416312218, -0.014057891443371773, -0.024302948266267776, 0.0025515537708997726, 0.020496243610978127, 0.01194232888519764, 0.0027002734132111073, 0.013120709918439388, -0.04411270096898079, -0.006252015940845013, 0.05339610576629639, 0.02137657068669796, -0.009542230516672134, 0.0010895830346271396, -0.35748252272605896, -0.028596116229891777, 0.013626561500132084, -0.001983482390642166, -0.015154223889112473, -0.04500100761651993, 0.020350243896245956, -0.02794712409377098, 0.01779460906982422, 0.05862002819776535, 0.06310457736253738, 0.04715427756309509, -0.02266891673207283, -0.0626961812376976, -0.0037376394029706717, 0.027137961238622665, -0.016956748440861702, 0.0014903302071616054, -0.04924917221069336, -0.012472467496991158, -0.020002491772174835, -0.021753868088126183, -0.016630742698907852, -0.03135811164975166, 0.018886471167206764, -0.03192812204360962, 0.11622580140829086, 0.02542632818222046, -0.0025239840615540743, -0.03897647187113762, 0.029801512137055397, -0.004286792129278183, -0.009566007182002068, -0.08541696518659592, 0.02095753140747547, -0.026188718155026436, -0.0009939598385244608, -0.02191157080233097, -0.02470487728714943, -0.049164921045303345, -0.04866586625576019, -0.0007698016706854105, -0.032528962939977646, -0.05727437883615494, -0.09064631909132004, 0.030680816620588303, -0.010234059765934944, -0.007493661250919104, -0.033115845173597336, 0.08096121996641159, 0.0057474239729344845, -0.02264629304409027, 0.021289683878421783, 0.017658771947026253, 0.024451764300465584, -0.0248094629496336, -0.10921669006347656, 0.015068374574184418, -0.006855691317468882, -0.0047426987439394, 0.012963811866939068, 0.04738336056470871, 0.03616928681731224, -0.0784568339586258, -0.02181653119623661, -0.017032666131854057, -0.02393546886742115, -0.035049233585596085, 0.010412956587970257, -0.020037934184074402, -0.009370996616780758, 0.11653192341327667, -0.03543459251523018, 0.011419341899454594, 0.035775117576122284, 0.012973702512681484, -0.07464871555566788, -0.002891714684665203, 0.01215845812112093, 0.023707885295152664, 0.04276662692427635, -0.05461615324020386, 0.03315595164895058, -0.00971665047109127, -0.007589459419250488, 0.027157075703144073, -0.0028332816436886787, -0.03002532571554184, 0.06581570953130722, 0.03496311977505684, -0.013880879618227482, -0.023593595251441002, -0.03198885917663574, -0.04924572631716728, 0.03345255181193352, -0.00472400663420558, -0.24363002181053162, 0.040315914899110794, 0.023166537284851074, 0.038122959434986115, 0.014674223028123379, 0.01500121783465147, 0.01514655165374279, -0.021629860624670982, -0.003052186220884323, 0.0056758360005915165, 0.0367356538772583, 0.04140263423323631, 0.03283099830150604, -0.015330002643167973, 0.015385362319648266, -0.004485036712139845, 0.016684288159012794, 0.002144901780411601, 0.01052139699459076, -0.0032530762255191803, 0.03134371340274811, -0.05060403048992157, 0.11950760334730148, 0.009350155480206013, 0.010040315799415112, 0.01134993601590395, -0.021012015640735626, 0.0009517624857835472, 0.06920506805181503, -0.021795887500047684, -0.021840916946530342, 0.022156277671456337, 0.004521867725998163, 0.025463145226240158, 0.022051643580198288, -0.02883891947567463, -0.01989264041185379, 0.02319946512579918, 0.02651742286980152, -0.013345042243599892, 0.03609006851911545, -0.0013190876925364137, -0.02134302817285061, 0.04508981853723526, 0.08527573943138123, -0.01175213884562254, 0.01323816366493702, -0.04757031053304672, -0.04791215807199478, -0.014101624488830566, -0.01741618663072586, -0.042939022183418274, -0.010340609587728977, 0.013449249789118767, 0.025354526937007904, 0.067043237388134, 0.010275858454406261, -0.03221074864268303, 0.04327910766005516, -0.009096088819205761, -0.04031144827604294, -0.018336350098252296, 0.058403342962265015, 0.012930088676512241, 0.013804730959236622 ]
[ -0.0032426819670945406, 0.037703726440668106, -0.0017107202438637614, 0.03411894664168358, 0.01278847735375166, 0.0036998498253524303, -0.025233382359147072, 0.017719151452183723, -0.015892669558525085, -0.030250810086727142, -0.010283798910677433, 0.001578369177877903, 0.009359936229884624, -0.015712806954979897, 0.030952148139476776, -0.046635255217552185, 0.0010263390140607953, -0.014655975624918938, 0.04777585342526436, -0.010605551302433014, -0.047156013548374176, 0.009841471910476685, 0.01948021911084652, 0.008132491260766983, -0.02957405149936676, 0.03165670484304428, -0.008572429418563843, -0.014127426780760288, 0.006347896996885538, -0.049917127937078476, -0.011908515356481075, -0.023921484127640724, -0.020464813336730003, 0.0032608271576464176, -0.0378677137196064, 0.01818915642797947, -0.0041101654060184956, 0.03747459128499031, 0.0008878082735463977, 0.053422801196575165, 0.0031868796795606613, -0.01847568340599537, -0.01454339362680912, 0.010813239961862564, 0.0288680512458086, -0.014933710917830467, -0.032470062375068665, 0.009562459774315357, -0.031138472259044647, 0.0014137611724436283, -0.05165226012468338, -0.017574938014149666, -0.04496711492538452, 0.019926339387893677, 0.0027529641520231962, 0.00019271676137577742, -0.04166600480675697, -0.03776503726840019, -0.04312829300761223, -0.00891223456710577, -0.019764073193073273, 0.0008534544031135738, -0.05415630340576172, 0.00510489521548152, -0.0034738839603960514, 0.013422193937003613, 0.0006096637807786465, 0.03191373869776726, 0.027285221964120865, 0.017191944643855095, -0.025221392512321472, 0.05344521626830101, -0.06402192264795303, -0.04471489042043686, -0.026258787140250206, 0.02522488869726658, 0.02307252399623394, -0.009505260735750198, 0.031081799417734146, -0.026830732822418213, -0.02578534185886383, 0.01456884853541851, 0.02556806243956089, 0.02738071046769619, -0.021997639909386635, -0.033064842224121094, 0.003150210715830326, -0.010285510681569576, -0.015766501426696777, -0.02126847393810749, -0.021995266899466515, 0.030739696696400642, 0.007537451107054949, 0.0027676215395331383, -0.09897327423095703, -0.010359583422541618, 0.0029297140426933765, 0.03313314542174339, 0.02266264334321022, 0.821908175945282, -0.004068966023623943, -0.021255144849419594, 0.013176358304917812, 0.043633103370666504, -0.0451585054397583, -0.042167507112026215, 0.006706846412271261, 0.003989010583609343, 0.01541062444448471, 0.0123188691213727, -0.009571239352226257, 0.03379478678107262, 0.02659907378256321, 0.024637959897518158, 0.03952668979763985, 0.0180406142026186, 0.03280942514538765, 0.012659233063459396, -0.013524110428988934, 0.05208655446767807, 0.005973513703793287, 0.021161025390028954, -0.015403807163238525, 0.0003345893055666238, -0.0060716853477060795, -0.18613988161087036, 0.02675432339310646, -7.637310958883208e-33, 0.06837788969278336, -0.006194996647536755, 0.043138425797224045, -0.016588950529694557, 0.02492131106555462, 0.0265039149671793, -0.05938522145152092, -0.04512615129351616, -0.004879637621343136, -0.0061173224821686745, 0.008790536783635616, 0.017442191019654274, 0.0071230316534638405, 0.006163928657770157, 0.016999704763293266, -0.007094167172908783, -0.006369469687342644, 0.045112282037734985, -0.023665636777877808, -0.010782497934997082, -0.009407811798155308, 0.01715836673974991, -0.000028920965633005835, 0.03774658218026161, -0.011136378161609173, 0.030839188024401665, -0.00679186824709177, 0.0356922522187233, -0.017626214772462845, -0.042397525161504745, -0.030849086120724678, 0.007038820069283247, -0.006490684580057859, -0.01347853522747755, 0.016957486048340797, -0.06745220720767975, -0.027408326044678688, 0.0013787263305857778, -0.03307449817657471, -0.01653353124856949, -0.012200241908431053, 0.0018094234401360154, -0.003433179808780551, 0.003218710422515869, -0.052959222346544266, -0.0009489548392593861, -0.011099771596491337, 0.0479716919362545, -0.023276278749108315, 0.0027263411320745945, -0.014603067189455032, -0.012110359966754913, -0.009590902365744114, 0.005131762009114027, -0.06691764295101166, 0.02704918198287487, -0.017882419750094414, 0.009509413503110409, 0.011694597080349922, 0.01735340803861618, 0.0598626434803009, 0.0007813638658262789, 0.016357319429516792, 0.038729555904865265, 0.0008495792862959206, -0.006937062833458185, 0.03382130339741707, -0.004561429377645254, 0.0036178966984152794, 0.027815384790301323, -0.04865724593400955, 0.06979089975357056, -0.035303469747304916, 0.006089311093091965, 0.036950062960386276, -0.039836335927248, 0.047216031700372696, 0.02859237976372242, 0.0030207778327167034, 0.061521876603364944, 0.009264546446502209, -0.029325388371944427, 0.008531438186764717, -0.035397969186306, -0.03734927251935005, -0.05299132689833641, 0.04359167814254761, 0.029591131955385208, -0.003950048238039017, -0.012892731465399265, 0.013363601639866829, 0.017289364710450172, 0.025492625311017036, -0.013189064338803291, -0.009642449207603931, 7.539595786919197e-33, 0.028859354555606842, -0.012704071588814259, 0.009834707714617252, -0.023791471496224403, 0.05952051654458046, 0.010404408909380436, 0.03665473684668541, 0.027250703424215317, -0.031003298237919807, 0.04557011276483536, 0.0126491729170084, -0.018614618107676506, -0.0009445007890462875, 0.04609493166208267, 0.035995543003082275, 0.0005480878753587604, 0.01667196862399578, -0.027972325682640076, -0.012290517799556255, 0.021393535658717155, -0.005682211369276047, -0.03369845077395439, -0.0069295624271035194, 0.009327379986643791, 0.03971431776881218, 0.05244789645075798, 0.0008971656206995249, 0.0010016694432124496, -0.018943997099995613, -0.022303743287920952, -0.00009365432197228074, -0.021972795948386192, -0.018562747165560722, -0.04448562115430832, -0.014522848650813103, 0.0476028211414814, 0.008435627445578575, -0.00870923325419426, -0.011396354995667934, -0.032034993171691895, 0.04035438597202301, 0.021570267155766487, -0.010000632144510746, 0.03934115543961525, 0.010753113776445389, 0.03202126547694206, 0.018237397074699402, -0.007050827611237764, -0.03478223457932472, 0.018011651933193207, -0.014386328868567944, 0.008429021574556828, -0.0026782129425555468, 0.04517468437552452, 0.020928291603922844, -0.05874698981642723, -0.016285037621855736, 0.004287236835807562, -0.031016025692224503, -0.015013783238828182, -0.010638631880283356, -0.004814058542251587, -0.0557665191590786, 0.03030654601752758, -0.027690699324011803, -0.04969966039061546, -0.021366532891988754, -0.03233310207724571, 0.010156284086406231, 0.010161123238503933, -0.0022282239515334368, -0.027418170124292374, -0.006108324509114027, 0.015593956224620342, 0.027023037895560265, -0.03822585940361023, -0.05543306842446327, -0.003743933979421854, -0.03125688433647156, 0.02779981680214405, 0.026770612224936485, -0.031969018280506134, 0.020837005227804184, 0.006092764437198639, -0.006389465183019638, 0.021008120849728584, -0.0037726000882685184, 0.028240680694580078, 0.0037502895575016737, -0.004985872656106949, -0.007237271871417761, -0.06528319418430328, -0.027497898787260056, 0.052839942276477814, -0.018086126074194908, -1.2889839418050997e-8, -0.01589350216090679, 0.027722705155611038, 0.005368522368371487, 0.002202868228778243, 0.025772860273718834, 0.007674581836909056, -0.0010853963904082775, -0.016252776607871056, 0.005011029541492462, 0.027543149888515472, 0.037835743278265, -0.021936316043138504, 0.0341859832406044, 0.004435134585946798, -0.035325124859809875, -0.04679691419005394, -0.02362646721303463, -0.003586826380342245, 0.04080226644873619, -0.00402050418779254, 0.010664409957826138, 0.022032801061868668, 0.004206209443509579, 0.0018362686969339848, 0.05589611083269119, 0.01680377870798111, -0.004535209853202105, -0.07622705399990082, -0.00932756345719099, -0.03480406850576401, -0.02667851932346821, -0.017948679625988007, 0.0004190910258330405, 0.015263067558407784, -0.02305046282708645, -0.04287392273545265, 0.008474036119878292, 0.045342203229665756, 0.004801016766577959, 0.015656571835279465, 0.012595325708389282, 0.006431982386857271, -0.004614146891981363, -0.0173961129039526, -0.007997005246579647, -0.0004811461840290576, -0.004327095113694668, -0.02143155410885811, -0.017250780016183853, -0.033592332154512405, 0.026536190882325172, -0.02261192537844181, 0.04692467674612999, 0.06692197173833847, 0.023796601220965385, -0.019009072333574295, -0.007049888838082552, -0.014019365422427654, -0.024801509454846382, -0.009169572032988071, -0.0002569743082858622, 0.002598933642730117, 0.0013949887361377478, -0.04430587962269783 ]
r-cohort-heatmap-of-neo4j-london-meetup
https://markhneedham.com/blog/2015/05/11/r-cohort-heatmap-of-neo4j-london-meetup
false
2015-05-16 21:13:01
Neo4j: BBC football live text fouls graph
[ "neo4j" ]
[ "neo4j" ]
I recently came across the http://www.partiallyderivative.com/[Partially Derivative podcast] and in http://www.partiallyderivative.com/news/2015/3/20/episode-17-get-back-to-work-you-slackers[episode 17] they describe how Kirk Goldsberry scraped a bunch of data about shots in basketball matches then ran some analysis on that data. It got me thinking that we might be able to do something similar for football matches and although event based data for football matches only comes from Opta, the BBC does expose some of them in http://www.bbc.co.uk/sport/0/football/32683310[live text feeds]. We'll start with the Champions League match between Barcelona and Bayern Munich from last Tuesday. image::{{<siteurl>}}/uploads/2015/05/2015-05-16_23-10-43.png[2015 05 16 23 10 43,500] Our first task is to extract the events that happened in the match along with the players involved. After we've got that we'll generate a Neo4j graph and see if we can find some interesting insights. I find the feedback cycle with this type of work is dramatically improved if we have the source data available locally so the first step was to get the BBC web page downloaded: [source,bash] ---- $ wget http://www.bbc.co.uk/sport/0/football/32683310 ---- Next we need to write a scraper which will extract all the events. We want to get an array containing one entry for each event, where the following is an example of an event: image::{{<siteurl>}}/uploads/2015/05/2015-05-16_22-19-00.png[2015 05 16 22 19 00,400] HTML-wise it looks like this: image::{{<siteurl>}}/uploads/2015/05/2015-05-16_22-20-28.png[2015 05 16 22 20 28,400] image:{{<siteurl>}}/uploads/2015/05/4709393221_bddd85c64e_z.jpg[4709393221 bddd85c64e z,250] I do most of my scraping work in Python so I used the http://www.crummy.com/software/BeautifulSoup/[Beautiful Soup library] with the http://code.google.com/p/soupselect/[soupselect wrapper] to get the data into CSV format ready to import into Neo4j. It was mostly a straight forward job of finding the appropriate CSS tag and pulling out the values although the way fouls are described in the page is a bit strange - sometimes the person fouled comes first row and the fouler comes on the next line and sometimes vice versa. Luckily the two parts of the foul can be joined together by matching the time which made life easier. The https://github.com/mneedham/neo4j-bbc/blob/master/extract_events.py[full code for the scrapper is on github] if you want to play with it. This is what the resulting CSV file looks like: [source,bash] ---- $ head -n 10 data/events.csv matchId,foulId,freeKickId,time,foulLocation,fouledPlayer,fouledPlayerTeam,foulingPlayer,foulingPlayerTeam 32683310,3,2,90:00 +0:40,in the defensive half.,Xabi Alonso,FC Bayern München,Pedro,Barcelona 32683310,9,8,84:38,on the right wing.,Rafinha,FC Bayern München,Pedro,Barcelona 32683310,12,13,83:17,in the attacking half.,Lionel Messi,Barcelona,Sebastian Rode,FC Bayern München 32683310,15,14,82:43,in the defensive half.,Sebastian Rode,FC Bayern München,Neymar,Barcelona 32683310,17,18,80:41,in the attacking half.,Pedro,Barcelona,Xabi Alonso,FC Bayern München 32683310,22,23,76:31,in the defensive half.,Neymar,Barcelona,Rafinha,FC Bayern München 32683310,25,26,75:03,in the attacking half.,Lionel Messi,Barcelona,Xabi Alonso,FC Bayern München 32683310,31,30,69:37,in the attacking half.,Bastian Schweinsteiger,FC Bayern München,Dani Alves,Barcelona 32683310,36,35,63:27,in the attacking half.,Robert Lewandowski,FC Bayern München,Ivan Rakitic,Barcelona ---- Now it's time to create a graph. We'll aim to massage the data into this model: image::{{<siteurl>}}/uploads/2015/05/2015-05-16_22-50-32.png[2015 05 16 22 50 32,465] Next we need to write some Cypher code to get the CSV data into the graph. The https://github.com/mneedham/neo4j-bbc/blob/master/import.cql[full script is here], a sample of which is below: [source,cypher] ---- // match LOAD CSV WITH HEADERS FROM "file:///Users/markhneedham/projects/neo4j-bbc/data/events.csv" AS row MERGE (:Match {id: row.matchId}); // teams LOAD CSV WITH HEADERS FROM "file:///Users/markhneedham/projects/neo4j-bbc/data/events.csv" AS row MERGE (:Team {name: row.foulingPlayerTeam}); LOAD CSV WITH HEADERS FROM "file:///Users/markhneedham/projects/neo4j-bbc/data/events.csv" AS row MERGE (:Team {name: row.fouledPlayerTeam}); // players LOAD CSV WITH HEADERS FROM "file:///Users/markhneedham/projects/neo4j-bbc/data/events.csv" AS row MERGE (player:Player {id: row.foulingPlayer + "_" + row.foulingPlayerTeam}) ON CREATE SET player.name = row.foulingPlayer; // appearances LOAD CSV WITH HEADERS FROM "file:///Users/markhneedham/projects/neo4j-bbc/data/events.csv" AS row MATCH (match:Match {id: row.matchId}) MATCH (player:Player {id: row.foulingPlayer + "_" + row.foulingPlayerTeam}) MATCH (team:Team {name: row.foulingPlayerTeam}) MERGE (appearance:Appearance {id: player.id + " in " + row.matchId}) MERGE (player)-[:MADE_APPEARANCE]->(appearance) MERGE (appearance)-[:IN_MATCH]->(match) MERGE (appearance)-[:FOR_TEAM]->(team); // fouls LOAD CSV WITH HEADERS FROM "file:///Users/markhneedham/projects/neo4j-bbc/data/events.csv" AS row MATCH (foulingPlayer:Player {id:row.foulingPlayer + "_" + row.foulingPlayerTeam }) MATCH (fouledPlayer:Player {id:row.fouledPlayer + "_" + row.fouledPlayerTeam }) MATCH (match:Match {id: row.matchId}) MERGE (foul:Foul {eventId: row.foulId}) ON CREATE SET foul.time = row.time, foul.location = row.foulLocation MERGE (foul)<-[:COMMITTED_FOUL]-(foulingPlayer) MERGE (foul)-[:COMMITTED_AGAINST]->(fouledPlayer) MERGE (foul)-[:COMMITTED_IN_MATCH]->(match); ---- We'll use neo4j-shell to execute the script: [source,bash] ---- $ ./neo4j-community-2.2.1/bin/neo4j-shell --file import.cql ---- Now that we've got the data into Neo4j we need to come up with some questions to ask of it. I came up with the following but perhaps you can think of some others! * Where do the fouls happen on the pitch? * Who made the most fouls? * Who was fouled the most? * Who fouled who the most? * Which team fouled the most? * Who's the worst fouler in each team? * Who's the most fouled in each team? == Where do the fouls happen? [source,cypher] ---- match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul) RETURN foul.location AS location, COUNT(*) as fouls ORDER BY fouls DESC; +----------------------------------+ | location | fouls | +----------------------------------+ | "in the defensive half." | 12 | | "in the attacking half." | 12 | | "on the right wing." | 3 | | "on the left wing." | 3 | +----------------------------------+ 4 rows ---- == Who fouls the most? [source,cypher] ---- match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul)<-[:COMMITTED_FOUL]-(fouler) RETURN fouler.name AS fouler, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10; +------------------------------+ | fouler | fouls | +------------------------------+ | "Rafinha" | 4 | | "Pedro" | 3 | | "Medhi Benatia" | 3 | | "Dani Alves" | 3 | | "Xabi Alonso" | 3 | | "Javier Mascherano" | 2 | | "Thiago Alcántara" | 2 | | "Robert Lewandowski" | 2 | | "Sebastian Rode" | 1 | | "Sergio Busquets" | 1 | +------------------------------+ 10 rows ---- == Who was fouled the most? [source,cypher] ---- // who was fouled the most match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul)-[:COMMITTED_AGAINST]->(fouled) RETURN fouled.name AS fouled, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10; +----------------------------------+ | fouled | fouls | +----------------------------------+ | "Robert Lewandowski" | 4 | | "Lionel Messi" | 4 | | "Neymar" | 3 | | "Pedro" | 2 | | "Xabi Alonso" | 2 | | "Andrés Iniesta" | 2 | | "Rafinha" | 2 | | "Bastian Schweinsteiger" | 2 | | "Sebastian Rode" | 1 | | "Sergio Busquets" | 1 | +----------------------------------+ 10 rows ---- == Who fouled who the most? [source,cypher] ---- match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul)-[:COMMITTED_AGAINST]->(fouled), (foul)<-[:COMMITTED_FOUL]-(fouler) RETURN fouler.name AS fouler, fouled.name AS fouled, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10; +--------------------------------------------------------+ | fouler | fouled | fouls | +--------------------------------------------------------+ | "Javier Mascherano" | "Robert Lewandowski" | 2 | | "Dani Alves" | "Bastian Schweinsteiger" | 2 | | "Xabi Alonso" | "Lionel Messi" | 2 | | "Rafinha" | "Neymar" | 2 | | "Rafinha" | "Andrés Iniesta" | 2 | | "Dani Alves" | "Xabi Alonso" | 1 | | "Thiago Alcántara" | "Javier Mascherano" | 1 | | "Pedro" | "Juan Bernat" | 1 | | "Medhi Benatia" | "Pedro" | 1 | | "Neymar" | "Sebastian Rode" | 1 | +--------------------------------------------------------+ 10 rows ---- == Which team fouled the most? [source,cypher] ---- match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul)<-[:COMMITTED_FOUL]-(fouler), (fouler)-[:MADE_APPEARANCE]-(app)-[:IN_MATCH]-(match), (app)-[:FOR_TEAM]->(team) RETURN team.name, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10; +-----------------------------+ | team.name | fouls | +-----------------------------+ | "FC Bayern München" | 18 | | "Barcelona" | 12 | +-----------------------------+ 2 rows ---- == Worst fouler for each team? [source,cypher] ---- match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul)<-[:COMMITTED_FOUL]-(fouler), (fouler)-[:MADE_APPEARANCE]-(app)-[:IN_MATCH]-(match), (app)-[:FOR_TEAM]->(team) WITH team, fouler, COUNT(*) AS fouls ORDER BY team.name, fouls DESC WITH team, COLLECT({fouler:fouler, fouls:fouls})[0] AS topFouler RETURN team.name, topFouler.fouler.name, topFouler.fouls; +---------------------------------------------------------------+ | team.name | topFouler.fouler.name | topFouler.fouls | +---------------------------------------------------------------+ | "FC Bayern München" | "Rafinha" | 4 | | "Barcelona" | "Pedro" | 3 | +---------------------------------------------------------------+ 2 rows ---- == Most fouled against for each team [source,cypher] ---- match (match:Match)<-[:COMMITTED_IN_MATCH]-(foul)-[:COMMITTED_AGAINST]-(fouled), (fouled)-[:MADE_APPEARANCE]-(app)-[:IN_MATCH]-(match), (app)-[:FOR_TEAM]->(team) WITH team, fouled, COUNT(*) AS fouls ORDER BY team.name, fouls DESC WITH team, COLLECT({fouled:fouled, fouls:fouls})[0] AS topFouled RETURN team.name, topFouled.fouled.name, topFouled.fouls; +---------------------------------------------------------------+ | team.name | topFouled.fouled.name | topFouled.fouls | +---------------------------------------------------------------+ | "FC Bayern München" | "Robert Lewandowski" | 4 | | "Barcelona" | "Lionel Messi" | 4 | +---------------------------------------------------------------+ 2 rows ---- So Bayern fouled a bit more than Barca, the main forwards for each team (Messi/Lewandowski) were the most fouled players on the pitch and the fouling was mostly in the middle of the pitch. I expect this graph will become much more interesting to query with more matches and with the other event types as well but I haven't got those scraped yet. The https://github.com/mneedham/neo4j-bbc[code is on github]if you want to play around with it and perhaps get the other events into the graph.
null
null
[ -0.008723599836230278, -0.025044923648238182, 0.008388153277337551, 0.01846730336546898, 0.0639343112707138, -0.023102596402168274, 0.02712608315050602, 0.048068366944789886, 0.029517192393541336, -0.014215615577995777, -0.007779105566442013, -0.00017434352776035666, -0.07459106296300888, 0.024139808490872383, 0.016076430678367615, 0.07722526788711548, 0.038116879761219025, 0.017848126590251923, 0.03135965019464493, -0.007092741318047047, 0.03422590717673302, 0.07821419835090637, -0.002467944985255599, 0.04505043476819992, 0.0350656732916832, -0.007060473319143057, 0.034371357411146164, 0.015506349503993988, -0.05425328388810158, 0.005874489899724722, 0.036072902381420135, -0.007301077712327242, -0.011395365931093693, -0.01920032873749733, 0.025631748139858246, -0.0218290276825428, -0.008788911625742912, 0.03276766464114189, -0.012196418829262257, 0.0025967536494135857, -0.08836469054222107, 0.040363702923059464, -0.04267837479710579, 0.02424008771777153, -0.0597618892788887, 0.019228419288992882, -0.02079668827354908, 0.02420397661626339, -0.013376657851040363, -0.006757983937859535, -0.07168878614902496, 0.03987060487270355, -0.004206232726573944, 0.014863467775285244, -0.016000863164663315, 0.04941728338599205, 0.012467346154153347, -0.06038038805127144, 0.004838856868445873, -0.030144287273287773, -0.015029709786176682, 0.004056785721331835, -0.003387379925698042, 0.009448403492569923, 0.0071455189026892185, -0.043184757232666016, -0.0022037620656192303, 0.046473175287246704, -0.009318332187831402, -0.0169859416782856, -0.01765374280512333, 0.002830125391483307, -0.043101921677589417, 0.01498838048428297, 0.027107300236821175, -0.057831596583127975, 0.009596663527190685, 0.057577285915613174, 0.011209641583263874, 0.03670739382505417, -0.021226434037089348, 0.023468274623155594, 0.013855810277163982, 0.03219703584909439, 0.006061458494514227, -0.04446210712194443, -0.046089209616184235, -0.03040154092013836, -0.06280286610126495, 0.05927366763353348, -0.00017188378842547536, -0.06773214787244797, 0.02490590326488018, 0.009667765349149704, -0.003740853164345026, -0.0020653349347412586, 0.027583973482251167, 0.008076532743871212, 0.0005064793513156474, -0.049299053847789764, -0.04023747891187668, -0.02076718956232071, 0.02300361543893814, 0.03326042369008064, -0.07346680015325546, -0.015216566622257233, -0.0076269772835075855, -0.007088617887347937, 0.006692826282233, 0.0025292246136814356, 0.004976044874638319, 0.016276398673653603, -0.01658720336854458, -0.011687452904880047, -0.06554783135652542, 0.04443201795220375, 0.02289184369146824, -0.03311575576663017, -0.02095450833439827, 0.022319592535495758, 0.011317785829305649, 0.014589950442314148, -0.015577873215079308, 0.07118243724107742, 0.008156141266226768, 0.026761865243315697, -0.0024834363721311092, 0.05128790810704231, -0.03664831817150116, -0.054640792310237885, 0.0012193004367873073, 0.06743728369474411, -0.02605476975440979, 0.007480152416974306, 0.00468088872730732, -0.031234417110681534, -0.010116499848663807, -0.01602690853178501, 0.06024784967303276, 0.040560901165008545, -0.006110625807195902, -0.0343555249273777, -0.0014152792282402515, 0.019860558211803436, 0.02715918980538845, -0.03865913674235344, -0.00010379556624684483, -0.022383177652955055, -0.0034708038438111544, 0.013921946287155151, 0.030993742868304253, -0.011345023289322853, 0.05525193735957146, -0.04475228860974312, -0.009381989948451519, 0.10653411597013474, 0.05615992844104767, -0.0023829073179513216, -0.05341694504022598, 0.031049765646457672, 0.06018925458192825, 0.030189262703061104, -0.0043448773212730885, 0.028820887207984924, -0.014628490433096886, -0.04687470942735672, 0.0051423958502709866, 0.0546225979924202, -0.002284569898620248, 0.010912569239735603, -0.046209562569856644, -0.027382919564843178, 0.07547511160373688, -0.02462071366608143, -0.027041196823120117, 0.053781792521476746, 0.07454296201467514, 0.03203202411532402, 0.043375734239816666, 0.00837457925081253, -0.07707582414150238, 0.011357350274920464, 0.006069119554013014, 0.04433213174343109, 0.01573917455971241, -0.026736238971352577, 0.12080612033605576, 0.023220974951982498, -0.010690366849303246, 0.049362365156412125, -0.08303777873516083, -0.08089269697666168, -0.04921690374612808, -0.013665788806974888, 0.04868709668517113, -0.03827053681015968, 0.03673794865608215, 0.04824153706431389, 0.022456098347902298, 0.0498279444873333, 0.0217952448874712, 0.01003482285887003, 0.014948289841413498, -0.03304671123623848, -0.054588064551353455, 0.045884352177381516, 0.027035128325223923, -0.04033801332116127, -0.038641300052404404, 0.04347730055451393, -0.030812997370958328, 0.014771392568945885, 0.020098771899938583, -0.02781287580728531, 0.01546894758939743, 0.013429460115730762, 0.05075883865356445, -0.007257368881255388, 0.0333692729473114, -0.05794374272227287, 0.037291307002305984, 0.021043237298727036, -0.007563035003840923, 0.0029590707272291183, 0.0010423033963888884, 0.12993811070919037, 0.037238504737615585, -0.021573249250650406, -0.026855459436774254, 0.008456478826701641, 0.015468989498913288, 0.010081405751407146, -0.02348298951983452, -0.031032228842377663, -0.01516899187117815, -0.014488356187939644, -0.05775531753897667, -0.03337991237640381, 0.01942812278866768, -0.04779171943664551, 0.023747628554701805, 0.04696214571595192, 0.012250152416527271, 0.03224298357963562, -0.02875104360282421, -0.01391709316521883, -0.005959192290902138, -0.027615688741207123, -0.050834137946367264, -0.012637368403375149, 0.00997231062501669, -0.009410915896296501, -0.0013174385530874133, -0.035142991691827774, -0.022171368822455406, -0.009853706695139408, -0.03326505422592163, 0.022479388862848282, 0.06474649906158447, 0.06365632265806198, 0.025864252820611, 0.014775184914469719, -0.01942335069179535, 0.0004288479103706777, -0.025130117312073708, -0.0514550656080246, -0.059741560369729996, -0.0582570806145668, -0.016457919031381607, 0.016125613823533058, 0.020247172564268112, 0.025509996339678764, 0.002514205640181899, 0.03650560975074768, -0.01322504784911871, 0.016769209876656532, 0.04053796827793121, -0.005918919108808041, -0.013864788226783276, -0.026483017951250076, -0.04358113184571266, 0.048697132617235184, -0.024317413568496704, -0.013275298289954662, -0.01962706446647644, -0.07490114867687225, 0.01743587665259838, -0.050564855337142944, -0.01990651711821556, 0.00800978485494852, -0.022579554468393326, 0.03509960323572159, 0.035997118800878525, 0.0020953051280230284, 0.052219171077013016, 0.018888473510742188, 0.025411637499928474, 0.0044016712345182896, -0.008543829433619976, 0.033571772277355194, -0.014937229454517365, 0.031163861975073814, 0.04619684815406799, -0.033592693507671356, 0.01484630536288023, -0.04923846200108528, 0.03716970980167389, -0.04060281440615654, -0.2996382713317871, 0.01861477456986904, 0.0161201823502779, -0.03774739429354668, 0.03791645169258118, -0.01812363602221012, -0.021680234000086784, -0.024803346022963524, -0.030102014541625977, 0.010333655402064323, -0.038269028067588806, -0.04172679781913757, -0.030586417764425278, 0.019999878481030464, 0.05538231506943703, -0.000465479155536741, 0.01347183808684349, -0.012422079220414162, 0.009466259740293026, 0.043937064707279205, -0.006333907134830952, -0.03568802401423454, 0.0071134925819933414, 0.04342908039689064, 0.016443628817796707, 0.04452972114086151, -0.05731796845793724, -0.009831075556576252, -0.05520404875278473, -0.02108362317085266, 0.036479320377111435, -0.03101920895278454, 0.0029512131586670876, -0.019404027611017227, -0.011759122833609581, -0.012979327701032162, 0.05463786795735359, 0.00724715506657958, -0.007144359406083822, -0.01755731925368309, -0.025891752913594246, -0.024439161643385887, 0.00048185326159000397, -0.013311796821653843, 0.10057717561721802, 0.013066607527434826, -0.0689060315489769, -0.01248286571353674, -0.04827110096812248, 0.06686107069253922, -0.024957183748483658, -0.01061045192182064, -0.032781150192022324, 0.04128292575478554, -0.017359647899866104, -0.02252880297601223, -0.0006010392098687589, -0.025106867775321007, -0.02440156601369381, -0.0327189639210701, 0.004481676034629345, -0.023600198328495026, -0.020093152299523354, -0.030349968001246452, -0.0037541138008236885, -0.05035093426704407, -0.04446909949183464, -0.0074810124933719635, 0.06857340037822723, 0.017873531207442284, -0.041702594608068466, 0.013734468258917332, 0.00650238711386919, -0.08466032892465591, -0.01374127995222807, 0.02108321338891983, -0.0023429784923791885, 0.015323642641305923, 0.00964310485869646, 0.06699464470148087, -0.04111983999609947, -0.05412512645125389, 0.041917137801647186, -0.01087504904717207, 0.0198300089687109, -0.023809408769011497, 0.033800043165683746, 0.015311104245483875, -0.0020909777376800776, -0.019036710262298584, 0.08021550625562668, -0.03828631713986397, -0.010286165401339531, 0.014328819699585438, -0.010124103166162968, 0.05380861833691597, -0.007915787398815155, 0.0039004057180136442, 0.018390478566288948, 0.03363244980573654, 0.005548488348722458, -0.04801595211029053, 0.0028241060208529234, -0.019616518169641495, -0.005526287946850061, 0.01952461153268814, -0.028046132996678352, 0.01984907127916813, 0.030241679400205612, -0.003440150758251548, 0.017919179052114487, -0.012453398667275906, 0.0011261565377935767, -0.020684892311692238, -0.02028696797788143, -0.0014685195637866855, 0.03460753709077835, 0.01222103089094162, -0.0027557092253118753, -0.025856083258986473, -0.07219180464744568, 0.011705796234309673, -0.009735769592225552, 0.00007837156590539962, -0.06126493588089943, -0.03257347643375397, -0.0020234626717865467, -0.033824704587459564, 0.015547024086117744, 0.0007071823347359896, -0.010776092298328876, 0.012218263931572437, 0.035851795226335526, -0.01630471646785736, 0.024453867226839066, -0.019295936450362206, -0.03126086667180061, -0.03513772785663605, 0.014202604070305824, 0.00007723292947048321, 0.0017809235723689198, 0.020455269142985344, -0.00208268198184669, 0.027661286294460297, 0.05824349820613861, 0.002223184797912836, 0.0048516117967665195, 0.009080130606889725, -0.00866719987243414, 0.02199433743953705, 0.0009727008291520178, -0.03184946998953819, 0.0179419107735157, -0.032639067620038986, -0.014874407090246677, -0.0013606671709567308, 0.03997306898236275, 0.012539954856038094, 0.0013775491388514638, -0.04784897342324257, 0.018466344103217125, -0.05450386181473732, -0.0167414341121912, 0.02076425589621067, 0.016712266951799393, 0.07282209396362305, -0.006210326217114925, -0.008986611850559711, 0.029138579964637756, -0.012550541199743748, -0.003704868257045746, -0.012196395546197891, -0.0588371604681015, -0.02407090738415718, -0.014855211600661278, -0.008605253882706165, -0.0021816962398588657, 0.014446482062339783, -0.0011198048014193773, 0.027799788862466812, -0.030464915558695793, -0.019173692911863327, 0.020558282732963562, 0.02539215236902237, 0.060224004089832306, 0.05896021053195, -0.03611314296722412, 0.00479144649580121, -0.006366088055074215, 0.003760779742151499, -0.03506027162075043, 0.0009351758053526282, -0.007957186549901962, -0.003118632361292839, -0.012648937292397022, -0.0855594053864479, 0.040212783962488174, -0.018803689628839493, -0.0022106829565018415, -0.01908145099878311, -0.004449625499546528, 0.0026112613268196583, -0.014157001860439777, 0.029554612934589386, 0.042093534022569656, -0.056820373982191086, -0.007590075954794884, -0.0046020811423659325, -0.00795622169971466, 0.0054510198533535, 0.011145566590130329, -0.04695941135287285, -0.015123406425118446, -0.0032288762740790844, 0.03399210050702095, -0.060226913541555405, -0.019154589623212814, -0.03455045074224472, 0.024687789380550385, 0.005812725517898798, 0.046223487704992294, -0.009781170636415482, -0.02055421657860279, 0.0009730307501740754, -0.027847426012158394, 0.012886477634310722, -0.018931183964014053, -0.02858818508684635, 0.02098364196717739, -0.010572979226708412, 0.029165662825107574, -0.017830507829785347, 0.02850828878581524, 0.04041452705860138, -0.012161110527813435, 0.01087097730487585, -0.03736407309770584, 0.02514241263270378, 0.005279053468257189, 0.052779268473386765, 0.003648686222732067, -0.019760413095355034, -0.03771137818694115, 0.02068750187754631, -0.01632220856845379, 0.007096640765666962, -0.00823055300861597, 0.023631857708096504, 0.01757861115038395, 0.04384179413318634, 0.017367806285619736, 0.03745725378394127, 0.0011107850586995482, -0.02428615838289261, 0.038382239639759064, -0.06516321748495102, -0.013073103502392769, -0.021670812740921974, -0.036843519657850266, 0.019030245020985603, 0.023011773824691772, 0.015929190441966057, -0.056754376739263535, 0.03650135174393654, 0.019391600042581558, 0.01749997027218342, 0.056591302156448364, 0.029048549011349678, 0.026460379362106323, -0.02361089549958706, -0.018537765368819237, -0.09132926911115646, -0.01780509576201439, 0.06241634860634804, 0.021153118461370468, 0.015119320712983608, 0.0018079187721014023, -0.039472926408052444, 0.027773400768637657, -0.06944354623556137, -0.03369101509451866, 0.015372968278825283, -0.03586288169026375, -0.009488712064921856, 0.003802834777161479, -0.06939517706632614, -0.004044212866574526, 0.03600049763917923, -0.05081434175372124, -0.015333791263401508, -0.024378538131713867, 0.04299038276076317, -0.019778484478592873, 0.017291903495788574, -0.01078859344124794, -0.03422073647379875, 0.08535470813512802, 0.023373544216156006, 0.023916594684123993, 0.03440695255994797, 0.003202274674549699, 0.01777968928217888, 0.0037983451038599014, -0.00421724421903491, 0.019580205902457237, 0.011183938942849636, -0.01814298704266548, -0.06109242141246796, 0.04416882246732712, -0.007273432333022356, -0.013811279088258743, -0.044806964695453644, 0.08061639964580536, 0.009151151403784752, -0.035102762281894684, -0.043870653957128525, 0.012081041932106018, -0.024285463616251945, -0.02115686982870102, 0.003357122652232647, -0.011966255493462086, -0.02016332931816578, 0.0567062571644783, -0.0036012809723615646, 0.004591104108840227, 0.07987292855978012, -0.006574494764208794, -0.013735543936491013, -0.011528842151165009, 0.0990644097328186, 0.07820399105548859, 0.04672454297542572, -0.004473088774830103, 0.0914299413561821, -0.010369970463216305, -0.05396537110209465, 0.019660910591483116, 0.0005888367886655033, 0.004355624318122864, 0.004222312476485968, -0.0033195430878549814, 0.04136992618441582, -0.03298752382397652, 0.055670130997896194, -0.01356038823723793, -0.053330887109041214, 0.011101996526122093, 0.014813360758125782, 0.03895396739244461, 0.0418245792388916, 0.0026514590717852116, 0.02505827322602272, -0.0027867855969816446, -0.04837682843208313, 0.03743719682097435, -0.03351747244596481, -0.013838833197951317, 0.01799055002629757, -0.03139986842870712, 0.031330592930316925, 0.0010868672979995608, 0.04695148020982742, 0.07412150502204895, -0.038489799946546555, 0.00007721265137661248, -0.023953350260853767, -0.00011984458978986368, -0.0006098627927713096, 0.027077024802565575, -0.005442883353680372, -0.00040354992961511016, -0.02050100266933441, -0.06779082119464874, -0.025000138208270073, -0.027808580547571182, -0.0332743301987648, 0.028934888541698456, -0.02576126530766487, -0.00013173100887797773, -0.0022862283512949944, -0.0018941472517326474, -0.04170825332403183, -0.049290817230939865, -0.0363549143075943, -0.07436442375183105, -0.06024258956313133, -0.026936640962958336, 0.040054984390735626, 0.022775273770093918, -0.037616655230522156, -0.03608894720673561, -0.04080783203244209, -0.01787690259516239, 0.028789864853024483, -0.06178809329867363, -0.01351894810795784, 0.021096473559737206, 0.02429949678480625, 0.036841388791799545, 0.0032482752576470375, 0.04826817288994789, -0.011314778588712215, -0.025867972522974014, -0.018862850964069366, 0.021919269114732742, 0.03952886164188385, 0.014398762956261635, -0.003166761714965105, -0.10303588956594467, 0.006466314662247896, 0.02605823054909706, -0.05152561143040657, -0.07250332832336426, 0.030847666785120964, 0.04095872864127159, 0.0304252952337265, 0.04502077400684357, -0.03759600594639778, -0.008027885109186172, -0.05756954476237297, -0.0011282924097031355, 0.0010806991485878825, 0.0033028076868504286, 0.061070989817380905, -0.024933865293860435, 0.0964251384139061, 0.04623366519808769, 0.023221874609589577, -0.0495203398168087, -0.018891582265496254, -0.018743816763162613, -0.0021606339141726494, -0.03826633468270302, -0.021763062104582787, -0.04705290496349335, -0.1088581383228302, -0.0616367906332016, 0.049333348870277405, -0.016514545306563377, -0.03611193224787712, 0.025159910321235657, 0.022043779492378235, -0.0052593727596104145, -0.0014408951392397285, -0.04075320437550545, 0.03450281172990799, -0.020067544654011726, 0.005084658041596413, -0.02674604207277298, 0.04274065047502518, 0.02190612070262432, 0.004302567336708307, -0.007587881293147802, -0.04178452864289284, 0.004136671312153339, -0.02405397966504097, -0.011352441273629665, 0.038957856595516205, 0.011602603830397129, -0.007887937128543854 ]
[ -0.05208168923854828, 0.0067093027755618095, -0.04266523942351341, -0.049293696880340576, 0.1140018105506897, -0.005953917279839516, -0.003841737052425742, 0.009074606001377106, 0.018822867423295975, -0.003801429644227028, -0.006314449477940798, -0.07741644978523254, -0.0345962718129158, -0.007733128499239683, 0.05029863864183426, -0.010826541110873222, -0.01755385659635067, -0.10327712446451187, -0.025151077657938004, 0.02914774976670742, -0.042708806693553925, -0.0018794471397995949, -0.01738797128200531, -0.03711070120334625, 0.006856989581137896, -0.003376142820343375, 0.07111397385597229, -0.014102187007665634, -0.0390741229057312, -0.1865624040365219, 0.005461767315864563, -0.015978675335645676, 0.028541862964630127, -0.025029130280017853, -0.00870323646813631, -0.001287785591557622, 0.018686417490243912, 0.009261555038392544, 0.027368316426873207, 0.05014986917376518, 0.012147162109613419, -0.015037202276289463, -0.023542316630482674, -0.04035681486129761, 0.03798101469874382, 0.029242221266031265, 0.01648116670548916, 0.016512306407094002, 0.024548379704356194, 0.04633143171668053, -0.0535273514688015, 0.016599129885435104, -0.0026143044233322144, -0.046025559306144714, -0.004829423036426306, 0.03368651121854782, 0.026818374171853065, 0.061385512351989746, 0.01205464731901884, 0.05443207547068596, 0.02880990132689476, 0.004397434648126364, -0.138337641954422, 0.07835625112056732, -0.0024385733995586634, 0.029299741610884666, -0.035826634615659714, 0.023331357166171074, 0.018139317631721497, 0.07771022617816925, -0.004221711773425341, -0.037596091628074646, 0.016637982800602913, 0.02322503551840782, 0.022492457181215286, -0.014121334999799728, -0.011776832863688469, 0.019782472401857376, -0.026100292801856995, -0.026401493698358536, -0.044646114110946655, 0.020591849461197853, -0.022285273298621178, -0.03452792763710022, -0.04913368076086044, -0.0005312784342095256, -0.04764730855822563, 0.044882114976644516, 0.0022778762504458427, 0.038423825055360794, 0.035165004432201385, 0.03338209539651871, 0.029087141156196594, 0.00822562538087368, -0.0945856049656868, -0.030108939856290817, -0.003993036691099405, 0.0038279800210148096, -0.005927872844040394, 0.4376889765262604, 0.005676811560988426, -0.011157293803989887, 0.06053328514099121, 0.056261152029037476, 0.00434288801625371, -0.019569290801882744, 0.02117469534277916, -0.049518242478370667, 0.0075502279214560986, -0.015245274640619755, 0.0032997969537973404, -0.005677152890712023, 0.06599365174770355, -0.02945270948112011, 0.02450389228761196, 0.03734968975186348, 0.043280307203531265, 0.03273507207632065, -0.008251158520579338, -0.00355813791975379, -0.022971123456954956, 0.01293141208589077, -0.011874502524733543, -0.006935397163033485, -0.01665380224585533, 0.02217697538435459, 0.0011191214434802532, 0.05461477115750313, 0.05396442487835884, 0.002435455797240138, 0.057093631476163864, -0.03344297036528587, -0.0906301736831665, 0.0072188773192465305, -0.0000317845115205273, -0.022042786702513695, 0.015204978175461292, -0.03848028928041458, 0.01537115778774023, 0.05304957553744316, 0.0038656515534967184, -0.06530686467885971, 0.03512831777334213, -0.031362127512693405, -0.06087658554315567, 0.10380614548921585, 0.019164040684700012, -0.05794939771294594, -0.010958079248666763, -0.07697800546884537, 0.018899694085121155, 0.00736159086227417, 0.012786624021828175, -0.036618754267692566, -0.021219585090875626, 0.016912957653403282, 0.07733097672462463, -0.04094203561544418, -0.07234149426221848, -0.014605343341827393, -0.03720688074827194, -0.056335583329200745, -0.014678716659545898, 0.05929974466562271, 0.03648367524147034, -0.12680606544017792, -0.014199940487742424, -0.01812884770333767, 0.008641224354505539, -0.07475773245096207, -0.005510111805051565, 0.012499072588980198, -0.028028270229697227, 0.0013644335558637977, 0.04202202707529068, 0.007236826233565807, -0.036046065390110016, -0.012173126451671124, 0.07668290287256241, -0.004261313937604427, 0.037394486367702484, -0.02236190438270569, -0.06484876573085785, 0.024924786761403084, -0.06709638237953186, -0.06267480552196503, -0.06509671360254288, -0.001943662646226585, -0.009229455143213272, 0.026759492233395576, -0.02146938443183899, -0.03925114497542381, -0.06974475085735321, 0.043665289878845215, -0.020027223974466324, 0.009945661760866642, -0.006526889745146036, -0.0147488908842206, -0.01137698907405138, -0.028055349364876747, -0.0725555345416069, -0.009289114736020565, -0.03373836353421211, 0.031082354485988617, -0.04830563813447952, 0.047638073563575745, 0.03527699038386345, -0.03134628385305405, 0.08459414541721344, -0.0018204284133389592, -0.014089617878198624, -0.053200338035821915, -0.02742106281220913, -0.02071206085383892, -0.0038430485874414444, -0.00927970465272665, 0.00982634536921978, 0.0018351380713284016, -0.014011041261255741, 0.05811082199215889, -0.03728305920958519, -0.0010759808355942369, 0.02073844149708748, -0.33233487606048584, -0.035936757922172546, -0.033059533685445786, 0.0039056080859154463, 0.034529607743024826, -0.013527528382837772, 0.012387811206281185, -0.010248671285808086, 0.04150897637009621, 0.07030367851257324, 0.078581802546978, -0.005282713565975428, -0.017863843590021133, -0.0930313840508461, -0.01577707752585411, 0.018598008900880814, -0.049722928553819656, 0.0020203471649438143, -0.043177854269742966, 0.033780843019485474, 0.05215911567211151, 0.00045805651461705565, -0.05315643176436424, -0.020479517057538033, 0.007574064191430807, -0.0671391487121582, 0.1042962297797203, 0.07593730837106705, 0.03250252828001976, -0.06485530734062195, 0.018707873299717903, 0.021856408566236496, 0.009680727496743202, -0.08663696050643921, -0.001608302816748619, 0.003848808351904154, 0.037111859768629074, -0.018239742144942284, 0.017654623836278915, -0.05265387147665024, -0.05346280336380005, 0.033391036093235016, -0.03672429174184799, -0.06694314628839493, -0.05179639533162117, 0.042325880378484726, -0.004365423694252968, -0.05618162825703621, -0.03331374004483223, 0.07363971322774887, 0.034957531839609146, 0.002116665942594409, 0.07576603442430496, -0.018333598971366882, 0.027062321081757545, -0.03381337970495224, -0.08421386778354645, 0.011263041757047176, -0.019396807998418808, 0.011382141150534153, 0.014722112566232681, 0.02319217100739479, 0.07174105197191238, -0.07356657087802887, -0.004692003596574068, 0.048899680376052856, 0.023326633498072624, 0.0003504158230498433, 0.01872953213751316, -0.006296233739703894, -0.014610214158892632, 0.07505447417497635, 0.014447614550590515, 0.0246538445353508, 0.037305623292922974, 0.04997958242893219, 0.03579741716384888, 0.02992277406156063, 0.03796307370066643, 0.03197004646062851, 0.05587801709771156, -0.02925131283700466, 0.040284134447574615, -0.016297711059451103, 0.02962227165699005, 0.04831693321466446, 0.024800114333629608, -0.03592897579073906, 0.06489566713571548, 0.027497630566358566, 0.002939721802249551, 0.005749800242483616, -0.05620927736163139, -0.023055242374539375, 0.018296141177415848, -0.019918272271752357, -0.23520994186401367, 0.025516921654343605, 0.08278485387563705, 0.04048284515738487, 0.054269321262836456, -0.0048907301388680935, 0.0366433784365654, -0.019937152042984962, -0.012046861462295055, 0.008418969810009003, 0.025061486288905144, -0.005753664765506983, -0.011950304731726646, 0.009238226339221, -0.019186491146683693, 0.0021806922741234303, 0.03780900314450264, 0.0036916800308972597, -0.0012932425597682595, 0.027426714077591896, 0.04101868346333504, -0.0017873515607789159, 0.1440194547176361, 0.003884371602907777, 0.05572451278567314, 0.06700639426708221, -0.026351530104875565, -0.05355313792824745, 0.020908597856760025, -0.010763856582343578, -0.01800442487001419, -0.013613120652735233, 0.014365137554705143, 0.04106336832046509, -0.014624330215156078, -0.029841214418411255, -0.021268051117658615, 0.09140235185623169, -0.011212658137083054, -0.052882540971040726, 0.0005487868911586702, 0.032267726957798004, -0.037273310124874115, 0.010024973191320896, 0.04705517366528511, 0.029551925137639046, 0.01622835174202919, -0.03788936510682106, -0.058424390852451324, -0.01774081028997898, -0.028518155217170715, -0.044985320419073105, -0.0001852558780228719, -0.02076716348528862, 0.0075339809991419315, 0.07914335280656815, 0.025859665125608444, -0.01657494157552719, 0.05479886755347252, 0.021282995119690895, -0.006761791650205851, -0.015778852626681328, 0.051014672964811325, 0.009941983968019485, 0.030593637377023697 ]
[ 0.02882944419980049, 0.0450378879904747, 0.013131912797689438, -0.007942632772028446, 0.040108222514390945, 0.0327698290348053, -0.0005263939965516329, 0.02771107293665409, 0.012383022345602512, -0.009282494895160198, -0.03518082946538925, 0.002655942924320698, 0.022040031850337982, 0.027684083208441734, 0.03110760636627674, -0.019182775169610977, -0.04032507538795471, -0.02622530423104763, -0.0013815949205309153, -0.01981285586953163, -0.03245861455798149, -0.017301922664046288, -0.012006918899714947, -0.016784001141786575, -0.02516329288482666, 0.053037699311971664, -0.02150878496468067, 0.013673759996891022, 0.012087873183190823, -0.12906132638454437, -0.008953132666647434, -0.04909210652112961, -0.007126264274120331, -0.007720788475126028, -0.026536850258708, -0.010613594204187393, -0.036486364901065826, -0.004098435398191214, 0.00027353569748811424, 0.03876707702875137, 0.0014520672848448157, -0.033948615193367004, -0.02681531012058258, 0.02887730859220028, 0.006349020637571812, 0.010626890696585178, -0.013632859103381634, -0.002821750473231077, 0.006551911123096943, 0.01576244831085205, -0.058112215250730515, -0.01755497045814991, -0.008804778568446636, 0.02295810543000698, 0.036615148186683655, -0.021244795992970467, -0.02995326556265354, 0.008572089485824108, 0.004526013508439064, -0.019507665187120438, -0.0036831963807344437, 0.00234789727255702, -0.05840171128511429, -0.019191864877939224, -0.026580721139907837, -0.0036632318515330553, 0.0044932495802640915, 0.01492484100162983, -0.0015786249423399568, 0.01989012397825718, -0.020898936316370964, 0.049776989966630936, -0.03960977867245674, -0.023755740374326706, -0.025975344702601433, -0.009732992388308048, 0.0014629759825766087, -0.021916581317782402, 0.0006040612934157252, -0.018421608954668045, -0.024245109409093857, -0.008652005344629288, 0.020907007157802582, -0.003914177417755127, 0.016119901090860367, -0.022638730704784393, -0.0022707595489919186, -0.017346056178212166, 0.00284874951466918, 0.020885316655039787, -0.04257116839289665, -0.011445067822933197, 0.023128295317292213, 0.029161054641008377, -0.06642744690179825, 0.021269194781780243, 0.0016608393052592874, -0.026896240189671516, 0.00959875900298357, 0.8424282670021057, 0.010739866644144058, -0.01524965837597847, -0.014189825393259525, 0.015248945914208889, 0.0023584181908518076, -0.02904672920703888, -0.009358097799122334, 0.03456363081932068, 0.010461441241204739, -0.01795029826462269, 0.00767248822376132, 0.02930433116853237, 0.02512279711663723, 0.02069251611828804, -0.03319248929619789, 0.06459502130746841, 0.008200455456972122, 0.00048363598762080073, -0.014398271217942238, 0.010490214452147484, 0.0013839040184393525, 0.018684225156903267, -0.010949278250336647, 0.02347501739859581, 0.026622414588928223, -0.17321264743804932, 0.016834046691656113, -7.589963515800024e-33, 0.04402974620461464, -0.03690286725759506, -0.0008768656407482922, -0.029409728944301605, -0.0319339744746685, 0.022045249119400978, -0.012361238710582256, -0.014493962749838829, -0.015007139183580875, -0.029410742223262787, 0.01393487211316824, 0.011334271170198917, -0.011081475764513016, -0.025728674605488777, 0.02964160405099392, 0.0010250440100207925, -0.014053805731236935, 0.03173350170254707, -0.011346608400344849, 0.043836843222379684, -0.006856400985270739, 0.023951377719640732, 0.015228809788823128, 0.0278772059828043, 0.003535865107551217, 0.0589761845767498, -0.013789964839816093, -0.015072919428348541, 0.004674894269555807, -0.041496358811855316, -0.023641537874937057, -0.017195649445056915, -0.005673075094819069, -0.03263746574521065, 0.025934960693120956, -0.04405346140265465, -0.04141897335648537, -0.00003894690235028975, -0.03781583160161972, -0.007129346951842308, -0.018700622022151947, -0.010016272775828838, -0.02416844107210636, -0.042252570390701294, -0.0367497019469738, -0.007938461378216743, -0.015350762754678726, 0.007584067527204752, -0.01292191818356514, -0.0343099944293499, 0.0336175374686718, 0.0031241995748132467, 0.01589297503232956, -0.03110884502530098, -0.004154340364038944, 0.03013080731034279, -0.006453245412558317, 0.013456699438393116, -0.0225725956261158, 0.015014326199889183, 0.06763413548469543, 0.009382233954966068, 0.006184624508023262, 0.0442965105175972, -0.001183435320854187, 0.012077411636710167, 0.020756136626005173, -0.010245962999761105, 0.023321058601140976, -0.009084831923246384, -0.05682358890771866, 0.08106151223182678, 0.008582593873143196, -0.024139361456036568, 0.018083294853568077, -0.008679392747581005, 0.012192567810416222, 0.02485925517976284, 0.008946512825787067, 0.04524964839220047, 0.015296031720936298, -0.017832159996032715, 0.011980156414210796, -0.056996192783117294, -0.028835950419306755, 0.008117081597447395, 0.02343900315463543, -0.013623272068798542, -0.011667556129395962, 0.01014190074056387, 0.02491861768066883, 0.04819253832101822, -0.05903070420026779, -0.013747164979577065, -0.00857740268111229, 7.387091557947329e-33, 0.003045436693355441, 0.012663058005273342, 0.014557434245944023, -0.014839403331279755, 0.031887177377939224, -0.004572130274027586, 0.03754673898220062, 0.029983041808009148, -0.04148729518055916, 0.04552241042256355, 0.0044656009413301945, -0.010875251144170761, -0.0400572270154953, -0.007377969566732645, 0.03674337640404701, -0.05855351686477661, 0.011843256652355194, -0.015172794461250305, -0.0018499093130230904, -0.007230270188301802, 0.029701068997383118, -0.0014061660040169954, 0.026684116572141647, 0.010992917232215405, 0.009858771227300167, 0.03425828740000725, 0.012950816191732883, 0.01829899102449417, -0.020530780777335167, 0.00768828671425581, 0.014056806452572346, -0.032918523997068405, -0.006122419610619545, -0.05291888862848282, 0.00633382610976696, 0.04147440195083618, -0.006321215070784092, 0.010816587135195732, 0.02547946199774742, -0.013169419951736927, 0.02683989889919758, 0.011228366754949093, -0.004664813168346882, 0.0479910708963871, 0.007313658948987722, 0.021143091842532158, -0.026817817240953445, -0.007293342147022486, 0.025812651962041855, 0.01888531632721424, 0.01226078998297453, 0.0098371347412467, -0.03198743984103203, 0.01378081738948822, -0.004168333485722542, -0.027669111266732216, -0.035430051386356354, 0.01109333150088787, -0.0126583157107234, 0.0025630255695432425, -0.02536093257367611, -0.0052100252360105515, -0.040512945502996445, 0.02256322093307972, -0.007265029475092888, 0.013010912574827671, -0.0489063523709774, -0.014044602401554585, 0.00022608551080338657, 0.041165512055158615, 0.006211864296346903, -0.0031416371930390596, 0.00010440444748383015, 0.03549414500594139, 0.005033909808844328, -0.004171669017523527, 0.0006326922448351979, 0.05025288835167885, 0.005037697497755289, 0.03936922550201416, 0.020483532920479774, 0.02499682456254959, 0.029245898127555847, 0.002748498460277915, 0.020664053037762642, 0.04681754857301712, -0.025634463876485825, 0.02210838906466961, 0.01091868057847023, -0.020628897473216057, 0.023178601637482643, -0.014547544531524181, 0.006979122757911682, 0.01722545549273491, 0.02445950359106064, -1.3025941214550585e-8, -0.050027333199977875, -0.006232457235455513, -0.016418103128671646, 0.024714270606637, -0.000022984839233686216, 0.01859969086945057, 0.00023812921426724643, -0.04570447653532028, 0.007033811882138252, 0.0013024769723415375, 0.055859971791505814, -0.018653223291039467, -0.009059973061084747, 0.0030299248173832893, -0.0017283858032897115, -0.03673713281750679, -0.025613652542233467, -0.0009509610827080905, 0.03262811899185181, 0.04035487398505211, 0.020960455760359764, 0.010267592035233974, -0.013600260019302368, 0.004375210963189602, 0.021621383726596832, -0.025983033701777458, 0.0007816299330443144, -0.0936443880200386, -0.026553651317954063, -0.03321497142314911, 0.02991771139204502, -0.02547035738825798, -0.0014489993918687105, -0.01099582202732563, 0.0022111276630312204, -0.03109019249677658, 0.012925331480801105, -0.011346077546477318, -0.01095544546842575, -0.013048754073679447, -0.003967333119362593, -0.0007767226197756827, 0.004254043567925692, -0.03225177899003029, -0.0015892090741544962, -0.010781994089484215, -0.030123787000775337, -0.022402724251151085, -0.0036020351108163595, -0.04097595065832138, 0.02123125270009041, -0.009196710772812366, 0.0336383655667305, 0.04727127403020859, 0.04623936861753464, 0.010310651734471321, 0.020075231790542603, -0.017367377877235413, -0.029585259035229683, 0.013058734126389027, 0.027680519968271255, -0.006139206234365702, -0.025752156972885132, 0.001501911785453558 ]
neo4j-bbc-football-live-text-fouls-graph
https://markhneedham.com/blog/2015/05/16/neo4j-bbc-football-live-text-fouls-graph
false
2015-05-28 20:56:08
Python: Look ahead multiple elements in an iterator/generator
[ "python" ]
[ "Python" ]
As part of the BBC live text scraping code I've been working on I needed to take an iterator of raw events created by a generator and transform this into an iterator of cards shown in a match. The structure of the raw events I'm interested in is as follows: * Line 1: Player booked * Line 2: Player fouled * Line 3: Information about the foul e.g. [source,text] ---- events = [ {'event': u'Booking Pedro (Barcelona) is shown the yellow card for a bad foul.', 'sortable_time': 5083, 'match_id': '32683310', 'formatted_time': u'84:43'}, {'event': u'Rafinha (FC Bayern M\xfcnchen) wins a free kick on the right wing.', 'sortable_time': 5078, 'match_id': '32683310', 'formatted_time': u'84:38'}, {'event': u'Foul by Pedro (Barcelona).', 'sortable_time': 5078, 'match_id': '32683310', 'formatted_time': u'84:38'} ] ---- We want to take these 3 raw events and create one 'booking event'. We therefore need to have access to all 3 lines at the same time. I started with the following function: [source,python] ---- def cards(events): events = iter(events) item = events.next() next = events.next() event_id = 0 for next_next in events: event = item["event"] booking = re.findall("Booking.*", event) if booking: player = re.findall("Booking([^(]*)", event)[0].strip() team = re.findall("Booking([^(]*) \((.*)\)", event)[0][1] associated_foul = [x for x in [(next, event_id+1), (next_next, event_id+2)] if re.findall("Foul by.*", x[0]["event"])] if associated_foul: associated_foul = associated_foul[0] yield event_id, associated_foul[1], player, team, item, "yellow" else: yield event_id, "", player, team, item, "yellow" item = next next = next_next event_id += 1 ---- If we run the sample events through it we'd see this output: [source,python] ---- >>> for card_id, associated_foul, player, team, item, card_type in cards(iter(events)): print card_id, associated_foul, player, team, item, card_type 0 2 Pedro Barcelona {'match_id': '32683310', 'event': u'Booking Pedro (Barcelona) is shown the yellow card for a bad foul.', 'formatted_time': u'84:43', 'sortable_time': 5083} yellow ---- In retrospect, it's a bit of a hacky way of moving a window of 3 items over the iterator of raw events and yielding a 'booking' event if the regex matches. I thought there was probably a better way of doing this using https://docs.python.org/2/library/itertools.html[itertools] and http://stackoverflow.com/questions/6822725/rolling-or-sliding-window-iterator-in-python[indeed there is]! First we need to create a window function which will return us an iterator of tuples containing consecutive events: [source,python] ---- from itertools import tee, izip def window(iterable, size): iters = tee(iterable, size) for i in xrange(1, size): for each in iters[i:]: next(each, None) return izip(*iters) ---- Now let's have a look at how it works using a simple example: [source,python] ---- >>> numbers = iter(range(0,10)) >>> for triple in window(numbers, 3): print triple (0, 1, 2) (1, 2, 3) (2, 3, 4) (3, 4, 5) (4, 5, 6) (5, 6, 7) (6, 7, 8) (7, 8, 9) ---- Exactly what we need. Now let's plug the windows function into our cards function: [source,python] ---- def cards(events): events = iter(events) for event_id, triple in enumerate(window(events, 3)): item = triple[0] event = triple[0]["event"] booking = re.findall("Booking.*", event) if booking: player = re.findall("Booking([^(]*)", event)[0].strip() team = re.findall("Booking([^(]*) \((.*)\)", event)[0][1] associated_foul = [x for x in [(triple[1], event_id+1), (triple[2], event_id+2)] if re.findall("Foul by.*", x[0]["event"])] if associated_foul: associated_foul = associated_foul[0] yield event_id, associated_foul[1], player, team, item, "yellow" else: yield event_id, "", player, team, item, "yellow" ---- And finally check it still processes events correctly: [source,python] ---- >>> for card_id, associated_foul, player, team, item, card_type in cards(iter(events)): print card_id, associated_foul, player, team, item, card_type 0 2 Pedro Barcelona {'match_id': '32683310', 'event': u'Booking Pedro (Barcelona) is shown the yellow card for a bad foul.', 'formatted_time': u'84:43', 'sortable_time': 5083} yellow ----
null
null
[ -0.00898665189743042, -0.027083102613687515, -0.029334144666790962, 0.01004848163574934, 0.048957955092191696, -0.006628064904361963, 0.0005923655699007213, 0.05801895633339882, 0.022652536630630493, 0.013567758724093437, -0.00009555023279972374, 0.02733936533331871, -0.07250990718603134, 0.011357273906469345, 0.006980518344789743, 0.08678122609853745, 0.051754582673311234, -0.013983280397951603, 0.007903900928795338, -0.03438301384449005, 0.028137853369116783, 0.08568694442510605, -0.007513660006225109, 0.032607678323984146, 0.016504134982824326, 0.016882967203855515, 0.007655222434550524, 0.003916273359209299, -0.06731774657964706, -0.001787978457286954, 0.05341452732682228, -0.0019567490089684725, 0.00770166702568531, -0.012313561514019966, 0.03860491141676903, -0.05521680787205696, -0.019446836784482002, 0.014188325963914394, -0.002417143201455474, 0.014953222125768661, -0.05447416752576828, 0.01062705833464861, -0.03923123702406883, 0.002336004748940468, -0.05027603358030319, 0.015737922862172127, -0.01908307895064354, 0.02338298410177231, -0.01904016174376011, -0.011600596830248833, -0.05261412635445595, 0.03986918553709984, -0.010774843394756317, -0.019888238981366158, -0.009785380214452744, 0.038841526955366135, 0.00998581014573574, -0.04414459690451622, 0.016050633043050766, -0.02218186855316162, 0.010586024262011051, 0.00016679025429766625, 0.012102117761969566, 0.023779554292559624, 0.01527022011578083, -0.013810541480779648, -0.005955223925411701, 0.05333196744322777, -0.027107540518045425, -0.02304575778543949, -0.018938081339001656, 0.02246648445725441, -0.03541820868849754, 0.007266751956194639, 0.015354922972619534, -0.07236132025718689, -0.008488917723298073, 0.07144147157669067, -0.011378171853721142, 0.07621974498033524, 0.002132137306034565, 0.018941519781947136, 0.020653022453188896, 0.013720201328396797, 0.010844225063920021, -0.03055138699710369, -0.0628938302397728, -0.0047646514140069485, -0.034139666706323624, 0.03665827959775925, 0.025117704644799232, -0.06164687126874924, 0.005033241119235754, 0.012601213529706001, -0.03213861584663391, 0.010153832845389843, -0.009516152553260326, 0.010595334693789482, -0.013295658864080906, -0.01571742631494999, -0.04812975600361824, -0.03409287706017494, 0.05329244211316109, 0.010679139755666256, -0.08283587545156479, -0.007206415757536888, -0.006346349138766527, -0.00026944358251057565, 0.023602129891514778, -0.01023080013692379, -0.032383013516664505, -0.028177380561828613, -0.026903601363301277, 0.0035415366291999817, -0.07902131229639053, 0.04380208998918533, 0.03060973435640335, -0.016762305051088333, -0.010626965202391148, -0.0010390219977125525, 0.04262508824467659, 0.0030628847889602184, 0.015619928948581219, 0.10161826014518738, 0.005305761471390724, 0.036086346954107285, 0.008276151493191719, 0.07682331651449203, -0.025262190029025078, -0.05892216041684151, -0.01975816674530506, 0.07498449087142944, -0.012383082881569862, 0.011720944195985794, -0.009266960434615612, -0.017970507964491844, -0.03787602484226227, -0.016775041818618774, 0.0563291534781456, 0.04754133149981499, 0.007987803779542446, -0.005488588474690914, 0.0061860354617238045, 0.015348335728049278, 0.0015605621738359332, 0.0009425572352483869, -0.012192192487418652, -0.030294587835669518, 0.017288796603679657, 0.022708643227815628, 0.029704013839364052, -0.01193622499704361, 0.05591491237282753, -0.017683565616607666, -0.018440447747707367, 0.09037548303604126, 0.034385278820991516, 0.030245689675211906, -0.04743627831339836, -0.0014590852661058307, 0.03979210928082466, 0.02657517045736313, -0.0063807666301727295, 0.045993316918611526, 0.0029288686346262693, -0.012321071699261665, 0.01815573126077652, 0.06070226430892944, -0.03272974118590355, -0.0031723210122436285, -0.05065053701400757, -0.04345156252384186, 0.07808243483304977, -0.035324275493621826, -0.014905537478625774, 0.03551667928695679, 0.056525539606809616, 0.036612365394830704, 0.07678930461406708, 0.004343814216554165, -0.0661277025938034, 0.004013901576399803, -0.0005727625102736056, 0.03837956488132477, 0.03289955109357834, -0.012643607333302498, 0.08684390783309937, 0.052491020411252975, -0.0010303397430106997, 0.03370954468846321, -0.08947881311178207, -0.06458315253257751, -0.0491672046482563, -0.013868903741240501, 0.05444886535406113, -0.05700737237930298, 0.0266337301582098, 0.06909462809562683, 0.012090141884982586, 0.05356539413332939, 0.011736095882952213, 0.002824441995471716, 0.009447842836380005, -0.032433170825242996, -0.07190579175949097, 0.02738526090979576, 0.02583935111761093, -0.03934025391936302, -0.01845538057386875, 0.02385186217725277, -0.043172355741262436, 0.017552873119711876, 0.0527326799929142, -0.020052868872880936, 0.03197319060564041, 0.028312742710113525, 0.04863245040178299, -0.01998225972056389, 0.0511474646627903, -0.07713430374860764, 0.042860113084316254, 0.020993279293179512, -0.004259374924004078, -0.044844601303339005, 0.005560402292758226, 0.14315493404865265, 0.02621958591043949, -0.0035427322145551443, -0.04123089089989662, -0.004170967731624842, -0.015934603288769722, -0.019253196194767952, -0.020064648240804672, -0.03614470362663269, -0.03728959709405899, -0.0014077536761760712, -0.04911397024989128, -0.03790730610489845, 0.00213410472497344, -0.04229166731238365, 0.011804969049990177, 0.04403058439493179, -0.02165885642170906, 0.050889380276203156, 0.0035198491532355547, -0.0066854702308773994, -0.01811908558011055, -0.01404884085059166, -0.03987273573875427, -0.0007018129108473659, 0.027822885662317276, -0.03145263344049454, 0.016054553911089897, -0.04569076746702194, -0.03178027272224426, -0.008454279974102974, -0.05778903141617775, 0.022414879873394966, 0.0684201642870903, 0.06346997618675232, -0.013480011373758316, 0.028973963111639023, -0.02060130052268505, -0.004738235846161842, -0.038189347833395004, -0.05716138333082199, -0.051571328192949295, -0.020795488730072975, -0.00160015351139009, 0.018388871103525162, 0.03712187707424164, 0.023622192442417145, 0.0011806210968643427, 0.012506330385804176, -0.008258666843175888, 0.012560972012579441, 0.0627136081457138, -0.018942086026072502, -0.032337773591279984, -0.016502756625413895, -0.04222020134329796, 0.040805887430906296, -0.06355021893978119, -0.05526682361960411, -0.0010002340422943234, -0.0745052918791771, 0.01666606031358242, -0.07092934846878052, -0.018960069864988327, 0.00739187840372324, -0.01866849884390831, 0.05770641565322876, -0.011975649744272232, -0.008242610841989517, 0.05056320130825043, -0.021913031116127968, 0.02793957106769085, 0.034032221883535385, -0.008030201308429241, 0.011446921154856682, 0.0017927695298567414, 0.018243297934532166, 0.02964359149336815, -0.03253086283802986, -0.0062479316256940365, -0.05426982790231705, 0.014644240029156208, -0.03293725475668907, -0.2590494453907013, 0.02025623247027397, -0.006990961264818907, -0.03429959714412689, 0.033400632441043854, -0.00275497161783278, 0.014196290634572506, -0.03143386170268059, -0.00517071271315217, -0.020528923720121384, -0.03563139587640762, -0.05529426038265228, -0.028213275596499443, 0.03087702952325344, 0.025694018229842186, 0.010257158428430557, -0.009793439880013466, -0.03960971534252167, 0.007265979424118996, 0.05907591059803963, 0.01666530780494213, -0.058515895158052444, -0.039766330271959305, 0.054182421416044235, 0.004920169245451689, 0.051996517926454544, -0.05700795352458954, -0.0009509741794317961, -0.05755225569009781, -0.030405964702367783, 0.03708454594016075, -0.01715870015323162, 0.008320310153067112, -0.020539291203022003, -0.02029048465192318, -0.02552386000752449, 0.058479949831962585, -0.006560678593814373, -0.008611607365310192, 0.008152011781930923, -0.03269008547067642, -0.028363509103655815, 0.004237516783177853, -0.01702568680047989, 0.11062142252922058, 0.007534877397119999, -0.037412695586681366, -0.040358155965805054, -0.012121983803808689, 0.07290518283843994, -0.026478895917534828, -0.038577254861593246, -0.001553072826936841, 0.029906943440437317, -0.014956151135265827, 0.012477800250053406, -0.033999357372522354, -0.008042137138545513, -0.04534139856696129, -0.021580494940280914, -0.015932876616716385, -0.0543958805501461, -0.00473175710067153, -0.028691938146948814, -0.024384725838899612, -0.0443517304956913, -0.019141143187880516, -0.00561462203040719, 0.05773407965898514, 0.04822065681219101, -0.04794367775321007, 0.012000977993011475, -0.013380153104662895, -0.09049805253744125, -0.02128143236041069, -0.001795739633962512, 0.009740966372191906, 0.008232634514570236, 0.019994810223579407, 0.04090699553489685, -0.038840219378471375, -0.06750088185071945, 0.015491894446313381, 0.003767670365050435, 0.02698281779885292, -0.02886579930782318, 0.028884923085570335, -0.025820543989539146, -0.004180246964097023, -0.04523734375834465, 0.07545175403356552, -0.018633374944329262, -0.0360870435833931, 0.018318215385079384, -0.003413595026358962, 0.046805474907159805, 0.00641558738425374, -0.010521730408072472, 0.02355399914085865, 0.040545158088207245, 0.02317742072045803, -0.072859987616539, 0.008529454469680786, -0.0206571314483881, 0.01184189785271883, 0.006016036961227655, -0.03754125162959099, 0.0035249958746135235, 0.03367486596107483, 0.012536921538412571, 0.024872977286577225, -0.016745999455451965, 0.013380941934883595, -0.02255706675350666, 0.009490069933235645, -0.01581600122153759, 0.0630892887711525, 0.022232219576835632, 0.0028390176594257355, -0.007701914291828871, -0.07859263569116592, 0.028379598632454872, 0.00003484893386485055, 0.00022913035354577005, -0.06703647971153259, -0.05260058864951134, 0.01418464258313179, -0.018905090168118477, 0.008018746972084045, -0.010007703676819801, 0.003785919863730669, -0.02325473167002201, 0.04068402573466301, -0.035059813410043716, 0.03814506158232689, -0.004945359192788601, -0.025994373485445976, -0.04027717188000679, -0.009722348302602768, 0.0278877355158329, 0.0004404167120810598, 0.005551998503506184, -0.004637799225747585, 0.01964186318218708, 0.04957844689488411, -0.004296785686165094, 0.0046693249605596066, -0.003527205903083086, 0.0046460735611617565, 0.03460712358355522, -0.0025000320747494698, -0.009320016950368881, 0.020896760746836662, -0.031530071049928665, -0.012344584800302982, 0.01910136081278324, 0.035132747143507004, -0.007695517502725124, -0.015336461365222931, -0.038180459290742874, 0.021777838468551636, -0.029448652639985085, -0.004943230655044317, -0.015473735518753529, 0.0117936497554183, 0.04374278709292412, 0.005329628009349108, -0.001613301457837224, 0.014255855232477188, -0.0006629754207096994, -0.0017957122763618827, -0.008936706930398941, -0.03668941184878349, 0.018098825588822365, -0.023131754249334335, -0.018877577036619186, 0.012474709190428257, 0.05388018861413002, -0.021818911656737328, -0.011321358382701874, -0.026054251939058304, -0.003977414220571518, 0.022560499608516693, 0.0287178885191679, 0.04553984850645065, 0.050890691578388214, -0.029457859694957733, -0.020201951265335083, -0.012477532029151917, -0.05434837564826012, -0.025695865973830223, -0.0008987927576527, -0.007019517477601767, -0.027587968856096268, -0.0352647565305233, -0.08327258378267288, 0.014114483259618282, 0.014269160106778145, 0.014803322963416576, -0.018553268164396286, 0.0050011673010885715, -0.01118563488125801, -0.02955394797027111, -0.007492017466574907, 0.03362961858510971, -0.06428567320108414, -0.018769480288028717, -0.03767693415284157, 0.012902048416435719, 0.018252572044730186, 0.02022956684231758, -0.037510547786951065, 0.002365517197176814, 0.005530923139303923, -0.004449428059160709, -0.010202029719948769, -0.01973729580640793, -0.013128373771905899, 0.0418832004070282, -0.018865056335926056, 0.039959996938705444, -0.017121240496635437, 0.0008701812475919724, -0.007680043578147888, -0.020017562434077263, 0.024554699659347534, -0.016317900270223618, -0.026734136044979095, 0.03215433284640312, -0.025239912793040276, 0.04163564741611481, -0.02669576369225979, 0.05507965758442879, 0.04068891331553459, -0.004127352964133024, -0.008029220625758171, -0.050258852541446686, -0.001425897004082799, 0.021031178534030914, 0.06850261241197586, 0.01860072836279869, -0.005963815841823816, -0.039902716875076294, 0.006119613070040941, -0.015312044881284237, 0.00883825495839119, 0.022735293954610825, -0.030089538544416428, 0.007830589078366756, 0.07142258435487747, 0.020924845710396767, 0.04513940587639809, 0.0013599885860458016, -0.029638880863785744, 0.04852538928389549, -0.06203719228506088, -0.009095505811274052, -0.004010685719549656, -0.04527943208813667, 0.03139801323413849, 0.0034457240253686905, 0.02566147781908512, -0.06590228527784348, 0.03574832156300545, 0.011220939457416534, 0.04088976979255676, 0.04539133980870247, -0.0014971642522141337, 0.025591442361474037, -0.013606182299554348, 0.014946249313652515, -0.0950017049908638, -0.00659326184540987, 0.07347112149000168, 0.009483758360147476, 0.007981669157743454, -0.02053079567849636, -0.028250867500901222, 0.028471428900957108, -0.06345592439174652, -0.028277894482016563, 0.033981043845415115, 0.007540630642324686, -0.0033149556256830692, 0.024764586240053177, -0.05038591846823692, 0.013453946448862553, 0.054517362266778946, -0.04140494018793106, -0.0015197762986645103, -0.011957507580518723, 0.060443829745054245, -0.011265898123383522, 0.003918489906936884, 0.00023367509129457176, -0.028276214376091957, 0.077906534075737, 0.04077795520424843, 0.022286895662546158, 0.044443920254707336, -0.02217528037726879, 0.021518396213650703, -0.004196543246507645, -0.027079753577709198, 0.01726415380835533, 0.025872716680169106, -0.004609212279319763, -0.05412617698311806, 0.02000121958553791, -0.008671293966472149, -0.032690826803445816, -0.04393526539206505, 0.08629953116178513, -0.0045325662940740585, -0.036949947476387024, -0.03827271983027458, -0.0063357967883348465, -0.057941388338804245, -0.025275344029068947, -0.02516140230000019, 0.010267146863043308, -0.044200997799634933, 0.07273851335048676, -0.01100433710962534, -0.01156450156122446, 0.07922753691673279, -0.025734174996614456, -0.0011930475011467934, 0.017939139157533646, 0.08168824017047882, 0.09523916244506836, 0.05371516942977905, -0.028252597898244858, 0.0672115758061409, -0.024443181231617928, -0.04897164925932884, 0.012575315311551094, -0.0247514545917511, 0.008048966526985168, -0.0017136235255748034, 0.021565411239862442, 0.05400406941771507, -0.008779837749898434, 0.04981035739183426, 0.004918122198432684, -0.01302146352827549, 0.018992789089679718, 0.017856569960713387, 0.028494833037257195, 0.05924020707607269, 0.01784062385559082, 0.020228544250130653, 0.003474245546385646, -0.0440121628344059, 0.056075043976306915, -0.0042607528157532215, -0.025355549529194832, 0.03803911805152893, -0.03211669251322746, 0.019745225086808205, 0.01579578034579754, 0.04629410803318024, 0.07055298984050751, 0.002152339555323124, -0.031263403594493866, 0.006824598181992769, 0.041462499648332596, 0.00828550010919571, 0.005249379202723503, -0.015313679352402687, -0.003597282338887453, -0.0045680031180381775, -0.06792353838682175, -0.026110678911209106, -0.043225593864917755, -0.024442868307232857, 0.02287270501255989, -0.002611086005344987, 0.0016307085752487183, 0.01974799484014511, 0.010027210228145123, -0.05098487064242363, -0.02543800324201584, -0.06646552681922913, -0.057638980448246, -0.07449154555797577, -0.033425167202949524, 0.0260921660810709, -0.005384377203881741, -0.03550996631383896, -0.03259139135479927, -0.03432977944612503, -0.015278024598956108, -0.006158023606985807, -0.04879247769713402, -0.007640764117240906, 0.014099180698394775, 0.014216541312634945, 0.045618217438459396, 0.01946384087204933, 0.04665512219071388, 0.010453838855028152, -0.01368799153715372, -0.013396470807492733, 0.014473660849034786, 0.045072831213474274, 0.023258980363607407, 0.005212233867496252, -0.09819181263446808, 0.019978540018200874, 0.03930887207388878, -0.024782806634902954, -0.0611836276948452, 0.027746008709073067, 0.0157904252409935, 0.03159288316965103, 0.04385678097605705, -0.04538102075457573, -0.005887710489332676, -0.0386849083006382, -0.013731168583035469, -0.005714145954698324, 0.02173091098666191, 0.050266556441783905, -0.027883069589734077, 0.07022976130247116, 0.0280571598559618, 0.01621159538626671, -0.03688191622495651, -0.0003923446638509631, -0.01941644959151745, -0.0035676939878612757, -0.04269767552614212, -0.02118714340031147, -0.05974394455552101, -0.08655638247728348, -0.02286103554069996, 0.019906852394342422, -0.0017055956413969398, -0.040028322488069534, 0.03727149963378906, 0.017005207017064095, -0.0100499726831913, 0.04233327880501747, -0.03834263235330582, 0.023128099739551544, -0.026312174275517464, -0.016167383641004562, -0.024750692769885063, 0.03007371909916401, 0.0022376251872628927, 0.0217257272452116, -0.013810014352202415, -0.012378965504467487, -0.002798044588416815, -0.030667468905448914, 0.00661318376660347, 0.01811990886926651, -0.041013702750205994, 0.01913939230144024 ]
[ -0.07760583609342575, -0.002053263131529093, -0.028681442141532898, -0.03904535993933678, 0.08690091222524643, -0.0369708277285099, 0.01488891988992691, 0.011276607401669025, 0.04029908776283264, 0.016457602381706238, -0.01818227954208851, -0.0795557051897049, 0.0022775433026254177, -0.02475854754447937, 0.024414226412773132, -0.023764263838529587, -0.029152411967515945, -0.0718420222401619, -0.0356345996260643, 0.0322812981903553, -0.001535276765935123, 0.0027020820416510105, -0.04289964586496353, -0.023194164037704468, 0.008843284100294113, 0.022287258878350258, 0.028858045116066933, -0.022371551021933556, -0.031136393547058105, -0.20604252815246582, 0.01064976118505001, -0.029089173302054405, 0.02258855104446411, 0.006970843765884638, 0.01686576008796692, -0.009998602792620659, -0.01251219678670168, 0.012271788902580738, 0.024878427386283875, 0.060193486511707306, 0.01464411336928606, 0.0026093297637999058, -0.04632138833403587, -0.05464066565036774, 0.0408303365111351, -0.023730207234621048, 0.003950607497245073, 0.005319096613675356, 0.046372316777706146, 0.026748046278953552, -0.056820403784513474, 0.03494837507605553, 0.0009137172601185739, -0.0412120558321476, -0.015214179642498493, 0.0287637859582901, 0.05287305638194084, 0.056220754981040955, 0.005359203554689884, 0.039210472255945206, 0.030608313158154488, -0.0002105383900925517, -0.14947102963924408, 0.09435418993234634, -0.012819535098969936, 0.03417453169822693, -0.05999612808227539, 0.043171122670173645, 0.01982058584690094, 0.09042365103960037, -0.018251273781061172, -0.03464375436306, 0.01109767984598875, 0.055937111377716064, 0.02884715050458908, -0.0344606414437294, -0.02296900749206543, 0.003412039717659354, -0.002522543305531144, 0.00782957673072815, -0.06806531548500061, -0.029819520190358162, -0.023260274901986122, -0.036473073065280914, -0.03456782549619675, 0.013124099001288414, -0.03464660048484802, 0.039470065385103226, 0.008969840593636036, 0.0253100898116827, 0.029548179358243942, 0.03973482549190521, 0.0008066783775575459, 0.020509446039795876, -0.10039272159337997, -0.024025507271289825, -0.007011439651250839, 0.0018243227386847138, -0.017016243189573288, 0.4391503632068634, 0.019198894500732422, -0.0008367730188183486, 0.003734585829079151, 0.0609234943985939, 0.02196345292031765, -0.024363812059164047, 0.004173764493316412, -0.05946635827422142, -0.03161391615867615, -0.04285825043916702, -0.020195208489894867, -0.018723782151937485, 0.06576304137706757, -0.028235770761966705, 0.03346830606460571, 0.0889020785689354, -0.00403473200276494, 0.02598373219370842, -0.022566547617316246, 0.02797861024737358, -0.016448868438601494, -0.0015675589675083756, -0.037042610347270966, 0.018968522548675537, -0.03785419836640358, 0.04486129432916641, 0.05647604912519455, 0.08971846103668213, 0.022066490724682808, 0.0304335318505764, 0.05911494418978691, -0.03985888138413429, -0.08133868128061295, 0.014269152656197548, -0.013752720318734646, -0.017832042649388313, 0.015661537647247314, -0.01490988302975893, 0.01979200355708599, 0.03505910560488701, -0.0026507764123380184, -0.07555295526981354, 0.03515281528234482, -0.02401588298380375, -0.04835467040538788, 0.0845298320055008, -0.021973369643092155, -0.026165861636400223, -0.017031747847795486, -0.06150369718670845, -0.01230880618095398, 0.00006786343874409795, 0.04702575504779816, -0.04858662560582161, -0.03227938711643219, 0.006037657614797354, 0.06951242685317993, -0.024771176278591156, -0.04622747004032135, -0.030867334455251694, -0.029337652027606964, -0.049900151789188385, -0.014059597626328468, 0.05800045281648636, 0.02388426661491394, -0.12311946600675583, -0.003617537207901478, -0.02204306237399578, -0.024909084662795067, -0.10738132894039154, 0.0025458845775574446, -0.015186031349003315, -0.0581795796751976, 0.02059839852154255, 0.044559117406606674, 0.020705798640847206, -0.026523228734731674, -0.010401182807981968, 0.08716832101345062, 0.012971694581210613, 0.010851816274225712, -0.00301373447291553, -0.07093164324760437, 0.019464874640107155, -0.03627851605415344, -0.06227217614650726, -0.05815332382917404, -0.017759248614311218, -0.0009037964628078043, 0.008940749801695347, -0.041169583797454834, -0.043855827301740646, -0.05745904892683029, 0.04409394785761833, -0.02246679924428463, 0.014342120848596096, -0.013687188737094402, -0.03260888531804085, 0.002244157949462533, -0.03523513302206993, 0.0012460689758881927, 0.015503177419304848, 0.0023427861742675304, 0.008402388542890549, -0.025878356769680977, 0.02295004390180111, 0.016109677031636238, -0.04224827140569687, 0.05358189344406128, 0.005076322238892317, -0.016340970993041992, -0.021550139412283897, -0.00622736057266593, -0.012590070255100727, 0.004768062848597765, -0.009092376567423344, -0.00552495289593935, 0.02458512783050537, 0.012238923460245132, 0.027096034958958626, -0.023625867441296577, 0.0024894941598176956, 0.030047664418816566, -0.3413710594177246, -0.017910128459334373, -0.04483870789408684, 0.001392396166920662, 0.018068037927150726, -0.010724792256951332, 0.00537850521504879, -0.0302334763109684, 0.02624165453016758, 0.03783329948782921, 0.08978796750307083, -0.026109158992767334, 0.001746708177961409, -0.04942713677883148, -0.0028932634741067886, 0.02127069979906082, -0.06695763021707535, -0.004307788796722889, 0.003722899593412876, 0.08495096862316132, 0.046453990042209625, -0.011749588884413242, -0.01121820230036974, -0.034755002707242966, -0.009254084900021553, -0.06255665421485901, 0.1640806496143341, 0.05974645912647247, 0.007921981625258923, -0.0531914122402668, 0.040342070162296295, 0.016445640474557877, -0.017771713435649872, -0.06895896792411804, 0.019441399723291397, -0.018196048215031624, 0.01686757430434227, 0.005356895737349987, 0.0441351942718029, -0.048493172973394394, -0.012409312650561333, 0.041539210826158524, -0.014364787377417088, -0.04615873843431473, -0.011389200575649738, 0.008809132501482964, -0.001418947009369731, -0.05860905721783638, -0.004638255573809147, 0.07733874022960663, 0.041070833802223206, 0.0017227214993909001, 0.05745919048786163, 0.01403853576630354, 0.03772709518671036, -0.020693974569439888, -0.05700363963842392, 0.0017845049733296037, -0.031895194202661514, -0.016260141506791115, 0.017664331942796707, 0.021296581253409386, 0.07035484164953232, -0.06244862452149391, -0.0015841855201870203, 0.03372785076498985, 0.042018599808216095, -0.018153171986341476, 0.031292982399463654, -0.027081945911049843, -0.02633090130984783, 0.04578259214758873, 0.035871729254722595, 0.014466247521340847, 0.020831668749451637, 0.05763630568981171, 0.007138260640203953, -0.010828801430761814, 0.03892689198255539, 0.034909166395664215, 0.03825409710407257, -0.01389794796705246, 0.05394585803151131, -0.0004597939259838313, 0.014675003476440907, 0.03748675435781479, 0.002062480431050062, -0.0019027540693059564, 0.061801936477422714, 0.025217154994606972, -0.0022107514087110758, -0.00145571434404701, -0.036335721611976624, 0.006718024145811796, 0.0015027278568595648, -0.029491428285837173, -0.2713889479637146, 0.0238645002245903, 0.0697733610868454, 0.0431438572704792, 0.03186434134840965, 0.002710387110710144, 0.04026709124445915, -0.018550949171185493, -0.03482143208384514, -0.006944541819393635, -0.015438580885529518, 0.0012787028681486845, -0.012262368574738503, -0.01249418780207634, -0.014432517811655998, 0.004246389959007502, 0.01874369941651821, -0.026245173066854477, 0.004577499348670244, 0.02794499695301056, 0.03750532492995262, 0.007670615334063768, 0.1531749814748764, 0.01320501510053873, 0.05171314999461174, 0.0377618633210659, -0.0016809020889922976, -0.041518744081258774, 0.0586058646440506, 0.00513139134272933, 0.019929328933358192, -0.03034871257841587, 0.0391293428838253, 0.045009493827819824, 0.002620451617985964, -0.01596897281706333, -0.002236044267192483, 0.04803468659520149, -0.010617864318192005, -0.042539745569229126, -0.02672872133553028, 0.04159069061279297, -0.06444291770458221, -0.020559921860694885, 0.03882588818669319, 0.03792017698287964, -0.00658700056374073, -0.03506788983941078, -0.050023581832647324, 0.0006567987147718668, -0.024860143661499023, -0.024604182690382004, -0.013945461250841618, -0.017516544088721275, 0.0050531295128166676, 0.060781750828027725, 0.04302255064249039, -0.003426214912906289, 0.03580110892653465, 0.04269341379404068, 0.011704225093126297, -0.017400875687599182, 0.07581020891666412, 0.022217899560928345, -0.007155760191380978 ]
[ 0.01611437276005745, 0.03920649737119675, -0.007615647278726101, 0.018766311928629875, 0.01855865679681301, 0.038779620081186295, 0.021898537874221802, -0.002971034264191985, 0.04130615293979645, -0.03485613316297531, -0.036251358687877655, -0.01284993439912796, -0.04697530344128609, 0.0011389253195375204, 0.023746542632579803, -0.036987386643886566, -0.011135557666420937, -0.06625522673130035, 0.029096193611621857, -0.0006172945140860975, -0.00497082993388176, 0.03759290277957916, 0.005185113754123449, 0.017341485247015953, -0.06297548860311508, 0.018725216388702393, -0.0120468745008111, 0.028747892007231712, 0.02503085322678089, -0.11407241970300674, -0.031338781118392944, -0.054009586572647095, 0.031181205064058304, 0.005685075651854277, -0.0047991001047194, -0.031485024839639664, -0.006681733299046755, 0.01838654652237892, -0.021893415600061417, 0.009689944796264172, -0.001386868767440319, -0.02303139492869377, 0.005850657355040312, 0.03044445440173149, 0.03118310496211052, 0.010457342490553856, -0.013282010331749916, 0.014164268970489502, -0.00253778463229537, 0.03751745447516441, -0.03765557333827019, 0.0180002860724926, 0.036945853382349014, -0.01847025752067566, 0.08525574952363968, -0.01383882574737072, 0.004169460851699114, -0.03612496703863144, -0.012498503550887108, -0.07498543709516525, 0.012535285204648972, 0.03161940351128578, -0.022702373564243317, -0.01617833599448204, -0.025368915870785713, -0.04051745682954788, -0.018350666388869286, 0.023879121989011765, 0.006157620344310999, -0.00847659818828106, -0.026273157447576523, 0.0003463215834926814, -0.02673930861055851, -0.009967665188014507, 0.012319101952016354, 0.0025614076294004917, -0.030271636322140694, -0.03657734766602516, -0.004239413887262344, -0.03265799582004547, -0.01814761571586132, -0.050147827714681625, 0.02205340750515461, 0.0017260618042200804, -0.0007214525830931962, -0.06368886679410934, -0.00823142658919096, 0.011953595094382763, 0.011306561529636383, 0.01007665041834116, -0.03272005543112755, 0.015281799249351025, 0.03981368988752365, 0.03471655398607254, -0.08347121626138687, 0.030123135074973106, 0.0011968073667958379, -0.02544162981212139, -0.007164778187870979, 0.7971135377883911, 0.008112093433737755, 0.049961645156145096, -0.03434596583247185, 0.01431212481111288, 0.004054802469909191, 0.03628544136881828, 0.011579595506191254, -0.016392286866903305, 0.016070056706666946, -0.026430265977978706, 0.02660144865512848, 0.016049742698669434, 0.005011231638491154, 0.0022390801459550858, -0.005375696811825037, 0.07716091722249985, -0.03467140719294548, 0.012079623527824879, -0.0012526399223133922, 0.03968806937336922, 0.025279071182012558, -0.0027215497102588415, 0.003547410015016794, 0.02432434819638729, 0.028433242812752724, -0.15845505893230438, 0.0447639524936676, -7.772129875346954e-33, 0.026359805837273598, -0.007688823621720076, -0.038658954203128815, -0.002580337692052126, -0.00531127629801631, 0.011389849707484245, -0.017451448366045952, -0.02114781178534031, -0.0031126895919442177, -0.004730905406177044, 0.015788959339261055, -0.017040230333805084, 0.0006874477840028703, -0.029054848477244377, 0.024208374321460724, -0.008920973166823387, -0.023708492517471313, 0.0367252491414547, -0.017350126057863235, 0.00729581993073225, -0.022489221766591072, 0.021126950159668922, 0.042947933077812195, 0.0022356677800416946, 0.04474752023816109, 0.06722715497016907, -0.03139321133494377, -0.03358287364244461, 0.021468332037329674, -0.047719184309244156, -0.0377303883433342, -0.004225517623126507, -0.021075397729873657, -0.01629994809627533, 0.00040257596992887557, -0.02642103284597397, -0.0380907766520977, -0.00937265157699585, -0.04866279661655426, 0.0010243537835776806, -0.054443493485450745, -0.0075167398899793625, -0.01655266247689724, -0.0707278624176979, -0.028784865513443947, 0.004013057332485914, -0.019797001034021378, -0.007018581498414278, -0.026207691058516502, 0.007331803906708956, 0.01625429280102253, -0.016075726598501205, 0.02744031324982643, -0.037118442356586456, -0.010852416045963764, 0.009299627505242825, 0.017915628850460052, 0.07764977961778641, 0.007585899438709021, -0.033913709223270416, 0.025191910564899445, -0.0006277089123614132, -0.01854037493467331, 0.06244201958179474, -0.03184007480740547, 0.026802977547049522, 0.011310543864965439, -0.0033679057378321886, 0.03264445438981056, -0.032691650092601776, -0.0657062903046608, 0.037126973271369934, -0.01699175499379635, -0.013952077366411686, 0.0019391733221709728, -0.03387567400932312, -0.0016128219431266189, -0.014991519972682, -0.009607311338186264, 0.052858058363199234, 0.01474153995513916, 0.009424165822565556, -0.00682507548481226, -0.02500789426267147, -0.017998171970248222, 0.006480058655142784, 0.047647204250097275, 0.02310861647129059, 0.011796150356531143, 0.022189384326338768, -0.0030103675089776516, 0.02298509143292904, 0.000336481403792277, 0.010584324598312378, -0.0014556280802935362, 6.608179613733711e-33, -0.02848746068775654, -0.04475775733590126, 0.014340906403958797, 0.006585376337170601, 0.015517562627792358, -0.022502874955534935, 0.01345848385244608, 0.04662339389324188, -0.017265556380152702, 0.019996706396341324, -0.014441435225307941, -0.0060820081271231174, -0.019856970757246017, 0.0020541490521281958, 0.07138929516077042, -0.02394559234380722, 0.008237598463892937, 0.0569964163005352, 0.019863568246364594, 0.011685343459248543, 0.028978874906897545, 0.008953019976615906, 0.019466208294034004, 0.008899560198187828, -0.05199674889445305, 0.03411737084388733, 0.011938417330384254, -0.004925266839563847, -0.00383803341537714, -0.0023132136557251215, -0.00005373765452532098, -0.028393259271979332, -0.0032123306300491095, -0.0020550130866467953, -0.03173601254820824, 0.02652287669479847, 0.006778631825000048, 0.0052870092913508415, 0.006517233792692423, 0.0006939590675756335, 0.03408088907599449, 0.011689692735671997, -0.04765768721699715, 0.03899751603603363, 0.003765843575820327, 0.018401222303509712, -0.030908294022083282, -0.014992701821029186, 0.03890747204422951, 0.03706536814570427, 0.018989600241184235, 0.0009575355215929449, -0.03104880452156067, 0.019947148859500885, 0.007942022755742073, -0.0072767529636621475, -0.017423616722226143, -0.015991052612662315, -0.011149621568620205, 0.00766333332285285, -0.06833762675523758, 0.02115463837981224, -0.015431161038577557, 0.03190711885690689, 0.027150509878993034, 0.025601031258702278, -0.08058015257120132, -0.024120457470417023, 0.016898538917303085, 0.0065927570685744286, -0.02089030295610428, -0.02290288172662258, -0.03737678751349449, 0.05841955915093422, -0.024189770221710205, 0.05942823365330696, -0.008872301317751408, 0.002881594467908144, -0.00800345093011856, 0.013962317258119583, 0.024777868762612343, -0.03590304031968117, 0.05682055279612541, 0.0061990609392523766, -0.008646287955343723, 0.05273165926337242, 0.005992453079670668, -0.01239053811877966, 0.03352566435933113, -0.019716352224349976, 0.041528552770614624, -0.008170455694198608, 0.03772745653986931, -0.02525554597377777, -0.011446992866694927, -1.2910853719461102e-8, -0.07310308516025543, -0.0017604194581508636, -0.01770257018506527, 0.04693130776286125, -0.02204468846321106, 0.003684114431962371, 0.011999770067632198, -0.07132764905691147, 0.01651795208454132, -0.01876269467175007, 0.0268897395581007, -0.011774644255638123, -0.013914058916270733, 0.002407585270702839, 0.028535399585962296, -0.034049659967422485, -0.03458068519830704, -0.022228114306926727, 0.02334664762020111, 0.041200459003448486, 0.027940161526203156, 0.02023768052458763, -0.001534843584522605, -0.016301384195685387, -0.007027497049421072, -0.03159038722515106, 0.01197236217558384, -0.09485502541065216, 0.013416492380201817, -0.04034034162759781, 0.028042510151863098, -0.03002873808145523, 0.020179256796836853, 0.044534437358379364, -0.00938795693218708, -0.03533497825264931, 0.020843053236603737, -0.0355520024895668, 0.02975556254386902, 0.019517261534929276, -0.00002007266266446095, -0.034370455890893936, -0.04808846116065979, -0.05237981304526329, 0.00902833417057991, -0.019970158115029335, -0.04344220831990242, -0.014762788079679012, -0.0026319907046854496, -0.04472590610384941, -0.014222441241145134, -0.035702113062143326, 0.026171335950493813, -0.0019912899006158113, 0.0685976892709732, 0.04225538671016693, 0.015152908861637115, 0.006371675059199333, 0.024111934006214142, -0.04410649463534355, 0.04696950688958168, -0.0145388413220644, -0.02269715815782547, -0.035760752856731415 ]
python-look-ahead-multiple-elements-in-an-iteratorgenerator
https://markhneedham.com/blog/2015/05/28/python-look-ahead-multiple-elements-in-an-iteratorgenerator
false
2015-05-17 11:04:59
Neo4j: Refactoring the BBC football live text fouls graph
[ "neo4j" ]
[ "neo4j" ]
Yesterday I wrote about http://www.markhneedham.com/blog/2015/05/16/neo4j-bbc-football-live-text-fouls-graph/[a Neo4j graph I've started building] which contains all the fouls committed in the Champions League game between Barcelona & Bayern Munich and surrounding meta data. While adding other events into the graph I realised that I'd added some duplication in the model and the model could do with some refactoring to make it easier to use. To recap, this is the model that we designed in the previous blog post: image::{{<siteurl>}}/uploads/2015/05/2015-05-16_22-50-32.png[,465] The duplication is on the left hand side of the model - we model a foul as being committed by one player against another and then hook the foul back into the match. By doing that we're not using the 'appearance' concept which links a player and a match together. We can make the 'COMMITTED_IN_MATCH' relationship redundant by connecting the foul to appearance rather than to player. The match the foul was committed in can then be found by navigating through the appearance node. This is what we want the graph to look like: image::{{<siteurl>}}/uploads/2015/05/2015-05-17_10-40-44.png[2015 05 17 10 40 44,465] We'll move towards this new model in 3 steps: * Introduce the new structure alongside the existing one * Rewrite our queries to use the new structure * Remove the old structure == Introducing the new structure First up let's write a query to introduce the new structure. [source,cypher] ---- match (foul:Foul)-[:COMMITTED_AGAINST]->(fouledPlayer), (foul)<-[:COMMITTED_FOUL]-(foulingPlayer), (foul)-[:COMMITTED_IN_MATCH]->(match:Match {id: "32683310"}), (foulingPlayer)-[:MADE_APPEARANCE]-(foulingPlayerApp)-[:IN_MATCH]->(match), (fouledPlayer)-[:MADE_APPEARANCE]-(fouledPlayerApp)-[:IN_MATCH]->(match) MERGE (foul)<-[:COMMITTED_FOUL]-(foulingPlayerApp) MERGE (foul)-[:COMMITTED_AGAINST]->(fouledPlayerApp) ---- Remember we're not going to delete the old structure yet so that's why there aren't any delete statements in here. == Rewriting our queries Now we need to update our queries to work against the new graph structure: == Where do the fouls happen? [source,cypher] ---- match (match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul) RETURN foul.location AS location, COUNT(*) as fouls ORDER BY fouls DESC ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-()<-[]-(foul:Foul) RETURN foul.location AS location, COUNT(*) as fouls ORDER BY fouls DESC ---- == Who fouls the most? [source,cypher] ---- match (match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul:Foul)<-[:COMMITTED_FOUL]-(fouler:Player) RETURN fouler.name AS fouler, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10; ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-(appearance)-[:COMMITTED_FOUL]->(foul:Foul), (appearance)<-[:MADE_APPEARANCE]-(fouler) RETURN fouler.name AS fouler, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10 ---- == Who was fouled the most? [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-(appearance)-[r:COMMITTED_FOUL]->(foul:Foul), (appearance)<-[:MADE_APPEARANCE]-(fouler) RETURN fouler.name AS fouler, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10 ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-(appearance)<-[:COMMITTED_AGAINST]->(foul:Foul), (appearance)<-[:MADE_APPEARANCE]-(fouled) RETURN fouled.name AS fouled, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10 ---- == Who fouled who the most? [source,cypher] ---- match (match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul:Foul)-[:COMMITTED_AGAINST]->(fouled:Player), (foul)<-[:COMMITTED_FOUL]-(fouler:Player) RETURN fouler.name AS fouler, fouled.name AS fouled, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10 ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"}), (match)<-[:IN_MATCH]-(fouledApp)<-[:COMMITTED_AGAINST]->(foul:Foul)<-[:COMMITTED_FOUL]-(foulerApp)-[:IN_MATCH]->(match), (fouledApp)<-[:MADE_APPEARANCE]-(fouled), (foulerApp)<-[:MADE_APPEARANCE]-(fouler) RETURN fouler.name AS fouler, fouled.name AS fouled, COUNT(*) as fouls ORDER BY fouls DESC LIMIT 10; ---- == Which team fouled most? [source,cypher] ---- match (match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-()<-[:COMMITTED_FOUL]-(fouler), (fouler)-[:MADE_APPEARANCE]-(app)-[:IN_MATCH]-(match), (app)-[:FOR_TEAM]->(team) RETURN team.name, COUNT(*) as fouls ORDER BY fouls DESC ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-(app:Appearance)-[:COMMITTED_FOUL]->(), (app)-[:FOR_TEAM]->(team) RETURN team.name, COUNT(*) as fouls ORDER BY fouls DESC ---- == Worst fouler for each team [source,cypher] ---- match (match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul)<-[:COMMITTED_FOUL]-(fouler), (fouler)-[:MADE_APPEARANCE]-(app)-[:IN_MATCH]-(match), (app)-[:FOR_TEAM]->(team) WITH team, fouler, COUNT(*) AS fouls ORDER BY team.name, fouls DESC WITH team, COLLECT({fouler:fouler, fouls:fouls})[0] AS topFouler RETURN team.name, topFouler.fouler.name, topFouler.fouls; ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-(app:Appearance)-[:COMMITTED_FOUL]->(), (app)-[:FOR_TEAM]->(team), (fouler)-[:MADE_APPEARANCE]->(app) WITH team, fouler, COUNT(*) AS fouls ORDER BY team.name, fouls DESC WITH team, COLLECT({fouler:fouler, fouls:fouls})[0] AS topFouler RETURN team.name, topFouler.fouler.name, topFouler.fouls; ---- == Most fouled against for each team [source,cypher] ---- match (match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul)<-[:COMMITTED_FOUL]-(fouler), (fouler)-[:MADE_APPEARANCE]-(app)-[:IN_MATCH]-(match), (app)-[:FOR_TEAM]->(team) WITH team, fouler, COUNT(*) AS fouls ORDER BY team.name, fouls DESC WITH team, COLLECT({fouler:fouler, fouls:fouls})[0] AS topFouler RETURN team.name, topFouler.fouler.name, topFouler.fouls ---- becomes [source,cypher] ---- match (match:Match {id: "32683310"})<-[:IN_MATCH]-(app:Appearance)<-[:COMMITTED_AGAINST]->(), (app)-[:FOR_TEAM]->(team), (fouled)-[:MADE_APPEARANCE]->(app) WITH team, fouled, COUNT(*) AS fouls ORDER BY team.name, fouls DESC WITH team, COLLECT({fouled:fouled, fouls:fouls})[0] AS topFouled RETURN team.name, topFouled.fouled.name, topFouled.fouls ---- The early queries are made more complicated by the refactoring but the latter ones are slightly simpler. I think we need to hook some more events onto the appearance node to see whether this refactoring is worthwhile or not. == Removing the old structure Holding judgement for now, let's look at how we'd remove the old structure - the final step in this refactoring: [source,cypher] ---- match (match:Match {id: "32683310"})<-[oldRel:COMMITTED_IN_MATCH]-(foul:Foul) DELETE oldRel ---- [source,cypher] ---- match (player:Player)<-[oldRel:COMMITTED_AGAINST]-(foul:Foul) DELETE oldRel ---- [source,cypher] ---- match (player:Player)-[oldRel:COMMITTED_FOUL]->(foul:Foul) DELETE oldRel ---- Hopefully you can see how you'd go about refactoring your own graph if you realise the model isn't quite what you want. Any questions/thoughts/suggestions let me know!
null
null
[ 0.015856008976697922, -0.019825130701065063, 0.00910553615540266, 0.009016974829137325, 0.0766444131731987, -0.02033195085823536, 0.040847767144441605, 0.02288690023124218, 0.021238228306174278, -0.013537576422095299, 0.015825532376766205, 0.0048774778842926025, -0.07709377259016037, 0.016338834539055824, -0.0028850978706032038, 0.06651721894741058, 0.04508323594927788, 0.020536303520202637, 0.02552526630461216, -0.03259580582380295, 0.03145799785852432, 0.08530092984437943, 0.012912471778690815, 0.04903445765376091, 0.043195102363824844, 0.012261803261935711, 0.008918162435293198, 0.015555535443127155, -0.049967650324106216, 0.0052676391787827015, 0.07179666310548782, -0.0036993566900491714, 0.014993160963058472, -0.023324593901634216, 0.025250494480133057, -0.02122219279408455, -0.046015143394470215, 0.020650431513786316, -0.024044767022132874, -0.015434729866683483, -0.08332549035549164, 0.04319003224372864, -0.029305901378393173, 0.01372423768043518, -0.05229281261563301, 0.004723076242953539, -0.03650517761707306, 0.036772895604372025, 0.01157995406538248, 0.005374094936996698, -0.09127650409936905, 0.01246003806591034, -0.011629161424934864, 0.01996455527842045, -0.01948435977101326, 0.04451816529035568, 0.011425026692450047, -0.0628705769777298, 0.028815025463700294, -0.024020260199904442, -0.01426806952804327, -0.012476288713514805, 0.001974798971787095, 0.006384311243891716, -0.008732127025723457, -0.035165078938007355, -0.005306465085595846, 0.044567953795194626, -0.03291821852326393, -0.002348313108086586, 0.003170123789459467, 0.003897474380210042, -0.01152384839951992, -0.002759678056463599, -0.003856443800032139, -0.05314319580793381, 0.0024601295590400696, 0.06105192378163338, 0.03154853731393814, 0.05923736095428467, -0.004761308431625366, 0.01975877583026886, 0.0064508868381381035, 0.02128617651760578, -0.00342163466848433, -0.034150298684835434, -0.015362860634922981, -0.03386946767568588, -0.05231137201189995, 0.06211546063423157, -0.0012990412069484591, -0.0606076680123806, 0.009516081772744656, 0.015393939800560474, -0.0199201051145792, 0.009389867074787617, 0.019255777820944786, 0.02830943465232849, 0.017791355028748512, -0.036941047757864, -0.027844909578561783, -0.047224223613739014, -0.006630474701523781, 0.004717182368040085, -0.07994900643825531, -0.039590176194906235, -0.027694188058376312, -0.01719067245721817, 0.017646439373493195, 0.00008065639121923596, -0.021189400926232338, 0.002624774118885398, 0.0031701247207820415, 0.010063298046588898, -0.08522480726242065, 0.07446335256099701, 0.024157682433724403, -0.008370804600417614, -0.033195700496435165, 0.02560361847281456, 0.022683128714561462, 0.007107077166438103, 0.008001036942005157, 0.09425769746303558, 0.00690432358533144, 0.030938832089304924, 0.008565899915993214, 0.05594418942928314, -0.047008026391267776, -0.07533042877912521, 0.0016207642620429397, 0.07161424309015274, -0.04069449007511139, 0.015609477646648884, 0.002390331355854869, -0.05283299461007118, -0.004733637440949678, 0.0009989982936531305, 0.050194770097732544, 0.04211939126253128, 0.011065474711358547, -0.04534243792295456, 0.03235776349902153, 0.021125275641679764, 0.03716807812452316, -0.013820107094943523, -0.026367757469415665, -0.013608358800411224, 0.0066901277750730515, 0.011168880388140678, 0.026898454874753952, 0.019372478127479553, 0.04296570271253586, -0.03074406459927559, 0.0218416266143322, 0.10938141494989395, 0.036538414657115936, -0.001064920797944069, -0.052229300141334534, 0.026077577844262123, 0.047413088381290436, 0.018483297899365425, 0.00027575704734772444, 0.03724772855639458, 0.004362619481980801, -0.024849088862538338, 0.0000708616353222169, 0.054916463792324066, 0.0030942473094910383, 0.013772725127637386, -0.03184739127755165, -0.05152685195207596, 0.06906592845916748, -0.03487126901745796, -0.012545399367809296, 0.07448311150074005, 0.0687188059091568, 0.030270755290985107, 0.034674640744924545, 0.013103673234581947, -0.0760236606001854, 0.03687051311135292, 0.018716255202889442, 0.02347787842154503, 0.012131885625422001, 0.00029530786559917033, 0.08804560452699661, 0.029933452606201172, -0.0003222540835849941, 0.04138067364692688, -0.08948316425085068, -0.05888202413916588, -0.020884448662400246, -0.01767154596745968, 0.06425968557596207, -0.026287881657481194, 0.02139999531209469, 0.05370856076478958, 0.003415331244468689, 0.043763063848018646, 0.02364150807261467, 0.015156646259129047, 0.016429871320724487, -0.040019307285547256, -0.04669800028204918, 0.04068808630108833, 0.009815310128033161, -0.04773912578821182, -0.06763530522584915, 0.03944747895002365, -0.03478346765041351, -0.005844679195433855, 0.03451857715845108, -0.03639250248670578, 0.013327930122613907, 0.0018624757649376988, 0.04569345712661743, -0.00369176990352571, 0.022561758756637573, -0.06708434969186783, 0.025190163403749466, 0.024924062192440033, -0.02007042057812214, 0.007337778806686401, 0.004497162066400051, 0.10917089134454727, 0.031361036002635956, -0.023282242938876152, -0.04674023762345314, 0.009554433636367321, 0.010020863264799118, -0.002855396131053567, 0.0007217208039946854, -0.014413079246878624, -0.002785566495731473, -0.023877110332250595, -0.04312286525964737, -0.016149403527379036, 0.006992159876972437, -0.04149584472179413, 0.02232559211552143, 0.055783309042453766, -0.012113755568861961, 0.03810321167111397, -0.015805039554834366, 0.012092538177967072, -0.005300890654325485, -0.024872245267033577, -0.054121699184179306, 0.03142690286040306, 0.0187725517898798, -0.016389448195695877, 0.045459356158971786, -0.03216199576854706, -0.01068929024040699, -0.029882941395044327, -0.03306004777550697, 0.02235410548746586, 0.03278586268424988, 0.0593225359916687, 0.01195497252047062, 0.030378177762031555, -0.029970893636345863, -0.010933282785117626, -0.03383604809641838, -0.04595579952001572, -0.04903334006667137, -0.05601819232106209, 0.015544247813522816, 0.0032195651438087225, 0.017649821937084198, -0.009285788051784039, 0.009084180928766727, 0.020939510315656662, 0.005791237577795982, 0.015257217921316624, 0.03129274398088455, -0.007554147392511368, -0.004954300820827484, -0.01919812336564064, -0.050215549767017365, 0.044929154217243195, -0.03206414729356766, -0.029363051056861877, -0.0030815929640084505, -0.06538181751966476, 0.034327469766139984, -0.06242576986551285, -0.00006734648195561022, 0.00972756464034319, -0.0071765645407140255, 0.04460276663303375, 0.013803289271891117, -0.004739959258586168, 0.04640726000070572, 0.011941718868911266, 0.011596815660595894, 0.014054711908102036, 0.0033662645146250725, 0.03974413871765137, -0.0016059993067756295, 0.05163338780403137, 0.0398060567677021, -0.03151286393404007, 0.02365969680249691, -0.02466973476111889, 0.0033413793426007032, -0.001921034068800509, -0.28072619438171387, 0.029470356181263924, 0.012876756489276886, -0.029721684753894806, 0.02072933129966259, -0.02109598182141781, 0.007891455665230751, -0.0192512646317482, -0.032473061233758926, 0.004727494902908802, -0.022374577820301056, -0.029551180079579353, -0.02383662760257721, 0.017693765461444855, 0.03640950471162796, 0.018274841830134392, -0.014383884146809578, -0.05075768381357193, -0.016215980052947998, 0.05702117830514908, 0.0001265935570700094, -0.043882761150598526, -0.031669553369283676, 0.002867680275812745, 0.005509174894541502, 0.04015585035085678, -0.08969608694314957, 0.004071931820362806, -0.07644177973270416, -0.026264488697052002, 0.004757172893732786, -0.02496221661567688, -0.0010824680794030428, -0.004467041697353125, -0.036330293864011765, -0.010441706515848637, 0.048710405826568604, 0.0038590445183217525, -0.021953150629997253, 0.006712937727570534, -0.028699930757284164, -0.029810408130288124, -0.019014308229088783, -0.004707683809101582, 0.09914104640483856, 0.03324558585882187, -0.07457509636878967, -0.003699332242831588, -0.03053898736834526, 0.06988667696714401, -0.028405675664544106, -0.0332401767373085, 0.005132570862770081, 0.02794412523508072, -0.015897927805781364, -0.02704431861639023, 0.006860542111098766, -0.038769155740737915, -0.04249683395028114, -0.03895959630608559, -0.012650109827518463, -0.06112086400389671, 0.002890783129259944, -0.018056590110063553, 0.0024627158418297768, -0.05051543191075325, -0.055894382297992706, -0.023577222600579262, 0.055084504187107086, 0.02867797203361988, -0.03457041457295418, 0.03909539431333542, 0.01795586757361889, -0.09189028292894363, -0.03809940069913864, -0.01674116775393486, -0.0012409677729010582, 0.005178619641810656, 0.010659372434020042, 0.030683765187859535, -0.030291656032204628, -0.05196116119623184, 0.007339707110077143, 0.014443798922002316, 0.030688460916280746, 0.016618378460407257, 0.04281384497880936, 0.003914102911949158, -0.04460437595844269, 0.0008544996380805969, 0.07325530797243118, -0.015455645509064198, -0.015261958353221416, 0.020983045920729637, -0.005636804737150669, 0.025861280038952827, -0.010419473052024841, -0.007660249248147011, 0.00885494239628315, 0.04922235757112503, 0.03168138489127159, -0.0459822341799736, 0.02240561507642269, -0.010983463376760483, -0.02222091518342495, 0.0056546772830188274, -0.05422888323664665, 0.0059909881092607975, 0.0210051741451025, 0.017789648845791817, 0.01575634814798832, -0.015516374260187149, 0.0071641323156654835, -0.026683181524276733, -0.033355459570884705, -0.018295010551810265, 0.032274503260850906, 0.019444432109594345, 0.01843240298330784, -0.02370714396238327, -0.06139214709401131, 0.03393739089369774, 0.005301790777593851, 0.015770144760608673, -0.07956841588020325, -0.040072616189718246, -0.011979867704212666, -0.017866939306259155, -0.00454304413869977, 0.006813672836869955, -0.022013070061802864, 0.01728249527513981, 0.022213727235794067, -0.0318358950316906, 0.03948688879609108, 0.01184874027967453, -0.05326259508728981, -0.032122548669576645, 0.022893497720360756, 0.006161438766866922, 0.011378481984138489, 0.026503246277570724, -0.0001455211895518005, 0.03620622679591179, 0.04338683560490608, -0.011674740351736546, 0.02829696424305439, -0.0019060070626437664, 0.02894032746553421, 0.03978089988231659, 0.003997663501650095, -0.0339389331638813, 0.0011603435268625617, -0.05216415971517563, -0.0030304081737995148, 0.017616283148527145, 0.04043798893690109, -0.011973301880061626, -0.014476718381047249, -0.020845217630267143, 0.019399838522076607, -0.043273523449897766, -0.01242984551936388, -0.007858460769057274, 0.02191067487001419, 0.07118303328752518, -0.019252611324191093, -0.0029397420585155487, -0.004050097428262234, -0.027786441147327423, 0.0021468359045684338, -0.009522604756057262, -0.07656164467334747, -0.017376234754920006, -0.0013750535435974598, 0.009446714073419571, -0.012189371511340141, 0.0253573227673769, 0.010771088302135468, 0.01983810029923916, -0.021422067657113075, -0.026778029277920723, 0.01974482089281082, 0.031025366857647896, 0.04869438335299492, 0.04856521636247635, -0.0019475998124107718, 0.0023535643704235554, -0.00972774624824524, 0.003576640272513032, -0.010227932594716549, 0.03128429874777794, -0.029683949425816536, -0.007453908212482929, -0.029801487922668457, -0.07065291702747345, 0.03569744527339935, -0.004247487057000399, 0.023880064487457275, 0.022169718518853188, 0.021440494805574417, 0.002693688031286001, -0.02217516303062439, 0.04570697993040085, 0.04906128719449043, -0.056454721838235855, -0.01972704753279686, -0.007475752383470535, -0.01237463764846325, -0.017250588163733482, 0.006378634367138147, -0.05682064965367317, -0.052514784038066864, -0.023074902594089508, 0.03278864175081253, -0.038988299667835236, -0.020369768142700195, -0.01929510571062565, -0.017967913299798965, 0.009229572489857674, 0.041504256427288055, -0.013823716901242733, 0.018471119925379753, -0.003052270971238613, -0.021158916875720024, 0.03898293152451515, -0.021236654371023178, 0.005851771682500839, 0.018247466534376144, -0.02123182825744152, 0.03407617658376694, -0.010491767898201942, 0.029033849015831947, 0.02580142579972744, -0.005430586636066437, 0.0018578642047941685, -0.06112412363290787, 0.02251495234668255, -0.0016915262676775455, 0.040137942880392075, -0.0006390922935679555, -0.005217278841882944, -0.04694879427552223, 0.00019116901967208833, -0.03653016313910484, 0.012349773198366165, -0.012474401853978634, 0.008874250575900078, 0.011611603200435638, 0.0364844836294651, 0.011455990374088287, 0.045081429183483124, -0.009626069106161594, -0.033639680594205856, 0.0542735755443573, -0.06960000842809677, -0.011308069340884686, -0.026654016226530075, -0.04664415866136551, 0.009618272073566914, -0.00656516756862402, 0.01503419503569603, -0.05543941259384155, 0.03637303411960602, 0.045518845319747925, 0.009398819878697395, 0.05158928409218788, 0.003089895471930504, 0.020197870209813118, -0.019049054011702538, -0.006721979938447475, -0.08776714652776718, 0.022023921832442284, 0.055720433592796326, 0.0030311597511172295, 0.011188210919499397, -0.00960251409560442, -0.023579854518175125, 0.014007385820150375, -0.06065833196043968, -0.031808990985155106, 0.01879843696951866, -0.02582627721130848, 0.025613976642489433, 0.03299505636096001, -0.05936414748430252, -0.01047955360263586, 0.037266410887241364, -0.03745413199067116, -0.04281507059931755, -0.04524252936244011, 0.05521189793944359, -0.037025537341833115, 0.028317712247371674, -0.004485578276216984, -0.028788233175873756, 0.060356803238391876, 0.02420070953667164, 0.04436253756284714, 0.03788544610142708, 0.0017579415580257773, 0.031164363026618958, 0.02472812868654728, 0.013674848712980747, 0.025199977681040764, 0.03785878047347069, -0.022518819198012352, -0.05826061964035034, 0.02681017480790615, 0.01188875176012516, -0.031622324138879776, -0.04391879960894585, 0.07159209996461868, -0.0028148875571787357, -0.04233185574412346, -0.033607110381126404, 0.010213679634034634, -0.03341932222247124, -0.025587379932403564, -0.03395606204867363, 0.018968550488352776, -0.029185885563492775, 0.07278449088335037, -0.012864997610449791, -0.0005770315183326602, 0.07124838978052139, -0.00541604682803154, -0.0027450614143162966, -0.012792079709470272, 0.1031174585223198, 0.09638787060976028, 0.051936592906713486, -0.010915115475654602, 0.07264583557844162, 0.021834304556250572, -0.03565610572695732, 0.015935329720377922, -0.007210147101432085, -0.020644521340727806, 0.020332032814621925, 0.019312333315610886, 0.05971836671233177, -0.049746181815862656, 0.07329422980546951, -0.01841316930949688, -0.03718223795294762, 0.00693156011402607, -0.022572362795472145, 0.030400099232792854, 0.072517991065979, 0.015041965991258621, 0.04508752375841141, -0.02067655697464943, -0.04372647404670715, 0.01265828125178814, -0.013222452253103256, 0.0021644332446157932, 0.025496728718280792, -0.04007205367088318, 0.021878741681575775, -0.01453404314815998, 0.01549875270575285, 0.09045331180095673, -0.04317126423120499, -0.0023823713418096304, -0.007584738079458475, 0.0026213894598186016, 0.006376893259584904, 0.01226448267698288, -0.024845857173204422, -0.006228254176676273, -0.016335852444171906, -0.054911933839321136, -0.024290088564157486, -0.02989962138235569, -0.038173094391822815, 0.006804359145462513, 0.00030833177152089775, -0.010223236866295338, -0.0004558049840852618, -0.0015065879561007023, -0.02799469418823719, -0.05068915709853172, -0.049409110099077225, -0.08475174009799957, -0.07424480468034744, -0.01966274343430996, 0.015229941345751286, 0.004487282130867243, -0.04163411632180214, -0.024245431646704674, -0.03358062729239464, -0.0207078754901886, 0.057995982468128204, -0.04483095556497574, 0.025511063635349274, 0.014248722232878208, 0.03998430818319321, 0.009249483235180378, 0.019740622490644455, 0.045345231890678406, 0.011192487552762032, -0.0018980829045176506, -0.020664118230342865, 0.016592899337410927, 0.030154291540384293, 0.020175769925117493, -0.014393295161426067, -0.0970316156744957, -0.0013682603603228927, 0.02590421959757805, -0.06376277655363083, -0.08278735727071762, 0.013543756678700447, 0.03130572661757469, 0.02622584067285061, 0.03655428811907768, -0.038927122950553894, -0.02546561323106289, -0.02961515076458454, 0.029346032068133354, -0.004389464855194092, 0.013805250637233257, 0.031476330012083054, -0.02072931081056595, 0.08479831367731094, 0.03397580608725548, -0.0346248559653759, -0.023251641541719437, -0.01662767492234707, -0.009987580589950085, -0.0007026809034869075, -0.05809841677546501, -0.0241545420140028, -0.03374256566166878, -0.10351914912462234, -0.019282149150967598, 0.02032141387462616, -0.0181269571185112, -0.03519276902079582, 0.011499539017677307, 0.01972508616745472, -0.00753693887963891, 0.011703554540872574, -0.05108864605426788, 0.036696214228868484, -0.03171321749687195, 0.002233333420008421, -0.03246765583753586, 0.017229396849870682, 0.026007255539298058, 0.027123285457491875, -0.00684823002666235, -0.066900335252285, 0.0134026063606143, -0.024473372846841812, -0.00743110291659832, 0.009092775173485279, 0.02309170924127102, 0.004673557821661234 ]
[ -0.06350157409906387, -0.019203849136829376, -0.02402173914015293, -0.025439511984586716, 0.07583138346672058, -0.0014584080781787634, 0.004025186412036419, 0.017481235787272453, 0.06135837733745575, -0.0028671827167272568, 0.019310034811496735, -0.0890842154622078, -0.0165205467492342, 0.01078379712998867, 0.053035035729408264, -0.01755228266119957, -0.043190695345401764, -0.07051058113574982, -0.009879927150905132, 0.02526967227458954, -0.0211747195571661, -0.011083029210567474, -0.017183469608426094, -0.028180919587612152, 0.01374297309666872, 0.011378603056073189, 0.04042388126254082, -0.018583174794912338, -0.03275052458047867, -0.2309669703245163, 0.010776531882584095, 0.012682601809501648, 0.010173099115490913, -0.00709862494841218, -0.014443090185523033, 0.0019674492068588734, 0.013737136498093605, 0.010823950171470642, 0.03220624849200249, 0.038461100310087204, -0.016459261998534203, 0.009759480133652687, -0.05244027450680733, -0.047852519899606705, 0.054840121418237686, 0.017655998468399048, -0.00299045885913074, 0.012444581836462021, 0.027930840849876404, 0.022904980927705765, -0.024041905999183655, -0.018899882212281227, -0.010547573678195477, -0.009265975095331669, 0.007325627375394106, 0.06494562327861786, 0.04950181767344475, 0.05741792544722557, 0.02957470342516899, 0.056203197687864304, 0.05501248687505722, 0.02547541819512844, -0.12910817563533783, 0.06493977457284927, 0.010566864162683487, 0.019792109727859497, -0.03478315845131874, -0.0016962157096713781, 0.023142483085393906, 0.09500739723443985, 0.002364640822634101, -0.03236618638038635, -0.004917047452181578, 0.03677116334438324, 0.017130309715867043, 0.005480432882905006, -0.013859947212040424, 0.015522394329309464, -0.0029484613332897425, -0.016290556639432907, -0.054041605442762375, 0.013131653890013695, -0.027528319507837296, -0.02914619632065296, -0.05948391184210777, 0.016551146283745766, -0.05634143203496933, 0.034534748643636703, -0.0027528395876288414, 0.03159022331237793, 0.03872358426451683, 0.03431295230984688, 0.02974821999669075, 0.02339889481663704, -0.11471119523048401, -0.023870060220360756, -0.017587659880518913, 0.0026784217916429043, -0.022761279717087746, 0.4473957419395447, 0.010939694941043854, -0.022254839539527893, 0.0473199225962162, 0.06176875904202461, 0.018473276868462563, -0.025766050443053246, 0.02330448105931282, -0.06590797752141953, 0.005843410734087229, -0.0023708792869001627, -0.018858149647712708, -0.004014201927930117, 0.038249384611845016, -0.043653931468725204, 0.006530700251460075, 0.03901156410574913, 0.027187643572688103, 0.03227349743247032, -0.014663871377706528, 0.006280168425291777, -0.01687011495232582, 0.003992255311459303, -0.009942717850208282, 0.007755318656563759, 0.002156064147129655, 0.03083493746817112, -0.0018785462016239762, 0.06169829145073891, 0.04198607802391052, 0.010352530516684055, 0.0429270938038826, -0.013461502268910408, -0.07100800424814224, 0.01843676157295704, 0.001928043900988996, -0.008441779762506485, 0.02315131574869156, -0.03818852826952934, 0.001642717281356454, 0.02970288135111332, -0.001622188719920814, -0.0571712963283062, 0.04617181047797203, -0.015715770423412323, -0.03506159409880638, 0.12146390974521637, -0.014191336929798126, -0.04288128390908241, 0.006985839456319809, -0.034001756459474564, -0.0009281094535253942, 0.03433586284518242, 0.006566422991454601, -0.05970388650894165, -0.03731215372681618, 0.00839985627681017, 0.06267368048429489, -0.04379620403051376, -0.07950226217508316, -0.005346260033547878, -0.027576874941587448, -0.03293023258447647, -0.04376913234591484, 0.05765705928206444, 0.028193263337016106, -0.10970554500818253, -0.018099742010235786, -0.022181158885359764, 0.00011402555537642911, -0.06339433789253235, -0.002965771360322833, -0.007940094918012619, -0.04120044782757759, 0.00265195919200778, 0.036609675735235214, 0.03139232099056244, -0.03326971456408501, -0.045733969658613205, 0.07033991068601608, -0.006178159732371569, 0.004961785860359669, -0.023166198283433914, -0.08525069057941437, -0.0019165568519383669, -0.07447628676891327, -0.053635887801647186, -0.06502692401409149, 0.005285333842039108, -0.0050796810537576675, 0.00016997168131638318, -0.049591727554798126, 0.002724660560488701, -0.05483347177505493, 0.0672382116317749, -0.04012598469853401, -0.005633752793073654, -0.015055196359753609, -0.026696057990193367, -0.03383393958210945, -0.026875751093029976, -0.026788899675011635, 0.04303579032421112, -0.009196678176522255, -0.0026236793491989374, -0.0496835857629776, 0.047264471650123596, 0.05095088109374046, -0.02786598727107048, 0.07452229410409927, 0.009380658157169819, -0.05643939599394798, -0.018592646345496178, -0.05317671224474907, -0.002727758139371872, -0.0024097252171486616, 0.017997408285737038, -0.005679506342858076, -0.0007715616375207901, 0.023787079378962517, 0.033974550664424896, -0.02788141556084156, 0.030153140425682068, 0.006576918996870518, -0.3239855468273163, -0.030500225722789764, -0.028125543147325516, -0.019905373454093933, 0.04530297592282295, -0.020070862025022507, 0.008319462649524212, -0.02403027005493641, 0.03635430708527565, 0.014631223864853382, 0.06544916331768036, 0.0015519199660047889, -0.021848924458026886, -0.07060612738132477, -0.012762718833982944, 0.026756959035992622, -0.027021074667572975, 0.002805865602567792, -0.0357949435710907, 0.034705426543951035, 0.037902407348155975, -0.008808428421616554, -0.016871972009539604, -0.023379400372505188, 0.009392759762704372, -0.06278520822525024, 0.13995304703712463, 0.04101112484931946, 0.024609386920928955, -0.028964316472411156, 0.021303601562976837, -0.0020573907531797886, -0.021564895287156105, -0.07290668040513992, 0.030893275514245033, -0.0002748238912317902, 0.010500517673790455, -0.009564726613461971, 0.012454233132302761, -0.06351461261510849, -0.01900383271276951, -0.009743707254529, -0.032514505088329315, -0.06061994656920433, -0.03595926985144615, 0.05352833494544029, -0.030886860564351082, -0.01988212577998638, -0.031843289732933044, 0.08563822507858276, 0.03245967626571655, 0.018219618126749992, 0.05653436481952667, -0.005195171572268009, 0.0341985858976841, -0.039190057665109634, -0.08244851231575012, 0.007196104619652033, -0.0009616502793505788, 0.025908349081873894, 0.02361057698726654, 0.029602689668536186, 0.04988035559654236, -0.10701566934585571, 0.015603490173816681, 0.012860321439802647, -0.004757655784487724, -0.026393424719572067, 0.024246497079730034, -0.015457971021533012, -0.012643607333302498, 0.06955648213624954, 0.041220854967832565, 0.015712665393948555, 0.048757754266262054, 0.059276871383190155, -0.005588156636804342, 0.00848666112869978, 0.00860659871250391, 0.026229646056890488, 0.04804564267396927, -0.06034856662154198, 0.05212989076972008, -0.02416234090924263, 0.009499527513980865, 0.03872368112206459, 0.03044883720576763, -0.04200682416558266, 0.06918536871671677, 0.011069569736719131, -0.020252268761396408, 0.0037326968740671873, -0.03981519490480423, -0.015568690374493599, 0.034525316208601, -0.05842161178588867, -0.25841376185417175, 0.016517480835318565, 0.07538672536611557, 0.0731927677989006, 0.012883028946816921, 0.01106956135481596, 0.021438753232359886, -0.01728326827287674, -0.022191086784005165, -0.0009497251594439149, 0.009474569000303745, 0.014553039334714413, -0.006677985657006502, 0.01601928286254406, -0.030543867498636246, -0.01906157284975052, 0.029362833127379417, -0.007372879423201084, 0.03788980841636658, 0.01290253084152937, 0.03523215651512146, -0.01800362579524517, 0.1757819801568985, -0.0003524118510540575, 0.05751991271972656, 0.06547769159078598, -0.021874872967600822, -0.03268777206540108, 0.02795245684683323, -0.0021773416083306074, -0.007239101454615593, 0.015822045505046844, 0.015539266169071198, 0.07603093981742859, 0.003854822600260377, -0.03952489793300629, -0.019537126645445824, 0.06347405910491943, -0.007840970531105995, -0.04222216084599495, 0.00319654680788517, 0.04186074063181877, -0.03443167731165886, 0.028419997543096542, 0.060105908662080765, 0.040822748094797134, 0.006827834062278271, 0.01130301970988512, -0.06500355899333954, -0.0058141001500189304, -0.040295910090208054, -0.044629793614149094, -0.015417138114571571, -0.022847965359687805, 0.011921350844204426, 0.05406811833381653, 0.03638530895113945, -0.01933727040886879, 0.036478880792856216, 0.011928198859095573, -0.006753540597856045, 0.0011116431560367346, 0.07067287713289261, -0.0186456311494112, 0.008559121750295162 ]
[ 0.05464961752295494, 0.01870754174888134, 0.04618147015571594, 0.004866191651672125, 0.030132845044136047, 0.03399275988340378, 0.009959421120584011, 0.016322338953614235, 0.02808159962296486, -0.012390164658427238, 0.010184142738580704, -0.00775393471121788, -0.00026157309184782207, 0.03427768871188164, 0.021877268329262733, -0.015951141715049744, -0.00042431976180523634, -0.015528061427175999, 0.02343571186065674, -0.0014005410484969616, -0.011036090552806854, 0.006178251933306456, -0.0021057187113910913, -0.03251661732792854, -0.027886154130101204, 0.028857549652457237, -0.020755987614393234, 0.01611238904297352, 0.024725627154111862, -0.16242091357707977, -0.042093582451343536, -0.04333106800913811, 0.006880582310259342, 0.02465580217540264, -0.04290194436907768, -0.04100857302546501, 0.011506812646985054, 0.0302128866314888, 0.0002029202732956037, 0.019241422414779663, 0.0032930253073573112, -0.018563056364655495, 0.016587939113378525, 0.01152479276061058, -0.0016576163470745087, -0.0013389410451054573, -0.02642950601875782, -0.003823303384706378, 0.03472954034805298, -0.03070809878408909, -0.052474942058324814, -0.047388751059770584, 0.03485987335443497, 0.009085869416594505, 0.07655448466539383, -0.017793217673897743, -0.012201767414808273, -0.02599150687456131, -0.004034908954054117, -0.03892924264073372, 0.023569319397211075, 0.022335009649395943, -0.030544180423021317, -0.016524460166692734, 0.011964129284024239, -0.018098756670951843, 0.0012175049632787704, 0.004471885040402412, 0.026436062529683113, 0.02202536165714264, -0.023389669135212898, 0.013553846627473831, -0.04321996867656708, -0.022312873974442482, -0.007869647815823555, 0.03450475260615349, -0.013504202477633953, 0.00639703031629324, -0.01773596741259098, -0.032629694789648056, 0.0020710784010589123, -0.021641841158270836, -0.002046289388090372, -0.003671014215797186, -0.023457836359739304, -0.03596296161413193, -0.01263444870710373, -0.02874983660876751, 0.03000335581600666, -0.011349602602422237, -0.03406917676329613, 0.022142667323350906, 0.0035584340803325176, -0.011204160749912262, -0.09553283452987671, 0.0026745093055069447, -0.010821624659001827, -0.03314240649342537, 0.013278979808092117, 0.7991759777069092, 0.027488738298416138, 0.005335014313459396, -0.021726954728364944, 0.019897766411304474, 0.03617405146360397, 0.023326832801103592, 0.008275900036096573, 0.0024241593200713396, -0.014243120327591896, -0.011327057145535946, 0.0020518507808446884, 0.060987189412117004, -0.0019415890565142035, 0.030732862651348114, 0.02076607383787632, 0.05261467024683952, 0.017650185152888298, -0.018437260761857033, -0.01309466827660799, 0.034300290048122406, -0.0031487809028476477, -0.0030597420409321785, -0.01658008061349392, 0.0033248893450945616, -0.0024840249679982662, -0.14343570172786713, -0.006602005567401648, -7.633077709852309e-33, 0.06604980677366257, 0.020130041986703873, -0.0017652763053774834, -0.005943082273006439, -0.025705326348543167, 0.011640257202088833, 0.0003178902843501419, -0.003783467225730419, -0.01947731338441372, -0.042748529464006424, -0.031688570976257324, -0.0468965582549572, -0.014651314355432987, -0.012096161022782326, -0.0070867897011339664, -0.009054286405444145, 0.0008037667721509933, 0.03695053234696388, -0.014692278578877449, 0.011618588119745255, -0.008983112871646881, 0.030843442305922508, -0.014439770951867104, 0.006863325368613005, 0.011929686181247234, 0.05365779623389244, -0.032615792006254196, -0.0054295058362185955, 0.0025466429069638252, -0.0538891963660717, -0.017876818776130676, 0.018899010494351387, -0.023928973823785782, 0.017488490790128708, 0.0014326435048133135, -0.02767823077738285, -0.02750817872583866, -0.005046658683568239, -0.02426503784954548, -0.05993654206395149, -0.0348343551158905, 0.008496742695569992, -0.05244293063879013, -0.04878015071153641, -0.02552681975066662, 0.011028935201466084, -0.07416049391031265, -0.02061564102768898, -0.005513199605047703, -0.015059702098369598, 0.03516242653131485, 0.0274493545293808, -0.013599224388599396, -0.0004846506635658443, -0.03901876509189606, 0.006342857610434294, 0.006296715699136257, 0.01246634777635336, -0.016728518530726433, 0.009577927179634571, 0.06980741769075394, 0.011816752143204212, -0.05758536234498024, 0.06064070761203766, -0.013257156126201153, 0.04342997819185257, 0.009156287647783756, -0.017353039234876633, 0.023903287947177887, 0.00680277356877923, -0.08083433657884598, 0.08385933935642242, -0.000679823278915137, 0.0017124797450378537, 0.007006720174103975, -0.05569132789969444, -0.0016967341070994735, -0.06456120312213898, -0.01962376944720745, 0.0516422800719738, -0.03340274840593338, 0.007595446426421404, -0.027706388384103775, -0.04432988911867142, -0.01907522976398468, -0.03128260746598244, 0.049280162900686264, 0.01678176037967205, 0.014695068821310997, 0.009110522456467152, 0.023195061832666397, 0.04712574556469917, -0.0065435124561190605, -0.004924372769892216, 0.007455105427652597, 6.49932589811169e-33, -0.022578289732336998, -0.015244033187627792, -0.0016237904783338308, 0.0034138322807848454, 0.01670568622648716, -0.016158172860741615, -0.003217657096683979, 0.04915842041373253, -0.04352030158042908, 0.019144436344504356, -0.0045102606527507305, 0.0007441866910085082, -0.000009731078534969129, 0.02478298544883728, 0.0615299716591835, -0.019764360040426254, -0.02010580152273178, -0.02664460428059101, -0.01324575673788786, 0.012634011916816235, 0.012933787889778614, 0.022127285599708557, 0.036940932273864746, 0.02659781090915203, -0.026080124080181122, 0.027032211422920227, 0.005471339449286461, 0.022057553753256798, -0.024570567533373833, 0.01398409903049469, -0.003489511786028743, -0.0345112569630146, 0.01323068980127573, -0.02716187946498394, 0.0005547220353037119, -0.0008819049107842147, -0.03584977984428406, 0.008385209366679192, 0.016572384163737297, 0.008136249147355556, 0.0027877595275640488, -0.006523842923343182, -0.06246868148446083, 0.06145792827010155, -0.0005277214222587645, 0.004508843179792166, 0.00693028187379241, -0.03374389559030533, 0.04572749510407448, 0.00013239457621239126, 0.03783179819583893, -0.027146538719534874, -0.03224242478609085, 0.0037511775735765696, 0.022240271791815758, -0.02851197123527527, 0.009926917031407356, 0.049277693033218384, 0.016085192561149597, 0.03399059176445007, -0.04368286207318306, 0.011620095930993557, -0.06201823800802231, -0.004095424897968769, -0.000293765653623268, 0.017170989885926247, -0.03433584049344063, -0.01827138476073742, 0.0038408352993428707, 0.02417493425309658, -0.005319618619978428, 0.019780417904257774, -0.009331469424068928, 0.06964308023452759, 0.02442977763712406, 0.010318941436707973, -0.04195946827530861, 0.034834932535886765, -0.03337865322828293, 0.04770706593990326, -0.00027232838328927755, -0.006288631819188595, 0.050030648708343506, 0.028041718527674675, 0.02256576530635357, -0.009015222080051899, -0.02570362202823162, 0.017312683165073395, -0.008206815458834171, -0.0010001317132264376, 0.030620642006397247, -0.0018732489552348852, -0.00869874469935894, 0.009850382804870605, -0.0015265538822859526, -1.280186356922286e-8, -0.051739662885665894, 0.01600751094520092, -0.01667313650250435, 0.053730111569166183, -0.028348123654723167, 0.021017353981733322, 0.0138164684176445, -0.07120143622159958, 0.024839041754603386, -0.010430507361888885, 0.012606615200638771, 0.008957093581557274, 0.014044836163520813, -0.00880493875592947, 0.02795768342912197, -0.04476230964064598, -0.056891683489084244, -0.016347505152225494, 0.029201293364167213, 0.06483721733093262, 0.007098855916410685, 0.02637290023267269, -0.0348910391330719, 0.012246023863554, 0.0029473311733454466, -0.041045721620321274, 0.026981396600604057, -0.06290635466575623, -0.04255427047610283, -0.020923689007759094, 0.04292153939604759, -0.02832435630261898, 0.016905201599001884, 0.027373403310775757, -0.016250088810920715, -0.0017837944906204939, 0.03045804239809513, -0.01943805254995823, 0.005604725796729326, 0.03081795759499073, -0.027679169550538063, -0.020558374002575874, -0.051378071308135986, -0.060506854206323624, 0.02857409417629242, 0.002581971697509289, -0.022546928375959396, -0.04555010050535202, 0.0010869768448174, -0.008853428065776825, -0.010712514631450176, 0.0018681461224332452, 0.0500151552259922, 0.042054954916238785, 0.043782252818346024, 0.012278121896088123, 0.0054521686397492886, 0.014842282980680466, -0.0037209750153124332, -0.03825041279196739, 0.06093553826212883, 0.005430732853710651, 0.004385459236800671, -0.02336740866303444 ]
neo4j-refactoring-the-bbc-football-live-text-fouls-graph
https://markhneedham.com/blog/2015/05/17/neo4j-refactoring-the-bbc-football-live-text-fouls-graph
false
2015-05-19 22:45:48
Neo4j: Finding all shortest paths
[ "neo4j", "cypher" ]
[ "neo4j" ]
One of the Cypher language features we show in Neo4j training courses is the http://neo4j.com/docs/milestone/query-match.html#_shortest_path[shortest path function] which allows you to find the shortest path in terms of number of relationships between two nodes. Using the movie graph, which you can import via the ':play movies' command in the browser, we'll first create a 'KNOWS' relationship between any people that have appeared in the same movie: [source,cypher] ---- MATCH (p1:Person)-[:ACTED_IN]->()<-[:ACTED_IN]-(p2:Person) MERGE (p1)-[:KNOWS]-(p2) ---- Now that we've got that relationship we can easily find the shortest path between two people, say Tom Cruise and Tom Hanks: [source,cypher] ---- MATCH (p1:Person {name: "Tom Hanks"}), (p2:Person {name: "Tom Cruise"}), path = shortestpath((p1)-[:KNOWS*]-(p2)) RETURN path ---- image::{{<siteurl>}}/uploads/2015/05/graph-18.png[Graph 18,300] That works pretty well but what if we want to find the longest shortest path between any two people in the graph? We can calculate it like this: [source,cypher] ---- MATCH (p1:Person), (p2:Person), path = shortestpath((p1)-[:KNOWS*]-(p2)) RETURN path ORDER BY LENGTH(path) DESC LIMIT 1 ---- image::{{<siteurl>}}/uploads/2015/05/graph-19.png[Graph 19,500] So that's 6 hops which is actually the http://en.wikipedia.org/wiki/Six_Degrees_of_Kevin_Bacon[Bacon number] - I expect we'd probably see a smaller maximum value if we imported all the movies. And to round off the post what if we want to find the longest shortest path between the 10 people who acted in the most movies? We might start out with the following query which seems like it should do the job: [source,cypher] ---- MATCH (p1:Person)-[:ACTED_IN]->() WITH p1, COUNT(*) AS appearances ORDER BY appearances DESC LIMIT 10 WITH p1 AS p1, p1 AS p2 MATCH path = shortestpath((p1)-[:KNOWS*]-(p2)) RETURN path ORDER BY LENGTH(path) DESC LIMIT 1 ---- *Unfortunately if we run that query we get no rows returned because 'p1' and 'p2' always refer to the same node.* Instead we can calculate the shortest path between our hardest working people by creating a cross product using COLLECT and UNWIND: [source,cypher] ---- MATCH (p1:Person)-[:ACTED_IN]->() WITH p1, COUNT(*) AS appearances ORDER BY appearances DESC LIMIT 10 WITH COLLECT(p1) AS ps UNWIND ps AS p1 UNWIND ps AS p2 MATCH path = shortestpath((p1)-[:KNOWS*]-(p2)) RETURN path ORDER BY LENGTH(path) DESC LIMIT 1 ---- image::{{<siteurl>}}/uploads/2015/05/graph-20.png[Graph 20,400] That's all for now!
null
null
[ 0.010132228955626488, -0.010861186310648918, 0.003005698788911104, 0.058440081775188446, 0.09400660544633865, -0.010718484409153461, 0.02196803130209446, 0.04426915943622589, 0.012823864817619324, -0.014314433559775352, -0.008412987925112247, 0.009912870824337006, -0.068107470870018, 0.01797405816614628, -0.013261765241622925, 0.06722117960453033, 0.05574062466621399, 0.022155817598104477, 0.010382031090557575, -0.017584441229701042, 0.015017404220998287, 0.06444840878248215, 0.00550053408369422, 0.043306466192007065, 0.04182730242609978, 0.014006329700350761, -0.014160624705255032, 0.002332984237000346, -0.046712327748537064, -0.0043265135027468204, 0.06885039061307907, -0.028374068439006805, 0.0196950975805521, -0.02704375609755516, 0.029166707769036293, 0.012919490225613117, -0.048082903027534485, 0.008686552755534649, -0.007955015636980534, 0.023403067141771317, -0.06848730891942978, 0.047771893441677094, -0.020433256402611732, -0.0045321364887058735, -0.05095866322517395, 0.006926939822733402, -0.0521986186504364, 0.03360285237431526, 0.018519164994359016, 0.016306757926940918, -0.06687024980783463, 0.04422406852245331, -0.039300937205553055, 0.03299538418650627, 0.003594159847125411, 0.03968369588255882, 0.021044913679361343, -0.06529561430215836, 0.046154655516147614, -0.004632267635315657, 0.012743380852043629, 0.0025030728429555893, 0.01709897443652153, 0.02726835384964943, -0.01157127134501934, -0.03931891545653343, 0.006639405619353056, 0.0684056282043457, -0.036343764513731, -0.017086761072278023, 0.022330574691295624, 0.016681188717484474, -0.011815245263278484, 0.010745981708168983, -0.009197574108839035, -0.04724841192364693, -0.00456238305196166, 0.04545380920171738, 0.016222842037677765, 0.021603355184197426, -0.04278409481048584, 0.022396333515644073, -0.011438291519880295, 0.04609605669975281, -0.013786416500806808, -0.01531403698027134, -0.007110609672963619, -0.015105902217328548, -0.06636910140514374, 0.029769467189908028, 0.0008625107584521174, -0.049027055501937866, -0.017178567126393318, -0.0010891882702708244, -0.007983285933732986, -0.011952263303101063, 0.016092583537101746, -0.018556779250502586, 0.010759647935628891, -0.030358601361513138, -0.014281184412539005, -0.02982749044895172, 0.003858984913676977, -0.01261238381266594, -0.08912171423435211, -0.03539401665329933, -0.009122795425355434, 0.007627095561474562, 0.003603924997150898, -0.009070479311048985, -0.05155794695019722, 0.0036150426603853703, -0.02045311965048313, 0.037163496017456055, -0.09487078338861465, 0.07740282267332077, 0.005846383515745401, -0.025488652288913727, -0.01574275828897953, 0.030502162873744965, 0.049153972417116165, 0.015990974381566048, -0.004098303150385618, 0.07565413415431976, -0.0031160973012447357, 0.05624724552035332, 0.0071603707037866116, 0.03801605477929115, -0.011323544196784496, -0.057955652475357056, -0.01217860821634531, 0.04396755248308182, -0.008670714683830738, -0.00014302392082754523, -0.02437693066895008, -0.04328508675098419, 0.010990033857524395, 0.008141856640577316, 0.03111688606441021, 0.021187882870435715, 0.01130419410765171, -0.05049247667193413, 0.03503255918622017, 0.007629044353961945, 0.04709576442837715, -0.004957657773047686, -0.028424834832549095, -0.03224293887615204, -0.014638250693678856, 0.005803041160106659, -0.006730242632329464, 0.008409497328102589, 0.05596192553639412, -0.044519033282995224, -0.008197817951440811, 0.1163976639509201, 0.057377591729164124, -0.0027888615150004625, -0.010787075385451317, 0.001225964049808681, 0.0659787580370903, 0.007865410298109055, 0.014179078862071037, 0.04746747389435768, 0.009596438147127628, -0.018519511446356773, -0.006647320929914713, 0.07302183657884598, -0.03787657245993614, 0.020417653024196625, -0.03697233647108078, -0.03316229209303856, 0.06662241369485855, -0.049343034625053406, -0.02938518300652504, 0.038164786994457245, 0.06531958281993866, 0.028597645461559296, 0.0012328062439337373, -0.006210102699697018, -0.07967200875282288, 0.06537029147148132, 0.004067323170602322, 0.010331153869628906, 0.011983771808445454, -0.01973629742860794, 0.06627820432186127, 0.025236355140805244, -0.006214346271008253, 0.025669870898127556, -0.07106232643127441, -0.08524616807699203, -0.02370266802608967, -0.01820910908281803, 0.06703728437423706, -0.020495545119047165, 0.03586272895336151, 0.00731279281899333, -0.002339427126571536, 0.030640820041298866, -0.000631496193818748, -0.021724538877606392, 0.03595219552516937, -0.018641920760273933, -0.069338358938694, 0.06437454372644424, 0.009533594362437725, -0.023565666750073433, -0.033273905515670776, 0.006471386644989252, -0.0020072530023753643, 0.0003321329422760755, 0.03916383907198906, -0.045631494373083115, 0.029265597462654114, 0.019994821399450302, 0.014412593096494675, -0.012251762673258781, 0.045759428292512894, -0.033096447587013245, 0.015795329585671425, 0.007791017182171345, -0.05035257339477539, 0.002597105922177434, -0.008320177905261517, 0.11949464678764343, 0.06697829812765121, -0.015219430439174175, -0.06918664276599884, 0.049738191068172455, 0.013949473388493061, -0.03459575027227402, 0.016475683078169823, -0.008955655619502068, -0.010634386911988258, -0.014942984096705914, -0.03309594839811325, -0.040209196507930756, 0.011168795637786388, -0.0378669835627079, 0.009639743715524673, 0.055734191089868546, -0.027064649388194084, 0.059161800891160965, -0.012702839449048042, -0.0010580653324723244, 0.029035057872533798, -0.03792354464530945, -0.046596258878707886, 0.04052962362766266, 0.0017565434100106359, -0.0010211709886789322, 0.048153143376111984, 0.0001957560598384589, -0.009293099865317345, -0.01706668920814991, -0.005075086373835802, 0.0453597828745842, 0.06608682125806808, 0.05788307264447212, 0.0011815620819106698, 0.06660589575767517, -0.025497103109955788, 0.02805347926914692, -0.037977561354637146, -0.0428030751645565, -0.049705225974321365, -0.018971072509884834, 0.016689831390976906, 0.019523169845342636, 0.03927437216043472, -0.019228747114539146, 0.025896886363625526, 0.0008057504892349243, 0.024599822238087654, 0.0018073549726977944, 0.032089121639728546, 0.01684439741075039, -0.013112280517816544, -0.027974335476756096, -0.034009166061878204, 0.07110267877578735, -0.050907380878925323, -0.020491665229201317, -0.010667641647160053, -0.056240927428007126, 0.03582035005092621, -0.05190552771091461, -0.009487057104706764, -0.0069095599465072155, 0.024812955409288406, 0.05862142890691757, 0.011771035380661488, -0.0023509261664003134, 0.060355544090270996, 0.0075151328928768635, 0.02650296501815319, 0.015867162495851517, 0.008055449463427067, 0.04660824313759804, -0.004161973018199205, 0.04252354055643082, 0.03803737461566925, -0.01733628287911415, -0.005313924513757229, -0.004777013324201107, 0.007095899898558855, 0.0036512422375380993, -0.261797696352005, 0.05242529511451721, -0.01730775274336338, -0.05428851768374443, 0.03243144229054451, -0.04647080972790718, -0.005042916163802147, -0.03521684557199478, -0.02932668663561344, 0.015274531207978725, -0.021606585010886192, -0.04027526453137398, -0.019550686702132225, 0.039541102945804596, 0.02314736321568489, 0.005888683255761862, -0.017855806276202202, -0.058836694806814194, 0.0003813711809925735, 0.05119163915514946, -0.004585854709148407, -0.04994257166981697, -0.016854217275977135, 0.02813730761408806, 0.004337622784078121, 0.03717382997274399, -0.10338860750198364, 0.006916774436831474, -0.07065548002719879, -0.021325543522834778, -0.015751950442790985, -0.018071910366415977, 0.015185198746621609, -0.00257222936488688, -0.011405912227928638, -0.0392661951482296, 0.05787590518593788, -0.008065690286457539, -0.009189599193632603, 0.01708666794002056, -0.0534382238984108, -0.042001765221357346, -0.025937315076589584, -0.018773280084133148, 0.08393101394176483, -0.0019955341704189777, -0.055249039083719254, -0.004471454303711653, -0.011698787100613117, 0.04871412366628647, -0.02053268440067768, -0.015318967401981354, -0.003809931455180049, 0.0034112497232854366, -0.010653149336576462, -0.020254142582416534, -0.003338363952934742, -0.018628237769007683, -0.059111665934324265, -0.026267515495419502, -0.014533570036292076, -0.025457292795181274, 0.014653552323579788, -0.053846076130867004, -0.0049138860777020454, -0.0531170554459095, -0.06756071001291275, -0.03131686896085739, 0.049406688660383224, -0.00893432181328535, -0.012838045135140419, 0.019894255325198174, -0.019735045731067657, -0.09811566025018692, -0.053267624229192734, -0.00951556395739317, -0.0021150358952581882, 0.01133478619158268, -0.003619828727096319, 0.04133938252925873, -0.03483852744102478, -0.05214022472500801, 0.004403920378535986, 0.025210164487361908, 0.01482624001801014, 0.01486098114401102, 0.026080837473273277, -0.023258421570062637, -0.02330007217824459, 0.005406361538916826, 0.06535780429840088, -0.01798817701637745, -0.033814989030361176, 0.0023568065371364355, -0.010478908196091652, 0.011723674833774567, -0.014619192108511925, 0.019898394122719765, 0.0017637652345001698, 0.043291378766298294, 0.04854932799935341, -0.03930741176009178, 0.02035641483962536, -0.01056436263024807, -0.040023323148489, 0.006603855174034834, -0.025807108730077744, 0.025014959275722504, 0.024805115535855293, 0.014018800109624863, -0.0031674474012106657, 0.005363720003515482, 0.030183229595422745, -0.04619995504617691, -0.03338835388422012, -0.02759137563407421, 0.016748230904340744, 0.031142733991146088, 0.034320782870054245, -0.006971755065023899, -0.07317373901605606, 0.05350302904844284, 0.025385290384292603, -0.010061915032565594, -0.06863612681627274, -0.04590089991688728, -0.034730058163404465, -0.014101878739893436, 0.010598738677799702, 0.028981344774365425, -0.03854869678616524, 0.06969863176345825, 0.018256602808833122, -0.01462604571133852, 0.04955651983618736, -0.043917588889598846, -0.05196603760123253, -0.03837459906935692, 0.009185492061078548, -0.01956569217145443, 0.0007925369427539408, 0.0023980324622243643, 0.002328042406588793, 0.04859822243452072, 0.03941105306148529, 0.0063604810275137424, 0.01890195719897747, -0.004331433214247227, 0.024584811180830002, -0.004111647140234709, -0.008427673950791359, -0.017709339037537575, 0.019763270393013954, -0.04104537144303322, -0.0035497830249369144, -0.011496145278215408, 0.0251770056784153, -0.013183158822357655, -0.045469820499420166, -0.021490784361958504, 0.03749857097864151, -0.043181162327528, 0.03517712652683258, -0.017823703587055206, -0.004690869245678186, 0.060905929654836655, -0.018431656062602997, 0.004120835568755865, -0.037542637437582016, -0.010065390728414059, 0.02019120194017887, -0.0006174646550789475, -0.04315449669957161, 0.0022808427456766367, -0.005865301936864853, -0.000026413876184960827, -0.012383583001792431, 0.021773355081677437, 0.026430141180753708, 0.027100468054413795, -0.009862040169537067, -0.025936372578144073, 0.001291140797547996, 0.005368034355342388, 0.03756604716181755, 0.038846712559461594, -0.03223502263426781, -0.011179531924426556, -0.03918156772851944, -0.006589708849787712, 0.00048272107960656285, -0.0073416572995483875, -0.04498397186398506, 0.0042494190856814384, -0.03799015283584595, -0.07135938853025436, 0.04903649166226387, -0.01597820594906807, 0.02571379579603672, 0.05442774295806885, 0.019768714904785156, -0.005824083462357521, -0.01319949608296156, 0.0339789018034935, 0.05177247151732445, -0.05801617354154587, -0.005822164937853813, 0.03822078928351402, -0.0006352345226332545, -0.002019246108829975, 0.004779205657541752, -0.07596497237682343, -0.016098393127322197, -0.02477383241057396, 0.019192304462194443, -0.03051561489701271, -0.04547961428761482, -0.011081513948738575, 0.007418917492032051, -0.011723189614713192, 0.021939340978860855, -0.011827880516648293, -0.0019806779455393553, -0.021614134311676025, -0.014219217002391815, 0.058476973325014114, -0.019772261381149292, -0.01325833797454834, 0.01854228787124157, -0.021803485229611397, -0.0004106167471036315, -0.02846272476017475, 0.03233150765299797, 0.034630581736564636, -0.021612845361232758, -0.0021366518922150135, -0.07699382305145264, -0.011063585989177227, -0.01677997224032879, 0.03874553367495537, -0.008542082272469997, 0.004683342296630144, -0.03784617781639099, 0.00024065497564151883, -0.018412278965115547, 0.02098112180829048, 0.008205839432775974, -0.04531649500131607, 0.02017989382147789, 0.014467676170170307, -0.0039056914392858744, 0.022442150861024857, -0.002538855653256178, -0.03512783721089363, 0.04370494186878204, -0.04996420070528984, -0.043065644800662994, -0.024071872234344482, -0.047121815383434296, 0.017943188548088074, -0.006385457701981068, 0.01383611373603344, -0.020145777612924576, 0.043101634830236435, 0.05606162175536156, 0.026696117594838142, 0.04332909360527992, -0.012006404809653759, 0.022253766655921936, -0.02392219379544258, 0.00023889080330263823, -0.08030325174331665, 0.011605856940150261, 0.02426554262638092, -0.008864229544997215, 0.00015996352885849774, 0.01110700611025095, -0.006318363361060619, 0.0019418882438912988, -0.07286744564771652, -0.021500905975699425, 0.028545638546347618, -0.019372593611478806, 0.021485136821866035, 0.011690802872180939, -0.05788175016641617, 0.00809079222381115, 0.04902460798621178, -0.026094816625118256, -0.011816090904176235, -0.03652498126029968, 0.06703634560108185, -0.032636161893606186, 0.04233866557478905, -0.004559614229947329, -0.024528224021196365, 0.07590579241514206, 0.04106473922729492, 0.030751042068004608, 0.04536056891083717, -0.02464097924530506, 0.028502771630883217, 0.037836916744709015, -0.02700909785926342, -0.010989559814333916, 0.04981069639325142, -0.019651247188448906, -0.06546159088611603, 0.05194124951958656, 0.017483625560998917, -0.011916624382138252, -0.05788537114858627, 0.05064791813492775, 0.028288058936595917, -0.0334443524479866, -0.053318098187446594, 0.04011426866054535, 0.00026464680559001863, 0.0049498602747917175, -0.015042467974126339, -0.006199940573424101, -0.03633460775017738, 0.053708549588918686, -0.033548131585121155, 0.007438413333147764, 0.08192536234855652, 0.013687888160347939, -0.00695043196901679, -0.007375076878815889, 0.09308886528015137, 0.09031078219413757, 0.05022202059626579, 0.01763095334172249, 0.08045998215675354, 0.0020046078134328127, -0.017158908769488335, 0.005958836525678635, -0.028792759403586388, -0.021372947841882706, 0.007972238585352898, 0.012629194185137749, 0.06088126450777054, -0.04279258847236633, 0.0723123773932457, -0.025180194526910782, 0.004509085323661566, 0.009197402745485306, -0.019315937533974648, 0.00876446720212698, 0.0672801062464714, 0.015809981152415276, 0.029058651998639107, -0.04156694933772087, -0.02097390592098236, 0.03497801348567009, 0.01664631813764572, -0.018134620040655136, 0.03198184818029404, -0.031101981177926064, 0.0027581523172557354, 0.009755163453519344, 0.036240898072719574, 0.10479014366865158, -0.03467881307005882, -0.004952170420438051, -0.013551614247262478, 0.006873421370983124, -0.013085589744150639, 0.025034254416823387, 0.0037275643553584814, -0.023052647709846497, -0.00043292317423038185, -0.04831001162528992, -0.034477222710847855, -0.018531937152147293, -0.009709703736007214, 0.010680575855076313, -0.018503611907362938, 0.0030611390247941017, -0.0018286819104105234, -0.019834376871585846, -0.014148938469588757, -0.04112210124731064, -0.034659236669540405, -0.07033472508192062, -0.0765252560377121, -0.021873530000448227, 0.005033787339925766, -0.009145224466919899, -0.03416987508535385, 0.005040804855525494, -0.023158639669418335, -0.01005945447832346, 0.053871773183345795, -0.055959224700927734, -0.001197383739054203, 0.008636646904051304, 0.035553157329559326, 0.014113749377429485, -0.012105162255465984, 0.038589511066675186, 0.0032353089191019535, 0.009301641024649143, -0.034862108528614044, 0.021936889737844467, 0.027258524671196938, 0.021267371252179146, -0.011154783889651299, -0.0871339812874794, -0.014504787512123585, 0.006346635054796934, -0.03927389904856682, -0.08212878555059433, -0.00872587040066719, 0.038004402071237564, 0.036656204611063004, 0.050258148461580276, -0.01949736289680004, -0.019366223365068436, -0.05967313423752785, 0.01783916726708412, -0.0019423022167757154, -0.04558100551366806, 0.043968308717012405, -0.04186023399233818, 0.07680214941501617, 0.01881217584013939, -0.0016059958143159747, -0.03307885676622391, -0.015675930306315422, -0.004671328701078892, 0.010013001039624214, -0.04314428195357323, -0.021277621388435364, -0.01473379135131836, -0.10888057947158813, -0.04153372347354889, 0.023330427706241608, -0.021726733073592186, -0.032161422073841095, 0.007296915631741285, 0.03761956840753555, -0.00899814534932375, 0.032070327550172806, -0.045362625271081924, 0.013720049522817135, -0.012783833779394627, -0.012250952422618866, -0.03953199461102486, 0.016273939982056618, -0.011190442368388176, 0.0005444178241305053, 0.04172128066420555, -0.048187218606472015, -0.019770566374063492, -0.017019445076584816, 0.0246341023594141, 0.020837368443608284, 0.038236670196056366, 0.0008204633486457169 ]
[ -0.08187367767095566, -0.002450193278491497, -0.0448104552924633, -0.0035331319086253643, 0.04320663586258888, 0.005595190450549126, 0.0013514328747987747, -0.012373222038149834, 0.017913879826664925, -0.04270850121974945, 0.04739345237612724, -0.027505042031407356, 0.007266692351549864, 0.025447990745306015, 0.07483325153589249, -0.019795984029769897, 0.036233797669410706, -0.029949594289064407, -0.05027163773775101, 0.03692817687988281, -0.007234669290482998, -0.06075421720743179, -0.0034734185319393873, -0.05228627845644951, 0.0222507044672966, 0.016552850604057312, 0.053433388471603394, -0.027245167642831802, -0.010762479156255722, -0.19504360854625702, 0.007378445938229561, 0.03663378581404686, 0.0038996508810669184, 0.01540149562060833, -0.021738983690738678, 0.012208927422761917, 0.03982210159301758, -0.01613713428378105, -0.00006723571277689189, 0.0006861713482066989, 0.011840783059597015, 0.017708420753479004, 0.006597489584237337, -0.030750876292586327, 0.03218318521976471, 0.03199080377817154, -0.030398694798350334, -0.013064246624708176, -0.02432801015675068, 0.0025962817016988993, -0.03239643573760986, -0.04531082138419151, 0.018987562507390976, 0.0027094159740954638, -0.02564333938062191, 0.048425398766994476, 0.03401310369372368, 0.042638856917619705, 0.024196596816182137, 0.036339037120342255, 0.005315775517374277, -0.004184575751423836, -0.1346515417098999, 0.038860488682985306, 0.04422060027718544, 0.005183405242860317, -0.05598096922039986, -0.029365384951233864, -0.05539233237504959, 0.0899096429347992, 0.028085676953196526, 0.028262674808502197, -0.023432694375514984, 0.04992200806736946, -0.023750200867652893, 0.025994818657636642, -0.0021173804998397827, 0.017270397394895554, 0.02062332257628441, -0.03834223747253418, -0.03209713473916054, 0.006470995955169201, -0.06291487067937851, 0.01662529818713665, -0.02060803398489952, 0.055466488003730774, -0.006557250861078501, 0.04312800243496895, -0.020415695384144783, 0.039051786065101624, 0.016217587515711784, 0.02920577861368656, 0.029750602319836617, 0.030778633430600166, -0.09950075298547745, -0.05251910910010338, 0.012033100239932537, 0.021208683028817177, -0.0035782181657850742, 0.4235510230064392, 0.015779027715325356, 0.000044661006540991366, 0.05207938700914383, 0.05781294405460358, -0.01766517013311386, -0.00637523178011179, -0.019708460196852684, -0.06267375499010086, 0.0574958398938179, -0.016428150236606598, -0.003639690112322569, -0.03616288676857948, 0.03772171959280968, -0.10077039152383804, 0.019132429733872414, 0.03149421140551567, 0.08081988990306854, 0.04904927685856819, -0.01825905777513981, -0.01955893449485302, -0.002702644793316722, -0.016641909256577492, 0.030362308025360107, -0.03037385828793049, -0.022194644436240196, -0.019331933930516243, 0.03133390098810196, 0.038445912301540375, 0.03306109830737114, 0.02642098069190979, 0.06699085235595703, -0.024414869025349617, -0.05864199250936508, 0.05013469606637955, -0.03498154506087303, 0.030036766082048416, 0.019961362704634666, -0.02535405568778515, -0.030342796817421913, -0.009670030325651169, -0.0011193674290552735, -0.017287518829107285, 0.04732013866305351, 0.015930356457829475, -0.0260915569961071, 0.13897931575775146, -0.007121327333152294, -0.04549431428313255, -0.018628930673003197, -0.03327127918601036, 0.009553633630275726, 0.03471894562244415, -0.005196395330131054, -0.06800854206085205, -0.022352565079927444, -0.0028406865894794464, 0.10910461097955704, -0.018987445160746574, -0.09839854389429092, 0.039309822022914886, -0.006181651726365089, -0.006466184742748737, -0.02651447057723999, 0.0576728917658329, 0.08224877715110779, -0.10403699427843094, 0.00017126913007814437, 0.018913693726062775, 0.018568987026810646, -0.0683230385184288, 0.01926296018064022, 0.02131263166666031, -0.04491632431745529, -0.019607892259955406, 0.06342120468616486, -0.008050487376749516, -0.05550161376595497, 0.0030039160046726465, 0.0276932455599308, 0.009249230846762657, -0.0551125705242157, -0.0228317491710186, -0.050382260233163834, -0.007699253037571907, -0.0591222383081913, -0.0238137599080801, -0.050173014402389526, 0.014919533394277096, -0.02249789424240589, -0.024007124826312065, 0.010330110788345337, 0.01706543192267418, -0.03464411199092865, 0.0814269483089447, -0.04715212434530258, -0.022555463016033173, -0.029789650812745094, 0.017739461734890938, -0.04959700629115105, -0.006882381625473499, -0.024575158953666687, -0.009551327675580978, -0.017821576446294785, 0.01598486676812172, -0.06431423127651215, 0.025370048359036446, 0.06011440232396126, -0.05618039146065712, 0.058591295033693314, 0.04805004224181175, -0.044549692422151566, -0.03239179402589798, -0.029817238450050354, 0.030159197747707367, 0.011460495181381702, -0.002410603454336524, 0.00775467325001955, -0.010624382644891739, 0.017634794116020203, 0.046998657286167145, -0.0005696776788681746, -0.01820199005305767, -0.0026551038026809692, -0.3613775372505188, -0.052947498857975006, -0.020423224195837975, -0.009117327630519867, 0.029445575550198555, -0.036059897392988205, -0.012570902705192566, -0.020470956340432167, 0.02856568433344364, 0.03484136983752251, 0.04264722019433975, -0.01369425281882286, -0.03375314921140671, -0.07855981588363647, 0.0127315828576684, 0.02578980289399624, -0.0035119771491736174, 0.0370064340531826, 0.0013643609127029777, 0.034583043307065964, 0.007464187685400248, -0.053204890340566635, -0.018427148461341858, -0.039115287363529205, -0.01600976660847664, 0.006580662447959185, 0.13106200098991394, 0.033312052488327026, 0.023262079805135727, -0.04779796674847603, 0.03380754590034485, 0.03581590950489044, -0.0301737692207098, -0.010114990174770355, 0.01812945492565632, -0.04404237121343613, 0.0518232062458992, -0.020053816959261894, -0.017558099702000618, -0.020526528358459473, -0.06286666542291641, -0.018939079716801643, -0.036826543509960175, -0.027392249554395676, -0.07617723941802979, 0.02631317265331745, -0.04215138778090477, -0.018199287354946136, 0.036798927932977676, 0.05215458199381828, 0.024495786055922508, 0.012606882490217686, 0.01159176230430603, -0.035614483058452606, 0.011827674694359303, -0.02699877880513668, -0.035335782915353775, -0.01191352866590023, -0.002092619426548481, 0.029052017256617546, -0.028339875862002373, 0.013813369907438755, 0.021588172763586044, -0.06442765891551971, 0.02880381979048252, -0.0035647687036544085, -0.0025501176714897156, 0.013363063335418701, 0.026576604694128036, -0.004823131486773491, -0.027290785685181618, 0.08125811815261841, -0.01205568015575409, 0.02082069031894207, 0.04991883039474487, 0.03530855104327202, -0.0021307121496647596, 0.03829415887594223, 0.0274904016405344, -0.005909704137593508, 0.06250166893005371, -0.020699208602309227, 0.04360440745949745, -0.050591688603162766, -0.03513410687446594, 0.025998545810580254, 0.02197745256125927, -0.07817245274782181, 0.05364106595516205, 0.03339093551039696, 0.0209538321942091, -0.010801292955875397, -0.004885968752205372, -0.05795668810606003, 0.05624782666563988, -0.01649954728782177, -0.2720060646533966, 0.024230832234025, 0.003209712216630578, 0.05910549312829971, -0.002623592270538211, 0.004599400330334902, 0.053242746740579605, 0.0000575841695535928, 0.016634393483400345, -0.016440734267234802, 0.06561065465211868, 0.051771130412817, 0.026492618024349213, -0.017641739919781685, -0.014054658822715282, 0.014699741266667843, 0.04552803933620453, 0.0369989387691021, 0.043573345988988876, 0.033209361135959625, 0.04619032144546509, -0.014961710199713707, 0.17376933991909027, 0.006259812042117119, 0.02120628021657467, 0.015403583645820618, -0.04141274094581604, -0.002933696610853076, 0.019990799948573112, -0.052673470228910446, -0.01316092535853386, 0.04220765829086304, -0.02060169354081154, -0.0016881637275218964, 0.04115992784500122, -0.03077273815870285, -0.019327057525515556, 0.036932751536369324, 0.029907099902629852, 0.0006238066707737744, -0.002209078287705779, -0.0321737676858902, -0.021756595000624657, -0.020587150007486343, 0.05712622031569481, -0.020963478833436966, 0.01912950538098812, 0.020103447139263153, -0.07637928426265717, -0.017435353249311447, -0.0375654436647892, -0.031136393547058105, 0.00229261233471334, -0.0034774073865264654, 0.011979049071669579, 0.07275348901748657, 0.021566195413470268, -0.03316160663962364, 0.01476301159709692, 0.0029910083394497633, -0.04802331328392029, -0.04390329867601395, 0.08123407512903214, -0.013502880930900574, 0.0289533082395792 ]
[ 0.012379670515656471, 0.0200092364102602, 0.0008048838353715837, -0.0038186104502528906, -0.011886807158589363, 0.05601708963513374, -0.03469426929950714, 0.028737235814332962, -0.010358735918998718, 0.012973533011972904, 0.0059607671573758125, 0.0402822382748127, 0.040158092975616455, 0.03442654386162758, 0.013397511094808578, 0.006158268544822931, -0.01620168797671795, 0.05878445506095886, 0.0008619248401373625, -0.011955457739531994, -0.050494421273469925, -0.03790232166647911, 0.04932036250829697, -0.021048206835985184, -0.014933058060705662, 0.0025517200119793415, -0.014030218124389648, -0.004904286470264196, 0.017826532945036888, -0.1090863049030304, 0.007717975415289402, -0.005972487851977348, -0.007096870336681604, 0.02055707387626171, -0.02573641948401928, 0.005202834028750658, -0.009626040235161781, 0.00898766703903675, 0.009393427520990372, -0.024415381252765656, 0.006346110254526138, -0.0008705879445187747, -0.009069629944860935, -0.0030416694935411215, 0.02448553964495659, -0.02010730840265751, -0.06053498759865761, -0.0037129067350178957, -0.00018985963833983988, -0.0076017118990421295, -0.04921204224228859, -0.0037453826516866684, -0.03499145433306694, -0.0048997970297932625, 0.005027447827160358, -0.008664697408676147, -0.04247104749083519, -0.006192600820213556, 0.010688514448702335, -0.027610331773757935, 0.030343282967805862, -0.033863235265016556, -0.06638047099113464, -0.020095914602279663, -0.002515668049454689, -0.017167480662465096, -0.0072391824796795845, 0.018049942329525948, -0.00982813909649849, 0.009360327385365963, -0.04886406660079956, 0.033836670219898224, -0.048642322421073914, -0.015537929721176624, -0.0382741279900074, 0.02349328249692917, 0.03134754300117493, 0.0001314994879066944, 0.006868483033031225, -0.04383745416998863, 0.01874326542019844, -0.011306002736091614, -0.01706022582948208, 0.005073615815490484, -0.02728847600519657, -0.0024205329827964306, -0.002589346142485738, 0.001141626387834549, 0.00421974016353488, 0.016779540106654167, -0.05536545440554619, 0.019672980532050133, 0.011763387359678745, 0.0042173052206635475, -0.09516048431396484, 0.025381436571478844, -0.01108795590698719, 0.00449129194021225, 0.013842997141182423, 0.8084399104118347, 0.025455599650740623, -0.04039161652326584, 0.02692744880914688, 0.0025459150783717632, 0.04604486748576164, 0.041844774037599564, 0.015820546075701714, -0.004469027742743492, 0.013570110313594341, -0.029742682352662086, -0.023127175867557526, 0.023267798125743866, -0.0026187514886260033, 0.01791517436504364, 0.013593833893537521, 0.03978341817855835, 0.02892295829951763, 0.030134830623865128, -0.0022795319091528654, 0.005067093297839165, -0.01303237397223711, 0.010521402582526207, -0.0032589195761829615, -0.016923654824495316, -0.01251832116395235, -0.17610518634319305, -0.01002543419599533, -6.442389359861674e-33, 0.030515821650624275, -0.0012228582054376602, 0.0560058169066906, -0.009090394712984562, 0.0022129782009869814, 0.019239934161305428, -0.005964390002191067, -0.0039266543462872505, -0.03093142621219158, -0.05513681098818779, -0.0261232890188694, -0.014211175963282585, -0.007009654305875301, -0.02355019375681877, 0.013720602728426456, -0.0101797915995121, -0.007869740016758442, 0.022081337869167328, -0.005263861268758774, -0.02325456589460373, -0.008812149055302143, 0.015052640810608864, -0.03674708306789398, 0.03297686204314232, -0.021288931369781494, 0.03406365215778351, -0.008169678039848804, -0.01248252298682928, -0.014220384880900383, -0.05882260948419571, -0.057634636759757996, 0.0344068743288517, -0.01715092733502388, -0.006302535533905029, 0.014192790724337101, -0.05569801479578018, -0.0372249037027359, -0.001855979673564434, 0.0015352613991126418, -0.03598573058843613, -0.0639578253030777, -0.010780193842947483, -0.02248634770512581, -0.02106536738574505, -0.08094736188650131, -0.008176828734576702, 0.007093736436218023, 0.026361191645264626, -0.03159523755311966, 0.048673197627067566, 0.028320321813225746, 0.019060853868722916, 0.0027543294709175825, -0.00637778639793396, -0.019931485876441002, 0.006681149359792471, 0.03619775548577309, -0.03126753121614456, -0.027366597205400467, 0.017063714563846588, 0.07154304534196854, 0.024910375475883484, -0.013183629140257835, 0.056819263845682144, 0.014413300901651382, 0.03164266049861908, 0.0015173167921602726, 0.0015142393531277776, 0.02051098830997944, 0.037995319813489914, -0.06755857169628143, 0.05890868604183197, 0.012711313553154469, -0.03774857893586159, 0.07332529872655869, -0.03432939574122429, -0.017086395993828773, -0.04688300937414169, 0.0033545701298862696, 0.04767907038331032, -0.04731578752398491, -0.016975224018096924, 0.014500531367957592, -0.05329470708966255, -0.030952611938118935, 0.0026311534456908703, 0.019762419164180756, -0.015729762613773346, 0.02993907406926155, 0.04038703441619873, 0.07912374287843704, -0.002735867165029049, -0.034093283116817474, 0.030928445979952812, 0.01759762316942215, 5.9384586050840056e-33, 0.011564573273062706, 0.03213224560022354, 0.003217167453840375, -0.014578261412680149, 0.032508160918951035, -0.0028906583320349455, 0.02145409770309925, 0.000342743587680161, -0.026041986420750618, 0.02189924754202366, -0.0040096500888466835, -0.027170848101377487, 0.0018420962151139975, 0.00621563708409667, 0.08169954270124435, 0.0004919108469039202, 0.0005188900395296514, -0.028805986046791077, 0.017305422574281693, 0.0006740741082467139, -0.012698348611593246, 0.00804148055613041, -0.03066874109208584, 0.0207534097135067, 0.015739908441901207, 0.030957601964473724, 0.05129306763410568, -0.0014683353947475553, 0.00006422839214792475, 0.015750909224152565, -0.011121573857963085, -0.061026401817798615, -0.032535966485738754, -0.0220408383756876, 0.032596491277217865, 0.02153727039694786, 0.004692137241363525, -0.016878042370080948, -0.014285621233284473, -0.016064733266830444, 0.01002093032002449, 0.02683962881565094, -0.02763732522726059, 0.05770639330148697, 0.01546083576977253, 0.027245040982961655, -0.00037556709139607847, 0.01232294924557209, -0.008783476427197456, 0.01678314059972763, 0.013144465163350105, 0.03724607452750206, -0.010526365600526333, 0.022423837333917618, 0.0123748779296875, -0.04551217332482338, -0.010072083212435246, 0.056946735829114914, 0.018024619668722153, -0.00444338284432888, -0.005179405678063631, -0.032697610557079315, -0.08235901594161987, 0.024938033893704414, -0.002848399570211768, -0.0073208920657634735, -0.04007280617952347, 0.04029453918337822, -0.02983933314681053, 0.013155464082956314, 0.015222935006022453, 0.009110815823078156, -0.009930023923516273, 0.03191366791725159, 0.034447699785232544, -0.022175082936882973, 0.0014944096328690648, 0.010054933838546276, -0.007749263197183609, 0.013998663052916527, 0.025477701798081398, 0.01961098052561283, 0.026457292959094048, -0.008472965098917484, -0.017772888764739037, 0.035276662558317184, -0.017142420634627342, 0.03656848520040512, 0.011410176753997803, -0.006696765311062336, 0.04537153244018555, -0.011791366152465343, 0.01573282666504383, 0.023235339671373367, -0.03684135153889656, -1.2111070368803212e-8, -0.07988889515399933, 0.0014211126836016774, -0.01743350178003311, -0.01198685634881258, 0.007923339493572712, 0.029770774766802788, 0.01233072392642498, 0.025654815137386322, 0.006030595395714045, 0.026519138365983963, 0.03014066070318222, -0.014200694859027863, 0.008670935407280922, 0.005140224471688271, -0.02376593090593815, -0.023179808631539345, -0.034704096615314484, 0.017767371609807014, 0.05254768952727318, 0.051199689507484436, -0.006826426833868027, 0.015377668663859367, -0.05300324782729149, 0.018013952299952507, -0.01815817877650261, -0.03627099469304085, 0.05239785090088844, -0.06152789294719696, 0.012918832711875439, -0.01882822811603546, -0.03139621764421463, -0.021008454263210297, -0.022623354569077492, -0.0035227907355874777, -0.03325442224740982, -0.02474309504032135, 0.025597523897886276, 0.021255221217870712, 0.0072770509868860245, 0.059194255620241165, -0.015081515535712242, 0.002558227628469467, -0.02665669471025467, -0.034206099808216095, -0.005635127890855074, 0.028065897524356842, -0.012747486121952534, -0.04235825687646866, 0.01605827733874321, -0.040587976574897766, -0.016157930716872215, -0.003538798773661256, 0.02078700065612793, -0.011121348477900028, 0.04471497982740402, -0.02102133072912693, -0.0013964567333459854, 0.0020466295536607504, -0.01378650777041912, -0.011023543775081635, 0.021188095211982727, 0.004699618089944124, -0.0028409219812601805, -0.011194402351975441 ]
neo4j-finding-all-shortest-paths
https://markhneedham.com/blog/2015/05/19/neo4j-finding-all-shortest-paths
false
2015-05-26 07:03:36
Neo4j: The foul revenge graph
[ "neo4j" ]
[ "neo4j" ]
Last week I was showing the http://www.markhneedham.com/blog/2015/05/16/neo4j-bbc-football-live-text-fouls-graph/[foul graph] to my colleague http://www.apcjones.com/[Alistair] who came up with the idea of running a 'foul revenge' query to find out which players gained revenge for a foul with one of their own later in them match. Queries like this are very path centric and therefore work well in a graph. To recap, this is what the foul graph looks like: image::{{<siteurl>}}/uploads/2015/05/2015-05-26_07-35-33.png[2015 05 26 07 35 33,598] The first thing that we need to do is connect the fouls in a linked list based on time so that we can query their order more easily. We can do this with the following query: [source,cypher] ---- MATCH (foul:Foul)-[:COMMITTED_IN_MATCH]->(match) WITH foul,match ORDER BY match.id, foul.sortableTime WITH match, COLLECT(foul) AS fouls FOREACH(i in range(0, length(fouls) -2) | FOREACH(foul1 in [fouls[i]] | FOREACH (foul2 in [fouls[i+1]] | MERGE (foul1)-[:NEXT]->(foul2) ))); ---- This query collects fouls grouped by match and then adds a 'NEXT' relationship between adjacent fouls. The graph now looks like this: image::{{<siteurl>}}/uploads/2015/05/2015-05-26_07-43-28.png[2015 05 26 07 43 28,598] Now let's find the revenge foulers in the Bayern Munich vs Barcelona match. We're looking for the following pattern: image::{{<siteurl>}}/uploads/2015/05/2015-05-26_07-55-45.png[2015 05 26 07 55 45,324] This translates to the following cypher query: [source,cypher] ---- match (foul1:Foul)-[:COMMITTED_AGAINST]->(app1)-[:COMMITTED_FOUL]->(foul2)-[:COMMITTED_AGAINST]->(app2)-[:COMMITTED_FOUL]->(foul1), (player1)-[:MADE_APPEARANCE]->(app1), (player2)-[:MADE_APPEARANCE]->(app2), (foul1)-[:COMMITTED_IN_MATCH]->(match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul2) WHERE (foul1)-[:NEXT*]->(foul2) RETURN player2.name AS firstFouler, player1.name AS revengeFouler, foul1.time, foul1.location, foul2.time, foul2.location ---- I've added in a few extra parts to the pattern to pull out the players involved and to find the revenge foulers in a specific match - the Bayern Munich vs Barcelona Semi Final 2nd leg. We end up with the following revenge fouls: image::{{<siteurl>}}/uploads/2015/05/2015-05-26_00-05-48.png[2015 05 26 00 05 48,469] We can see here that Dani Alves actually gains revenge on Bastian Schweinsteiger twice for a foul he made in the 10th minute. If we tweak the query to the following we can get a visual representation of the revenge fouls as well: [source,cypher] ---- match (foul1:Foul)-[:COMMITTED_AGAINST]->(app1)-[:COMMITTED_FOUL]->(foul2)-[:COMMITTED_AGAINST]->(app2)-[:COMMITTED_FOUL]->(foul1), (player1)-[:MADE_APPEARANCE]->(app1), (player2)-[:MADE_APPEARANCE]->(app2), (foul1)-[:COMMITTED_IN_MATCH]->(match:Match {id: "32683310"})<-[:COMMITTED_IN_MATCH]-(foul2), (foul1)-[:NEXT*]->(foul2) RETURN * ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-23_15-23-22.png[2015 05 23 15 23 22,599] At the moment I've restricted the revenge concept to single matches but I wonder whether it'd be more interesting to create a linked list of fouls which crosses matches between teams in the same season. The https://github.com/mneedham/neo4j-bbc[code for all of this is on github] - the README is a bit sketchy at the moment but I'll be fixing that up soon.
null
null
[ 0.0011516411323100328, -0.025630932301282883, 0.028418850153684616, 0.020175231620669365, 0.06764261424541473, -0.02011851593852043, 0.04601167514920235, 0.03163154795765877, 0.027568519115447998, -0.02311994694173336, 0.02446436882019043, 0.012701497413218021, -0.076392263174057, 0.007957269437611103, 0.012051469646394253, 0.06739930808544159, 0.039130065590143204, 0.021880337968468666, 0.0460132360458374, -0.03165322169661522, 0.038866929709911346, 0.06657657772302628, 0.009823714382946491, 0.048597656190395355, 0.0573323592543602, 0.02785232849419117, 0.008640514686703682, 0.02099318988621235, -0.06119075417518616, -0.008108745329082012, 0.07029881328344345, -0.006821265444159508, 0.017345182597637177, -0.033049605786800385, 0.025613564997911453, -0.013315304182469845, -0.04718010500073433, 0.01624089665710926, -0.016149288043379784, 0.0005522153223864734, -0.08395908027887344, 0.04047954082489014, -0.02403472736477852, 0.022906968370079994, -0.04857993870973587, 0.0294570941478014, -0.0385248102247715, 0.030870346352458, 0.006338694132864475, 0.0045679472386837006, -0.06841588020324707, 0.03884338214993477, -0.0031972196884453297, 0.02008822001516819, -0.02287360467016697, 0.03843209892511368, -0.002748755970969796, -0.06113722547888756, 0.0328335277736187, -0.02335726097226143, -0.0013803868787363172, -0.009511417709290981, 0.0008793401066213846, 0.006350870244204998, -0.019738441333174706, -0.02470305934548378, 0.005549387075006962, 0.05343077331781387, -0.03184553608298302, 0.004684600047767162, 0.0015049417270347476, 0.0053971800953149796, -0.016099674627184868, 0.013453434221446514, 0.012881581671535969, -0.05983775854110718, 0.0024302471429109573, 0.04566129297018051, 0.0316140241920948, 0.06319516152143478, -0.012961283326148987, 0.022894971072673798, 0.015990547835826874, 0.02995447628200054, -0.006272627506405115, -0.024369778111577034, -0.012135154567658901, -0.03796220198273659, -0.04983387514948845, 0.062292732298374176, -0.009467879310250282, -0.05927785485982895, 0.014117082580924034, 0.0074086496606469154, -0.023643046617507935, -0.023402834311127663, 0.02966477908194065, 0.029339168220758438, 0.01757807284593582, -0.04191893711686134, -0.01456315815448761, -0.052926648408174515, 0.00025580075453035533, 0.017854027450084686, -0.07609899342060089, -0.036095354706048965, -0.016360722482204437, -0.010931184515357018, 0.017076315358281136, -0.00003334701250423677, -0.022235576063394547, -0.0007551912567578256, 0.006258345674723387, -0.005456375889480114, -0.07555300742387772, 0.0723276287317276, 0.028480833396315575, -0.007022380828857422, 0.0015564411878585815, 0.03455682471394539, 0.015614436008036137, 0.001856361166574061, 0.0040804422460496426, 0.08977451175451279, 0.00960097648203373, 0.02711395174264908, 0.020310061052441597, 0.04895118996500969, -0.028143247589468956, -0.08098392188549042, 0.010220838710665703, 0.0629512295126915, -0.041228946298360825, 0.009615187533199787, 0.000020122952264500782, -0.055919453501701355, -0.019563043490052223, 0.013658328913152218, 0.04575887322425842, 0.048695195466279984, 0.004091482609510422, -0.05507754907011986, 0.01849442534148693, 0.025340475142002106, 0.030130818486213684, -0.030609475448727608, -0.0252460315823555, -0.032328344881534576, 0.00525175966322422, 0.008162857964634895, 0.0287421066313982, 0.021266840398311615, 0.047363024204969406, -0.03184886276721954, -0.0015349381137639284, 0.11115598678588867, 0.052008528262376785, 0.0012587286764755845, -0.051341596990823746, 0.013856342062354088, 0.03781288117170334, 0.03882841020822525, 0.0036101106088608503, 0.04681749269366264, 0.005900084972381592, -0.02871336229145527, 0.003456925740465522, 0.04000328108668327, -0.009373071603477001, 0.02523796446621418, -0.04090898856520653, -0.03784435614943504, 0.07729142904281616, -0.023219943046569824, -0.02605627104640007, 0.07705509662628174, 0.07635056972503662, 0.028988290578126907, 0.03255309537053108, 0.0035092069301754236, -0.06776446104049683, 0.03870842605829239, 0.007807321846485138, 0.023190518841147423, 0.01037970744073391, 0.001335526118054986, 0.09346356987953186, 0.011998526751995087, -0.0004361270694062114, 0.04632091894745827, -0.07701662927865982, -0.05855683982372284, -0.021251413971185684, -0.02171103097498417, 0.05594712495803833, -0.05114474147558212, 0.03814646974205971, 0.034044764935970306, 0.0030629332177340984, 0.04873441532254219, -0.0010496299946680665, 0.022025078535079956, 0.03965729847550392, -0.04961436241865158, -0.05009882152080536, 0.03957829251885414, -0.0020209115464240313, -0.03998208045959473, -0.047447867691516876, 0.042418889701366425, -0.026367593556642532, -0.004283118061721325, 0.02536359801888466, -0.049493562430143356, 0.008805905468761921, 0.023139219731092453, 0.038795460015535355, 0.0027165876235812902, 0.04433796554803848, -0.0734620988368988, 0.020764272660017014, 0.01884213089942932, -0.020894264802336693, 0.014262069948017597, -0.002886697417125106, 0.11052495986223221, 0.04418765380978584, -0.011351212859153748, -0.02873852476477623, 0.006734489928930998, 0.013331104069948196, -0.0067591737024486065, -0.0054512326605618, -0.012979748658835888, -0.017126215621829033, -0.015446114353835583, -0.04773977771401405, -0.03478701785206795, 0.016215449199080467, -0.03950367495417595, 0.008302396163344383, 0.049677956849336624, -0.0019220375688746572, 0.038792457431554794, -0.008691983297467232, -0.023648632690310478, -0.006129141431301832, -0.022208111360669136, -0.03419528901576996, 0.02052372880280018, 0.02854756824672222, -0.01146937906742096, 0.03589877113699913, -0.04585089161992073, 0.0010497627081349492, -0.021811924874782562, -0.027562618255615234, 0.027390630915760994, 0.041130006313323975, 0.05861544609069824, 0.013734489679336548, 0.03616277873516083, -0.01551592443138361, -0.024018919095396996, -0.030789634212851524, -0.04141104966402054, -0.0636703222990036, -0.03204287961125374, 0.01461905799806118, -0.007487851195037365, 0.014207183383405209, -0.0023305206559598446, -0.0034868267830461264, 0.005757520906627178, -0.0031215446069836617, 0.02090609259903431, 0.03191226348280907, -0.0001152822733274661, 0.0006566076190210879, -0.026021648198366165, -0.05819110572338104, 0.049440912902355194, -0.03394604101777077, -0.021880606189370155, -0.004203204996883869, -0.0705450251698494, 0.040459468960762024, -0.05679966136813164, -0.006724709644913673, 0.015993613749742508, -0.007070501334965229, 0.032400086522102356, 0.007637152448296547, 0.006591148674488068, 0.039167702198028564, 0.0027454292867332697, 0.010930501855909824, 0.02427077479660511, 0.010617097839713097, 0.036622386425733566, 0.009858814999461174, 0.04083467647433281, 0.023800337687134743, -0.03880315274000168, 0.024793539196252823, -0.04122607409954071, -0.006498686037957668, -0.004988045897334814, -0.29193177819252014, 0.03956367075443268, 0.00856008380651474, -0.018272459506988525, 0.022685835137963295, -0.02078193798661232, 0.005523634608834982, -0.027548233047127724, -0.04273674637079239, 0.010789143852889538, -0.019658008590340614, -0.03733929619193077, -0.020032627508044243, 0.010506496764719486, 0.03567514941096306, 0.017027467489242554, -0.01672256365418434, -0.06346675008535385, -0.007603563833981752, 0.054902978241443634, 0.007528792135417461, -0.04623480886220932, -0.038748763501644135, 0.010446698404848576, 0.003902469063177705, 0.047165658324956894, -0.08045084774494171, -0.01682577282190323, -0.07066553831100464, -0.013069107197225094, 0.006372465286403894, -0.01741146668791771, -0.01995200291275978, -0.004074055701494217, -0.027274880558252335, -0.03266359120607376, 0.04486655816435814, -0.013333910144865513, -0.037143606692552567, 0.008598350919783115, -0.042345691472291946, -0.026511570438742638, -0.02449839562177658, 0.005969488061964512, 0.09368865936994553, 0.034061674028635025, -0.05629423260688782, -0.012588980607688427, -0.008099514059722424, 0.07169755548238754, -0.02765285037457943, -0.03719369322061539, 0.0005421835230663419, 0.02996164932847023, -0.02561851032078266, -0.04366828873753548, -0.0056684291921556, -0.04594074562191963, -0.05107775703072548, -0.03553587570786476, 0.0037049190141260624, -0.0512988306581974, 0.005011219065636396, -0.013975237496197224, -0.004196341149508953, -0.05187010392546654, -0.04541253671050072, -0.027905793860554695, 0.04916955158114433, 0.0144972437992692, -0.029305964708328247, 0.04478812217712402, -0.00021109345834702253, -0.10010283440351486, -0.04098961502313614, 0.003812247421592474, -0.009978055953979492, 0.03468078002333641, 0.01563004031777382, 0.04075077176094055, -0.018132057040929794, -0.04586383327841759, 0.007967012003064156, 0.017127931118011475, 0.02054949477314949, -0.007801495026797056, 0.015837324783205986, 0.0026319928001612425, -0.03551335260272026, 0.009701176546514034, 0.07714283466339111, -0.020798081532120705, -0.029958492144942284, 0.01841041073203087, -0.005733206402510405, 0.012048274278640747, -0.0040984321385622025, -0.008032671175897121, 0.017732493579387665, 0.0330081507563591, 0.04068514332175255, -0.038954105228185654, 0.028929881751537323, -0.009509703144431114, -0.026185641065239906, -0.016271591186523438, -0.03333637863397598, 0.016647232696413994, 0.019391605630517006, 0.000789334939327091, 0.013899043202400208, -0.017606450244784355, 0.015297960489988327, -0.024839771911501884, -0.03727063909173012, -0.026462091132998466, 0.03443609178066254, 0.02624586410820484, 0.026770133525133133, -0.03263606131076813, -0.06716763973236084, 0.04247570037841797, -0.0014591795625165105, 0.012887107208371162, -0.07502894103527069, -0.027402248233556747, -0.012314235791563988, -0.03245861083269119, 0.016754472628235817, 0.0215372946113348, -0.02211148291826248, 0.004035528749227524, 0.03141756355762482, -0.015439544804394245, 0.05421311408281326, -0.01943243481218815, -0.038830388337373734, -0.04231666773557663, 0.01708349958062172, -0.0011506312293931842, 0.005227637477219105, 0.02554434724152088, -0.0023985716979950666, 0.05188983678817749, 0.0463695265352726, 0.012451626360416412, 0.01890570856630802, -0.0015744839329272509, 0.027482636272907257, 0.042323384433984756, 0.004340305924415588, -0.02586892992258072, 0.014880009926855564, -0.06281610578298569, 0.008968750014901161, 0.03811555355787277, 0.04337715730071068, 0.017322564497590065, -0.02432730793952942, -0.013869750313460827, 0.03611873835325241, -0.04867732152342796, 0.0009172509307973087, -0.006534273736178875, -0.001058274181559682, 0.07058253139257431, -0.031021568924188614, 0.0022884374484419823, -0.014869928359985352, -0.030249591916799545, -0.007581974845379591, -0.0032504256814718246, -0.059726305305957794, -0.011730040423572063, -0.010835125111043453, 0.009000774472951889, -0.014042457565665245, 0.015729987993836403, 0.006298261694610119, 0.008796713314950466, -0.033686667680740356, -0.0063869534060359, 0.018378358334302902, 0.03504941985011101, 0.049996938556432724, 0.04403459653258324, -0.012421838007867336, -0.0220438651740551, -0.02370954304933548, 0.011822070926427841, -0.017526397481560707, 0.02187369205057621, -0.027835683897137642, -0.0009886793559417129, -0.024562105536460876, -0.0773201510310173, 0.029630139470100403, 0.002112928545102477, -0.000479510665172711, 0.016872841864824295, 0.02161850593984127, 0.00636701425537467, -0.0205395370721817, 0.04691091552376747, 0.039199236780405045, -0.04754016920924187, 0.002693947870284319, -0.0018582645570859313, -0.018776502460241318, -0.017545778304338455, 0.01990012265741825, -0.05489707365632057, -0.044970229268074036, -0.01784464903175831, 0.03385912626981735, -0.06252582371234894, -0.007219510152935982, -0.018522638827562332, -0.01992795430123806, 0.014005547389388084, 0.035623349249362946, -0.002618091646581888, 0.0017634532414376736, 0.004914270248264074, -0.02506946586072445, 0.05094298720359802, -0.017390890046954155, -0.01933588832616806, 0.024981023743748665, -0.007671714760363102, 0.04147262126207352, -0.004895602818578482, 0.02894224412739277, 0.030592691153287888, -0.0078085605055093765, 0.0013971152948215604, -0.058963872492313385, 0.013840200379490852, -0.0017839712090790272, 0.048298053443431854, -0.007604797836393118, -0.007758290972560644, -0.0239048320800066, -0.004606697242707014, -0.010011006146669388, 0.006830503698438406, -0.0034996881149709225, 0.0033219268079847097, 0.008148242719471455, 0.03461463749408722, 0.003111728699877858, 0.04658031463623047, -0.0005201449384912848, -0.03386873006820679, 0.04194357991218567, -0.07459297776222229, -0.014385313726961613, -0.014457770623266697, -0.02417152002453804, 0.01795893721282482, -0.007430833764374256, 0.009517400525510311, -0.05555161461234093, 0.03557844087481499, 0.03408263623714447, 0.01629095897078514, 0.0652502253651619, 0.014952311292290688, 0.02512039616703987, -0.014731165952980518, -0.017315907403826714, -0.10055366158485413, 0.037433378398418427, 0.056321870535612106, 0.014155024662613869, -0.003964606206864119, -0.022938130423426628, -0.03293820843100548, 0.00891446229070425, -0.05987096205353737, -0.037376612424850464, 0.010362379252910614, -0.034370698034763336, 0.01721661165356636, 0.040534257888793945, -0.05438409000635147, -0.028251122683286667, 0.04710832238197327, -0.03229222074151039, -0.03144017606973648, -0.035519324243068695, 0.05524171143770218, -0.017829181626439095, 0.017551245167851448, -0.008328171446919441, -0.024910036474466324, 0.05412711948156357, 0.027629436925053596, 0.017691701650619507, 0.045674216002225876, -0.0018803331768140197, 0.014899668283760548, 0.018050774931907654, -0.005941934883594513, 0.01991126500070095, 0.023279884830117226, -0.03250470012426376, -0.04514209181070328, 0.04005764424800873, 0.001186442095786333, -0.010084394365549088, -0.047714345157146454, 0.07526515424251556, 0.0009407526231370866, -0.04846496134996414, -0.02120284177362919, 0.011272742412984371, -0.019756795838475227, -0.033001143485307693, -0.024970687925815582, 0.005046620965003967, -0.013585719279944897, 0.07917989790439606, -0.012845213524997234, 0.013082200661301613, 0.07311239838600159, -0.007383592892438173, -0.008215854875743389, -0.010595929808914661, 0.10498245060443878, 0.09525996446609497, 0.03875313326716423, -0.017531827092170715, 0.06807709485292435, -0.0003700252855196595, -0.036384522914886475, 0.017011728137731552, -0.007065432146191597, -0.0174398235976696, 0.025061406195163727, 0.009112061932682991, 0.05785828456282616, -0.049424007534980774, 0.06747148931026459, -0.02712077461183071, -0.03425361216068268, 0.01984127052128315, -0.03657812625169754, 0.03162374347448349, 0.08295519649982452, -0.007198316510766745, 0.04783346876502037, -0.03031133860349655, -0.043376170098781586, 0.03660040721297264, -0.007659019902348518, 0.010078789666295052, 0.013940870761871338, -0.03946000337600708, 0.006332956720143557, -0.005212488584220409, 0.0029962011612951756, 0.08182842284440994, -0.04556278884410858, -0.022180259227752686, 0.007384301628917456, 0.003944601397961378, -0.0040685078129172325, 0.007108533754944801, -0.020401393994688988, 0.005861088167876005, -0.005122331436723471, -0.045547015964984894, -0.023099958896636963, -0.03772932291030884, -0.045052479952573776, 0.011182053945958614, 0.0020369496196508408, -0.01752367988228798, -0.007334740832448006, -0.0063440389931201935, -0.0167545136064291, -0.05732593312859535, -0.046087220311164856, -0.07912430167198181, -0.07687719166278839, -0.03290900960564613, 0.014257688075304031, -0.0002558882988523692, -0.04244954511523247, -0.009562235325574875, -0.03678177297115326, -0.025085577741265297, 0.028570042923092842, -0.038894571363925934, -0.0003863283491227776, 0.022748375311493874, 0.05396369844675064, 0.025106454268097878, 0.0069628930650651455, 0.051432136446237564, -0.005707531236112118, 0.00011510252807056531, -0.022875536233186722, 0.022847263142466545, 0.029825448989868164, 0.015937888994812965, -0.03016771376132965, -0.09889402240514755, 0.0012593077262863517, 0.023490434512495995, -0.053880590945482254, -0.07872959971427917, 0.009567690081894398, 0.02694043703377247, 0.01804225891828537, 0.0459766648709774, -0.03984690457582474, -0.01721229776740074, -0.05112040415406227, 0.03433137387037277, 0.009400324895977974, 0.009666024707257748, 0.03997080400586128, -0.03141608089208603, 0.07169933617115021, 0.036082446575164795, -0.028353741392493248, -0.03491567075252533, -0.016451122239232063, -0.005204381421208382, 0.007062077522277832, -0.059793733060359955, -0.014104818925261497, -0.01988246664404869, -0.11009614914655685, -0.03157760575413704, 0.033353291451931, -0.01705215312540531, -0.03988160192966461, 0.018941504880785942, 0.009230646304786205, -0.009063012897968292, 0.013679207302629948, -0.04924384504556656, 0.029452770948410034, -0.021286191418766975, -0.01567501202225685, -0.0198224950581789, 0.03148973733186722, 0.007211607880890369, 0.032533057034015656, -0.014277175068855286, -0.05783737078309059, 0.010155188851058483, 0.00016794526891317219, -0.015887396410107613, 0.022266892716288567, 0.01323050819337368, -0.007592666428536177 ]
[ -0.08511469513177872, -0.009081254713237286, -0.0426599495112896, -0.015085041522979736, 0.08825716376304626, -0.012980666011571884, 0.045458853244781494, 0.01030084490776062, 0.049440909177064896, 0.006934791803359985, -0.0004453079600352794, -0.08701402693986893, 0.00015030597569420934, 0.011242196895182133, 0.025183958932757378, -0.01658744178712368, -0.02879013866186142, -0.06085137277841568, -0.033365052193403244, 0.017584484070539474, -0.014830052852630615, -0.00980307161808014, -0.029650555923581123, -0.046641506254673004, 0.017823433503508568, 0.001584522775374353, 0.04817264899611473, -0.03374128416180611, -0.0588395930826664, -0.21897651255130768, 0.00554935447871685, -0.010184602811932564, 0.008348886854946613, -0.018588311970233917, -0.029324904084205627, -0.015064901672303677, 0.020895792171359062, 0.007050879765301943, 0.0424506850540638, 0.029352257028222084, 0.0039305356331169605, 0.014737783931195736, -0.04411998391151428, -0.048127181828022, 0.045833803713321686, 0.01337105967104435, 0.01151642482727766, 0.028853002935647964, 0.054738257080316544, 0.02103051170706749, -0.03901286423206329, 0.00036916733370162547, -0.006537740584462881, -0.019778834655880928, 0.009362061507999897, 0.04574074223637581, 0.05692704766988754, 0.04123515263199806, 0.024881722405552864, 0.044768862426280975, 0.05447567254304886, 0.00970141775906086, -0.1203109547495842, 0.06606400012969971, 0.004138934891670942, 0.020516740158200264, -0.015923865139484406, 0.015031691640615463, 0.013238214887678623, 0.08305814862251282, 0.0005249761743471026, -0.033511724323034286, -0.01675422303378582, 0.0358692929148674, 0.0268383901566267, -0.0033500574063509703, -0.022524364292621613, 0.012042778544127941, -0.010736622847616673, -0.01686720736324787, -0.06807912141084671, -0.003389887046068907, -0.011018567718565464, -0.026570754125714302, -0.0550389401614666, 0.003555239411070943, -0.051480527967214584, 0.03994418680667877, 0.028741393238306046, 0.02399277873337269, 0.06866496056318283, 0.04160108417272568, 0.019082309678196907, 0.02292959950864315, -0.10565637052059174, -0.03810535743832588, -0.026087885722517967, 0.01092146709561348, -0.006660148501396179, 0.4413538873195648, 0.004834800958633423, -0.008706714026629925, 0.04069221764802933, 0.02796662412583828, 0.02747802808880806, -0.010822794400155544, 0.038259632885456085, -0.06818576902151108, -0.0029164007864892483, -0.008387609384953976, 0.003137509571388364, -0.01914816163480282, 0.058073852211236954, -0.02473166026175022, 0.009590297006070614, 0.050072092562913895, 0.041801463812589645, 0.019364994019269943, -0.01081729307770729, 0.01629512757062912, -0.02151278592646122, -0.013163574039936066, -0.027316192165017128, 0.014586620032787323, 0.010741876438260078, 0.022854557260870934, -0.010051002725958824, 0.06174859404563904, 0.03674548864364624, 0.004982926417142153, 0.02519982121884823, -0.04439105466008186, -0.07242247462272644, 0.021131090819835663, -0.003512568539008498, 0.00380193954333663, 0.030674735084176064, -0.03772420063614845, 0.010829979553818703, 0.017641624435782433, -0.007767146453261375, -0.07069612294435501, 0.06002044305205345, -0.006104293745011091, -0.03220590576529503, 0.09167478233575821, -0.005028848070651293, -0.059168778359889984, 0.002358481287956238, -0.05316799879074097, 0.0057742721401154995, 0.0043538352474570274, -0.0003192197473254055, -0.06499303877353668, -0.060159873217344284, 0.014625485986471176, 0.06542833894491196, -0.02869921550154686, -0.05511251464486122, -0.010236906819045544, -0.037567418068647385, -0.02872413955628872, -0.050071485340595245, 0.05911649391055107, 0.039059899747371674, -0.11674752086400986, -0.00384154194034636, -0.01990503817796707, -0.006079932674765587, -0.05350572243332863, -0.003409972181543708, -0.0038877951446920633, -0.04406695067882538, -0.0010605660500004888, 0.010088607668876648, 0.02626531757414341, -0.039824750274419785, -0.0397031307220459, 0.08644268661737442, -0.0015239473432302475, -0.004644435830414295, -0.0033188636880367994, -0.06889631599187851, -0.00007309234933927655, -0.05891910567879677, -0.03475971519947052, -0.06869831681251526, 0.010986240580677986, 0.011013362556695938, 0.01305586751550436, -0.05634947493672371, -0.05153856799006462, -0.059840209782123566, 0.06065239757299423, -0.026318710297346115, 0.005011836998164654, -0.025930553674697876, -0.0231244508177042, -0.016214614734053612, -0.025865396484732628, -0.02441558614373207, 0.015526832081377506, -0.004211184568703175, 0.014210431836545467, -0.028641821816563606, 0.044592421501874924, 0.03471701592206955, -0.03205113485455513, 0.06493192166090012, 0.007990919053554535, -0.04163740947842598, -0.023036519065499306, -0.05931560695171356, -0.013557939790189266, 0.0005128289922140539, -0.007476354483515024, -0.005435511004179716, 0.013956230133771896, 0.017729293555021286, 0.04482288286089897, -0.027865193784236908, 0.006791649851948023, -0.000798287452198565, -0.32252559065818787, -0.035412706434726715, -0.05322957783937454, -0.006011164281517267, 0.06669609993696213, -0.020123377442359924, 0.0006358319078572094, -0.034709155559539795, 0.03488641604781151, 0.01970156468451023, 0.06509438157081604, 0.010558714158833027, -0.02642422541975975, -0.07653521001338959, -0.018361540511250496, 0.027205195277929306, -0.03648148849606514, -0.0009872574592009187, -0.03624679520726204, 0.05530241131782532, 0.05751720443367958, -0.0023314529098570347, -0.023660529404878616, -0.006710142362862825, 0.0014635628322139382, -0.0588211789727211, 0.13780201971530914, 0.03550151363015175, 0.04332588613033295, -0.049901291728019714, 0.01343674398958683, -0.0036131427623331547, -0.0014273320557549596, -0.03298785537481308, 0.023211179301142693, -0.006288682576268911, -0.004347094334661961, -0.025321517139673233, 0.031812720000743866, -0.06213244050741196, -0.05460375174880028, -0.00542732048779726, -0.02457342855632305, -0.07132929563522339, -0.04830893501639366, 0.054282356053590775, -0.0078056687489151955, -0.03862854465842247, -0.01946568489074707, 0.08694583922624588, 0.029614092782139778, 0.021877076476812363, 0.07505813986063004, -0.019392531365156174, 0.03490430861711502, -0.039560966193675995, -0.0762418806552887, 0.011315501295030117, -0.01574239321053028, 0.012566950172185898, 0.02773839607834816, 0.0177225973457098, 0.053701043128967285, -0.09213647991418839, 0.008417122066020966, 0.027876848354935646, 0.02128203772008419, -0.0034113863948732615, 0.03486272320151329, -0.0022724394220858812, -0.0228678360581398, 0.04993249475955963, 0.028594544157385826, 0.02394183538854122, 0.02362944930791855, 0.0614461749792099, 0.02483675815165043, 0.008668874390423298, 0.00016698201943654567, 0.013474266044795513, 0.0655398815870285, -0.05979667231440544, 0.05092565715312958, -0.03798898309469223, 0.024121209979057312, 0.03395882993936539, 0.01892838068306446, -0.01659303717315197, 0.08041968196630478, 0.016371700912714005, -0.012022244744002819, 0.01367769856005907, -0.04293140023946762, -0.013149760663509369, 0.030219290405511856, -0.031858477741479874, -0.24926544725894928, 0.022319989278912544, 0.07508903741836548, 0.08046463876962662, 0.01813337951898575, 0.010266569443047047, 0.04650263115763664, -0.02876245602965355, -0.009547300636768341, 0.004925347398966551, 0.03840148448944092, 0.013980102725327015, -0.03188009932637215, 0.007758242543786764, -0.037482500076293945, -0.03305567428469658, 0.032060179859399796, -0.018486948683857918, 0.040896039456129074, 0.04267645254731178, 0.0491485670208931, -0.016874343156814575, 0.178153857588768, 0.016859930008649826, 0.06351585686206818, 0.0719507709145546, -0.009766812436282635, -0.04178006574511528, 0.004545277915894985, -0.006863314658403397, 0.002524371724575758, -0.005855423863977194, 0.0347631573677063, 0.05701419711112976, 0.002133284928277135, -0.03380304574966431, -0.023735113441944122, 0.07260677218437195, -0.019938671961426735, -0.05619039759039879, -0.02201940305531025, 0.020620770752429962, -0.0507998988032341, 0.023938773199915886, 0.06916116178035736, 0.05454711616039276, -0.00600774958729744, -0.009990567341446877, -0.03818710148334503, 0.011176103726029396, -0.028632517904043198, -0.041828278452157974, -0.014934283681213856, -0.025985263288021088, 0.01243006344884634, 0.06577826291322708, 0.0410468727350235, -0.01790924184024334, 0.01870587281882763, 0.026645489037036896, -0.001139718689955771, 0.004328007344156504, 0.0814964771270752, -0.022431418299674988, 0.019483109936118126 ]
[ 0.033834490925073624, 0.05783022940158844, 0.04015817120671272, -0.01264649536460638, 0.0361650288105011, 0.014847195707261562, 0.0011361700017005205, 0.02777537889778614, 0.018847642466425896, -0.004352033603936434, -0.0033048344776034355, 0.0008394530159421265, 0.018275754526257515, 0.03253772854804993, 0.016386860981583595, -0.015221033245325089, -0.015654785558581352, -0.004282706882804632, 0.034592580050230026, -0.015018122270703316, -0.012941132299602032, 0.020172439515590668, 0.02772313542664051, -0.051316432654857635, -0.037695806473493576, 0.05213988199830055, -0.029236454516649246, 0.02538713440299034, 0.015192259103059769, -0.15441688895225525, -0.05329155921936035, -0.04282672703266144, -0.010997051373124123, 0.014832422137260437, -0.054895732551813126, -0.03526773676276207, 0.003780296305194497, 0.034343171864748, 0.021220307797193527, 0.02818743884563446, -0.011151942424476147, -0.009878058917820454, 0.0023762467317283154, 0.018143918365240097, 0.0011609940556809306, 0.008377445861697197, -0.030744655057787895, 0.019129600375890732, 0.020982973277568817, -0.030421586707234383, -0.055970340967178345, -0.038691021502017975, 0.0061257765628397465, 0.026567840948700905, 0.07208520174026489, -0.0014762753853574395, -0.03138645738363266, -0.021664876490831375, 0.015924988314509392, -0.049973614513874054, 0.022194139659404755, 0.00020901676907669753, -0.04865987226366997, -0.02187185548245907, 0.00022290676133707166, -0.043972425162792206, 0.02122541330754757, 0.0024036867544054985, 0.02602849341928959, 0.010688764974474907, -0.04071952402591705, 0.023387936875224113, -0.059374790638685226, -0.013290894217789173, -0.021952752023935318, 0.051908135414123535, -0.0070565189234912395, -0.00003092557381023653, -0.018441813066601753, -0.044933900237083435, 0.01758302003145218, -0.008759505115449429, 0.005975746549665928, 0.013303779996931553, -0.011683045886456966, -0.02475917711853981, -0.0118055185303092, -0.012951331213116646, 0.024190915748476982, 0.0029307783115655184, -0.018276944756507874, 0.03024516999721527, 0.008974280208349228, -0.011131742969155312, -0.07944279909133911, 0.0022156736813485622, -0.023201582953333855, -0.023730037733912468, 0.015282023698091507, 0.7869836091995239, 0.022607753053307533, -0.008559574373066425, -0.039879027754068375, 0.006568125449120998, 0.0508853979408741, 0.02490709163248539, -0.012137307785451412, 0.007833410054445267, 0.006538224872201681, -0.024168184027075768, -0.013384182937443256, 0.055778879672288895, -0.015493002720177174, -0.0005549932247959077, -0.0012047518976032734, 0.052892085164785385, 0.01760122925043106, -0.008161880075931549, -0.004887009039521217, 0.021213538944721222, 0.015733029693365097, -0.0008410700247623026, -0.044252701103687286, -0.013802033849060535, 0.011115623638033867, -0.1484290361404419, 0.003576495684683323, -7.230182898579724e-33, 0.04822288826107979, 0.004971178248524666, 0.014860901050269604, -0.018665436655282974, -0.050076909363269806, 0.013018371537327766, 0.0027503659948706627, -0.013881251215934753, -0.02643446810543537, -0.029545199126005173, -0.0312370415776968, -0.038755062967538834, -0.009661494754254818, -0.006795933004468679, 0.0090981749817729, -0.0021748081780970097, 0.01808500848710537, 0.02792920544743538, -0.017538512125611305, -0.026042314246296883, -0.022654401138424873, 0.026238102465867996, 0.010855056345462799, -0.014875906519591808, 0.009314733557403088, 0.046261344105005264, -0.03524529188871384, -0.021691611036658287, 0.00883735902607441, -0.061935875564813614, -0.014195664785802364, 0.005311363376677036, -0.02304883673787117, 0.04490386322140694, -0.0006098789745010436, -0.03395238518714905, -0.02719872258603573, -0.021087920293211937, -0.0243212953209877, -0.03231849893927574, -0.041586242616176605, 0.014829123392701149, -0.031021639704704285, -0.037804994732141495, -0.016314875334501266, -0.012288385070860386, -0.07822103798389435, -0.015892263501882553, -0.015431446954607964, -0.0007767293136566877, 0.03428158909082413, 0.01948562264442444, -0.01377060730010271, 0.0056847380474209785, -0.03860875591635704, 0.016340885311365128, 0.020965557545423508, 0.018885059282183647, -0.032315440475940704, 0.012760681100189686, 0.07812872529029846, 0.024477198719978333, -0.03884825482964516, 0.05249021574854851, -0.01598450541496277, 0.031954240053892136, -0.014694390818476677, 0.0010889519471675158, 0.006180332973599434, 0.03130315616726875, -0.06443016976118088, 0.10028286278247833, -0.002572589321061969, -0.02885615825653076, 0.010445524007081985, -0.033492423593997955, -0.015142678283154964, -0.06707540154457092, -0.02924201264977455, 0.05800645425915718, -0.018029017373919487, -0.016027377918362617, -0.010328670032322407, -0.01688828133046627, -0.020841749384999275, -0.015034256502985954, 0.054353419691324234, 0.01426062174141407, 0.016201801598072052, 0.027816910296678543, 0.009640096686780453, 0.04005088284611702, -0.020261289551854134, 0.025345897302031517, -0.011342537589371204, 6.740505012805776e-33, -0.013051299378275871, 0.006394579540938139, 0.002808832796290517, -0.002368008252233267, 0.036824870854616165, -0.005635143723338842, 0.008190659806132317, 0.0363025888800621, -0.03874091058969498, 0.02157285064458847, -0.005608562380075455, 0.0068078977055847645, -0.008356043137609959, 0.019994381815195084, 0.07183121889829636, -0.01814671792089939, -0.002572853583842516, -0.012843133881688118, -0.02669161930680275, 0.013410515151917934, -0.0037828527856618166, 0.012698836624622345, 0.03834589198231697, 0.03278312832117081, -0.030458727851510048, 0.02814236469566822, 0.024007946252822876, 0.0006434664246626198, -0.024028843268752098, 0.02571438066661358, 0.010297395288944244, -0.049569010734558105, 0.018891463056206703, -0.007107207085937262, 0.02719699963927269, 0.015899265184998512, -0.023611992597579956, -0.0010361740132793784, 0.027069563046097755, 0.007947108708322048, 0.017051443457603455, 0.015888702124357224, -0.050465453416109085, 0.05430740863084793, -0.0030824097339063883, -0.006635246332734823, -0.009317767806351185, -0.02805895172059536, 0.023941416293382645, 0.024036966264247894, 0.03527616709470749, 0.0008699350291863084, -0.024310801178216934, 0.02549583464860916, 0.009192241355776787, -0.02482440695166588, 0.010140379890799522, 0.03473256155848503, 0.04199839010834694, 0.01990646868944168, -0.04160032793879509, 0.00458766333758831, -0.07815465331077576, -0.0003851040673907846, 0.02515137381851673, 0.02822526916861534, -0.036116939038038254, -0.02115263231098652, -0.0031527304090559483, 0.04049874097108841, 0.005644149146974087, 0.01470907311886549, -0.020569799467921257, 0.04148991405963898, 0.00973287783563137, -0.003523102728649974, -0.019182579591870308, 0.041530709713697433, -0.03316038101911545, 0.05413474515080452, 0.02437737211585045, -0.0044100321829319, 0.0478241927921772, 0.04593747854232788, 0.004787798039615154, -0.004652270581573248, -0.031381070613861084, 0.005137837026268244, 0.013318306766450405, -0.010729838162660599, 0.05856560543179512, -0.03692471608519554, 0.004214366432279348, 0.012293783016502857, 0.030660560354590416, -1.2541112148767297e-8, -0.06433968991041183, -0.013563819229602814, -0.017928050830960274, 0.050954412668943405, -0.0018732007592916489, 0.04108525067567825, 0.019368793815374374, -0.04833485931158066, 0.012210465036332607, 0.01316128671169281, 0.03883698210120201, 0.0031729424372315407, 0.054106634110212326, -0.00974531751126051, 0.031055180355906487, -0.027226967737078667, -0.03632095828652382, -0.013216719962656498, 0.04082968831062317, 0.053467124700546265, -0.02907129004597664, 0.006930199451744556, -0.0383620411157608, 0.0062139444053173065, -0.01602078787982464, -0.049538370221853256, 0.023433998227119446, -0.07782109081745148, -0.026632511988282204, -0.029819970950484276, 0.03508182242512703, -0.022036509588360786, 0.023278366774320602, 0.03982137516140938, -0.027309313416481018, -0.0015010896604508162, 0.014989407733082771, -0.016665777191519737, -0.004674162715673447, 0.03765331581234932, -0.05510345473885536, -0.017237234860658646, -0.06639879196882248, -0.05522754788398743, 0.0325794517993927, -0.04339880868792534, -0.01578984595835209, -0.0438176654279232, -0.011149912141263485, -0.033984653651714325, 0.009557654149830341, -0.00452065747231245, 0.05224212259054184, 0.030445273965597153, 0.06525234133005142, -0.0153002655133605, 0.01947839930653572, -0.0013138597132638097, -0.01109366212040186, -0.016916541382670403, 0.04388315603137016, 0.004206264391541481, -0.0050482419319450855, -0.019106121733784676 ]
neo4j-the-foul-revenge-graph
https://markhneedham.com/blog/2015/05/26/neo4j-the-foul-revenge-graph
false
2015-05-21 06:14:32
Python: UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 11: ordinal not in range(128)
[ "python" ]
[ "Python" ]
I've been trying to write some Python code to extract the players and the team they represented in the Bayern Munich/Barcelona match into a CSV file and had much more difficulty than I expected. I have some scraping code (which is beyond the scope of this article) which gives me a list of (player, team) pairs that I want to write to disk. The contents of the list is as follows: [source,python] ---- $ python extract_players.py (u'Sergio Busquets', u'Barcelona') (u'Javier Mascherano', u'Barcelona') (u'Jordi Alba', u'Barcelona') (u'Bastian Schweinsteiger', u'FC Bayern M\xfcnchen') (u'Dani Alves', u'Barcelona') ---- I started with the following script: [source,python] ---- with open("data/players.csv", "w") as file: writer = csv.writer(file, delimiter=",") writer.writerow(["player", "team"]) for player, team in players: print player, team, type(player), type(team) writer.writerow([player, team]) ---- And if I run that I'll see this error: [source,bash] ---- $ python extract_players.py ... Bastian Schweinsteiger FC Bayern München <type 'unicode'> <type 'unicode'> Traceback (most recent call last): File "extract_players.py", line 67, in <module> writer.writerow([player, team]) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 11: ordinal not in range(128) ---- So it looks like the 'ü' in 'FC Bayern München' is causing us issues. Let's try and encode the teams to avoid this: [source,python] ---- with open("data/players.csv", "w") as file: writer = csv.writer(file, delimiter=",") writer.writerow(["player", "team"]) for player, team in players: print player, team, type(player), type(team) writer.writerow([player, team.encode("utf-8")]) ---- [source,bash] ---- $ python extract_players.py ... Thomas Müller FC Bayern München <type 'unicode'> <type 'unicode'> Traceback (most recent call last): File "extract_players.py", line 70, in <module> writer.writerow([player, team.encode("utf-8")]) UnicodeEncodeError: 'ascii' codec can't encode character u'\xfc' in position 8: ordinal not in range(128) ---- Now we've got the same issue with the 'ü' in Müller so let's encode the players too: [source,python] ---- with open("data/players.csv", "w") as file: writer = csv.writer(file, delimiter=",") writer.writerow(["player", "team"]) for player, team in players: print player, team, type(player), type(team) writer.writerow([player.encode("utf-8"), team.encode("utf-8")]) ---- [source,bash] ---- $ python extract_players.py ... Gerard Piqué Barcelona <type 'str'> <type 'unicode'> Traceback (most recent call last): File "extract_players.py", line 70, in <module> writer.writerow([player.encode("utf-8"), team.encode("utf-8")]) UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 11: ordinal not in range(128) ---- Now we've got a problem with Gerard Piqué because that value has type string rather than unicode. Let's fix that: [source,python] ---- with open("data/players.csv", "w") as file: writer = csv.writer(file, delimiter=",") writer.writerow(["player", "team"]) for player, team in players: if isinstance(player, str): player = unicode(player, "utf-8") print player, team, type(player), type(team) writer.writerow([player.encode("utf-8"), team.encode("utf-8")]) ---- Et voila! All the players are now successfully written to the file. An alternative approach is to http://stackoverflow.com/questions/21129020/how-to-fix-unicodedecodeerror-ascii-codec-cant-decode-byte[change the default encoding of the whole script] to be 'UTF-8', like so: [source,python] ---- # encoding=utf8 import sys reload(sys) sys.setdefaultencoding('utf8') with open("data/players.csv", "w") as file: writer = csv.writer(file, delimiter=",") writer.writerow(["player", "team"]) for player, team in players: print player, team, type(player), type(team) writer.writerow([player, team]) ---- It took me a while to figure it out but finally the players are ready to go!
null
null
[ -0.02120371349155903, -0.0065764449536800385, -0.01770740933716297, 0.01597278192639351, 0.06505737453699112, -0.024356286972761154, -0.02457399293780327, 0.05268595367670059, 0.022233419120311737, -0.029808469116687775, -0.03710980713367462, -0.013464418239891529, -0.07857301831245422, -0.003668083343654871, 0.0164999607950449, 0.0688432976603508, 0.04763014614582062, 0.0348910391330719, 0.01028723269701004, -0.0303193312138319, 0.01073595229536295, 0.06794001162052155, -0.025349987670779228, 0.03358142822980881, 0.011166034266352654, 0.011351680383086205, 0.003214021911844611, 0.0018609536346048117, -0.045669879764318466, -0.014437442645430565, 0.03691454976797104, -0.022434847429394722, 0.011230275966227055, -0.05123476684093475, 0.018628811463713646, -0.033770766109228134, -0.013376368209719658, 0.047830384224653244, -0.013534796424210072, 0.00999859906733036, -0.03098868764936924, 0.02348528429865837, -0.041998617351055145, 0.015515620820224285, -0.04471426084637642, 0.023615729063749313, -0.026608409360051155, 0.02475092187523842, -0.014674592763185501, -0.02145758457481861, -0.04186801612377167, 0.020022612065076828, -0.018219372257590294, -0.03980381414294243, 0.01551789790391922, 0.06934528052806854, -0.01354795042425394, -0.07573176920413971, 0.008516857400536537, -0.03340933844447136, 0.0008719827746972442, -0.002657516859471798, -0.0024838377721607685, 0.015888648107647896, 0.0234970860183239, -0.040779292583465576, 0.0010429947869852185, 0.042927276343107224, -0.04101572930812836, -0.05133644491434097, 0.007196469698101282, -0.013415333814918995, -0.049573250114917755, -0.016487160697579384, 0.018432583659887314, -0.05781121924519539, 0.014710242860019207, 0.06751617044210434, 0.011831565760076046, 0.0786399319767952, -0.00003422429654165171, 0.02591242641210556, 0.017490072175860405, 0.006915304344147444, 0.005356257781386375, -0.03288768604397774, -0.03081521764397621, -0.023154834285378456, -0.02784666419029236, 0.040832702070474625, 0.01001495961099863, -0.07304580509662628, 0.010005732998251915, 0.011401956900954247, -0.03184642270207405, -0.02342936582863331, -0.0038338107988238335, 0.04883337393403053, -0.01596246100962162, -0.004887705203145742, -0.06051217392086983, -0.03007456287741661, 0.031728778034448624, 0.02363532781600952, -0.053690213710069656, 0.0072581032291054726, 0.004113463684916496, 0.010882879607379436, 0.012372569181025028, 0.0029329436365514994, 0.011181536130607128, -0.029566936194896698, -0.023777108639478683, -0.029253950342535973, -0.08689569681882858, 0.038723431527614594, 0.03630845248699188, -0.0390983484685421, -0.02047548070549965, 0.05179072916507721, 0.05584457889199257, 0.029604250565171242, -0.004360619466751814, 0.08193894475698471, 0.022027544677257538, 0.007035388611257076, 0.01957198604941368, 0.08158421516418457, -0.015608296729624271, -0.0736125260591507, -0.01369264256209135, 0.08241002261638641, -0.028236396610736847, 0.015330031514167786, 0.011907224543392658, -0.03241962939500809, -0.04107949510216713, -0.01754935085773468, 0.04188337177038193, 0.014743487350642681, -0.014824070036411285, 0.008903342299163342, -0.027560925111174583, 0.034893948584795, 0.008704760111868382, -0.0016322567826136947, -0.018246369436383247, -0.02342907153069973, 0.017413116991519928, 0.00312169105745852, 0.024765439331531525, -0.018974917009472847, 0.08952813595533371, 0.0038761526811867952, -0.02342945896089077, 0.09233760833740234, 0.04429031163454056, 0.037833742797374725, -0.05154410004615784, 0.016092702746391296, 0.02488422766327858, 0.04180585965514183, -0.010460052639245987, 0.03145487606525421, -0.02508685551583767, -0.027944518253207207, 0.003736484097316861, 0.04906552657485008, -0.02504732459783554, 0.038399212062358856, -0.03484201803803444, -0.04920245334506035, 0.06786061078310013, -0.03254317119717598, -0.005078565329313278, 0.017046477645635605, 0.04571881145238876, 0.04498487710952759, 0.08860078454017639, 0.0026250111404806376, -0.070095494389534, 0.03193215653300285, -0.018302489072084427, 0.04291394725441933, 0.0345163568854332, -0.003921303432434797, 0.11689000576734543, 0.03894268348813057, -0.02101454697549343, 0.052104391157627106, -0.06804703921079636, -0.06418699026107788, -0.056342169642448425, -0.0011959639377892017, 0.04583579674363136, -0.07135415822267532, -0.00865007471293211, 0.056315649300813675, 0.0409201942384243, 0.015809856355190277, -0.016267385333776474, 0.004716967698186636, 0.034200187772512436, -0.020767811685800552, -0.05256162956357002, 0.03676574304699898, 0.05702497810125351, -0.03105323761701584, -0.018780341371893883, 0.055200543254613876, -0.02096809633076191, 0.03589572384953499, 0.04149836301803589, -0.0205994863063097, 0.01025936659425497, -0.0006964494823478162, 0.044096942991018295, -0.01236808579415083, 0.05184861272573471, -0.09151537716388702, 0.027556786313652992, 0.023341389372944832, -0.010060439817607403, -0.020478352904319763, 0.018188776448369026, 0.13878759741783142, 0.04039813578128815, -0.025359468534588814, -0.058795616030693054, -0.011024275794625282, -0.026312921196222305, -0.038678184151649475, -0.002286025555804372, -0.011331371031701565, -0.0504281148314476, 0.010335752740502357, -0.03542761504650116, -0.023827409371733665, -0.0023603057488799095, -0.020372387021780014, 0.0018715353216975927, 0.06939392536878586, 0.006964168976992369, 0.020638246089220047, -0.013211822137236595, -0.017470603808760643, -0.007020179647952318, -0.028706233948469162, -0.02004011534154415, -0.002669938374310732, 0.02867416851222515, -0.009387144818902016, 0.00041365690412931144, -0.031089449301362038, -0.06707946211099625, -0.023535776883363724, -0.043370429426431656, 0.011079799383878708, 0.06883460283279419, 0.02672507055103779, -0.024853046983480453, 0.024837195873260498, -0.01813100092113018, 0.012010874226689339, -0.024489302188158035, -0.034783072769641876, -0.06245194375514984, -0.044480159878730774, -0.0010618534870445728, 0.003931306302547455, -0.006451617926359177, 0.0466584786772728, -0.018431993201375008, 0.01308902632445097, -0.011519499123096466, 0.04251402989029884, 0.022298380732536316, -0.0376100093126297, 0.004261062014847994, -0.035789597779512405, 0.00519203906878829, 0.02140350081026554, -0.04548485577106476, -0.03830873966217041, -0.009546694345772266, -0.07308189570903778, 0.016322173178195953, -0.044128771871328354, -0.041776228696107864, -0.016784977167844772, -0.010695205070078373, 0.023378506302833557, -0.004104369319975376, -0.009771614335477352, -0.0004556179919745773, -0.0012495073024183512, 0.021284759044647217, 0.03674466907978058, 0.03646494448184967, 0.025218047201633453, 0.004198260605335236, 0.04299348220229149, 0.053034715354442596, -0.04224206507205963, -0.00977795384824276, -0.06101363152265549, 0.003714099060744047, -0.040984995663166046, -0.254487544298172, 0.04420099034905434, -0.020244315266609192, -0.014403857290744781, 0.050672389566898346, -0.018242262303829193, -0.02650562860071659, -0.034592267125844955, -0.021154213696718216, 0.004589044954627752, -0.04703748598694801, -0.006981626618653536, -0.023499639704823494, 0.03632262349128723, 0.03627992793917656, 0.049812667071819305, -0.02142542228102684, -0.011586067266762257, -0.002061316976323724, 0.05160828307271004, 0.013191675767302513, -0.0511666014790535, -0.0299928467720747, 0.04858596995472908, 0.027074549347162247, 0.05352713167667389, -0.03369689732789993, -0.0053504882380366325, -0.07739955931901932, -0.060004882514476776, 0.019295642152428627, -0.03292584791779518, 0.013155792839825153, -0.0102208461612463, -0.021877475082874298, -0.027217797935009003, 0.030413921922445297, 0.0029068742878735065, -0.02035817876458168, 0.014535046182572842, -0.031358752399683, -0.03082878515124321, 0.0007263218867592514, -0.0346817821264267, 0.08166994154453278, 0.013280067592859268, -0.05592312663793564, -0.017010292038321495, -0.016654787585139275, 0.08330642431974411, -0.01376623660326004, -0.03158864006400108, 0.00040043244371190667, 0.05509522184729576, -0.02728847973048687, 0.03062780760228634, 0.004178452305495739, 0.013634201139211655, -0.03880457952618599, 0.0021771197207272053, 0.002299745101481676, -0.05171148478984833, -0.008303260430693626, -0.058079794049263, -0.014452111907303333, -0.03775155544281006, -0.012321782298386097, -0.021402796730399132, 0.031183894723653793, 0.06165406107902527, -0.067232646048069, 0.009567408822476864, -0.007818534970283508, -0.08102059364318848, 0.002603608649224043, -0.0059406147338449955, -0.0013142731040716171, 0.00008185720798792318, -0.014470530673861504, 0.048320941627025604, -0.03086281009018421, -0.04797189310193062, 0.0020723005291074514, -0.023456303402781487, 0.010256837122142315, -0.009114019572734833, 0.03531336784362793, -0.0034219122026115656, -0.004625063389539719, -0.030028853565454483, 0.0934172123670578, -0.023906690999865532, 0.0021203840151429176, 0.021654361858963966, -0.04603555426001549, 0.03663386404514313, 0.010014898143708706, 0.01576618105173111, -0.005044738762080669, 0.02860213816165924, 0.01622079312801361, -0.03904383257031441, -0.024975726380944252, -0.0501314140856266, 0.007485512178391218, 0.01731555350124836, -0.04558895155787468, 0.014971565455198288, 0.02612966112792492, 0.04633542522788048, 0.028575297445058823, -0.02214209735393524, 0.02380545251071453, -0.019159669056534767, -0.013395166024565697, -0.03192361444234848, 0.02924404852092266, -0.006309200543910265, 0.007036116905510426, -0.03059084713459015, -0.05784248560667038, 0.010301346890628338, 0.020452003926038742, -0.020430462434887886, -0.05351781100034714, -0.0393800288438797, 0.008134457282721996, -0.0015834836522117257, -0.008860277011990547, 0.0044801547192037106, -0.022165441885590553, 0.014513781294226646, 0.05617418512701988, -0.02039460837841034, 0.020997174084186554, -0.0009322758996859193, -0.05820455774664879, -0.035787276923656464, -0.029406830668449402, 0.002189810387790203, 0.021480681374669075, 0.010043445974588394, -0.0015974808484315872, 0.028081661090254784, 0.04430205374956131, -0.02076270803809166, 0.0261523500084877, 0.00246673496440053, -0.00885691773146391, 0.035418372601270676, 0.019937876611948013, -0.00046557196765206754, 0.02916058897972107, -0.021604876965284348, -0.04564030095934868, 0.01442443486303091, 0.026629094034433365, 0.04095061495900154, 0.008445546962320805, -0.023189295083284378, 0.06615130603313446, -0.03639565408229828, -0.010874171741306782, 0.01504904218018055, 0.0304939616471529, 0.04890025407075882, 0.03227216377854347, -0.016170548275113106, -0.009259219281375408, 0.02584432065486908, -0.013760637491941452, 0.02959168329834938, -0.04189685732126236, -0.0009848836343735456, -0.016000965610146523, -0.013938887044787407, 0.026847459375858307, 0.04827504977583885, -0.026952771469950676, 0.0040610055439174175, -0.017289936542510986, -0.02337106503546238, 0.019928809255361557, 0.016105657443404198, 0.0411251001060009, 0.05401705950498581, -0.0331413708627224, -0.0183497853577137, 0.008444010280072689, -0.016870301216840744, -0.03038758412003517, 0.008166633546352386, -0.009766912087798119, -0.0010418101446703076, -0.03331078588962555, -0.06148676201701164, 0.027515172958374023, 0.022778967395424843, -0.0028959910850971937, -0.0015000435523688793, -0.013899228535592556, -0.022418847307562828, -0.023400750011205673, -0.0004920079372823238, 0.04429110512137413, -0.04434802383184433, -0.013471695594489574, -0.049882225692272186, 0.009568502195179462, -0.000917529861908406, 0.018191508948802948, -0.04495449736714363, -0.025155499577522278, 0.012519515119493008, 0.04142184928059578, 0.015075941570103168, 0.0027289765421301126, -0.04615380987524986, 0.01214776560664177, -0.007379419635981321, 0.020435107871890068, -0.028346925973892212, 0.023283330723643303, -0.01656646467745304, -0.025974737480282784, 0.010510138235986233, 0.027272135019302368, -0.015448879450559616, 0.013617856428027153, 0.008700666949152946, 0.06199962645769119, -0.02450362592935562, 0.04053695872426033, 0.016835365444421768, 0.010860216803848743, -0.00046467449283227324, -0.015715759247541428, -0.002929141977801919, 0.0313110388815403, 0.04559474438428879, 0.01181907206773758, -0.00286033540032804, -0.002005551941692829, 0.009939359501004219, 0.008684135042130947, 0.014495995827019215, -0.018372291699051857, -0.025743702426552773, -0.002108065877109766, 0.07031536847352982, 0.009159442968666553, 0.04537317529320717, 0.022953027859330177, -0.06118738278746605, 0.0596051961183548, -0.023477202281355858, -0.04453534632921219, -0.0008278616587631404, -0.033304668962955475, 0.03616350516676903, 0.022194214165210724, 0.0171965379267931, -0.06716708093881607, 0.05467216297984123, 0.0270245224237442, 0.011766799725592136, 0.04469079151749611, 0.019256766885519028, 0.018918128684163094, -0.027787262573838234, -0.002155871596187353, -0.08266764879226685, 0.02116747759282589, 0.05909626558423042, -0.011246321722865105, 0.0006078584701754153, 0.0006241060327738523, -0.03689795732498169, 0.02518274635076523, -0.0731913298368454, -0.04318862035870552, 0.040376801043748856, -0.009268741123378277, 0.013795645907521248, 0.010492023080587387, -0.034517012536525726, 0.0021551684476435184, 0.0629744753241539, -0.06869219988584518, 0.010903182439506054, -0.035353269428014755, 0.0733674168586731, -0.018391085788607597, 0.034962717443704605, -0.006639500614255667, -0.0525607094168663, 0.04611797258257866, 0.00801490806043148, 0.02973228506743908, 0.00573559058830142, -0.021327510476112366, 0.023058757185935974, 0.01553684938699007, -0.027272485196590424, 0.03456370159983635, 0.027077771723270416, -0.013142832554876804, -0.0647292509675026, -0.005666240118443966, 0.0029701227322220802, -0.014452497474849224, -0.030889486894011497, 0.0668114498257637, -0.01588275283575058, -0.04702962934970856, -0.028986480087041855, 0.016638392582535744, -0.04501700773835182, -0.02601364627480507, -0.005606095306575298, 0.00466167414560914, -0.032838497310876846, 0.06334761530160904, 0.002856962848454714, -0.008078182116150856, 0.07222148776054382, -0.030231118202209473, -0.0298763494938612, 0.0016339677385985851, 0.07739029824733734, 0.07402460277080536, 0.01574968919157982, -0.0027193899732083082, 0.04773467034101486, -0.008853210136294365, -0.06019492447376251, 0.006432369351387024, -0.015298952348530293, 0.03946169465780258, -0.00029072960023768246, -0.00913167279213667, 0.04571592062711716, -0.018686406314373016, 0.06114531308412552, 0.009826110675930977, -0.01600518636405468, -0.003811912378296256, 0.023128634318709373, 0.0071121761575341225, 0.03397249057888985, 0.010426086373627186, 0.033799268305301666, -0.014131421223282814, -0.015174034982919693, 0.02438393421471119, 0.00411035493016243, -0.03255743905901909, 0.032907821238040924, -0.03369034454226494, 0.009363039396703243, -0.00938093475997448, 0.061465922743082047, 0.08158610016107559, -0.04179617762565613, -0.025789910927414894, -0.020446522161364555, 0.021138858050107956, -0.024060113355517387, 0.016982795670628548, -0.012067955918610096, 0.008208085782825947, -0.020332638174295425, -0.06276429444551468, -0.024202454835176468, -0.039501164108514786, -0.03821595758199692, 0.030416391789913177, 0.004340819548815489, 0.002249079057946801, 0.006197391543537378, 0.010818715207278728, -0.0530487522482872, -0.028146227821707726, -0.048237431794404984, -0.060226209461688995, -0.06472226977348328, -0.039210956543684006, 0.041125450283288956, -0.004316638223826885, -0.05678819864988327, -0.033550191670656204, -0.03112059086561203, -0.005868350621312857, -0.003855550428852439, -0.012690965086221695, -0.004666380118578672, 0.021996932104229927, 0.036929331719875336, 0.02197871170938015, 0.004118363838642836, 0.06385950744152069, -0.02999906614422798, -0.001435014302842319, -0.006505943834781647, -0.0019954657182097435, 0.03633825108408928, 0.013740967027842999, 0.017940320074558258, -0.09201513975858688, 0.007847212255001068, 0.038084473460912704, -0.007033511530607939, -0.07254713028669357, 0.0626528337597847, 0.03763900324702263, 0.005445004906505346, 0.03471479192376137, -0.04185705631971359, 0.027354123070836067, -0.056615933775901794, -0.016795499250292778, -0.03555842861533165, 0.014892789535224438, 0.05129952356219292, -0.00999672431498766, 0.09661047160625458, 0.05134008079767227, 0.011820015497505665, -0.06144966557621956, -0.021086979657411575, -0.015745988115668297, 0.02036922797560692, -0.038698405027389526, -0.004784928634762764, -0.062026336789131165, -0.06075381860136986, 0.00837062206119299, 0.015846265479922295, -0.04377727955579758, -0.03562716767191887, 0.02118593081831932, 0.01160107646137476, -0.015002875588834286, 0.017495593056082726, -0.03737208619713783, -0.005772152449935675, -0.02879832312464714, -0.022854061797261238, -0.04797469824552536, 0.05534069612622261, 0.02416287548840046, 0.002179480390623212, -0.006730050779879093, -0.030868010595440865, 0.03713490068912506, 0.025337213650345802, -0.02332749031484127, 0.030949488282203674, -0.033007580786943436, 0.06625228375196457 ]
[ -0.06449156999588013, 0.0035416267346590757, -0.028464827686548233, -0.053709402680397034, 0.08921372145414352, -0.048972237855196, 0.002162096556276083, 0.014154867269098759, 0.04311119019985199, -0.0019538358319550753, 0.012113065458834171, -0.09676293283700943, -0.01217583566904068, -0.03937395289540291, 0.030298031866550446, -0.026346858590841293, -0.041008058935403824, -0.05388229712843895, -0.043106067925691605, 0.036281947046518326, -0.018698612228035927, -0.014133335091173649, -0.02918018028140068, -0.05119379609823227, -0.010022799484431744, 0.018464768305420876, 0.042376674711704254, -0.026141690090298653, -0.03200490027666092, -0.22411198914051056, -0.00031907044467516243, -0.0024715617764741182, 0.0045701595954597, -0.0028735583182424307, 0.04286760836839676, 0.004817274399101734, 0.004881944507360458, -0.010803365148603916, 0.024261238053441048, 0.037885893136262894, 0.017510375007987022, 0.003852234221994877, -0.06410354375839233, -0.0457783006131649, 0.05132405459880829, 0.011763347312808037, -0.020939309149980545, -0.017281195148825645, 0.020544376224279404, 0.0476534403860569, -0.05337604507803917, 0.04430082440376282, -0.013261552900075912, -0.030994659289717674, -0.023092327639460564, 0.05194731056690216, 0.056116361171007156, 0.05809168517589569, -0.003443693043664098, 0.06200603395700455, 0.01615990325808525, 0.004069434944540262, -0.16068075597286224, 0.09177040308713913, 0.002325746463611722, 0.034596264362335205, -0.041920069605112076, 0.007773564662784338, -0.009559526108205318, 0.06329664587974548, -0.027651933953166008, -0.06129574403166771, -0.022370899096131325, 0.07524825632572174, 0.026353221386671066, -0.03468582034111023, -0.021833788603544235, -0.0076903351582586765, 0.020523756742477417, 0.002806067932397127, -0.055857621133327484, -0.015066699124872684, -0.021878842264413834, -0.03235919028520584, -0.0355471707880497, 0.01877046376466751, -0.030266569927334785, 0.05360255017876625, 0.008423272520303726, 0.0008385189576074481, 0.028206512331962585, 0.00145518418867141, 0.023716382682323456, 0.033333294093608856, -0.10073187947273254, -0.03770492598414421, 0.010705774649977684, 0.003496642457321286, -0.014867744408547878, 0.428345650434494, -0.02295130118727684, -0.023410696536302567, 0.04259641095995903, 0.0338064581155777, 0.03517182916402817, -0.0013209340395405889, 0.006850454956293106, -0.03427102044224739, -0.009870179928839207, -0.0324183888733387, -0.023698294535279274, -0.007834866642951965, 0.038068585097789764, -0.023720979690551758, 0.018984591588377953, 0.04931508004665375, -0.0029085734859108925, 0.00914965383708477, -0.029051683843135834, 0.02821931056678295, -0.0134294917806983, -0.010087783448398113, -0.020085204392671585, 0.016371065750718117, -0.025169262662529945, 0.013154159300029278, 0.009156527929008007, 0.07778245955705643, 0.06539452821016312, 0.04530841112136841, 0.04064808785915375, -0.022072499617934227, -0.0749979317188263, 0.011032002978026867, -0.011553961783647537, 0.0008823976386338472, 0.007689237128943205, -0.019139038398861885, -0.0030528476927429438, 0.02873358502984047, 0.031107045710086823, -0.10109657794237137, 0.03275284543633461, 0.012922479771077633, -0.026050454005599022, 0.09186698496341705, -0.02727687731385231, -0.024999266490340233, -0.014527292922139168, -0.0574837401509285, -0.001113730832003057, 0.020230205729603767, -0.0025008786469697952, -0.0483090803027153, -0.02451053075492382, 0.02165721170604229, 0.06656667590141296, -0.05699453130364418, -0.0731075182557106, -0.02056879736483097, -0.028660092502832413, -0.07378730922937393, -0.03895268961787224, 0.05552063509821892, 0.037654146552085876, -0.09005597233772278, -0.01783112809062004, -0.010887715965509415, -0.004318081773817539, -0.08024052530527115, 0.02036481909453869, -0.016201885417103767, -0.03127333149313927, 0.030462130904197693, 0.02196602337062359, -0.007949787192046642, -0.025647955015301704, -0.017754262313246727, 0.06781614571809769, 0.008592947386205196, 0.007451146841049194, 0.028223536908626556, -0.0597587525844574, 0.006919983774423599, -0.020444778725504875, -0.0543929822742939, -0.07249821722507477, -0.010899257846176624, -0.0009099272429011762, 0.004079087637364864, -0.031170250847935677, -0.015362515114247799, -0.04088883101940155, 0.005622242111712694, -0.023821016773581505, 0.051016274839639664, 0.010689153335988522, -0.008048225194215775, -0.005609420128166676, -0.03419814258813858, -0.0007787634967826307, 0.019518235698342323, 0.004378740210086107, 0.022850826382637024, -0.023317502811551094, 0.011180682107806206, 0.04929783567786217, -0.03112966939806938, 0.05887890234589577, -0.009456482715904713, -0.02609935775399208, -0.044316366314888, -0.010111518204212189, 0.00392412394285202, -0.023397058248519897, -0.009330370463430882, -0.023056097328662872, 0.015583641827106476, 0.04549306258559227, 0.038284365087747574, -0.05004742741584778, -0.03698116913437843, -0.007001067977398634, -0.3438977599143982, 0.00855266209691763, -0.010231988504529, -0.0033226441591978073, 0.001406508614309132, -0.028369365260004997, 0.004513173829764128, -0.0207666102796793, 0.010793869383633137, 0.04483611136674881, 0.09393671154975891, -0.019685396924614906, -0.0004513232270255685, -0.05061449110507965, -0.02968200296163559, 0.02893233858048916, -0.026870667934417725, 0.010660707019269466, 0.008183039724826813, 0.06266243755817413, 0.03265749663114548, -0.004475199617445469, -0.051337555050849915, 0.0007565731066279113, 0.003349108388647437, -0.06720703840255737, 0.14176999032497406, 0.06309761852025986, 0.06144542992115021, -0.048565573990345, 0.023161662742495537, 0.029290663078427315, 0.005638211965560913, -0.09628428518772125, 0.014659878797829151, -0.010630742646753788, -0.004822028335183859, 0.002320178784430027, 0.052326835691928864, -0.04231453314423561, -0.014955906197428703, 0.016056716442108154, -0.02639491856098175, -0.01595500484108925, -0.02004975639283657, 0.04006080701947212, -0.00772877736017108, -0.041497603058815, -0.011412171646952629, 0.07094492763280869, 0.027231724932789803, 0.034502819180488586, 0.07098278403282166, 0.018849603831768036, 0.0031959502957761288, -0.027280297130346298, -0.07842901349067688, 0.005160006694495678, 0.016635680571198463, -0.010147670283913612, 0.05168531462550163, -0.01691623404622078, 0.08390534669160843, -0.05833219364285469, -0.01231409516185522, 0.005370453931391239, 0.038775380700826645, 0.0014826433034613729, 0.051443830132484436, 0.0025876248255372047, -0.011806506663560867, 0.07656526565551758, 0.013784394599497318, 0.020877620205283165, 0.013746322132647038, 0.05060862749814987, 0.02510755881667137, 0.01588398963212967, 0.0306914784014225, -0.0024604909121990204, 0.06153358146548271, -0.013933601789176464, 0.04535580426454544, -0.03250764682888985, 0.06123930960893631, 0.03560987859964371, 0.017173027619719505, 0.01215793751180172, 0.053477942943573, 0.019254643470048904, -0.001550486427731812, -0.008301593363285065, -0.022206537425518036, 0.02353849448263645, 0.023585233837366104, -0.02916654944419861, -0.27673521637916565, 0.018742749467492104, 0.06390950083732605, 0.05269816890358925, 0.03513283655047417, 0.001016879454255104, 0.015364887192845345, -0.04595382139086723, -0.03501403331756592, 0.012720316648483276, 0.01332010142505169, -0.0199948288500309, -0.01118827797472477, -0.019085891544818878, -0.01407256443053484, -0.01117140706628561, 0.05580015480518341, 0.004099683370441198, 0.04059341549873352, 0.04916887730360031, 0.030548693612217903, -0.018878711387515068, 0.17123278975486755, -0.015555033460259438, 0.04387284815311432, 0.03093293495476246, -0.014685193076729774, -0.009125972166657448, 0.030069656670093536, 0.024060005322098732, 0.0036563726607710123, -0.013819526880979538, 0.05492150038480759, 0.040654126554727554, -0.00010469142580404878, -0.012632913887500763, -0.028161585330963135, 0.04640478640794754, 0.010385587811470032, -0.0450790636241436, -0.04064339026808739, 0.04293948784470558, -0.05582902953028679, -0.008920310996472836, 0.04337581247091293, 0.05053401365876198, 0.0005811788723804057, -0.02058248035609722, -0.06138470396399498, -0.008684277534484863, -0.02978854440152645, -0.02905813790857792, -0.028820594772696495, -0.025439554825425148, 0.018950417637825012, 0.04881034046411514, 0.0261426642537117, -0.038191866129636765, 0.04322461038827896, 0.01949557103216648, 0.00145461515057832, -0.03560369089245796, 0.06913427263498306, 0.028251037001609802, -0.013563349843025208 ]
[ -0.02934507094323635, 0.0430733785033226, -0.006508735939860344, 0.02808341756463051, -0.01810944639146328, 0.0192903783172369, -0.007326508406549692, 0.010697213001549244, 0.0183261726051569, -0.024949686601758003, -0.02725144289433956, 0.012788679450750351, 0.03004569746553898, -0.0141666941344738, 0.021041352301836014, -0.05367013439536095, -0.03834223002195358, -0.008821398951113224, 0.021076971665024757, -0.01447875052690506, -0.02462252788245678, 0.02712353877723217, -0.015002507716417313, -0.005275440867990255, -0.0068236710503697395, -0.012782721780240536, -0.010235540568828583, 0.005456055048853159, 0.006553736049681902, -0.10500785708427429, -0.056276753544807434, -0.019222237169742584, 0.03392462432384491, 0.018680797889828682, 0.018910929560661316, 0.003935070242732763, -0.00847509317100048, -0.007764901965856552, -0.02979498915374279, 0.014034395106136799, 0.00358875235542655, -0.024005718529224396, 0.006231407169252634, 0.03163604438304901, -0.01774635538458824, 0.020920604467391968, -0.018160562962293625, 0.010089689865708351, -0.002076883567497134, 0.026107070967555046, -0.06994828581809998, 0.034411899745464325, 0.011997496709227562, 0.010307665914297104, 0.009885904379189014, -0.03363893926143646, 0.01383303850889206, -0.0003333401109557599, -0.01895430125296116, -0.05551379173994064, -0.010583608411252499, -0.015079510398209095, -0.01795228384435177, -0.016334526240825653, -0.021544786170125008, -0.03351518139243126, -0.032088495790958405, 0.038607265800237656, -0.005719061940908432, 0.007442748639732599, -0.023753013461828232, 0.01722773164510727, -0.035208649933338165, -0.013231159187853336, -0.007656289264559746, 0.0010060893837362528, 0.010369603522121906, -0.06934607028961182, 0.0010485209058970213, -0.04872501268982887, -0.053966768085956573, -0.02452104724943638, 0.009648212231695652, -0.012238706462085247, -0.00039854971691966057, -0.028819678351283073, 0.010648881085216999, 0.026469942182302475, -0.01684129424393177, 0.008790109306573868, -0.0001196668017655611, -0.003409544238820672, 0.03315558657050133, 0.020942997187376022, -0.069754958152771, 0.04123084992170334, 0.046227771788835526, -0.00939383264631033, -0.03415291756391525, 0.8208116292953491, -0.011759052984416485, 0.011457015760242939, 0.00838045310229063, -0.011890150606632233, 0.008849598467350006, -0.0058878203853964806, 0.023310909047722816, -0.040702417492866516, 0.009742343798279762, -0.04442040994763374, 0.018395261839032173, -0.008530359715223312, 0.0006394676165655255, -0.006520096678286791, 0.03721502050757408, 0.03835282102227211, -0.0007586567662656307, 0.0425209142267704, -0.01876172050833702, 0.0068991100415587425, -0.010478516109287739, -0.03142973780632019, -0.03806310519576073, -0.0030064426828175783, 0.025370536372065544, -0.18333996832370758, 0.03663237765431404, -7.708097759321787e-33, 0.019171014428138733, -0.019704170525074005, -0.0018068006029352546, -0.0031477881129831076, 0.005558462347835302, -0.004589988384395838, -0.010648391209542751, -0.0027363006956875324, -0.04805600643157959, -0.034667328000068665, 0.00037143941153772175, 0.007521128747612238, 0.036707665771245956, 0.021602526307106018, 0.03571021929383278, -0.007354598492383957, -0.006598308682441711, 0.004546920768916607, -0.02048722840845585, -0.0007206309237517416, 0.06439770758152008, 0.03260644152760506, 0.040205955505371094, 0.025017453357577324, -0.03977971151471138, 0.02051611989736557, -0.06237926706671715, -0.014202246442437172, -0.0018018309492617846, -0.03405168652534485, -0.06345755606889725, 0.021544642746448517, -0.019498569890856743, -0.04294654726982117, -0.004480816889554262, -0.026948638260364532, -0.03137211874127388, -0.025353891775012016, -0.04174819588661194, -0.0023626459296792746, -0.023279447108507156, 0.008015131577849388, -0.016880439594388008, -0.029110433533787727, -0.0060053435154259205, 0.0043092770501971245, -0.022142423316836357, 0.03498354181647301, -0.01556475181132555, 0.01447259820997715, 0.04634286090731621, 0.01902955211699009, 0.0005933481734246016, -0.010459412820637226, -0.0023845976684242487, 0.030070295557379723, 0.015430554747581482, -0.002912026597186923, -0.006651454139500856, 0.009987619705498219, 0.05775715038180351, -0.008155454881489277, 0.03027968481183052, 0.014410285279154778, 0.009118005633354187, -0.0026726038195192814, 0.04366698116064072, 0.04011104255914688, 0.016113106161355972, -0.02821865677833557, -0.03963211551308632, 0.02993081323802471, 0.014259705320000648, -0.010852986015379429, 0.0014470522291958332, -0.0033632575068622828, 0.024822898209095, -0.05002143234014511, 0.027716519311070442, 0.01801435276865959, 0.010610573925077915, -0.018390115350484848, -0.016629567369818687, -0.04499613121151924, -0.050096604973077774, 0.030621986836194992, 0.03173366189002991, 0.0050509278662502766, -0.014568219892680645, 0.014991439878940582, 0.004164456855505705, 0.04712694510817528, 0.009742090478539467, -0.00827283225953579, -0.005353663582354784, 6.847424305536725e-33, 0.014308415353298187, -0.007720058783888817, 0.016126982867717743, -0.021067341789603233, 0.052152033895254135, -0.021519990637898445, 0.04698134586215019, 0.013258548453450203, -0.029544567689299583, 0.03786150738596916, -0.030045848339796066, -0.04539574682712555, 0.00823991559445858, -0.0026210707146674395, 0.05403841659426689, -0.008309193886816502, 0.0004443018406163901, 0.045678094029426575, 0.016666535288095474, -0.027426334097981453, -0.0021848399192094803, -0.00013897914323024452, 0.04704054445028305, 0.03177731856703758, 0.027677180245518684, 0.018765490502119064, -0.0034298026002943516, -0.030502906069159508, -0.013824421912431717, 0.012696764431893826, 0.01591719314455986, -0.0018137446604669094, -0.009916265495121479, -0.023964928463101387, -0.028290804475545883, 0.033015359193086624, -0.006587747484445572, -0.002551887882873416, 0.023783637210726738, 0.003419585758820176, 0.04237730801105499, 0.02532806806266308, -0.02593330666422844, 0.04230198636651039, 0.02077212743461132, 0.022150985896587372, -0.012618073262274265, -0.0009505318594165146, -0.00535013061016798, 0.03242725133895874, 0.037269435822963715, 0.04128972813487053, -0.016717560589313507, 0.0004951058072037995, 0.03189479932188988, -0.009467565454542637, -0.010999183170497417, -0.007444213144481182, -0.03371904417872429, -0.020687228068709373, -0.05423879995942116, 0.011751093901693821, -0.03999532759189606, 0.036323100328445435, -0.014049896970391273, 0.0033559873700141907, -0.06801383197307587, 0.0111215366050601, 0.010689260438084602, -0.0349954254925251, -0.039292871952056885, -0.027544083073735237, 0.001312409294769168, 0.018445318564772606, -0.052349742501974106, 0.016196249052882195, -0.02918822132050991, 0.011249255388975143, 0.0026927657891064882, 0.04389561712741852, 0.009122070856392384, -0.010744300670921803, 0.034873347729444504, 0.03836721554398537, -0.017897747457027435, 0.0167241171002388, -0.022248703986406326, 0.013734848238527775, 0.0684976875782013, 0.01777435839176178, 0.006076401099562645, -0.022741954773664474, 0.03654653951525688, 0.0014512365451082587, 0.0034222204703837633, -1.3050221348009927e-8, -0.07383361458778381, -0.0037529475521296263, -0.017930006608366966, 0.05406920611858368, -0.007504669949412346, 0.027874046936631203, -0.019196653738617897, -0.02172493003308773, 0.018189825117588043, 0.029623927548527718, 0.02212659828364849, -0.04016006737947464, 0.010886423289775848, 0.03020375221967697, 0.04138805717229843, 0.006611608900129795, 0.029110107570886612, -0.02393658272922039, 0.022346243262290955, 0.009862949140369892, -0.005368859972804785, 0.008052945137023926, -0.018622776493430138, 0.01541303750127554, -0.007107953540980816, 0.011489401571452618, -0.0032660490833222866, -0.10573620349168777, -0.040920596569776535, -0.024893952533602715, 0.03338756039738655, -0.054541535675525665, -0.02031201496720314, 0.0008322327048517764, 0.017264558002352715, -0.0006468453793786466, -0.008190659806132317, -0.01751226931810379, 0.009790400974452496, 0.025164544582366943, 0.006031359545886517, 0.007888603024184704, -0.031944699585437775, -0.016688724979758263, 0.011703694239258766, -0.04123837500810623, -0.05443967133760452, 0.005600284319370985, -0.012330804020166397, -0.04006282240152359, 0.02130039408802986, -0.02929697372019291, 0.01278384868055582, 0.01975066028535366, 0.06139252707362175, 0.0468529537320137, -0.01741616800427437, 0.02953641302883625, -0.011100289411842823, -0.020735548809170723, 0.03115394338965416, 0.01102942693978548, -0.026313310489058495, -0.015552899800240993 ]
python-unicodeencodeerror-ascii-codec-cant-encode-character-uxfc-in-position-11-ordinal-not-in-range128
https://markhneedham.com/blog/2015/05/21/python-unicodeencodeerror-ascii-codec-cant-encode-character-uxfc-in-position-11-ordinal-not-in-range128
false
2015-05-09 22:33:05
R: Neo4j London meetup group - How many events do people come to?
[ "r-2", "rstats" ]
[ "R" ]
Earlier this week the number of members in the http://www.meetup.com/graphdb-london/[Neo4j London meetup group] creeped over the 2,000 mark and I thought it'd be fun to re-explore the data that I previously imported into https://github.com/mneedham/neo4j-meetup[Neo4j]. How often do people come to meetups? [source,r] ---- library(RNeo4j) library(dplyr) graph = startGraph("http://localhost:7474/db/data/") query = "MATCH (g:Group {name: 'Neo4j - London User Group'})-[:HOSTED_EVENT]->(event)<-[:TO]-({response: 'yes'})<-[:RSVPD]-(profile)-[:HAS_MEMBERSHIP]->(membership)-[:OF_GROUP]->(g) WHERE (event.time + event.utc_offset) < timestamp() RETURN event.id, event.time + event.utc_offset AS eventTime, profile.id, membership.joined" df = cypher(graph, query) > df %>% head() event.id eventTime profile.id membership.joined 1 20616111 1.309372e+12 6436797 1.307285e+12 2 20616111 1.309372e+12 12964956 1.307275e+12 3 20616111 1.309372e+12 14533478 1.307290e+12 4 20616111 1.309372e+12 10793775 1.307705e+12 5 24528711 1.311793e+12 10793775 1.307705e+12 6 29953071 1.314815e+12 10595297 1.308154e+12 ---- [source,R] ---- byEventsAttended = df %>% count(profile.id) > byEventsAttended %>% sample_n(10) Source: local data frame [10 x 2] profile.id n 1 128137932 2 2 126947632 1 3 98733862 2 4 20468901 11 5 48293132 5 6 144764532 1 7 95259802 1 8 14524524 3 9 80611852 2 10 134907492 2 ---- Now let's visualise the number of people that have attended certain number of events: [source,R] ---- ggplot(aes(x = n), data = byEventsAttended) + geom_bar(binwidth = 1, fill = "Dark Blue") + scale_y_continuous(breaks = seq(0,750,by = 50)) ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-09_01-15-02.png[2015 05 09 01 15 02,400] Most people come to one meetup and then there's a long tail after that with fewer and fewer people coming to lots of meetups. The chart has lots of blank space due to the sparseness of people on the right hand side. If we exclude any people who've attended more than 20 events we might get a more interesting visualisation: [source,r] ---- ggplot(aes(x = n), data = byEventsAttended %>% filter(n <= 20)) + geom_bar(binwidth = 1, fill = "Dark Blue") + scale_y_continuous(breaks = seq(0,750,by = 50)) ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-09_01-15-36.png[2015 05 09 01 15 36,400] https://twitter.com/_nicolemargaret[Nicole] suggested a more interesting visualisation would be a box plot so I decided to try that next: [source,R] ---- ggplot(aes(x = "Attendees", y = n), data = byEventsAttended) + geom_boxplot(fill = "grey80", colour = "Dark Blue") + coord_flip() ---- image::{{<siteurl>}}/uploads/2015/05/2015-05-09_22-31-20.png[2015 05 09 22 31 20,400] This visualisation really emphasises that the majority are between 1 and 3 and it's much less obvious how many values there are at the higher end. A quick check of the data with the +++<cite>+++summary+++</cite>+++ function reveals as much: [source,R] ---- > summary(byEventsAttended$n) Min. 1st Qu. Median Mean 3rd Qu. Max. 1.000 1.000 2.000 2.837 3.000 69.000 ---- Now to figure out how to move that box plot a bit to the right :)
null
null
[ 0.022804340347647667, -0.04270030930638313, 0.012887462042272091, 0.017784930765628815, 0.07496090233325958, 0.015497973188757896, 0.04622850567102432, 0.026783136650919914, 0.007494830060750246, 0.005789938382804394, -0.0027651311829686165, -0.02636057697236538, -0.0791151374578476, 0.027563748881220818, -0.016589514911174774, 0.06443311274051666, 0.07386589795351028, 0.011250593699514866, -0.005709766875952482, -0.014686000533401966, 0.0456307977437973, 0.039317190647125244, 0.0036642979830503464, 0.04451073706150055, 0.04043141007423401, 0.006177570670843124, 0.0068284133449196815, -0.017032938078045845, -0.04376085847616196, 0.014441249892115593, 0.04089583083987236, 0.01796291023492813, 0.029764486476778984, -0.009714574553072453, 0.037803616374731064, -0.019482137635350227, -0.02475854568183422, 0.0048450566828250885, -0.012873362749814987, -0.005674710497260094, -0.06658732146024704, 0.011922088451683521, -0.01767887733876705, 0.034350477159023285, -0.043974027037620544, 0.0005884909187443554, -0.044938504695892334, 0.04394051805138588, 0.006704441271722317, 0.016507858410477638, -0.0737469270825386, 0.026516515761613846, 0.005015815608203411, 0.00380918150767684, -0.0001283884485019371, 0.04073395952582359, 0.01737767644226551, -0.05610240623354912, 0.03941803798079491, -0.03184366226196289, 0.019559944048523903, 0.0011358530027791858, 0.012110931798815727, 0.0062655434012413025, -0.0017311901319772005, -0.013673980720341206, -0.0016809134976938367, 0.051557425409555435, -0.021919136866927147, 0.006343465764075518, -0.01200850773602724, 0.03272471949458122, -0.023196155205368996, -0.0013652857160195708, -0.0068644373677670956, -0.0525938905775547, -0.004919873550534248, 0.04932987689971924, 0.0404638908803463, 0.047138761729002, -0.009125647135078907, -0.008380544371902943, 0.023624518886208534, 0.03168214485049248, -0.008317770436406136, -0.035434138029813766, -0.023754583671689034, -0.053947173058986664, -0.060584656894207, 0.0336948037147522, 0.0046453033573925495, -0.05766310915350914, 0.018496498465538025, 0.020952070131897926, -0.002011301927268505, 0.023940065875649452, 0.013569582253694534, -0.008484099060297012, 0.0018720462685450912, -0.030284270644187927, -0.037608757615089417, -0.03784840553998947, 0.012823715806007385, 0.010714559815824032, -0.08115115761756897, -0.011566677130758762, -0.0448082834482193, -0.012112407945096493, 0.008280511945486069, -0.00949491560459137, -0.030527452006936073, 0.022031160071492195, -0.009643945842981339, 0.017102040350437164, -0.06719433516263962, 0.06355313211679459, 0.02591010555624962, -0.034864868968725204, -0.008606097660958767, -0.01967884972691536, 0.025872936472296715, 0.03569597005844116, 0.012725400738418102, 0.0735480859875679, -0.039784420281648636, 0.04860647767782211, 0.014300842769443989, 0.04241425171494484, -0.029991216957569122, -0.06277868151664734, -0.00910279806703329, 0.06489801406860352, -0.016422979533672333, -0.006849721074104309, -0.007236895617097616, -0.042658913880586624, -0.016073232516646385, 0.01908467337489128, 0.06041235849261284, 0.01752837933599949, 0.042749613523483276, -0.04651109501719475, 0.01985505037009716, -0.0031325153540819883, 0.0426870621740818, 0.018904786556959152, -0.01840207725763321, -0.06361944228410721, -0.029221441596746445, -0.005347264930605888, 0.036822475492954254, 0.02607080712914467, 0.037245966494083405, -0.04026917740702629, 0.026795106008648872, 0.08446049690246582, 0.020009247586131096, -0.014337070286273956, -0.014508389867842197, 0.017065750434994698, 0.04225718602538109, 0.032928239554166794, 0.021775836125016212, 0.06027749553322792, 0.01515896711498499, -0.015533937141299248, -0.012583296746015549, 0.05026664584875107, -0.0275270976126194, 0.02410883828997612, -0.03977419063448906, -0.04902235046029091, 0.051646411418914795, -0.030505390837788582, -0.003879720810800791, 0.04135472699999809, 0.08513567596673965, 0.04108920320868492, 0.015320857055485249, -0.005374996457248926, -0.07990123331546783, 0.03348567709326744, 0.010405462235212326, 0.041286662220954895, 0.015838662162423134, -0.017235547304153442, 0.07458717375993729, 0.04874475300312042, 0.002374259289354086, 0.05276661366224289, -0.07527043670415878, -0.05487961322069168, -0.01552258338779211, -0.013277116231620312, 0.06454627215862274, -0.04069972410798073, 0.040367335081100464, 0.04456617683172226, -0.0017801726935431361, 0.04011737182736397, -0.016983557492494583, 0.0038886391557753086, 0.026562543585896492, -0.024938620626926422, -0.05999115854501724, 0.05438873916864395, 0.01536823995411396, -0.03065074421465397, -0.044771164655685425, 0.012859005481004715, -0.02331356517970562, 0.012725954875349998, 0.013379034586250782, -0.019981572404503822, 0.02606540359556675, 0.012695878744125366, 0.05470722168684006, 0.01657816395163536, 0.016733255237340927, -0.03329739347100258, 0.03371354192495346, 0.0038763382472097874, -0.008135971613228321, -0.021765481680631638, -0.002858513966202736, 0.11308151483535767, 0.06066688150167465, -0.012673699297010899, -0.04704950004816055, 0.024250630289316177, 0.013378151692450047, -0.0018149373354390264, 0.02386619709432125, -0.009881513193249702, 0.01104305312037468, -0.020695682615041733, -0.02759542688727379, -0.043982651084661484, 0.002479043323546648, -0.052395280450582504, 0.0056520672515034676, 0.04647846519947052, -0.009037753567099571, 0.06534027308225632, -0.017395982518792152, -0.0028281095437705517, -0.008709486573934555, -0.03684359788894653, -0.04981693625450134, 0.020989367738366127, 0.01804332621395588, -0.00974354986101389, 0.03480484336614609, -0.042254142463207245, 0.0028102200012654066, -0.010673269629478455, 0.0056285918690264225, 0.041427839547395706, 0.0539962574839592, 0.059085916727781296, -0.007683563977479935, 0.039444681257009506, -0.05011005699634552, -0.019047746434807777, -0.027151066809892654, -0.039253007620573044, -0.0558338426053524, -0.04047461971640587, 0.0076651559211313725, -0.013556834310293198, 0.05909016355872154, -0.014941038563847542, 0.012435542419552803, 0.020741133019328117, 0.02135143242776394, 0.001805076259188354, 0.04434690251946449, -0.00005311051427270286, -0.0030406599398702383, -0.02625861018896103, -0.036715276539325714, 0.052284542471170425, -0.04116096720099449, -0.03758258745074272, -0.00378113123588264, -0.060864534229040146, 0.04469866678118706, -0.03865036368370056, -0.024490075185894966, 0.0006785283330827951, 0.029028382152318954, 0.05299035459756851, 0.05121871829032898, -0.008816968649625778, 0.05851031094789505, -0.0020324222277849913, 0.021471917629241943, 0.030946752056479454, -0.021303636953234673, 0.052001241594552994, -0.0020301248878240585, 0.03138284757733345, 0.02363876812160015, -0.04247460141777992, 0.002028245711699128, -0.048790376633405685, 0.01884882152080536, -0.021015111356973648, -0.2591226100921631, 0.04093218222260475, -0.019773544743657112, -0.03131407871842384, -0.005900014657527208, -0.034054700285196304, 0.0388496071100235, -0.0107863899320364, -0.05297653004527092, -0.014795917086303234, -0.0007657903479412198, -0.04117937758564949, -0.020094651728868484, 0.042639680206775665, 0.028920704498887062, 0.009554574266076088, 0.011317559517920017, -0.049889177083969116, 0.0033213114365935326, 0.0443086251616478, 0.010947656817734241, -0.037436991930007935, -0.01749786175787449, 0.03745316341519356, 0.014337023720145226, 0.05202260985970497, -0.06631115078926086, -0.014119288884103298, -0.061841387301683426, -0.02914663590490818, 0.028459569439291954, -0.019540969282388687, 0.02630356140434742, -0.011509640142321587, -0.010773127898573875, -0.011273338459432125, 0.042408354580402374, 0.006778251379728317, -0.008248945698142052, 0.01842229627072811, -0.020728077739477158, -0.03780554234981537, -0.006714380346238613, -0.01662941463291645, 0.08892259001731873, 0.05515019968152046, -0.08598662167787552, 0.0007529229624196887, -0.011072535067796707, 0.050893235951662064, -0.03386826813220978, -0.03795401751995087, -0.02460813708603382, 0.012849950231611729, -0.034154269844293594, -0.02788563258945942, -0.032292865216732025, -0.004681708756834269, -0.05533009395003319, -0.034713707864284515, -0.03815712034702301, -0.016200173646211624, 0.021665584295988083, -0.033672407269477844, -0.03403766453266144, -0.06235172227025032, -0.09183710813522339, -0.02676817961037159, 0.06267140060663223, -0.013154334388673306, -0.02613532729446888, 0.010837556794285774, -0.019513750448822975, -0.10208339244127274, -0.055304817855358124, -0.010470553301274776, -0.008536082692444324, 0.013461650349199772, 0.0026184527669101954, 0.05907364934682846, -0.06346432119607925, -0.05482170358300209, -0.0032150063198059797, 0.003986923955380917, 0.043362896889448166, -0.012002712115645409, 0.007168261334300041, -0.00217675743624568, -0.06819140166044235, -0.015470737591385841, 0.04837527498602867, -0.03444303944706917, -0.026485515758395195, 0.007414291147142649, -0.0015005625318735838, 0.03112611547112465, -0.001278116600587964, 0.012992418371140957, 0.026285121217370033, 0.047546762973070145, 0.0373886339366436, -0.052730198949575424, 0.019672537222504616, -0.04289253056049347, -0.01872332952916622, -0.008734912611544132, -0.058415163308382034, 0.014416233636438847, 0.020590657368302345, -0.006660240702331066, 0.029910460114479065, -0.024951230734586716, 0.02671939693391323, -0.05732129141688347, -0.019964218139648438, -0.02762371301651001, 0.02992645464837551, 0.022170335054397583, 0.02627960965037346, -0.01048903539776802, -0.04781915247440338, 0.031255558133125305, 0.007213771343231201, -0.00010284111340297386, -0.0492873415350914, -0.028569931164383888, -0.04111355170607567, -0.026945313438773155, 0.014285270124673843, 0.017265068367123604, -0.027530794963240623, 0.023302478715777397, 0.02388155832886696, -0.04647174850106239, 0.04441174492239952, -0.011362025514245033, -0.05535613372921944, -0.027210121974349022, 0.007912770844995975, 0.015193072147667408, -0.012094440869987011, 0.006374314893037081, -0.004515380598604679, 0.05294085666537285, 0.03397499769926071, 0.024982623755931854, 0.024820173159241676, -0.0017572856741026044, 0.02049594558775425, 0.01289619691669941, 0.007458615116775036, -0.025109175592660904, 0.01654592901468277, -0.027290452271699905, -0.009108894504606724, -0.003379550762474537, 0.07142431288957596, -0.00987259391695261, -0.03413775563240051, -0.036527667194604874, 0.009658454917371273, -0.06561233848333359, 0.013646440580487251, -0.014295157976448536, 0.014155958779156208, 0.05359886586666107, -0.026520559564232826, 0.03378785774111748, -0.006811168976128101, -0.025076331570744514, -0.012915514409542084, 0.028666162863373756, -0.0413636676967144, 0.034600887447595596, 0.0023825368843972683, -0.014939704909920692, 0.0006169034168124199, 0.01646324433386326, 0.040657080709934235, -0.012740912847220898, -0.02245856076478958, 0.0040240660309791565, 0.008548096753656864, 0.014266972430050373, 0.0616159550845623, 0.06906919181346893, -0.007528926711529493, -0.0071230498142540455, -0.013049772940576077, -0.03130041062831879, -0.006300938315689564, -0.007732172030955553, -0.028294773772358894, -0.01710512861609459, -0.033696580678224564, -0.0716119036078453, 0.049820173531770706, 0.014432878233492374, 0.008567904122173786, 0.03292841091752052, 0.016154395416378975, -0.009229346178472042, -0.03134733438491821, 0.02857932820916176, 0.04783576726913452, -0.06213376671075821, -0.017917290329933167, 0.0020347870886325836, -0.0337437279522419, 0.004262526053935289, 0.01295563206076622, -0.054603300988674164, -0.027303971350193024, -0.005983264651149511, 0.03459786996245384, -0.024246856570243835, -0.0388353168964386, -0.026749566197395325, 0.03094424679875374, -0.0005561975413002074, 0.04313644766807556, 0.005139460787177086, -0.004252828657627106, -0.007277548313140869, 0.0040825107134878635, 0.03845139220356941, -0.03023420087993145, -0.0025368412025272846, -0.0009693307220004499, -0.02600938454270363, 0.00764872832223773, -0.03627251461148262, 0.01688067428767681, 0.00932988803833723, -0.037336427718400955, 0.002869207179173827, -0.08089562505483627, -0.0001997419894905761, 0.010121206752955914, 0.04660579934716225, -0.0214469563215971, -0.003129448276013136, -0.043746333569288254, -0.00986489374190569, -0.03610357642173767, 0.01898679882287979, 0.005518630612641573, 0.006197205279022455, 0.012882598675787449, 0.029009370133280754, 0.01974915899336338, 0.012284206226468086, -0.008987422101199627, -0.020818015560507774, 0.038808636367321014, -0.04612305015325546, -0.039043135941028595, -0.01905635930597782, -0.05222875997424126, -0.0021904376335442066, 0.005457424558699131, 0.003264468163251877, -0.025609299540519714, 0.037805236876010895, 0.03490707278251648, 0.03273066505789757, 0.0515730194747448, -0.004272506106644869, 0.000205405565793626, -0.016751069575548172, -0.00023490549938287586, -0.09008593112230301, -0.0011054356582462788, 0.020755605772137642, -0.006033977493643761, 0.0032528983429074287, -0.003138180822134018, -0.03774901106953621, 0.014819443225860596, -0.06067153066396713, -0.017079634591937065, 0.044109076261520386, -0.012411285191774368, 0.026624904945492744, 0.024042200297117233, -0.06709526479244232, 0.0029597273096442223, 0.03850085660815239, -0.05828576534986496, -0.011587127111852169, -0.018906090408563614, 0.05696239694952965, -0.038016024976968765, 0.040246475487947464, -0.02493867091834545, -0.01826748251914978, 0.06319519877433777, 0.011624868959188461, 0.00833806674927473, 0.0701863095164299, -0.02570916712284088, 0.030905190855264664, 0.03442016616463661, -0.01936504803597927, -0.0025886553339660168, 0.028879545629024506, -0.008686942048370838, -0.048155177384614944, 0.031555935740470886, -0.0058171385899186134, -0.007749531883746386, -0.051432497799396515, 0.08813297748565674, 0.008635016158223152, -0.045580293983221054, -0.04596758261322975, 0.024765685200691223, -0.013773689977824688, -0.010962974280118942, -0.035356488078832626, 0.0010578758083283901, -0.03118596039712429, 0.055033497512340546, 0.002455874579027295, 0.035395506769418716, 0.04879439249634743, 0.005368511192500591, 0.0022361399605870247, -0.007645674515515566, 0.1022404283285141, 0.11532223224639893, 0.044915273785591125, 0.024967918172478676, 0.06918136775493622, -0.02785312756896019, -0.051046501845121384, -0.007249830756336451, -0.02732199989259243, -0.0652511715888977, 0.008668900467455387, 0.00345106003805995, 0.07480891793966293, -0.03549962490797043, 0.06904331594705582, -0.003271733643487096, -0.024721382185816765, -0.017110731452703476, -0.009364956989884377, 0.06786898523569107, 0.07224031537771225, 0.020629778504371643, 0.05375806987285614, -0.03535080328583717, -0.032538849860429764, 0.042715221643447876, -0.005089049227535725, -0.02174925059080124, 0.03293411806225777, -0.027329592034220695, 0.0017022574320435524, 0.015356055460870266, 0.033125437796115875, 0.07800385355949402, -0.03497316688299179, -0.005387375596910715, -0.006687925197184086, 0.003123945090919733, -0.0021019428968429565, 0.029300378635525703, 0.003252178430557251, 0.006319056730717421, -0.010495727881789207, -0.052253466099500656, -0.02367698773741722, -0.02341308817267418, -0.06978604197502136, 0.01940196566283703, -0.03220011666417122, 0.010980645194649696, -0.0055692363530397415, -0.02348385751247406, -0.013925435021519661, -0.046486251056194305, -0.04555491358041763, -0.05025966092944145, -0.08890901505947113, 0.001689105643890798, 0.008598342537879944, -0.029505660757422447, -0.02656499296426773, 0.008443102240562439, -0.01707978919148445, -0.03241651877760887, 0.014187127351760864, -0.07415123283863068, -0.002907859394326806, 0.013348018750548363, -0.016253545880317688, 0.022888781502842903, 0.015405257232487202, 0.05295060575008392, 0.013078303076326847, 0.007602756377309561, -0.03322833031415939, 0.025642234832048416, 0.05604727193713188, 0.022515473887324333, -0.015407235361635685, -0.08293306082487106, 0.03758090361952782, 0.0265435092151165, -0.03423037752509117, -0.08582203090190887, 0.04085235670208931, 0.030361341312527657, 0.026307782158255577, 0.023971451446413994, 0.001911059021949768, -0.0226316899061203, -0.02086343616247177, 0.02150687761604786, 0.004355093464255333, 0.019365249201655388, 0.03429226204752922, -0.025319289416074753, 0.06060926988720894, 0.04358166083693504, -0.04584195464849472, -0.037964265793561935, -0.03131573274731636, 0.012774733826518059, -0.0036206869408488274, -0.04060252010822296, -0.043969325721263885, -0.053863439708948135, -0.10443826764822006, -0.013551000505685806, 0.007491008378565311, -0.018167762085795403, -0.011364285834133625, 0.01501320581883192, 0.019634537398815155, -0.017194997519254684, 0.020421165972948074, -0.02876601181924343, 0.03676830977201462, -0.012837289832532406, -0.02214898355305195, -0.04822845757007599, 0.008991673588752747, 0.005977750290185213, 0.010968544520437717, -0.0013941021170467138, -0.04960896447300911, 0.007598828990012407, -0.035962384194135666, 0.0228350181132555, 0.03753013536334038, 0.02085624821484089, 0.024411510676145554 ]
[ -0.045060671865940094, -0.04753761738538742, -0.0330943837761879, -0.015415012836456299, 0.06289886683225632, -0.024263810366392136, 0.016866100952029228, 0.008459476754069328, 0.03236132860183716, -0.03474655747413635, 0.056795865297317505, -0.033302851021289825, 0.02608257718384266, -0.008717499673366547, 0.059466876089572906, -0.004775081295520067, -0.032490603625774384, -0.11209689825773239, -0.02914537861943245, 0.04947393387556076, -0.054792620241642, -0.06092191860079765, -0.015927448868751526, -0.016142746433615685, 0.018415797501802444, 0.03620300441980362, 0.035002853721380234, -0.03659075126051903, -0.026370087638497353, -0.1720813512802124, 0.010680032894015312, 0.012397329322993755, 0.061246924102306366, 0.015740711241960526, 0.0005835694028064609, 0.012397509068250656, 0.05376102030277252, -0.006629686336964369, 0.03257424756884575, 0.054187264293432236, 0.013484176248311996, 0.006836923770606518, -0.03300672024488449, -0.013582148589193821, 0.03823932260274887, 0.03211694583296776, -0.046144258230924606, -0.005827793385833502, -0.046017881482839584, 0.018287599086761475, -0.03329158201813698, -0.01741088181734085, -0.0010133403120562434, 0.012235642410814762, 0.015972334891557693, 0.058465324342250824, 0.04095475375652313, 0.02815651334822178, 0.01862030103802681, 0.02732384204864502, 0.014223044738173485, -0.013094550929963589, -0.13599802553653717, 0.058187320828437805, -0.003635918954387307, -0.01004116702824831, -0.04290050268173218, -0.00860458705574274, -0.022606458514928818, 0.0581456683576107, 0.04295426979660988, 0.008289886638522148, -0.04067996144294739, 0.03486187756061554, 0.006950332783162594, 0.013223296962678432, -0.025292377918958664, 0.021861525252461433, 0.030199188739061356, -0.02624550275504589, -0.028478704392910004, 0.028187721967697144, -0.02732325904071331, -0.020248208194971085, -0.03906659409403801, 0.008355436846613884, -0.007209045812487602, 0.058696918189525604, -0.022101404145359993, 0.04881353676319122, 0.025740211829543114, 0.0653541162610054, 0.01946883462369442, 0.01842641644179821, -0.09437670558691025, -0.03704063966870308, 0.022849194705486298, 0.04770646616816521, -0.00960567593574524, 0.41119661927223206, -0.005649656057357788, 0.023434288799762726, 0.04343586787581444, 0.07583112269639969, -0.02244539000093937, -0.02005552127957344, 0.002173339482396841, -0.07912667095661163, 0.04157689958810806, -0.013812069781124592, 0.016011739149689674, -0.019804073497653008, 0.06098850071430206, -0.08552762120962143, 0.026609472930431366, 0.016125444322824478, 0.07415297627449036, 0.02438565343618393, -0.004698576871305704, 0.023271292448043823, -0.02762785740196705, 0.003092814004048705, 0.03818890452384949, 0.01500278152525425, 0.03606950119137764, 0.023588906973600388, 0.03409659489989281, 0.05426663160324097, 0.02146780677139759, 0.005968091543763876, 0.06874235719442368, 0.025992989540100098, -0.07590431720018387, 0.023144273087382317, -0.026397237554192543, 0.0002866021532099694, 0.02147778682410717, -0.03124306909739971, -0.003506930312141776, 0.04869316145777702, 0.016718650236725807, -0.038142960518598557, 0.046675119549036026, -0.003269614651799202, -0.006789822597056627, 0.14746332168579102, -0.011729770340025425, -0.056996941566467285, -0.01969095878303051, -0.03732362762093544, 0.001495410455390811, 0.019259266555309296, -0.014640092849731445, -0.07944244891405106, -0.01770053431391716, 0.009371165186166763, 0.11608317494392395, -0.006359168794006109, -0.06692658364772797, -0.005847953259944916, -0.00746544124558568, -0.015503978356719017, -0.03806991130113602, 0.07202300429344177, 0.07314817607402802, -0.13285142183303833, 0.011027168482542038, 0.0004541751113720238, 0.0027290629222989082, -0.08247547596693039, 0.023923927918076515, -0.007503199391067028, -0.03223510459065437, 0.02263890765607357, 0.08651749044656754, -0.0024287851992994547, -0.036033958196640015, -0.0021618816535919905, 0.031179634854197502, 0.001954176928848028, -0.023730559274554253, 0.016312558203935623, -0.05937834084033966, -0.011562146246433258, -0.07326683402061462, -0.040214840322732925, -0.08928116410970688, 0.013513361103832722, -0.017499404028058052, -0.02350139059126377, -0.0488073006272316, -0.03012736886739731, -0.0912083312869072, 0.07811132818460464, -0.05756743624806404, -0.03791705146431923, -0.0070938533172011375, -0.0022440189495682716, -0.020087508484721184, -0.0372818298637867, -0.016251040622591972, -0.0009689058642834425, -0.049118902534246445, 0.011865357868373394, -0.04306391254067421, 0.05979185551404953, 0.06028949096798897, -0.023094715550541878, 0.09225408732891083, 0.017151575535535812, -0.0250164233148098, -0.022557063028216362, 0.003225224558264017, 0.019378025084733963, 0.018466927111148834, -0.025186384096741676, 0.006118828896433115, -0.03264617919921875, 0.00005368904385250062, 0.042331259697675705, 0.014499503187835217, 0.01509565208107233, -0.013563213869929314, -0.33241569995880127, -0.02298547886312008, -0.009619160555303097, 0.00978949386626482, -0.006954101845622063, -0.035537298768758774, 0.031914424151182175, -0.0218048095703125, 0.031955376267433167, 0.061204276978969574, 0.08610066771507263, 0.015568368136882782, -0.01753699965775013, -0.04979093745350838, 0.005437453743070364, 0.05872992426156998, -0.04065883159637451, 0.006440258584916592, -0.008417758159339428, 0.001429866417311132, 0.0024575756397098303, -0.02400307171046734, -0.025917232036590576, -0.028545871376991272, -0.014993012882769108, -0.014953617937862873, 0.1222161278128624, 0.030409332364797592, -0.02423592284321785, -0.04983365535736084, 0.03598763048648834, 0.01254073716700077, -0.03253374248743057, -0.05845363438129425, 0.014338679611682892, -0.008701578713953495, 0.016935251653194427, -0.023422004655003548, -0.0041273729875683784, -0.009581546299159527, -0.08489449322223663, -0.0018418232211843133, -0.050641365349292755, -0.0399271696805954, -0.06480744481086731, 0.015344807878136635, -0.005651751533150673, -0.0065014902502298355, -0.024374334141612053, 0.06199181079864502, 0.02876407280564308, -0.01512261014431715, 0.019934503361582756, 0.050624679774045944, 0.02464805543422699, -0.049944035708904266, -0.0651133581995964, -0.014151999726891518, -0.00941250566393137, 0.03714330121874809, 0.0017755120061337948, 0.055261850357055664, 0.016284745186567307, -0.0788877084851265, 0.023177649825811386, 0.002034406643360853, -0.042855095118284225, -0.007726411800831556, 0.033168572932481766, -0.018506653606891632, -0.01424113754183054, 0.08781924098730087, -0.015245404094457626, -0.007156881503760815, 0.02755185402929783, -0.010245583020150661, -0.055019721388816833, -0.008576884865760803, 0.026897741481661797, 0.011979208327829838, 0.04874464124441147, -0.04980393126606941, 0.05622769147157669, -0.01998778246343136, -0.014763286337256432, 0.044113270938396454, 0.011846833862364292, -0.007150901481509209, 0.07309012115001678, 0.018807683140039444, -0.020419154316186905, -0.009485588409006596, -0.03643504157662392, -0.045830048620700836, 0.025092585012316704, -0.02982674352824688, -0.28148847818374634, 0.026120495051145554, 0.0220164991915226, 0.05118385702371597, 0.02191675826907158, 0.024603892117738724, 0.016393335536122322, 0.009829293936491013, -0.017919106408953667, 0.0015615401789546013, 0.05300223082304001, 0.05301230400800705, -0.023907523602247238, -0.015299749560654163, 0.017663877457380295, 0.02788691408932209, -0.018964719027280807, 0.003491233801469207, -0.02060113102197647, 0.005263442639261484, 0.03610500693321228, -0.022317485883831978, 0.16518422961235046, 0.03334837034344673, 0.02480877749621868, 0.0376158244907856, -0.022917216643691063, 0.025493688881397247, 0.03750217705965042, -0.03333166241645813, -0.044339343905448914, -0.008463281206786633, 0.011812095530331135, 0.012485070154070854, 0.01990630105137825, -0.026960575953125954, -0.016628293320536613, 0.018642190843820572, 0.027609391137957573, -0.02204008772969246, 0.007679235655814409, 0.005782445892691612, -0.028309771791100502, 0.04435710236430168, 0.08739392459392548, -0.005388251040130854, 0.010170728899538517, -0.04622210934758186, -0.021473834291100502, -0.018293479457497597, -0.03184739500284195, -0.07216212153434753, -0.02612759731709957, 0.0006591625278815627, 0.009306633844971657, 0.0697622001171112, 0.014870540238916874, -0.020684225484728813, 0.05141259357333183, 0.015521245077252388, -0.046249594539403915, -0.024128692224621773, 0.0752076655626297, -0.030857644975185394, 0.01807227171957493 ]
[ -0.0036547458730638027, 0.034088775515556335, 0.0030019220430403948, 0.0359351821243763, -0.0014093293575569987, -0.011417252011597157, 0.006483851000666618, 0.003163157729431987, -0.03293461352586746, -0.021894901990890503, -0.037644337862730026, 0.014733615331351757, 0.03926564007997513, -0.005226634908467531, 0.02124081179499626, 0.012365155853331089, -0.018359558656811714, 0.003309408901259303, 0.04599950090050697, -0.018643775954842567, -0.05877244472503662, -0.0004064057138748467, 0.034645501524209976, -0.00671010185033083, -0.030104929581284523, 0.0272233709692955, -0.01019338984042406, 0.020638175308704376, 0.025898003950715065, -0.06579641252756119, -0.005851387977600098, -0.008237638510763645, -0.015385385602712631, -0.000001502060285929474, -0.02313128672540188, 0.02317671850323677, 0.0012403036234900355, 0.028100529685616493, 0.018788106739521027, 0.051293399184942245, 0.0035656816326081753, 0.000760861614253372, -0.005317975766956806, 0.018443621695041656, 0.01173492707312107, -0.0028878552839159966, -0.04303208738565445, 0.005279602482914925, -0.008405364118516445, -0.035761818289756775, -0.013191767036914825, 0.0009140018955804408, -0.025621134787797928, 0.0007755164988338947, 0.0017279459862038493, -0.0029410328716039658, -0.05258849635720253, -0.02461281791329384, -0.019161291420459747, -0.008004036732017994, 0.006903011351823807, -0.008801901713013649, -0.038971707224845886, -0.021830713376402855, 0.007427275646477938, -0.00805654563009739, -0.038089483976364136, 0.021946121007204056, 0.022140011191368103, 0.019553907215595245, -0.04840100556612015, 0.0414094477891922, -0.09149633347988129, -0.0323198176920414, -0.008767119608819485, 0.023542586714029312, 0.00044306766358204186, -0.0292348749935627, 0.0015541294123977423, -0.0033511104993522167, -0.03791143000125885, -0.0027761938981711864, -0.008326143957674503, -0.002007158473134041, -0.024457093328237534, -0.033225167542696, 0.02952321246266365, 0.005626024212688208, -0.008611880242824554, 0.015127760358154774, -0.03849867358803749, 0.05122339725494385, -0.006321990862488747, -0.0007160811219364405, -0.10479627549648285, 0.008065142668783665, 0.022095300257205963, 0.023927120491862297, 0.020722316578030586, 0.8318368196487427, -0.009484943933784962, -0.012950235977768898, -0.010290131904184818, 0.017419684678316116, -0.02429753914475441, -0.005229801405221224, -0.017460007220506668, 0.0076256911270320415, 0.008220437914133072, -0.006607020739465952, -0.02385515719652176, 0.015186806209385395, 0.018572578206658363, 0.030900562182068825, 0.01932169683277607, 0.04625248536467552, 0.040370017290115356, 0.014844181016087532, 0.007824352942407131, 0.02859761193394661, -0.0065024420619010925, 0.0265322457998991, 0.01262282207608223, 0.006823257077485323, -0.015407782979309559, -0.16940151154994965, 0.007302083075046539, -6.936631837136659e-33, 0.060264427214860916, 0.0072057233192026615, 0.02054184302687645, -0.03546959534287453, 0.01994038000702858, 0.00403764471411705, -0.052966367453336716, -0.04296905919909477, -0.006411174312233925, -0.012999151833355427, -0.004247436765581369, -0.0015561836771667004, 0.03993643820285797, -0.030146190896630287, 0.02476355992257595, -0.010635439306497574, 0.029125122353434563, 0.02854705974459648, -0.023223794996738434, -0.021669572219252586, -0.012087021954357624, 0.01949998177587986, 0.005544140003621578, 0.04521258920431137, -0.019339466467499733, 0.0462779775261879, -0.014849996194243431, 0.0423632487654686, 0.004224457312375307, -0.05899523198604584, -0.033593468368053436, 0.02340550348162651, -0.018127864226698875, 0.026380645111203194, 0.013348585925996304, -0.04253416508436203, -0.026810554787516594, 0.010355225764214993, -0.019098222255706787, -0.0632864385843277, -0.04163627326488495, 0.025395698845386505, -0.01415544468909502, -0.023049555718898773, -0.04233478382229805, 0.004326859954744577, -0.014179382473230362, 0.0032631901558488607, -0.004064418841153383, -0.016123104840517044, 0.0014560779090970755, -0.008386112749576569, -0.02556394599378109, 0.029222380369901657, -0.046061985194683075, 0.010635335929691792, 0.026936091482639313, 0.038311704993247986, 0.011717894114553928, 0.03939160332083702, 0.0381915420293808, -0.02492288313806057, 0.012405368499457836, 0.050715938210487366, 0.026316465809941292, -0.0022371700033545494, 0.0030277317855507135, -0.004378387238830328, 0.010418263264000416, 0.025809336453676224, -0.029715627431869507, 0.09708841145038605, -0.02634686417877674, -0.012285364791750908, 0.019638722762465477, -0.04829378426074982, 0.01228468306362629, 0.01333709992468357, 0.005440624430775642, 0.06104973331093788, 0.0018101887544617057, -0.01122148334980011, -0.006965933367609978, -0.017543857917189598, -0.029553089290857315, -0.034568578004837036, 0.029189303517341614, 0.008074325509369373, -0.010872077196836472, 0.01034198235720396, 0.02090439200401306, -0.013057339005172253, 0.02166033908724785, -0.014651259407401085, -0.0078412014991045, 6.957886979051434e-33, 0.011550757102668285, -0.007325515151023865, 0.0128399059176445, -0.021311871707439423, 0.056352920830249786, -0.015161245130002499, 0.02649477869272232, 0.0129957040771842, -0.020616063848137856, 0.04952551797032356, -0.021549303084611893, -0.002329174429178238, 0.023047637194395065, 0.030624521896243095, 0.0324007086455822, -0.0151698999106884, 0.03965727612376213, -0.010089599527418613, -0.0050238375551998615, 0.02382848411798477, -0.021489746868610382, -0.00765087828040123, -0.02672896906733513, -0.011448019184172153, 0.04087284952402115, 0.01497544627636671, 0.009353112429380417, 0.003361355047672987, -0.011011689901351929, -0.00877869687974453, 0.0010513243032619357, -0.008059915155172348, -0.02387826330959797, -0.019427530467510223, 0.028563665226101875, 0.025259660556912422, -0.012146970257163048, 0.002998625161126256, 0.009974125772714615, -0.011742387898266315, 0.0368243046104908, 0.03597792983055115, -0.04309047758579254, 0.04874323680996895, 0.043977040797472, 0.028841866180300713, -0.021077662706375122, 0.0029266164638102055, -0.039808791130781174, 0.0323660671710968, -0.004580226726830006, 0.02522473968565464, 0.001725762733258307, 0.009518207982182503, 0.013245210982859135, -0.03323034197092056, -0.006275234743952751, 0.029382403939962387, -0.005902143195271492, 0.010832848958671093, -0.009007936343550682, -0.008647029288113117, -0.04794161021709442, 0.04882894083857536, -0.030713116750121117, -0.00983856525272131, -0.03868010640144348, -0.022227328270673752, 0.001167796552181244, 0.025529809296131134, 0.00889284536242485, -0.03437258303165436, -0.030928336083889008, 0.0035088162403553724, 0.02421684004366398, -0.03175481781363487, -0.05211959406733513, 0.01691393554210663, -0.01405447255820036, 0.02277858927845955, 0.021698497235774994, -0.006345182657241821, 0.01806654781103134, 0.00968114659190178, 0.015094546601176262, 0.012620802037417889, -0.0226308461278677, 0.054970186203718185, -0.01619628444314003, -0.000778673798777163, 0.038225024938583374, -0.05469510704278946, -0.02129179798066616, 0.05695824697613716, -0.03431760519742966, -1.273966443449126e-8, -0.05108611658215523, 0.014937225729227066, -0.002369225025177002, -0.022017285227775574, 0.043557483702898026, 0.02502129226922989, 0.032745640724897385, -0.01010051742196083, -0.013045013882219791, 0.028611956164240837, 0.04715917631983757, -0.023611094802618027, 0.024840904399752617, 0.0029439968056976795, 0.010865479707717896, -0.053483713418245316, 0.002000268781557679, -0.026713386178016663, 0.02606530673801899, 0.01309636514633894, 0.0017580232815816998, 0.024801744148135185, -0.03684808686375618, -0.011629593558609486, 0.000745651894249022, -0.03485706448554993, 0.021307529881596565, -0.06123310700058937, -0.009932275861501694, -0.03673772141337395, -0.031460829079151154, -0.016158409416675568, -0.016295546665787697, 0.02151014842092991, -0.02962818369269371, -0.020493680611252785, 0.002710151020437479, 0.023046785965561867, 0.01680569536983967, 0.0383027158677578, -0.0008490151376463473, 0.013806052505970001, -0.020186398178339005, -0.023984700441360474, -0.02561652660369873, 0.022189393639564514, -0.019099852070212364, -0.020308014005422592, 0.007396106608211994, -0.05701517313718796, 0.027363881468772888, -0.02941473200917244, 0.017616793513298035, 0.013901258818805218, 0.0411207340657711, 0.009175651706755161, -0.01657811366021633, -0.00808089692145586, -0.006724923849105835, -0.042894139885902405, -0.018898045644164085, -0.006251001730561256, -0.001825300743803382, -0.04948395863175392 ]
r-neo4j-london-meetup-group-how-many-events-do-people-come-to
https://markhneedham.com/blog/2015/05/09/r-neo4j-london-meetup-group-how-many-events-do-people-come-to
false
2015-05-31 22:33:54
Python: CSV writing - TypeError: 'builtin_function_or_method' object has no attribute '*getitem*'
[ "python" ]
[ "Python" ]
When I'm working in Python I often find myself writing to CSV files using the https://docs.python.org/2/library/csv.html[in built library] and every now and then make a mistake when calling writerow: [source,python] ---- import csv writer = csv.writer(file, delimiter=",") writer.writerow["player", "team"] ---- This results in the following error message: [source,text] ---- TypeError: 'builtin_function_or_method' object has no attribute '__getitem__' ---- The error message is a bit weird at first but it's basically saying that I've tried to do an http://stackoverflow.com/questions/13075632/typeerror-builtin-function-or-method-object-has-no-attribute-getitem[associative lookup on an object which doesn't support that operation]. The resolution is simply to include the appropriate parentheses instead of leaving them out! [source,python] ---- writer.writerow(["player", "team"]) ---- This one's for future Mark.
null
null
[ 0.019330749288201332, -0.0015796218067407608, -0.02344047650694847, -0.00009628801490180194, 0.07580912858247757, 0.043005526065826416, -0.005245448090136051, 0.026124916970729828, 0.01699000783264637, -0.020380765199661255, -0.0077286576852202415, 0.011089515872299671, -0.07517573237419128, 0.042130086570978165, -0.001751102157868445, 0.07616075128316879, 0.09559481590986252, 0.02536460943520069, 0.009370172396302223, -0.015379444696009159, 0.02360161766409874, 0.04670986533164978, -0.02417314238846302, 0.0314297154545784, -0.002808973425999284, -0.0032061489764600992, -0.01058358233422041, -0.02636587806046009, -0.035658955574035645, -0.0441705584526062, 0.0169382244348526, 0.015421895310282707, -0.00134409056045115, -0.020255770534276962, 0.007049085106700659, -0.03394808992743492, -0.01241364236921072, -0.000942824175581336, 0.008124805055558681, 0.028699729591608047, -0.06317250430583954, 0.020457809790968895, -0.010009907186031342, 0.009077734313905239, -0.05255024507641792, 0.030797814950346947, -0.015031348913908005, -0.0106534818187356, -0.04050793871283531, 0.020375756546854973, -0.06248685345053673, 0.032471172511577606, -0.01946721225976944, -0.004654257092624903, 0.03207062557339668, 0.06026880815625191, -0.009011268615722656, -0.07977534085512161, 0.03764478489756584, -0.041253261268138885, -0.007339742034673691, 0.003477550810202956, -0.023134946823120117, 0.017694009467959404, 0.057788338512182236, -0.029811859130859375, -0.01639699563384056, 0.05843900889158249, -0.06385773420333862, -0.026792969554662704, -0.036851104348897934, -0.03168024495244026, -0.041356101632118225, -0.022695517167448997, -0.04054062068462372, -0.04824892804026604, -0.0009458520216867328, 0.04733177274465561, 0.020555883646011353, 0.05476698651909828, 0.004397665150463581, 0.021463071927428246, 0.009995242580771446, 0.0026061851531267166, 0.0367729589343071, -0.027002250775694847, -0.020242486149072647, -0.01185072585940361, -0.02349378913640976, 0.051558759063482285, 0.009563996456563473, -0.0385298915207386, 0.018843278288841248, -0.009288343600928783, 0.014271620661020279, -0.017992660403251648, -0.0159729216247797, -0.000727898208424449, 0.03471657261252403, -0.0014499969547614455, -0.09514689445495605, -0.01731140725314617, 0.017882315441966057, 0.026228342205286026, -0.029024019837379456, -0.01305646263062954, 0.0011168598430231214, -0.030531592667102814, 0.012689861468970776, 0.02188955433666706, -0.011303036473691463, 0.005231575109064579, -0.018150294199585915, -0.019428692758083344, -0.09629637002944946, 0.03219987079501152, 0.020168397575616837, 0.0008611801313236356, -0.043218664824962616, 0.0571664534509182, 0.0683855190873146, 0.023195436224341393, -0.01076462958008051, 0.0576145239174366, 0.00965054426342249, 0.013701753690838814, -0.012535142712295055, 0.07251643389463425, 0.026397455483675003, -0.0707336887717247, -0.008222046308219433, 0.055615417659282684, -0.03555755317211151, 0.016864711418747902, -0.013139121234416962, -0.014364214614033699, -0.032601069658994675, 0.02432628907263279, 0.01529532577842474, 0.020837392657995224, -0.014232764020562172, -0.025238757953047752, 0.00172429031226784, 0.025492344051599503, 0.011325371451675892, 0.028589224442839622, -0.014983480796217918, -0.009170002304017544, 0.009434021078050137, 0.019442467018961906, -0.006459879223257303, 0.013306179083883762, 0.07833642512559891, -0.010333395563066006, 0.010254465974867344, 0.09020549058914185, 0.037742264568805695, 0.04084738716483116, -0.028956398367881775, 0.02069789543747902, 0.06898412853479385, 0.07113324105739594, 0.004499202594161034, 0.05311289802193642, -0.018558677285909653, -0.02847963571548462, -0.015519557520747185, 0.04033074527978897, -0.0030983330216258764, -0.018572185188531876, -0.0463540144264698, -0.07110676914453506, 0.06306170672178268, -0.02207297645509243, 0.024632781744003296, -0.003995344042778015, 0.07848744094371796, 0.011407049372792244, 0.06491203606128693, 0.02737390622496605, -0.07559551298618317, 0.044489145278930664, -0.03462536633014679, -0.003931946121156216, 0.023853877559304237, 0.004298668820410967, 0.07782546430826187, 0.02245977520942688, -0.014963099732995033, 0.03416324406862259, -0.051527220755815506, -0.06511589884757996, -0.04509200155735016, 0.006613788660615683, 0.039949316531419754, -0.042145051062107086, -0.06166895106434822, 0.06798543781042099, 0.020931126549839973, 0.01599225029349327, -0.0159597247838974, -0.02217875048518181, -0.03005133755505085, -0.029943441972136497, -0.03900661692023277, 0.041365381330251694, 0.05880202725529671, 0.013606236316263676, -0.008933594450354576, 0.033714618533849716, -0.017536763101816177, 0.06047578528523445, 0.048814937472343445, -0.0017296919832006097, 0.0384197011590004, 0.05401955172419548, 0.03454165533185005, -0.027929440140724182, 0.04272902011871338, -0.06318039447069168, 0.02121759206056595, -0.0069554150104522705, -0.024810589849948883, -0.04271942377090454, -0.01365627907216549, 0.13431549072265625, 0.04851711913943291, -0.017937524244189262, -0.0591854453086853, -0.014669605530798435, -0.02619190700352192, -0.024364007636904716, 0.01983139105141163, -0.014238349162042141, -0.051603469997644424, 0.047747209668159485, -0.016912253573536873, 0.0019681795965880156, -0.0021582585759460926, -0.03467279672622681, 0.016594108194112778, 0.06423546373844147, -0.012247614562511444, 0.04085434973239899, -0.007083458825945854, -0.029898863285779953, 0.0065659936517477036, -0.028460422530770302, -0.03913970664143562, -0.010682933032512665, 0.030438823625445366, -0.00007534916221629828, 0.07266215980052948, -0.03298615664243698, -0.05676056817173958, -0.03912302479147911, -0.06514398753643036, 0.006953277159482241, 0.08969906717538834, 0.028693892061710358, -0.0007248239708133042, 0.05235777422785759, -0.03480802848935127, 0.013422990217804909, -0.016955209895968437, -0.032225288450717926, -0.031583111733198166, 0.011084619909524918, 0.03471727296710014, 0.017822790890932083, 0.014139152131974697, 0.016836082562804222, 0.003978088963776827, 0.0057287272065877914, 0.01919429376721382, 0.032475557178258896, 0.04923349991440773, -0.02787475846707821, -0.0000784938019933179, -0.07001182436943054, -0.004580570850521326, 0.03073900379240513, -0.007681706920266151, -0.050851065665483475, 0.03125431016087532, -0.06243940070271492, -0.016847677528858185, -0.05758046358823776, -0.05754132196307182, -0.043248843401670456, -0.01038428209722042, 0.007779813837260008, -0.033788133412599564, -0.0024431091733276844, 0.04295732453465462, 0.04108026623725891, -0.004478235263377428, -0.0025364772882312536, -0.01440521888434887, 0.017106784507632256, 0.024349557235836983, 0.04314041510224342, 0.06550212949514389, 0.00249907816760242, -0.008450624532997608, -0.0047677056863904, -0.0021980719175189734, -0.03292452171444893, -0.2634141743183136, 0.045701585710048676, -0.03592408820986748, -0.018926819786429405, 0.024845559149980545, -0.021084746345877647, -0.007726367097347975, -0.04167155548930168, -0.04469585418701172, 0.01813892088830471, -0.029493987560272217, -0.0349600613117218, -0.021953890100121498, 0.0679016262292862, 0.025105580687522888, 0.04374068230390549, -0.02349986881017685, -0.027898216620087624, -0.014656825922429562, 0.0504428967833519, -0.008125961758196354, -0.02719901129603386, -0.021085981279611588, 0.04287289083003998, 0.02344457246363163, 0.021437915042042732, -0.04950890690088272, 0.034066494554281235, -0.0646231472492218, -0.05489511415362358, 0.009206575341522694, -0.016547728329896927, -0.00878642313182354, -0.014708967879414558, -0.016344193369150162, -0.017546771094202995, 0.02765210159122944, 0.004456378985196352, 0.018604550510644913, -0.014360758475959301, -0.04680663347244263, -0.03957834094762802, -0.023113349452614784, -0.011121799238026142, 0.06324397772550583, -0.019753415137529373, -0.06627216935157776, -0.007457235362380743, -0.07959458231925964, 0.06896492093801498, -0.05066097155213356, -0.04206221178174019, -0.006468052510172129, 0.033257562667131424, -0.009157988242805004, -0.013780871406197548, 0.00899223517626524, -0.0075964611023664474, -0.018643567338585854, -0.01863926462829113, -0.01938096433877945, -0.03732522949576378, 0.010237297974526882, -0.0501345619559288, -0.006939784158021212, -0.057420916855335236, -0.07020367681980133, -0.018634699285030365, 0.04414663091301918, 0.05194117873907089, -0.05536501482129097, 0.01741694286465645, -0.013538951985538006, -0.08513805270195007, 0.01276842039078474, -0.03950253129005432, -0.015184041112661362, -0.006305557209998369, -0.021647321060299873, 0.03340064734220505, -0.029310068115592003, -0.05602726340293884, 0.0050990222953259945, 0.003255430143326521, -0.003748054150491953, -0.002225397154688835, 0.03460896015167236, -0.02569684572517872, -0.03583907335996628, -0.020944053307175636, 0.09637264907360077, 0.014150423929095268, 0.012154975906014442, -0.007282756268978119, -0.03752585127949715, 0.01861332356929779, 0.01992456056177616, -0.012102358043193817, 0.03824889659881592, 0.01155452523380518, 0.03832743689417839, -0.032211001962423325, -0.013318815268576145, -0.045689478516578674, -0.011753939092159271, -0.004839318338781595, -0.025052644312381744, 0.0341142974793911, 0.0397496372461319, -0.006017239764332771, -0.003788079833611846, 0.023222634568810463, 0.026580778881907463, -0.033322304487228394, -0.015427006408572197, 0.008362912572920322, 0.02218424715101719, 0.008978050202131271, 0.016773808747529984, -0.010676572099328041, -0.0461893267929554, 0.02822161838412285, 0.0070357113145291805, -0.017539385706186295, -0.06333854794502258, -0.022846641018986702, 0.0043962025083601475, -0.0073112985119223595, -0.02043554186820984, -0.00132664549164474, -0.04480760917067528, 0.01774156652390957, 0.055388692766427994, -0.008119978941977024, 0.007765242829918861, -0.028642261400818825, -0.04047577455639839, -0.003457616316154599, -0.022313011810183525, -0.005999508313834667, 0.00978813599795103, -0.009515666402876377, -0.040242020040750504, 0.012027198448777199, 0.051573824137449265, -0.008676311932504177, 0.022331971675157547, 0.04484999179840088, -0.005399908404797316, 0.010880669578909874, 0.0017983478028327227, -0.0162537582218647, 0.013972455635666847, -0.0224764384329319, -0.04161916300654411, 0.021046046167612076, 0.03542887791991234, 0.020808547735214233, -0.003249318106099963, -0.010816817171871662, 0.043342188000679016, -0.03568064793944359, -0.009129387326538563, 0.006039947737008333, 0.0004060108039993793, 0.036302611231803894, -0.005936179775744677, 0.010116633027791977, 0.013172976672649384, 0.048214226961135864, 0.02130204066634178, 0.02275763265788555, -0.01019845250993967, 0.0018551566172391176, -0.008423610590398312, -0.0013683809665963054, 0.04595033451914787, 0.020090853795409203, 0.0039560068398714066, -0.0018811528570950031, -0.036578819155693054, -0.052975818514823914, 0.017589323222637177, 0.001985292648896575, 0.03266332671046257, 0.0078929727897048, -0.025429684668779373, -0.01718028262257576, -0.03204602003097534, -0.023749908432364464, -0.04533820599317551, -0.031794480979442596, -0.0011464119888842106, 0.013465870171785355, -0.01520772185176611, -0.07200217992067337, 0.06030120700597763, 0.021306971088051796, -0.01996743306517601, -0.018662534654140472, -0.017111746594309807, -0.010212716646492481, -0.03757164999842644, -0.0066178906708955765, 0.0453031100332737, -0.0620553083717823, -0.003423744812607765, -0.04496093839406967, 0.03807568550109863, 0.03429163247346878, 0.013711562380194664, -0.0087471017614007, -0.04870940372347832, 0.023311221972107887, 0.025711137801408768, -0.006383624393492937, -0.005116166081279516, -0.026176657527685165, -0.007857426069676876, -0.024553466588258743, 0.012911663390696049, 0.031379275023937225, 0.03481017425656319, -0.010756969451904297, -0.03837812319397926, 0.023579735308885574, 0.004672192968428135, -0.023975307121872902, 0.028395839035511017, 0.0016304566524922848, 0.04420485347509384, -0.029957126826047897, 0.04033192619681358, 0.020717747509479523, -0.012528502382338047, -0.04488494247198105, -0.043508682399988174, -0.012566340155899525, -0.007106615696102381, 0.006905148737132549, 0.01934441551566124, -0.021303512156009674, -0.022077877074480057, 0.005875615403056145, -0.013703922741115093, -0.006820597220212221, -0.03940896689891815, -0.023998836055397987, -0.012238409370183945, 0.07853896915912628, -0.010002152994275093, 0.026828963309526443, 0.04163297265768051, -0.03891095519065857, 0.037507496774196625, -0.057098984718322754, -0.04075179621577263, -0.010263193398714066, -0.028191857039928436, 0.029835084453225136, 0.012692130170762539, 0.032958272844552994, -0.05480252578854561, 0.06407681852579117, 0.023792019113898277, 0.005073551554232836, 0.031591422855854034, 0.0014954122016206384, 0.0347638837993145, -0.00741360429674387, 0.00990933645516634, -0.09064522385597229, 0.007481565698981285, 0.05817257985472679, 0.019949553534388542, -0.06359648704528809, -0.04901601001620293, -0.025421399623155594, 0.02500992640852928, -0.052221037447452545, -0.03988094627857208, 0.06380219012498856, 0.017482761293649673, 0.05027836561203003, -0.0013422787887975574, -0.023849351331591606, 0.033238038420677185, 0.0430632010102272, -0.03793587163090706, -0.025458840653300285, -0.0607573501765728, 0.049503713846206665, 0.005510296206921339, 0.014575186185538769, -0.004563671536743641, -0.021919796243309975, 0.03642240911722183, 0.038097500801086426, 0.06374411284923553, 0.0031457238364964724, -0.017336571589112282, 0.04773768410086632, 0.05888766795396805, -0.009359298273921013, 0.03512841463088989, 0.007768094073981047, -0.008214175701141357, -0.0586031973361969, 0.006314888596534729, 0.047877855598926544, 0.014669683761894703, -0.023286225274205208, 0.04844055324792862, -0.03554252162575722, -0.012698515318334103, -0.03957533463835716, 0.009060213342308998, -0.03405196964740753, -0.005749993026256561, -0.03503916412591934, -0.03977188840508461, -0.05345998331904411, 0.049193769693374634, -0.004521820228546858, -0.015213104896247387, 0.05898843705654144, -0.033753614872694016, -0.01760391891002655, -0.005712984129786491, 0.07066471129655838, 0.05396536737680435, 0.028330065310001373, -0.0012853032676503062, 0.04333335533738136, -0.007497849408537149, -0.056787099689245224, 0.021102890372276306, -0.05251484736800194, 0.027582552284002304, 0.012632900848984718, 0.007417535409331322, 0.06412950158119202, 0.009781754575669765, 0.05753548815846443, -0.04410469904541969, 0.035165417939424515, -0.016680428758263588, 0.015132219530642033, 0.004817724693566561, 0.027736671268939972, 0.023958733305335045, 0.024495715275406837, -0.023928746581077576, -0.03144500032067299, -0.017427733168005943, -0.022437574341893196, -0.016585566103458405, 0.05139506235718727, -0.004029175732284784, 0.013759291730821133, 0.02311120368540287, 0.043256975710392, 0.0810200423002243, -0.024415673688054085, -0.005676322616636753, -0.011477002874016762, 0.03631221130490303, -0.015489578247070312, 0.009111964143812656, -0.005628212820738554, 0.010751147754490376, 0.014811649918556213, -0.0439935140311718, 0.011412348598241806, -0.03033389337360859, -0.020973876118659973, 0.05530605837702751, -0.007537477649748325, 0.003868045751005411, 0.006632738281041384, -0.021006323397159576, -0.024668661877512932, -0.06408974528312683, -0.03544098511338234, -0.05064240097999573, -0.07636500149965286, -0.00453603733330965, 0.03723069280385971, -0.01490370649844408, -0.06394065916538239, -0.06962993741035461, -0.028844701126217842, -0.0018368944292888045, 0.020198961719870567, -0.049005378037691116, -0.0166927520185709, 0.03936503082513809, 0.028385719284415245, 0.001476585166528821, 0.03870809078216553, 0.01846056617796421, -0.018006661906838417, -0.028074869886040688, 0.009595926851034164, -0.01823575794696808, 0.02301141247153282, 0.030040407553315163, 0.01684778742492199, -0.06063735857605934, 0.01178829651325941, 0.04855729639530182, -0.00015964328486006707, -0.07530096173286438, 0.016867369413375854, 0.07350802421569824, -0.005371269769966602, 0.0657501146197319, -0.0077446866780519485, 0.022970473393797874, -0.05066212639212608, 0.019114790484309196, -0.002504742471501231, 0.0036593121476471424, 0.05243237689137459, -0.011588387191295624, 0.058180440217256546, 0.05447578430175781, -0.006394667085260153, -0.007701356429606676, -0.03229600936174393, -0.036155544221401215, 0.012248708866536617, -0.060067251324653625, -0.021173570305109024, -0.057337354868650436, -0.03941766172647476, -0.005086091347038746, -0.003147394396364689, -0.014291654340922832, 0.009199123829603195, 0.02505320869386196, 0.02029258944094181, -0.03329072147607803, 0.05414718762040138, -0.06716477870941162, 0.012950471602380276, -0.02343439683318138, -0.022997839376330376, -0.010281708091497421, 0.0648365467786789, 0.0543135367333889, -0.015094190835952759, 0.010358653962612152, -0.023139409720897675, 0.0224305447191, -0.025485046207904816, -0.021522823721170425, 0.04674512520432472, -0.02475738152861595, 0.013099235482513905 ]
[ -0.0832671970129013, -0.012163421139121056, -0.01569894701242447, -0.02995603159070015, 0.04804793372750282, -0.06739350408315659, 0.014655900187790394, 0.02338603138923645, 0.018070481717586517, -0.005423188675194979, 0.004589037504047155, -0.05880463495850563, -0.0010156588396057487, -0.029562028124928474, 0.03635139390826225, -0.007251868490129709, -0.022602541372179985, -0.04876938834786415, -0.03255545347929001, 0.023663634434342384, -0.004707797896116972, -0.03473910689353943, -0.04017326608300209, -0.05391525477170944, 0.014782112091779709, 0.03209811821579933, 0.01893557980656624, -0.013706179335713387, -0.0658687874674797, -0.21258074045181274, -0.016895070672035217, -0.004605516791343689, 0.026178350672125816, -0.029007840901613235, 0.0520855113863945, 0.014656169340014458, 0.015170992352068424, 0.001852676272392273, -0.009631691500544548, 0.05177311599254608, 0.044731657952070236, 0.024395696818828583, -0.0486488938331604, -0.0048089297488331795, 0.023201895877718925, 0.014339220710098743, -0.00030401480034925044, -0.04277315363287926, 0.0062504359520971775, 0.01508144848048687, -0.074189193546772, 0.0006130152032710612, -0.032551154494285583, -0.04407656937837601, -0.0047186557203531265, 0.021505029872059822, 0.030068591237068176, 0.08370672911405563, 0.033993251621723175, 0.025462152436375618, 0.00409628264605999, -0.017807336524128914, -0.1561473309993744, 0.10407742857933044, 0.0185087863355875, 0.042282987385988235, -0.05406826734542847, -0.01789582334458828, -0.02837514877319336, 0.09096650034189224, 0.0031247108709067106, -0.040057409554719925, -0.04524650797247887, 0.09397251904010773, 0.006415368523448706, -0.014810641296207905, -0.02219907008111477, -0.012929657474160194, 0.04459771141409874, -0.01037508063018322, -0.0714494064450264, -0.017653627321124077, 0.011751016601920128, -0.018220797181129456, -0.011377867311239243, 0.013307088054716587, -0.008943667635321617, 0.042235665023326874, 0.05959551781415939, 0.005560147110372782, 0.046806901693344116, -0.02318488620221615, 0.04075110703706741, 0.053079623728990555, -0.06509943306446075, -0.029475580900907516, 0.03798706457018852, -0.007074499968439341, -0.048379283398389816, 0.4219099283218384, -0.05616335570812225, -0.023030560463666916, 0.04797401279211044, 0.031105224043130875, 0.013217595405876637, -0.005641262978315353, -0.012384014204144478, -0.048825640231370926, -0.008535397239029408, -0.05678898096084595, -0.00610327860340476, 0.0015469136415049434, 0.04980319365859032, -0.059076543897390366, 0.011811373755335808, 0.026525188237428665, -0.00919234100729227, -0.003329284256324172, -0.049528662115335464, 0.0417691208422184, 0.009589997120201588, -0.023908626288175583, 0.014761684462428093, 0.04076267033815384, -0.006753206253051758, -0.014132567681372166, 0.038798920810222626, 0.10720530897378922, 0.04142970219254494, 0.0017012268071994185, 0.03422074019908905, -0.016846511512994766, -0.08312911540269852, -0.005141249857842922, 0.020123744383454323, 0.02067635953426361, 0.022049296647310257, -0.02972678653895855, 0.011383561417460442, -0.0032753595151007175, 0.038428522646427155, -0.06839818507432938, 0.00840764120221138, 0.03925596922636032, -0.0046400283463299274, 0.10919792950153351, -0.01969408616423607, -0.013669026084244251, -0.02108517847955227, -0.041019976139068604, -0.007203626912087202, 0.03267067298293114, -0.006862706504762173, -0.04979431629180908, 0.03086959943175316, 0.017988501116633415, 0.065053790807724, -0.025175457820296288, -0.0543244294822216, -0.03158227726817131, -0.04586925357580185, -0.04979798570275307, -0.040639884769916534, 0.020664779469370842, 0.005432834383100271, -0.09266214072704315, -0.02702171355485916, 0.0107505451887846, 0.000837633793707937, -0.0788692831993103, 0.011809944175183773, -0.014152868650853634, -0.061386335641145706, -0.01962304301559925, 0.028291724622249603, -0.02018035389482975, -0.03578925505280495, 0.005395061802119017, 0.059220775961875916, 0.05298209562897682, 0.014363567344844341, 0.03658727556467056, -0.04472077637910843, 0.027691837400197983, -0.02306446246802807, -0.06977751851081848, -0.055306993424892426, -0.027362754568457603, -0.013184631243348122, -0.018101384863257408, -0.0029730009846389294, -0.0118939820677042, -0.041768502444028854, 0.01044248603284359, -0.049621179699897766, 0.00697898305952549, 0.045883551239967346, 0.007958213798701763, 0.004175793845206499, -0.04543013125658035, 0.004210141021758318, 0.024044418707489967, -0.017279542982578278, 0.026243221014738083, -0.05347096920013428, 0.01985391601920128, 0.047172561287879944, -0.020397931337356567, 0.04906069114804268, 0.0198212843388319, -0.04610258340835571, -0.05460995063185692, -0.01347958855330944, 0.015016610734164715, -0.0422755591571331, -0.004967459477484226, -0.02871876209974289, -0.007415990810841322, 0.0303041934967041, 0.019856516271829605, -0.06612297892570496, -0.052330631762742996, -0.01776200346648693, -0.34638383984565735, -0.019592493772506714, 0.0037027187645435333, -0.019623037427663803, -0.002938126679509878, -0.0265714880079031, -0.009168592281639576, -0.00041886104736477137, -0.04712492600083351, 0.039231546223163605, 0.06305576115846634, -0.020869538187980652, 0.019450290128588676, -0.08339007943868637, -0.013178838416934013, 0.021607371047139168, -0.02634000964462757, -0.0293519776314497, -0.003763826098293066, 0.08348073810338974, -0.009014109149575233, -0.02588873915374279, -0.013301483355462551, -0.050555743277072906, 0.015793167054653168, -0.033802587538957596, 0.10204405337572098, 0.024062132462859154, 0.08829060941934586, -0.011659611016511917, 0.05527506396174431, 0.03495732694864273, 0.003967808093875647, -0.0929117500782013, -0.002859594998881221, -0.023064078763127327, -0.0031728409230709076, 0.04623144492506981, -0.0009690541191957891, -0.027582231909036636, -0.021461281925439835, 0.04288928210735321, -0.022640826180577278, -0.0007171198958531022, -0.006949674803763628, 0.019113387912511826, -0.0015644971281290054, -0.02757157012820244, -0.020467961207032204, 0.08738505095243454, 0.011853797361254692, 0.0465899258852005, 0.04646866023540497, 0.04449274763464928, 0.0039968714118003845, -0.014079970307648182, -0.0685618594288826, 0.024145115166902542, 0.01245858147740364, -0.00853284914046526, 0.0507146455347538, 0.012238746508955956, 0.06896735727787018, -0.040837790817022324, -0.014864698983728886, -0.01958526484668255, 0.043378300964832306, 0.005984493996948004, 0.03522443398833275, -0.007879471406340599, -0.0030208108946681023, 0.10430611670017242, -0.0029099781531840563, 0.02592151053249836, 0.0012148329988121986, 0.04485994204878807, 0.004048096481710672, 0.03341691568493843, 0.019264589995145798, -0.018946433439850807, 0.03509850054979324, 0.009679344482719898, 0.02367054671049118, -0.02242748998105526, 0.04993667080998421, 0.04177599400281906, -0.02162802964448929, 0.026280999183654785, 0.06535803526639938, -0.015042825601994991, -0.024647103622555733, -0.012591643258929253, -0.02869572676718235, 0.022766683250665665, 0.050677474588155746, -0.0037994058802723885, -0.26488205790519714, 0.004356494173407555, 0.04585014656186104, 0.04294260963797569, 0.019945161417126656, 0.009462425485253334, 0.01212407648563385, -0.05059637874364853, -0.02071571536362171, 0.023932453244924545, 0.015481831505894661, 0.0035235113464295864, -0.007928979583084583, 0.003448741976171732, -0.008794949389994144, -0.02236689254641533, 0.0643906369805336, 0.01056848093867302, 0.026307297870516777, 0.03209111467003822, 0.04627135768532753, 0.00495106540620327, 0.17679879069328308, -0.026706093922257423, 0.03977873921394348, 0.0006803404539823532, 0.001965275965631008, -0.0009599528275430202, 0.048743221908807755, 0.032486412674188614, 0.00029941939283162355, -0.03457162156701088, 0.05623374134302139, 0.03454139083623886, 0.021110596135258675, -0.03673384338617325, -0.0006711657624691725, 0.027377214282751083, 0.03460372984409332, -0.035426896065473557, -0.050328608602285385, 0.013590010814368725, -0.060076091438531876, 0.010092935524880886, 0.03688933327794075, 0.04281384497880936, -0.013790530152618885, -0.051670901477336884, -0.041667789220809937, -0.0014782791258767247, -0.022530650720000267, -0.016297517344355583, -0.01491591613739729, 0.025263585150241852, 0.0126289501786232, 0.05379822477698326, 0.05091148242354393, -0.0020351496059447527, 0.009578594006597996, 0.03482987359166145, -0.0030793037731200457, -0.05786994472146034, 0.12190959602594376, 0.05937407910823822, -0.034288790076971054 ]
[ -0.0022830318193882704, 0.0211346335709095, -0.004597484599798918, 0.02958456240594387, -0.008296534419059753, 0.01288493350148201, -0.024827009066939354, -0.02973748929798603, 0.0022963073570281267, 0.006042836233973503, -0.019021769985556602, 0.01612505130469799, -0.003645395627245307, -0.04463152214884758, 0.039795368909835815, -0.038390468806028366, -0.008427807129919529, -0.026612503454089165, 0.016512274742126465, -0.007406075485050678, -0.023363543674349785, 0.018935833126306534, -0.0276102963835001, 0.03753042221069336, 0.01017124392092228, -0.0427856408059597, -0.03369787707924843, 0.014589836820960045, 0.005700878333300352, -0.09781050682067871, -0.07451415807008743, -0.02955516055226326, 0.029402408748865128, 0.04150688275694847, 0.004508769139647484, 0.024199623614549637, 0.010495815426111221, 0.016966408118605614, -0.05349060520529747, -0.002362512517720461, -0.02283991314470768, 0.014256649650633335, 0.009278517216444016, 0.016049589961767197, -0.05706096813082695, 0.02215578407049179, -0.017294734716415405, -0.03022066503763199, 0.009732741862535477, 0.014781961217522621, -0.08544233441352844, 0.02113829366862774, -0.005174361169338226, -0.04204535856842995, 0.06040586158633232, -0.023386288434267044, -0.0071164690889418125, -0.0043403347954154015, 0.010918021202087402, -0.07019364088773727, 0.009797451086342335, -0.03289001062512398, -0.026000604033470154, -0.018398461863398552, -0.0048484960570931435, -0.028399793431162834, -0.006563952192664146, 0.04446446895599365, -0.023745646700263023, 0.007870546542108059, 0.004132336936891079, -0.0019416892901062965, 0.0022342470474541187, -0.04277544096112251, 0.00168665312230587, 0.009120134636759758, -0.014540733769536018, -0.04947379603981972, 0.03792532533407211, -0.025179151445627213, -0.04792608320713043, -0.005941950716078281, -0.0011384974932298064, 0.016597120091319084, -0.002978201722726226, -0.00019224168499931693, -0.018974745646119118, 0.025008508935570717, -0.02230205573141575, 0.0257300715893507, 0.00035651098005473614, 0.01508279051631689, 0.02718043327331543, 0.020145412534475327, -0.0743531659245491, 0.05161300301551819, 0.016970699653029442, -0.040297433733940125, -0.006882756482809782, 0.8166102170944214, -0.015835314989089966, -0.0010944248642772436, 0.03334727883338928, -0.017986346036195755, 0.01851116120815277, -0.003894556313753128, -0.002549770288169384, -0.02149532176554203, 0.007912333123385906, -0.029200641438364983, 0.02811814844608307, 0.003096719039604068, -0.016635151579976082, 0.006073747295886278, 0.02902938425540924, 0.023707928135991096, -0.01902472786605358, 0.026961414143443108, -0.025330906733870506, -0.007127862889319658, 0.025004079565405846, -0.013493922539055347, -0.024857819080352783, 0.019193314015865326, -0.00826052576303482, -0.1612379252910614, 0.02281581424176693, -7.120505602228158e-33, 0.03213406354188919, -0.011804013513028622, 0.0074284677393734455, 0.03391019627451897, 0.026022592559456825, 0.03515232726931572, 0.023991307243704796, 0.06911935657262802, -0.031754471361637115, -0.036870747804641724, -0.012487592175602913, -0.0112924724817276, 0.023654749616980553, 0.017813578248023987, 0.044477593153715134, -0.02942845970392227, -0.023689132183790207, 0.01726684346795082, -0.011516132391989231, 0.004393948707729578, 0.06848672032356262, 0.01798529177904129, 0.044401753693819046, 0.01994510181248188, -0.0031434863340109587, 0.02171640656888485, -0.02591397799551487, -0.020230498164892197, -0.04599088430404663, -0.03687630966305733, -0.0415649339556694, 0.02153332717716694, -0.0018611008999869227, -0.04187573865056038, 0.017985500395298004, -0.05406652018427849, -0.027785038575530052, -0.006287978030741215, -0.03490153327584267, -0.0018534485716372728, -0.053825341165065765, -0.005793898366391659, -0.03348046541213989, -0.02593490108847618, -0.038333676755428314, -0.005823633633553982, -0.006718052551150322, 0.016744796186685562, 0.018403127789497375, 0.016725042834877968, 0.02292441576719284, 0.020388294011354446, 0.02998610958456993, -0.01712718792259693, 0.013398518785834312, 0.0033872330095618963, 0.003150489181280136, 0.018702678382396698, 0.014148881658911705, -0.04462452605366707, 0.05418179929256439, 0.01722702756524086, 0.0008012015605345368, 0.014294304884970188, 0.003935853950679302, 0.025434188544750214, 0.04522009193897247, 0.0416521355509758, 0.04706515744328499, -0.023915577679872513, -0.009916926734149456, 0.011098240502178669, -0.030077196657657623, -0.005586323793977499, 0.030425546690821648, 0.008546479046344757, -0.019653553143143654, -0.027617130428552628, 0.01000891625881195, 0.020038509741425514, -0.01790444180369377, -0.007796838413923979, 0.008768563158810139, -0.040510695427656174, -0.025453748181462288, 0.022097272798419, 0.02750653214752674, 0.008147280663251877, -0.022671513259410858, 0.03590698540210724, -0.003318389877676964, 0.0029357122257351875, 0.00787084735929966, 0.0024444092996418476, -0.03947468474507332, 6.387348306252359e-33, 0.020915310829877853, -0.024714196100831032, 0.0020633244421333075, -0.011799155734479427, 0.02711224928498268, -0.03049374185502529, -0.017118293792009354, -0.006502396892756224, -0.021099206060171127, 0.023692170158028603, -0.007805649656802416, -0.027355868369340897, 0.006730763707309961, 0.004512441344559193, 0.0336868092417717, -0.009901327081024647, -0.024983296170830727, 0.006904971785843372, 0.025861458852887154, -0.0763019472360611, -0.009098967537283897, -0.012650021351873875, 0.05850525572896004, 0.014819590374827385, 0.05329171195626259, -0.0043262941762804985, -0.025075731799006462, -0.027339782565832138, -0.005394194275140762, 0.006582034286111593, 0.011181158944964409, -0.01722528040409088, -0.01210662629455328, -0.016011007130146027, -0.015285138040781021, 0.017286118119955063, -0.006574386730790138, -0.013135813176631927, 0.0286406222730875, 0.009615198709070683, 0.06403012573719025, 0.024994568899273872, -0.021580426022410393, 0.03795953467488289, 0.025348730385303497, 0.026312725618481636, -0.0002732074644882232, -0.0038384823128581047, 0.01676229201257229, 0.02874692715704441, 0.017205730080604553, 0.0058373515494167805, 0.03091343678534031, -0.003175034886226058, 0.05327220633625984, -0.0030578547157347202, 0.003694291692227125, -0.010574225336313248, -0.04005257412791252, -0.024626750499010086, -0.05156255140900612, -0.022953398525714874, -0.003985572140663862, 0.024388184770941734, -0.03025558590888977, 0.032495591789484024, -0.05232871696352959, 0.05498568341135979, 0.01550331525504589, -0.02856513299047947, -0.013067006133496761, 0.007823661901056767, -0.014112935401499271, 0.024827945977449417, -0.07280498743057251, 0.03733446076512337, -0.0010049819247797132, 0.01045964565128088, -0.016977690160274506, 0.016943322494626045, 0.021562054753303528, -0.013551069423556328, 0.023014681413769722, 0.056067876517772675, 0.0008389022550545633, 0.04051339253783226, -0.0070105078630149364, 0.016730790957808495, 0.027756603434681892, 0.022018490359187126, 0.0022599513176828623, -0.0240901131182909, 0.030914457514882088, 0.015095994807779789, -0.018027139827609062, -1.2789860726059032e-8, -0.04473663493990898, 0.03610576316714287, -0.03319907560944557, 0.006513442378491163, 0.009905735030770302, 0.032989148050546646, 0.007215932942926884, -0.026364795863628387, 0.004417204298079014, 0.027014849707484245, 0.03296024352312088, -0.08557718247175217, 0.0052855368703603745, 0.008007933385670185, 0.027096088975667953, -0.005894153844565153, -0.006252832245081663, -0.006198061630129814, 0.013062153942883015, -0.003404029877856374, 0.018878286704421043, 0.009275635704398155, -0.024457737803459167, 0.029840046539902687, -0.007318419404327869, -0.007585431449115276, -0.04339096322655678, -0.11074089258909225, -0.015890466049313545, 0.005954862106591463, 0.004654652904719114, -0.0489736869931221, -0.050131458789110184, 0.021936597302556038, 0.024143310263752937, -0.027911996468901634, 0.006203512195497751, -0.0023682015016674995, 0.024857064709067345, 0.03940494358539581, -0.007844297215342522, 0.035778965801000595, -0.012702119536697865, -0.026066258549690247, 0.02381274476647377, -0.05019440874457359, -0.05457209423184395, -0.027640406042337418, -0.016014331951737404, -0.03312698379158974, 0.01869184896349907, -0.004418765194714069, 0.014782503247261047, 0.0363394096493721, 0.011088073253631592, 0.035019513219594955, -0.008588917553424835, 0.02793462760746479, -0.004381196573376656, -0.046555567532777786, 0.04221523925662041, 0.006212940905243158, -0.026012085378170013, -0.009632148779928684 ]
python-csv-writing-typeerror-builtin_function_or_method-object-has-no-attribute-__getitem__
https://markhneedham.com/blog/2015/05/31/python-csv-writing-typeerror-builtin_function_or_method-object-has-no-attribute-__getitem__
false
2015-05-31 23:11:50
R: Think Bayes Euro Problem
[ "r-2", "rstats" ]
[ "R" ]
I've got back to working my way through http://www.greenteapress.com/thinkbayes/[Think Bayes] after a month's break and started out with the one euro coin problem in Chapter 4: ____ A statistical statement appeared in "`The Guardian" on Friday January 4, 2002: When spun on edge 250 times, a Belgian one-euro coin came up heads 140 times and tails 110. '`It looks very suspicious to me,`' said Barry Blight, a statistics lecturer at the London School of Economics. '`If the coin were unbiased, the chance of getting a result as extreme as that would be less than 7%.`' But do these data give evidence that the coin is biased rather than fair? ____ We're going to create a data frame with each row representing the probability that heads shows up that often. We need one row for each value between 0 (no heads) and 100 (all heads) and we'll start with the assumption that each value can be chosen equally (a uniform prior): [source,r] ---- library(dplyr) values = seq(0, 100) scores = rep(1.0 / length(values), length(values)) df = data.frame(score = scores, value = values) > df %>% sample_n(10) score value 60 0.00990099 59 101 0.00990099 100 10 0.00990099 9 41 0.00990099 40 2 0.00990099 1 83 0.00990099 82 44 0.00990099 43 97 0.00990099 96 100 0.00990099 99 12 0.00990099 11 ---- Now we need to feed in our observations. We need to create a vector containing 140 heads and 110 tails. The 'rep' function comes in handy here: [source,r] ---- observations = c(rep("T", times = 110), rep("H", times = 140)) > observations [1] "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" [29] "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" [57] "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" [85] "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "T" "H" "H" [113] "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" [141] "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" [169] "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" [197] "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" [225] "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" "H" ---- Now we need to iterate over each of the observations and update our data frame appropriately. [source,r] ---- for(observation in observations) { if(observation == "H") { df = df %>% mutate(score = score * (value / 100.0)) } else { df = df %>% mutate(score = score * (1.0 - (value / 100.0))) } } df = df %>% mutate(weighted = score / sum(score)) ---- Now that we've done that we can calculate the maximum likelihood, mean, median and credible interval. We'll create a 'percentile' function to help us out: [source,r] ---- percentile = function(df, p) { df %>% filter(cumsum(weighted) > p) %>% head(1) %>% select(value) %>% as.numeric } ---- And now let's calculate the values: [source,r] ---- # Maximum likelihood > df %>% filter(weighted == max(weighted)) %>% select(value) %>% as.numeric [1] 56 # Mean > df %>% mutate(mean = value * weighted) %>% select(mean) %>% sum [1] 55.95238 # Median > percentile(df, 0.5) [1] 56 # Credible Interval percentage = 90 prob = (1 - percentage / 100.0) / 2 # lower > percentile(df, prob) [1] 51 # upper > percentile(df, 1 - prob) [1] 61 ---- This all wraps up nicely into a function: [source,r] ---- euro = function(values, priors, observations) { df = data.frame(score = priors, value = values) for(observation in observations) { if(observation == "H") { df = df %>% mutate(score = score * (value / 100.0)) } else { df = df %>% mutate(score = score * (1.0 - (value / 100.0))) } } return(df %>% mutate(weighted = score / sum(score))) } ---- which we can call like so: [source,r] ---- values = seq(0,100) priors = rep(1.0 / length(values), length(values)) observations = c(rep("T", times = 110), rep("H", times = 140)) df = euro(values, priors, observations) ---- The next part of the problem requires us to change the prior distribution to be more weighted to values close to 50%. We can tweak the parameters we pass into the function accordingly: [source,r] ---- values = seq(0,100) priors = sapply(values, function(x) ifelse(x < 50, x, 100 - x)) priors = priors / sum(priors) observations = c(rep("T", times = 110), rep("H", times = 140)) df = euro(values, priors, observations) ---- In fact even with the adjusted priors we still end up with the same posterior distribution: [source,r] ---- > df %>% filter(weighted == max(weighted)) %>% select(value) %>% as.numeric [1] 56 > df %>% mutate(mean = value * weighted) %>% select(mean) %>% sum [1] 55.7435 > percentile(df, 0.5) [1] 56 > percentile(df, 0.05) [1] 51 > percentile(df, 0.95) [1] 61 ---- The book describes this phenemenom as follows: ____ This is an example of swamping the priors: with enough data, people who start with different priors will tend to converge on the same posterior. ____
null
null
[ 0.02247486263513565, 0.0030903727747499943, -0.0011345820967108011, 0.028450222685933113, 0.07122796028852463, 0.02071792259812355, 0.022336317226290703, 0.01580580323934555, 0.0037444639019668102, -0.0040788426995277405, 0.024849534034729004, -0.01351717859506607, -0.07322202622890472, 0.024009589105844498, -0.032818205654621124, 0.057443004101514816, 0.05870690941810608, 0.0023237403947860003, -0.003711291588842869, -0.020483940839767456, 0.05633455887436867, 0.06954818964004517, 0.017443837597966194, 0.027822641655802727, 0.0222917627543211, -0.02116340585052967, 0.037655059248209, -0.00986847560852766, -0.037633419036865234, -0.012874312698841095, 0.05534784495830536, 0.02851918712258339, -0.033489830791950226, -0.0005323961959220469, 0.016562670469284058, 0.022294646129012108, -0.01709435135126114, -0.004437814932316542, 0.0010724883759394288, 0.005463189445436001, -0.05670078471302986, 0.018016833811998367, -0.02256087213754654, 0.028283465653657913, -0.0709264948964119, -0.029172878712415695, -0.024773431941866875, 0.03315206244587898, -0.009083688259124756, 0.020004935562610626, -0.0547601543366909, 0.04430602863430977, -0.010011245496571064, -0.011240960098803043, -0.019155332818627357, 0.05339036136865616, -0.008915808983147144, -0.0709165558218956, 0.032373443245887756, -0.06527773290872574, 0.01730290986597538, -0.007035533431917429, -0.006846705451607704, 0.012410708703100681, 0.01754724234342575, -0.053350988775491714, 0.0005938953836448491, 0.05069303885102272, -0.026554947718977928, -0.01055202353745699, -0.03796851262450218, -0.006151420995593071, -0.02951692044734955, -0.018346818163990974, -0.01443700585514307, -0.059924740344285965, 0.006436818744987249, 0.06214311346411705, 0.017987988889217377, 0.019186291843652725, 0.0037636104971170425, -0.028331702575087547, 0.040379688143730164, 0.03254521265625954, 0.0052973381243646145, -0.0463598370552063, -0.006386396940797567, -0.05162379890680313, -0.06134416535496712, 0.08592216670513153, -0.00045108923222869635, -0.053148772567510605, 0.023432603105902672, 0.032257843762636185, -0.05326639488339424, -0.014161007478833199, 0.02869752049446106, 0.0028420642483979464, -0.011296740733087063, -0.04662865400314331, -0.023176172748208046, -0.04229089990258217, 0.03927167132496834, 0.020816808566451073, -0.07809961587190628, 0.012464514933526516, -0.0068788607604801655, -0.019138367846608162, 0.0007237668614834547, 0.02075711265206337, -0.025265593081712723, 0.015900250524282455, -0.006782344076782465, 0.024124229326844215, -0.07457350939512253, 0.07148558646440506, 0.021032679826021194, -0.03523225337266922, -0.010452383197844028, -0.0025471020489931107, 0.03909463435411453, 0.023946095257997513, -0.0381259061396122, 0.061957817524671555, 0.017522338777780533, 0.04011506214737892, 0.018863335251808167, 0.0468619130551815, -0.00463075703009963, -0.056486956775188446, 0.008318577893078327, 0.06382836401462555, -0.053100693970918655, -0.011472178623080254, -0.022876795381307602, -0.017668552696704865, 0.006449350155889988, -0.003665019990876317, 0.046636149287223816, 0.03059714287519455, 0.025986794382333755, -0.04541419446468353, -0.004097014665603638, 0.03113550692796707, 0.012907437980175018, 0.01416683942079544, 0.006929034832865, -0.0279164407402277, -0.023441767320036888, 0.005204008426517248, 0.02681918255984783, 0.013049348257482052, 0.06556861102581024, -0.02115541510283947, 0.017283640801906586, 0.05205351859331131, 0.02824217453598976, -0.000492944149300456, -0.006672416348010302, 0.012742733582854271, 0.04802657663822174, 0.014651903882622719, 0.020736584439873695, 0.04070010036230087, 0.011854848824441433, -0.01928907260298729, 0.02500411495566368, 0.06438876688480377, -0.04388623312115669, 0.013629799708724022, -0.054655469954013824, -0.055070195347070694, 0.06328675895929337, -0.035267312079668045, -0.005934581160545349, 0.04619702324271202, 0.05791917070746422, 0.03584858030080795, 0.055428892374038696, -0.00970532651990652, -0.08012359589338303, 0.035934075713157654, 0.023959636688232422, 0.04887670278549194, 0.028078166767954826, -0.03252173215150833, 0.06552378088235855, 0.028258007019758224, 0.007299995515495539, 0.04542244225740433, -0.05927977338433266, -0.05764060094952583, -0.010128331370651722, -0.010558899492025375, 0.055263079702854156, -0.052239783108234406, 0.023405974730849266, 0.04203884303569794, 0.013797483406960964, 0.006970229092985392, -0.01182138454169035, 0.02465258352458477, 0.04939844086766243, -0.01801205612719059, -0.03889530897140503, 0.0506117157638073, 0.03292788565158844, -0.021850863471627235, -0.015679247677326202, -0.0011548100737854838, -0.02811875194311142, 0.020478205755352974, -0.002230489393696189, -0.01900773122906685, -0.004544063005596399, 0.012471470981836319, 0.054336946457624435, -0.008653291501104832, 0.03373529016971588, -0.023687003180384636, 0.009578903205692768, 0.007799204438924789, 0.007106419652700424, 0.002867284929379821, -0.0006836930988356471, 0.11332632601261139, 0.05780598893761635, -0.03094777651131153, -0.03623230382800102, 0.012076225131750107, -0.012285809963941574, -0.03695480898022652, 0.024507563561201096, -0.001869229250587523, -0.015628674998879433, 0.021596994251012802, -0.053895484656095505, -0.04835150018334389, 0.038669463247060776, -0.04824011027812958, 0.021872280165553093, 0.07410845905542374, -0.018336337059736252, 0.07731357216835022, -0.016172410920262337, 0.005337975453585386, -0.016116071492433548, -0.015665553510189056, -0.07543297111988068, -0.022641733288764954, 0.010250247083604336, -0.00023139864788390696, 0.032513879239559174, -0.033655229955911636, -0.013571998104453087, -0.021390289068222046, -0.019889675080776215, 0.032131195068359375, 0.06229984387755394, 0.06485125422477722, -0.022506440058350563, 0.05980570241808891, 0.010667093098163605, -0.00604501087218523, -0.015907982364296913, -0.04939252883195877, -0.07603294402360916, -0.02451365254819393, 0.003100309055298567, 0.008325439877808094, 0.0382121279835701, -0.0114972535520792, 0.00529306149110198, 0.015645692124962807, 0.010461186058819294, -0.020986251533031464, 0.023614034056663513, 0.007415966596454382, 0.0015629573026672006, -0.009578545577824116, -0.013653717003762722, 0.07106537371873856, -0.015513205900788307, -0.011305030435323715, 0.022380156442523003, -0.0545155331492424, 0.05360306426882744, -0.05595291033387184, -0.03071419708430767, 0.023256180807948112, 0.0004171801556367427, 0.04934953153133392, 0.019421633332967758, 0.013986506499350071, 0.0539274737238884, 0.00046065737842582166, 0.015264489687979221, 0.010282724164426327, 0.013542543165385723, 0.05865848809480667, 0.01572606898844242, 0.005656060297042131, 0.03266388922929764, -0.005075505934655666, 0.00968388095498085, -0.06397698074579239, 0.0226494949311018, -0.008161956444382668, -0.28075137734413147, 0.0170014388859272, -0.0026354591827839613, -0.022125743329524994, 0.015860216692090034, -0.05196095257997513, 0.01656181365251541, -0.015628764405846596, -0.0258970707654953, 0.011461947113275528, -0.0008868320728652179, -0.044492967426776886, -0.03342919796705246, 0.04882512986660004, 0.04297937825322151, 0.0038506172131747007, 0.01353658176958561, -0.049568548798561096, -0.008198628202080727, 0.06401291489601135, 0.02511378563940525, -0.046534303575754166, -0.0343022383749485, 0.0569080226123333, 0.01513905543833971, 0.06926145404577255, -0.05936140567064285, 0.0206320658326149, -0.06265339255332947, -0.0164934191852808, 0.009175295941531658, -0.030989613384008408, 0.02512749843299389, -0.025649985298514366, 0.02530413679778576, -0.0379023477435112, 0.016064228489995003, -0.006376218516379595, -0.01558080967515707, 0.031145140528678894, -0.023732710629701614, -0.04278300330042839, 0.04080586135387421, 0.022000301629304886, 0.06734931468963623, 0.008035467937588692, -0.04092216119170189, 0.005156736820936203, -0.03236783668398857, 0.06907322257757187, -0.027394382283091545, -0.018488941714167595, -0.042105305939912796, 0.006039283704012632, -0.0725121721625328, 0.006055337376892567, -0.027932606637477875, -0.0033244933001697063, -0.02945854887366295, -0.007301656994968653, -0.000032161442504730076, -0.04084836319088936, 0.007320111151784658, -0.027396151795983315, -0.006490502040833235, -0.0707547664642334, -0.06250306963920593, -0.009584268555045128, 0.06712046265602112, 0.0012033103266730905, -0.013407651335000992, -0.0017190913204103708, -0.016224749386310577, -0.10339514911174774, -0.006445415783673525, -0.009182456880807877, 0.005540031939744949, 0.017884578555822372, 0.0061879451386630535, 0.05826018005609512, -0.027329839766025543, -0.05850839242339134, 0.0444689579308033, 0.012647544033825397, 0.04596491530537605, -0.044373832643032074, -0.009706690907478333, 0.036460328847169876, -0.039156779646873474, -0.0009391038911417127, 0.06334955245256424, -0.0065681771375238895, -0.014291152358055115, -0.018923263996839523, -0.01671893708407879, 0.03699953481554985, -0.005771289113909006, 0.006619949825108051, 0.014075363986194134, 0.05243229120969772, 0.04067237302660942, -0.0555541105568409, 0.002115946728736162, -0.06722646206617355, -0.05648956447839737, -0.0070344205014407635, -0.05311658978462219, 0.03848415985703468, 0.016412774100899696, 0.00043033555266447365, 0.00435562152415514, -0.0025700980331748724, 0.02755221165716648, -0.03738235682249069, -0.022295646369457245, -0.032658033072948456, 0.013648820109665394, 0.028193581849336624, 0.013030973263084888, -0.014582661911845207, -0.04206978157162666, 0.022575540468096733, -0.017917651683092117, -0.020235171541571617, -0.031652722507715225, -0.03511899709701538, -0.0020073160994797945, -0.03062519244849682, -0.018772471696138382, -0.0034526537638157606, -0.0020968392491340637, 0.03359225019812584, 0.025724610313773155, -0.01579240895807743, 0.03858171030879021, -0.011794784106314182, -0.04795337840914726, -0.023543069139122963, 0.00031656312057748437, 0.015393202193081379, 0.020143793895840645, 0.0007950292201712728, 0.018371103331446648, 0.05852035805583, 0.016342537477612495, -0.01210107933729887, 0.05077923834323883, -0.00714639388024807, 0.006068272981792688, 0.02656932733952999, 0.020010968670248985, -0.012391865253448486, 0.013492726720869541, -0.02844066731631756, -0.02283790521323681, 0.026078946888446808, 0.0481833852827549, -0.010522011667490005, -0.03659692034125328, -0.05198374018073082, 0.008185403421521187, -0.03711194172501564, -0.00986800342798233, -0.029307648539543152, 0.025062059983611107, 0.06540694832801819, -0.019220218062400818, 0.018566155806183815, 0.00032421830110251904, 0.003628477221354842, -0.004099365323781967, -0.002745328238233924, -0.021127501502633095, 0.001576729933731258, -0.006825756281614304, -0.006156192626804113, 0.007871671579778194, -0.017969142645597458, 0.017413374036550522, -0.026338636875152588, 0.0012738166842609644, 0.01325460709631443, 0.010444125160574913, -0.0014065387658774853, 0.05295445770025253, 0.06148674711585045, -0.02177160419523716, 0.00041935298941098154, -0.021427039057016373, -0.010489598847925663, -0.03492561727762222, -0.007332401350140572, -0.006454052869230509, 0.031024716794490814, -0.05866185203194618, -0.056080445647239685, -0.009020465426146984, 0.03385039046406746, -0.026418939232826233, 0.012880204245448112, 0.014313071966171265, -0.009185144677758217, -0.01832491159439087, 0.0037579478230327368, 0.06742820888757706, -0.06227191537618637, 0.014934057369828224, 0.0033920889254659414, -0.02217991277575493, 0.03501615300774574, -0.015159811824560165, -0.0459139384329319, -0.024455610662698746, -0.013576249592006207, 0.017020411789417267, -0.048297710716724396, -0.05963502824306488, -0.07488416135311127, 0.007596742361783981, 0.00895377341657877, 0.02973412163555622, -0.009021422825753689, -0.021609503775835037, 0.0030123607721179724, -0.009176361374557018, 0.008242261596024036, -0.0232449471950531, -0.030670873820781708, 0.048147231340408325, 0.00936575885862112, -0.017498502507805824, -0.035572219640016556, 0.012498793192207813, 0.022110233083367348, -0.029620816931128502, 0.010025651194155216, -0.018375197425484657, 0.03173579275608063, -0.01911119557917118, 0.04356510937213898, -0.010848408564925194, -0.020907651633024216, -0.035740915685892105, 0.023430855944752693, -0.034537024796009064, 0.001742510823532939, 0.013669108971953392, -0.003945660777390003, 0.022209642454981804, 0.05477196350693703, -0.012532522901892662, 0.011780304834246635, -0.03695448487997055, -0.009318453259766102, 0.057830534875392914, -0.048631154000759125, -0.012680948711931705, -0.02655177004635334, -0.03866656497120857, 0.011730914935469627, 0.0031129461713135242, -0.010245224460959435, -0.004643309861421585, 0.016902802512049675, 0.04256558045744896, 0.02867528609931469, 0.04467180371284485, 0.02374676801264286, 0.014699999243021011, -0.05239822342991829, 0.012114031240344048, -0.106214240193367, -0.003875074675306678, 0.03441314771771431, -0.007801257539540529, 0.005719442386180162, -0.0073724607937037945, -0.06643182039260864, 0.03270621970295906, -0.061259880661964417, -0.021553857252001762, 0.029038168489933014, -0.013945807702839375, 0.02113971672952175, 0.01646960712969303, -0.053489409387111664, -0.017404451966285706, 0.036229200661182404, -0.04591485485434532, -0.0035687654744833708, -0.008822666481137276, 0.06437169760465622, 0.0036814543418586254, 0.025904089212417603, -0.01206699013710022, 0.011359861120581627, 0.05344531685113907, 0.020149940624833107, 0.018612319603562355, 0.06421109288930893, -0.028711140155792236, 0.026815949007868767, 0.027564840391278267, 0.0007743124733678997, 0.009626266546547413, 0.003953180741518736, -0.008800254203379154, -0.0513652004301548, 0.04115709289908409, -0.023253824561834335, -0.006309635005891323, -0.06440995633602142, 0.0681028813123703, -0.01479231845587492, -0.0352521575987339, -0.09540677070617676, 0.01210294384509325, -0.03562302514910698, -0.03678355738520622, 0.008753236383199692, -0.04506449028849602, -0.02101808413863182, 0.057038813829422, -0.01076695416122675, 0.04555073380470276, 0.0594053752720356, -0.007603181526064873, 0.024473926052451134, 0.01840599998831749, 0.0876079872250557, 0.07327356189489365, 0.06942267715930939, 0.006602833047509193, 0.08025243133306503, -0.030585400760173798, -0.04783258214592934, -0.0032577801030129194, -0.051145583391189575, -0.024025356397032738, -0.029192276298999786, -0.01138225570321083, 0.03988920524716377, -0.04184318333864212, 0.05529024451971054, -0.014720161445438862, -0.015292173251509666, 0.005210182163864374, 0.010319996625185013, 0.03043978102505207, 0.08141116052865982, -0.004337453283369541, 0.013891328126192093, -0.03582349047064781, -0.04870375618338585, 0.0344851128757, -0.014072088524699211, -0.02929992601275444, 0.009425248019397259, -0.030887823551893234, 0.018092220649123192, 0.029725247994065285, 0.013490602374076843, 0.09373500943183899, -0.05243583023548126, -0.0035270401276648045, 0.00848749466240406, 0.021022789180278778, 0.009676472283899784, 0.02681787684559822, 0.02089138701558113, -0.01911761425435543, -0.025611327961087227, -0.027091022580862045, -0.0088620251044631, -0.007763972971588373, -0.030382508412003517, 0.00362808327190578, -0.014171098358929157, 0.007924497127532959, 0.031072234734892845, -0.03696480393409729, -0.05125034973025322, -0.06233927980065346, -0.03769076615571976, -0.07320155948400497, -0.07417582720518112, 0.005924145691096783, 0.0132956737652421, -0.015792760998010635, -0.026297667995095253, -0.01650681346654892, -0.020163489505648613, -0.028912747278809547, -0.0005102931754663587, -0.04959704726934433, -0.05549410730600357, 0.04206532984972, 0.009131098166108131, -0.0004377287987153977, -0.008556455373764038, 0.04098466783761978, -0.0006290127639658749, -0.021333882585167885, -0.014136051759123802, 0.01852288842201233, 0.04999851807951927, 0.03577348217368126, 0.0029185789171606302, -0.06845750659704208, 0.013291660696268082, 0.03257808834314346, -0.05861351266503334, -0.08564624190330505, 0.03388635814189911, -0.0022472247947007418, -0.01421408448368311, 0.0410294234752655, -0.02057168446481228, -0.025005880743265152, -0.05404622107744217, -0.01884002611041069, -0.006562056485563517, 0.005224361550062895, 0.033897675573825836, -0.053075339645147324, 0.0928138941526413, 0.018261907622218132, -0.024045107886195183, -0.06558773666620255, 0.0035179685801267624, -0.012292234227061272, -0.021305421367287636, -0.01694408617913723, -0.02726563811302185, -0.020254692062735558, -0.08789940178394318, 0.00355429551564157, 0.009245557710528374, -0.0756349191069603, -0.007256498094648123, 0.027869701385498047, 0.016565872356295586, -0.0078101553954184055, -0.00005467975279316306, -0.010127385146915913, 0.036458179354667664, -0.018907075747847557, -0.008626651018857956, -0.009174817241728306, 0.04681103304028511, -0.005935097578912973, 0.03494574502110481, 0.03049764782190323, -0.04523627832531929, -0.0009103591437451541, -0.01573355309665203, 0.03557402640581131, 0.041714757680892944, -0.0029805076774209738, 0.016004575416445732 ]
[ -0.0792262852191925, -0.024030426517128944, -0.04984264075756073, -0.014154082164168358, 0.04089752584695816, -0.024217678233981133, 0.011229502968490124, 0.03665047511458397, 0.017950501292943954, 0.005023167468607426, 0.027080537751317024, -0.054907575249671936, -0.0017863800749182701, 0.003754685167223215, 0.05475101247429848, 0.005956003908067942, -0.019709842279553413, -0.10604611784219742, -0.01384593266993761, 0.06064687669277191, 0.01974448934197426, -0.06740394979715347, -0.04163145273923874, -0.052151620388031006, 0.02842489816248417, 0.024490278214216232, 0.05351243168115616, -0.022403990849852562, 0.017590051516890526, -0.22081804275512695, 0.01944103091955185, -0.023424288257956505, 0.023937251418828964, -0.03399321809411049, 0.021802561357617378, 0.039189934730529785, 0.013129955157637596, 0.006281649228185415, 0.02863267995417118, 0.037805188447237015, 0.0017643640749156475, 0.018062476068735123, -0.02996746078133583, -0.030454233288764954, 0.07104093581438065, 0.020494217053055763, -0.003878404852002859, 0.016178233548998833, -0.008410989306867123, 0.027896739542484283, -0.025006256997585297, 0.006801564246416092, -0.010335923172533512, -0.035050973296165466, 0.007327449973672628, 0.05315956473350525, 0.023684779182076454, 0.03854341432452202, 0.0064454167149960995, 0.0024315002374351025, 0.025970684364438057, -0.0012883972376585007, -0.14207656681537628, 0.06699476391077042, 0.05960621312260628, 0.04472575709223747, -0.012216835282742977, -0.015346426516771317, -0.04431680589914322, 0.056984856724739075, 0.044405773282051086, -0.024812357500195503, -0.024168068543076515, 0.023167626932263374, -0.00273759663105011, 0.002225553384050727, 0.0038183603901416063, -0.0030657448805868626, -0.00006204613600857556, -0.027004769071936607, -0.027898086234927177, 0.019647786393761635, -0.02389972098171711, -0.028166653588414192, -0.02144206129014492, -0.006287820637226105, -0.002970961621031165, 0.06205305457115173, 0.017193760722875595, 0.007831302471458912, 0.06245359405875206, 0.05900227278470993, 0.01652435027062893, 0.0003075236454606056, -0.05747966095805168, 0.003052862361073494, 0.02104644663631916, 0.037201836705207825, -0.015059406869113445, 0.4276621341705322, 0.02290007844567299, 0.023592522367835045, 0.033207546919584274, 0.013919751159846783, 0.007079162634909153, -0.0027877355460077524, -0.024081766605377197, -0.04632432386279106, 0.025601321831345558, -0.03978094458580017, 0.037408970296382904, -0.00583400996401906, 0.08398375660181046, -0.04766305536031723, -0.01067800261080265, 0.003881211159750819, 0.011573703028261662, -0.011641517281532288, 0.02356668934226036, 0.01350346952676773, -0.04434967413544655, 0.010215179063379765, 0.03149004653096199, -0.0223894901573658, -0.026600750163197517, -0.024814046919345856, 0.0365433394908905, 0.06709083914756775, 0.007442150264978409, 0.014510276727378368, 0.04818828031420708, -0.0778275802731514, -0.0885109081864357, 0.00019158297800458968, -0.005377745255827904, -0.007100449874997139, 0.013933008536696434, -0.0060792844742536545, 0.03821296989917755, 0.04217131435871124, -0.028930319473147392, -0.022538993507623672, 0.013557850383222103, -0.016501864418387413, -0.03780561685562134, 0.08769088983535767, 0.03666585311293602, -0.04662191867828369, 0.010677462443709373, -0.05475061759352684, -0.01551551278680563, -0.008372356183826923, 0.01065769698470831, -0.0797187015414238, 0.008303068578243256, 0.023016583174467087, 0.06859495490789413, -0.00011237280705245212, -0.04654483497142792, -0.0013588151196017861, -0.0253591388463974, -0.018561115488409996, -0.06406469643115997, 0.08883245289325714, 0.06271323561668396, -0.09309257566928864, -0.024174127727746964, 0.010033881291747093, 0.030423982068896294, -0.08099275082349777, 0.012339201755821705, 0.038372114300727844, -0.040411535650491714, 0.008980374783277512, 0.07391256839036942, -0.015599092468619347, -0.03982159495353699, -0.021689360961318016, 0.03371181711554527, 0.0028066167142242193, -0.014859936200082302, -0.003829638008028269, -0.06354207545518875, -0.013950913213193417, -0.06540030241012573, -0.05661949887871742, -0.07466889917850494, 0.023340877145528793, -0.046681225299835205, 0.007798385340720415, -0.009961999021470547, -0.03744911029934883, -0.09711186587810516, 0.1117296814918518, -0.045133233070373535, -0.04922125115990639, -0.023672249168157578, 0.008244825527071953, -0.02128705382347107, -0.00999376643449068, -0.03814440593123436, -0.01769985444843769, -0.028876490890979767, 0.040790852159261703, -0.03400542214512825, 0.06658047437667847, 0.053019821643829346, -0.041394542902708054, 0.10210120677947998, 0.026246309280395508, 0.026812154799699783, -0.02173888124525547, -0.014856016263365746, 0.016665805131196976, -0.016147833317518234, 0.01002781093120575, 0.014246402308344841, -0.024767780676484108, 0.03222784399986267, 0.018244707956910133, 0.0071580419316887856, -0.0424840971827507, -0.022567035630345345, -0.36821630597114563, -0.07678993791341782, -0.037746671587228775, 0.01633889600634575, 0.07374997437000275, -0.03084896318614483, 0.028919508680701256, 0.0033305122051388025, 0.011024519801139832, 0.021059095859527588, 0.031373266130685806, 0.006585506722331047, -0.008014320395886898, -0.09277557581663132, -0.012151208706200123, 0.0007662203279323876, -0.06915537267923355, -0.013903398998081684, -0.03258327767252922, 0.023019637912511826, -0.039879146963357925, -0.008842210285365582, -0.04254196584224701, -0.027551041916012764, 0.012129353359341621, -0.026626158505678177, 0.13632743060588837, 0.012884757481515408, 0.016887256875634193, -0.012647154740989208, 0.008135968819260597, -0.0032471853774040937, 0.009574576281011105, -0.03413766622543335, 0.026129715144634247, -0.008339614607393742, 0.011605458334088326, 0.011645168997347355, -0.024428315460681915, -0.03624184802174568, -0.057218052446842194, 0.009416945278644562, -0.024249080568552017, -0.013640127144753933, -0.07643400877714157, 0.02826349064707756, 0.0027133217081427574, 0.0150069585070014, -0.005833644885569811, 0.0952325388789177, 0.0445733442902565, 0.003925371449440718, 0.039074983447790146, 0.026456434279680252, 0.004993023816496134, -0.02534705586731434, -0.055080339312553406, -0.009043090976774693, 0.017710188403725624, 0.015101906843483448, 0.028088275343179703, 0.03471872955560684, 0.054115571081638336, -0.0430251769721508, -0.0059709735214710236, 0.0053748865611851215, 0.0067650810815393925, -0.03957946598529816, 0.03425784036517143, 0.010661562904715538, -0.0071241469122469425, 0.09465860575437546, -0.004018673673272133, 0.002345239743590355, 0.002960014622658491, 0.0618576779961586, 0.003381388494744897, -0.0036164403427392244, 0.0019363686442375183, 0.05548171326518059, 0.048306047916412354, -0.027349572628736496, 0.009969704784452915, 0.0031262424308806658, -0.011563964188098907, 0.02400905452668667, -0.005578831769526005, -0.03142822906374931, 0.06739525496959686, 0.0237590279430151, -0.017513785511255264, -0.01745138131082058, -0.04762403294444084, -0.024017786607146263, 0.039614543318748474, 0.01207586470991373, -0.2611997127532959, 0.005314704962074757, 0.02497847191989422, 0.06823417544364929, 0.01442686002701521, 0.024516882374882698, 0.050184912979602814, -0.019875040277838707, -0.02176728844642639, 0.015447312965989113, 0.02125159464776516, 0.04933040589094162, 0.025930020958185196, -0.012841856107115746, -0.007678427267819643, -0.048510268330574036, -0.0033883056603372097, -0.048712100833654404, 0.022017983719706535, 0.036406394094228745, 0.03711554408073425, -0.00001706156035652384, 0.1472594290971756, 0.03322502225637436, -0.012871324084699154, 0.029324881732463837, -0.01075706910341978, 0.0159114021807909, 0.06357283890247345, -0.017495764419436455, -0.010504039004445076, -0.006082494277507067, -0.006685258354991674, -0.02517782896757126, 0.016494007781147957, -0.01515279058367014, -0.05227051302790642, 0.016395794227719307, 0.029085798189044, -0.016694948077201843, 0.01170661672949791, 0.02361978031694889, -0.015315442346036434, 0.025314340367913246, 0.08584151417016983, 0.015957849100232124, 0.013333715498447418, -0.038624733686447144, -0.04921061173081398, -0.007504440378397703, -0.033051975071430206, -0.03127050772309303, -0.015554748475551605, -0.03577245771884918, -0.002140086144208908, 0.06876826286315918, 0.014251693151891232, -0.013706033118069172, 0.046971872448921204, -0.01963251829147339, -0.04294940084218979, -0.03729234263300896, 0.07859238237142563, -0.011377296410501003, 0.03429644554853439 ]
[ -0.0038314652629196644, 0.029614746570587158, -0.009563937783241272, -0.0180358923971653, 0.021183082833886147, -0.016140097752213478, 0.00428101746365428, 0.01705288328230381, 0.019411291927099228, 0.014908458106219769, 0.005921227391809225, 0.010351821780204773, 0.00997238326817751, -0.03331531956791878, 0.026090767234563828, 0.001174673205241561, 0.009801221080124378, -0.006276912055909634, 0.02240632474422455, -0.024178147315979004, -0.02023756504058838, -0.007791358511894941, 0.03354723006486893, 0.0007594739436171949, -0.017884952947497368, 0.05135631933808327, -0.016481967642903328, 0.019074762240052223, 0.004636823665350676, -0.11293816566467285, -0.013264075852930546, -0.0270004253834486, -0.0014625417534261942, -0.01638864539563656, -0.06126885116100311, -0.028005674481391907, -0.0358976349234581, 0.01708594709634781, -0.008808143436908722, 0.031259987503290176, 0.007838180288672447, -0.002474358770996332, -0.016629209741950035, -0.007501951884478331, 0.030904080718755722, -0.014580327086150646, 0.026992229744791985, 0.018475597724318504, -0.02495994232594967, -0.0009584732470102608, 0.005647575482726097, 0.01768106408417225, 0.01838112436234951, -0.007432106416672468, 0.005868974141776562, 0.0015809758333489299, -0.007752579636871815, 0.027383940294384956, 0.02430041879415512, 0.010636587627232075, 0.011645730584859848, -0.00029906502459198236, -0.04078608378767967, -0.013713152147829533, 0.016648493707180023, -0.030078859999775887, -0.036512311547994614, 0.021299345418810844, -0.031427256762981415, -0.014262164011597633, 0.006319607142359018, -0.004878849722445011, -0.03661300614476204, -0.016801908612251282, 0.0027977381832897663, -0.026233557611703873, -0.0051843225955963135, -0.06945803761482239, 0.011914798058569431, -0.0022060491610318422, -0.038331177085638046, 0.007041900418698788, 0.028835514560341835, -0.022683529183268547, 0.017777325585484505, -0.04861791431903839, 0.02385229989886284, 0.02416696771979332, -0.002305601490661502, -0.0022580046206712723, -0.024793846532702446, -0.00809671450406313, -0.004319583531469107, 0.0016468529356643558, -0.04171543940901756, 0.003981875255703926, -0.006754464469850063, -0.016869675368070602, 0.02300160564482212, 0.8387910723686218, 0.02687930501997471, 0.018426945433020592, 0.0026653020177036524, 0.006436508614569902, -0.02137809246778488, -0.0006841373397037387, -0.03147248178720474, 0.009635189548134804, 0.026722481474280357, -0.03340969607234001, 0.030696621164679527, 0.018052810803055763, 0.04046718776226044, 0.029554644599556923, -0.020686281844973564, 0.023396432399749756, -0.030274346470832825, 0.025777477771043777, -0.026653658598661423, 0.03519760072231293, 0.026810210198163986, 0.045869600027799606, -0.031512245535850525, 0.00673259049654007, 0.005788013339042664, -0.1899733692407608, 0.012524816207587719, -6.908762335446601e-33, -0.010451416485011578, -0.020103955641388893, 0.0025916844606399536, -0.03992346674203873, -0.00645783543586731, 0.03698476031422615, -0.0074428110383450985, 0.02326023206114769, -0.0036828801967203617, -0.004136528354138136, 0.030264360830187798, -0.00659937784075737, -0.0050424146465957165, -0.03764257952570915, 0.009149543009698391, -0.014026504941284657, -0.0018448304617777467, 0.05127914249897003, 0.021904461085796356, 0.01569915935397148, 0.035968903452157974, 0.004699560347944498, 0.001983251888304949, 0.024938665330410004, -0.017068691551685333, 0.03527667745947838, 0.007771194446831942, -0.004126922693103552, 0.02539939619600773, -0.03839654102921486, -0.04355061799287796, 0.00812640879303217, -0.02623016946017742, -0.02565074898302555, -0.005217825993895531, -0.04982113838195801, -0.013514016754925251, -0.002571499440819025, -0.012299682013690472, -0.04665040224790573, 0.013277064077556133, 0.014132493175566196, 0.002320929430425167, 0.009336329996585846, -0.04068715497851372, 0.0025026374496519566, 0.029095524922013283, 0.0439702644944191, 0.006657303310930729, 0.008038296364247799, -0.005753165576606989, -0.04274561628699303, 0.01365118008106947, -0.004298405721783638, -0.0037587378174066544, 0.03812982141971588, 0.0021658337209373713, 0.024871384724974632, -0.024261275306344032, -0.011956476606428623, 0.023053083568811417, 0.022328561171889305, -0.03845243155956268, -0.019544024020433426, -0.017297089099884033, 0.04382356256246567, 0.012280014343559742, 0.008402331732213497, -0.027017634361982346, 0.0016489893896505237, -0.03505116328597069, 0.0335594043135643, -0.0255352184176445, -0.00882371049374342, 0.01306153368204832, 0.03178102523088455, 0.0014696781290695071, 0.06311601400375366, 0.0047981347888708115, 0.036280881613492966, -0.0164195466786623, 0.004767675418406725, -0.01065418217331171, -0.03609386458992958, -0.012190218083560467, 0.002456105314195156, -0.009178131818771362, 0.006208565551787615, 0.014494954608380795, -0.018322445452213287, 0.023944012820720673, -0.018405627459287643, -0.013560616411268711, -0.0056353905238211155, -0.04050469025969505, 7.499492327772956e-33, -0.046766772866249084, 0.011136986315250397, 0.004760694224387407, 0.020746586844325066, 0.05309612303972244, -0.005965302232652903, 0.026887189596891403, -0.002719175536185503, -0.055990252643823624, -0.007607616484165192, -0.046174805611371994, -0.05534624308347702, -0.012499387376010418, 0.0436905100941658, 0.04401712864637375, -0.00577912200242281, 0.021773923188447952, 0.06319190561771393, -0.02266305312514305, -0.00758822076022625, -0.00296768662519753, -0.001249686349183321, 0.002333661774173379, 0.03814713656902313, -0.0015195512678474188, 0.032194044440984726, 0.006026562303304672, -0.033415261656045914, 0.028240332379937172, 0.02190542034804821, -0.0056017423048615456, 0.008365035057067871, -0.003356642322614789, 0.007899647578597069, -0.04966169595718384, 0.04817674309015274, 0.021519482135772705, -0.03745777904987335, -0.003791132476180792, 0.022573111578822136, -0.010121529921889305, -0.04008276388049126, -0.03020966798067093, 0.01073214691132307, 0.00044453333248384297, -0.008213906548917294, 0.00005166172195458785, 0.015283746644854546, -0.0010793511755764484, -0.008558896370232105, 0.005665388889610767, 0.02579602785408497, 0.01728823035955429, 0.024516593664884567, -0.003067531855776906, -0.014612078666687012, -0.03375241160392761, 0.0059373630210757256, -0.0139245530590415, -0.02666589803993702, -0.03429700806736946, 0.014329802244901657, -0.015167823061347008, 0.06260533630847931, -0.010786193422973156, 0.001695908373221755, -0.04552445933222771, -0.02612876333296299, -0.0014200392179191113, 0.014599720947444439, -0.030551722273230553, -0.007393070496618748, 0.00926175806671381, -0.0056104836985468864, -0.0003420425346121192, 0.025218909606337547, -0.03416145592927933, 0.005134675186127424, 0.04038364812731743, 0.03197414055466652, 0.010099408216774464, -0.020218288525938988, 0.034743782132864, -0.007125089876353741, 0.03685249760746956, -0.009489720687270164, -0.0463329553604126, -0.023420587182044983, 0.06674574315547943, -0.020334307104349136, 0.021305548027157784, -0.007220606319606304, 0.02305980585515499, 0.043187908828258514, 0.01991039328277111, -1.286924611321183e-8, 0.006875687278807163, 0.0014926964649930596, 0.010793294757604599, 0.04977493733167648, 0.0415850430727005, 0.029589470475912094, -0.013920893892645836, -0.049583155661821365, -0.023029183968901634, -0.00018469544011168182, 0.021535690873861313, -0.019058460369706154, -0.013253411278128624, -0.004261453170329332, -0.00005705656440113671, -0.04971054941415787, 0.021188803017139435, -0.00043747384916059673, 0.049385715276002884, 0.014698668383061886, 0.03662668168544769, 0.05789654701948166, -0.021651139482855797, -0.02000359073281288, 0.024869240820407867, -0.0400908999145031, 0.014752236194908619, -0.06437385082244873, 0.022602291777729988, -0.01692364364862442, -0.004762012045830488, -0.03347659111022949, -0.036538008600473404, -0.013571205548942089, 0.005189537536352873, -0.03724545240402222, 0.0014549808111041784, 0.05018610879778862, 0.00132838636636734, 0.004882744513452053, -0.008324571885168552, 0.010347415693104267, -0.05767301842570305, -0.025413863360881805, -0.0031966734677553177, 0.00017558301624376327, -0.026488283649086952, 0.025831468403339386, -0.0007748506031930447, -0.06585695594549179, 0.02784930355846882, -0.01463122945278883, 0.033789001405239105, 0.03176375851035118, 0.028800025582313538, 0.04517470300197601, 0.009199410676956177, -0.03765736147761345, -0.01986798830330372, -0.01999557763338089, 0.01949084922671318, -0.018296506255865097, -0.0013884666841477156, -0.04434015229344368 ]
r-think-bayes-euro-problem
https://markhneedham.com/blog/2015/05/31/r-think-bayes-euro-problem
false
2015-05-30 21:45:07
Neo4j: The BBC Champions League graph
[ "neo4j" ]
[ "neo4j" ]
A couple of weekends ago I started scraping the BBC live text feed of the http://www.bbc.co.uk/sport/0/football/32683310[Bayern Munich/Barcelona match], initially starting out with just the fouls and building the foul graph. I've spent a bit more time on it since then and have managed to model several other events as well including attempts, goals, cards and free kicks. I started doing this just for the Bayern Munich/Barcelona match but realised it wasn't particularly difficult to extend this out and graph the events for every match in the Champions League 2014/2015. To do this we first need to download the pages for each of the matches. I downloaded http://www.bbc.co.uk/sport/football/champions-league/results[this page] and wrote a simple Python script to get the appropriate URIs: [source,python] ---- from bs4 import BeautifulSoup from soupselect import select import bs4 soup = BeautifulSoup(open("data/results", "r")) matches = select(soup, "a.report") for match in matches: print "http://www.bbc.co.uk/%s" %(match.get("href")) ---- I then piped the output of running this script into wget: [source,bash] ---- find_all_matches.py | xargs wget -O data/raw ---- It was relatively simple to update the scraping and import code to handle multiple matches. The whole process from end to end looks like this: image::{{<siteurl>}}/uploads/2015/05/2015-05-29_23-27-56.png[2015 05 29 23 27 56,500] Most of the code is in the 'scraping magic' phase where I go through all the events and pull out the appropriate elements that we can link together in the graph. e.g. a freekick and foul event are typically adjacent so we'd look to pull out the two players involved, the type of card issues, the time of the incident and the match the event occurred in. I used Python's http://www.crummy.com/software/BeautifulSoup/[Beautiful Soup library] for this task but there's no reason you couldn't use another set of tools. The https://github.com/mneedham/neo4j-bbc[README page] shows how to create your own version of the graph but here's an overview of what the graph looks like using https://twitter.com/rvanbruggen[Rik's] http://neo4j.com/blog/rvb-2-2-meta-graph/[meta graph query]: image::{{<siteurl>}}/uploads/2015/05/graph-21.png[Graph 21,600] Here's a few of my favourite queries so far: == Which player with more than 10 shots has the best conversion rate? [source,cypher] ---- match (a:Attempt)<-[:HAD_ATTEMPT]-(app)<-[:MADE_APPEARANCE]-(player), (app)-[:FOR_TEAM]-(team) WITH player, COUNT(*) as times, COLLECT(a) AS attempts, team WITH player, times, LENGTH([a in attempts WHERE a:Goal]) AS goals, team WHERE times > 10 RETURN player.name, team.name, goals, times, (goals * 1.0 / times) AS conversionRate ORDER BY conversionRate DESC LIMIT 10 ==> +------------------------------------------------------------------------------------+ ==> | player.name | team.name | goals | times | conversionRate | ==> +------------------------------------------------------------------------------------+ ==> | "Luiz Adriano" | "Shakhtar Donetsk" | 9 | 14 | 0.6428571428571429 | ==> | "Yacine Brahimi" | "FC Porto" | 5 | 13 | 0.38461538461538464 | ==> | "Mario Mandzukic" | "Atlético de Madrid" | 5 | 14 | 0.35714285714285715 | ==> | "Sergio Agüero" | "Manchester City" | 6 | 18 | 0.3333333333333333 | ==> | "Karim Benzema" | "Real Madrid" | 6 | 19 | 0.3157894736842105 | ==> | "Klaas-Jan Huntelaar" | "FC Schalke 04" | 5 | 16 | 0.3125 | ==> | "Neymar" | "Barcelona" | 9 | 29 | 0.3103448275862069 | ==> | "Thomas Müller" | "FC Bayern München" | 7 | 24 | 0.2916666666666667 | ==> | "Jackson Martínez" | "FC Porto" | 7 | 24 | 0.2916666666666667 | ==> | "Callum McGregor" | "Celtic" | 3 | 11 | 0.2727272727272727 | ==> +------------------------------------------------------------------------------------+ ---- == Which players gained immediate revenge for a foul? [source,cypher] ---- match (firstFoul:Foul)-[:COMMITTED_AGAINST]->(app1)<-[:MADE_APPEARANCE]-(revengeFouler), (app1)-[:IN_MATCH]->(match), (firstFoulerApp)-[:COMMITTED_FOUL]->(firstFoul), (app1)-[:COMMITTED_FOUL]->(revengeFoul)-[:COMMITTED_AGAINST]->(firstFoulerApp), (firstFouler)-[:MADE_APPEARANCE]->(firstFoulerApp) WHERE (firstFoul)-[:NEXT]->(revengeFoul) RETURN firstFouler.name AS firstFouler, revengeFouler.name AS revengeFouler, firstFoul.time, revengeFoul.time, match.home + " vs " + match.away ==> +---------------------------------------------------------------------------------------------------------------------------------+ ==> | firstFouler | revengeFouler | firstFoul.time | revengeFoul.time | match.home + " vs " + match.away | ==> +---------------------------------------------------------------------------------------------------------------------------------+ ==> | "Derk Boerrigter" | "Jean Philippe Mendy" | "88:48" | "89:42" | "Celtic vs NK Maribor" | ==> | "Mario Suárez" | "Pajtim Kasami" | "27:17" | "32:38" | "Olympiakos vs Atlético de Madrid" | ==> | "Aleksandr Volodko" | "Casemiro" | "39:27" | "44:32" | "FC Porto vs BATE Borisov" | ==> | "Thomas Müller" | "Mario Fernandes" | "87:22" | "88:31" | "CSKA Moscow vs FC Bayern München" | ==> | "Vinicius" | "Marco Verratti" | "56:36" | "58:00" | "APOEL Nicosia vs Paris Saint Germain" | ==> | "Lasse Schöne" | "Dani Alves" | "84:08" | "86:18" | "Barcelona vs Ajax" | ==> | "Nick Viergever" | "Dani Alves" | "57:22" | "60:37" | "Barcelona vs Ajax" | ==> | "Nani" | "Atsuto Uchida" | "6:10" | "8:40" | "FC Schalke 04 vs Sporting Lisbon" | ==> | "Andreas Samaris" | "Yannick Ferreira-Carrasco" | "89:21" | "90:00 +4:21" | "Monaco vs Benfica" | ==> | "Simon Kroon" | "Guillherme Siqueira" | "84:05" | "90:00 +0:29" | "Atlético de Madrid vs Malmö FF" | ==> | "Mario Suárez" | "Isaac Thelin" | "32:02" | "38:47" | "Atlético de Madrid vs Malmö FF" | ==> | "Hakan Balta" | "Henrikh Mkhitaryan" | "62:09" | "64:14" | "Borussia Dortmund vs Galatasaray" | ==> | "Marco Reus" | "Selcuk Inan" | "36:17" | "44:03" | "Borussia Dortmund vs Galatasaray" | ==> | "Hakan Balta" | "Sven Bender" | "10:57" | "12:51" | "Borussia Dortmund vs Galatasaray" | ==> | "Vinicius" | "Edinson Cavani" | "87:56" | "90:00 +1:25" | "Paris Saint Germain vs APOEL Nicosia" | ==> | "Jackson Martínez" | "Carlos Gurpegi" | "64:55" | "66:17" | "Athletic Club vs FC Porto" | ==> | "Nani" | "Chinedu Obasi" | "1:30" | "4:47" | "Sporting Lisbon vs FC Schalke 04" | ==> | "Vitali Rodionov" | "Bruno Martins Indi" | "52:16" | "60:08" | "BATE Borisov vs FC Porto" | ==> | "Raheem Sterling" | "Behrang Safari" | "29:00" | "33:27" | "Liverpool vs FC Basel" | ==> | "Derlis González" | "Fábio Coentrão" | "52:55" | "57:59" | "FC Basel vs Real Madrid" | ==> | "Josip Drmic" | "Lisandro López" | "15:04" | "17:35" | "Benfica vs Bayer 04 Leverkusen" | ==> | "Fred" | "Bastian Schweinsteiger" | "6:04" | "9:28" | "Shakhtar Donetsk vs FC Bayern München" | ==> | "Alex Sandro" | "Derlis González" | "4:07" | "7:28" | "FC Basel vs FC Porto" | ==> | "Luca Zuffi" | "Ruben Neves" | "73:49" | "84:44" | "FC Porto vs FC Basel" | ==> | "Marco Verratti" | "Oscar" | "28:49" | "34:04" | "Chelsea vs Paris Saint Germain" | ==> | "Cristiano Ronaldo" | "Jesús Gámez" | "20:59" | "25:37" | "Real Madrid vs Atlético de Madrid" | ==> | "Bernardo Silva" | "Álvaro Morata" | "49:20" | "62:31" | "Monaco vs Juventus" | ==> | "Arturo Vidal" | "Fabinho" | "38:19" | "45:00" | "Monaco vs Juventus" | ==> +---------------------------------------------------------------------------------------------------------------------------------+ ---- == Which players took the longest to gain revenge for a foul? [source,cypher] ---- match (foul1:Foul)-[:COMMITTED_AGAINST]->(app1)-[:COMMITTED_FOUL]->(foul2)-[:COMMITTED_AGAINST]->(app2)-[:COMMITTED_FOUL]->(foul1), (player1)-[:MADE_APPEARANCE]->(app1), (player2)-[:MADE_APPEARANCE]->(app2), (foul1)-[:COMMITTED_IN_MATCH]->(match:Match)<-[:COMMITTED_IN_MATCH]-(foul2) WHERE (foul1)-[:NEXT*]->(foul2) WITH match, foul1, player1, player2, foul2 ORDER BY foul1.sortableTime, foul2.sortableTime WITH match, foul1, player1, player2, COLLECT(foul2) AS revenge WITH match, foul1, player1,player2, revenge[0] AS revengeFoul RETURN player1.name, player2.name, foul1.time, revengeFoul.time, revengeFoul.sortableTime - foul1.sortableTime AS secondsWaited, match.home + " vs " + match.away AS match ORDER BY secondsWaited DESC LIMIT 5 ==> +---------------------------------------------------------------------------------------------------------------------------+ ==> | player1.name | player2.name | foul1.time | revengeFoul.time | secondsWaited | match | ==> +---------------------------------------------------------------------------------------------------------------------------+ ==> | "Stefan Johansen" | "Ondrej Duda" | "1:30" | "82:11" | 4841 | "Legia Warsaw vs Celtic" | ==> | "Neymar" | "Vinicius" | "2:35" | "80:08" | 4653 | "Barcelona vs APOEL Nicosia" | ==> | "Jérémy Toulalan" | "Stefan Kießling" | "9:19" | "86:37" | 4638 | "Monaco vs Bayer 04 Leverkusen" | ==> | "Nabil Dirar" | "Domenico Criscito" | "6:32" | "82:39" | 4567 | "Zenit St Petersburg vs Monaco" | ==> | "Nabil Dirar" | "Eliseu" | "7:20" | "81:30" | 4450 | "Monaco vs Benfica" | ==> +---------------------------------------------------------------------------------------------------------------------------+ ---- == Who's had the most shots? [source,cypher] ---- match (team)<-[:FOR_TEAM]-(app)<-[appRel:MADE_APPEARANCE]-(player:Player) optional match (a:Attempt)<-[att:HAD_ATTEMPT]-(app) WITH player, COUNT( DISTINCT appRel) AS apps, COUNT(att) as times, COLLECT(a) AS attempts, team WITH player,apps, times, LENGTH([a in attempts WHERE a:Goal]) AS goals, team WHERE times > 10 RETURN player.name, team.name, apps, goals, times, (goals * 1.0 / times) AS conversionRate ORDER BY times DESC LIMIT 10 ==> +-------------------------------------------------------------------------------------------+ ==> | player.name | team.name | apps | goals | times | conversionRate | ==> +-------------------------------------------------------------------------------------------+ ==> | "Cristiano Ronaldo" | "Real Madrid" | 12 | 10 | 69 | 0.14492753623188406 | ==> | "Lionel Messi" | "Barcelona" | 12 | 10 | 51 | 0.19607843137254902 | ==> | "Robert Lewandowski" | "FC Bayern München" | 12 | 6 | 43 | 0.13953488372093023 | ==> | "Carlos Tévez" | "Juventus" | 12 | 7 | 34 | 0.20588235294117646 | ==> | "Gareth Bale" | "Real Madrid" | 10 | 2 | 32 | 0.0625 | ==> | "Luis Suárez" | "Barcelona" | 9 | 6 | 30 | 0.2 | ==> | "Neymar" | "Barcelona" | 11 | 9 | 29 | 0.3103448275862069 | ==> | "Hakan Calhanoglu" | "Bayer 04 Leverkusen" | 8 | 2 | 29 | 0.06896551724137931 | ==> | "Edinson Cavani" | "Paris Saint Germain" | 8 | 6 | 27 | 0.2222222222222222 | ==> | "Alexis Sánchez" | "Arsenal" | 9 | 4 | 25 | 0.16 | ==> +-------------------------------------------------------------------------------------------+ ---- Maybe you can think of some cooler ones? I'd love to see them. Grab the https://github.com/mneedham/neo4j-bbc[code from github] and give it a try.
null
null
[ -0.012888429686427116, -0.019486701115965843, 0.004011739976704121, 0.01021578162908554, 0.053858622908592224, -0.026651505380868912, 0.002655894262716174, 0.07174738496541977, 0.041327062994241714, -0.007223635446280241, -0.012729492038488388, 0.02327689900994301, -0.082650326192379, 0.008792072534561157, 0.0158744715154171, 0.07326004654169083, 0.04984065517783165, 0.023884238675236702, 0.027177827432751656, -0.040410976856946945, 0.030677422881126404, 0.08167725801467896, -0.013267581351101398, 0.04334025830030441, 0.029987875372171402, 0.00559558579698205, 0.026625918224453926, 0.003583375597372651, -0.058120694011449814, 0.001734310295432806, 0.05805174633860588, -0.002945883432403207, -0.004974809475243092, -0.035210154950618744, 0.0344943031668663, -0.051788441836833954, -0.008243570104241371, 0.03146343305706978, -0.013247924856841564, 0.0012685235124081373, -0.07279426604509354, 0.03390120714902878, -0.03849366679787636, 0.014906015247106552, -0.03990036994218826, 0.01494001504033804, -0.006583665497601032, 0.03877636790275574, -0.009325860068202019, -0.005835196003317833, -0.06379558145999908, 0.04204535856842995, -0.00549466023221612, -0.0024948553182184696, -0.013366970233619213, 0.04888216778635979, -0.001452230615541339, -0.04122455418109894, 0.00402026018127799, -0.03509917110204697, -0.0048436387442052364, 0.008457875810563564, 0.010708258487284184, 0.010964549146592617, 0.008015045896172523, -0.03070025146007538, -0.008851421065628529, 0.046765170991420746, -0.010678191669285297, -0.022185908630490303, 0.0041632396169006824, 0.0006074479897506535, -0.06145322322845459, 0.017102621495723724, 0.021700413897633553, -0.061834756284952164, 0.0008374899043701589, 0.0604671835899353, 0.0026812918949872255, 0.055480193346738815, -0.012474610470235348, 0.014469730667769909, 0.013257630169391632, 0.024785533547401428, 0.006337374448776245, -0.0400744192302227, -0.045152898877859116, -0.018350252881646156, -0.04363350197672844, 0.052265822887420654, 0.019608303904533386, -0.07812009751796722, 0.028445638716220856, 0.012213091365993023, -0.021770769730210304, -0.005915373098105192, 0.007110641337931156, 0.027600286528468132, -0.003136200364679098, -0.0478372760117054, -0.04798123985528946, -0.03786962851881981, 0.03026396408677101, 0.022927632555365562, -0.0722031369805336, -0.008016839623451233, -0.00044316312414593995, -0.0014655506238341331, 0.017151759937405586, -0.00722484802827239, 0.0009108430240303278, -0.020270103588700294, -0.02697370946407318, -0.00041096622589975595, -0.07407725602388382, 0.04460476338863373, 0.022362560033798218, -0.02832290716469288, -0.017272455617785454, 0.012290830723941326, 0.0251398254185915, 0.005771190393716097, -0.0078110783360898495, 0.0826326385140419, 0.011606315150856972, 0.019563913345336914, 0.0005216983263380826, 0.07294664531946182, -0.023485073819756508, -0.05879725143313408, 0.00796451885253191, 0.07447763532400131, -0.023337887600064278, -0.007115252781659365, 0.002904278691858053, -0.018513379618525505, -0.01499516423791647, -0.016764026135206223, 0.043819282203912735, 0.05378399416804314, 0.0014221188612282276, -0.01215911190956831, 0.0032926583662629128, 0.043538957834243774, 0.017135843634605408, -0.027075225487351418, -0.006357325706630945, -0.03154667094349861, 0.010632958263158798, 0.002601813292130828, 0.03300026059150696, -0.02591956965625286, 0.04491059109568596, -0.019287535920739174, -0.01152000017464161, 0.11057921499013901, 0.051296401768922806, -0.0008406579727306962, -0.05915415287017822, 0.013770313933491707, 0.056483324617147446, 0.036320120096206665, -0.021025309339165688, 0.03291953727602959, -0.005234648007899523, -0.03465810790657997, -0.006934046745300293, 0.06839482486248016, -0.028917614370584488, 0.022325700148940086, -0.042264293879270554, -0.023320896551012993, 0.07295671105384827, -0.029478304088115692, -0.01856597699224949, 0.050177931785583496, 0.06292466074228287, 0.020564192906022072, 0.056830327957868576, 0.011035114526748657, -0.06625748425722122, 0.01708829030394554, 0.013861214742064476, 0.04703882709145546, 0.039274703711271286, -0.01821540854871273, 0.11370745301246643, 0.04194066673517227, -0.01718580350279808, 0.04199168086051941, -0.08903762698173523, -0.07202009111642838, -0.062050919979810715, 0.001126899616792798, 0.048373252153396606, -0.06000961363315582, 0.030674204230308533, 0.0701221376657486, 0.02989521063864231, 0.03684797137975693, 0.018756913021206856, 0.01880021207034588, 0.010880730114877224, -0.05555330961942673, -0.06914353370666504, 0.02116769179701805, 0.025376858189702034, -0.04903525859117508, -0.041851453483104706, 0.03899499401450157, -0.039546363055706024, 0.017381146550178528, 0.028735429048538208, -0.027416685596108437, 0.00405630050227046, 0.01627270132303238, 0.06547655165195465, -0.014387747272849083, 0.05303779989480972, -0.07735647261142731, 0.033972304314374924, 0.019489213824272156, -0.008769875392317772, -0.026164639741182327, 0.005705512128770351, 0.1275734007358551, 0.034013159573078156, -0.008358675055205822, -0.031130047515034676, -0.013654954731464386, -0.004619298502802849, -0.007492358796298504, -0.004981187172234058, -0.025674499571323395, -0.04260793700814247, -0.025152485817670822, -0.07177779823541641, -0.03414197266101837, 0.0011460951063781977, -0.04843294620513916, 0.03782667592167854, 0.039978209882974625, 0.013970071449875832, 0.02849394828081131, -0.013010243885219097, -0.02253779210150242, -0.023900529369711876, -0.0069773560389876366, -0.022144606336951256, 0.0001690126518951729, 0.041068416088819504, -0.012351068668067455, -0.006422852631658316, -0.04808730259537697, -0.045047469437122345, -0.005100051872432232, -0.04611498489975929, 0.016384419053792953, 0.06694233417510986, 0.07604999840259552, 0.015517372637987137, 0.0031391927041113377, -0.0070544034242630005, 0.012182286940515041, -0.03166830167174339, -0.05363454297184944, -0.07141842693090439, -0.05862255394458771, -0.0012203927617520094, 0.016336487606167793, 0.02835850417613983, 0.02284606173634529, -0.013650337234139442, 0.01694992370903492, -0.00099145935382694, 0.020240597426891327, 0.04975919798016548, -0.016333797946572304, -0.017938796430826187, -0.034560415893793106, -0.029769012704491615, 0.042616650462150574, -0.038847390562295914, -0.030255652964115143, -0.014837057329714298, -0.07582621276378632, 0.025403637439012527, -0.05433689057826996, -0.019292982295155525, 0.0063838716596364975, -0.028848540037870407, 0.042112987488508224, 0.016173286363482475, 0.005356490612030029, 0.03924144059419632, -0.0014500035904347897, 0.0256011001765728, 0.01522783376276493, 0.004139965865761042, 0.01755436882376671, 0.011790403164923191, 0.02730599418282509, 0.02652302011847496, -0.04278082028031349, 0.011204514652490616, -0.05065520480275154, 0.01623144932091236, -0.04846666753292084, -0.2723691165447235, 0.03418940678238869, 0.011205729097127914, -0.025282876566052437, 0.034809403121471405, -0.02299395576119423, 0.001569872722029686, -0.039575543254613876, -0.018209809437394142, 0.005973456893116236, -0.03620029613375664, -0.03491754084825516, -0.03250522166490555, 0.021042613312602043, 0.046814557164907455, 0.013289225287735462, -0.0010335594415664673, -0.0447387769818306, 0.006892372854053974, 0.055470362305641174, 0.008188312873244286, -0.043890371918678284, -0.005187013652175665, 0.0511077381670475, 0.008452069014310837, 0.06735310703516006, -0.05536771938204765, -0.004164775833487511, -0.055601321160793304, -0.035856954753398895, 0.05558030679821968, -0.03314319625496864, 0.005318563897162676, -0.013782581314444542, -0.011191357858479023, -0.015692124143242836, 0.049421925097703934, -0.009610489010810852, -0.014816667884588242, -0.022009776905179024, -0.03109792433679104, -0.037428200244903564, -0.013329778797924519, -0.017934879288077354, 0.1014183908700943, 0.010779408738017082, -0.05340901389718056, -0.026613257825374603, -0.03301926702260971, 0.079742431640625, -0.03042718581855297, -0.02504407986998558, -0.023397045210003853, 0.033433906733989716, -0.030725626274943352, 0.010361193679273129, -0.01584312878549099, -0.002490089973434806, -0.03215770423412323, -0.02539878711104393, -0.010831651277840137, -0.01958671770989895, -0.012439808808267117, -0.025145383551716805, -0.002283118199557066, -0.043770965188741684, -0.01986393705010414, -0.017584893852472305, 0.05438392609357834, 0.03659727796912193, -0.03883326053619385, 0.005569809582084417, 0.0107728885486722, -0.082157202064991, 0.004984044935554266, -0.002191148465499282, -0.0038433971349149942, 0.015807507559657097, 0.024472450837492943, 0.03157467395067215, -0.03819867968559265, -0.07111082971096039, 0.03090435266494751, -0.008622284047305584, 0.026188837364315987, -0.03167731314897537, 0.04438680037856102, 0.01244392804801464, -0.006788942962884903, -0.024877460673451424, 0.08160421997308731, -0.03428032249212265, -0.020781248807907104, 0.024746157228946686, -0.023217391222715378, 0.03567713126540184, -0.0056424192152917385, 0.00995548814535141, 0.018098779022693634, 0.040867555886507034, 0.020918386057019234, -0.04453585296869278, -0.0037847505882382393, -0.006938047241419554, 0.0014368277043104172, 0.002213856903836131, -0.03163088485598564, 0.010381650179624557, 0.02438305877149105, 0.01338476687669754, 0.03144266456365585, -0.008383255451917648, -0.014363768510520458, -0.027220100164413452, -0.012271871790289879, -0.0061094206757843494, 0.04588547721505165, 0.004766352474689484, -0.01630048267543316, -0.015877138823270798, -0.062123965471982956, 0.006545085925608873, 0.005550092551857233, -0.005259221885353327, -0.06455089151859283, -0.053421784192323685, -0.002273984020575881, -0.023772621527314186, 0.004314846359193325, -0.003574191825464368, -0.014090807177126408, -0.000396254617953673, 0.04156654328107834, -0.03020600974559784, 0.018346717581152916, -0.017056088894605637, -0.03978728875517845, -0.039515793323516846, 0.014269799925386906, 0.004491370636969805, -0.005223285406827927, 0.032234951853752136, -0.02146063558757305, 0.03301060199737549, 0.06159057468175888, -0.0072900112718343735, 0.004015925340354443, 0.013317990116775036, -0.012184425257146358, 0.037137486040592194, -0.009450193494558334, -0.0095102833583951, 0.014351480640470982, -0.02280575968325138, -0.031285371631383896, 0.010592236183583736, 0.04211478680372238, 0.02482452429831028, 0.008304152637720108, -0.030152827501296997, 0.013067144900560379, -0.05214860290288925, -0.008544111624360085, 0.020472142845392227, -0.0017016800120472908, 0.050885774195194244, 0.007019766140729189, -0.00042206532089039683, 0.017320021986961365, -0.017667200416326523, -0.00002883078923332505, -0.002767865778878331, -0.04765962436795235, 0.002020489890128374, -0.024703899398446083, -0.02050008811056614, -0.004647320136427879, 0.029947953298687935, -0.002475217916071415, 0.0012034672545269132, -0.023202015087008476, -0.014459406957030296, 0.024143479764461517, 0.021959448233246803, 0.05698796361684799, 0.053216252475976944, -0.05189608037471771, -0.0035531509201973677, 0.00640189740806818, -0.006506427191197872, -0.02250453270971775, 0.0040062833577394485, -0.0212883111089468, -0.005761692300438881, -0.024875188246369362, -0.08660225570201874, 0.019582409411668777, 0.0024063822347670794, 0.007875848561525345, -0.014571336098015308, -0.02918289043009281, 0.004185970406979322, -0.025539737194776535, 0.02493595890700817, 0.030810508877038956, -0.05403141304850578, -0.02452676370739937, -0.012792043387889862, 0.010009171441197395, -0.0015165639342740178, 0.010274270549416542, -0.050567470490932465, -0.017897972837090492, 0.008789822459220886, 0.023542208597064018, -0.015053494833409786, -0.010615034028887749, -0.03859146311879158, 0.028251199051737785, 0.0018756857607513666, 0.03384571895003319, -0.012655377388000488, -0.01611306704580784, -0.004371402319520712, -0.013296966440975666, 0.019200399518013, -0.019775256514549255, -0.030184777453541756, 0.012770337983965874, -0.006320778746157885, 0.03238832205533981, -0.016686096787452698, 0.033492717891931534, 0.03145807981491089, 0.011408088728785515, 0.017165683209896088, -0.050526779145002365, 0.025949440896511078, 0.019953792914748192, 0.061532650142908096, 0.004645217210054398, -0.004382515326142311, -0.02342018485069275, 0.013329270295798779, 0.0008302158676087856, 0.01781195029616356, -0.0020371554419398308, 0.012713436968624592, 0.009152171202003956, 0.04876414313912392, 0.012246678583323956, 0.03922969102859497, 0.030075669288635254, -0.03665158897638321, 0.03283305838704109, -0.05907541513442993, -0.01637398637831211, -0.023564478382468224, -0.03724077343940735, 0.03218551352620125, 0.01759093813598156, 0.031649794429540634, -0.07937651127576828, 0.05171413719654083, 0.013998034410178661, 0.030681056901812553, 0.06725262850522995, 0.022183995693922043, 0.01699608750641346, -0.017112238332629204, 0.0018081606831401587, -0.09369828552007675, -0.00646199518814683, 0.06635333597660065, 0.007220455911010504, 0.011280803941190243, -0.007310224696993828, -0.033249031752347946, 0.033856648951768875, -0.06616979092359543, -0.02788916602730751, 0.021608948707580566, -0.00933112483471632, -0.005075591616332531, 0.012065053917467594, -0.057483263313770294, -0.007655201014131308, 0.06659363210201263, -0.04990563541650772, 0.00835371669381857, -0.016480272635817528, 0.06662178039550781, -0.029455389827489853, 0.009137939661741257, -0.008064696565270424, -0.04540479928255081, 0.0856032520532608, 0.018726028501987457, 0.023545466363430023, 0.03278068080544472, 0.006543199066072702, 0.019596997648477554, -0.0006846424075774848, -0.005001096986234188, 0.025974195450544357, 0.03287002444267273, -0.013022897765040398, -0.05391700938344002, 0.041672129184007645, -0.001192204188555479, -0.015365248546004295, -0.05441629886627197, 0.08249019831418991, -0.0021260487847030163, -0.05750800296664238, -0.04460040107369423, -0.004765647929161787, -0.031742945313453674, -0.022320492193102837, -0.007574915885925293, -0.009956404566764832, -0.036124397069215775, 0.06510301679372787, 0.0010108314454555511, -0.006303758360445499, 0.07432227581739426, -0.021196981891989708, -0.0005591294611804187, 0.015528257936239243, 0.0793965756893158, 0.08175046741962433, 0.05715158209204674, -0.006529881618916988, 0.0774325281381607, -0.0059836371801793575, -0.04878021404147148, 0.007941477000713348, -0.017175886780023575, -0.004002856556326151, 0.004759134724736214, -0.001234533847309649, 0.02674655057489872, -0.02144966460764408, 0.04062419757246971, 0.005627007689327002, -0.0384255051612854, 0.0001769118825905025, 0.011237245984375477, 0.03203851357102394, 0.04924001917243004, 0.013454091735184193, 0.030277708545327187, -0.010511428117752075, -0.03769587725400925, 0.058064673095941544, -0.0161745585501194, -0.02422001026570797, 0.02246401458978653, -0.04568767547607422, 0.02748885750770569, 0.007291207555681467, 0.04880012199282646, 0.07202150672674179, -0.023278875276446342, -0.017568495124578476, -0.013644494116306305, 0.011838842183351517, 0.0022439402528107166, 0.020186791196465492, -0.001601677155122161, 0.012868057005107403, -0.01298490446060896, -0.07811593264341354, -0.021921807900071144, -0.03457682579755783, -0.01852394826710224, 0.02346176654100418, -0.010576607659459114, 0.00915667787194252, 0.0046339984983205795, -0.0020623242016881704, -0.05485798418521881, -0.040953367948532104, -0.053287819027900696, -0.07559129595756531, -0.06379970908164978, -0.05150611698627472, 0.04362884908914566, 0.011890679597854614, -0.04083270952105522, -0.031797003000974655, -0.02433306910097599, -0.024830762296915054, -0.005177941173315048, -0.04003347083926201, -0.01804099604487419, 0.02109030820429325, 0.036644428968429565, 0.03020414710044861, 0.0018425245070829988, 0.04227174073457718, -0.01134827733039856, -0.025363270193338394, -0.024603206664323807, 0.0256198737770319, 0.03414762765169144, 0.014806720428168774, -0.007153302431106567, -0.10377644747495651, 0.006190267391502857, 0.019671062007546425, -0.04165181517601013, -0.062162574380636215, 0.0278440173715353, 0.027977684512734413, 0.03185129910707474, 0.04762432724237442, -0.04946129769086838, -0.00868478137999773, -0.05397062748670578, 0.0007727576303295791, -0.011715236119925976, 0.022884074598550797, 0.05489625781774521, -0.018248850479722023, 0.09385279566049576, 0.02647378295660019, 0.028354587033391, -0.0571611188352108, -0.010938017629086971, -0.027117392048239708, 0.01936664991080761, -0.03710057958960533, -0.008253635838627815, -0.04921857640147209, -0.09674979001283646, -0.037498533725738525, 0.02873610518872738, -0.011051521636545658, -0.03802236542105675, 0.012571943923830986, 0.013869198970496655, -0.0014679422602057457, 0.019314588978886604, -0.02630421705543995, 0.018787771463394165, -0.021043499931693077, -0.0091470405459404, -0.02268454059958458, 0.043231040239334106, 0.027140455320477486, 0.006982859224081039, -0.02147441916167736, -0.02685164473950863, -0.0009540265309624374, -0.013239421881735325, -0.009619742631912231, 0.028117915615439415, -0.01669273152947426, 0.022122850641608238 ]
[ -0.06288545578718185, 0.003311860142275691, -0.034130919724702835, -0.04722301661968231, 0.11004216969013214, -0.0174846351146698, 0.004032530821859837, 0.006591410841792822, 0.04271649941802025, 0.0023422373924404383, -0.014650055207312107, -0.09618502855300903, -0.019816134124994278, -0.012235072441399097, 0.02672704868018627, -0.015369082801043987, -0.027223246172070503, -0.08811834454536438, -0.039801787585020065, 0.024783046916127205, -0.015594287775456905, 0.008740994147956371, -0.023784013465046883, -0.03187926113605499, 0.015961069613695145, 0.005448472686111927, 0.061501044780015945, -0.017378894612193108, -0.03715045750141144, -0.20201139152050018, 0.016042441129684448, -0.022173214703798294, 0.01621137000620365, -0.005815339274704456, 0.01121522020548582, -0.016622263938188553, 0.013616884127259254, 0.00422016903758049, 0.032944079488515854, 0.037485744804143906, 0.009656655602157116, 0.003404943970963359, -0.0445292703807354, -0.05383370444178581, 0.04742756858468056, 0.009761623106896877, 0.018134387210011482, 0.028632666915655136, 0.059835996478796005, 0.049181241542100906, -0.059339478611946106, 0.033593423664569855, -0.007480452302843332, -0.04882397502660751, -0.005260191857814789, 0.04666588455438614, 0.043099094182252884, 0.04866144061088562, 0.015724586322903633, 0.059115346521139145, 0.043536994606256485, 0.004732361529022455, -0.1470198631286621, 0.09720949083566666, -0.0011744378134608269, 0.03376588225364685, -0.02537754364311695, 0.02552993968129158, 0.014530336484313011, 0.08412932604551315, -0.021632341668009758, -0.0531611330807209, 0.014292385429143906, 0.02949691191315651, 0.04381873086094856, -0.03408195078372955, -0.008507364429533482, 0.004039911553263664, -0.031290192157030106, -0.018167369067668915, -0.05394740402698517, 0.011652398854494095, -0.017576955258846283, -0.033578526228666306, -0.04163637012243271, 0.007478482089936733, -0.05028659477829933, 0.05098174512386322, 0.022843647748231888, 0.023802930489182472, 0.05556245148181915, 0.012677101418375969, 0.005013910122215748, 0.01760724186897278, -0.10885465145111084, -0.0445987768471241, -0.004677783232182264, 0.007804988417774439, -0.015176907181739807, 0.4325295388698578, -0.007905394770205021, -0.012594395317137241, 0.04343991354107857, 0.041231077164411545, 0.02097666636109352, -0.022422248497605324, 0.025272401049733162, -0.035404399037361145, -0.020840756595134735, -0.030479006469249725, -0.01598265953361988, -0.014561239629983902, 0.05722721666097641, -0.03124406561255455, 0.022038374096155167, 0.05044714733958244, 0.007568885572254658, 0.00751927075907588, -0.004581967368721962, 0.009705656208097935, -0.027667123824357986, -0.014176956377923489, -0.022317009046673775, -0.002405646024271846, -0.016385704278945923, 0.04007163271307945, 0.030556628480553627, 0.0583982951939106, 0.04034148156642914, 0.0037215794436633587, 0.04283998906612396, -0.04126321151852608, -0.08432689309120178, 0.013217597268521786, -0.014866089448332787, -0.024141747504472733, 0.014560147188603878, -0.021815288811922073, 0.011327761225402355, 0.03478375822305679, 0.004120941739529371, -0.09251980483531952, 0.05447538569569588, -0.025326458737254143, -0.03405263274908066, 0.08764278888702393, 0.011937116272747517, -0.0438910610973835, 0.012224017642438412, -0.07674957811832428, 0.0020716760773211718, 0.003806950291618705, 0.02258692868053913, -0.03832422196865082, -0.0399605818092823, 0.008519042283296585, 0.06262538582086563, -0.03957033529877663, -0.06140129640698433, -0.02918826974928379, -0.03094860352575779, -0.06280587613582611, -0.03159689903259277, 0.04708177596330643, 0.02552991546690464, -0.12611673772335052, -0.006557745393365622, -0.02767970599234104, -0.01492459699511528, -0.08004399389028549, -0.002844962989911437, -0.007543559186160564, -0.03978043422102928, 0.008586395531892776, 0.0339212492108345, 0.013804513961076736, -0.03096367046236992, -0.011501752771437168, 0.08735004812479019, -0.0020472947508096695, 0.016605613753199577, -0.012550006620585918, -0.07948516309261322, 0.018132170662283897, -0.04442157968878746, -0.06312507390975952, -0.0719325914978981, -0.014304784126579762, -0.0008720490732230246, 0.020520014688372612, -0.0354616716504097, -0.036145348101854324, -0.05021429806947708, 0.05473453551530838, -0.006004054564982653, 0.03408411890268326, -0.017672311514616013, -0.02864503674209118, -0.015830274671316147, -0.02467276155948639, -0.03479420766234398, -0.009422683157026768, -0.025242634117603302, 0.000711771019268781, -0.023634234443306923, 0.04081433638930321, 0.03972423076629639, -0.032059334218502045, 0.08165843039751053, -0.000310782139422372, -0.0260233785957098, -0.026982156559824944, -0.019376279786229134, -0.020621147006750107, 0.004101344849914312, -0.0020541183184832335, 0.008116921409964561, 0.017087869346141815, 0.013897157274186611, 0.06065228581428528, -0.019245725125074387, -0.017695525661110878, 0.00873481947928667, -0.314198762178421, -0.022467631846666336, -0.04387342929840088, 0.010527513921260834, 0.048660844564437866, -0.026875006034970284, 0.0194091796875, -0.017410991713404655, 0.03827313706278801, 0.04719888046383858, 0.09925949573516846, -0.018803900107741356, -0.01401591021567583, -0.07250808924436569, -0.012784149497747421, 0.002109331311658025, -0.048408783972263336, 0.0005752401775680482, -0.02612576261162758, 0.05314818024635315, 0.049455586820840836, -0.014769681729376316, -0.04386015236377716, -0.019323943182826042, 0.003055138513445854, -0.06823337078094482, 0.1401711106300354, 0.055647604167461395, 0.03783116117119789, -0.07112210243940353, 0.024280929937958717, 0.010783624835312366, 0.010709949769079685, -0.10234975814819336, 0.007863659411668777, 0.00025405242922715843, 0.021673744544386864, -0.024005120620131493, 0.03458861634135246, -0.055859215557575226, -0.018163779750466347, 0.02563532069325447, -0.027638373896479607, -0.04314474016427994, -0.046509999781847, 0.05161859467625618, 0.0014371155994012952, -0.05194057151675224, -0.031097417697310448, 0.07574586570262909, 0.0328083373606205, 0.017152030020952225, 0.07588120549917221, -0.00861270260065794, 0.03051169402897358, -0.02154475636780262, -0.0738358348608017, 0.00010595607454888523, -0.023769186809659004, -0.00829590018838644, 0.02374776266515255, 0.01915053278207779, 0.08386809378862381, -0.07909214496612549, -0.005470489151775837, 0.04692702740430832, 0.04270397871732712, -0.007653478533029556, 0.04416728764772415, -0.0012577855959534645, -0.0184791162610054, 0.04827315732836723, 0.022001951932907104, 0.005130344536155462, 0.03281492739915848, 0.07727328687906265, 0.029884904623031616, 0.025081776082515717, 0.032556746155023575, 0.03245936706662178, 0.053154703229665756, -0.04153728857636452, 0.03402493894100189, -0.01990056037902832, 0.02561786025762558, 0.0470934696495533, 0.0166586022824049, -0.025159288197755814, 0.06570848822593689, 0.024639727547764778, 0.0013519725762307644, 0.005623967386782169, -0.04561896249651909, -0.00994198489934206, 0.013964151032269001, -0.024567073211073875, -0.23501987755298615, 0.027267659083008766, 0.07918210327625275, 0.053534746170043945, 0.02876168116927147, -0.008274683728814125, 0.047142479568719864, -0.019561566412448883, -0.016027837991714478, 0.004011963028460741, 0.010774369351565838, -0.00870081689208746, -0.015515511855483055, -0.010991465300321579, -0.014217540621757507, -0.015093108639121056, 0.025617854669690132, 0.013154241256415844, 0.007111250422894955, 0.05418236926198006, 0.03929029405117035, -0.006220357958227396, 0.15909555554389954, 0.004241943359375, 0.05207766965031624, 0.06322605162858963, -0.008039876818656921, -0.04989400878548622, 0.020016424357891083, -0.001983578084036708, 0.016421683132648468, -0.016552049666643143, 0.026418212801218033, 0.05263452231884003, -0.007976378314197063, -0.02935258485376835, -0.029166704043745995, 0.0855964943766594, -0.01854994334280491, -0.054958563297986984, -0.007045466918498278, 0.043447740375995636, -0.05845879763364792, -0.004072881769388914, 0.05086583271622658, 0.03382958099246025, -0.001520274206995964, -0.023365847766399384, -0.054068055003881454, -0.009666134603321552, -0.03427364304661751, -0.04498029872775078, -0.0007295687682926655, -0.020534483715891838, 0.006646453402936459, 0.07061817497015, 0.041785985231399536, -0.013363388366997242, 0.035742342472076416, 0.02274044044315815, -0.004975614137947559, -0.0151490094140172, 0.06463555246591568, 0.0038897579070180655, 0.014277559705078602 ]
[ 0.018991248682141304, 0.043909043073654175, 0.004090798553079367, 0.0019382754107937217, 0.047610122710466385, 0.03708425909280777, -0.017885465174913406, 0.013078750111162663, 0.019412141293287277, -0.01613081619143486, -0.019407158717513084, -0.008051205426454544, -0.005670758429914713, 0.0030876905657351017, 0.037738874554634094, -0.0211003627628088, -0.03940959274768829, -0.0472685806453228, 0.01595950312912464, -0.0012937879655510187, -0.011510124430060387, -0.001377228763885796, 0.0005443630507215858, -0.0008798635681159794, -0.04592929035425186, 0.023706356063485146, -0.028534473851323128, 0.03128126636147499, 0.019240276888012886, -0.12084084749221802, -0.01718292012810707, -0.053150635212659836, 0.004804616793990135, -0.0072749885730445385, -0.006636762525886297, -0.020015910267829895, -0.02319408394396305, -0.0013543941313400865, -0.015909340232610703, 0.030867209658026695, 0.0009910129010677338, -0.04950878396630287, -0.019685380160808563, 0.03556610643863678, 0.003956993576139212, 0.0058249798603355885, -0.017121819779276848, 0.02113894745707512, -0.0039728544652462006, 0.007356149144470692, -0.037884268909692764, -0.021776298061013222, 0.007451692130416632, 0.007317792624235153, 0.05840024724602699, -0.019575688987970352, -0.028500229120254517, -0.022512439638376236, -0.003963979426771402, -0.04475649818778038, 0.00861095916479826, 0.015439772978425026, -0.028948068618774414, -0.01945546455681324, -0.013687437400221825, 0.0011128302430734038, -0.025936586782336235, 0.015550420619547367, 0.011180153116583824, 0.02451738342642784, -0.035901375114917755, 0.008916843682527542, -0.029263846576213837, -0.014559360221028328, -0.008024842478334904, -0.01884462684392929, -0.04194144532084465, -0.035884883254766464, -0.021575964987277985, -0.015157941728830338, -0.033357471227645874, -0.03760913014411926, 0.018806200474500656, 0.013738849200308323, 0.019857600331306458, -0.039660170674324036, 0.008775717578828335, -0.014877132140100002, 0.01314502116292715, 0.002870701253414154, -0.04667915776371956, 0.017578139901161194, 0.035203076899051666, 0.04165710508823395, -0.07521717995405197, 0.022897779941558838, 0.00006226108962437138, -0.018531976267695427, -0.013903675600886345, 0.8144506216049194, -0.005545522551983595, 0.009403835982084274, -0.018250400200486183, 0.016320740804076195, 0.020834680646657944, -0.01152369286864996, -0.0252058245241642, 0.03292234614491463, 0.014972726814448833, -0.05595070496201515, 0.01050914078950882, 0.0352398045361042, 0.008059760555624962, 0.02096996270120144, -0.029163485392928123, 0.06736049801111221, -0.012804648838937283, 0.0038202349096536636, -0.0069816033355891705, 0.029225343838334084, 0.017163142561912537, 0.016165856271982193, -0.025619689375162125, 0.0030354384798556566, 0.01889779604971409, -0.1589493304491043, 0.03368097543716431, -7.525663974810045e-33, 0.06165231391787529, -0.01414650771766901, -0.033838022500276566, -0.02370847389101982, -0.02602681703865528, 0.02156439796090126, -0.015273608267307281, -0.018339267000555992, -0.005082392133772373, -0.024990128353238106, -0.0002615081029944122, 0.009068923071026802, 0.004498688969761133, -0.017694566398859024, 0.04639003053307533, -0.002432222943753004, -0.02087722159922123, 0.04777625948190689, 0.001056135748513043, 0.014295640401542187, -0.004427777137607336, 0.025341417640447617, 0.03750986605882645, 0.007231489755213261, -0.0015183178475126624, 0.0754135325551033, -0.04434341937303543, -0.01750701665878296, 0.003362818155437708, -0.04569743573665619, -0.004331734962761402, -0.00901781115680933, -0.011320493184030056, -0.021169079467654228, 0.012582404538989067, -0.036961376667022705, -0.0427105613052845, 0.00007202033884823322, -0.04916408285498619, -0.014879805035889149, -0.05323665961623192, -0.01662060245871544, -0.023168222978711128, -0.0748198851943016, -0.02140391804277897, -0.0010812710970640182, -0.03816024586558342, -0.015679048374295235, -0.02003892883658409, -0.0176788792014122, 0.037297509610652924, -0.010502011515200138, 0.02268807590007782, -0.01940733753144741, -0.006596656516194344, 0.028410114347934723, 0.004983803723007441, 0.03458567336201668, -0.003006074344739318, -0.01679414138197899, 0.05586668848991394, -0.00244474271312356, 0.00503365695476532, 0.0432329922914505, -0.014074860140681267, 0.025005748495459557, 0.02214125171303749, -0.014960641972720623, 0.010890181176364422, -0.025946635752916336, -0.050580188632011414, 0.08802349865436554, -0.006139873992651701, -0.018718671053647995, 0.022968264296650887, -0.021151641383767128, 0.008582166396081448, -0.015432172454893589, -0.018252965062856674, 0.06893505156040192, 0.03550894930958748, -0.009860217571258545, 0.0021005072630941868, -0.06539708375930786, -0.024105165153741837, 0.022727781906723976, 0.029515163972973824, 0.002380055608227849, 0.006079372484236956, 0.022111566737294197, 0.005774044431746006, 0.03282301127910614, -0.04301684722304344, -0.021342245861887932, 0.00044566174619831145, 7.037595046928785e-33, -0.003629447892308235, -0.015691446140408516, 0.027622941881418228, 0.003864976344630122, 0.028717150911688805, -0.01660194993019104, 0.024755628779530525, 0.03261459991335869, -0.03557373583316803, 0.045479461550712585, 0.008563497103750706, -0.022847719490528107, -0.042318880558013916, 0.005573626141995192, 0.05377480015158653, -0.029497532173991203, -0.009829482063651085, 0.010494470596313477, 0.0004092592862434685, 0.0021584671922028065, 0.023364059627056122, 0.006831259001046419, 0.02312367595732212, -0.0001881259959191084, -0.0021136130671948195, 0.033314093947410583, 0.011805434711277485, -0.002628333866596222, -0.012727092020213604, 0.0064367312006652355, 0.008914015255868435, -0.024930763989686966, -0.007812836207449436, -0.019449392333626747, 0.003425916191190481, 0.05121913552284241, -0.02539529651403427, 0.002248749602586031, 0.03462740406394005, -0.00022653689666185528, 0.014830024912953377, 0.015032094903290272, -0.03467971086502075, 0.03555751591920853, 0.015607040375471115, 0.03212590515613556, -0.030039867386221886, -0.023192185908555984, 0.017481470480561256, 0.026786189526319504, 0.03517250716686249, 0.006041510961949825, -0.026680340990424156, 0.004721459932625294, 0.024881726130843163, -0.019242413341999054, -0.02652725763618946, 0.01673068106174469, -0.02394569292664528, -0.007731138728559017, -0.04552719369530678, 0.023075401782989502, -0.06630119681358337, 0.03658115491271019, -0.008841094560921192, 0.035891108214855194, -0.06910490244626999, -0.035421084612607956, 0.014680652879178524, 0.02958553470671177, -0.010387697257101536, -0.006204182747751474, -0.01869015395641327, 0.04279876500368118, -0.004647252149879932, 0.01893233135342598, -0.014531196095049381, 0.05265909805893898, -0.023126699030399323, 0.03601439669728279, 0.012332859449088573, 0.002038841135799885, 0.05773809552192688, 0.0011378538329154253, 0.014958463609218597, 0.029331648722290993, -0.020572038367390633, 0.002775847213342786, 0.02079853042960167, -0.0004082013329025358, 0.033458128571510315, -0.004246199037879705, 0.017647918313741684, -0.0032213630620390177, 0.050053246319293976, -1.2923599079783799e-8, -0.0637911930680275, 0.01220864336937666, -0.01744196191430092, 0.04752060025930405, 0.016465384513139725, 0.040038157254457474, 0.01152675598859787, -0.050855133682489395, 0.02109975926578045, 0.004877873230725527, 0.043123967945575714, -0.002659241436049342, -0.00113519630394876, 0.005482933484017849, 0.006267020478844643, -0.029765358194708824, -0.04135700687766075, -0.022760257124900818, 0.034852635115385056, 0.05585237219929695, 0.030990328639745712, 0.005326170939952135, 0.0009800632251426578, 0.002486559096723795, 0.018784958869218826, -0.04887940734624863, 0.005293500144034624, -0.09839753806591034, -0.03645404055714607, -0.02598048932850361, 0.047305695712566376, -0.039505865424871445, 0.01741291955113411, 0.013555843383073807, 0.01479773223400116, -0.00819920003414154, 0.004393738694489002, -0.02462657541036606, -0.008242915384471416, 0.001808295608498156, -0.0019237182568758726, -0.005105555988848209, -0.0423266738653183, -0.0474599152803421, 0.02310529164969921, -0.0071778809651732445, -0.034481946378946304, -0.0190830547362566, -0.01487188134342432, -0.041748519986867905, 0.0062922528013587, -0.026838961988687515, 0.046666570007801056, 0.027767984196543694, 0.055946558713912964, 0.03253348544239998, 0.02018882893025875, -0.00618808064609766, -0.025177577510476112, -0.00019406512728892267, 0.03753044083714485, 0.013281049206852913, -0.01715058647096157, -0.027980206534266472 ]
neo4j-the-bbc-champions-league-graph
https://markhneedham.com/blog/2015/05/30/neo4j-the-bbc-champions-league-graph
false
2015-05-24 23:51:25
Python: Joining multiple generators/iterators
[ "python" ]
[ "Python" ]
In my previous blog post I described how I'd http://www.markhneedham.com/blog/2015/05/23/python-refactoring-to-iterator/[refactored some scraping code I've been working on to use iterators] and ended up with a function which returned a generator containing all the events for one BBC live text match: [source,python] ---- match_id = "32683310" events = extract_events("data/raw/%s" % (match_id)) >>> print type(events) <type 'generator'> ---- The next thing I wanted to do is get the events for multiple matches which meant I needed to glue together multiple generators into one big generator. itertools' +++<cite>+++https://docs.python.org/2/library/itertools.html#itertools.chain[chain]+++</cite>+++ function http://stackoverflow.com/questions/3211041/how-to-join-two-generators-in-python[does exactly what we want]: ____ itertools.chain(*iterables) Make an iterator that returns elements from the first iterable until it is exhausted, then proceeds to the next iterable, until all of the iterables are exhausted. Used for treating consecutive sequences as a single sequence. ____ First let's try it out on a collection of range generators: [source,python] ---- import itertools gens = [(n*2 for n in range(0, 3)), (n*2 for n in range(4,7))] >>> gens [<generator object <genexpr> at 0x10ff3b140>, <generator object <genexpr> at 0x10ff7d870>] output = itertools.chain() for gen in gens: output = itertools.chain(output, gen) ---- Now if we iterate through 'output' we'd expect to see the multiples of 2 up to and including 12: [source,python] ---- >>> for item in output: ... print item ... 0 2 4 8 10 12 ---- Exactly as we expected! Our scraping code looks like this once we plug the chaining in: [source,python] ---- matches = ["32683310", "32683303", "32384894", "31816155"] raw_events = itertools.chain() for match_id in matches: raw_events = itertools.chain(raw_events, extract_events("data/raw/%s" % (match_id))) ---- 'raw_events' now contains a single generator that we can iterate through and process the events for all matches.
null
null
[ 0.023874422535300255, -0.028495224192738533, -0.029802313074469566, 0.006933566648513079, 0.04335466027259827, 0.008871378377079964, -0.013574770651757717, 0.04058759659528732, 0.02249288372695446, 0.016846075654029846, 0.0034612189047038555, 0.01269456185400486, -0.0742347314953804, 0.025043347850441933, -0.02371649444103241, 0.06311196833848953, 0.048154089599847794, -0.027718661352992058, 0.0028319754637777805, -0.014072363264858723, -0.017811080440878868, 0.07663019746541977, 0.009170853532850742, 0.02061174064874649, 0.03711268678307533, 0.01679430529475212, -0.024234812706708908, 0.008440455421805382, -0.04950448125600815, -0.010128069669008255, 0.018362998962402344, -0.0027861837297677994, -0.005387201905250549, -0.014271887950599194, 0.04417671263217926, -0.03495270013809204, -0.028094911947846413, 0.00592611450701952, -0.012382207438349724, 0.013539250940084457, -0.04721391573548317, 0.01855108141899109, -0.04794938489794731, 0.019678665325045586, -0.046218980103731155, 0.0309725534170866, -0.02729802019894123, -0.0032709746155887842, -0.013226209208369255, -0.009439440444111824, -0.06693963706493378, 0.014656257815659046, 0.018076414242386818, -0.0172007754445076, 0.0061507634818553925, 0.03572440519928932, 0.01807871088385582, -0.0557435043156147, 0.025117455050349236, -0.009950392879545689, -0.0063955956138670444, -0.011213795281946659, -0.0067597548477351665, 0.0626392513513565, 0.028316758573055267, -0.01710534654557705, -0.02218714915215969, 0.04569322243332863, -0.031807512044906616, -0.03100845031440258, -0.039056628942489624, 0.04547648876905441, -0.0336797758936882, 0.014923029579222202, -0.013752118684351444, -0.04747661575675011, -0.03797630965709686, 0.055259015411138535, 0.009098729118704796, 0.06482963263988495, 0.02795337699353695, 0.012117662467062473, 0.030875438824295998, 0.02151111699640751, 0.010820193216204643, -0.00144199188798666, -0.07290618866682053, 0.00001849987165769562, -0.03756549581885338, 0.04804838448762894, 0.011202624998986721, -0.05622423440217972, 0.00893140397965908, 0.004131006076931953, -0.015255671925842762, -0.0008327207178808749, 0.0054860408417880535, -0.010393585078418255, -0.01040174812078476, -0.016340693458914757, -0.055649884045124054, -0.042322926223278046, 0.019089575856924057, -0.013987738639116287, -0.08151115477085114, -0.02726767212152481, -0.02574050985276699, -0.013659299351274967, 0.021510029211640358, -0.00603759940713644, -0.03111882694065571, 0.00785246305167675, -0.03120989166200161, 0.0065407645888626575, -0.09334413707256317, 0.054546911269426346, 0.02310296520590782, -0.02639705128967762, -0.012780165299773216, -0.0032431287690997124, 0.054919905960559845, 0.026133541017770767, -0.0041168383322656155, 0.08501757681369781, -0.004832574166357517, 0.055390432476997375, 0.015566356480121613, 0.06548769772052765, -0.043664202094078064, -0.04766083136200905, -0.006701771169900894, 0.05876199156045914, -0.033995408564805984, 0.003914568107575178, -0.00975978747010231, -0.015302413143217564, -0.03834785148501396, -0.006762663368135691, 0.04455892741680145, 0.03488267585635185, 0.016878699883818626, -0.010725857689976692, 0.008818411268293858, 0.0143467728048563, 0.015081939287483692, 0.035041313618421555, -0.048064958304166794, -0.01541042048484087, 0.010881590656936169, 0.014430618844926357, 0.004389118403196335, 0.015148740261793137, 0.04624825343489647, -0.021080298349261284, 0.0039489055052399635, 0.07271722704172134, 0.03531157597899437, 0.039916712790727615, -0.0368877574801445, 0.008745808154344559, 0.032898951321840286, 0.008771130815148354, 0.002596704987809062, 0.050208501517772675, -0.013003416359424591, -0.014608177356421947, 0.007376488298177719, 0.0666942298412323, -0.01129102148115635, -0.015364672988653183, -0.051187124103307724, -0.04535861685872078, 0.037319499999284744, -0.04588157683610916, -0.021387601271271706, -0.00887870229780674, 0.050669699907302856, -0.0009936925489455462, 0.06485051661729813, 0.0014060910325497389, -0.06115392595529556, 0.00770333968102932, 0.0031419219449162483, 0.026068149134516716, 0.022958258166909218, -0.020618867129087448, 0.10012926906347275, 0.04619458690285683, 0.014481883496046066, 0.01625482551753521, -0.09125565737485886, -0.07454406470060349, -0.03215424343943596, -0.010093729011714458, 0.04316994547843933, -0.07428696006536484, 0.01094303373247385, 0.062364064157009125, 0.029670462012290955, 0.03213714808225632, 0.014036951586604118, -0.005567216780036688, -0.0001670587225817144, -0.036681875586509705, -0.06865812093019485, 0.013488470576703548, 0.03549394756555557, -0.041996683925390244, -0.04748281463980675, 0.004499548114836216, -0.006964734755456448, 0.05361966788768768, 0.03344864398241043, -0.036662425845861435, 0.03276091068983078, 0.06479702889919281, 0.03181163966655731, -0.021265482529997826, 0.053956322371959686, -0.049661021679639816, 0.05732640624046326, 0.002811289392411709, -0.006445154082030058, -0.02989242784678936, 0.010414181277155876, 0.14557109773159027, 0.04217168688774109, -0.025290001183748245, -0.05876030772924423, 0.03298722580075264, -0.019265078008174896, -0.006080569699406624, -0.01955123245716095, -0.01419447548687458, -0.04519909992814064, 0.03957514837384224, -0.03256269544363022, -0.03810764476656914, 0.0016927135875448585, -0.04334178566932678, 0.00932057574391365, 0.06783512979745865, -0.06349027156829834, 0.05347184091806412, 0.0117260180413723, -0.007797787431627512, -0.0124844741076231, -0.02584437094628811, -0.06744484603404999, -0.005245058331638575, 0.01082914974540472, -0.026744158938527107, 0.04408915713429451, -0.02426176890730858, -0.05685853213071823, -0.002205250086262822, -0.05620935186743736, 0.014539515599608421, 0.07608099281787872, 0.06864219158887863, -0.006504346150904894, 0.022657610476017, 0.0012023597955703735, -0.002878876868635416, -0.026356706395745277, -0.04463028535246849, -0.04737688973546028, -0.04334822669625282, -0.003647731151431799, 0.03260157257318497, 0.047550689429044724, 0.04359308257699013, 0.013540094718337059, 0.005719582550227642, -0.012987563386559486, 0.0005314212176017463, 0.041592828929424286, -0.01087868306785822, -0.03015703521668911, -0.040154751390218735, -0.05307546630501747, 0.04850825294852257, -0.059173449873924255, -0.03042498044669628, -0.024414503946900368, -0.06610433012247086, 0.004690233618021011, -0.07370999455451965, -0.044949986040592194, 0.01820719800889492, -0.009506884962320328, 0.04542039334774017, -0.010621718131005764, -0.0029163160361349583, 0.04360096901655197, -0.0020498395897448063, 0.018831096589565277, 0.0030448748730123043, 0.010614261962473392, 0.010916135273873806, -0.023340526968240738, 0.003925643395632505, 0.022275051102042198, -0.004954245872795582, -0.02363557368516922, -0.034490570425987244, 0.03467300906777382, -0.02118012309074402, -0.2573135197162628, 0.009938251227140427, -0.0018722042441368103, -0.032326385378837585, 0.0179823599755764, -0.01633019931614399, 0.022189248353242874, -0.06078954041004181, -0.0066520138643682, 0.002479337388649583, -0.03000001236796379, -0.03707965463399887, -0.032076865434646606, 0.03767203539609909, 0.0014596515102311969, 0.004437889903783798, -0.006895758677273989, -0.0196996983140707, 0.0395653173327446, 0.06678272783756256, 0.009580940939486027, -0.06052940711379051, -0.05674608796834946, 0.052094701677560806, 0.004710773471742868, 0.00953443069010973, -0.07865510135889053, 0.021704569458961487, -0.06908777356147766, 0.0048997849225997925, -0.0009921786841005087, -0.0017998766852542758, 0.020007522776722908, -0.019885728135704994, -0.016597820445895195, -0.00006316725193755701, 0.03389989212155342, 0.02119152434170246, 0.0036891475319862366, 0.011464418843388557, -0.03997514024376869, -0.049772873520851135, 0.01674955151975155, 0.0005404244875535369, 0.0803830623626709, 0.0013631934998556972, -0.022638468071818352, -0.024259645491838455, -0.025159986689686775, 0.05801541358232498, -0.020974764600396156, -0.0436861477792263, -0.012477437034249306, 0.011781674809753895, 0.00001632450039323885, -0.0033039927948266268, -0.040548115968704224, -0.0133651252835989, -0.031038662418723106, -0.009606276638805866, -0.04242049902677536, -0.048198118805885315, -0.005134767387062311, -0.03246351331472397, -0.00868528988212347, -0.011045212857425213, -0.06052156165242195, -0.016042353585362434, 0.0543542206287384, 0.046572502702474594, -0.03742348402738571, 0.01021657045930624, -0.01579611375927925, -0.10498777031898499, -0.030218934640288353, 0.0034823850728571415, 0.01863902620971203, 0.022121256217360497, 0.011377261020243168, 0.043795280158519745, -0.05584767833352089, -0.07266414165496826, 0.015523801557719707, 0.03396999090909958, 0.028225770220160484, -0.023017261177301407, -0.008201964199543, -0.05358773097395897, -0.009061077609658241, -0.025768917053937912, 0.06081000715494156, -0.012813419103622437, -0.02047337219119072, 0.003800982143729925, 0.033072467893362045, 0.06171968951821327, 0.03433077409863472, 0.03191370144486427, 0.026673953980207443, 0.02845083735883236, 0.049744416028261185, -0.0657627284526825, 0.021080290898680687, -0.016139529645442963, -0.0068732863292098045, 0.006688767112791538, -0.03385917469859123, 0.015606957487761974, 0.024514270946383476, -0.014270439743995667, -0.007947670295834541, -0.002443884499371052, 0.009764171205461025, -0.0431147962808609, -0.00823449157178402, -0.024583492428064346, 0.0233461856842041, 0.016330139711499214, 0.009556415490806103, -0.018534747883677483, -0.087483249604702, 0.016468776389956474, -0.00959946122020483, -0.012906420044600964, -0.04059670865535736, -0.046922385692596436, 0.01852640137076378, -0.01738046482205391, 0.02466747909784317, 0.006581803318113089, -0.019347619265317917, 0.018764737993478775, 0.027991415932774544, -0.021193966269493103, 0.02703581564128399, -0.01589983142912388, -0.01689588464796543, -0.02381596900522709, -0.020446879789233208, 0.01813455857336521, 0.007348670158535242, -0.00017896987264975905, -0.007787694223225117, 0.010755928233265877, 0.044790640473365784, 0.011634242720901966, 0.01831073686480522, 0.022096149623394012, -0.012846848927438259, 0.020660828799009323, 0.018972152844071388, -0.01567128114402294, 0.013886637054383755, -0.0032150426413863897, -0.0011291397968307137, 0.002522306051105261, 0.048194076865911484, 0.019277863204479218, -0.0338141992688179, -0.05038822442293167, 0.026926597580313683, -0.05109258368611336, 0.03561093658208847, -0.03157726675271988, 0.0055640507489442825, 0.042829278856515884, -0.0055008926428854465, 0.058587249368429184, -0.027352197095751762, 0.009052722714841366, 0.015723941847682, 0.00217922474257648, -0.030921990051865578, 0.02734595723450184, -0.005493510514497757, -0.00524068484082818, -0.011915083974599838, 0.057105451822280884, -0.029090680181980133, 0.006676401011645794, -0.02218252420425415, 0.002324914326891303, 0.015829671174287796, 0.0015569607494398952, 0.058047931641340256, 0.0508640855550766, -0.0035072355531156063, -0.009578956291079521, -0.022013496607542038, -0.025595176964998245, -0.03110482357442379, 0.0012927661882713437, 0.02366611175239086, -0.013516323640942574, -0.039031982421875, -0.07164247334003448, 0.03922247514128685, 0.030813109129667282, -0.008301366120576859, -0.014624536037445068, -0.0035161511041224003, -0.0011249296367168427, -0.025822559371590614, -0.0030568218789994717, 0.03873873129487038, -0.06420351564884186, -0.031971145421266556, -0.03891213983297348, 0.0076806796714663506, 0.01824265904724598, 0.04352877661585808, -0.051998939365148544, 0.014381340704858303, 0.018493622541427612, -0.03339879587292671, -0.010169130750000477, -0.033127911388874054, -0.016132226213812828, 0.04970787093043327, -0.030625639483332634, 0.03478752076625824, 0.0008010926540009677, 0.0020802784711122513, -0.01077121403068304, -0.03354287147521973, 0.03294447064399719, -0.039522670209407806, -0.014136816374957561, 0.02635965682566166, -0.05359963700175285, 0.03654415160417557, -0.046299077570438385, 0.019350450485944748, 0.02745189145207405, 0.008097952231764793, -0.014761373400688171, -0.03850189596414566, 0.035660069435834885, -0.0028897251468151808, 0.04475678130984306, 0.022138966247439384, -0.018055513501167297, -0.045209094882011414, 0.004856593441218138, -0.009568854235112667, 0.005298991687595844, 0.0020297830924391747, -0.040075480937957764, -0.016259871423244476, 0.07226122170686722, 0.010023301467299461, 0.09153299778699875, -0.004800788126885891, -0.02951936610043049, 0.04826691746711731, -0.07367831468582153, -0.03931306675076485, -0.03862975910305977, -0.04385242983698845, 0.01446261815726757, 0.007140325848013163, 0.05746668577194214, -0.06344099342823029, 0.025564584881067276, 0.014886712655425072, 0.044758591800928116, 0.024205373600125313, -0.010061622597277164, 0.02895536832511425, -0.020171761512756348, 0.005892690736800432, -0.07858201116323471, -0.039763957262039185, 0.06876445561647415, 0.015857072547078133, -0.003933394327759743, -0.034601375460624695, -0.009873676113784313, 0.0164127666503191, -0.06383560597896576, -0.012965562753379345, 0.035556282848119736, 0.015075099654495716, 0.02055523358285427, 0.022744417190551758, -0.03708497807383537, 0.011170217767357826, 0.03368775174021721, -0.014665053226053715, -0.018876351416110992, -0.006636314559727907, 0.04743174463510513, 0.009411158971488476, -0.004726193845272064, 0.014468393288552761, 0.01859932765364647, 0.06640814989805222, 0.04463530704379082, 0.014505189843475819, 0.05636650696396828, -0.014581593684852123, 0.035801660269498825, 0.03635261207818985, -0.02203008159995079, 0.01880849152803421, 0.01463184505701065, -0.0011381804943084717, -0.0491320937871933, 0.021089110523462296, 0.00482207490131259, -0.02640507183969021, -0.028175875544548035, 0.07378695905208588, 0.008647405542433262, -0.0704725831747055, -0.05225421115756035, 0.004442690405994654, -0.05376005917787552, -0.00399751914665103, -0.02728617750108242, 0.007472341414541006, -0.03864098712801933, 0.056354131549596786, -0.005072306375950575, -0.00531046325340867, 0.06110024079680443, -0.0062371124513447285, 0.009191278368234634, 0.016389846801757812, 0.08576470613479614, 0.09373460710048676, 0.0464216023683548, -0.0017326236702501774, 0.05728964880108833, -0.030815044417977333, -0.04419935494661331, -0.011193463578820229, -0.008478373289108276, 0.01618383824825287, -0.009772722609341145, 0.02265058644115925, 0.06191929057240486, -0.0020063621923327446, 0.07013998925685883, -0.0012958068400621414, -0.0026233308017253876, -0.007034450303763151, 0.03212745487689972, 0.05149829387664795, 0.050083886831998825, 0.01620173454284668, 0.041362497955560684, -0.011650417000055313, -0.036619313061237335, 0.03474736958742142, -0.01470868568867445, -0.02563735842704773, 0.015149364247918129, 0.008983073756098747, 0.019208326935768127, 0.031400639563798904, 0.04321306198835373, 0.07336121797561646, -0.021500425413250923, -0.0019173523178324103, -0.005785237532109022, 0.03975379839539528, -0.00850062258541584, 0.012921021319925785, 0.005989572964608669, -0.007285646162927151, -0.005057463888078928, -0.04647320881485939, -0.03189944103360176, -0.04033921658992767, -0.02170260064303875, 0.035546623170375824, -0.024211924523115158, -0.01279740035533905, 0.0013252939097583294, -0.007645763922482729, -0.04616803303360939, -0.029760872945189476, -0.039056070148944855, -0.0679924339056015, -0.08071741461753845, 0.017443129792809486, 0.017076866701245308, -0.0066230385564267635, -0.04289571940898895, -0.012914130464196205, -0.018391378223896027, -0.02572304755449295, 0.012478047050535679, -0.07680002599954605, 0.00320423673838377, 0.008480983786284924, 0.00034605531254783273, 0.06170106679201126, 0.0334455706179142, 0.04698391631245613, 0.01449513528496027, -0.006656068377196789, 0.00226796162314713, 0.05836714431643486, 0.04256648197770119, 0.032491497695446014, 0.007804060820490122, -0.09771158546209335, 0.02770955115556717, 0.033837899565696716, -0.029139654710888863, -0.07234273105859756, 0.028687212616205215, 0.022893698886036873, 0.009057607501745224, 0.021320588886737823, -0.01515419315546751, -0.03941962122917175, -0.048532478511333466, 0.0001874889130704105, 0.011734962463378906, 0.004474522080272436, 0.05544388294219971, -0.02607337385416031, 0.07192781567573547, 0.04088577255606651, 0.023335708305239677, -0.042320530861616135, 0.02012437954545021, -0.001711854594759643, -0.007809168193489313, -0.02450217492878437, -0.05787929520010948, -0.043595485389232635, -0.07402337342500687, -0.026989376172423363, 0.02099774219095707, 0.004520939663052559, -0.017689144238829613, 0.029195502400398254, 0.02868301048874855, 0.0015097238356247544, 0.07549794018268585, -0.028114575892686844, 0.02037210948765278, -0.01227249763906002, -0.03419359773397446, -0.019853290170431137, -0.014268726110458374, -0.018527772277593613, 0.053245797753334045, -0.010732551105320454, -0.02686271071434021, -0.029099274426698685, -0.02578544244170189, 0.023378189653158188, 0.014950800687074661, -0.015483872033655643, 0.019595975056290627 ]
[ -0.10237128287553787, -0.00844260212033987, -0.037234459072351456, -0.02584691159427166, 0.04540814831852913, -0.05397547036409378, -0.03017559088766575, -0.0145914601162076, 0.017722437158226967, -0.005762225016951561, 0.0054556503891944885, -0.05837155878543854, 0.02349266968667507, -0.03074859268963337, 0.010820719413459301, -0.009845919907093048, -0.044327620416879654, -0.04747414216399193, -0.04069971293210983, -0.011626006104052067, 0.01529967412352562, -0.0010916366009041667, -0.050879281014204025, -0.0417855866253376, 0.026008425280451775, 0.04351131245493889, 0.017275048419833183, -0.03007149137556553, -0.003767340676859021, -0.21923108398914337, 0.036748550832271576, -0.011150690726935863, 0.035325996577739716, -0.002081845887005329, -0.00965214241296053, 0.03911662846803665, -0.007308861706405878, 0.0311114564538002, -0.005071586929261684, 0.06057948246598244, 0.03487811237573624, 0.025774264708161354, -0.0564611479640007, -0.03005770966410637, 0.012834613211452961, -0.018608544021844864, -0.051154471933841705, -0.026397956535220146, 0.008118996396660805, -0.01920849271118641, -0.045975398272275925, -0.0100891487672925, -0.008750499226152897, -0.009115337394177914, -0.020230960100889206, 0.005733593367040157, 0.050091810524463654, 0.07633931189775467, 0.0046928352676332, -0.010438291355967522, 0.016569893807172775, -0.005033524241298437, -0.13093850016593933, 0.10757287591695786, 0.01606125570833683, 0.039993539452552795, -0.047880351543426514, -0.006744557525962591, -0.025515718385577202, 0.10956632345914841, -0.015022468753159046, -0.01673659309744835, -0.012895488180220127, 0.052781689912080765, -0.010375110432505608, -0.01665438525378704, -0.021862614899873734, -0.0039016243536025286, 0.04385092854499817, 0.01137430127710104, -0.09086129069328308, -0.05829281732439995, 0.004958037286996841, -0.04085058346390724, 0.005918881855905056, -0.005476952064782381, -0.04455544427037239, 0.03557271882891655, 0.04442862048745155, 0.02825578860938549, 0.02363470196723938, 0.011458499357104301, 0.003726918948814273, 0.01949824020266533, -0.051863521337509155, -0.003123076166957617, 0.021409695968031883, 0.0066065480932593346, 0.025885911658406258, 0.37631937861442566, -0.015347717329859734, -0.0034303879365324974, 0.029496992006897926, 0.09072979539632797, -0.02315998449921608, -0.01018722914159298, -0.03980955109000206, -0.07073023915290833, -0.03293970599770546, -0.09802331775426865, 0.012866104021668434, -0.05813327431678772, 0.07114218920469284, -0.06360217183828354, 0.04117128625512123, 0.030361922457814217, 0.0018137096194550395, 0.02743207849562168, -0.0036097418051213026, 0.033507343381643295, -0.0024117373395711184, 0.005637010559439659, 0.010364984162151814, 0.023953581228852272, 0.032985590398311615, 0.038119230419397354, 0.05403231456875801, 0.0844208374619484, 0.026636486873030663, 0.02261369675397873, 0.07376913726329803, -0.0349157489836216, -0.08614598959684372, 0.04911248758435249, 0.0019276452949270606, -0.016340304166078568, 0.021741492673754692, -0.025255821645259857, 0.0333748497068882, 0.01426013745367527, 0.030263198539614677, -0.07101231813430786, 0.02077394723892212, -0.02577563375234604, -0.03935418650507927, 0.1135636493563652, -0.011494611389935017, -0.002667604247108102, -0.04700911045074463, -0.01861288771033287, -0.025183016434311867, 0.04560704529285431, 0.041207846254110336, -0.06730687618255615, -0.0006278884829953313, 0.06005139648914337, 0.07376771420240402, 0.012319041416049004, -0.03365747258067131, -0.017593828961253166, -0.05757053568959236, 0.00279737520031631, -0.05417913198471069, 0.040206942707300186, 0.061047766357660294, -0.1399088054895401, -0.0016101411310955882, -0.0005337967304512858, -0.003795941825956106, -0.10082520544528961, 0.02315233275294304, 0.026791177690029144, -0.029780184850096703, -0.02482318878173828, 0.029578618705272675, -0.005496228579431772, -0.055131908506155014, -0.015970179811120033, 0.07703094184398651, 0.04744717851281166, -0.02196723408997059, 0.006841802503913641, -0.06320799142122269, 0.014483008533716202, -0.025342565029859543, -0.07932562381029129, -0.0473688505589962, 0.004462572745978832, -0.0025995164178311825, -0.004751164466142654, -0.005569586530327797, -0.02138698659837246, -0.03670412674546242, 0.05326257646083832, -0.008768887259066105, -0.03578638285398483, -0.0027688753325492144, 0.0009880389552563429, 0.013074249029159546, -0.019790953025221825, 0.01598820462822914, 0.013964910060167313, 0.024527905508875847, 0.051137775182724, -0.06120268628001213, 0.01790199987590313, 0.011392920278012753, -0.08077772706747055, 0.07596240937709808, 0.03188402205705643, 0.0016619685338810086, -0.03851693496108055, -0.004830001387745142, -0.013341587036848068, -0.04484918713569641, -0.02533860318362713, -0.021253785118460655, 0.014766355976462364, 0.0032558878883719444, 0.019986331462860107, -0.012283006682991982, -0.04284825548529625, 0.0032173078507184982, -0.35732302069664, -0.025977723300457, -0.011138878762722015, 0.012046492658555508, 0.017610006034374237, -0.05545087158679962, -0.021631430834531784, -0.022642431780695915, -0.04432419314980507, 0.02831045538187027, 0.05820484086871147, 0.030476044863462448, 0.015560492873191833, -0.09199490398168564, -0.030907727777957916, 0.011969812214374542, -0.03496979922056198, 0.0012898502172902226, -0.00042076053796336055, 0.08173459768295288, 0.031382620334625244, -0.004881693981587887, 0.022234298288822174, -0.06977816671133041, -0.013916063122451305, -0.06553524732589722, 0.11168381571769714, 0.02036203257739544, 0.041753992438316345, 0.0009201268549077213, 0.06955473870038986, 0.015064001083374023, -0.019592158496379852, -0.01160203292965889, -0.012431338429450989, 0.01366040576249361, 0.0054407487623393536, 0.016198664903640747, 0.05606655403971672, -0.018160196021199226, -0.010759532451629639, 0.040671221911907196, -0.028537992388010025, -0.036723703145980835, -0.0003558377211447805, -0.013890288770198822, 0.010935868136584759, -0.04229709878563881, 0.033648669719696045, 0.089596688747406, 0.02927604876458645, 0.026242388412356377, 0.039879944175481796, 0.008614892140030861, 0.01196665596216917, -0.025820137932896614, -0.08819019794464111, 0.018064910545945168, -0.035281240940093994, -0.033286239951848984, 0.007797660306096077, 0.04397392272949219, 0.049187950789928436, -0.002965578343719244, 0.009734108112752438, 0.038362447172403336, 0.03245829418301582, -0.015593349002301693, -0.0024813052732497454, -0.04755163565278053, -0.010791542939841747, 0.08802156895399094, -0.006483117118477821, -0.012017338536679745, -0.022954490035772324, 0.06547674536705017, -0.03974270075559616, -0.022181345149874687, 0.026134535670280457, 0.019802680239081383, 0.019323479384183884, -0.017567485570907593, 0.044034115970134735, 0.007566819433122873, -0.011073604226112366, 0.0028333584778010845, -0.014196939766407013, 0.025219907984137535, 0.05523640662431717, -0.011728490702807903, 0.0001461074425606057, -0.003517684992402792, -0.007989929988980293, 0.009149236604571342, 0.007628607098013163, 0.017535004764795303, -0.26575273275375366, 0.03190574422478676, 0.0375448577105999, 0.05755612626671791, -0.010241144336760044, 0.021459683775901794, 0.03827955946326256, -0.047110430896282196, 0.004945734981447458, -0.018399929627776146, -0.009060071781277657, 0.017973164096474648, -0.00030212028650566936, -0.00136847875546664, 0.005391632206737995, 0.025373775511980057, 0.06759359687566757, -0.046944908797740936, -0.02463383786380291, -0.007569803390651941, 0.04923722892999649, -0.0017700486350804567, 0.17534127831459045, 0.013713795691728592, 0.03027953952550888, -0.0057480488903820515, -0.012991762720048428, -0.008799380622804165, 0.06504222750663757, -0.006112219300121069, -0.018071526661515236, -0.016726646572351456, 0.03496070206165314, -0.015039856545627117, 0.004420756828039885, -0.026780083775520325, 0.01821085251867771, 0.020932789891958237, 0.03282232955098152, -0.0012749048182740808, -0.017892997711896896, 0.02735530585050583, -0.0557764433324337, -0.04811825975775719, 0.08049426972866058, 0.029563115909695625, -0.0024818351957947016, -0.06098141893744469, -0.03666801378130913, 0.03250569477677345, -0.02592420019209385, -0.013333103619515896, 0.00019900454208254814, -0.012774302624166012, 0.029348067939281464, 0.07158806920051575, 0.010127087123692036, 0.018347078934311867, 0.0003363829164300114, 0.007716506719589233, 0.032167479395866394, -0.01236877590417862, 0.1134566068649292, 0.08264743536710739, 0.007285121362656355 ]
[ -0.050070870667696, 0.03043537400662899, -0.018276795744895935, 0.011974025517702103, -0.012861796654760838, -0.007881333120167255, -0.02141098491847515, -0.006378985475748777, -0.027833295986056328, -0.05168824642896652, -0.019184647127985954, 0.015308719128370285, 0.01781318336725235, -0.04478392004966736, -0.0034794011153280735, 0.020023975521326065, -0.02227666601538658, 0.01763872615993023, 0.03988667204976082, -0.05343315750360489, -0.023587416857481003, 0.05342430993914604, 0.02840527705848217, 0.009285992942750454, -0.03936086967587471, 0.010972158052027225, -0.058098290115594864, 0.009968645870685577, 0.029654590412974358, -0.11385848373174667, -0.007854947820305824, -0.02504938282072544, -0.020355049520730972, -0.021394118666648865, 0.009168301708996296, 0.024870071560144424, -0.028738167136907578, -0.009133930318057537, 0.034991659224033356, 0.01599087379872799, 0.03967294842004776, 0.01753118447959423, -0.007873713970184326, -0.019423462450504303, -0.021377163007855415, 0.002252513077110052, -0.06004562973976135, 0.006615910679101944, -0.019221432507038116, -0.0024200042244046926, -0.024417439475655556, 0.017587944865226746, 0.03327518701553345, -0.009520767256617546, 0.06143324449658394, -0.022915808483958244, -0.0008268685196526349, -0.052782654762268066, -0.010132708586752415, -0.06217043474316597, 0.008423883467912674, -0.003652864135801792, -0.05173555389046669, -0.027203219011425972, -0.00468136090785265, -0.03966720774769783, -4.613996509306162e-7, 0.028780853375792503, 0.01867341622710228, -0.014402640052139759, -0.06354852765798569, 0.0006044590845704079, -0.02758495695888996, -0.001601403928361833, 0.03760657459497452, -0.017012400552630424, -0.019692130386829376, -0.036249272525310516, -0.012923150323331356, -0.004220190457999706, -0.03677264228463173, -0.04038171097636223, 0.023963408544659615, -0.01039855182170868, -0.00762138282880187, -0.051851578056812286, 0.01389523595571518, 0.03454187512397766, 0.005768990609794855, 0.02254289574921131, -0.026915501803159714, 0.010426498018205166, 0.0508774071931839, 0.027171164751052856, -0.09266899526119232, 0.05525676906108856, 0.03019525855779648, -0.02431647665798664, 0.0076100025326013565, 0.7895205616950989, 0.026152566075325012, 0.01863536238670349, 0.028968308120965958, -0.0007610421744175255, 0.004343044478446245, -0.00008747910760575905, -0.06761971861124039, -0.009390240535140038, 0.03286241739988327, -0.0741933137178421, 0.020895695313811302, -0.009365880861878395, 0.029337726533412933, 0.011925620958209038, -0.0012641773791983724, 0.03801022842526436, -0.008323166519403458, 0.022422637790441513, 0.024479014798998833, 0.0031195904593914747, 0.039124954491853714, 0.00004636160156223923, 0.03469948470592499, 0.035398758947849274, 0.002108273096382618, -0.16842545568943024, 0.00984291359782219, -8.272885326009464e-33, 0.03460081294178963, -0.051233209669589996, -0.03884612396359444, -0.007876737043261528, 0.05511379987001419, 0.039977651089429855, -0.003772218246012926, 0.010645024478435516, -0.0019482588395476341, -0.023312769830226898, 0.0006822106661275029, -0.008879897184669971, 0.004524734802544117, -0.021192006766796112, 0.007408284116536379, -0.019120361655950546, -0.009032211266458035, 0.059014692902565, 0.03227934613823891, -0.0021638874895870686, 0.0009642951772548258, 0.03587116673588753, 0.025679344311356544, 0.058288030326366425, 0.043860141187906265, 0.02638753317296505, -0.003188512986525893, 0.02014256827533245, -0.028639400377869606, -0.035479649901390076, -0.009797190316021442, 0.015242424793541431, 0.013674074783921242, -0.03703682869672775, 0.019977165386080742, -0.037939127534627914, 0.019623827189207077, -0.015754662454128265, -0.012545926496386528, -0.047711584717035294, -0.05794890597462654, 0.011131309904158115, 0.0034060513135045767, -0.03811066597700119, -0.03654864430427551, 0.015092851594090462, 0.01967252790927887, 0.019807156175374985, -0.023603085428476334, 0.036696791648864746, 0.014634978957474232, -0.003513589734211564, 0.030157867819070816, -0.04786408320069313, -0.008673032745718956, 0.03357642889022827, 0.006690519396215677, 0.04092726856470108, 0.04755787178874016, 0.01913698948919773, -0.00879306998103857, 0.02296982705593109, 0.007179371081292629, 0.045742519199848175, 0.025648407638072968, -0.025745071470737457, 0.04971346631646156, 0.0447678416967392, 0.053807806223630905, 0.016541367396712303, -0.028616003692150116, 0.03393023833632469, -0.04138115420937538, -0.030997904017567635, 0.032129719853401184, -0.0534294992685318, -0.01151700597256422, -0.03620292991399765, -0.009828750975430012, 0.06873171776533127, 0.05259672552347183, 0.018244436010718346, -0.01721314527094364, -0.041850846260786057, -0.029427247121930122, 0.005943944677710533, 0.0007620350224897265, 0.016047146171331406, -0.035810500383377075, 0.0156317800283432, 0.031110255047678947, -0.012377594597637653, 0.021295614540576935, -0.027833564206957817, -0.0123085742816329, 7.422778831754324e-33, -0.023265475407242775, -0.0013039554469287395, 0.012739104218780994, 0.012097839266061783, 0.010713725350797176, -0.013694311492145061, 0.06021340191364288, 0.01085958257317543, -0.03312496840953827, 0.04270092025399208, 0.012272235937416553, 0.03207920864224434, -0.024822112172842026, -0.005379104986786842, 0.0514744333922863, -0.011018143966794014, -0.01935524307191372, 0.05135658383369446, 0.035491202026605606, 0.006102429702877998, -0.009907043538987637, -0.0032374109141528606, -0.014525478705763817, 0.03237777575850487, 0.007138827815651894, 0.03362036123871803, -0.018390841782093048, -0.028312664479017258, 0.022826967760920525, 0.0071877725422382355, 0.006624006666243076, -0.020622670650482178, 0.012995727360248566, -0.006841408554464579, 0.0033861424308270216, 0.016435964033007622, 0.029293544590473175, -0.01241560559719801, 0.05872965231537819, -0.01942400448024273, 0.045032624155282974, 0.03955935314297676, -0.006864367518573999, 0.02237093448638916, 0.010261117480695248, 0.02817615307867527, -0.011375263333320618, 0.017600547522306442, 0.025644810870289803, 0.026344221085309982, -0.011279601603746414, 0.030941203236579895, -0.02339334227144718, -0.007318049669265747, 0.005835574585944414, -0.03726663812994957, -0.03419620543718338, 0.010930251330137253, -0.069717176258564, -0.003496440825983882, -0.061405252665281296, -0.01673021726310253, -0.030189838260412216, 0.05027652159333229, -0.020309191197156906, 0.011153630912303925, -0.07582312077283859, -0.03077920340001583, 0.0005169815267436206, 0.028689755126833916, -0.004454354755580425, -0.0017404219834133983, -0.03930075839161873, 0.003123615635558963, -0.047138478606939316, 0.015615501441061497, -0.029031552374362946, 0.008148041553795338, -0.01583101786673069, 0.0009891672525554895, -0.0014020638773217797, -0.010317428037524223, 0.029485981911420822, 0.0009956072317436337, -0.004488407634198666, -0.009797029197216034, 0.0012048006756231189, 0.021184608340263367, 0.06332556158304214, -0.0023976031225174665, 0.012297891080379486, -0.028519926592707634, 0.0005336710019037127, 0.024164443835616112, 0.011894362047314644, -1.3083378824774172e-8, -0.03119518607854843, -0.011851318180561066, -0.0037142718210816383, 0.021576842293143272, 0.05381098762154579, 0.06084820628166199, -0.0153778325766325, -0.030318237841129303, -0.010628536343574524, -0.024202479049563408, 0.021110648289322853, -0.019653530791401863, 0.008522388525307178, 0.036386121064424515, 0.030088085681200027, -0.036786552518606186, -0.00868958793580532, -0.03739172965288162, 0.02069956809282303, -0.01612314023077488, 0.007102146279066801, 0.017969511449337006, -0.00549290468916297, -0.022659828886389732, -0.008276338689029217, -0.031199686229228973, 0.03266703337430954, -0.07898419350385666, 0.006387483794242144, -0.07443646341562271, 0.017176590859889984, -0.04386592283844948, -0.06488101184368134, 0.010696586221456528, 0.006723732687532902, -0.04901290684938431, -0.022424766793847084, -0.02953038364648819, 0.04300335422158241, -0.021360406652092934, 0.014575266279280186, -0.016658207401633263, -0.0004200695548206568, -0.010630739852786064, -0.013438213616609573, -0.029888203367590904, -0.027812018990516663, -0.032289035618305206, -0.0009269783622585237, -0.013946565799415112, 0.012466302141547203, -0.045072223991155624, 0.038694627583026886, -0.007295418530702591, 0.07458861917257309, 0.022190973162651062, 0.02343173697590828, -0.01754816062748432, -0.029139406979084015, 0.00364503706805408, 0.047782137989997864, -0.005180420819669962, -0.011902468279004097, -0.02114425227046013 ]
python-joining-multiple-generatorsiterators
https://markhneedham.com/blog/2015/05/24/python-joining-multiple-generatorsiterators
false
2015-05-23 10:14:38
Python: Refactoring to iterator
[ "python" ]
[ "Python" ]
Over the last week I've been building a set of scripts to scrape the events from the http://www.bbc.co.uk/sport/0/football/32683310[Bayern Munich/Barcelona game] and I've ended up with a few hundred lines of nested for statements, if statements and mutated lists. I thought it was about time I did a bit of refactoring. The following is a function which takes in a match file and spits out a collection of maps containing times & events. [source,python] ---- import bs4 import re from bs4 import BeautifulSoup from soupselect import select def extract_events(file): match = open(file, 'r') soup = BeautifulSoup(match.read()) all_events = [] for event in select(soup, 'div#live-text-commentary-wrapper div#live-text'): for child in event.children: if type(child) is bs4.element.Tag: all_events.append(child.getText().strip()) for event in select(soup, 'div#live-text-commentary-wrapper div#more-live-text'): for child in event.children: if type(child) is bs4.element.Tag: all_events.append(child.getText().strip()) timed_events = [] for i in range(0, len(all_events)): event = all_events[i] time = re.findall("\d{1,2}:\d{2}", event) formatted_time = " +".join(time) if time: timed_events.append({'time': formatted_time, 'event': all_events[i+1]}) return timed_events ---- We call it like this: [source,python] ---- match_id = "32683310" for event in extract_events("data/%s" % (match_id))[:10]: print event ---- The file we're loading is the http://www.bbc.co.uk/sport/0/football/32683310[Bayern Munich vs Barcelona match] HTML file which I have saved locally. After we've got that read into beautiful soup we locate the two divs on the page which contain the match events. We then iterate over that list and create a new list containing (time, event) pairs which we return. I think we should be able to get to our resulting collection without persisting an intermediate list, but first things first - let's remove the duplicated for loops: [source,python] ---- def extract_events(file): match = open(file, 'r') soup = BeautifulSoup(match.read()) all_events = [] events = select(soup, 'div#live-text-commentary-wrapper div#live-text') more_events = select(soup, 'div#live-text-commentary-wrapper div#more-live-text') for event in events + more_events: for child in event.children: if type(child) is bs4.element.Tag: all_events.append(child.getText().strip()) timed_events = [] for i in range(0, len(all_events)): event = all_events[i] time = re.findall("\d{1,2}:\d{2}", event) formatted_time = " +".join(time) if time: timed_events.append({'time': formatted_time, 'event': all_events[i+1]}) return timed_events ---- The next step is to refactor towards using an iterator. After http://anandology.com/python-practice-book/iterators.html#generators[a bit of reading] I realised a generator would make life even easier. I created a function which returned an iterator of the raw events and plugged that into the original function: [source,python] ---- def raw_events(file): match = open(file, 'r') soup = BeautifulSoup(match.read()) events = select(soup, 'div#live-text-commentary-wrapper div#live-text') more_events = select(soup, 'div#live-text-commentary-wrapper div#more-live-text') for event in events + more_events: for child in event.children: if type(child) is bs4.element.Tag: yield child.getText().strip() def extract_events(file): all_events = list(raw_events(file)) timed_events = [] for i in range(0, len(all_events)): event = all_events[i] time = re.findall("\d{1,2}:\d{2}", event) formatted_time = " +".join(time) if time: timed_events.append({'time': formatted_time, 'event': all_events[i+1]}) return timed_events ---- If we run that function we still get the same output as before which is good. Now we need to work out how to clean up the second bit of the code which groups the appropriate rows together. The goal is that 'extract_events' returns an iterator rather than a list - we need to figure out how to iterate over the output of 'raw_events' in such a way that when we find a 'time row' we can yield that and the row immediately after. Luckily I found http://stackoverflow.com/questions/16789776/iterating-over-two-values-of-a-list-at-a-time-in-python[a Stack Overflow post] explaining that you can use the 'next' function inside an iterator to achieve this: [source,python] ---- def extract_events(file): events = raw_events(file) for event in events: time = re.findall("\d{1,2}:\d{2}", event) formatted_time = " +".join(time) if time: yield {'time': formatted_time, 'event': next(events)} ---- It's not that much less code than the original function but I think it's an improvement. Any thoughts/tips to simplify it further are always welcome.
null
null
[ -0.004420472774654627, -0.008821641094982624, -0.02320905402302742, -0.010188085027039051, 0.058591894805431366, -0.00995118822902441, 0.00044064264511689544, 0.05533876270055771, 0.026697693392634392, -0.010925897397100925, -0.0009770093020051718, 0.006130351219326258, -0.09310032427310944, 0.015307941474020481, 0.0019959518685936928, 0.07936953753232956, 0.06126246973872185, -0.008268616162240505, 0.01984223909676075, -0.033279940485954285, 0.0023478916846215725, 0.0836389884352684, -0.013334454037249088, 0.03929421678185463, 0.01827959343791008, 0.020477255806326866, 0.009806696325540543, 0.010171711444854736, -0.059272293001413345, 0.015751628205180168, 0.03547075763344765, 0.003724165726453066, -0.006755119189620018, -0.028291000053286552, 0.026464136317372322, -0.057184137403964996, 0.007724377326667309, 0.026673439890146255, -0.00817383173853159, 0.01388462819159031, -0.06456369906663895, 0.015885982662439346, -0.043269526213407516, 0.0031043952330946922, -0.03971138969063759, 0.01666533574461937, -0.02339647337794304, 0.03151216357946396, -0.026322202757000923, 0.0022123977541923523, -0.05043943598866463, 0.03127937763929367, -0.022422965615987778, -0.015127934515476227, -0.0032355226576328278, 0.06253739446401596, 0.004566068295389414, -0.046336911618709564, 0.009564119391143322, -0.03364032879471779, -0.010925042442977428, 0.013271783478558064, 0.0210871621966362, 0.03165339305996895, 0.02534576505422592, -0.0006761230761185288, -0.022287286818027496, 0.043403249233961105, -0.02400651015341282, -0.020455412566661835, -0.012140974402427673, 0.02585744671523571, -0.04466913267970085, 0.00682905875146389, 0.014584858901798725, -0.04581267759203911, -0.01861773617565632, 0.06296515464782715, 0.01496588159352541, 0.047133591026067734, 0.0030339304357767105, 0.016753457486629486, 0.01632712222635746, 0.020958295091986656, 0.025388045236468315, -0.025127317756414413, -0.04098500683903694, -0.009902372024953365, -0.03666353225708008, 0.04901546239852905, 0.026869066059589386, -0.0715394988656044, 0.029582554474473, 0.010154465213418007, -0.010486429557204247, 0.007491259835660458, -0.010310825891792774, 0.010491152293980122, 0.0025142927188426256, -0.024606842547655106, -0.06847891211509705, -0.028756922110915184, 0.029413655400276184, 0.016622358933091164, -0.09613648056983948, -0.009081697091460228, -0.033828914165496826, -0.0025681201368570328, 0.022944455966353416, -0.004281619563698769, -0.01590213179588318, -0.007418811786919832, -0.02117553912103176, 0.00073942233575508, -0.08056806772947311, 0.03881610557436943, 0.007165325805544853, -0.0038320948369801044, -0.026354791596531868, -0.015985092148184776, 0.04383596405386925, 0.013168537057936192, 0.013105290941894054, 0.08818680793046951, 0.018663233146071434, 0.021709658205509186, -0.003422279842197895, 0.07116331160068512, -0.010001064278185368, -0.05264585092663765, -0.015052437782287598, 0.05403101071715355, -0.013913216069340706, 0.001172871794551611, 0.006273854058235884, -0.02196171134710312, -0.03704649955034256, -0.016204465180635452, 0.04876202344894409, 0.044047802686691284, 0.013974491506814957, 0.0012360720429569483, -0.005733880214393139, 0.01114194467663765, 0.01568041369318962, 0.002960905432701111, -0.023506522178649902, -0.020542867481708527, 0.013650267384946346, 0.009778368286788464, 0.028135914355516434, -0.012867379002273083, 0.051810428500175476, -0.01683480478823185, -0.024404650554060936, 0.09824801981449127, 0.034458842128515244, 0.0006620051572099328, -0.03097803145647049, 0.01673593372106552, 0.06065085902810097, 0.04910073056817055, -0.01261625625193119, 0.029503243044018745, 0.004732096567749977, -0.017946837469935417, -0.015362069942057133, 0.06316646933555603, -0.021565334871411324, 0.003851879620924592, -0.03832835704088211, -0.02522614784538746, 0.085322305560112, -0.026583390310406685, 0.0016019289614632726, 0.019924309104681015, 0.061761148273944855, 0.02256687730550766, 0.06033734604716301, 0.010592930018901825, -0.06793844699859619, 0.0042647263035178185, -0.018184371292591095, 0.04956064000725746, 0.03873226046562195, -0.004563397262245417, 0.106977678835392, 0.029259495437145233, -0.0027691812720149755, 0.04706607013940811, -0.10052955895662308, -0.09922881424427032, -0.06584742665290833, -0.002869996940717101, 0.05710866302251816, -0.05511487275362015, 0.015299756079912186, 0.05970602110028267, 0.019170476123690605, 0.03852499648928642, 0.014979097060859203, 0.006120338570326567, -0.006975044030696154, -0.019585851579904556, -0.05001068487763405, 0.022558826953172684, 0.03544633835554123, -0.051620565354824066, -0.044888511300086975, 0.02391086146235466, -0.03727077320218086, 0.04139312356710434, 0.04360693320631981, 0.0022880921605974436, 0.040533747524023056, 0.04126399755477905, 0.06684159487485886, -0.02116953395307064, 0.04044258967041969, -0.06963416188955307, 0.0338163748383522, 0.0019387366482988, -0.01294348482042551, -0.05538817122578621, 0.00007236058445414528, 0.12029365450143814, 0.03132396191358566, -0.02323387935757637, -0.04248674586415291, 0.007445655297487974, -0.03203554078936577, 0.0034681495744735003, -0.005454454571008682, -0.03981901705265045, -0.02570917084813118, -0.009680874645709991, -0.041458431631326675, -0.01918012648820877, -0.010876334272325039, -0.0427553728222847, 0.025415290147066116, 0.03395776078104973, -0.019105805084109306, 0.041564736515283585, -0.0008581125293858349, -0.009974079206585884, -0.008353331126272678, 0.0042145708575844765, -0.022111957892775536, -0.000820731685962528, 0.036193329840898514, -0.022424470633268356, 0.01461231429129839, -0.05873816832900047, -0.04202831909060478, -0.012166735716164112, -0.036112792789936066, 0.025511162355542183, 0.07291021943092346, 0.07213875651359558, 0.0018516923300921917, 0.01562099251896143, -0.009711343795061111, 0.017352739349007607, -0.027605585753917694, -0.05743606016039848, -0.05291945859789848, -0.03343109041452408, -0.0038729149382561445, 0.021119045093655586, 0.029572581872344017, 0.027818607166409492, -0.006133977323770523, 0.012803800404071808, -0.004197920206934214, 0.010241098701953888, 0.045126281678676605, -0.03250766173005104, -0.04916981980204582, -0.03126976639032364, -0.02209765464067459, 0.03651845455169678, -0.05996322259306908, -0.05922159180045128, -0.01255072746425867, -0.06068079546093941, 0.03568784147500992, -0.06023266538977623, -0.02877618372440338, 0.010703646577894688, -0.013541816733777523, 0.049602407962083817, -0.009500768966972828, 0.0021162210032343864, 0.05399654060602188, -0.005490472540259361, 0.004885438363999128, 0.02528558485209942, -0.01445249654352665, 0.012804227881133556, -0.0016035838052630424, 0.010056494735181332, 0.029446035623550415, -0.028436163440346718, -0.0024668993428349495, -0.028925687074661255, 0.01173865981400013, -0.038834743201732635, -0.27903640270233154, 0.027755441144108772, 0.0036442570853978395, -0.020463360473513603, 0.030659958720207214, -0.022952577099204063, 0.0013279587728902698, -0.052798252552747726, -0.008419747464358807, -0.014063168317079544, -0.03539128601551056, -0.047876935452222824, -0.037318114191293716, 0.03667831793427467, 0.02639550343155861, -0.023605281487107277, -0.008586995303630829, -0.012347622774541378, 0.009317116811871529, 0.0458914078772068, 0.01414222177118063, -0.05359691008925438, 0.0007090718136169016, 0.04241907596588135, 0.013232359662652016, 0.05595928430557251, -0.05175338312983513, 0.011053836904466152, -0.05504602566361427, -0.042618829756975174, 0.06546265631914139, -0.028284652158617973, 0.023988690227270126, -0.03181427717208862, -0.00431597838178277, -0.00545525923371315, 0.03839161992073059, 0.005813909228891134, -0.0032554836943745613, -0.004044266417622566, -0.04855531454086304, -0.04475865513086319, -0.019261779263615608, -0.010890801437199116, 0.10350628942251205, 0.007209228817373514, -0.04663187265396118, -0.036809612065553665, -0.023185499012470245, 0.0776142105460167, -0.029679369181394577, -0.04808073863387108, -0.019261423498392105, 0.029693609103560448, -0.031320925801992416, 0.0006752469926141202, -0.02035498432815075, 0.005344865843653679, -0.029627123847603798, -0.03073524497449398, -0.0110170254483819, -0.03531629964709282, 0.0012264304095879197, -0.009354404173791409, -0.0029705814085900784, -0.03552711009979248, -0.03362703695893288, 0.006477604154497385, 0.05532800406217575, 0.029778607189655304, -0.0422474667429924, -0.004090634640306234, -0.009822554886341095, -0.09348193556070328, -0.010526685975492, -0.006467744242399931, -0.0012624356895685196, -0.03694814071059227, 0.009135555475950241, 0.03550197184085846, -0.050126638263463974, -0.05909572169184685, 0.03769904747605324, -0.010960870422422886, 0.03934631496667862, -0.04569001868367195, 0.027091067284345627, 0.006071148905903101, 0.0010608284501358867, -0.05360058695077896, 0.08381160348653793, -0.026267554610967636, -0.025701655074954033, 0.02680320478975773, -0.025715723633766174, 0.05121411383152008, 0.008062023669481277, 0.0016580281080678105, 0.021710045635700226, 0.03455808758735657, 0.0015397429233416915, -0.0618615560233593, 0.011300835758447647, -0.0037039427552372217, 0.013320599682629108, -0.00993708148598671, -0.03914877027273178, 0.001631078659556806, 0.02503078803420067, 0.01332791242748499, 0.024848617613315582, -0.0003418954729568213, -0.004541113507002592, -0.026138538494706154, 0.009665986523032188, -0.03720679506659508, 0.05182966589927673, 0.011044283397495747, 0.002201321767643094, -0.0017183803720399737, -0.07868631184101105, 0.014299563132226467, -0.0016633948544040322, 0.005518808029592037, -0.07211273908615112, -0.06663521379232407, -0.005044334568083286, -0.02554057352244854, -0.000601772335357964, -0.0030646624509245157, -0.005706743337213993, -0.0016844423953443766, 0.03679400682449341, -0.03915649279952049, 0.029254643246531487, -0.022374168038368225, -0.04022109508514404, -0.03031625598669052, -0.022627225145697594, 0.0032191448844969273, 0.007365439552813768, 0.016621386632323265, -0.002404833910986781, 0.025815483182668686, 0.038328319787979126, 0.01840500719845295, 0.009291919879615307, 0.0010267914040014148, -0.004287299234420061, 0.05217496305704117, -0.010050777345895767, -0.005251849070191383, 0.001665676711127162, -0.026447640731930733, -0.048263341188430786, 0.0020844670943915844, 0.03815649822354317, 0.006620389875024557, 0.00632511405274272, -0.03260800614953041, -0.011135263368487358, -0.04719792678952217, -0.0033120543230324984, 0.015421495772898197, 0.014335712417960167, 0.0446525402367115, 0.0088518550619483, 0.02629283256828785, 0.014271262101829052, -0.013779783621430397, -0.01928546652197838, -0.009796414524316788, -0.049122147262096405, 0.017877595499157906, -0.02098710462450981, -0.028691165149211884, 0.01570393517613411, 0.025269081816077232, -0.027893804013729095, -0.0019928324036300182, -0.00917879305779934, -0.013256857171654701, 0.025941239669919014, 0.032878026366233826, 0.051462870091199875, 0.042080044746398926, -0.0497451052069664, -0.015368903055787086, -0.011823086999356747, -0.03246455267071724, -0.04276775196194649, -0.016125768423080444, -0.01210468728095293, -0.02125098556280136, -0.0363522507250309, -0.08586926758289337, 0.020095786079764366, -0.00008857477951096371, 0.000509951205458492, -0.022555943578481674, -0.008908946067094803, -0.022096995264291763, -0.026058802381157875, 0.003832603571936488, 0.024839919060468674, -0.06161881610751152, -0.021983474493026733, -0.0306434016674757, 0.017041197046637535, 0.02969018742442131, 0.03149806708097458, -0.05162188410758972, -0.018329719081521034, 0.012096965685486794, 0.000006489159659395227, 0.011551138013601303, -0.005149221979081631, -0.02996177226305008, 0.02538040466606617, -0.03885994106531143, 0.025815792381763458, -0.01747015304863453, -0.0190734826028347, -0.005988973658531904, -0.0133944321423769, 0.01130926888436079, -0.027254052460193634, -0.03040471114218235, 0.025281483307480812, -0.008442329242825508, 0.044299229979515076, -0.01445078756660223, 0.038131099194288254, 0.030085241422057152, 0.006469857878983021, -0.016089797019958496, -0.04492554813623428, 0.01370927318930626, 0.030663317069411278, 0.06185618042945862, 0.019571125507354736, -0.012091969139873981, -0.03712401166558266, 0.013427870348095894, -0.013409245759248734, 0.023977478966116905, 0.0011089438339695334, -0.008415723219513893, 0.009673435240983963, 0.07529040426015854, 0.018904998898506165, 0.04563067853450775, 0.018486591055989265, -0.04326367378234863, 0.043585214763879776, -0.05389104038476944, -0.018242359161376953, -0.03057841956615448, -0.040922828018665314, 0.024410558864474297, 0.011595351621508598, 0.02174512669444084, -0.06515613198280334, 0.04188946634531021, 0.010766386054456234, 0.044115807861089706, 0.05772849917411804, 0.009194985963404179, 0.026017457246780396, -0.028246670961380005, 0.0017997880931943655, -0.08473104983568192, -0.01013588160276413, 0.07395517826080322, 0.015293520875275135, 0.005314005073159933, -0.023566387593746185, -0.018708370625972748, 0.04099951311945915, -0.05659440532326698, -0.011890467256307602, 0.03400102257728577, 0.014425014145672321, 0.021610526368021965, 0.011647329665720463, -0.054748885333538055, 0.026193808764219284, 0.07248599827289581, -0.04335837438702583, -0.002754372078925371, -0.012100569903850555, 0.057703886181116104, -0.022480685263872147, 0.009998888708651066, -0.009094531647861004, -0.0014159765560179949, 0.07396560162305832, 0.030135933309793472, 0.019646815955638885, 0.043200235813856125, -0.016236716881394386, 0.023218603804707527, 0.009642761200666428, 0.0015852636424824595, -0.013351839035749435, 0.03835708275437355, -0.01615430787205696, -0.06482075154781342, 0.026979560032486916, 0.005947879981249571, -0.021600041538476944, -0.042570460587739944, 0.07401815056800842, -0.001640321221202612, -0.03820890560746193, -0.015696821734309196, -0.02023988403379917, -0.05787111818790436, -0.0022569294087588787, -0.01664610020816326, -0.016659913584589958, -0.04213831573724747, 0.07783852517604828, 0.013283172622323036, -0.00846490915864706, 0.08696737885475159, -0.02133253961801529, 0.009390706196427345, 0.0015341812977567315, 0.07250114530324936, 0.07245464622974396, 0.0676276907324791, -0.007927428930997849, 0.07045125216245651, -0.025386376306414604, -0.04838728904724121, 0.008497553877532482, -0.01952044479548931, 0.006290765479207039, -0.004908256232738495, 0.009755381383001804, 0.05733663961291313, -0.00218830700032413, 0.04331212490797043, 0.014841589145362377, -0.01968216523528099, -0.007837365381419659, 0.00722023518756032, 0.03986288234591484, 0.061984818428754807, 0.022268934175372124, 0.03198482468724251, -0.010119829326868057, -0.03269313648343086, 0.05399709939956665, -0.007464782800525427, -0.02775074727833271, 0.04307951405644417, -0.01708393730223179, 0.028657227754592896, 0.0010283117881044745, 0.06251179426908493, 0.06456219404935837, 0.00871244352310896, -0.018942592665553093, 0.004212189931422472, 0.028539132326841354, -0.010051215067505836, 0.02874976582825184, -0.011658992618322372, 0.0055725956335663795, -0.014060016721487045, -0.07469595968723297, -0.04563958942890167, -0.040501728653907776, -0.03817315772175789, 0.03936139494180679, -0.010925889946520329, 0.003998317290097475, 0.019606435671448708, -0.011557580903172493, -0.03941524028778076, -0.03808433935046196, -0.07737540453672409, -0.060994721949100494, -0.06544998288154602, -0.0380215086042881, 0.04960579797625542, -0.00377469789236784, -0.03323283791542053, -0.01364413183182478, -0.025676505640149117, -0.008325271308422089, -0.00788759533315897, -0.03449640050530434, 0.0026217272970825434, 0.010977775789797306, 0.009270653128623962, 0.06549963355064392, 0.026066962629556656, 0.043159693479537964, -0.000060225331253604963, -0.022947056218981743, 0.009424569085240364, 0.006939208135008812, 0.04238692671060562, -0.003109499579295516, 0.011729869991540909, -0.08635741472244263, 0.0028820896986871958, 0.03189944103360176, -0.018036870285868645, -0.06510180234909058, 0.032395657151937485, 0.030106114223599434, 0.020444387570023537, 0.028795205056667328, -0.05005893111228943, -0.015434523113071918, -0.02692720666527748, -0.008387424051761627, -0.0016017858870327473, 0.030756285414099693, 0.07261760532855988, -0.04380306601524353, 0.07645625621080399, 0.032739024609327316, 0.010851931758224964, -0.041757211089134216, -0.0035256040282547474, -0.03535407409071922, -0.002737174043431878, -0.030902134254574776, -0.015574865974485874, -0.05327918380498886, -0.07695723325014114, -0.02519749477505684, 0.014626707881689072, 0.003981310874223709, -0.025912169367074966, 0.031153632327914238, 0.04256132245063782, -0.015551312826573849, 0.03552829474210739, -0.027808668091893196, 0.04096566140651703, -0.04465191438794136, -0.017970748245716095, -0.022629396989941597, 0.01277618296444416, 0.009268676862120628, 0.0180827509611845, -0.01036183349788189, -0.011221242137253284, 0.0011056202929466963, -0.025627756491303444, 0.013517963699996471, 0.04546040669083595, -0.022668441757559776, 0.03693174943327904 ]
[ -0.08401938527822495, -0.011973002925515175, -0.023992398753762245, -0.046596016734838486, 0.0994613766670227, -0.04264099895954132, -0.018796468153595924, 0.0011402833042666316, 0.03353637084364891, 0.002973242662847042, -0.027183039113879204, -0.05904783308506012, -0.0001373155537294224, -0.01654179021716118, 0.04787919670343399, -0.010810346342623234, -0.016371723264455795, -0.08302100747823715, -0.03281903266906738, 0.03234326094388962, 0.003219009144231677, 0.006246466655284166, -0.05386877432465553, -0.029447998851537704, 0.005598822608590126, 0.03226974979043007, 0.047113094478845596, -0.003646708093583584, -0.014622817747294903, -0.19068855047225952, 0.013537249527871609, -0.05365532264113426, 0.014028733596205711, 0.0023327642120420933, 0.02916083112359047, 0.00841101910918951, 0.0149579718708992, 0.008750121109187603, 0.03617292270064354, 0.0590021125972271, 0.01598966121673584, 0.008975395001471043, -0.0657574012875557, -0.04374859109520912, 0.03310359641909599, -0.011230140924453735, -0.010723491199314594, -0.004551116842776537, 0.005314793437719345, 0.03743085265159607, -0.06247449293732643, 0.01912331022322178, -0.006595540326088667, -0.05287155136466026, -0.0016128000570461154, 0.035577163100242615, 0.045440055429935455, 0.058447904884815216, 0.012864354997873306, 0.04004805162549019, 0.016900986433029175, 0.0022269166074693203, -0.1460271179676056, 0.11932624876499176, 0.01077803410589695, 0.042027510702610016, -0.046286486089229584, 0.014469104818999767, -0.00040779015398584306, 0.07982391864061356, -0.03107239492237568, -0.02796321175992489, -0.0006375767407007515, 0.06376033276319504, 0.018963975831866264, -0.04325892776250839, -0.018390534445643425, 0.0019172538304701447, 0.004114250652492046, -0.009252204559743404, -0.06700346618890762, -0.01071846205741167, -0.01698973961174488, -0.03440800681710243, -0.016181299462914467, 0.013554266653954983, -0.02546003647148609, 0.04988870769739151, 0.02072206698358059, 0.03290780261158943, 0.02666841261088848, 0.0122962836176157, 0.004891600925475359, 0.0249776691198349, -0.07789169251918793, -0.016176078468561172, 0.011846554465591908, 0.02806061878800392, -0.02377087064087391, 0.407537043094635, -0.017568262293934822, 0.015104764141142368, 0.016360297799110413, 0.04697500541806221, 0.011584355495870113, -0.024182824417948723, -0.0030616591684520245, -0.06642254441976547, -0.01975995860993862, -0.04310308024287224, 0.00867159478366375, -0.020099500194191933, 0.06235833466053009, -0.05656317248940468, 0.009410192258656025, 0.06282615661621094, -0.0015526461647823453, 0.0014405782567337155, -0.017797166481614113, 0.030706217512488365, -0.009529990144073963, -0.009820190258324146, -0.009049934335052967, 0.002531265141442418, -0.006443097721785307, 0.0310371071100235, 0.06739174574613571, 0.07238201797008514, 0.011977738700807095, 0.014117337763309479, 0.05864134430885315, -0.0427444688975811, -0.07968253642320633, 0.015237181447446346, -0.0068978844210505486, -0.006904174108058214, 0.0017721755430102348, -0.022409508004784584, 0.01759231463074684, 0.045078013092279434, -0.002469421364367008, -0.10356961190700531, 0.029289595782756805, -0.018489766865968704, -0.03187138959765434, 0.11626243591308594, -0.004118329379707575, -0.03543040528893471, -0.02553674206137657, -0.06481678783893585, -0.04010610654950142, 0.017815710976719856, 0.019222959876060486, -0.05681454762816429, -0.022587018087506294, 0.013929900713264942, 0.06639544665813446, -0.02297055535018444, -0.057394880801439285, -0.03273472934961319, -0.033843353390693665, -0.047975312918424606, -0.015708312392234802, 0.028547512367367744, 0.02163187973201275, -0.13499702513217926, -0.009809593670070171, 0.007873514667153358, 0.003143509617075324, -0.0999874696135521, -0.014268367551267147, 0.011126699857413769, -0.03422025591135025, -0.004039608873426914, 0.06409939378499985, 0.003032843815162778, -0.019663946703076363, 0.007115194108337164, 0.09335001558065414, 0.0060874237678945065, 0.011697717942297459, -0.00043117161840200424, -0.06080745533108711, 0.020067935809493065, -0.03804931417107582, -0.07082907855510712, -0.05797812342643738, -0.016861291602253914, -0.010735658928751945, 0.01389492116868496, -0.02077910117805004, -0.058074597269296646, -0.025800516828894615, 0.05006276071071625, -0.01077769510447979, 0.01835659332573414, -0.010281645692884922, -0.01303129456937313, 0.008655951358377934, -0.03285592794418335, -0.01853228360414505, -0.012837802059948444, -0.02935650758445263, 0.0061948555521667, -0.02126852609217167, 0.03702729195356369, 0.0397103913128376, -0.03234361857175827, 0.07270660996437073, 0.011004164814949036, -0.03308672457933426, -0.017077423632144928, 0.002552995691075921, -0.021412400528788567, 0.012293092906475067, -0.034456342458724976, -0.00955753680318594, 0.023131588473916054, 0.02405467815697193, 0.053193964064121246, -0.03311695158481598, -0.027962742373347282, 0.011554297991096973, -0.34211546182632446, -0.027457524091005325, -0.027823008596897125, 0.02018221653997898, 0.022681035101413727, -0.023727690801024437, 0.014809977263212204, -0.015308314003050327, 0.01256092544645071, 0.036853790283203125, 0.09769455343484879, -0.031896691769361496, 0.017064141109585762, -0.07628967612981796, -0.005014285910874605, -0.007442543748766184, -0.07291612029075623, -0.012946195900440216, -0.008656468242406845, 0.0692986398935318, 0.02788078598678112, -0.021765775978565216, -0.03730330988764763, -0.046447351574897766, 0.00517940754070878, -0.051246099174022675, 0.1396692395210266, 0.034102242439985275, 0.024453556165099144, -0.07247715443372726, 0.053874045610427856, -0.001323225093074143, -0.0019911429844796658, -0.07389886677265167, -0.021658962592482567, -0.0070841554552316666, 0.023922309279441833, 0.016889499500393867, 0.030622530728578568, -0.02927878499031067, -0.03609590604901314, 0.04728159308433533, -0.015410215593874454, -0.02862364426255226, -0.02609240636229515, 0.022505484521389008, 0.008559796959161758, -0.06746667623519897, -0.01973978988826275, 0.076499804854393, 0.03841277211904526, 0.007108483929187059, 0.05681002885103226, 0.02884793095290661, 0.013025667518377304, -0.012141874060034752, -0.05501540005207062, -0.006987316533923149, -0.039882492274045944, -0.03177668899297714, 0.013274363242089748, 0.03572945296764374, 0.06102277711033821, -0.06306330114603043, -0.0086653558537364, 0.030974917113780975, 0.04986707866191864, -0.021792279556393623, 0.02882298082113266, -0.02288968302309513, -0.02516244724392891, 0.07634646445512772, 0.00307187857106328, 0.01953507773578167, -0.006056910380721092, 0.07075200974941254, 0.016717951744794846, 0.032642535865306854, 0.053605832159519196, 0.03576093539595604, 0.04796455055475235, -0.014909016899764538, 0.040931183844804764, 0.0035531872417777777, 0.014705496840178967, 0.027733968570828438, -0.0054834820330142975, -0.022468743845820427, 0.06372230499982834, 0.021347764879465103, -0.00022421115136239678, -0.006893665995448828, -0.045173853635787964, -0.011849799193441868, 0.018378039821982384, -0.03518887236714363, -0.2746107876300812, 0.0260297954082489, 0.07386824488639832, 0.05811486765742302, 0.03003668040037155, -0.01706327497959137, 0.014440760016441345, -0.01029844582080841, -0.02193608321249485, 0.010400215163826942, -0.01479907613247633, 0.00868809875100851, -0.016994990408420563, -0.022949477657675743, -0.005277044605463743, 0.026402166113257408, 0.03210169076919556, 0.004098004661500454, -0.0033214814029634, 0.024801328778266907, 0.04568397253751755, 0.0018446737667545676, 0.15681223571300507, 0.021761437878012657, 0.042697563767433167, 0.053025707602500916, -0.016320189461112022, -0.026839744299650192, 0.05784515291452408, -0.007663636468350887, 0.017578769475221634, -0.033355411142110825, 0.03275996074080467, 0.033595576882362366, 0.01180260255932808, -0.03895559534430504, -0.031146971508860588, 0.07079757750034332, 0.00868265237659216, -0.0397532656788826, -0.03391529619693756, 0.037318553775548935, -0.05102873966097832, -0.001560877193696797, 0.06232011318206787, 0.013056665658950806, 0.004080746788531542, -0.052266623824834824, -0.05188645049929619, 0.009910203516483307, -0.03228577971458435, -0.027230162173509598, -0.003819558769464493, -0.012414445169270039, 0.009776587598025799, 0.09056907892227173, 0.05464693531394005, -0.00012156109005445614, 0.055226001888513565, 0.03566416725516319, 0.007327570114284754, -0.02499457448720932, 0.09535384178161621, 0.026760725304484367, 0.011287537403404713 ]
[ -0.011235199868679047, 0.046039581298828125, 0.022376418113708496, 0.022300632670521736, 0.012690087780356407, -0.0011861195089295506, -0.006581251975148916, 0.007976249791681767, -0.00024032975488808006, -0.040023256093263626, -0.03628187254071236, 0.009701898321509361, -0.006369419861584902, -0.029737262055277824, 0.01502462849020958, 0.018658950924873352, -0.017837505787611008, -0.0177468154579401, 0.022556893527507782, -0.028343310579657555, -0.043320536613464355, 0.04470459371805191, 0.021782293915748596, 0.01339365728199482, -0.047862034291028976, 0.035786181688308716, -0.02813517116010189, 0.04099610075354576, 0.011737550608813763, -0.09300702810287476, -0.009596237912774086, -0.060066696256399155, -0.0012360407272353768, -0.019981490448117256, 0.00849910918623209, -0.009853091090917587, -0.010367712937295437, -0.015445181168615818, -0.018895013257861137, 0.021682854741811752, -0.005637004040181637, -0.0288153737783432, -0.03269660472869873, 0.017738914117217064, 0.006864637136459351, 0.009591843001544476, -0.017818633466959, 0.022426201030611992, -0.00597006268799305, -0.001792280119843781, -0.03715602681040764, 0.008829538710415363, -0.017416898161172867, -0.016950698569417, 0.02005109377205372, -0.003523987950757146, -0.009730301797389984, -0.04028112068772316, -0.01720103994011879, -0.04018741473555565, 0.0030312011949718, 0.0013123328099027276, -0.02412334457039833, -0.009802940301597118, 0.008116340264678001, -0.0007430838304571807, -0.03538772463798523, 0.036939118057489395, -0.0027780686505138874, 0.015175307169556618, -0.016540296375751495, 0.01777556538581848, -0.03991755470633507, -0.022419897839426994, -0.0011141266440972686, -0.02450968511402607, -0.016318446025252342, -0.0546368844807148, -0.01905558630824089, -0.007340431213378906, -0.0468662828207016, -0.03510084003210068, 0.016183430328965187, 0.016390593722462654, 0.0019654135685414076, -0.05242243781685829, 0.004746185149997473, -0.004779967479407787, -0.014886281453073025, 0.009710218757390976, -0.06639204174280167, -0.013681511394679546, 0.042946893721818924, 0.045120012015104294, -0.07605965435504913, 0.05541866272687912, 0.013700978830456734, -0.006271759979426861, -0.0005931468913331628, 0.8193700909614563, -0.01564357988536358, 0.016795985400676727, -0.017040960490703583, 0.0034294230863451958, 0.003666461678221822, -0.029796095564961433, -0.025115950033068657, 0.008721647784113884, 0.0047302586026489735, -0.04879814013838768, 0.012998185120522976, -0.009601326659321785, 0.02301553264260292, 0.012116735801100731, -0.007327927276492119, 0.03747953474521637, -0.0159759558737278, 0.038990478962659836, 0.002371105831116438, 0.052971407771110535, 0.026247752830386162, 0.02340771071612835, -0.019627265632152557, -0.02013971656560898, 0.023927554488182068, -0.16755113005638123, 0.054808471351861954, -7.386859397813042e-33, 0.04569069296121597, -0.021367667242884636, -0.017867259681224823, 0.000998050905764103, 0.0377967432141304, 0.029923690482974052, -0.037225913256406784, -0.014067406766116619, -0.016099492087960243, -0.02055862918496132, 0.009460142813622952, 0.0009983519557863474, -0.0075899348594248295, -0.023328114300966263, 0.05554836988449097, 0.015185060910880566, -0.016211405396461487, 0.05360912159085274, 0.009256431832909584, 0.0162821002304554, -0.009850378148257732, 0.016590874642133713, 0.0339210107922554, 0.031791865825653076, 0.009861170314252377, 0.05574127659201622, -0.026035018265247345, 0.02908407151699066, -0.021345725283026695, -0.046468500047922134, -0.029894612729549408, 0.015565259382128716, -0.0226135216653347, -0.05709543824195862, 0.012691563926637173, -0.031103210523724556, -0.023141836747527122, -0.01403171569108963, -0.0428825318813324, -0.009509441442787647, -0.0453692190349102, -0.012364189140498638, -0.01709216646850109, -0.059400878846645355, -0.0058958823792636395, -0.01539849303662777, -0.029017966240644455, 0.016329124569892883, -0.00666849734261632, 0.017743514850735664, 0.03985365480184555, -0.01224832609295845, 0.025149371474981308, -0.022798554971814156, -0.008315928280353546, 0.0265846848487854, 0.02162761613726616, 0.040999069809913635, 0.0015829092590138316, 0.020676082000136375, 0.042390089482069016, -0.0067991712130606174, 0.039999205619096756, 0.0377897247672081, 0.01310248114168644, 0.0038443070370703936, 0.060703031718730927, 0.029293598607182503, 0.02796785905957222, -0.016331424936652184, -0.04193837195634842, 0.04557411000132561, -0.024448998272418976, -0.021603718400001526, 0.02147672511637211, -0.040636058896780014, 0.02734014391899109, -0.04761522263288498, 0.01822313852608204, 0.051251500844955444, 0.034740496426820755, -0.020411644130945206, 0.005558331031352282, -0.04338110610842705, -0.023128924891352654, -0.005545261316001415, 0.009077063761651516, 0.01754206232726574, 0.013337630778551102, 0.021678442135453224, -0.005326751619577408, 0.0073279463686048985, -0.0226384736597538, -0.022220350801944733, -0.022958911955356598, 6.504354809881302e-33, 0.008724409155547619, -0.0366361029446125, 0.016164500266313553, 0.01086515188217163, 0.02686133049428463, -0.02025362104177475, 0.03578820452094078, 0.0546313114464283, -0.017774714156985283, 0.05157824233174324, 0.0018046972109004855, -0.013967872597277164, -0.01110709086060524, -0.017060883343219757, 0.048491984605789185, 0.016764022409915924, 0.0116913802921772, 0.00896854605525732, 0.018068043515086174, -0.019722850993275642, 0.0018451727228239179, 0.002320803003385663, 0.0180931705981493, -0.015183858573436737, 0.02270021103322506, 0.01899584010243416, 0.006055720150470734, -0.01819947361946106, 0.013730555772781372, 0.002836525207385421, 0.004756222479045391, -0.011173583567142487, -0.011463016271591187, -0.007898276671767235, -0.016169026494026184, 0.044702403247356415, 0.0193120539188385, -0.0026091907639056444, 0.030203260481357574, 0.0074293119832873344, 0.047723814845085144, 0.013437855988740921, -0.046274974942207336, 0.01048729382455349, 0.014119429513812065, 0.03580661863088608, -0.028382007032632828, 0.010527203790843487, 0.0006339118699543178, 0.027648920193314552, 0.025794897228479385, 0.025190718472003937, -0.008125937543809414, 0.041827235370874405, 0.014629769138991833, -0.017146069556474686, -0.047742631286382675, -0.016619624570012093, -0.054049476981163025, -0.007173383608460426, -0.03405109792947769, 0.004493244923651218, -0.03168698772788048, 0.05730477347970009, -0.023146582767367363, 0.01712731271982193, -0.09436015039682388, -0.029695702716708183, -0.008081376552581787, -0.00963300559669733, -0.013149072416126728, -0.039351072162389755, -0.034507714211940765, 0.01543769147247076, -0.03461786359548569, 0.027220560237765312, -0.020961834117770195, 0.04099332541227341, -0.02385036088526249, 0.03753795847296715, 0.007910199463367462, 0.0247642882168293, 0.0422804094851017, -0.017296819016337395, -0.006062330212444067, 0.022731298580765724, -0.029056504368782043, 0.015973111614584923, 0.04700510576367378, -0.009234790690243244, 0.018930329009890556, -0.016602836549282074, -0.00012661697110161185, 0.011098133400082588, 0.006531756836920977, -1.269147453797359e-8, -0.048258714377880096, 0.025227675214409828, 0.009122587740421295, 0.033537816256284714, 0.02272592857480049, 0.013120254501700401, -0.006694006267935038, -0.03514404594898224, 0.008098172955214977, 0.016151737421751022, 0.02672649919986725, -0.013231677934527397, -0.012789069674909115, 0.007732116151601076, 0.023821158334612846, -0.02904297411441803, -0.005159554537385702, -0.05324781313538551, 0.020282648503780365, 0.0343792699277401, 0.03846322372555733, 0.029412835836410522, 0.0010004817740991712, 0.010575111024081707, -0.0002898450766224414, -0.018822472542524338, 0.0008257629815489054, -0.09474083036184311, 0.0035944024566560984, -0.020734557881951332, 0.04159358888864517, -0.04256024956703186, -0.007162919268012047, -0.009487307630479336, -0.007217049598693848, -0.05950253829360008, -0.018016308546066284, -0.011980990879237652, 0.0027611616533249617, 0.012669672258198261, 0.025089789181947708, -0.02605336904525757, -0.026472045108675957, -0.02352049946784973, -0.004666583612561226, -0.012027626857161522, -0.055615827441215515, 0.013250594958662987, -0.0009513566619716585, -0.03529360890388489, -0.005671487655490637, -0.034846238791942596, 0.01370102446526289, 0.00448396522551775, 0.053109560161828995, 0.058031145483255386, 0.04954896494746208, -0.004011143464595079, -0.03455111011862755, -0.010152042843401432, 0.0329035222530365, -0.0010112605523318052, -0.03460592404007912, -0.03314734250307083 ]
python-refactoring-to-iterator
https://markhneedham.com/blog/2015/05/23/python-refactoring-to-iterator
false
2015-05-14 00:17:02
R: ggplot - Displaying multiple charts with a for loop
[ "r-2", "rstats", "ggplot" ]
[ "neo4j", "R" ]
Continuing with my analysis of the http://www.meetup.com/graphdb-london/[Neo4j London user group] I wanted to drill into some individual meetups and see the makeup of the people attending those meetups with respect to the cohort they belong to. I started by writing a function which would take in an event ID and output a bar chart showing the number of people who attended that event from each cohort. <?p> We can work out the cohort that a member belongs to by querying for the first event they attended. Our query for the most recent http://www.meetup.com/graphdb-london/events/220750415/[Intro to graphs] session looks like this: ~~~r library(RNeo4j) graph = startGraph("http://127.0.0.1:7474/db/data/") eventId = "220750415" query = "match (g:Group {name: 'Neo4j - London User Group'})-[:HOSTED_EVENT]\-> (e {id: \{id}})\<-[:TO]-(rsvp {response: 'yes'})\<-[:RSVPD]-(person) WITH rsvp, person MATCH (person)-[:RSVPD]\->(otherRSVP) WITH person, rsvp, otherRSVP ORDER BY person.id, otherRSVP.time WITH person, rsvp, COLLECT(otherRSVP)[0] AS earliestRSVP return rsvp.time, earliestRSVP.time, person.id" df = cypher(graph, query, id= eventId) > df %>% sample_n(10) rsvp.time earliestRSVP.time person.id 18 1.430819e+12 1.392726e+12 130976662 95 1.430069e+12 1.430069e+12 10286388 79 1.429035e+12 1.429035e+12 38344282 64 1.428108e+12 1.412935e+12 153473172 73 1.429513e+12 1.398236e+12 143322942 19 1.430389e+12 1.430389e+12 129261842 37 1.429643e+12 1.327603e+12 9750821 49 1.429618e+12 1.429618e+12 184325696 69 1.430781e+12 1.404554e+12 67485912 1 1.430929e+12 1.430146e+12 185405773 ~~~ We're not doing anything too clever here, just using a couple of WITH clauses to order RSVPs so we can get the earlier one for each person. Once we've done that we'll tidy up the data frame so that it contains columns containing the cohort in which the member attended their first event: ~~~r timestampToDate \<- function(x) as.POSIXct(x / 1000, origin="1970-01-01", tz = "GMT") df$time = timestampToDate(df$rsvp.time) df$date = format(as.Date(df$time), "%Y-%m") df$earliestTime = timestampToDate(df$earliestRSVP.time) df$earliestDate = format(as.Date(df$earliestTime), "%Y-%m") > df %>% sample_n(10) rsvp.time earliestRSVP.time person.id time date earliestTime earliestDate 47 1.430697e+12 1.430697e+12 186893861 2015-05-03 23:47:11 2015-05 2015-05-03 23:47:11 2015-05 44 1.430924e+12 1.430924e+12 186998186 2015-05-06 14:49:44 2015-05 2015-05-06 14:49:44 2015-05 85 1.429611e+12 1.422378e+12 53761842 2015-04-21 10:13:46 2015-04 2015-01-27 16:56:02 2015-01 14 1.430125e+12 1.412690e+12 7994846 2015-04-27 09:01:58 2015-04 2014-10-07 13:57:09 2014-10 29 1.430035e+12 1.430035e+12 37719672 2015-04-26 07:59:03 2015-04 2015-04-26 07:59:03 2015-04 12 1.430855e+12 1.430855e+12 186968869 2015-05-05 19:38:10 2015-05 2015-05-05 19:38:10 2015-05 41 1.428917e+12 1.422459e+12 133623562 2015-04-13 09:20:07 2015-04 2015-01-28 15:37:40 2015-01 87 1.430927e+12 1.430927e+12 185155627 2015-05-06 15:46:59 2015-05 2015-05-06 15:46:59 2015-05 62 1.430849e+12 1.430849e+12 186965212 2015-05-05 17:56:23 2015-05 2015-05-05 17:56:23 2015-05 8 1.430237e+12 1.425567e+12 184979500 2015-04-28 15:58:23 2015-04 2015-03-05 14:45:40 2015-03 ~~~ Now that we've got that we can group by the earliestDate cohort and then create a bar chart: ~~~r byCohort = df %>% count(earliestDate) ggplot(aes(x= earliestDate, y = n), data = byCohort) + geom_bar(stat="identity", fill = "dark blue") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=1)) ~~~ image::{{<siteurl>}}/uploads/2015/05/2015-05-13_00-30-59.png[2015 05 13 00 30 59,400] This is good and gives us the insight that most of the members attending this version of intro to graphs just joined the group. The event was on 7th April and most people joined in March which makes sense. Let's see if that trend continues over the previous two years. To do this we need to create a for loop which goes over all the Intro to Graphs events and then outputs a chart for each one. First I pulled out the code above into a function: ~~~r plotEvent = function(eventId) { query = "match (g:Group {name: 'Neo4j - London User Group'})-[:HOSTED_EVENT]\-> (e {id: \{id}})\<-[:TO]-(rsvp {response: 'yes'})\<-[:RSVPD]-(person) WITH rsvp, person MATCH (person)-[:RSVPD]\->(otherRSVP) WITH person, rsvp, otherRSVP ORDER BY person.id, otherRSVP.time WITH person, rsvp, COLLECT(otherRSVP)[0] AS earliestRSVP return rsvp.time, earliestRSVP.time, person.id" df = cypher(graph, query, id= eventId) df$time = timestampToDate(df$rsvp.time) df$date = format(as.Date(df$time), "%Y-%m") df$earliestTime = timestampToDate(df$earliestRSVP.time) df$earliestDate = format(as.Date(df$earliestTime), "%Y-%m") byCohort = df %>% count(earliestDate) ggplot(aes(x= earliestDate, y = n), data = byCohort) + geom_bar(stat="identity", fill = "dark blue") + theme(axis.text.x=element_text(angle=90,hjust=1,vjust=1)) } ~~~ We'd call it like this for the Intro to graphs meetup: ~~~r > plotEvent("220750415") ~~~ Next I tweaked the code to look up all Into to graphs events and then loop through and output a chart for each event: ~~~r events = cypher(graph, "match (e:Event {name: 'Intro to Graphs'}) RETURN e.id ORDER BY e.time") for(event in events$n) { plotEvent(as.character(event)) } ~~~ Unfortunately that doesn't print anything at all which we can fix by http://stackoverflow.com/questions/9315611/grid-of-multiple-ggplot2-plots-which-have-been-made-in-a-for-loop[storing our plots in a list] and then displaying it afterwards: ~~~R library(gridExtra) p = list() for(i in 1:count(events)$n) { event = events[i, 1] p[[i]] = plotEvent(as.character(event)) } do.call(grid.arrange,p) ~~~ image::{{<siteurl>}}/uploads/2015/05/2015-05-14_00-57-10.png[2015 05 14 00 57 10,599] This visualisation is probably better without any of the axis so let's update the function to scrap those. We'll also add the date of the event at the top of each chart which will require a slight tweak of the query: ~~~R plotEvent = function(eventId) { query = "match (g:Group {name: 'Neo4j - London User Group'})-[:HOSTED_EVENT]\-> (e {id: \{id}})\<-[:TO]-(rsvp {response: 'yes'})\<-[:RSVPD]-(person) WITH e,rsvp, person MATCH (person)-[:RSVPD]\->(otherRSVP) WITH e,person, rsvp, otherRSVP ORDER BY person.id, otherRSVP.time WITH e, person, rsvp, COLLECT(otherRSVP)[0] AS earliestRSVP return rsvp.time, earliestRSVP.time, person.id, e.time" df = cypher(graph, query, id= eventId) df$time = timestampToDate(df$rsvp.time) df$eventTime = timestampToDate(df$e.time) df$date = format(as.Date(df$time), "%Y-%m") df$earliestTime = timestampToDate(df$earliestRSVP.time) df$earliestDate = format(as.Date(df$earliestTime), "%Y-%m") byCohort = df %>% count(earliestDate) ggplot(aes(x= earliestDate, y = n), data = byCohort) + geom_bar(stat="identity", fill = "dark blue") + theme(axis.ticks = element_blank(), axis.text.x = element_blank(), axis.text.y = element_blank(), axis.title.x = element_blank(), axis.title.y = element_blank()) + labs(title = df$eventTime[1]) } ~~~ image::{{<siteurl>}}/uploads/2015/05/2015-05-14_01-08-54.png[2015 05 14 01 08 54,599] I think this makes it a bit easier to read although I've made the mistake of not having all the charts representing the same scale - one to fix for next time. We started doing the intro to graphs sessions less frequently towards the end of last year so my hypothesis was that we'd see a range of people from different cohorts RSVPing for them but that doesn't seem to be the case. Instead it's very dominated by people signing up close to the event.
null
null
[ 0.015498754568397999, -0.022009335458278656, 0.0032165301963686943, 0.023808836936950684, 0.08096995949745178, 0.0065024555660784245, 0.02522781491279602, 0.022776611149311066, 0.02444969117641449, 0.0007613234338350594, -0.004794669803231955, -0.003914332017302513, -0.0729813203215599, 0.023315582424402237, 0.008497466333210468, 0.06385732442140579, 0.06699267774820328, -0.004498317837715149, -0.0008456087671220303, -0.031037194654345512, 0.036431290209293365, 0.04219476878643036, 0.0066955676302313805, 0.05041663348674774, 0.05065068602561951, 0.0053972466848790646, 0.012282261624932289, -0.01680740714073181, -0.04318966343998909, 0.002552715362980962, 0.03513333201408386, 0.0005891243345104158, 0.01643742062151432, -0.015114154666662216, 0.023850487545132637, -0.011722367256879807, -0.021876763552427292, 0.00733356736600399, -0.009797096252441406, -0.0028768337797373533, -0.07648753374814987, 0.012299051508307457, -0.012186912819743156, 0.03050936572253704, -0.04854374751448631, 0.009954683482646942, -0.05181695520877838, 0.03866789862513542, 0.01166460756212473, 0.007729674223810434, -0.08212070167064667, 0.021245820447802544, 0.006719865836203098, 0.011575487442314625, -0.0024522151798009872, 0.027640599757432938, 0.017184562981128693, -0.05632869899272919, 0.03198644891381264, -0.024546969681978226, 0.01870489865541458, 0.0062659201212227345, 0.0054215481504797935, 0.01601170375943184, 0.006099681369960308, -0.019591674208641052, 0.006673760246485472, 0.06276679039001465, -0.031132759526371956, 0.002260443288832903, -0.004231730941683054, 0.04066639766097069, -0.018328500911593437, 0.011150720529258251, -0.003162766108289361, -0.04118945822119713, 0.0019567450508475304, 0.046599164605140686, 0.036839891225099564, 0.039989519864320755, -0.006685853004455566, 0.008383972570300102, 0.019751304760575294, 0.0334320142865181, -0.0034380718134343624, -0.029044609516859055, -0.02936411090195179, -0.04429562762379646, -0.06356945633888245, 0.03439001739025116, -0.0068175895139575005, -0.05494173243641853, 0.0027753121685236692, 0.025021418929100037, -0.01283129770308733, 0.00879022479057312, 0.027328230440616608, -0.011497199535369873, 0.004728623200207949, -0.03527883067727089, -0.02097666822373867, -0.042246561497449875, 0.015666352584958076, 0.006667885463684797, -0.09582846611738205, -0.023323772475123405, -0.0292669627815485, -0.009453995153307915, -0.0031050792895257473, -0.011846747249364853, -0.03795003145933151, 0.02062767930328846, -0.021954581141471863, 0.027204731479287148, -0.07619491219520569, 0.0701737180352211, 0.019794533029198647, -0.021802149713039398, -0.0030933511443436146, -0.005904242862015963, 0.043523721396923065, 0.02961202710866928, 0.002523629693314433, 0.07699212431907654, -0.029700523242354393, 0.05028257891535759, 0.00037380086723715067, 0.05584772303700447, -0.025428611785173416, -0.061785027384757996, -0.02823467366397381, 0.06639707088470459, -0.011595051735639572, 0.004531554412096739, -0.017546918243169785, -0.0548885352909565, -0.023398594930768013, 0.02007797174155712, 0.04405632242560387, 0.03569929301738739, 0.03265982121229172, -0.04778625816106796, 0.03227077051997185, 0.0028641773387789726, 0.03847422078251839, 0.005559258162975311, -0.03316456452012062, -0.0458802729845047, -0.022001344710588455, 0.004286439623683691, 0.02811201475560665, 0.011014841496944427, 0.04334620386362076, -0.04180539399385452, 0.012844115495681763, 0.09683220088481903, 0.031672000885009766, -0.004715819377452135, -0.015622727572917938, 0.005823411047458649, 0.04075835645198822, 0.027289025485515594, 0.009617483243346214, 0.06926868110895157, 0.01534110028296709, -0.01334016676992178, -0.0180586576461792, 0.05680437386035919, -0.028397496789693832, 0.02033839002251625, -0.033949051052331924, -0.04949364811182022, 0.047768525779247284, -0.04139110445976257, -0.024764686822891235, 0.049313340336084366, 0.07739485055208206, 0.04037795960903168, 0.030562374740839005, -0.002563722198829055, -0.08098050951957703, 0.036776233464479446, 0.012624328024685383, 0.02648208476603031, 0.02479676343500614, -0.007743227761238813, 0.07196810841560364, 0.045155249536037445, 0.005498405545949936, 0.033460769802331924, -0.07192442566156387, -0.07013159245252609, -0.015903819352388382, -0.03255406767129898, 0.057986266911029816, -0.04140042886137962, 0.046171266585588455, 0.04344579949975014, -0.004609465599060059, 0.04492533206939697, -0.0013254592195153236, -0.00903313048183918, 0.023685958236455917, -0.0020256030838936567, -0.05819040909409523, 0.053917691111564636, 0.014972326345741749, -0.03766334429383278, -0.034076888114213943, 0.02608569525182247, -0.03203678876161575, 0.016706394031643867, 0.013076355680823326, -0.01198597438633442, 0.045484546571969986, 0.01490829512476921, 0.04007834941148758, 0.0031576992478221655, 0.020239247009158134, -0.03804384917020798, 0.06110953167080879, 0.011588227935135365, -0.017016666010022163, -0.013626554049551487, -0.003890443127602339, 0.12684902548789978, 0.07266828417778015, -0.016312532126903534, -0.04090255871415138, 0.02160688117146492, 0.031191226094961166, -0.005025644786655903, 0.027155200019478798, -0.02023708075284958, 0.0035494959447532892, -0.019977184012532234, -0.037374451756477356, -0.0354018360376358, 0.01592564769089222, -0.04510728269815445, 0.02033146470785141, 0.044198960065841675, -0.015479485504329205, 0.06810890138149261, -0.003681897185742855, -0.013344351202249527, 0.00037751783384010196, -0.024254051968455315, -0.05024344101548195, 0.02491852454841137, 0.013555550947785378, -0.008392935618758202, 0.05250866711139679, -0.022768860682845116, -0.0027456264942884445, -0.007209079805761576, -0.00024308932188432664, 0.0511825792491436, 0.058572918176651, 0.056986235082149506, -0.0020619549322873354, 0.0418732725083828, -0.04071123152971268, -0.0023982729762792587, -0.023540660738945007, -0.04816078767180443, -0.054765474051237106, -0.04250700771808624, 0.006508776918053627, 0.0005617024144157767, 0.05217835679650307, -0.017692139372229576, 0.014294153079390526, 0.013984480872750282, -0.003720624139532447, 0.0030834742356091738, 0.02820681408047676, 0.0036824236158281565, -0.002733721164986491, -0.03416306897997856, -0.0354393795132637, 0.04915960878133774, -0.053346212953329086, -0.037401020526885986, -0.017646636813879013, -0.06695394217967987, 0.03594464063644409, -0.040141697973012924, -0.023173825815320015, 0.00480255950242281, 0.03785329684615135, 0.05598128214478493, 0.033622242510318756, -0.01324190478771925, 0.06935076415538788, 0.008304997347295284, 0.017051611095666885, 0.02847599983215332, -0.01612951047718525, 0.03827425837516785, -0.02893831767141819, 0.031776368618011475, 0.04270099103450775, -0.03588004410266876, 0.0013867778470739722, -0.04620087146759033, 0.01709248684346676, -0.028453992679715157, -0.2723295986652374, 0.04230603575706482, -0.03257087245583534, -0.02634226717054844, 0.008226199075579643, -0.04846395179629326, 0.03384692221879959, -0.0316963866353035, -0.04360570013523102, -0.012903141789138317, -0.0059210509061813354, -0.032706208527088165, -0.01972975768148899, 0.03245333582162857, 0.02792246825993061, 0.023034444078803062, -0.004230141174048185, -0.05713248625397682, 0.009735357947647572, 0.05258549749851227, 0.0112900510430336, -0.04673769697546959, -0.028758570551872253, 0.028882579877972603, 0.016079667955636978, 0.052675459533929825, -0.07837822288274765, -0.007086113560944796, -0.06529378890991211, -0.040299419313669205, 0.020074505358934402, -0.01821497641503811, 0.021894587203860283, -0.0037784220185130835, -0.006971215363591909, -0.025831717997789383, 0.04789848253130913, 0.005854202900081873, -0.005294681526720524, 0.001042274758219719, -0.033463843166828156, -0.04451371729373932, -0.0095739820972085, 0.00187411077786237, 0.0820445641875267, 0.03652138635516167, -0.06969024986028671, -0.0018266420811414719, -0.006836282089352608, 0.05354718863964081, -0.03807640075683594, -0.036808889359235764, -0.016985466703772545, 0.02739149145781994, -0.0328047014772892, -0.03976459801197052, -0.024398058652877808, 0.0029803512152284384, -0.06350120902061462, -0.03344731777906418, -0.03919818997383118, -0.03976321965456009, 0.023964159190654755, -0.052411265671253204, -0.0300083439797163, -0.053790464997291565, -0.08735967427492142, -0.026885366067290306, 0.04883555322885513, 0.0018583376659080386, -0.0183374285697937, 0.0070366887375712395, -0.02354385145008564, -0.09688558429479599, -0.04281352087855339, -0.01835859939455986, 0.004295277874916792, 0.005951893050223589, 0.007298598997294903, 0.053004421293735504, -0.04187483713030815, -0.06768875569105148, -0.004288570024073124, 0.01514903362840414, 0.025076065212488174, -0.001963970949873328, 0.014908721670508385, -0.012404114007949829, -0.05989205464720726, -0.004567171912640333, 0.06421799957752228, -0.01900183968245983, -0.02536451257765293, 0.00376351410523057, 0.009657323360443115, 0.03398923575878143, -0.0049542831256985664, 0.008392155170440674, 0.02991379424929619, 0.03240688517689705, 0.042871616780757904, -0.04800421744585037, 0.009460902772843838, -0.02103867568075657, -0.026506712660193443, -0.0032915673218667507, -0.05048315227031708, 0.02634851075708866, 0.03190431371331215, -0.0016195887001231313, 0.01165755931288004, -0.022983143106102943, 0.0312308669090271, -0.05047455057501793, -0.013321168720722198, -0.035799164324998856, 0.025199728086590767, 0.024925295263528824, 0.04718605801463127, -0.011410645209252834, -0.061172086745500565, 0.029308198019862175, 0.0034777061082422733, 0.00016812664398457855, -0.06249512732028961, -0.02866746485233307, -0.040595293045043945, -0.027822308242321014, 0.006551400292664766, 0.015668854117393494, -0.024700382724404335, 0.035465992987155914, 0.02160686068236828, -0.036094389855861664, 0.05416517332196236, -0.011702149175107479, -0.04230513796210289, -0.039004214107990265, 0.005546379368752241, 0.004128162283450365, -0.005268856883049011, -0.0009320614044554532, -0.0023068853188306093, 0.05284452438354492, 0.03247394040226936, 0.016640065237879753, 0.00953187607228756, -0.014929748140275478, 0.014340411871671677, 0.021868150681257248, 0.003988778218626976, -0.0158576350659132, 0.014566559344530106, -0.037060972303152084, -0.003955227788537741, -0.00528167886659503, 0.07936648279428482, -0.001060045906342566, -0.033964693546295166, -0.03391706198453903, 0.017776355147361755, -0.06861235946416855, 0.006679648067802191, -0.024769853800535202, 0.009597192518413067, 0.053552329540252686, -0.020586229860782623, 0.02106867916882038, -0.011125586926937103, -0.01116847712546587, -0.0074385604821145535, 0.02751547284424305, -0.04005584120750427, 0.021200722083449364, -0.002979803364723921, -0.008243339136242867, 0.009348264895379543, 0.026316052302718163, 0.033332452178001404, -0.01110598724335432, -0.026573924347758293, 0.00020022604439873248, 0.017528235912322998, 0.015149365179240704, 0.0627446323633194, 0.0736498087644577, -0.017417529597878456, -0.016810910776257515, -0.009684635326266289, -0.02183357998728752, -0.009850890375673771, -0.017106331884860992, -0.02610146813094616, -0.018944410607218742, -0.0372222363948822, -0.06383627653121948, 0.041929587721824646, -0.0068175531923770905, -0.004364664200693369, 0.029938528314232826, 0.024776656180620193, -0.00654419232159853, -0.013544769026339054, 0.030554216355085373, 0.05478348955512047, -0.05840931087732315, -0.020304156467318535, -0.007182828616350889, -0.03330376744270325, 0.004982567857950926, 0.010852428153157234, -0.05473397672176361, -0.023925015702843666, -0.017178010195493698, 0.02522813156247139, -0.011622476391494274, -0.03594674542546272, -0.019267480820417404, 0.01995263434946537, 0.011172188445925713, 0.03979741781949997, 0.013798454776406288, 0.009004423394799232, -0.019790152087807655, 0.001726867281831801, 0.06102887541055679, -0.040421947836875916, 0.0013582052197307348, 0.006270276848226786, -0.024787891656160355, -0.0030510767828673124, -0.025843415409326553, 0.018665209412574768, 0.00906454399228096, -0.029200438410043716, 0.007154479157179594, -0.07881249487400055, -0.00041814654832705855, 0.012993481941521168, 0.042840294539928436, -0.007687803357839584, -0.004958807956427336, -0.03604717552661896, -0.005400688387453556, -0.025554712861776352, 0.010913553647696972, 0.012499404139816761, -0.0023406411055475473, 0.012113206088542938, 0.02153169736266136, 0.0060737114399671555, 0.029200872406363487, -0.00786292739212513, -0.027646562084555626, 0.04736073315143585, -0.02992672100663185, -0.04310587793588638, -0.03427780792117119, -0.05152270197868347, 0.004523293115198612, -0.0025818233843892813, 0.005370865110307932, -0.024357549846172333, 0.044400233775377274, 0.0416979044675827, 0.03891170024871826, 0.03847799822688103, -0.002445442136377096, 0.013227083720266819, -0.018464431166648865, 0.004169996827840805, -0.07910305261611938, -0.015535584650933743, 0.026174286380410194, -0.000594424782320857, -0.00833669863641262, -0.0004080316866748035, -0.02273738570511341, 0.024437306448817253, -0.061680324375629425, -0.021309448406100273, 0.026498591527342796, -0.024810800328850746, 0.024480588734149933, 0.025814250111579895, -0.05623910576105118, -0.005342337302863598, 0.0319494903087616, -0.047087475657463074, -0.011768014170229435, -0.02296600490808487, 0.07023683935403824, -0.041469983756542206, 0.03657124191522598, -0.008061625994741917, -0.021709972992539406, 0.07076089084148407, 0.034148722887039185, 0.01335886586457491, 0.06596875935792923, -0.021486159414052963, 0.032728251069784164, 0.03603789955377579, -0.020292306318879128, -0.008834936656057835, 0.025134578347206116, -0.008014556020498276, -0.057056836783885956, 0.022089915350079536, 0.0040691620670259, -0.006464948412030935, -0.06078418344259262, 0.0879424586892128, 0.0019163525430485606, -0.043446894735097885, -0.04805264249444008, 0.030476698651909828, -0.02857387065887451, -0.010641751810908318, -0.04278023913502693, 0.0006104031926952302, -0.03143417090177536, 0.06907933950424194, -0.0006823445437476039, 0.02499748393893242, 0.05689810588955879, -0.006232136860489845, 0.007388100493699312, -0.0017077303491532803, 0.08999618887901306, 0.09491422027349472, 0.06463275849819183, 0.02474837377667427, 0.0774032324552536, -0.0448790043592453, -0.03839438036084175, -0.009937744587659836, -0.02785509079694748, -0.034569911658763885, 0.01207058783620596, 0.021260041743516922, 0.09014072269201279, -0.04257899150252342, 0.0729706734418869, 0.0013369470834732056, -0.01676156371831894, -0.008854626677930355, -0.0048481160774827, 0.05159870535135269, 0.07564814388751984, 0.007588472682982683, 0.03423473238945007, -0.030679700896143913, -0.03562215715646744, 0.041013140231370926, -0.01000066939741373, -0.008826104924082756, 0.0340396873652935, -0.027260202914476395, 0.011534487828612328, 0.019622882828116417, 0.030170787125825882, 0.09024535119533539, -0.033377185463905334, -0.006405339110642672, -0.00861292239278555, 0.0009014942334033549, -0.003485611407086253, 0.022638799622654915, -0.007919635623693466, -0.012633449397981167, -0.017120815813541412, -0.05087148770689964, -0.03367721289396286, -0.017669474706053734, -0.059431854635477066, 0.014523160643875599, -0.020899318158626556, 0.006438964046537876, -0.013798375613987446, -0.017679477110505104, -0.025148535147309303, -0.04874563217163086, -0.038968849927186966, -0.04932662844657898, -0.08085454255342484, -0.010884069837629795, 0.010797305032610893, -0.024645671248435974, -0.017714789137244225, 0.0008225801284424961, -0.023483524098992348, -0.009111225605010986, 0.017841516062617302, -0.0561680905520916, -0.00692135002464056, 0.010180060751736164, -0.002085362561047077, 0.04462350532412529, 0.0069547491148114204, 0.03696005046367645, 0.00914852786809206, 0.013584652915596962, -0.0402742363512516, 0.024193039163947105, 0.05742711201310158, 0.016523344442248344, -0.007016670890152454, -0.09483149647712708, 0.01934572495520115, 0.014459260739386082, -0.025504175573587418, -0.08874673396348953, 0.023459985852241516, 0.034786902368068695, 0.022995425388216972, 0.024931661784648895, -0.006207011174410582, -0.0369151346385479, -0.019706163555383682, 0.010663681663572788, 0.0071887788362801075, 0.01261806394904852, 0.03344384580850601, -0.03944762423634529, 0.07135625183582306, 0.03935503587126732, -0.040619440376758575, -0.02801584079861641, -0.020624686032533646, 0.007447454147040844, -0.00879614520817995, -0.03616784140467644, -0.0462767519056797, -0.037193138152360916, -0.10578151792287827, -0.011113339103758335, 0.00795325729995966, -0.015943214297294617, -0.01864060014486313, 0.005457173567265272, 0.022625980898737907, -0.005400657653808594, 0.032236047089099884, -0.03595307469367981, 0.0372101366519928, -0.01370241492986679, -0.02530398592352867, -0.04402250051498413, -0.0006960102473385632, -0.004043065942823887, 0.016116149723529816, -0.012774007394909859, -0.054609183222055435, -0.004357656463980675, -0.033045560121536255, 0.012708565220236778, 0.023559633642435074, 0.015157091431319714, 0.02783382497727871 ]
[ -0.03876252472400665, -0.023772751912474632, -0.04361637681722641, -0.023143697530031204, 0.05160995200276375, -0.027114134281873703, 0.017364751547574997, -0.0062475320883095264, 0.03077526018023491, -0.03464655205607414, 0.05221938341856003, -0.021025197580456734, 0.02767491713166237, -0.004188951570540667, 0.04245404526591301, -0.000660870922729373, -0.01933339796960354, -0.08099870383739471, -0.021678678691387177, 0.059043508023023605, -0.07046917080879211, -0.05494680628180504, -0.0219277236610651, -0.027472982183098793, 0.014502357691526413, 0.04581169784069061, 0.042533207684755325, -0.048279158771038055, -0.03166109696030617, -0.18043050169944763, 0.009915410540997982, 0.021091511473059654, 0.05359772965312004, 0.002718460513278842, 0.014876121655106544, 0.018690001219511032, 0.07264496386051178, -0.007951769046485424, 0.03254576772451401, 0.0533917173743248, 0.016966350376605988, -0.006930706091225147, -0.027102608233690262, -0.00885506346821785, 0.04512700438499451, 0.01846412569284439, -0.03676946461200714, -0.0032085711136460304, -0.0599430613219738, 0.01997247152030468, -0.01845652237534523, -0.0106725562363863, 0.01207492221146822, 0.005634303670376539, 0.0016851017717272043, 0.05154595151543617, 0.04670765995979309, 0.015116354450583458, 0.021659383550286293, 0.02664627879858017, 0.0011879692319780588, -0.0008440359961241484, -0.1536000669002533, 0.0777881070971489, -0.009494311176240444, 0.013233297504484653, -0.03921813145279884, -0.00039846578147262335, -0.006308317184448242, 0.06636906415224075, 0.038220349699258804, 0.011494181118905544, -0.028016475960612297, 0.03171157091856003, 0.0012223655357956886, 0.012140890583395958, -0.010948527604341507, 0.020468518137931824, 0.029494110494852066, -0.027511930093169212, -0.05334356427192688, 0.045598920434713364, -0.01547230128198862, -0.014829801395535469, -0.015047820284962654, 0.013961651362478733, -0.0038908517453819513, 0.03594846650958061, -0.01667940802872181, 0.046444207429885864, 0.023822778835892677, 0.047413818538188934, 0.009175253100693226, 0.018294287845492363, -0.08276637643575668, -0.021527213975787163, 0.03247172757983208, 0.034079115837812424, 0.002320142462849617, 0.4083172678947449, -0.0022516497410833836, 0.029187144711613655, 0.03369731456041336, 0.0768110528588295, -0.020491749048233032, -0.04447602108120918, -0.006096826400607824, -0.08792795985937119, 0.04216736555099487, -0.03205869346857071, -0.01681063137948513, -0.03428446874022484, 0.05556754022836685, -0.09413652122020721, 0.023120524361729622, 0.01742575690150261, 0.07466868311166763, 0.029582969844341278, 0.003820737823843956, 0.0004764758050441742, 0.0037315550725907087, -0.0003125128278043121, 0.026152227073907852, 0.006778831128031015, 0.026812246069312096, 0.02642734721302986, 0.03079281561076641, 0.06455699354410172, 0.022949395701289177, 0.007659826427698135, 0.08079727739095688, 0.021480606868863106, -0.08328257501125336, 0.029885174706578255, -0.03729727864265442, -0.006405953783541918, 0.011286868713796139, -0.028508294373750687, -0.01622467115521431, 0.017170386388897896, 0.013529995456337929, -0.027347136288881302, 0.038371454924345016, 0.011685972101986408, -0.03129824623465538, 0.1703343391418457, -0.050642069429159164, -0.04314036667346954, -0.037393923848867416, -0.04841459542512894, 0.0022832725662738085, 0.03157677501440048, -0.017477424815297127, -0.06809442490339279, -0.020150458440184593, 0.026480941101908684, 0.10485554486513138, -0.01367389876395464, -0.06810814887285233, 0.006310912314802408, -0.0004494072636589408, -0.03243466466665268, -0.033235035836696625, 0.0889458954334259, 0.060568325221538544, -0.14642590284347534, 0.034452930092811584, 0.010684991255402565, 0.012759795412421227, -0.08210533112287521, 0.021997079253196716, -0.007296212483197451, -0.028823954984545708, 0.01148899644613266, 0.07132390886545181, -0.000995235051959753, -0.025660719722509384, 0.018113790079951286, 0.03094319812953472, 0.019405776634812355, -0.016964320093393326, -0.006518291309475899, -0.06707398593425751, 0.005989118944853544, -0.06177423894405365, -0.0395982563495636, -0.06939147412776947, 0.006102554965764284, -0.015895474702119827, -0.012635466642677784, -0.05185971036553383, -0.02415776439011097, -0.08704415708780289, 0.06061066687107086, -0.05569693446159363, -0.028999634087085724, -0.013776924461126328, -0.016263257712125778, -0.03062836267054081, -0.027867313474416733, -0.011556299403309822, 0.0026981746777892113, -0.031374942511320114, 0.015712473541498184, -0.034255243837833405, 0.037947338074445724, 0.04033888131380081, -0.03810055926442146, 0.08456388860940933, 0.018658941611647606, -0.02637144736945629, -0.01330670714378357, -0.024620499461889267, 0.005337510723620653, 0.011419081129133701, -0.005384484305977821, 0.016814913600683212, -0.019902991130948067, 0.010395258665084839, 0.046086668968200684, 0.0005762737127952278, 0.005613191984593868, 0.0060201180167496204, -0.3586457073688507, -0.027562428265810013, 0.006325569003820419, 0.004916238132864237, -0.02102084830403328, -0.03648948296904564, 0.03379316255450249, -0.01987355388700962, 0.012115401215851307, 0.060187533497810364, 0.0733574777841568, 0.024309346452355385, -0.022414183244109154, -0.04221510514616966, -0.004479401279240847, 0.05478282272815704, -0.031207898631691933, 0.0089036263525486, -0.012118970975279808, 0.009732541628181934, -0.007892264984548092, -0.0384298600256443, -0.0051078698597848415, -0.038890209048986435, -0.007344399578869343, -0.014110912568867207, 0.13132794201374054, 0.03776467964053154, -0.025670375674962997, -0.052914269268512726, 0.026040637865662575, 0.008810805156826973, -0.029860299080610275, -0.06158960238099098, 0.024525905027985573, -0.007079682778567076, 0.01100784819573164, -0.0026839973870664835, 0.00223745871335268, -0.02055940218269825, -0.06553400307893753, -0.0023665083572268486, -0.014525683596730232, -0.04522816464304924, -0.06119803339242935, 0.016504818573594093, -0.0008142856531776488, -0.031182782724499702, -0.012557320296764374, 0.07704733312129974, 0.03420276567339897, -0.021452613174915314, 0.02129073068499565, 0.042657651007175446, 0.03180661424994469, -0.03919133543968201, -0.07120335847139359, -0.019368337467312813, -0.014395603910088539, 0.03339347615838051, 0.003114344784989953, 0.03400106728076935, 0.008700490929186344, -0.08160983771085739, 0.010625261813402176, -0.01898670569062233, -0.04055318608880043, -0.025916969403624535, 0.02765585482120514, -0.03191214054822922, -0.030441317707300186, 0.08427219837903976, -0.012711111456155777, 0.021811120212078094, 0.032587986439466476, 0.005881402641534805, -0.05119844526052475, -0.018905047327280045, 0.026384728029370308, 0.011625866405665874, 0.04286019504070282, -0.05323723331093788, 0.05956132709980011, -0.022130031138658524, -0.005808299407362938, 0.04459487646818161, 0.021299399435520172, 0.0023363749496638775, 0.082875557243824, 0.010327912867069244, -0.018349405378103256, -0.01015400793403387, -0.028863677754998207, -0.035860516130924225, 0.020607201382517815, -0.02102547325193882, -0.2744390368461609, 0.04857458546757698, 0.011213423684239388, 0.049573298543691635, 0.03954223543405533, 0.009702643379569054, 0.01838069036602974, -0.025260284543037415, -0.023211654275655746, -0.018797023221850395, 0.05019375681877136, 0.038984909653663635, 0.006284814327955246, -0.016451658681035042, 0.017547359690070152, 0.03752613067626953, -0.011159097775816917, -0.0015659916680306196, -0.022496195510029793, 0.0032483956310898066, 0.05222557485103607, -0.01726902462542057, 0.16145801544189453, 0.01544788759201765, 0.02640352211892605, 0.04018477350473404, -0.02734166570007801, -0.007617451250553131, 0.04200016334652901, -0.046981241554021835, -0.03267577290534973, -0.011536108329892159, 0.02733207307755947, 0.012322856113314629, 0.020748676732182503, -0.023136181756854057, -0.0045924498699605465, 0.008801515214145184, 0.03586467728018761, -0.024824723601341248, 0.012463687919080257, -0.006886844523251057, -0.02866898663341999, 0.026046300306916237, 0.07079830765724182, 0.0027123671025037766, 0.020120032131671906, -0.03624192625284195, -0.023967700079083443, -0.008052692748606205, -0.0015359511598944664, -0.05761662498116493, -0.037768810987472534, 0.008264178410172462, 0.02238764986395836, 0.08355134725570679, 0.015173121355473995, -0.015921195968985558, 0.045405466109514236, 0.021224316209554672, -0.054555099457502365, -0.0077912514097988605, 0.07694707810878754, -0.02471051551401615, -0.0027877248357981443 ]
[ -0.006841303780674934, 0.04578108713030815, 0.030056413263082504, 0.016056565567851067, -0.01878446526825428, 0.0008469618624076247, -0.012071474455296993, 0.010782786644995213, -0.028613237664103508, -0.00850394181907177, -0.02567385882139206, 0.0070149339735507965, 0.028546227142214775, 0.0027721913065761328, 0.026729103177785873, -0.0034636452328413725, 0.01421455666422844, -0.020217476412653923, 0.0485413558781147, -0.013995151035487652, -0.053015124052762985, 0.000377924443455413, 0.020582737401127815, -0.007346180733293295, -0.03255967050790787, 0.02181137166917324, -0.022517777979373932, 0.026839759200811386, 0.02711968868970871, -0.0564778596162796, -0.00816600862890482, -0.025167016312479973, -0.009492989629507065, 0.008839104324579239, -0.023891467601060867, 0.005385028198361397, -0.011783245019614697, 0.017630333080887794, 0.023018568754196167, 0.06849140673875809, 0.0032818985637277365, -0.002591915661469102, -0.02814309485256672, 0.02091606706380844, 0.02991025522351265, 0.004256974905729294, -0.05358637869358063, 0.03189365193247795, -0.015704141929745674, -0.010277839377522469, -0.011271252296864986, -0.01901385560631752, -0.013147817924618721, -0.014359506778419018, 0.03561309352517128, 0.0040808324702084064, -0.07384296506643295, -0.04201038181781769, -0.020908353850245476, -0.016506414860486984, 0.005407536402344704, 0.008487086743116379, -0.03805005922913551, 0.005782040301710367, -0.005295127630233765, -0.008403841406106949, -0.0051127588376402855, 0.015794577077031136, 0.029451703652739525, 0.024459371343255043, -0.021137792617082596, 0.0472385436296463, -0.1121593788266182, -0.015340190380811691, -0.010642986744642258, 0.032271645963191986, 0.02004512958228588, -0.000665285624563694, -0.0051565952599048615, -0.0443626344203949, -0.04081415385007858, -0.0006083716289140284, 0.00501293083652854, 0.013639542274177074, -0.025507763028144836, -0.042194925248622894, 0.0029800417833030224, 0.0013668849132955074, -0.00999823771417141, 0.008014603517949581, -0.05426209792494774, 0.02203589677810669, 0.0004093795141670853, 0.0049020713195204735, -0.1029864251613617, 0.03898821026086807, 0.029656242579221725, 0.03447948768734932, 0.011776604689657688, 0.7957720160484314, 0.002027831505984068, 0.0029849547427147627, -0.008692117407917976, 0.034925349056720734, -0.04293691739439964, -0.01020934246480465, -0.015309521928429604, 0.013460193760693073, -0.0012573902495205402, 0.008536871522665024, -0.013648278079926968, 0.024260489270091057, 0.024025656282901764, 0.019481142982840538, 0.020862961187958717, 0.07116740196943283, 0.04085920751094818, 0.015617000870406628, -0.007843950763344765, 0.029900632798671722, 0.002549598691985011, 0.026438768953084946, -0.020965447649359703, -0.0060041602700948715, -0.021339822560548782, -0.18593761324882507, 0.02791263349354267, -7.485462068011923e-33, 0.07508427649736404, -0.02168988808989525, 0.029887856915593147, -0.03885163739323616, 0.01882089488208294, 0.0289742611348629, -0.044153016060590744, -0.02848341129720211, -0.007880786433815956, -0.015463748015463352, -0.0024425259325653315, 0.004635176155716181, 0.04071486368775368, -0.0430808886885643, 0.013757443986833096, 0.00612101424485445, 0.0011093575740233064, 0.04491359740495682, -0.03676436468958855, -0.017243215814232826, -0.01845010370016098, 0.020319413393735886, -0.007681176997721195, 0.05462121590971947, -0.00807101372629404, 0.0765313059091568, -0.015303121879696846, 0.020734325051307678, -0.010987247340381145, -0.04980046674609184, -0.046142466366291046, 0.008938615210354328, -0.009441590867936611, -0.0032568590249866247, -0.0036016437225043774, -0.052294034510850906, -0.02517072483897209, -0.01060854084789753, -0.020278191193938255, -0.07148846983909607, -0.03936241567134857, 0.004959404468536377, -0.008629006333649158, -0.027705969288945198, -0.06269845366477966, 0.001086615608073771, -0.012851941399276257, -0.0027094720862805843, -0.023402439430356026, -0.015151969157159328, -0.01686117611825466, 0.00600405503064394, -0.012021384201943874, 0.028277335688471794, -0.043576378375291824, 0.04124346375465393, 0.0346587672829628, 0.04206518456339836, -0.02660338394343853, 0.021014418452978134, 0.06146867200732231, -0.020843328908085823, 0.014669704250991344, 0.06927564740180969, 0.02493387646973133, -0.008627002127468586, -0.00984097644686699, -0.026147445663809776, 0.025705594569444656, -0.005389588885009289, -0.04848083481192589, 0.10156979411840439, -0.02321627549827099, -0.0075434413738548756, 0.029981203377246857, -0.03753488510847092, 0.02158867008984089, 0.001534593291580677, -0.0011199504369869828, 0.060542795807123184, -0.021912652999162674, -0.028456302359700203, -0.00603799894452095, -0.016890298575162888, -0.004474116023629904, -0.04578854888677597, 0.044053975492715836, 0.025792857632040977, 0.010281686671078205, 0.0035562370903789997, 0.016605401411652565, -0.01728503592312336, 0.04345040023326874, -0.018361464142799377, -0.025777922943234444, 7.26206671347784e-33, 0.011538157239556313, 0.006766441278159618, 0.04196403920650482, -0.021912168711423874, 0.06549853086471558, 0.003431573510169983, 0.03221801668405533, 0.0049104536883533, -0.04307142272591591, 0.05324247106909752, -0.0079784682020545, -0.0030014829244464636, 0.023506350815296173, 0.02964380756020546, 0.038543377071619034, 0.0026023725513368845, 0.027183156460523605, -0.01795717515051365, -0.003258898388594389, 0.029414908960461617, -0.015081031247973442, -0.010817620903253555, -0.023806262761354446, -0.008889107033610344, 0.03974786400794983, 0.0362359881401062, 0.0021059575956314802, -0.023320414125919342, -0.012449140660464764, -0.0036877566017210484, -0.010599717497825623, 0.004708320368081331, -0.0267417524009943, -0.03112943097949028, 0.029984870925545692, 0.014852708205580711, 0.0014083125861361623, -0.00940470676869154, 0.01598074659705162, -0.011031094938516617, 0.023677559569478035, 0.029394831508398056, -0.038357656449079514, 0.047139573842287064, 0.044654279947280884, 0.030085178092122078, -0.017543822526931763, 0.015813026577234268, -0.02928033098578453, 0.026277223601937294, -0.030990244820713997, 0.031743235886096954, -0.01570778153836727, 0.044933419674634933, 0.022556236013770103, -0.06132670119404793, -0.0005153024103492498, 0.020064502954483032, 0.002257788321003318, -0.014112325385212898, -0.008210793137550354, 0.0054391976445913315, -0.066916324198246, 0.049086250364780426, -0.02823662757873535, -0.02559410221874714, -0.03639836981892586, -0.00751923955976963, -0.002444655867293477, 0.01951914280653, 0.007225698791444302, -0.025003382936120033, -0.013098843395709991, 0.005919647868722677, 0.04615404084324837, -0.027750717476010323, -0.048881206661462784, 0.009496507234871387, -0.01734788715839386, 0.023285215720534325, 0.01118730753660202, -0.007337878458201885, 0.040657367557287216, 0.029771575704216957, -0.002551798243075609, 0.013403077609837055, -0.017907816916704178, 0.0350467711687088, -0.015219292603433132, 0.00733884796500206, 0.0014188849600031972, -0.05731285363435745, -0.03261571004986763, 0.05570667237043381, -0.023876000195741653, -1.2593584841624761e-8, -0.05498845875263214, 0.027084769681096077, -0.012023291550576687, -0.02677985094487667, 0.034941233694553375, 0.00007697594264755026, 0.013602201826870441, -0.006709790788590908, -0.01598448120057583, 0.030770180746912956, 0.03983950614929199, -0.022124551236629486, 0.052226852625608444, -0.01125360932201147, -0.0017471389146521688, -0.05757507309317589, -0.010627907700836658, -0.020045200362801552, 0.03272177651524544, 0.005882865283638239, 0.012747573666274548, 0.021631058305501938, -0.030163366347551346, -0.011199104599654675, 0.0034201238304376602, -0.016917133703827858, 0.026450706645846367, -0.06979797780513763, -0.013425716198980808, -0.03959200531244278, -0.05072773993015289, 0.007300414144992828, 0.017668910324573517, 0.024447819218039513, -0.040010035037994385, -0.040961913764476776, 0.03432327136397362, 0.028600137680768967, 0.020963020622730255, 0.03498686105012894, -0.004606076516211033, -0.002985466504469514, -0.026901932433247566, -0.020718000829219818, -0.011663701385259628, 0.026766996830701828, 0.0025841654278337955, -0.004272333346307278, 0.002284764079377055, -0.051657602190971375, -0.002524531912058592, -0.04106644541025162, 0.04724681004881859, -0.003290218999609351, 0.04258587956428528, 0.006714838556945324, -0.013050184585154057, -0.005576142575591803, -0.011490174569189548, -0.02372155338525772, -0.011226831935346127, -0.0016061464557424188, 0.006495231296867132, -0.048196014016866684 ]
r-ggplot-displaying-multiple-charts-with-a-for-loop
https://markhneedham.com/blog/2015/05/14/r-ggplot-displaying-multiple-charts-with-a-for-loop
false
2015-02-20 22:42:59
Python/scikit-learn: Detecting which sentences in a transcript contain a speaker
[ "python", "scikit-learn" ]
[ "Python" ]
Over the past couple of months I've been playing around with https://github.com/mneedham/neo4j-himym/blob/master/data/import/speakers.csv[How I met your mother transcripts] and the most recent thing I've been working on is how to extract the speaker for a particular sentence. This initially seemed like a really simple problem as most of the initial sentences I looked at weere structured like this: [source,text] ---- <speaker>: <sentence> ---- If there were all in that format then we could write a simple regular expression and then move on but unfortunately they aren't. We could probably write a more complex regex to pull out the speaker but I thought it'd be fun to see if I could train a model to work it out instead. The approach I've taken is derived from http://www.nltk.org/book/ch06.html[an example in the NLTK book]. The first problem with this approach was that I didn't have any labelled data to work with so I wrote a little web application that made it easy for me to train chunks of sentences at a time: image::{{<siteurl>}}/uploads/2015/02/2015-02-20_00-44-38.png[2015 02 20 00 44 38,600] I stored the https://github.com/mneedham/neo4j-himym/blob/master/data/import/trained_sentences.json[trained words in a JSON file]. Each entry looks like this: [source,python] ---- import json with open("data/import/trained_sentences.json", "r") as json_file: json_data = json.load(json_file) >>> json_data[0] {u'words': [{u'word': u'You', u'speaker': False}, {u'word': u'ca', u'speaker': False}, {u'word': u"n't", u'speaker': False}, {u'word': u'be', u'speaker': False}, {u'word': u'friends', u'speaker': False}, {u'word': u'with', u'speaker': False}, {u'word': u'Robin', u'speaker': False}, {u'word': u'.', u'speaker': False}]} >>> json_data[1] {u'words': [{u'word': u'Robin', u'speaker': True}, {u'word': u':', u'speaker': False}, {u'word': u'Well', u'speaker': False}, {u'word': u'...', u'speaker': False}, {u'word': u'it', u'speaker': False}, {u'word': u"'s", u'speaker': False}, {u'word': u'a', u'speaker': False}, {u'word': u'bit', u'speaker': False}, {u'word': u'early', u'speaker': False}, {u'word': u'...', u'speaker': False}, {u'word': u'but', u'speaker': False}, {u'word': u'...', u'speaker': False}, {u'word': u'of', u'speaker': False}, {u'word': u'course', u'speaker': False}, {u'word': u',', u'speaker': False}, {u'word': u'I', u'speaker': False}, {u'word': u'might', u'speaker': False}, {u'word': u'consider', u'speaker': False}, {u'word': u'...', u'speaker': False}, {u'word': u'I', u'speaker': False}, {u'word': u'moved', u'speaker': False}, {u'word': u'here', u'speaker': False}, {u'word': u',', u'speaker': False}, {u'word': u'let', u'speaker': False}, {u'word': u'me', u'speaker': False}, {u'word': u'think', u'speaker': False}, {u'word': u'.', u'speaker': False}]} ---- Each word in the sentence is represented by a JSON object which also indicates if that word was a speaker in the sentence. == Feature selection Now that I've got some trained data to work with I needed to choose which features I'd use to train my model. One of the most obvious indicators that a word is the speaker in the sentence is that the next word is ':' so 'next word' can be a feature. I also went with 'previous word' and the word itself for my first cut. This is the function I wrote to convert a word in a sentence into a set of features: [source,python] ---- def pos_features(sentence, i): features = {} features["word"] = sentence[i] if i == 0: features["prev-word"] = "<START>" else: features["prev-word"] = sentence[i-1] if i == len(sentence) - 1: features["next-word"] = "<END>" else: features["next-word"] = sentence[i+1] return features ---- Let's try a couple of examples: [source,python] ---- import nltk >>> pos_features(nltk.word_tokenize("Robin: Hi Ted, how are you?"), 0) {'prev-word': '<START>', 'word': 'Robin', 'next-word': ':'} >>> pos_features(nltk.word_tokenize("Robin: Hi Ted, how are you?"), 5) {'prev-word': ',', 'word': 'how', 'next-word': 'are'} ---- Now let's run that function over our full set of labelled data: [source,python] ---- with open("data/import/trained_sentences.json", "r") as json_file: json_data = json.load(json_file) tagged_sents = [] for sentence in json_data: tagged_sents.append([(word["word"], word["speaker"]) for word in sentence["words"]]) featuresets = [] for tagged_sent in tagged_sents: untagged_sent = nltk.tag.untag(tagged_sent) for i, (word, tag) in enumerate(tagged_sent): featuresets.append( (pos_features(untagged_sent, i), tag) ) ---- Here's a sample of the contents of +++<cite>+++featuresets+++</cite>+++: [source,python] ---- >>> featuresets[:5] [({'prev-word': '<START>', 'word': u'You', 'next-word': u'ca'}, False), ({'prev-word': u'You', 'word': u'ca', 'next-word': u"n't"}, False), ({'prev-word': u'ca', 'word': u"n't", 'next-word': u'be'}, False), ({'prev-word': u"n't", 'word': u'be', 'next-word': u'friends'}, False), ({'prev-word': u'be', 'word': u'friends', 'next-word': u'with'}, False)] ---- It's nearly time to train our model, but first we need to split out labelled data into training and test sets so we can see how well our model performs on data it hasn't seen before. sci-kit learn has http://stackoverflow.com/questions/3674409/numpy-how-to-split-partition-a-dataset-array-into-training-and-test-datasets[a function that does this for us]: [source,python] ---- from sklearn.cross_validation import train_test_split train_data,test_data = train_test_split(featuresets, test_size=0.20, train_size=0.80) >>> len(train_data) 9480 >>> len(test_data) 2370 ---- Now let's train our model. I decided to try out Naive Bayes and Decision tree models to see how they got on: [source,python] ---- >>> classifier = nltk.NaiveBayesClassifier.train(train_data) >>> print nltk.classify.accuracy(classifier, test_data) 0.977215189873 >>> classifier = nltk.DecisionTreeClassifier.train(train_data) >>> print nltk.classify.accuracy(classifier, test_data) 0.997046413502 ---- It looks like both are doing a good job here with the decision tree doing slightly better. One thing to keep in mind is that most of the sentences we've trained at in the form '+++<speaker>+++:+++<sentence>+++' and we can get those correct with a simple regex so we should expect the accuracy to be very high. </p> If we explore the internals of the decision tree we'll see that it's massively overfitting which makes sense given our small training data set and the repetitiveness of the data: ~~~python >>> print(classifier.pseudocode(depth=2)) if next-word == u'!': return False if next-word == u'$': return False \... if next-word == u"'s": return False if next-word == u"'ve": return False if next-word == u'(': if word == u'!': return False \... if next-word == u'*': return False if next-word == u'*****': return False if next-word == u',': if word == u"''": return False \... if next-word == u'--': return False if next-word == u'.': return False if next-word == u'\...': \... if word == u'who': return False if word == u'you': return False if next-word == u'/i': return False if next-word == u'1': return True \... if next-word == u':': if prev-word == u"'s": return True if prev-word == u',': return False if prev-word == u'\...': return False if prev-word == u'2030': return True if prev-word == '+++<START>+++': return True if prev-word == u'?': return False \... if next-word == u'\u266a\u266a': return False ~~~ One update I may make to the features is to include the part of speech of the word rather than its actual value to see if that makes the model a bit more general. Another option is to train a bunch of decision trees against a subset of the data and build an ensemble/random forest of those trees. Once I've got a working 'speaker detector' I want to then go and *work out who the likely speaker is* for the sentences which don't contain a speaker. The plan is to calculate the word distributions of the speakers from sentences I do have and then calculate the probability that they spoke the unlabelled sentences. This might not work perfectly as there could be new characters in those episodes but hopefully we can come up with something decent. The https://github.com/mneedham/neo4j-himym/blob/master/scripts/detect_speaker.py[full code for this example is on github] if you want to have a play with it. Any suggestions for improvements are always welcome in the comments.+++</START>++++++</sentence>++++++</speaker>+++
null
null
[ 0.00033801497193053365, -0.023071439936757088, -0.01113141980022192, 0.037146709859371185, 0.0718609169125557, 0.02856370434165001, 0.033154889941215515, 0.048337455838918686, 0.005554255563765764, 0.0010126519482582808, -0.005006884224712849, -0.0031575732864439487, -0.0675472766160965, -0.0070890868082642555, -0.009903253987431526, 0.03725842759013176, 0.057900071144104004, 0.009389173239469528, 0.007341809570789337, -0.001081397058442235, 0.005150960758328438, 0.053400084376335144, 0.02855871059000492, 0.0356723815202713, 0.029098546132445335, 0.0008514276123605669, -0.004013578873127699, 0.001679923734627664, -0.04068337753415108, 0.012705685570836067, 0.02791828289628029, -0.04635222256183624, 0.024316685274243355, -0.01351485587656498, 0.03429149463772774, 0.016641438007354736, -0.061298660933971405, 0.015509217046201229, 0.019506286829710007, 0.00224971491843462, -0.059663351625204086, 0.03597479313611984, -0.018125183880329132, 0.016672173514962196, -0.05277290195226669, 0.016716310754418373, -0.06177675724029541, 0.04469400644302368, 0.0010152009781450033, -0.016969017684459686, -0.06316870450973511, 0.03320382535457611, 0.005560012999922037, -0.0048699090257287025, 0.009084979072213173, 0.05065087229013443, 0.041039302945137024, -0.07289467006921768, 0.030023111030459404, -0.0021724815014749765, -0.03645807132124901, -0.02635209634900093, 0.002651720540598035, 0.017033562064170837, -0.005239986348897219, -0.03197125717997551, -0.0012854806846007705, 0.055558640509843826, -0.06441213190555573, -0.016044415533542633, -0.006759367883205414, 0.014479312114417553, -0.01110003050416708, -0.0032150198239833117, 0.014819595031440258, -0.06132957711815834, 0.01356242224574089, 0.04382792115211487, 0.03379698470234871, 0.05405862256884575, -0.03773451969027519, 0.026899825781583786, -0.010286014527082443, 0.022748179733753204, 0.0043820408172905445, -0.036585286259651184, -0.050090231001377106, -0.005987766198813915, -0.06353238970041275, 0.022325359284877777, 0.019960710778832436, -0.04767388477921486, -0.0009639289928600192, 0.01759370043873787, -0.01467475201934576, 0.023205511271953583, -0.005727077834308147, 0.022912418469786644, 0.003958977293223143, -0.00274149258621037, -0.06403893977403641, -0.025149689987301826, 0.017696434631943703, -0.005521012470126152, -0.0652272030711174, -0.004485236015170813, -0.009040159173309803, 0.0014187986962497234, 0.0073076169937849045, -0.029966600239276886, 0.001865612342953682, -0.014402023516595364, -0.004523329436779022, 0.005194442346692085, -0.09183348715305328, 0.06073097139596939, 0.021790247410535812, -0.012137308716773987, -0.03301660716533661, 0.02001299150288105, 0.039355140179395676, 0.007609301712363958, 0.011098561808466911, 0.06105737015604973, -0.015403563156723976, 0.022016441449522972, 0.002535188803449273, 0.05859110876917839, -0.013661365956068039, -0.05873897299170494, -0.03994376212358475, 0.04744284227490425, 0.014426186680793762, 0.051337894052267075, -0.0011886501451954246, -0.021388323977589607, -0.016899608075618744, 0.0019255668157711625, 0.06556323915719986, 0.04160358011722565, 0.010001796297729015, -0.015997987240552902, 0.02661919593811035, 0.009140911512076855, 0.03900071233510971, 0.007726327050477266, -0.04656492918729782, -0.036208778619766235, -0.033929117023944855, 0.029204286634922028, 0.016495056450366974, 0.014306344091892242, 0.0632951483130455, -0.016111882403492928, 0.006506713107228279, 0.10279344022274017, 0.014444796368479729, 0.04337884485721588, -0.005751033313572407, 0.01630740612745285, 0.04498841241002083, 0.06101826950907707, -0.008580912835896015, 0.03662531450390816, -0.02404082752764225, -0.034150782972574234, -0.004504535812884569, 0.04651464521884918, -0.038956619799137115, 0.021420331671833992, -0.022182470187544823, -0.05301239714026451, 0.07078824937343597, -0.03395562618970871, -0.009345217607915401, 0.0013941433280706406, 0.033397261053323746, 0.020025862380862236, 0.014833861030638218, 0.013003365136682987, -0.07815676927566528, 0.06923892349004745, 0.031211744993925095, 0.0032885847613215446, 0.054625503718853, 0.008852167055010796, 0.07329735904932022, 0.03367091715335846, -0.007115533109754324, 0.030864723026752472, -0.090032659471035, -0.06876624375581741, -0.020049290731549263, 0.00103950675111264, 0.047003746032714844, -0.03331320360302925, 0.016185497865080833, 0.04965464025735855, 0.027693593874573708, 0.049582768231630325, 0.03471525385975838, -0.035827554762363434, 0.015363814309239388, -0.023612666875123978, -0.052537523210048676, 0.03774506226181984, 0.03682961314916611, -0.06374166905879974, -0.007377881556749344, 0.00728302076458931, -0.03208639845252037, -0.011351512745022774, 0.06189057230949402, -0.04280979558825493, 0.02143120765686035, 0.02477814257144928, 0.023377500474452972, -0.029006443917751312, 0.007296267431229353, -0.041462402790784836, 0.039888057857751846, 0.009387846104800701, -0.02131597325205803, -0.042780131101608276, -0.021036775782704353, 0.11859449744224548, 0.05058370903134346, -0.013874155469238758, -0.07259901612997055, 0.02501583658158779, 0.0014905136777088046, -0.012296292930841446, 0.002743018325418234, 0.015425477176904678, -0.015414424240589142, -0.0036675878800451756, -0.051911965012550354, -0.037802137434482574, -0.0050577325746417046, -0.021402012556791306, 0.0015116669237613678, 0.05089544504880905, -0.0334450788795948, 0.04140835255384445, 0.009010589681565762, 0.00755243981257081, 0.0038911292795091867, -0.03917207568883896, -0.03576276823878288, 0.01954255811870098, 0.01896936446428299, -0.0034648538567125797, 0.028098270297050476, -0.0165206640958786, -0.004609233234077692, -0.0016009026439860463, -0.05340981483459473, 0.046811431646347046, 0.03859217092394829, 0.05706831067800522, -0.0175273846834898, 0.03648824989795685, -0.032240062952041626, 0.00851945299655199, -0.02124704234302044, -0.03899720683693886, -0.031527236104011536, -0.024721434339880943, 0.011459347791969776, 0.001744844252243638, 0.03253931179642677, -0.015463512390851974, -0.006819601636379957, 0.01894238218665123, 0.02338629774749279, -0.010204236954450607, 0.04663855582475662, -0.034631215035915375, 0.013773180544376373, -0.03667943924665451, -0.05329053848981857, 0.047107793390750885, -0.06349679827690125, -0.04604412987828255, -0.011507009156048298, -0.0771065428853035, 0.015931887552142143, -0.034841544926166534, -0.02422262169420719, -0.0028359019197523594, -0.010054497048258781, 0.057307276874780655, 0.027706319466233253, -0.017736736685037613, 0.060503777116537094, 0.026881029829382896, 0.038354501128196716, 0.02688133716583252, 0.0009334167698398232, 0.06974712014198303, -0.01597248576581478, 0.03314422816038132, 0.04254736378788948, -0.012933589518070221, -0.003775492077693343, -0.03130010887980461, 0.0009625199600122869, -0.04478029906749725, -0.28556719422340393, 0.057105161249637604, -0.03202665597200394, -0.05485127866268158, 0.055781956762075424, -0.033462781459093094, 0.01378578506410122, -0.02339116670191288, -0.02158697135746479, 0.02446644939482212, -0.024242181330919266, -0.027926025912165642, -0.008844186551868916, 0.029939008876681328, 0.012113397940993309, 0.00824420340359211, -0.032551806420087814, -0.027199141681194305, 0.011257663369178772, 0.044113870710134506, 0.003990636672824621, -0.0278920941054821, -0.013122678734362125, 0.06178069859743118, -0.006734113674610853, 0.06052139401435852, -0.07960350811481476, 0.013220535591244698, -0.04033896327018738, -0.03080661967396736, 0.012390811927616596, -0.03526562452316284, 0.02720756083726883, -0.012901557609438896, -0.024912051856517792, -0.0002050380571745336, 0.04990057647228241, 0.01819096878170967, 0.0055467234924435616, 0.023538125678896904, -0.023069391027092934, -0.03837122768163681, -0.02293454110622406, -0.017990417778491974, 0.08374477922916412, 0.002592692617326975, -0.061398040503263474, -0.02044331096112728, -0.04330857843160629, 0.07651031762361526, -0.028286388143897057, -0.023944009095430374, -0.006756569258868694, 0.02289261482656002, 0.003767764661461115, -0.03177336975932121, 0.007009074557572603, 0.0016847631195560098, -0.04446788504719734, -0.029194606468081474, -0.00926392711699009, -0.025958508253097534, 0.002831860911101103, -0.054181817919015884, -0.023504294455051422, -0.06743599474430084, -0.06843186914920807, -0.026321087032556534, 0.06766286492347717, 0.02769516594707966, -0.04229138419032097, 0.03507914021611214, -0.01390657015144825, -0.10553460568189621, -0.030585087835788727, -0.018844880163669586, -0.00977067369967699, 0.005572617519646883, -0.004512875806540251, 0.0561353899538517, -0.07435251027345657, -0.048953235149383545, 0.012541856616735458, -0.00029060320230200887, 0.003446148242801428, 0.003504447638988495, 0.025787385180592537, -0.014881149865686893, -0.02631080150604248, -0.022479351609945297, 0.03981245309114456, -0.04398559778928757, -0.046050019562244415, -0.004114202689379454, 0.024154556915163994, 0.027631796896457672, -0.030988117679953575, -0.0035791725385934114, 0.02197730354964733, 0.03668493032455444, 0.02873760648071766, -0.03259715810418129, -0.005235921125859022, -0.01730387844145298, 0.012900109402835369, -0.010769308544695377, -0.07262888550758362, 0.004375355318188667, 0.010336650535464287, 0.02654292620718479, -0.013387148268520832, -0.00934752356261015, 0.01534387655556202, -0.02380804717540741, -0.010303889401257038, 0.007507412228733301, 0.00911063514649868, 0.011632940731942654, 0.048544492572546005, -0.022750871255993843, -0.05122729763388634, 0.0106908418238163, 0.016132861375808716, -0.01824149675667286, -0.05263518542051315, -0.061827484518289566, 0.005325541365891695, -0.0034181070514023304, -0.025169653818011284, -0.019305234774947166, -0.029479701071977615, 0.028700198978185654, 0.019311171025037766, -0.01878008060157299, 0.05858326330780983, -0.017473040148615837, -0.029797330498695374, -0.027730567380785942, 0.005467692390084267, 0.012652415782213211, -0.009818046353757381, -0.025856895372271538, -0.01148430909961462, 0.04679842293262482, 0.042008448392152786, 0.014793286100029945, 0.008279349654912949, -0.0033238548785448074, 0.022717855870723724, -0.029877062886953354, -0.010302436538040638, -0.04549061879515648, 0.007743116933852434, -0.037565238773822784, -0.007864275015890598, -0.014501895755529404, 0.03206382691860199, -0.001518372562713921, 0.007347223814576864, -0.04076194390654564, 0.0386848971247673, -0.05866755172610283, 0.022550666704773903, -0.0036672509741038084, 0.0040038833394646645, 0.0382714681327343, -0.020246010273694992, 0.02296365797519684, -0.026790356263518333, 0.018796218559145927, 0.005446522496640682, 0.030846187844872475, -0.04308772459626198, 0.016481103375554085, 0.004128503613173962, -0.00006716932693962008, 0.03839405998587608, 0.03301652520895004, 0.020967330783605576, 0.03440426290035248, 0.007687646895647049, -0.04160158336162567, 0.008283646777272224, 0.02401239424943924, 0.07002364844083786, 0.05972498282790184, -0.012439659796655178, -0.009571006521582603, -0.05096748471260071, -0.012307467870414257, -0.034131985157728195, -0.0020089540630578995, -0.022422267124056816, -0.017402425408363342, -0.028405316174030304, -0.06816545873880386, 0.015204512514173985, -0.011772607453167439, 0.008309926837682724, 0.0447523407638073, -0.006335458252578974, -0.014536143280565739, -0.03511732071638107, 0.03952467814087868, 0.07310495525598526, -0.06547895818948746, -0.050819430500268936, -0.021098952740430832, 0.024001164361834526, 0.008201506920158863, 0.031332362443208694, -0.06842146813869476, -0.03661952540278435, -0.02603907324373722, 0.008409584872424603, -0.02687819115817547, -0.06284897774457932, -0.022608503699302673, 0.028026677668094635, -0.020672565326094627, -0.005159263499081135, -0.017947200685739517, -0.010048480704426765, 0.0035060993395745754, -0.0014873081818223, 0.0327380895614624, -0.024277858436107635, -0.007598144467920065, -0.00017616956029087305, -0.017740970477461815, 0.012163685634732246, -0.04992856830358505, 0.04665949568152428, 0.03118491731584072, -0.00527964485809207, -0.02741587907075882, -0.045376088470220566, 0.024281257763504982, 0.005948867183178663, 0.0586269348859787, 0.046416379511356354, -0.0010833943961188197, -0.029241103678941727, 0.023632310330867767, -0.031057890504598618, 0.018465286120772362, 0.026335561648011208, -0.020918117836117744, 0.008403733372688293, 0.04261796176433563, 0.03219028189778328, 0.032106008380651474, -0.0182841457426548, -0.04633866995573044, 0.051983337849378586, -0.042889632284641266, -0.06108800321817398, -0.016960958018898964, -0.02980922721326351, 0.017296815291047096, 0.023932041600346565, 0.019743526354432106, -0.05187963321805, 0.05096082389354706, 0.056237105280160904, 0.04306010156869888, 0.008944976143538952, 0.027499668300151825, 0.04798063635826111, -0.013551125302910805, -0.005140105728060007, -0.0796237587928772, -0.023486150428652763, 0.06786876916885376, 0.007169615477323532, 0.020233936607837677, -0.005100663751363754, -0.02592892199754715, 0.026676969602704048, -0.04299456626176834, -0.038669101893901825, 0.050649870187044144, -0.03696589171886444, 0.0004258501576259732, -0.0033416443038731813, -0.05545959621667862, 0.016810832545161247, 0.03233390673995018, -0.034886229783296585, -0.031036917120218277, -0.03528909012675285, 0.06417030841112137, -0.02539929188787937, 0.043058738112449646, -0.0026566144078969955, -0.0165207851678133, 0.06031419709324837, 0.020599307492375374, 0.06094622611999512, 0.025521360337734222, -0.03106173314154148, 0.015737254172563553, 0.020546594634652138, -0.01479795016348362, -0.000024416624000878073, 0.05016613006591797, -0.02294331230223179, -0.06092844903469086, 0.06730184704065323, 0.02120942994952202, -0.03938369080424309, -0.02444811910390854, 0.08679942041635513, 0.008622915484011173, -0.027604294940829277, -0.058307282626628876, 0.039263591170310974, -0.02819785848259926, -0.017957840114831924, -0.03621768206357956, 0.011168829165399075, -0.051035325974226, 0.03742862120270729, -0.007373838685452938, 0.002186901867389679, 0.0646926686167717, -0.022076193243265152, 0.010445677675306797, 0.01022424641996622, 0.06662020087242126, 0.09788564592599869, 0.044295784085989, 0.006690867245197296, 0.06729241460561752, -0.006740118842571974, -0.0455845482647419, -0.017604388296604156, -0.012750465422868729, -0.00028708181343972683, -0.0026560062542557716, -0.01884583570063114, 0.0485641174018383, -0.01885029673576355, 0.07164385914802551, -0.02754298783838749, -0.023982301354408264, -0.0017505030846223235, 0.01988072507083416, 0.035681240260601044, 0.02160683460533619, 0.018207406625151634, 0.028429990634322166, -0.034775737673044205, -0.0457141138613224, 0.04498565196990967, 0.004579109139740467, -0.038186851888895035, 0.03666416183114052, -0.02723556011915207, 0.008131317794322968, 0.002070895629003644, 0.06337393075227737, 0.08151254057884216, -0.02102195844054222, 0.0029572187922894955, -0.005415800958871841, 0.008719153702259064, -0.000005721080015064217, 0.04725977033376694, -0.01790912263095379, -0.033141788095235825, -0.018066637217998505, -0.05340391397476196, -0.011878713965415955, -0.03389880061149597, -0.020165519788861275, 0.025412827730178833, -0.013715071603655815, -0.008575468324124813, -0.015387914143502712, 0.011579090729355812, -0.01663321815431118, -0.04499524459242821, -0.03569256141781807, -0.04974033683538437, -0.06117558479309082, -0.005858059972524643, 0.0014922646805644035, 0.006327591836452484, 0.007016724441200495, 0.02047787979245186, -0.033232275396585464, -0.020787758752703667, 0.04760397970676422, -0.06400226056575775, 0.0128153832629323, -0.000597724923864007, -0.007673760410398245, 0.011831123381853104, 0.017500881105661392, 0.03274087235331535, 0.03613549843430519, -0.016840528696775436, 0.009125495329499245, 0.023742005228996277, 0.053652193397283554, 0.03938255459070206, 0.02947920374572277, -0.09084019809961319, -0.0026219759602099657, 0.011012490838766098, -0.0072654238902032375, -0.0700494647026062, -0.014479931443929672, 0.05340468883514404, 0.03421899303793907, 0.02561936341226101, 0.026416216045618057, -0.019483497366309166, -0.014630167745053768, -0.004962783772498369, -0.008552620187401772, -0.009940705262124538, 0.033241912722587585, -0.01931235007941723, 0.08234136551618576, 0.02732633613049984, -0.027395108714699745, -0.02303720824420452, -0.017146172001957893, 0.013529829680919647, 0.01723838970065117, -0.0347132682800293, -0.023740330711007118, -0.03600436449050903, -0.07301925122737885, -0.06283397972583771, 0.008473560214042664, -0.04967291280627251, -0.022519133985042572, 0.011063877493143082, 0.0006691919406875968, -0.03903299942612648, 0.04615084454417229, -0.04634195193648338, 0.01868680864572525, 0.005044474732130766, -0.021823495626449585, -0.02670084498822689, -0.012326463125646114, -0.01964215748012066, -0.0008786751423031092, 0.006705503910779953, -0.03699371963739395, 0.0014338521286845207, -0.03484535962343216, 0.022763114422559738, 0.03709721565246582, 0.01018652692437172, 0.0018903790041804314 ]
[ -0.06905829906463623, 0.00447098258882761, -0.017437029629945755, -0.03679761663079262, 0.04895637929439545, -0.04994555562734604, -0.0036672109272331, 0.015207569114863873, -0.0047355224378407, -0.032386526465415955, -0.015173294581472874, -0.049878641963005066, -0.0008764807716943324, -0.020287903025746346, 0.10867898911237717, 0.01959015615284443, 0.0031176856718957424, -0.042222801595926285, -0.040929365903139114, 0.05299181491136551, -0.02567180246114731, -0.007538583129644394, -0.03759123757481575, -0.04176301881670952, 0.00335051491856575, 0.030094752088189125, 0.04978001117706299, -0.03339610621333122, 0.01750369369983673, -0.19499440491199493, 0.011792508885264397, 0.013670514337718487, 0.032157137989997864, 0.003215279895812273, 0.016768712550401688, 0.05428439378738403, 0.008727993816137314, -0.00031356740510091186, -0.0036634786520153284, 0.029079770669341087, 0.00932793878018856, -0.0027169655077159405, -0.05093654617667198, -0.03373067080974579, 0.06526434421539307, 0.014059489592909813, -0.04297647252678871, -0.04298868402838707, -0.030994456261396408, 0.02794821746647358, -0.05470180884003639, -0.028054045513272285, -0.00009172336285701022, -0.020812848582863808, -0.018152931705117226, 0.01735195890069008, 0.05718611180782318, 0.07215745747089386, 0.01227223314344883, 0.01802627369761467, -0.016825692728161812, -0.0031847942154854536, -0.16687878966331482, 0.0989062562584877, 0.007078119087964296, 0.0355503186583519, -0.029188478365540504, -0.020037906244397163, -0.02560959756374359, 0.10621295124292374, 0.021454425528645515, -0.03442631661891937, -0.01510876975953579, 0.053150925785303116, -0.020322805270552635, 0.0016944485250860453, 0.02569936029613018, 0.0013130389852449298, 0.06045455485582352, 0.0075722672045230865, -0.02355809323489666, 0.007642568089067936, -0.029575912281870842, -0.0315142460167408, -0.038071420043706894, 0.012604238465428352, -0.04075899347662926, 0.034110087901353836, -0.02594614028930664, 0.029005052521824837, 0.02012007310986519, 0.0021957182325422764, 0.029970353469252586, 0.03741683065891266, -0.07738000154495239, -0.04228130728006363, 0.005943052005022764, 0.010936876758933067, 0.008661792613565922, 0.40666818618774414, -0.0022404203191399574, -0.0027931113727390766, 0.0668446272611618, 0.017767587676644325, -0.018122637644410133, -0.023430969566106796, -0.019209973514080048, -0.04736601188778877, 0.03857691213488579, -0.029362183064222336, 0.008847045712172985, -0.009564874693751335, 0.04736116901040077, -0.06036935746669769, 0.028196142986416817, 0.02664271742105484, 0.04629209637641907, 0.0006413237424567342, -0.021601246669888496, 0.002211076207458973, -0.019096359610557556, -0.007822124287486076, 0.007194907404482365, -0.014240114018321037, 0.03414762765169144, 0.0019037562888115644, 0.023458143696188927, 0.049645476043224335, 0.06599897891283035, 0.041146162897348404, 0.06494060903787613, -0.03689945489168167, -0.05858730897307396, 0.01865972764790058, -0.005883729085326195, -0.007128069177269936, 0.02176063321530819, -0.011471875943243504, -0.007258625701069832, 0.024208923801779747, 0.0025004546623677015, -0.07222915440797806, -0.017819281667470932, 0.036911193281412125, -0.047437503933906555, 0.12605997920036316, -0.055595725774765015, -0.03180016577243805, -0.033370491117239, -0.029307136312127113, 0.007436374202370644, 0.06022379919886589, 0.02676902338862419, -0.08772872388362885, 0.02023802138864994, 0.016636738553643227, 0.1053321585059166, -0.04440148547291756, -0.05923934280872345, -0.009324216283857822, 0.004115965683013201, -0.04899748042225838, -0.022341394796967506, 0.025582289323210716, 0.049174800515174866, -0.10175337642431259, -0.028391901403665543, -0.007191650103777647, 0.04477500170469284, -0.08464657515287399, 0.03823528066277504, 0.014759310521185398, -0.05955645069479942, 0.004775145091116428, 0.01610163226723671, -0.023288097232580185, -0.013570116832852364, 0.002160110976547003, 0.047484222799539566, 0.0010075453901663423, -0.029882144182920456, -0.00682040536776185, -0.056930575519800186, 0.0004516651970334351, -0.060856252908706665, -0.06648240983486176, -0.05600179731845856, -0.005075367633253336, -0.00973348319530487, -0.007118369452655315, -0.004802364856004715, 0.007865389809012413, -0.07634138315916061, 0.05161941424012184, -0.04638077691197395, -0.012007779441773891, 0.007675780449062586, -0.005696960724890232, -0.04166172817349434, -0.014234397560358047, -0.02811471000313759, 0.031997207552194595, -0.00954513344913721, 0.015904955565929413, -0.02377174235880375, 0.02077092044055462, 0.06803467869758606, -0.04206681251525879, 0.06255257874727249, 0.030342314392328262, -0.02488730289041996, -0.008925600908696651, 0.0011041221441701055, 0.019782086834311485, -0.009193896315991879, -0.04294406250119209, 0.003414066508412361, -0.011278744786977768, 0.04761054739356041, 0.04464489966630936, -0.06667160987854004, -0.03520938754081726, -0.035785313695669174, -0.35859164595603943, -0.0237883273512125, 0.01724577508866787, 0.01781896874308586, 0.023631028831005096, -0.059951234608888626, 0.02860374189913273, -0.0171121247112751, 0.028227947652339935, 0.04988272488117218, 0.04328581690788269, -0.002896400634199381, 0.036670684814453125, -0.07623614370822906, 0.005390662234276533, 0.050076935440301895, 0.0008841193630360067, 0.0034641409292817116, -0.013305672444403172, 0.047153446823358536, -0.005092631094157696, -0.040497787296772, -0.028317077085375786, -0.05791524797677994, -0.01279532816261053, -0.03922770544886589, 0.12173588573932648, 0.030586116015911102, 0.059128209948539734, -0.0315120704472065, 0.04329947754740715, -0.002559720305725932, -0.005396796856075525, -0.10668394714593887, 0.021950779482722282, -0.02565770596265793, 0.0036728759296238422, 0.00963008962571621, 0.018080050125718117, -0.023006891831755638, -0.014979412779211998, 0.013285896740853786, -0.0364263579249382, -0.024977313354611397, -0.053369417786598206, 0.033325713127851486, -0.05121482536196709, -0.03027212992310524, -0.025465967133641243, 0.07719431817531586, 0.01840818114578724, 0.032685086131095886, 0.029939280822873116, 0.021960660815238953, -0.024775980040431023, -0.009017291478812695, -0.08765488862991333, -0.009574062190949917, -0.00692557031288743, 0.020182348787784576, 0.013780944980680943, 0.058174945414066315, 0.05270133540034294, -0.07798288762569427, -0.03490052744746208, 0.009147845208644867, 0.022582681849598885, 0.01003425382077694, 0.028272386640310287, 0.009815706871449947, -0.025254061445593834, 0.10223689675331116, -0.0008588064811192453, 0.029811818152666092, 0.03592938557267189, 0.058627013117074966, -0.027973676100373268, -0.022905943915247917, 0.043906234204769135, -0.0012922548921778798, 0.03926241025328636, -0.012640191242098808, 0.056395355612039566, -0.03620696812868118, 0.013615142554044724, 0.05887233838438988, 0.0377056822180748, -0.037470053881406784, 0.06291279941797256, 0.022423768416047096, -0.007846200838685036, -0.0028157115448266268, -0.005333484150469303, -0.037737712264060974, 0.05709428712725639, -0.012360719032585621, -0.24599413573741913, 0.027710523456335068, 0.029502419754862785, 0.06968072056770325, 0.012795564718544483, -0.0026371264830231667, 0.008605319075286388, -0.061046306043863297, -0.01990685611963272, 0.024598170071840286, 0.013260903768241405, 0.04211532324552536, -0.0037238539662212133, -0.01117200218141079, 0.010952825658023357, -0.003930448554456234, 0.06938236206769943, 0.009255013428628445, 0.021503103896975517, 0.002346648368984461, 0.037432946264743805, -0.024288829416036606, 0.1514202356338501, 0.025538090616464615, 0.010235840454697609, -0.012270307168364525, -0.034132152795791626, -0.0010888788383454084, 0.06776739656925201, -0.032166797667741776, -0.004946977831423283, 0.02139873057603836, 0.03452703729271889, 0.03147662431001663, 0.02135632187128067, -0.07084838300943375, -0.04559746012091637, 0.03557458519935608, 0.04060527682304382, -0.03459747135639191, -0.002930040005594492, 0.004567923955619335, -0.038740117102861404, 0.011843176558613777, 0.04502513259649277, -0.025079218670725822, 0.03970787301659584, -0.02063775435090065, -0.0706297978758812, 0.012710867449641228, -0.008147201500833035, -0.03660622984170914, -0.017906682565808296, -0.012143061496317387, 0.00946880504488945, 0.08638955652713776, 0.0013409113744273782, -0.03808779641985893, 0.03587440028786659, 0.019927676767110825, -0.03456210717558861, -0.03263385593891144, 0.09550628811120987, 0.03656725957989693, 0.01545033324509859 ]
[ 0.013130937702953815, 0.045796968042850494, 0.006498808041214943, 0.019962439313530922, -0.030497416853904724, 0.019190894439816475, -0.013159025460481644, -0.018421484157443047, 0.012055003084242344, -0.02626730315387249, -0.01528553944081068, 0.012881242670118809, 0.042131680995225906, 0.025237498804926872, 0.03035302646458149, 0.010246310383081436, -0.02182299830019474, 0.005792498588562012, 0.02463575266301632, -0.034899499267339706, -0.012026218697428703, 0.03154493123292923, 0.015695719048380852, -0.021889392286539078, -0.015627892687916756, 0.007019100245088339, -0.024195464327931404, 0.0093305092304945, 0.041197896003723145, -0.13685202598571777, -0.0259677916765213, -0.022180521860718727, 0.026933863759040833, -0.016618000343441963, -0.02966589853167534, -0.018023280426859856, 0.020212309435009956, 0.04203503951430321, 0.006741323973983526, 0.04617632180452347, -0.015151369385421276, 0.00879772286862135, 0.01305770967155695, 0.0059100850485265255, 0.018854795023798943, -0.028956882655620575, -0.06934265047311783, -0.0115415770560503, 0.02355196885764599, -0.00035542313707992435, -0.042012687772512436, -0.003869567532092333, 0.04980233684182167, 0.05239088833332062, -0.023889079689979553, -0.004028957802802324, 0.015622266568243504, 0.035131413489580154, 0.01980604976415634, 0.006344398483633995, 0.0015996594447642565, -0.008434214629232883, -0.04829025641083717, -0.04282029718160629, -0.020287901163101196, -0.009114340879023075, -0.02547505684196949, 0.03577346354722977, 0.0003955757711082697, 0.017683401703834534, -0.014470796100795269, 0.026230646297335625, -0.01565578766167164, -0.019241107627749443, -0.028521187603473663, -0.02764509990811348, 0.032112155109643936, -0.04158841073513031, 0.019452758133411407, 0.029926441609859467, -0.02087736688554287, 0.008008674718439579, 0.01662391610443592, -0.06303684413433075, -0.01716584898531437, -0.030718687921762466, -0.015288220718502998, -0.017450300976634026, -0.03972930833697319, 0.002979530720040202, -0.05260290950536728, -0.03559572622179985, -0.025114785879850388, -0.004643643740564585, -0.07932793349027634, 0.007529020309448242, -0.004409420769661665, -0.019620424136519432, 0.004698098171502352, 0.8305045962333679, 0.024345379322767258, -0.012905375100672245, 0.0038570521865040064, -0.023013092577457428, 0.008778620511293411, -0.0026588616892695427, 0.01634073629975319, 0.0320611447095871, 0.03097349777817726, -0.00962537620216608, -0.01862821727991104, 0.003422282636165619, 0.014471977949142456, 0.04045110195875168, 0.02450108528137207, 0.024180075153708458, -0.024578528478741646, 0.01635066233575344, -0.03709622845053673, 0.02595181204378605, 0.0000032044167710409965, 0.020369667559862137, 0.012934265658259392, 0.03536219149827957, 0.004949469119310379, -0.17380066215991974, 0.02100270614027977, -7.328484348351207e-33, 0.06967834383249283, 0.0032447336707264185, -0.00449707917869091, -0.01076978724449873, -0.01653279922902584, -0.002261577872559428, 0.009724212810397148, -0.0034732092171907425, -0.029500475153326988, -0.04584277421236038, 0.03483830764889717, 0.0016974933678284287, 0.01619914546608925, -0.014130841009318829, 0.012591293081641197, -0.014850414358079433, -0.01671777106821537, 0.006656578276306391, 0.01477030199021101, 0.008711484260857105, 0.02886626124382019, 0.029982781037688255, -0.0004945574328303337, 0.030538616701960564, 0.012944613583385944, 0.01504913903772831, 0.01913640834391117, -0.00614824378862977, -0.014797564595937729, -0.04317175969481468, -0.05244482681155205, 0.02444756217300892, 0.010777470655739307, -0.04524891823530197, 0.03060263767838478, -0.0598275363445282, 0.0066864341497421265, 0.004963538609445095, -0.01913459785282612, -0.06188219413161278, -0.012726245447993279, 0.002169635146856308, 0.003819492645561695, -0.023273585364222527, -0.034108102321624756, -0.004525772295892239, -0.010077587328851223, 0.018273236230015755, -0.0120732756331563, -0.0072673955000936985, -0.008720004931092262, 0.023050660267472267, -0.028200924396514893, 0.011370600201189518, -0.010873964056372643, -0.01428896002471447, 0.013821867294609547, 0.0018996893195435405, 0.013502771034836769, -0.023950358852744102, 0.030928287655115128, -0.029195642098784447, -0.014776350930333138, 0.03517116233706474, 0.01182655431330204, -0.03537951037287712, -0.028574954718351364, -0.026414088904857635, -0.0062230913899838924, 0.007847788743674755, -0.033983033150434494, 0.011064201593399048, -0.026707325130701065, -0.0232783704996109, 0.004780878778547049, -0.023074915632605553, -0.0063250064849853516, 0.02491120621562004, 0.03786095976829529, 0.05480887368321419, -0.018374690786004066, 0.014462156221270561, -0.015204044058918953, -0.04294195398688316, -0.017744312062859535, -0.03876185044646263, 0.0531168170273304, -0.02054244838654995, 0.0011265974026173353, 0.013833190314471722, 0.02634907327592373, 0.06503071635961533, -0.04714731499552727, -0.0026301871985197067, 0.0060154893435537815, 7.211637271143594e-33, 0.029929954558610916, 0.05047301575541496, -0.020739447325468063, -0.013461949303746223, 0.04003111273050308, -0.011219277046620846, 0.035139430314302444, 0.047066207975149155, -0.03482688590884209, 0.016232961788773537, 0.0011359028285369277, -0.032256290316581726, 0.004475712310522795, -0.014196624979376793, 0.055237170308828354, -0.0010112953605130315, 0.018549423664808273, 0.0023322224151343107, 0.0018614385044202209, 0.021532347425818443, 0.01204028632491827, 0.026018518954515457, -0.004309349227696657, 0.02237905189394951, 0.002243918366730213, -0.001068820245563984, -0.010104356333613396, 0.012316049076616764, -0.018292754888534546, 0.029764311388134956, 0.005665076430886984, -0.026664232835173607, -0.01483141165226698, -0.0008825099794194102, -0.016990739852190018, 0.03959176316857338, 0.019220374524593353, 0.0011305048828944564, 0.019388163462281227, -0.005477500148117542, 0.04967029392719269, 0.033707741647958755, -0.028213882818818092, 0.03932807222008705, 0.027197513729333878, 0.002322888234630227, -0.025023046880960464, -0.004946125205606222, 0.010531237348914146, 0.004351241048425436, -0.015508066862821579, 0.007507550064474344, 0.007957994006574154, 0.0005950537160970271, -0.0005845290725119412, -0.047638170421123505, -0.006312344688922167, 0.0026232439558953047, -0.03719792887568474, 0.009812931530177593, -0.04590434953570366, -0.00026760876062326133, -0.0013504151720553637, -0.026820702478289604, -0.032572515308856964, -0.005241716280579567, -0.058390624821186066, 0.029751034453511238, 0.048866428434848785, -0.009286058135330677, -0.011043405160307884, -0.028091734275221825, 0.02338530123233795, 0.03842252120375633, -0.014398016966879368, 0.003015223192051053, -0.051439881324768066, 0.0015810501063242555, -0.027862485498189926, 0.0189723651856184, 0.011683525517582893, 0.024182220920920372, 0.013159840367734432, -0.011052512563765049, 0.03988942876458168, 0.028411494567990303, -0.0020078185480087996, 0.03314791992306709, 0.03653659671545029, 0.0034683088306337595, 0.0350194126367569, 0.0016197417862713337, 0.009852458722889423, 0.014004770666360855, 0.0019249411998316646, -1.2961585582615953e-8, -0.05435143783688545, -0.02242937684059143, -0.008008839562535286, 0.01217794232070446, -0.01565890572965145, -0.0037908032536506653, -0.004801086615771055, -0.03550148382782936, -0.0030990885570645332, -0.002300953958183527, 0.06720460951328278, -0.009388289414346218, -0.03377828001976013, -0.0007185169961303473, 0.010543739423155785, -0.020420197397470474, -0.00601893849670887, 0.0037586656399071217, 0.0468100868165493, -0.012767675332725048, 0.019162790849804878, 0.05390671268105507, 0.019775722175836563, 0.020545553416013718, 0.010726585984230042, 0.013811700977385044, 0.0073714228346943855, -0.08084634691476822, -0.010983104817569256, -0.01155940443277359, 0.01066846027970314, -0.003932972904294729, -0.06772255897521973, -0.007197641301900148, -0.008311213925480843, -0.0161538477987051, -0.0030113772954791784, -0.0012027905322611332, 0.0037421241868287325, 0.03425249084830284, 0.017752373591065407, 0.01433925237506628, -0.048867739737033844, -0.04722733423113823, -0.004675670992583036, -0.01498224213719368, -0.03268967196345329, -0.021591918542981148, 0.02783895656466484, -0.03544458746910095, -0.014512241818010807, -0.006826164200901985, -0.010884664952754974, 0.03156779706478119, 0.06297855079174042, -0.00009988567762775347, 0.006900979205965996, -0.014934760518372059, -0.00832430087029934, -0.017397910356521606, 0.04011264070868492, 0.030422771349549294, -0.02576293982565403, -0.02464870922267437 ]
pythonscikit-learn-detecting-which-sentences-in-a-transcript-contain-a-speaker
https://markhneedham.com/blog/2015/02/20/pythonscikit-learn-detecting-which-sentences-in-a-transcript-contain-a-speaker
false
2015-02-27 00:49:54
R/ggplot: Controlling X axis order
[ "r-2", "ggplot" ]
[ "R" ]
As part of a talk I gave at the Neo4j London meetup earlier this week I wanted to show how you could build a simple chart showing the number of friends that different actors had using the ggplot library. I started out with the following code: [source,r] ---- df = read.csv("/tmp/friends.csv") top = df %>% head(20) ggplot(aes(x = p.name, y = colleagues), data = top) + geom_bar(fill = "dark blue", stat = "identity") ---- The https://gist.github.com/mneedham/070d82a1e2aa031f42e6[friends CSV file is available as a gist] if you want to reproduce the chart. This is how the chart renders: image::{{<siteurl>}}/uploads/2015/02/2015-02-27_00-41-08.png[2015 02 27 00 41 08,600] It's in a fairly arbitrary order when it would be quite cool if we could get the most popular people to show from left to right. I had the people's names in the correct order in the data frame but annoyingly it was then sorting them into alphabetical order. Luckily I came across the http://stackoverflow.com/questions/3253641/how-to-change-the-order-of-a-discrete-x-scale-in-ggplot[by using the +++<cite>+++scale_x_discrete+++</cite>+++ function] which does exactly what I needed. If we pass in the list of names to that function we get the chart we desire: [source,r] ---- ggplot(aes(x = p.name, y = colleagues), data = top) + geom_bar(fill = "dark blue", stat = "identity") + scale_x_discrete(limits= top$p.name) ---- image::{{<siteurl>}}/uploads/2015/02/2015-02-27_00-45-01.png[2015 02 27 00 45 01,600]
null
null
[ -0.01697440817952156, -0.02491793967783451, 0.0006140508921816945, 0.04259051755070686, 0.06626301258802414, 0.0054868292063474655, 0.010885495692491531, 0.021331917494535446, 0.01422384474426508, -0.00792010873556137, -0.02070138230919838, -0.007975638844072819, -0.06871595233678818, 0.0252181775867939, -0.007296465802937746, 0.07038290053606033, 0.06616942584514618, 0.0024368439335376024, -0.000951426278334111, 0.006203334778547287, 0.04102380573749542, 0.019813599064946175, -0.03675622493028641, 0.0274044219404459, 0.012677604332566261, -0.03950272500514984, -0.00877999048680067, 0.01582157239317894, -0.028180396184325218, 0.01317144837230444, 0.04657421261072159, 0.014469165354967117, 0.017139798030257225, -0.02398129738867283, 0.019849376752972603, -0.03493768721818924, -0.038462188094854355, 0.03357822448015213, 0.002970347413793206, -0.006587272975593805, -0.04423828795552254, 0.007021923549473286, -0.02512715943157673, 0.013498402200639248, -0.02429697848856449, 0.007916204631328583, -0.06017903611063957, 0.0425107441842556, 0.022507352754473686, 0.03168528899550438, -0.06742961704730988, 0.03770865127444267, -0.005376007873564959, -0.035149503499269485, -0.0018895213725045323, 0.022649971768260002, 0.03542335331439972, -0.04712105169892311, 0.0152788320556283, -0.01957450620830059, -0.006879710126668215, 0.007820268161594868, 0.000800491776317358, 0.03311358764767647, -0.0021759793162345886, -0.0482153445482254, -0.011526660993695259, 0.05196437984704971, -0.029830800369381905, -0.011639490723609924, -0.014341930858790874, 0.0027256051544100046, -0.008168266154825687, -0.024242574349045753, -0.034078069031238556, -0.03856690600514412, 0.0015655900351703167, 0.06327931582927704, 0.019401079043745995, 0.02661750838160515, -0.025278214365243912, 0.0021699639037251472, 0.012033039703965187, 0.01910226233303547, -0.009232926182448864, -0.018618552014231682, -0.008718241937458515, -0.06040939688682556, -0.06715402752161026, 0.05131084844470024, -0.04772841930389404, -0.06699021905660629, -0.009970641694962978, 0.013314665295183659, -0.006488724611699581, 0.0010235786903649569, 0.008283690549433231, -0.007862990722060204, 0.00046100071631371975, -0.010771767236292362, -0.08220839500427246, -0.03571875020861626, 0.036915238946676254, 0.021328985691070557, -0.07010120898485184, -0.00981974694877863, -0.005435190629214048, -0.015669316053390503, -0.009327292442321777, 0.013611925765872002, -0.03077625297009945, -0.014908857643604279, -0.02830582670867443, 0.018978498876094818, -0.06938821077346802, 0.07937753200531006, 0.03926646709442139, -0.014160966500639915, -0.01275969110429287, -0.0020027542486786842, 0.05063597112894058, 0.025395376607775688, -0.0253608301281929, 0.08346863836050034, -0.00613226555287838, 0.05626611411571503, 0.008392713963985443, 0.0374327078461647, -0.015280026011168957, -0.07063843309879303, -0.017209284007549286, 0.05009138584136963, -0.050119057297706604, -0.011247728951275349, 0.00008804615936242044, -0.051365926861763, -0.015646792948246002, 0.0015549469972029328, 0.04600553959608078, 0.03680052608251572, 0.03932853788137436, -0.04524122551083565, 0.011444393545389175, -0.012372152879834175, 0.04365513101220131, -0.00944689754396677, -0.022512812167406082, -0.05483220890164375, -0.03560126945376396, 0.008948511444032192, 0.025658661499619484, 0.007240120321512222, 0.06264010816812515, -0.022067075595259666, 0.014378690160810947, 0.11177513003349304, 0.030101971700787544, 0.025768395513296127, 0.018269749358296394, -0.012992242351174355, 0.04061506688594818, 0.02614620514214039, 0.032450269907712936, 0.06778119504451752, -0.01079418882727623, -0.008929050527513027, -0.001988608157262206, 0.06315816938877106, -0.05896648392081261, -0.008592965081334114, -0.021928586065769196, -0.033065445721149445, 0.035587020218372345, -0.006365182343870401, 0.009771635755896568, 0.06209590286016464, 0.07790430635213852, 0.04158812388777733, 0.026836540549993515, 0.009312321431934834, -0.06881635636091232, 0.04642626270651817, 0.01867355965077877, 0.004783254582434893, 0.009634318761527538, -0.01771051436662674, 0.0737026035785675, 0.021701838821172714, 0.01983802393078804, 0.05921038240194321, -0.057566091418266296, -0.042387135326862335, -0.005073621869087219, -0.011830556206405163, 0.039363108575344086, -0.01713643968105316, 0.015238321386277676, 0.05619334802031517, 0.009994342923164368, 0.00932762399315834, -0.00950998067855835, 0.0064356327056884766, 0.047775134444236755, -0.010762044228613377, -0.06360826641321182, 0.02596394717693329, 0.009462111629545689, -0.030172431841492653, -0.01666027121245861, 0.021170765161514282, -0.024331027641892433, 0.031555239111185074, 0.03911365941166878, -0.019123319536447525, 0.03481736034154892, 0.03711080178618431, 0.06577999144792557, 0.012518730945885181, 0.019899651408195496, -0.026964984834194183, 0.007063016295433044, 0.0029996708035469055, -0.013879387639462948, -0.06016383320093155, -0.02245742455124855, 0.1432953178882599, 0.06542225182056427, -0.01739218831062317, -0.04486432671546936, 0.0188865065574646, -0.01066445279866457, -0.028507305309176445, 0.0645718201994896, -0.007781366817653179, -0.030635496601462364, -0.0056768315844237804, -0.026558976620435715, -0.04615546390414238, 0.009720224887132645, -0.039718061685562134, 0.020743830129504204, 0.057799119502305984, 0.0004046765388920903, 0.05369745194911957, -0.011017820797860622, -0.0051222690381109715, 0.014668638817965984, -0.038186851888895035, -0.06159400939941406, 0.016948211938142776, 0.03448176383972168, -0.0022310405038297176, 0.03801904618740082, -0.01710871048271656, -0.03158339112997055, -0.0007793371332809329, -0.016709234565496445, 0.01574341580271721, 0.033912211656570435, 0.04506131634116173, 0.0018991458928212523, 0.00240955944173038, -0.024692431092262268, 0.0016032562125474215, -0.029704034328460693, -0.03812599927186966, -0.061491530388593674, -0.05292147025465965, 0.010826866142451763, -0.010903053916990757, 0.051210831850767136, -0.03184228017926216, -0.00663386657834053, 0.004051453433930874, 0.02263667993247509, -0.013742245733737946, 0.020754152908921242, -0.008754512295126915, 0.003212238196283579, -0.041362859308719635, 0.0018175647128373384, 0.05356839671730995, -0.026731155812740326, 0.002181885065510869, -0.0009516935097053647, -0.04925093054771423, 0.03797715902328491, -0.04411287233233452, -0.02834845520555973, 0.0005916732479818165, 0.028120918199419975, 0.0652439147233963, 0.029636964201927185, 0.010320045985281467, 0.015605387277901173, -0.00443814042955637, 0.024515239521861076, 0.028338635340332985, -0.023105477914214134, 0.07800952345132828, 0.0032283226028084755, 0.04558686912059784, 0.05860302969813347, -0.02724939025938511, -0.010885634459555149, -0.03841165825724602, 0.0069780508056283, -0.011149361729621887, -0.2576781213283539, 0.052974313497543335, -0.013590097427368164, -0.014793097972869873, 0.0020474432967603207, -0.07701348513364792, 0.015508669428527355, -0.008397234603762627, -0.029231835156679153, 0.00020584039157256484, 0.01115739718079567, -0.0443405844271183, -0.0369425006210804, 0.061817195266485214, 0.02582406811416149, 0.06353685259819031, -0.015768930315971375, -0.05497732013463974, 0.03868451714515686, 0.07255106419324875, 0.020510906353592873, -0.034396667033433914, -0.016107993200421333, 0.05191301181912422, 0.0005294172442518175, 0.05388544499874115, -0.08192673325538635, 0.021212829276919365, -0.05503622069954872, -0.0405847541987896, 0.02071835659444332, -0.04309597983956337, 0.004460750613361597, 0.00633749645203352, 0.006983680184930563, -0.05626348406076431, 0.029012586921453476, 0.019079241901636124, -0.011043420061469078, 0.016393469646573067, -0.028325296938419342, -0.021282874047756195, -0.01300068013370037, -0.01247700210660696, 0.09816120564937592, 0.01888359896838665, -0.04537725821137428, 0.014820374548435211, -0.02365637570619583, 0.06107886880636215, -0.023445429280400276, 0.001955574844032526, -0.0159531831741333, 0.0073942942544817924, -0.04708002135157585, -0.004906484857201576, -0.021438077092170715, 0.0013890145346522331, -0.049642808735370636, -0.02557501755654812, -0.015941936522722244, -0.021805506199598312, 0.029361244291067123, -0.05791795253753662, -0.00867132656276226, -0.059844400733709335, -0.09423241019248962, -0.048246100544929504, 0.05594172701239586, 0.012993712909519672, -0.0166118536144495, -0.017268389463424683, 0.011153597384691238, -0.10438466817140579, -0.006204481702297926, -0.05245323106646538, 0.006062866188585758, -0.012372633442282677, 0.027181068435311317, 0.04069504141807556, -0.040895551443099976, -0.07383637875318527, 0.0319615975022316, -0.0019890598487108946, 0.018831901252269745, 0.02535400725901127, 0.0047849672846496105, -0.0037555990274995565, -0.05254286155104637, -0.0039257267490029335, 0.05375542864203453, -0.01782863214612007, -0.007475320715457201, 0.01959126628935337, -0.017260504886507988, 0.03358038514852524, 0.026076894253492355, -0.0024517476558685303, 0.023280013352632523, 0.0325453020632267, 0.046234507113695145, -0.05175446718931198, 0.016180528327822685, -0.029286880046129227, -0.004312615375965834, -0.013007971458137035, -0.047549765557050705, 0.00883725006133318, 0.02160956896841526, 0.01757589913904667, 0.0011846371926367283, -0.020362673327326775, 0.03456242009997368, -0.06457220762968063, -0.02524111047387123, -0.0031155424658209085, 0.025427725166082382, 0.025036228820681572, 0.03967655822634697, -0.018658017739653587, -0.040408190339803696, 0.010407386347651482, 0.004387916065752506, -0.021192962303757668, -0.04515988379716873, -0.018554650247097015, -0.00874568521976471, -0.03868446499109268, 0.02129366807639599, 0.003891633590683341, -0.00999045092612505, 0.04429653286933899, 0.03212723508477211, -0.0629677101969719, 0.04877210035920143, -0.010215453803539276, -0.043030623346567154, -0.01648024469614029, 0.020272796973586082, -0.005858227610588074, -0.016651280224323273, 0.011168094351887703, -0.01666947826743126, 0.029629765078425407, 0.023491112515330315, -0.03530016914010048, 0.01581684686243534, -0.006366224493831396, 0.01727399043738842, -0.007175183389335871, 0.01143719907850027, 0.006509040482342243, 0.0073455083183944225, -0.023989519104361534, -0.021192939952015877, -0.004268484190106392, 0.041635386645793915, 0.0019275412196293473, -0.03787112981081009, -0.04839158430695534, 0.0485079362988472, -0.05967699736356735, -0.014223024249076843, -0.015378068201243877, -0.004013631492853165, 0.04814193770289421, -0.010439516045153141, 0.027987906709313393, -0.00872583594173193, 0.0000010359364068790455, 0.008290568366646767, 0.04161082208156586, -0.0061432719230651855, 0.00601655337959528, -0.025846777483820915, 0.0003956103464588523, 0.02007126994431019, 0.00407929252833128, 0.04518146440386772, 0.026882247999310493, -0.005230105482041836, -0.02145562320947647, -0.0003850357315968722, -0.01674911379814148, 0.03379308059811592, 0.0671401396393776, -0.019596530124545097, 0.015611947514116764, -0.0008422909304499626, -0.021920178085565567, -0.018682444468140602, -0.0017557332757860422, -0.02187279798090458, 0.01196770928800106, -0.04678111523389816, -0.0564240962266922, -0.00375674688257277, 0.01262381486594677, 0.010618558153510094, 0.02181563898921013, -0.036488525569438934, 0.023319683969020844, -0.04344078153371811, 0.0274122916162014, 0.0750371590256691, -0.052149876952171326, 0.00578939588740468, 0.003058970207348466, 0.0018836741801351309, 0.02048850990831852, 0.03170385956764221, -0.04898592084646225, -0.03415125980973244, -0.01971713826060295, 0.04569718986749649, -0.009434763342142105, -0.054083749651908875, -0.07510775327682495, -0.02460912987589836, -0.01169611420482397, 0.013343313708901405, 0.0001011188724078238, 0.0028460463508963585, -0.018663182854652405, 0.013681327924132347, 0.0033610209356993437, -0.023320866748690605, -0.03841889277100563, 0.058169879019260406, -0.024851389229297638, 0.016440575942397118, 0.01097219530493021, 0.016992444172501564, 0.009640511125326157, -0.056218016892671585, 0.02019924856722355, -0.05954784154891968, -0.003716652048751712, 0.018346183001995087, 0.0417894646525383, 0.017312558367848396, 0.007798971142619848, -0.03690721094608307, 0.006393678020685911, -0.004907910246402025, -0.02402617782354355, -0.021703040227293968, -0.010259178467094898, 0.028824850916862488, 0.0237430389970541, 0.029942503198981285, -0.019476935267448425, 0.03010507859289646, -0.03946178779006004, 0.03967601805925369, -0.04687325656414032, -0.06973826885223389, -0.00809785071760416, -0.05536140501499176, 0.0038703184109181166, 0.005473982077091932, 0.015016112476587296, -0.04077767953276634, 0.04519833251833916, 0.05138275399804115, 0.049877237528562546, 0.059251878410577774, -0.004608923569321632, 0.011156155727803707, -0.023575754836201668, 0.008769937790930271, -0.08349285274744034, -0.011013182811439037, 0.0034589215647429228, -0.0013294274685904384, -0.04504982382059097, 0.011396749876439571, -0.0326617956161499, 0.04485905170440674, -0.05573774501681328, -0.051534708589315414, 0.04811960831284523, -0.006399764679372311, 0.029905399307608604, 0.007441079244017601, -0.04596846550703049, -0.01845807395875454, 0.043954744935035706, -0.07338827103376389, 0.00820680521428585, -0.0009233361342921853, 0.06674409657716751, -0.02637525089085102, 0.04394198954105377, 0.001457372447475791, -0.02900485321879387, 0.05962689220905304, 0.027943944558501244, 0.038722291588783264, 0.06347972899675369, -0.027389757335186005, 0.03954263776540756, 0.022549107670783997, -0.02267760969698429, 0.007969770580530167, 0.034370265901088715, 0.028628576546907425, -0.050093624740839005, 0.006449839100241661, 0.016647348180413246, -0.020458096638321877, -0.08295729756355286, 0.08442535251379013, -0.009114710614085197, -0.03228039667010307, -0.05457523092627525, 0.03946412354707718, -0.015924543142318726, 0.0424007773399353, -0.007740190718322992, -0.0063584488816559315, -0.019018661230802536, 0.05582987889647484, -0.017476052045822144, 0.006578084547072649, 0.047375332564115524, 0.0021063911262899637, 0.017127851024270058, -0.0005571409128606319, 0.05149079114198685, 0.1121239960193634, 0.05548018962144852, 0.01581442356109619, 0.058891963213682175, -0.0005100049311295152, -0.04543149471282959, -0.01383616030216217, 0.0035868159029632807, -0.0053072222508490086, -0.014337636530399323, 0.017335040494799614, 0.038264937698841095, -0.06054159626364708, 0.07613856345415115, 0.008392383344471455, -0.024450836703181267, -0.023337973281741142, -0.008015532977879047, 0.01295047253370285, 0.06478172540664673, -0.005841147620230913, 0.053759150207042694, -0.0388232097029686, -0.02660706453025341, 0.014285802841186523, -0.003961179871112108, -0.01559622772037983, 0.01667448692023754, -0.01431915070861578, -0.008675758726894855, 0.00633120397105813, 0.016826940700411797, 0.07920694351196289, -0.04046570882201195, -0.04684881865978241, 0.02105589024722576, 0.03584367409348488, 0.0045128148049116135, 0.026673931628465652, 0.013511610217392445, -0.025577077642083168, -0.003416219027712941, -0.05110654607415199, -0.01638198271393776, -0.03998362645506859, -0.02523239143192768, 0.019797595217823982, -0.02747935988008976, 0.005578530952334404, 0.006689209025353193, -0.035219550132751465, -0.0356939360499382, -0.05689559504389763, -0.036683984100818634, -0.08000724762678146, -0.08554326742887497, -0.002864893525838852, 0.001375294872559607, -0.029309051111340523, -0.017367316409945488, -0.015215625986456871, -0.030471371486783028, -0.014152727089822292, 0.010570614598691463, -0.06010127067565918, -0.030802102759480476, 0.010771196335554123, 0.027463775128126144, 0.013507473282516003, -0.0030974112451076508, 0.02539471909403801, 0.020443081855773926, 0.009417982771992683, -0.029956743121147156, 0.031083352863788605, 0.02948608808219433, 0.03412318974733353, 0.005859293043613434, -0.08072438091039658, 0.020928269252181053, -0.03037622570991516, -0.030700229108333588, -0.08473239839076996, 0.014821676537394524, 0.019511817023158073, 0.004793971311300993, 0.033074889332056046, 0.03068588674068451, -0.006782483775168657, -0.024806758388876915, 0.004394718445837498, -0.02230856753885746, 0.025877349078655243, 0.041856490075588226, -0.042006004601716995, 0.06993469595909119, 0.024215279147028923, -0.008481322787702084, -0.026531828567385674, -0.024683721363544464, -0.002715836511924863, 0.005671057850122452, -0.05501783266663551, -0.039704471826553345, -0.04008103162050247, -0.08972030133008957, -0.005430067889392376, 0.0043464526534080505, -0.04616113379597664, 0.008541923016309738, -0.031175026670098305, 0.034653980284929276, -0.02545367181301117, 0.04733376204967499, -0.02653561346232891, 0.019772248342633247, -0.017047807574272156, -0.00335365766659379, -0.03038277104496956, 0.03358772024512291, 0.0005752095021307468, 0.014174469746649265, 0.0107511505484581, -0.042739417403936386, -0.0028644264675676823, -0.018019117414951324, 0.013023135252296925, 0.034143444150686264, 0.02263377048075199, 0.05419183149933815 ]
[ -0.03775422275066376, -0.01419486291706562, -0.02787615917623043, -0.02911769039928913, 0.08519026637077332, -0.013710052706301212, -0.0007187247392721474, 0.026561733335256577, 0.0110669219866395, -0.010431206785142422, 0.026624588295817375, -0.05618027597665787, 0.03325122967362404, 0.004283028654754162, 0.017742767930030823, 0.001996032427996397, -0.005905830767005682, -0.06332243978977203, -0.02972838655114174, 0.03731728345155716, -0.03944609314203262, -0.056708965450525284, -0.023897776380181313, -0.048353854566812515, 0.04103463888168335, 0.02438649907708168, 0.020597409456968307, -0.047042153775691986, -0.012372557073831558, -0.20552106201648712, -0.0042770011350512505, 0.018523352220654488, 0.06422796100378036, -0.01089001540094614, -0.0332062765955925, 0.02919185720384121, 0.056425370275974274, 0.02015877328813076, 0.026374362409114838, 0.029992586001753807, 0.008574604988098145, -0.0017794634914025664, -0.044105738401412964, -0.02699584886431694, 0.05201900005340576, 0.04431311786174774, -0.04631967842578888, 0.006059904582798481, -0.05196209251880646, 0.00805132556706667, -0.035255126655101776, -0.023069145157933235, -0.023477116599678993, 0.02965424954891205, -0.007762252818793058, 0.04111270233988762, 0.052949000149965286, 0.0073159546591341496, 0.012692165561020374, 0.025934556499123573, 0.0098654106259346, 0.007656788919121027, -0.14769136905670166, 0.08445349335670471, -0.014807041734457016, 0.03426993638277054, -0.02805897407233715, 0.002907061716541648, -0.032557807862758636, 0.06721667945384979, 0.04241573065519333, 0.007283998653292656, -0.01814616285264492, 0.02699246071279049, 0.010045668110251427, 0.008284802548587322, -0.04443064332008362, 0.03914378955960274, 0.025258207693696022, -0.035629451274871826, -0.04160400852560997, 0.03525293990969658, -0.019896987825632095, -0.009893850423395634, 0.012558449991047382, 0.027653317898511887, 0.020280523225665092, 0.03828676789999008, -0.021320149302482605, 0.025496279820799828, 0.04220636188983917, 0.026320239529013634, 0.02265138551592827, 0.016101574525237083, -0.07537785917520523, -0.04419869929552078, 0.009784210473299026, 0.014720293693244457, -0.01131905522197485, 0.4040391147136688, -0.029951006174087524, -0.02454346790909767, 0.07129483669996262, 0.08822368085384369, -0.006572333164513111, -0.017438527196645737, -0.0013672299683094025, -0.06810271739959717, 0.0415617860853672, 0.0038023267406970263, 0.0037663530092686415, -0.02111799456179142, 0.04925531521439552, -0.07213219255208969, 0.02700313739478588, -0.004858566448092461, 0.03024289943277836, 0.01811337098479271, -0.005085110664367676, 0.00008012980106286705, -0.005785935092717409, 0.0158673208206892, 0.029856370761990547, 0.002656044904142618, 0.050736427307128906, 0.019035328179597855, 0.027792682871222496, 0.0473698191344738, 0.05288342759013176, 0.010032366961240768, 0.04330596700310707, 0.018886473029851913, -0.07455737143754959, 0.029222063720226288, -0.04612995684146881, 0.001442954409867525, 0.041123393923044205, -0.015306425280869007, -0.0330914631485939, 0.010757592506706715, 0.028711501508951187, 0.0018286758568137884, 0.02928153984248638, 0.018602784723043442, -0.005157385487109423, 0.1618584841489792, -0.04829169437289238, -0.04428449645638466, -0.012576179578900337, -0.036416396498680115, 0.007675727363675833, 0.016192056238651276, -0.014962312765419483, -0.061391375958919525, -0.008438787423074245, 0.022528722882270813, 0.08204831182956696, -0.0054224347695708275, -0.06600285321474075, 0.0229828879237175, -0.017676930874586105, -0.02895033173263073, -0.032750602811574936, 0.04188309609889984, 0.08034712076187134, -0.11108838766813278, -0.02197044901549816, 0.04363970831036568, 0.005526567343622446, -0.08792076259851456, 0.027453314512968063, 0.005363715812563896, -0.02595570683479309, 0.02149599976837635, 0.06589068472385406, -0.007454446516931057, -0.022668858990073204, -0.012184733524918556, 0.04856671765446663, 0.0009022591402754188, 0.00028937263414263725, 0.0016842338955029845, -0.060849424451589584, -0.007006076164543629, -0.10259024798870087, -0.04410736262798309, -0.0779615119099617, 0.012703204527497292, -0.024585364386439323, -0.019784558564424515, 0.019179316237568855, -0.013399180956184864, -0.08207161724567413, 0.07237789034843445, -0.04745939373970032, -0.01711735874414444, -0.007331281900405884, -0.01353384368121624, -0.01635909453034401, -0.029939433559775352, -0.023384977132081985, 0.0179966539144516, -0.0029727956280112267, 0.0202796533703804, -0.05523594096302986, 0.03333139047026634, 0.06961256265640259, -0.043093591928482056, 0.09119682759046555, 0.010678092017769814, -0.0016405179630964994, -0.0280591007322073, -0.03713506832718849, 0.01873147487640381, -0.0047283112071454525, 0.018429679796099663, 0.021101290360093117, -0.038094792515039444, 0.01576288789510727, 0.05636534094810486, 0.024051550775766373, -0.03398919478058815, -0.025251416489481926, -0.36847978830337524, -0.06127885729074478, 0.025873836129903793, 0.002867193194106221, 0.00720365671440959, -0.015869075432419777, 0.025009645149111748, 0.0011316891759634018, 0.03070361725986004, 0.06295531243085861, 0.11416101455688477, 0.016673924401402473, -0.0332813486456871, -0.08198411017656326, -0.00923964288085699, 0.040132708847522736, -0.02421538345515728, 0.0004262277507223189, -0.027210736647248268, -0.025344500318169594, -0.02132379449903965, -0.0032311317045241594, -0.05341076850891113, -0.02605060487985611, 0.01900969259440899, -0.017991583794355392, 0.1275327503681183, 0.025637436658143997, -0.017180386930704117, -0.03690480440855026, 0.013818047940731049, 0.010043215937912464, -0.03280973434448242, -0.04445844143629074, 0.04699455201625824, -0.00872951839119196, 0.0016192058101296425, -0.0023218663409352303, -0.018111851066350937, -0.03659768030047417, -0.05359989032149315, -0.011153421364724636, -0.02539766952395439, -0.0345635823905468, -0.055319469422101974, 0.03785264119505882, -0.017401184886693954, 0.006593523547053337, -0.02190316654741764, 0.06942295283079147, 0.021941836923360825, -0.001818247139453888, 0.025724835693836212, 0.018735602498054504, 0.003820727812126279, -0.040981899946928024, -0.07282178848981857, -0.003509343834593892, -0.004973295610398054, 0.019459431990981102, 0.01746438443660736, 0.013237753883004189, 0.028160331770777702, -0.09213794767856598, -0.003922646399587393, -0.010093644261360168, -0.049286291003227234, -0.019773544743657112, 0.017350684851408005, 0.02104121446609497, -0.033128224313259125, 0.0843048244714737, 0.00033867155434563756, 0.030147302895784378, 0.04027826339006424, 0.02271399088203907, -0.02216046117246151, -0.0019778888672590256, 0.01975126378238201, 0.0006153503782115877, 0.037705760449171066, -0.015244985930621624, 0.022250352427363396, -0.021051352843642235, 0.0015544689958915114, 0.015480797737836838, -0.000709114654455334, -0.02236357145011425, 0.04186568036675453, 0.0371905155479908, -0.003839904675260186, -0.009007646702229977, 0.005672004073858261, -0.04338900372385979, 0.05861739069223404, -0.029480168595910072, -0.2940482199192047, 0.03241563215851784, -0.006932276766747236, 0.06732773780822754, -0.008180694654583931, -0.018053637817502022, 0.019180145114660263, -0.008883960545063019, 0.0011196441482752562, -0.0077844406478106976, 0.042655400931835175, 0.041637271642684937, 0.030000582337379456, -0.018293313682079315, -0.021756116300821304, -0.020235562697052956, 0.013916331343352795, -0.0032142249401658773, 0.020420236513018608, 0.006369465962052345, 0.04968590289354324, -0.049195583909749985, 0.1649787873029709, 0.034412890672683716, 0.015949459746479988, 0.013439076021313667, -0.04146367684006691, -0.012093503028154373, 0.06259898841381073, 0.005240484606474638, -0.0014667249051854014, -0.0015852717915549874, 0.0372440442442894, -0.003580327844247222, 0.02961702272295952, -0.025271080434322357, -0.03308958187699318, 0.021529873833060265, 0.020510775968432426, -0.014471437782049179, 0.0030789559241384268, -0.0012536168796941638, -0.0426480770111084, 0.039613038301467896, 0.06330673396587372, -0.024726195260882378, 0.007445181719958782, -0.002548689255490899, -0.03867610916495323, -0.0002450007013976574, -0.029464490711688995, -0.027462851256132126, -0.060657940804958344, -0.019621044397354126, 0.00801168754696846, 0.05923222377896309, 0.013791155070066452, 0.003578947391360998, 0.05923127755522728, 0.017619546502828598, -0.049075156450271606, -0.04780151695013046, 0.0854078009724617, -0.008799801580607891, 0.006522997282445431 ]
[ -0.0015961271710693836, 0.0016857190057635307, 0.03939236328005791, 0.015719089657068253, -0.002228023484349251, 0.009969127364456654, 0.028961487114429474, -0.007080084644258022, -0.018889961764216423, 0.017475536093115807, 0.0020561746787279844, 0.017865456640720367, 0.027330581098794937, -0.014182837679982185, 0.004672988783568144, -0.018411649391055107, 0.02106471359729767, -0.0040916381403803825, 0.03619464486837387, -0.005052740685641766, -0.047872621566057205, -0.01896466687321663, 0.01136471051722765, -0.004022821318358183, -0.00474924873560667, -0.004617113620042801, -0.019932568073272705, -0.025284437462687492, 0.02093452215194702, -0.1107904240489006, -0.012068203650414944, -0.044747691601514816, 0.012156544253230095, 0.017964979633688927, -0.06872794777154922, 0.02052631787955761, -0.005320573225617409, 0.05125756934285164, -0.0038137868978083134, 0.018487488850951195, -0.011659334413707256, -0.016682201996445656, -0.007791442330926657, -0.007791689597070217, -0.0037496674340218306, -0.020135901868343353, -0.010618898086249828, -0.022987600415945053, -0.005070953164249659, 0.015295905992388725, -0.04156692698597908, -0.010037215426564217, -0.039128027856349945, 0.001517154392786324, 0.003077612491324544, -0.007620638702064753, -0.03530707210302353, -0.04375431314110756, 0.013163536787033081, 0.02133418433368206, -0.02711115963757038, -0.012208692729473114, -0.050686515867710114, -0.021985694766044617, 0.013297732919454575, 0.0046754879876971245, -0.004986101761460304, 0.024016370996832848, -0.0015429100021719933, 0.027275200933218002, 0.01514743734151125, 0.04041822999715805, -0.05006921663880348, -0.056334368884563446, -0.04684055969119072, 0.0036877875681966543, 0.005006261169910431, -0.030622238293290138, 0.013295951299369335, -0.02693518064916134, 0.0027267374098300934, 0.004433336667716503, 0.007143969647586346, 0.0054236711002886295, -0.005253724288195372, -0.0211649090051651, -0.022231487557291985, 0.005159246269613504, -0.028085552155971527, 0.005212090909481049, -0.057374220341444016, 0.09667247533798218, 0.011720271781086922, 0.017771292477846146, -0.07633359730243683, -0.005515961907804012, -0.0026540171820670366, -0.00047169378376565874, -0.004142857622355223, 0.8216115236282349, -0.015350514091551304, -0.01947806030511856, 0.03203707933425903, 0.0016956782201305032, -0.013424409553408623, -0.0194951631128788, -0.0008912114426493645, -0.004484101664274931, -0.012136010453104973, -0.0071641867980360985, -0.00034207821590825915, 0.011847537942230701, 0.013333520852029324, 0.03191210329532623, 0.02237958274781704, 0.02571997418999672, 0.01960444077849388, 0.01624021679162979, -0.017368728294968605, -0.01628102734684944, 0.006392738316208124, 0.014502566307783127, -0.0048396168276667595, -0.02562633529305458, -0.04091249406337738, -0.1791304498910904, 0.011422998271882534, -7.019765001678719e-33, 0.05401235073804855, -0.019478553906083107, 0.020783061161637306, -0.010989069007337093, 0.013903059996664524, 0.04327549785375595, -0.07734403014183044, -0.014529334381222725, -0.007704769726842642, -0.013569001108407974, 0.009968225844204426, 0.011042829602956772, 0.027781827375292778, 0.017487691715359688, 0.01846606284379959, 0.023060420528054237, 0.014262927696108818, 0.05173682048916817, -0.03868073970079422, -0.020589692518115044, -0.012568986974656582, 0.03256237134337425, -0.0037631888408213854, 0.05325476452708244, -0.011610769666731358, 0.040675900876522064, 0.012875250540673733, 0.02054511196911335, 0.007382932584732771, -0.05963606387376785, -0.01729925163090229, 0.01531294733285904, 0.008695371448993683, -0.006213111337274313, 0.03539765253663063, -0.040052853524684906, -0.0318174734711647, -0.008063253946602345, -0.04477541893720627, -0.014665815979242325, -0.017349012196063995, -0.005873876623809338, -0.042059604078531265, -0.01941891759634018, -0.06862124055624008, 0.03203938528895378, -0.0046639833599328995, 0.001954874023795128, -0.002605364890769124, 0.042020153254270554, 0.024387283250689507, 0.013305164873600006, -0.04514104872941971, 0.014807862229645252, -0.02277769148349762, 0.026887554675340652, -0.006389489397406578, 0.01854027435183525, 0.015797728672623634, -0.004251774400472641, 0.04537971317768097, 0.0010365234920755029, 0.021336833015084267, 0.026276681572198868, 0.006966660730540752, 0.01947951689362526, -0.002962804865092039, -0.01973402313888073, 0.025511687621474266, 0.011573038063943386, -0.058734506368637085, 0.06661741435527802, -0.0005514627555385232, -0.013395257294178009, 0.06543181836605072, -0.03418320044875145, -0.011024795472621918, 0.0019116323674097657, -0.0010532864835113287, 0.06172623485326767, -0.009701690636575222, -0.023992232978343964, 0.0006618676125071943, -0.03178004175424576, -0.04895944893360138, -0.012333250604569912, 0.04995337873697281, 0.04539850726723671, -0.04561269283294678, 0.02867927961051464, 0.018340280279517174, 0.004895309917628765, -0.022500058636069298, 0.006840589456260204, -0.006418099161237478, 6.833836325525188e-33, 0.01780482567846775, 0.010503013618290424, 0.02644631825387478, 0.00021536578424274921, 0.08651691675186157, -0.02182501181960106, 0.03355960175395012, 0.011214806698262691, -0.01018731202930212, 0.031887054443359375, -0.011009560897946358, -0.03266604617238045, 0.007510227616876364, 0.028164232149720192, 0.09302091598510742, -0.016426552087068558, 0.01551523432135582, -0.0008483944111503661, -0.06421195715665817, 0.0021981243044137955, 0.006141963414847851, 0.003987668082118034, 0.013470644131302834, 0.033248670399188995, 0.01727220229804516, 0.049667466431856155, 0.011456029489636421, -0.005632242187857628, -0.018650773912668228, 0.000005306500952428905, -0.0017714706482365727, 0.019915355369448662, -0.0012153972638770938, -0.027597155421972275, 0.017336314544081688, 0.04986601322889328, 0.008208981715142727, -0.014712139964103699, -0.034151945263147354, -0.0031483520288020372, -0.0061700171791017056, 0.03139699622988701, -0.005470675881952047, 0.029940899461507797, -0.0025556995533406734, 0.011962889693677425, 0.003135890932753682, -0.02674887329339981, -0.02314063534140587, 0.01025170274078846, 0.0021099387668073177, 0.017772991210222244, 0.01050577312707901, 0.014574346132576466, 0.0446891114115715, -0.04006975516676903, -0.00601480295881629, 0.045598872005939484, 0.00004271931902621873, -0.007492351811379194, -0.013737154193222523, -0.03760834410786629, -0.008246215060353279, 0.005313306115567684, -0.037533245980739594, -0.01020288560539484, -0.020360440015792847, -0.016867855563759804, 0.016434786841273308, 0.02193535678088665, -0.00556647265329957, -0.0486903041601181, 0.01335595827549696, 0.018338432535529137, -0.001426113536581397, -0.02292482927441597, -0.025130338966846466, 0.0017712978878989816, -0.01776757836341858, 0.01433043833822012, 0.05663566291332245, 0.00014886711142025888, 0.05866394191980362, 0.02352975308895111, 0.009323342703282833, 0.038930561393499374, -0.016512077301740646, 0.0367029644548893, 0.02384740300476551, 0.026936987414956093, 0.003989202436059713, -0.04044301435351372, 0.008357557468116283, 0.026636771857738495, 0.01058228500187397, -1.2674279403768196e-8, -0.04867948964238167, 0.002881521824747324, -0.011362777091562748, -0.009503820911049843, -0.003250925336033106, 0.02514474280178547, 0.000812221085652709, -0.00490978267043829, -0.004504470154643059, 0.01457207277417183, 0.03640705719590187, -0.03554627671837807, 0.027085350826382637, 0.02716459147632122, -0.040371302515268326, -0.0570196732878685, 0.00421949615702033, -0.012887230142951012, 0.042091984301805496, 0.016059350222349167, -0.03775354474782944, 0.0101561164483428, -0.01715651899576187, 0.005519262980669737, 0.006671591196209192, -0.007494574412703514, 0.013313350267708302, -0.0896066278219223, -0.015279511921107769, -0.00774034857749939, 0.01288434024900198, -0.030072679743170738, -0.013008516281843185, 0.015152894891798496, -0.019017698243260384, -0.04969562217593193, -0.009380764327943325, 0.031180301681160927, 0.026132049039006233, 0.01307323481887579, -0.004018711857497692, 0.004067057278007269, 0.009288606233894825, -0.019217969849705696, -0.004563693888485432, 0.029579490423202515, -0.0010359676089137793, -0.006121646147221327, -0.02970530278980732, -0.01934685744345188, -0.004758886992931366, -0.034732334315776825, -0.015850761905312538, 0.016921954229474068, 0.03600863739848137, -0.04048263281583786, -0.006077066529542208, 0.03779583424329758, 0.0027678627520799637, -0.04859156906604767, -0.0023054471239447594, -0.010743161663413048, -0.035422373563051224, -0.05000591278076172 ]
rggplot-controlling-x-axis-order
https://markhneedham.com/blog/2015/02/27/rggplot-controlling-x-axis-order
false
2015-02-11 07:09:25
R: Weather vs attendance at NoSQL meetups
[ "r-2", "rstats" ]
[ "R" ]
A few weeks ago I came across a tweet by https://twitter.com/seanjtaylor[Sean Taylor] asking for a weather data set with a few years worth of recording and I was surprised to learn that R already has such a thing - the http://cran.r-project.org/web/packages/weatherData/index.html[weatherData] package. +++ <blockquote class="twitter-tweet"><p lang="en" dir="ltr">Winner is: <a href="https://twitter.com/UTVilla?ref_src=twsrc%5Etfw">@UTVilla</a>! <br>library(weatherData)<br>df &lt;- getWeatherForYear(&quot;SFO&quot;, 2013)<br>ggplot(df, aes(x=Date, y = Mean_TemperatureF)) + geom_line()</p>&mdash; Sean J. Taylor (@seanjtaylor) <a href="https://twitter.com/seanjtaylor/status/558073466419941378?ref_src=twsrc%5Etfw">January 22, 2015</a></blockquote> <script async src="https://platform.twitter.com/widgets.js" charset="utf-8"></script> +++ weatherData provides a thin veneer around the http://www.wunderground.com/[wunderground] API and was exactly what I'd been looking for to compare meetup at London's NoSQL against weather conditions that day. The first step was to download the appropriate weather recordings and save them to a CSV file so I wouldn't have to keep calling the API. I thought I may as well download all the recordings available to me and wrote the following code to make that happen: [source,r] ---- library(weatherData) # London City Airport getDetailedWeatherForYear = function(year) { getWeatherForDate("LCY", start_date= paste(sep="", year, "-01-01"), end_date = paste(sep="", year, "-12-31"), opt_detailed = FALSE, opt_all_columns = TRUE) } df = rbind(getDetailedWeatherForYear(2011), getDetailedWeatherForYear(2012), getDetailedWeatherForYear(2013), getDetailedWeatherForYear(2014), getWeatherForDate("LCY", start_date="2015-01-01", end_date = "2015-01-25", opt_detailed = FALSE, opt_all_columns = TRUE)) ---- I then saved that to a CSV file: [source,r] ---- write.csv(df, 'weather/temp_data.csv', row.names = FALSE) ---- [source,bash] ---- "Date","GMT","Max_TemperatureC","Mean_TemperatureC","Min_TemperatureC","Dew_PointC","MeanDew_PointC","Min_DewpointC","Max_Humidity","Mean_Humidity","Min_Humidity","Max_Sea_Level_PressurehPa","Mean_Sea_Level_PressurehPa","Min_Sea_Level_PressurehPa","Max_VisibilityKm","Mean_VisibilityKm","Min_VisibilitykM","Max_Wind_SpeedKm_h","Mean_Wind_SpeedKm_h","Max_Gust_SpeedKm_h","Precipitationmm","CloudCover","Events","WindDirDegrees" 2011-01-01,"2011-1-1",7,6,4,5,3,1,93,85,76,1027,1025,1023,10,9,3,14,10,NA,0,7,"Rain",312 2011-01-02,"2011-1-2",4,3,2,1,0,-1,87,81,75,1029,1028,1027,10,10,10,11,8,NA,0,7,"",321 2011-01-03,"2011-1-3",4,2,1,0,-2,-5,87,74,56,1028,1024,1019,10,10,10,8,5,NA,0,6,"Rain-Snow",249 2011-01-04,"2011-1-4",6,3,1,3,1,-1,93,83,65,1019,1013,1008,10,10,10,21,6,NA,0,5,"Rain",224 2011-01-05,"2011-1-5",8,7,5,6,3,0,93,80,61,1008,1000,994,10,9,4,26,16,45,0,4,"Rain",200 2011-01-06,"2011-1-6",7,4,3,6,3,1,93,90,87,1002,996,993,10,9,5,13,6,NA,0,5,"Rain",281 2011-01-07,"2011-1-7",11,6,2,9,5,2,100,91,82,1003,999,996,10,7,2,24,11,NA,0,5,"Rain-Snow",124 2011-01-08,"2011-1-8",11,7,4,8,4,-1,87,77,65,1004,997,987,10,10,5,39,23,50,0,5,"Rain",230 2011-01-09,"2011-1-9",7,4,3,1,0,-1,87,74,57,1018,1012,1004,10,10,10,24,16,NA,0,NA,"",242 ---- If we want to read that back in future we can do so with the following code: [source,R] ---- weather = read.csv("weather/temp_data.csv") weather$Date = as.POSIXct(weather$Date) > weather %>% sample_n(10) %>% select(Date, Min_TemperatureC, Mean_TemperatureC, Max_TemperatureC) Date Min_TemperatureC Mean_TemperatureC Max_TemperatureC 1471 2015-01-10 5 9 14 802 2013-03-12 -2 1 4 1274 2014-06-27 14 18 22 848 2013-04-27 5 8 10 832 2013-04-11 6 8 10 717 2012-12-17 6 7 9 1463 2015-01-02 6 9 13 1090 2013-12-25 4 6 7 560 2012-07-13 15 18 20 1230 2014-05-14 9 14 19 ---- The next step was to bring the weather data together with the meetup attendance data that I already had. For simplicity's sake I've got those saved in a CSV file as we can just read those in as well: [source,r] ---- timestampToDate <- function(x) as.POSIXct(x / 1000, origin="1970-01-01", tz = "GMT") events = read.csv("events.csv") events$eventTime = timestampToDate(events$eventTime) > events %>% sample_n(10) %>% select(event.name, rsvps, eventTime) event.name rsvps eventTime 36 London Office Hours - Old Street 10 2012-01-18 17:00:00 137 Enterprise Search London 34 2011-05-23 18:15:00 256 MarkLogic User Group London: Jim Fuller 40 2014-04-29 18:30:00 117 Neural Networks and Data Science 171 2013-03-28 18:30:00 210 London Office Hours - Old Street 3 2011-09-15 17:00:00 443 July social! 12 2014-07-14 19:00:00 322 Intro to Graphs 39 2014-09-03 18:30:00 203 Vendor focus: Amazon CloudSearch 24 2013-05-16 17:30:00 17 Neo4J Tales from the Trenches: A Recommendation Engine Case Study 12 2012-04-25 18:30:00 55 London Office Hours 10 2013-09-18 17:00:00 ---- Now that we've got our two datasets ready we can plot a simple chart of the average attendance and temperature grouped by month: [source,r] ---- byMonth = events %>% mutate(month = factor(format(eventTime, "%B"), levels=month.name)) %>% group_by(month) %>% summarise(events = n(), count = sum(rsvps)) %>% mutate(ave = count / events) %>% arrange(desc(ave)) averageTemperatureByMonth = weather %>% mutate(month = factor(format(Date, "%B"), levels=month.name)) %>% group_by(month) %>% summarise(aveTemperature = mean(Mean_TemperatureC)) g1 = ggplot(aes(x = month, y = aveTemperature, group=1), data = averageTemperatureByMonth) + geom_line( ) + ggtitle("Temperature by month") g2 = ggplot(aes(x = month, y = count, group=1), data = byMonth) + geom_bar(stat="identity", fill="dark blue") + ggtitle("Attendance by month") library(gridExtra) grid.arrange(g1,g2, ncol = 1) ---- image::{{<siteurl>}}/uploads/2015/02/2015-02-09_20-32-50.png[2015 02 09 20 32 50,600] We can see a rough inverse correlation between the temperature and attendance, particularly between April and August - as the temperature increases, total attendance decreases. But what about if we compare at a finer level of granularity such as a specific date? We can do that by adding a 'day' column to our events data frame and merging it with the weather one: [source,r] ---- byDay = events %>% mutate(day = as.Date(as.POSIXct(eventTime))) %>% group_by(day) %>% summarise(events = n(), count = sum(rsvps)) %>% mutate(ave = count / events) %>% arrange(desc(ave)) weather = weather %>% mutate(day = Date) merged = merge(weather, byDay, by = "day") ---- Now we can plot the attendance vs the mean temperature for individual days: [source,R] ---- ggplot(aes(x =count, y = Mean_TemperatureC,group = day), data = merged) + geom_point() ---- image::{{<siteurl>}}/uploads/2015/02/2015-02-10_07-21-24.png[2015 02 10 07 21 24,600] Interestingly there now doesn't seem to be any correlation between the temperature and attendance. We can confirm our suspicions by running a correlation: [source,r] ---- > cor(merged$count, merged$Mean_TemperatureC) [1] 0.008516294 ---- Not even 1% correlation between the values! One way we could confirm that non correlation is to plot the average temperature against the average attendance rather than total attendance: [source,r] ---- g1 = ggplot(aes(x = month, y = aveTemperature, group=1), data = averageTemperatureByMonth) + geom_line( ) + ggtitle("Temperature by month") g2 = ggplot(aes(x = month, y = ave, group=1), data = byMonth) + geom_bar(stat="identity", fill="dark blue") + ggtitle("Attendance by month") grid.arrange(g1,g2, ncol = 1) ---- image::{{<siteurl>}}/uploads/2015/02/2015-02-11_06-48-05.png[2015 02 11 06 48 05,600] Now we can see there's not really that much of a correlation between temperature and month - in fact 9 of the months have a very similar average attendance. It's only July, December and especially August where there's a noticeable dip. This could suggest there's another variable other than temperature which is influencing attendance in these months. My hypothesis is that we'd see lower attendance in the weeks of school holidays - the main ones happen in July/August, December and March/April (which interestingly don't show the dip!) Another interesting thing to look into is whether the reason for the dip in attendance isn't through lack of will from attendees but rather because there aren't actually any events to go to. Let's plot the number of events being hosted each month against the temperature: [source,r] ---- g1 = ggplot(aes(x = month, y = aveTemperature, group=1), data = averageTemperatureByMonth) + geom_line( ) + ggtitle("Temperature by month") g2 = ggplot(aes(x = month, y = events, group=1), data = byMonth) + geom_bar(stat="identity", fill="dark blue") + ggtitle("Events by month") grid.arrange(g1,g2, ncol = 1) ---- image::{{<siteurl>}}/uploads/2015/02/2015-02-11_06-57-16.png[2015 02 11 06 57 16,600] Here we notice there's a big dip in events in December - organisers are hosting less events and we know from our earlier plot that on average less people are attending those events. Lots of events are hosted in the Autumn, slightly fewer in the Spring and fewer in January, March and August in particular. Again there's no particular correlation between temperature and the number of events being hosted on a particular day: [source,r] ---- ggplot(aes(x = events, y = Mean_TemperatureC,group = day), data = merged) + geom_point() ---- image::{{<siteurl>}}/uploads/2015/02/2015-02-11_07-05-48.png[2015 02 11 07 05 48,600] There's not any obvious correlation from looking at this plot although I find it difficult to interpret plots where we have the values all grouped around very few points (often factor variables) on one axis and spread out (continuous variable) on the other. Let's confirm our suspicion by calculating the correlation between these two variables: [source,r] ---- > cor(merged$events, merged$Mean_TemperatureC) [1] 0.0251698 ---- Back to the drawing board for my attendance prediction model then! If you have any suggestions for doing this analysis more effectively or I've made any mistakes please let me know in the comments, I'm still learning how to investigate what data is actually telling us.
null
null
[ 0.048266008496284485, -0.03596895933151245, 0.022661754861474037, 0.029909882694482803, 0.07575518637895584, 0.031822241842746735, 0.040347471833229065, 0.041227299720048904, 0.017478860914707184, 0.011279936879873276, -0.016432886943221092, 0.007594499737024307, -0.07309850305318832, 0.008037419058382511, -0.02474004589021206, 0.07380416989326477, 0.049516476690769196, 0.0027260645292699337, 0.051597606390714645, 0.014967581257224083, 0.042303863912820816, 0.04700499773025513, -0.012615910731256008, 0.010034682229161263, 0.03596734628081322, -0.009325547143816948, 0.022942502051591873, 0.01814408041536808, -0.046961817890405655, 0.0053810072131454945, 0.05645434930920601, 0.04339899867773056, -0.009147943928837776, -0.015123085118830204, 0.023419007658958435, 0.01424895878881216, -0.02022305317223072, 0.01843094453215599, -0.011149651370942593, 0.009831923991441727, -0.07334079593420029, 0.029167231172323227, -0.014176287688314915, -0.006306810770183802, -0.03963707387447357, 0.03912258520722389, -0.00766889750957489, 0.0349181592464447, 0.009731100872159004, 0.012652142904698849, -0.0752616673707962, 0.04860902577638626, -0.01219581626355648, -0.018142273649573326, -0.012842545285820961, 0.0545414537191391, 0.008349630050361156, -0.09798716008663177, 0.011877225711941719, -0.026453262194991112, 0.014130738563835621, -0.01117390301078558, -0.007929904386401176, -0.005122986622154713, 0.00667814165353775, -0.030339162796735764, -0.02693517878651619, 0.037537623196840286, -0.024123601615428925, -0.0031415200792253017, -0.02333684079349041, 0.03392066806554794, -0.03551114723086357, -0.006461795419454575, -0.00478714145720005, -0.050364986062049866, 0.0013822501059621572, 0.0720604732632637, 0.01547220814973116, 0.037890128791332245, -0.01825723983347416, -0.022872669622302055, 0.038516923785209656, 0.03832411393523216, 0.009324750863015652, -0.023422053083777428, -0.029554862529039383, -0.022630475461483, -0.0701460987329483, 0.06021774932742119, 0.01993042230606079, -0.041097115725278854, 0.034830305725336075, 0.014145909808576107, -0.01569787971675396, 0.017392504960298538, -0.01552878599613905, 0.002686822786927223, -0.020610125735402107, -0.04775789752602577, -0.05840597674250603, -0.026149699464440346, 0.03196074813604355, 0.0037263361737132072, -0.07092966139316559, -0.0010499487398192286, -0.019042687490582466, -0.01680152863264084, 0.04001061990857124, 0.02951085940003395, 0.006271127611398697, 0.01606414094567299, 0.0037525559309870005, -0.0153044443577528, -0.0656607523560524, 0.05865337327122688, 0.040495969355106354, -0.025567013770341873, -0.028613481670618057, 0.005318338517099619, 0.03688861429691315, 0.02776099368929863, -0.017750319093465805, 0.06256943941116333, -0.014445926994085312, 0.08292316645383835, -0.0133931003510952, 0.027154233306646347, -0.01459724735468626, -0.053345777094364166, -0.01637728326022625, 0.06020013615489006, -0.0381573885679245, 0.015032744035124779, -0.02345181070268154, -0.01080410461872816, -0.023930590599775314, -0.015031727030873299, 0.07391153275966644, 0.06483688950538635, 0.010489040054380894, -0.013720717281103134, 0.008811994455754757, -0.010415425524115562, 0.017627131193876266, 0.05000343173742294, 0.0021905091125518084, -0.03159472718834877, -0.04054206237196922, 0.008270400576293468, 0.035294242203235626, -0.016360275447368622, 0.048266518861055374, -0.030815087258815765, 0.02222280576825142, 0.055234041064977646, 0.05265559256076813, -0.002311619697138667, -0.008214756846427917, 0.005661319941282272, 0.07614465057849884, 0.04561850056052208, 0.007931545376777649, 0.05918494611978531, -0.0017699929885566235, -0.04211308807134628, 0.01082506775856018, 0.025746282190084457, -0.015120667405426502, 0.005161227658390999, -0.04574039950966835, -0.06367427110671997, 0.07519594579935074, -0.0039438605308532715, 0.002764633158221841, 0.023908933624625206, 0.07676248252391815, 0.01663738116621971, 0.040680937469005585, 0.0264502614736557, -0.07880561798810959, 0.0521843358874321, 0.034572288393974304, 0.03797833248972893, 0.04074384644627571, -0.021556632593274117, 0.08490350842475891, 0.01800890453159809, 0.013634726405143738, 0.03761466220021248, -0.0825524628162384, -0.08526909351348877, -0.028632106259465218, -0.015059770084917545, 0.042117778211832047, -0.03698990121483803, 0.02833760716021061, 0.07390038669109344, 0.02152508869767189, 0.05306088551878929, 0.006852877791970968, -0.02086350880563259, 0.030712388455867767, -0.06195387989282608, -0.08186519145965576, 0.037476133555173874, 0.05259443446993828, -0.027827391400933266, -0.00691221235319972, 0.013147874735295773, -0.02720935270190239, 0.030787747353315353, 0.0322461873292923, -0.02490229904651642, 0.01731281168758869, 0.019384771585464478, 0.03052365593612194, 0.011714020743966103, 0.05443519353866577, -0.03583557903766632, 0.04212676361203194, 0.011279984377324581, 0.01436092983931303, -0.02252628095448017, -0.0008192429086193442, 0.11108898371458054, 0.04499945417046547, -0.021942783147096634, -0.03928740322589874, -0.0029578357934951782, -0.0028263831045478582, -0.014251136220991611, 0.0249798521399498, 0.0022876013536006212, -0.008141071535646915, 0.025255374610424042, -0.01756482943892479, -0.03758040815591812, -0.00026019159122370183, -0.03440796956419945, 0.02204964868724346, 0.06754718720912933, -0.011353760026395321, 0.0615260936319828, -0.038335658609867096, -0.0068437750451266766, 0.004797668196260929, -0.03567881137132645, -0.043168433010578156, -0.021748095750808716, 0.027835242450237274, 0.003404177026823163, 0.020343763753771782, -0.0227146465331316, -0.01888209581375122, -0.019047711044549942, -0.03340526670217514, 0.02208113856613636, 0.07122932374477386, 0.04813430830836296, -0.014762303791940212, 0.036510590463876724, -0.02021317556500435, 0.006326182279735804, -0.02112923189997673, -0.031269509345293045, -0.04222552850842476, -0.02947741188108921, -0.02601827308535576, 0.011478101834654808, 0.0512891560792923, -0.012907861731946468, 0.007146821822971106, 0.017763005569577217, 0.010819009505212307, -0.01464755553752184, 0.01602519489824772, -0.0046836985275149345, 0.0032535691279917955, 0.0003696738858707249, -0.009645632468163967, 0.049757685512304306, -0.016154877841472626, -0.04639250785112381, -0.0023154274094849825, -0.0674811601638794, 0.05073515698313713, -0.05191512778401375, -0.030061056837439537, 0.0006962681654840708, -0.026795240119099617, 0.02585729956626892, 0.041832245886325836, 0.01209504995495081, 0.044754549860954285, -0.00641134986653924, 0.04406192526221275, 0.011433196254074574, -0.010022739879786968, 0.041240040212869644, -0.0007858886383473873, 0.020776469260454178, 0.06604168564081192, -0.020515315234661102, 0.004490113817155361, -0.04741072282195091, 0.007990861311554909, -0.026162851601839066, -0.2760404646396637, 0.039064135402441025, 0.03186817467212677, -0.05321643128991127, 0.04021424055099487, -0.03927009925246239, 0.029820788651704788, -0.02985462173819542, -0.01267324946820736, 0.016015203669667244, 0.016356363892555237, -0.017669184133410454, -0.04923512414097786, 0.023089872673153877, 0.01041746698319912, -0.017611633986234665, -0.02646918222308159, -0.04131501540541649, 0.026971353217959404, 0.046463560312986374, 0.023588523268699646, -0.023595737293362617, -0.003803929779678583, 0.0394657738506794, 0.0335087776184082, 0.07648130506277084, -0.07304603606462479, 0.0069356076419353485, -0.033215828239917755, -0.011303522624075413, 0.025762692093849182, -0.02311832271516323, 0.026226568967103958, 0.012745490297675133, -0.006331711541861296, -0.00748316990211606, 0.05621141195297241, 0.024641409516334534, 0.005741489585489035, 0.016966843977570534, -0.03996889665722847, -0.03592096269130707, -0.013883965089917183, -0.014691587537527084, 0.07909932732582092, 0.019822781905531883, -0.04134286195039749, 0.010779036208987236, -0.028667710721492767, 0.0674709901213646, -0.021658068522810936, -0.027411488816142082, -0.03965675085783005, 0.02261369861662388, -0.035761065781116486, -0.018285229802131653, -0.01326274685561657, -0.007877509109675884, -0.04016644507646561, -0.03444545716047287, -0.004921744577586651, -0.042666107416152954, -0.01683012954890728, -0.026637302711606026, -0.03478335216641426, -0.07497923821210861, -0.07369780540466309, -0.017800213769078255, 0.07395320385694504, -0.007927943021059036, -0.02190530113875866, -0.00808472279459238, -0.02242603898048401, -0.10993555933237076, -0.015410936437547207, -0.013586853630840778, -0.03122149407863617, -0.013427253812551498, 0.043712738901376724, 0.034288134425878525, -0.06012750044465065, -0.05709782615303993, 0.03201528638601303, 0.016290953382849693, 0.005790583789348602, 0.007014621049165726, 0.017430808395147324, -0.024933770298957825, -0.03360304608941078, -0.01240704394876957, 0.07158704847097397, -0.05901631712913513, -0.0189918614923954, -0.0023417677730321884, -0.005390611477196217, 0.0393839031457901, -0.005387934856116772, -0.011010213755071163, 0.01999148353934288, 0.05136149749159813, 0.014666780829429626, -0.043529435992240906, 0.013700508512556553, -0.05832232907414436, -0.007891827262938023, -0.03805932775139809, -0.05174748972058296, 0.03385505452752113, -0.002526544965803623, 0.04850923269987106, 0.015313631854951382, -0.028520487248897552, -0.002270860830321908, -0.05128900334239006, -0.03582528978586197, 0.013927757740020752, 0.018035423010587692, 0.029397033154964447, 0.019101522862911224, -0.013723695650696754, -0.04788368195295334, 0.009657518938183784, 0.009633295238018036, -0.030258994549512863, -0.0382087416946888, -0.012752431444823742, 0.0267257709056139, -0.025114813819527626, 0.007893898524343967, 0.00996312964707613, -0.028761181980371475, 0.010688095353543758, 0.03524044528603554, -0.03303251042962074, 0.019665023311972618, -0.0187827255576849, -0.02309241145849228, -0.06020021811127663, 0.04177184775471687, -0.007174082566052675, -0.029965968802571297, 0.023434942588210106, 0.008247604593634605, 0.010006064549088478, 0.04141683131456375, 0.011968995444476604, 0.016023986041545868, 0.017711058259010315, 0.02876303531229496, -0.0008640990126878023, -0.0016787128988653421, -0.024106448516249657, -0.014300256036221981, -0.02217383123934269, -0.017202410846948624, -0.005269892048090696, 0.04078909009695053, -0.0300920270383358, -0.015657922253012657, -0.0347018837928772, 0.03379867598414421, -0.04234609752893448, -0.024720370769500732, -0.002350092865526676, 0.0007089184946380556, 0.02188309095799923, 0.01120282243937254, 0.017525814473628998, -0.005165098700672388, -0.017168421298265457, -0.01361723244190216, -0.013548624701797962, -0.028216151520609856, -0.0021090898662805557, -0.03909134119749069, -0.007662512362003326, 0.012665271759033203, -0.0009078076109290123, 0.018567997962236404, 0.02672501839697361, -0.012495988979935646, 0.005691340658813715, -0.024411415681242943, 0.010257983580231667, 0.045377861708402634, 0.056249313056468964, -0.026049252599477768, -0.0003307396254967898, -0.013775520958006382, -0.004813153296709061, -0.024463288486003876, 0.004325831308960915, -0.03443021699786186, 0.013387013226747513, -0.025841379538178444, -0.07660606503486633, 0.040839653462171555, 0.014040444977581501, -0.004385820589959621, 0.05568497255444527, -0.036986093968153, -0.008964444510638714, -0.033230625092983246, 0.03710722550749779, 0.04508250951766968, -0.05957208573818207, -0.013533810153603554, 0.010853327810764313, -0.026297874748706818, -0.009099198505282402, 0.008931806311011314, -0.0667182207107544, 0.0025555649772286415, -0.006172372493892908, 0.01843268610537052, -0.04726109281182289, -0.044570159167051315, -0.03648057207465172, 0.007221996784210205, -0.031639471650123596, -0.00040845508920028806, -0.017365247011184692, 0.0007492281147278845, -0.02092217653989792, -0.016120076179504395, 0.02578703686594963, -0.01903531700372696, -0.03177681565284729, 0.02377305179834366, -0.04212981089949608, 0.0019020721083506942, -0.02085700072348118, 0.014467579312622547, 0.04611021280288696, -0.044439829885959625, 0.012325606308877468, -0.0389789380133152, 0.0041088806465268135, -0.004312146455049515, 0.04466559365391731, -0.03107537142932415, -0.008965404704213142, -0.03058687038719654, -0.026596788316965103, -0.043752796947956085, -0.0023735733702778816, -0.012925208546221256, 0.021686626598238945, 0.04079688712954521, 0.02923792228102684, 0.022553719580173492, 0.013447634875774384, -0.03797689080238342, -0.010025933384895325, 0.05503644049167633, -0.06800936162471771, -0.02846069633960724, -0.029531586915254593, -0.028545942157506943, -0.0004979090299457312, 0.0077283489517867565, 0.0003919824375770986, -0.038384947925806046, 0.04176856577396393, 0.009879626333713531, 0.02123250439763069, 0.07861398905515671, -0.023770421743392944, 0.020321104675531387, -0.035781823098659515, 0.004208228085190058, -0.08853459358215332, 0.010637874715030193, 0.0205373577773571, -0.020111611112952232, -0.03700748831033707, -0.0048888493329286575, -0.031528059393167496, 0.03346126899123192, -0.05185132473707199, -0.047468673437833786, 0.03230560943484306, -0.03668162226676941, -0.0008929860778152943, 0.010527028702199459, -0.0291147343814373, 0.011938437819480896, 0.042901284992694855, -0.0373019240796566, -0.020286064594984055, -0.011986236087977886, 0.0414431095123291, -0.028300028294324875, 0.01565258949995041, -0.031040461733937263, -0.03846817463636398, 0.0522337481379509, 0.02543705329298973, 0.004818278830498457, 0.03881702199578285, -0.04856495559215546, 0.017416253685951233, 0.02271384373307228, -0.006419243291020393, 0.013100343756377697, 0.020899279043078423, -0.004252695012837648, -0.06481587886810303, 0.018785763531923294, 0.026575282216072083, -0.01937762089073658, -0.03879234194755554, 0.07788553088903427, 0.019590433686971664, -0.04600111022591591, 0.005141296423971653, 0.008123037405312061, -0.024035479873418808, -0.005054772365838289, -0.027927642688155174, -0.013528005219995975, -0.06002100929617882, 0.05843987315893173, 0.027114387601614, 0.01796426624059677, 0.09364422410726547, -0.006319512613117695, 0.009178945794701576, -0.0073116435669362545, 0.08650217950344086, 0.08865725249052048, 0.06094767898321152, -0.028959769755601883, 0.059348683804273605, -0.03142867609858513, -0.0436873696744442, 0.012976459227502346, -0.008502745069563389, -0.005728585179895163, -0.0310023482888937, -0.014156771823763847, 0.07618704438209534, -0.021844210103154182, 0.05353543162345886, -0.028496932238340378, -0.047897640615701675, 0.002953421790152788, 0.0215370524674654, 0.015932636335492134, 0.02159951813519001, -0.008673176169395447, 0.03508449345827103, -0.0031834724359214306, -0.025889458134770393, 0.07304473966360092, -0.01441306620836258, -0.02321675606071949, 0.008421652019023895, -0.013130338862538338, -0.0029039490036666393, 0.005485359579324722, 0.05967920273542404, 0.06629336625337601, -0.04232380911707878, -0.005080165807157755, -0.010316363535821438, 0.056958504021167755, -0.015801554545760155, 0.04388533905148506, 0.009441773407161236, 0.011229770258069038, -0.006492183543741703, -0.04846842586994171, -0.0013346112100407481, -0.0038761149626225233, -0.03165039047598839, 0.03045565076172352, -0.034879911690950394, 0.013575016520917416, 0.00034169110585935414, -0.05591676011681557, -0.03516370430588722, -0.04953376203775406, -0.030078181996941566, -0.06310409307479858, -0.052263446152210236, -0.053302302956581116, 0.018087472766637802, -0.01069173775613308, -0.016185762360692024, -0.0035559043753892183, -0.03684211149811745, -0.03080533817410469, 0.020572958514094353, -0.05447426810860634, -0.020645665004849434, 0.022636713460087776, 0.013963812030851841, -0.00047777415602467954, 0.025532474741339684, 0.04900699853897095, 0.010575635358691216, -0.02434326708316803, -0.02725423313677311, 0.04334820806980133, 0.05353027954697609, 0.06729935109615326, -0.008961044251918793, -0.07345528900623322, 0.006198458839207888, 0.013525270856916904, -0.013903946615755558, -0.06391524523496628, 0.011463169008493423, 0.0037938300520181656, -0.00212461082264781, 0.037207987159490585, 0.006881857290863991, 0.015885550528764725, -0.039411548525094986, -0.02503654919564724, 0.0051047345623373985, 0.011876251548528671, 0.0328189954161644, -0.03501743823289871, 0.0814732238650322, 0.025256523862481117, 0.005278400145471096, -0.038209933787584305, -0.021063584834337234, 0.02027835138142109, -0.03061985969543457, -0.05548161268234253, -0.05339118093252182, -0.05827165022492409, -0.10114609450101852, -0.034656718373298645, 0.03762746974825859, -0.035828325897455215, -0.007637683302164078, 0.05407083407044411, 0.04078076779842377, -0.01170914527028799, 0.04783051833510399, -0.028878912329673767, 0.011492517776787281, -0.007960258983075619, -0.019969820976257324, 0.00017497209773864597, 0.04304296895861626, -0.02495085448026657, 0.015058401972055435, -0.007820031605660915, -0.0467742495238781, 0.004598045721650124, -0.031248480081558228, -0.00524924648925662, 0.015665220096707344, 0.0040151034481823444, 0.004038420505821705 ]
[ -0.057718902826309204, -0.02503727376461029, 0.0015737756621092558, 0.015924157574772835, 0.12494923919439316, -0.05107850581407547, -0.018866363912820816, 0.027175866067409515, 0.0012340338435024023, 0.00045820826198905706, -0.03254968672990799, -0.03920668736100197, 0.019059468060731888, 0.02095864526927471, 0.03370805084705353, 0.000955808674916625, 0.02146458998322487, -0.10115421563386917, 0.0015454856911674142, 0.043636173009872437, -0.028952959924936295, 0.010505536571145058, -0.02448328211903572, -0.02475605718791485, 0.0271777231246233, 0.02520148642361164, 0.01613892801105976, -0.024589119479060173, -0.028546666726469994, -0.1718137115240097, 0.0003714381600730121, -0.019636007025837898, 0.027618156746029854, -0.0031693142373114824, -0.0035478281788527966, 0.01846342720091343, 0.031637877225875854, -0.0031525669619441032, 0.010688085108995438, 0.055418867617845535, 0.017756087705492973, -0.017094863578677177, -0.052703842520713806, -0.020307321101427078, 0.031172143295407295, 0.0014838908100500703, -0.009315570816397667, 0.0003570533008314669, -0.0011213311227038503, 0.02491294965147972, -0.03949086368083954, 0.01591770350933075, -0.022575458511710167, -0.02916826121509075, -0.0029030691366642714, 0.06324711441993713, 0.001760223414748907, 0.07190161943435669, 0.023647358641028404, 0.009673606604337692, 0.007990710437297821, 0.004824257921427488, -0.16845840215682983, 0.09366690367460251, -0.017071746289730072, 0.04486291483044624, -0.015330827794969082, 0.007991519756615162, -0.007645700126886368, 0.0377044752240181, -0.01215697918087244, -0.0118055185303092, -0.006750430911779404, 0.03913204371929169, -0.010278456844389439, 0.005965949967503548, -0.03188944607973099, 0.029293881729245186, -0.016255872324109077, -0.062061529606580734, 0.007517294958233833, 0.04231877252459526, 0.0006244311225600541, -0.031132442876696587, -0.006256206426769495, -0.0256960429251194, -0.020787052810192108, 0.059960123151540756, 0.012285969220101833, 0.016107916831970215, 0.026842808350920677, -0.03515369072556496, 0.045558758080005646, 0.018062865361571312, -0.0899367704987526, -0.015787603333592415, 0.03267557546496391, 0.03893161565065384, -0.024339526891708374, 0.41870224475860596, -0.04541889205574989, -0.00891715008765459, 0.03614846616983414, 0.0969030112028122, -0.0036993848625570536, -0.021878302097320557, 0.004793242551386356, -0.08548488467931747, 0.0009370127227157354, -0.024460788816213608, 0.009053896181285381, -0.045093316584825516, 0.0678485631942749, -0.05097860470414162, 0.02612670138478279, -0.03164924681186676, 0.06401827186346054, 0.021608684211969376, -0.011865017004311085, -0.0016974312020465732, -0.03346290439367294, 0.0011637163115665317, 0.06798592209815979, 0.021941356360912323, 0.018988486379384995, -0.017865585163235664, 0.061364442110061646, 0.06944771856069565, 0.04298387095332146, 0.013840999454259872, 0.07040359824895859, -0.02302177995443344, -0.08293821662664413, 0.008468874730169773, -0.014587922021746635, 0.0018183215288445354, 0.024111490696668625, -0.02437552995979786, -0.0021385226864367723, 0.02323121950030327, -0.015103209763765335, -0.05508529394865036, 0.04695206508040428, -0.017701586708426476, -0.037560708820819855, 0.11709920316934586, -0.021597569808363914, -0.03270968049764633, -0.019144274294376373, -0.08749043196439743, 0.015492042526602745, 0.022480659186840057, 0.020522404462099075, -0.059979163110256195, 0.04725130647420883, 0.043083418160676956, 0.07012559473514557, -0.014558716677129269, -0.030874628573656082, -0.005968456622213125, 0.017027242109179497, -0.030881544575095177, -0.017721524462103844, 0.018707001581788063, 0.011334969662129879, -0.12243539094924927, -0.005208382848650217, 0.00792550016194582, 0.01765998639166355, -0.05736427381634712, 0.03964327648282051, 0.007168969605118036, -0.006133985240012407, -0.008286314085125923, 0.04529901221394539, -0.0015576607547700405, -0.021414123475551605, 0.010715704411268234, 0.05441121384501457, 0.010454189032316208, -0.02861403487622738, -0.02911105565726757, -0.01273032184690237, 0.01827101595699787, -0.04336128756403923, -0.04815198853611946, -0.050801489502191544, -0.020036326721310616, -0.010839816182851791, 0.001040279516018927, -0.014143201522529125, -0.08391325175762177, -0.038425881415605545, 0.04503096267580986, -0.05129127949476242, -0.0009523248299956322, 0.016329681500792503, -0.0012275594053789973, 0.02916821651160717, -0.04971681162714958, -0.02180129662156105, -0.0365760363638401, -0.010903936810791492, 0.019460078328847885, -0.04067496582865715, 0.06657642871141434, 0.0551481693983078, -0.04888583719730377, 0.07198074460029602, 0.04276229441165924, 0.015446743927896023, -0.033046282827854156, -0.006403867155313492, -0.01086496002972126, -0.014305519871413708, -0.0018129111267626286, 0.020233187824487686, -0.03504563868045807, 0.001192100695334375, 0.034787047654390335, -0.01013466902077198, -0.04816415160894394, -0.006984485778957605, -0.3573276698589325, -0.06757783889770508, -0.01191861554980278, 0.003026677528396249, 0.049562983214855194, -0.08335533738136292, 0.009204254485666752, -0.014596514403820038, 0.0032666614279150963, 0.0644732266664505, 0.10574666410684586, -0.033075492829084396, -0.0019759652204811573, -0.10885002464056015, 0.012212003581225872, 0.03559809923171997, -0.025861728936433792, 0.00564615661278367, 0.0068430532701313496, 0.0016025286167860031, -0.02264859713613987, 0.009762197732925415, -0.04594457894563675, -0.049906376749277115, 0.02734328992664814, -0.031129511073231697, 0.10888923704624176, 0.016822470352053642, 0.049805544316768646, -0.056213170289993286, 0.03064173460006714, -0.03173628821969032, 0.02963058277964592, -0.08118697255849838, -0.0026947171427309513, -0.005872595123946667, 0.029697664082050323, 0.029306620359420776, -0.024879921227693558, -0.060643021017313004, -0.02790960669517517, 0.04949037358164787, -0.016996292397379875, -0.03754813224077225, -0.056210026144981384, 0.008554537780582905, -0.01943277381360531, -0.010457969270646572, -0.04514311999082565, 0.034232717007398605, -0.009895989671349525, -0.006918485276401043, 0.03755129128694534, 0.006371042225509882, 0.0419430173933506, -0.016719944775104523, -0.089754119515419, 0.01253795437514782, -0.0007510454161092639, -0.00684472406283021, 0.008995706215500832, 0.049994029104709625, 0.0614582821726799, -0.05961215868592262, -0.033994559198617935, 0.021698467433452606, -0.017170922830700874, -0.018558116629719734, 0.025546260178089142, 0.0011204230831936002, -0.03989443555474281, 0.10623560845851898, -0.05419650301337242, 0.052537206560373306, 0.032328080385923386, 0.022405853495001793, 0.005677957087755203, 0.00816451758146286, 0.02120811492204666, 0.0010864369105547667, 0.06018996983766556, -0.04461972415447235, 0.040352534502744675, -0.011403740383684635, 0.0016436883015558124, 0.042082663625478745, -0.010767205618321896, -0.010961553081870079, 0.050161395221948624, 0.033371053636074066, 0.014718296937644482, -0.011993104591965675, -0.002695908769965172, -0.08208315074443817, 0.07471708953380585, 0.0038822933565825224, -0.26531490683555603, 0.01003736536949873, 0.04778838902711868, 0.002659580670297146, -0.015764659270644188, -0.018307654187083244, 0.004668791778385639, 0.0011644157348200679, -0.0177578367292881, 0.009867027401924133, 0.004404208157211542, 0.05762829631567001, 0.0034787142649292946, -0.008200766518712044, 0.02985656075179577, -0.0046773189678788185, -0.005014124792069197, 0.029683297500014305, 0.008472983725368977, 0.01592038758099079, 0.017171069979667664, -0.027602089568972588, 0.14478859305381775, 0.028446530923247337, 0.0036507437471300364, 0.053424905985593796, -0.02339267171919346, 0.010805491358041763, 0.07185869663953781, 0.0010703951120376587, 0.0033869631588459015, -0.02071721851825714, -0.002283624839037657, 0.010230125859379768, 0.019775213673710823, -0.03530510514974594, -0.029486993327736855, 0.07030881941318512, 0.03343756124377251, -0.016219599172472954, -0.031512219458818436, 0.04392652213573456, -0.007938885129988194, 0.02455286681652069, 0.0566420704126358, 0.009236396290361881, 0.009924309328198433, -0.06153736636042595, -0.06893260031938553, 0.01587381400167942, -0.004214697051793337, -0.04544045776128769, -0.015127579681575298, -0.0030655108857899904, 0.011448502540588379, 0.08969814330339432, 0.006560456473380327, -0.01869790069758892, 0.019796986132860184, 0.011433840729296207, -0.004922816529870033, -0.07245931774377823, 0.0644586831331253, -0.01917237788438797, 0.04700757563114166 ]
[ -0.0039643654599785805, 0.03392381593585014, 0.015659907832741737, 0.031369052827358246, 0.018032915890216827, -0.002580118365585804, 0.0025906339287757874, -0.009672214277088642, -0.020388927310705185, -0.009437558241188526, -0.05159059539437294, -0.01463913545012474, 0.013947401195764542, -0.024572117254137993, 0.020678678527474403, 0.009749422781169415, -0.05853766202926636, -0.060484956949949265, 0.02757045067846775, -0.03564538434147835, -0.047975338995456696, 0.04851001501083374, -0.014899715781211853, 0.03664003312587738, -0.008834776468575, 0.024481957778334618, -0.03893183916807175, 0.03737208619713783, 0.0269504152238369, -0.043588172644376755, -0.02037058211863041, -0.018235575407743454, -0.008180015720427036, 0.015991520136594772, -0.02304152026772499, 0.008715429343283176, -0.02160656452178955, 0.03753795847296715, -0.015031292103230953, 0.029159199446439743, -0.033547237515449524, -0.025415681302547455, 0.020600980147719383, -0.0024025242310017347, -0.018368123099207878, -0.005196803715080023, -0.02540832944214344, -0.007700679358094931, -0.029225561767816544, -0.019120285287499428, -0.013886104337871075, 0.007778190542012453, -0.01564905047416687, 0.008228883147239685, -0.002085610292851925, -0.003853249829262495, -0.06055925413966179, -0.008966823108494282, -0.013515571132302284, -0.030193964019417763, -0.03465725854039192, -0.0058781858533620834, -0.05317160487174988, -0.009167494252324104, 0.018627803772687912, -0.014076078310608864, -0.05971875414252281, 0.030156584456562996, 0.016317540779709816, 0.006667623296380043, -0.008755164220929146, 0.06605812907218933, -0.03596004843711853, -0.03388151526451111, -0.026320207864046097, 0.021175377070903778, 0.014637338928878307, -0.02684948965907097, 0.008127721026539803, 0.0025000288151204586, -0.029575854539871216, -0.0038916447665542364, 0.001138403662480414, 0.012011304497718811, 0.004761500284075737, -0.033200573176145554, 0.030701350420713425, 0.009944522753357887, -0.01891704834997654, 0.01711861975491047, -0.016570940613746643, 0.0003066313802264631, 0.006753975059837103, 0.04245579615235329, -0.10013274103403091, 0.020179593935608864, 0.02908550761640072, -0.009648953564465046, -0.011310580186545849, 0.8440955281257629, -0.028576936572790146, -0.022873230278491974, -0.005555728916078806, 0.015501270070672035, 0.008448665961623192, -0.02262069657444954, -0.024856016039848328, -0.029246564954519272, 0.041561052203178406, -0.04073714464902878, -0.010747130028903484, 0.024017415940761566, 0.005424265284091234, 0.0276468675583601, 0.029282759875059128, 0.02303955890238285, -0.00010638354433467612, 0.010811285115778446, 0.016483495011925697, 0.011023820377886295, 0.000020505485736066476, 0.022411178797483444, 0.006532961502671242, 0.015129989013075829, 0.024348648265004158, -0.16996106505393982, 0.06342026591300964, -6.448161037124211e-33, 0.08847098797559738, -0.008309083059430122, 0.0002684270148165524, -0.014273914508521557, 0.03318685293197632, 0.0014300503535196185, -0.05389198288321495, 0.006133859045803547, 0.006344739813357592, -0.005324508063495159, -0.02715953439474106, 0.02864016778767109, 0.016956815496087074, -0.03594060614705086, 0.04605735093355179, 0.006074840202927589, -0.005193275399506092, 0.019907411187887192, 0.0026827638503164053, 0.011663918383419514, -0.01805613748729229, 0.022140417248010635, 0.02559899352490902, 0.02477603778243065, 0.0049813054502010345, 0.020441144704818726, 0.04024338349699974, 0.030288053676486015, -0.002721038879826665, -0.05042673647403717, -0.006172145251184702, 0.03139811009168625, 0.012362336739897728, 0.0057636043056845665, 0.04892729967832565, -0.041313327848911285, -0.03626910597085953, 0.025744497776031494, -0.005349550396203995, -0.0019515265012159944, -0.005410099867731333, -0.0016739947022870183, -0.03608861193060875, -0.02385016530752182, -0.009429548867046833, -0.00459214486181736, -0.005545283202081919, 0.03887761011719704, -0.02388748526573181, 0.012747649103403091, 0.0144190713763237, 0.017874369397759438, -0.013462943024933338, -0.023234693333506584, -0.006980337668210268, 0.01812196709215641, 0.02994384430348873, -0.0033905913587659597, 0.03705340996384621, 0.014594399370253086, 0.004545815289020538, -0.028463589027523994, 0.0401790551841259, -0.005320379976183176, 0.02340300939977169, -0.004969033412635326, -0.014936483465135098, -0.009598840028047562, -0.013385869562625885, -0.017583634704351425, -0.01963440515100956, 0.03437052667140961, -0.0038227809127420187, -0.011152524501085281, 0.0647362545132637, -0.012891712598502636, 0.02144850790500641, 0.000815257546491921, 0.01668281853199005, 0.03638285771012306, 0.005238513462245464, -0.0005987422773614526, 0.051085200160741806, -0.02361249178647995, -0.016839439049363136, -0.050857435911893845, 0.008341530337929726, -0.0069643184542655945, -0.019687773659825325, 0.03835176303982735, -0.0040558078326284885, 0.025222938507795334, 0.0031608189456164837, -0.03182408958673477, 0.007257480639964342, 6.683660310051918e-33, 0.0007282252190634608, -0.01816660724580288, 0.005401995033025742, -0.027366047725081444, 0.03140944987535477, -0.03147905692458153, 0.017550235614180565, 0.025858407840132713, -0.00037141310167498887, 0.04821651801466942, -0.0009288522996939719, -0.029231205582618713, -0.02051187865436077, -0.0014735417207702994, 0.0598062127828598, -0.01656465418636799, 0.01965486630797386, -0.008070958778262138, -0.029011443257331848, -0.0031380499713122845, -0.010566380806267262, -0.016177885234355927, 0.008135905489325523, -0.006132937967777252, 0.017666611820459366, 0.023138180375099182, 0.03035959042608738, 0.0059647345915436745, -0.006072056479752064, -0.022840742021799088, -0.006073055323213339, -0.010624940507113934, -0.009760203771293163, -0.008196447975933552, 0.002595605095848441, 0.07631900906562805, 0.01987537369132042, -0.04425972327589989, 0.012466257438063622, -0.025330547243356705, 0.02758745849132538, 0.005888373125344515, 0.005310285370796919, 0.005359923932701349, -0.0023021316155791283, 0.028070928528904915, -0.013896641321480274, 0.011563344858586788, -0.03816341608762741, -0.0032054658513516188, 0.02431740052998066, 0.00724954716861248, -0.00092406285693869, 0.02611304074525833, 0.034906499087810516, -0.012310932390391827, -0.010505306534469128, -0.004682239610701799, -0.027215374633669853, -0.010575123131275177, -0.0007820511818863451, -0.03461674973368645, -0.026190873235464096, 0.019010812044143677, -0.04916848614811897, -0.035755455493927, -0.035819459706544876, -0.009061821736395359, 0.015197538770735264, 0.0405125729739666, -0.006087657064199448, -0.04505939036607742, 0.01021287590265274, 0.007964328862726688, 0.008879213593900204, -0.0139810461550951, 0.004177201073616743, 0.013226578943431377, -0.007528911344707012, 0.016454024240374565, 0.024427829310297966, 0.04273658245801926, 0.026096340268850327, -0.010264459997415543, 0.02316228486597538, 0.022065259516239166, -0.024367699399590492, 0.0003305532445665449, 0.041678108274936676, 0.01702968403697014, 0.0005722951609641314, -0.0035286059137433767, -0.0042441789992153645, 0.027857720851898193, 0.0076307449489831924, -1.2493139855962454e-8, -0.046582840383052826, 0.00662552984431386, -0.012614031322300434, 0.008407210931181908, -0.0019107116386294365, 0.0011216418351978064, 0.035496458411216736, -0.012950696982443333, -0.011205699294805527, 0.013554330915212631, 0.0731191337108612, 0.007810346782207489, -0.005323041696101427, 0.01109551265835762, -0.033889394253492355, -0.06811004877090454, -0.026759186759591103, -0.021371321752667427, 0.019402455538511276, 0.01731320284307003, 0.0106602618470788, 0.024968471378087997, -0.028282582759857178, -0.015929600223898888, 0.06394089758396149, -0.010414870455861092, 0.011958771385252476, -0.0744737833738327, -0.004414186347275972, -0.00570794427767396, 0.0029219600837677717, -0.04083883389830589, -0.02507195621728897, -0.001539421733468771, -0.012700975872576237, -0.04124031588435173, 0.006337434984743595, 0.03496312350034714, -0.010091887786984444, -0.002012947341427207, 0.015082609839737415, 0.016499578952789307, -0.029099496081471443, -0.028316587209701538, -0.005226570647209883, -0.005924099590629339, -0.03608417510986328, 0.012330029159784317, -0.0014072085032239556, -0.01979900524020195, 0.005230104550719261, -0.028741275891661644, 0.024670712649822235, 0.03684823587536812, 0.029608994722366333, -0.021463504061102867, -0.0028661589603871107, -0.021717974916100502, -0.026448825374245644, -0.039078421890735626, -0.039862796664237976, 0.009547023102641106, -0.02219557762145996, -0.016223065555095673 ]
r-weather-vs-attendance-at-nosql-meetups
https://markhneedham.com/blog/2015/02/11/r-weather-vs-attendance-at-nosql-meetups
false
2015-02-16 21:39:16
Python/pandas: Column value in list (ValueError: The truth value of a Series is ambiguous.)
[ "python" ]
[ "Python" ]
I've been using Python's http://pandas.pydata.org/[pandas] library while exploring some CSV files and although for the most part I've found it intuitive to use, I had trouble filtering a data frame based on checking whether a column value was in a list. A subset of one of the CSV files I've been working with looks like this: [source,python] ---- $ cat foo.csv "Foo" 1 2 3 4 5 6 7 8 9 10 ---- Loading it into a pandas data frame is reasonably simple: [source,python] ---- import pandas as pd df = pd.read_csv('foo.csv', index_col=False, header=0) >>> df Foo 0 1 1 2 2 3 3 4 4 5 5 6 6 7 7 8 8 9 9 10 ---- If we want to find the rows which have a value of 1 we'd write the following: [source,python] ---- >>> df[df["Foo"] == 1] Foo 0 1 ---- Finding the rows with a value less than 7 is as you'd expect too: [source,python] ---- >>> df[df["Foo"] < 7] Foo 0 1 1 2 2 3 3 4 4 5 5 6 ---- Next I wanted to filter out the rows containing odd numbers which I initially tried to do like this: [source,python] ---- odds = [i for i in range(1,10) if i % 2 <> 0] >>> odds [1, 3, 5, 7, 9] >>> df[df["Foo"] in odds] Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/markneedham/projects/neo4j-himym/himym/lib/python2.7/site-packages/pandas/core/generic.py", line 698, in __nonzero__ .format(self.__class__.__name__)) ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all(). ---- Unfortunately that doesn't work and I couldn't get any of the suggestions from the error message to work either. Luckily pandas has a special +++<cite>+++http://pandas.pydata.org/pandas-docs/dev/generated/pandas.DataFrame.isin.html[isin]+++</cite>+++ function for this use case which we can call like this: [source,python] ---- >>> df[df["Foo"].isin(odds)] Foo 0 1 2 3 4 5 6 7 8 9 ---- Much better!
null
null
[ 0.020958419889211655, 0.00964154303073883, -0.02628971077501774, 0.025368303060531616, 0.08910472691059113, 0.03270982205867767, -0.05302564799785614, 0.010325470007956028, 0.005247078835964203, -0.02388872765004635, 0.025437340140342712, 0.0007329726940952241, -0.06894154846668243, 0.027658825740218163, 0.0036691688001155853, 0.056540556252002716, 0.07269670814275742, 0.007798222359269857, 0.02459115721285343, -0.006929420866072178, 0.009280664846301079, 0.030144033953547478, -0.04744945093989372, 0.026415221393108368, -0.013766029849648476, -0.013418209739029408, 0.008144493214786053, 0.023081446066498756, -0.03565572202205658, 0.02602268196642399, 0.03249828517436981, 0.016569238156080246, 0.0031366196926683187, 0.00012685546244028956, 0.011539740487933159, 0.005767045076936483, -0.005375792738050222, 0.015941007062792778, -0.014378653839230537, 0.00965206790715456, -0.08326765894889832, 0.012899394147098064, -0.02434154413640499, 0.03672998771071434, -0.04202623665332794, 0.005112838000059128, -0.027445979416370392, 0.032817404717206955, -0.0163162499666214, 0.023260295391082764, -0.014291884377598763, 0.035000383853912354, 0.0086038364097476, -0.05574142187833786, 0.03581005334854126, 0.07122727483510971, 0.0006632647709921002, -0.08327005803585052, 0.02468712441623211, -0.015851344913244247, 0.009117301553487778, -0.023926809430122375, -0.006063207518309355, 0.018543517217040062, 0.027815600857138634, -0.025005701929330826, -0.0191243514418602, 0.06201370432972908, -0.0344218872487545, -0.02197900228202343, -0.018466059118509293, 0.02492598630487919, -0.045696135610342026, -0.024652834981679916, -0.002306511625647545, -0.017571313306689262, -0.01487992238253355, 0.02587098628282547, 0.024676090106368065, 0.024247989058494568, -0.003734306199476123, 0.009363541379570961, 0.020552122965455055, -0.0027651807758957148, 0.03444967418909073, -0.07656525820493698, -0.0471842885017395, -0.03310601785778999, -0.051017265766859055, 0.02856014110147953, -0.010065129026770592, -0.020313970744609833, 0.03166365996003151, -0.017947256565093994, -0.04454920068383217, -0.02838275395333767, 0.018457990139722824, -0.013648332096636295, 0.03489682823419571, 0.0022745628375560045, -0.08291204273700714, -0.04008862003684044, 0.04779517650604248, 0.034245334565639496, -0.0646553561091423, -0.01596701145172119, 0.013122806325554848, 0.002175082452595234, 0.018604950979351997, 0.013251228258013725, -0.031168771907687187, -0.017727306112647057, -0.007227577269077301, -0.03294173628091812, -0.09762661904096603, 0.03920132294297218, 0.006501066964119673, -0.031358502805233, -0.012899693101644516, 0.018100403249263763, 0.04510703310370445, 0.03525605797767639, -0.01865110732614994, 0.056060124188661575, 0.022169819101691246, 0.011937524192035198, 0.007371561601758003, 0.07752753049135208, 0.015340421348810196, -0.09051856398582458, -0.04028801992535591, 0.044901177287101746, -0.016909247264266014, -0.0006233482272364199, 0.004352551884949207, -0.04119576886296272, -0.027913905680179596, 0.004539598245173693, 0.045720700174570084, -0.004103804938495159, 0.044752009212970734, -0.030740652233362198, -0.015247183851897717, 0.016670141369104385, 0.026740573346614838, 0.03066319227218628, 0.019369332119822502, -0.047805316746234894, -0.027250787243247032, 0.005789441987872124, 0.02229563519358635, 0.04870565980672836, 0.09751471132040024, -0.014287774451076984, 0.0010584879200905561, 0.07794900983572006, 0.025376470759510994, 0.014251405373215675, -0.02354762889444828, 0.0006115791038610041, 0.04924739897251129, 0.043407637625932693, -0.004753019195050001, 0.030449053272604942, -0.01881404221057892, -0.030276451259851456, 0.010222334414720535, 0.05278458073735237, -0.027915693819522858, 0.030724631622433662, -0.034998442977666855, -0.08592407405376434, 0.062305111438035965, -0.020276324823498726, 0.02948847971856594, 0.00963329616934061, 0.04974262788891792, 0.03377602994441986, 0.03492121770977974, -0.0010337503626942635, -0.06468065083026886, 0.030740879476070404, -0.01966690830886364, 0.03512423485517502, 0.048506058752536774, -0.003197398502379656, 0.08528357744216919, 0.0044304560869932175, 0.05638718977570534, 0.06359612196683884, -0.059864453971385956, -0.04354453086853027, -0.05599130690097809, 0.0020987014286220074, 0.027787311002612114, -0.0524737648665905, -0.012843752279877663, 0.04863099753856659, 0.016060281544923782, 0.023764757439494133, 0.010622091591358185, -0.008017568849027157, 0.0192226804792881, -0.021461382508277893, -0.036355357617139816, 0.0020952660124748945, 0.03543156757950783, -0.01324815396219492, 0.011784362606704235, 0.04540049284696579, -0.023415792733430862, 0.0005444167763926089, 0.019100558012723923, -0.013196532614529133, 0.051271550357341766, 0.054467227309942245, 0.06143247336149216, 0.014036865904927254, 0.027390768751502037, -0.07012280821800232, 0.027858572080731392, -0.01838592253625393, -0.01801714301109314, -0.07696215808391571, -0.004601856227964163, 0.13511040806770325, 0.06297824531793594, -0.009128468111157417, -0.07345942407846451, 0.005253205541521311, -0.009389209561049938, -0.015098790638148785, 0.025170689448714256, -0.019055170938372612, -0.0172542966902256, 0.00734686478972435, -0.031804244965314865, -0.02038327045738697, 0.034451138228178024, -0.015141943469643593, 0.005919903516769409, 0.03883301094174385, -0.011603127233684063, 0.02713603898882866, 0.02772274613380432, -0.048909544944763184, -0.004054654389619827, -0.03440677002072334, -0.0691513642668724, -0.014314908534288406, 0.02649122290313244, 0.0008195587433874607, 0.04765632376074791, -0.03254657983779907, -0.06192733719944954, -0.009104108437895775, -0.0703233927488327, 0.03218701854348183, 0.09139823913574219, 0.041570939123630524, -0.022897107526659966, 0.020771648734807968, -0.025876741856336594, -0.02421148493885994, -0.022640177980065346, -0.02955789491534233, -0.03169335424900055, -0.019339798018336296, 0.007216223049908876, 0.005490896757692099, -0.0005012571928091347, 0.004511152859777212, -0.007693731226027012, -0.0019577648490667343, 0.004741215612739325, -0.019567450508475304, 0.055923622101545334, -0.009232311509549618, 0.0018674114253371954, -0.03952743858098984, 0.013261301442980766, 0.06344161182641983, -0.0209116879850626, -0.033362194895744324, 0.006994329858571291, -0.05225033313035965, 0.03448095545172691, -0.031099563464522362, -0.03128017857670784, -0.0008935001096688211, 0.025618474930524826, 0.05275201052427292, -0.003927384037524462, -0.016680369153618813, 0.03695853799581528, 0.02297057956457138, -0.01176142692565918, 0.03919362276792526, 0.031064501032233238, 0.04897706210613251, 0.027381114661693573, 0.018414733931422234, 0.08252501487731934, 0.0054611642844974995, -0.0169583298265934, -0.05691608041524887, -0.00819406844675541, -0.017899412661790848, -0.26964738965034485, 0.03752361610531807, -0.027893081307411194, -0.031784772872924805, 0.0027822123374789953, -0.032691750675439835, 0.0024619856849312782, -0.023838773369789124, -0.01415980514138937, -0.00943843275308609, -0.00975676067173481, -0.033794037997722626, -0.034493353217840195, 0.04049345850944519, 0.00930292159318924, 0.017993798479437828, -0.013963301666080952, -0.04474174976348877, 0.013496032916009426, 0.042546920478343964, 0.01486077718436718, -0.022748202085494995, -0.007968027144670486, 0.07517129182815552, 0.006153857335448265, 0.07010842114686966, -0.06101129949092865, 0.02556384727358818, -0.08271795511245728, -0.06553798913955688, 0.012973823584616184, -0.04468803107738495, -0.021292107179760933, -0.009732754901051521, 0.010179266333580017, -0.015178979374468327, 0.03624958172440529, 0.014880627393722534, -0.023824123665690422, 0.03389674425125122, -0.037298016250133514, -0.012668024748563766, -0.013153111562132835, -0.017049230635166168, 0.07572060078382492, -0.000250474811764434, -0.058816827833652496, -0.0021320199593901634, -0.03199898079037666, 0.057964202016592026, -0.01934322528541088, -0.0006528357043862343, -0.02869696170091629, 0.03749498352408409, -0.03453359380364418, 0.021101726219058037, -0.022528458386659622, 0.009486820548772812, -0.03927578032016754, -0.02402414008975029, -0.005188358016312122, -0.04364874213933945, -0.0120452381670475, -0.0503602959215641, -0.029536563903093338, -0.06853606551885605, -0.05128457024693489, -0.013335537165403366, 0.04828108474612236, 0.04697011038661003, -0.06127089262008667, 0.030689865350723267, 0.043147921562194824, -0.10723335295915604, 0.01948171854019165, -0.04132382944226265, 0.009920810349285603, -0.007386086508631706, -0.016023311764001846, 0.041891325265169144, -0.05162286385893822, -0.041461069136857986, 0.03000825084745884, 0.017748555168509483, 0.011876331642270088, -0.034581538289785385, -0.0009247201378457248, -0.006771252024918795, -0.02319929748773575, -0.00918471347540617, 0.05190189555287361, -0.038592513650655746, 0.009817231446504593, 0.021998325362801552, -0.03004445508122444, 0.07328019291162491, 0.001122987479902804, 0.01825956627726555, 0.025756806135177612, 0.031514205038547516, 0.041903525590896606, -0.02926877699792385, -0.030924061313271523, -0.0925152450799942, -0.010881545022130013, -0.013657897710800171, -0.05710182338953018, 0.038067929446697235, -0.0038111533503979445, 0.020369574427604675, 0.017214279621839523, -0.01431437861174345, 0.027184654027223587, -0.03684261441230774, 0.006254664622247219, -0.011495858430862427, 0.007240192499011755, -0.0018080791924148798, 0.017698345705866814, 0.008005790412425995, -0.04046220704913139, 0.003740566084161401, 0.001163542503491044, -0.012188268825411797, -0.056696198880672455, -0.041204534471035004, 0.021376783028244972, 0.017876069992780685, -0.019555717706680298, -0.0055021923035383224, -0.027058856561779976, 0.008871636353433132, 0.04885631799697876, -0.02111978828907013, 0.043201744556427, -0.04299527406692505, -0.03944513946771622, 0.010657835751771927, 0.00857578031718731, 0.038616590201854706, -0.010587064549326897, -0.002195898676291108, -0.0010090330615639687, 0.05274847149848938, 0.03552844747900963, -0.003350217128172517, 0.020676754415035248, 0.035636287182569504, 0.021113496273756027, 0.007153049577027559, 0.004584898240864277, -0.001257496071048081, 0.0183914452791214, -0.018868466839194298, -0.07841387391090393, 0.02904249168932438, 0.05491599813103676, 0.010906658135354519, -0.02013685554265976, -0.046331387013196945, 0.020928192883729935, -0.015330859459936619, 0.00583987683057785, -0.032158300280570984, 0.008780069649219513, 0.05585616081953049, -0.0037911906838417053, 0.012452363967895508, 0.021218053996562958, 0.014873622916638851, -0.004024021327495575, 0.03867216780781746, -0.021678859367966652, 0.016174187883734703, 0.006021900102496147, -0.015644609928131104, 0.05955144390463829, 0.038747675716876984, -0.021630477160215378, 0.010371202602982521, -0.028163611888885498, -0.02504620887339115, 0.012820635922253132, 0.006563038099557161, 0.026850519701838493, 0.07207120954990387, -0.029766855761408806, -0.01015012338757515, -0.0048399679362773895, -0.03704632818698883, -0.05851726606488228, -0.02758353017270565, 0.014213373884558678, -0.014306719414889812, -0.031804949045181274, -0.056725893169641495, 0.03724919259548187, 0.002636473160237074, -0.02995912916958332, -0.004664679989218712, -0.03878992050886154, 0.011423186399042606, -0.02715034782886505, 0.01439820509403944, 0.04781653359532356, -0.04680463299155235, 0.00508138258010149, -0.013718323782086372, 0.014658106490969658, 0.025842607021331787, 0.0013368026120588183, -0.08638964593410492, -0.030737290158867836, -0.02609102986752987, 0.026716064661741257, -0.0031742393039166927, -0.02447269670665264, -0.02789951302111149, 0.024255186319351196, -0.015611378476023674, 0.04631536826491356, -0.02025829628109932, 0.020501989871263504, -0.02339075319468975, -0.008450436405837536, 0.018500013276934624, -0.009452573955059052, -0.03457002714276314, 0.016209637746214867, 0.015230303630232811, -0.01860359124839306, 0.004912529606372118, 0.03034752979874611, 0.01568053662776947, -0.024711061269044876, -0.016968069598078728, -0.04089644178748131, -0.007243867497891188, -0.0007877369062043726, 0.03963716700673103, 0.0026086336001753807, 0.0022317247930914164, -0.01961817592382431, -0.007520755287259817, -0.01827407069504261, 0.00010805540659930557, 0.005796641577035189, -0.048035409301519394, 0.012191572226583958, 0.06431158632040024, 0.007613295689225197, 0.002785094315186143, -0.011141308583319187, -0.05253534018993378, 0.06036745011806488, 0.0016907179960981011, -0.03350584954023361, -0.04006680101156235, -0.039561495184898376, 0.015146877616643906, 0.01854737289249897, 0.02462708204984665, -0.04534037411212921, 0.034469228237867355, 0.02666560746729374, 0.034104716032743454, 0.0483023039996624, 0.024454329162836075, 0.05666370317339897, -0.03657567501068115, -0.034596748650074005, -0.10428314656019211, 0.01729164645075798, 0.04838162288069725, -0.008634315803647041, 0.006297367624938488, -0.014866427518427372, -0.009415263310074806, 0.008031397126615047, -0.0498039610683918, -0.04323503375053406, 0.059058673679828644, 0.021954435855150223, 0.023293428122997284, -0.01798447035253048, -0.01734142377972603, -0.017067832872271538, 0.06049766018986702, -0.038234248757362366, -0.006821813993155956, -0.02312779240310192, 0.06365495920181274, -0.03083907440304756, 0.015011325478553772, 0.00455345306545496, -0.021975422278046608, 0.059024736285209656, 0.03864701837301254, 0.023032432422041893, 0.02220776304602623, -0.023865142837166786, 0.040542855858802795, 0.02296614833176136, -0.030747922137379646, -0.006944254040718079, 0.0051615675911307335, 0.016250448301434517, -0.0349389873445034, 0.005385491531342268, 0.02843453548848629, 0.008844751864671707, -0.04999557137489319, 0.07998160272836685, -0.006825163960456848, -0.03763097897171974, -0.029310114681720734, -0.00871833972632885, -0.029988590627908707, 0.0088764987885952, -0.02409576252102852, -0.017803575843572617, -0.02384619414806366, 0.04426161199808121, -0.033017225563526154, -0.007347067818045616, 0.05034762993454933, -0.018156904727220535, 0.002624308690428734, 0.043003980070352554, 0.05700299143791199, 0.06538021564483643, 0.02814343199133873, 0.01637991890311241, 0.031801022589206696, -0.009820564649999142, -0.04836825281381607, 0.0060430001467466354, -0.04165252670645714, 0.011072918772697449, -0.03729982674121857, -0.013523587025702, 0.045351095497608185, 0.013616329059004784, 0.07148458808660507, -0.010519233532249928, 0.023778963834047318, -0.014794960618019104, 0.00841198768466711, 0.03232939913868904, 0.04393494501709938, -0.018785500898957253, 0.04694044217467308, -0.019187554717063904, -0.005880230106413364, 0.028227362781763077, 0.020190054550766945, -0.04585437476634979, 0.012968874536454678, 0.00903258752077818, -0.009130408987402916, 0.017632409930229187, 0.03684212267398834, 0.07316365092992783, -0.03974950313568115, -0.0047735413536429405, 0.009682640433311462, 0.036504004150629044, -0.03521663323044777, -0.002292089629918337, 0.003629944985732436, -0.027822932228446007, -0.011745464988052845, -0.03977223485708237, -0.01834023743867874, -0.03155403211712837, -0.03006056882441044, -0.008181148208677769, -0.03780169412493706, -0.003570034634321928, 0.03862407058477402, 0.006135115399956703, -0.028904370963573456, -0.02755802869796753, -0.06802114099264145, -0.025735579431056976, -0.08125241845846176, -0.024534381926059723, 0.007115651853382587, -0.019286561757326126, -0.013644412159919739, -0.030758455395698547, -0.034145455807447433, -0.0028371510561555624, 0.003365439595654607, -0.04221426323056221, -0.05042129382491112, 0.013827098533511162, 0.04089640453457832, 0.00824680458754301, 0.00018564447236713022, 0.037886857986450195, -0.03157779201865196, -0.030360018834471703, 0.019034715369343758, 0.007131350692361593, 0.05818551406264305, 0.026538683101534843, 0.036087844520807266, -0.06636939197778702, 0.0017506669973954558, 0.01687595248222351, -0.008338249288499355, -0.07954427599906921, 0.04842693358659744, 0.033094845712184906, 0.006461434997618198, 0.033826518803834915, 0.0079325120896101, 0.008653279393911362, 0.001428913208656013, -0.054241374135017395, 0.014870566315948963, 0.006174655631184578, 0.04162426292896271, -0.03639157861471176, 0.06520884484052658, 0.04690277576446533, 0.01578824408352375, -0.053113069385290146, 0.005382855888456106, -0.01694655418395996, 0.009063143283128738, -0.07039690762758255, -0.03901201859116554, -0.06767772138118744, -0.050583574920892715, 0.02106481045484543, 0.010263290256261826, -0.05525701493024826, -0.029951298609375954, 0.006606004200875759, -0.0029150599148124456, -0.03857011720538139, 0.020243411883711815, -0.05144629627466202, 0.01249972078949213, -0.038533128798007965, -0.03534990921616554, -0.0087575763463974, 0.0820789560675621, 0.0033838483504951, 0.011147158220410347, 0.015522850677371025, -0.042465344071388245, -0.00766889750957489, -0.0101195452734828, 0.009736821986734867, 0.08503322303295135, -0.025309449061751366, 0.039866384118795395 ]
[ -0.06405032426118851, -0.02979329600930214, -0.05180561542510986, -0.011209880001842976, 0.09933734685182571, -0.03873852267861366, -0.00290221837349236, 0.010696062818169594, 0.0544254444539547, 0.050908200442790985, 0.035462938249111176, -0.10189595818519592, 0.01394693460315466, -0.027465399354696274, -0.02984677255153656, -0.03608236461877823, -0.03246717527508736, -0.05971454456448555, -0.05436072498559952, 0.06028708815574646, -0.03476062789559364, -0.04341673478484154, -0.06261639297008514, -0.05875782668590546, 0.04534020647406578, 0.02762790024280548, 0.0664718747138977, -0.05510152503848076, -0.032364290207624435, -0.21451950073242188, -0.007435983046889305, -0.03513193875551224, 0.04165302962064743, -0.0398237369954586, 0.010927251540124416, 0.011789859272539616, 0.028919043019413948, -0.010463990271091461, 0.024963295087218285, 0.05345568805932999, 0.008431166410446167, -0.028357354924082756, -0.007992574013769627, -0.037338126450777054, -0.01201806403696537, 0.003726027440279722, -0.014749085530638695, 0.013723829761147499, -0.002137517323717475, 0.01638473942875862, -0.05035400390625, 0.05042189732193947, -0.01697600819170475, -0.0109961973503232, -0.015154017135500908, 0.0154781024903059, 0.05001753196120262, 0.06602052599191666, 0.011719579808413982, 0.03247397392988205, 0.015724344179034233, -0.011506919749081135, -0.1367468684911728, 0.1096445769071579, -0.015371368266642094, 0.03835338354110718, -0.04405403882265091, -0.048235658556222916, -0.015437033027410507, 0.05497060716152191, 0.002793343272060156, -0.014086516574025154, -0.0443635955452919, 0.0818379670381546, 0.023542815819382668, -0.03982479125261307, 0.0031073461286723614, 0.009566654451191425, 0.04061875864863396, 0.015565987676382065, -0.061439331620931625, 0.0026534234639257193, 0.011622662656009197, -0.030695205554366112, 0.024509644135832787, -0.0021559903398156166, -0.0193985216319561, 0.038770657032728195, -0.017459668219089508, 0.00857350043952465, 0.007677155081182718, 0.010914010927081108, 0.013531475327908993, 0.07483390718698502, -0.05713276192545891, -0.027569225057959557, 0.03208258002996445, 0.014287000522017479, 0.02929576300084591, 0.383726567029953, -0.031888753175735474, 0.011255358345806599, -0.027053268626332283, 0.04994241148233414, 0.01163551863282919, -0.021923977881669998, -0.023618638515472412, -0.036538880318403244, 0.021663859486579895, -0.03570682927966118, -0.016880495473742485, -0.04717171937227249, 0.052835334092378616, -0.06320458650588989, 0.006922559812664986, 0.0028284594882279634, -0.013595101423561573, -0.011316844262182713, 0.02269791252911091, 0.027342963963747025, -0.023803213611245155, -0.03922209516167641, 0.05806375667452812, 0.006980591919273138, 0.010864836163818836, 0.02760223113000393, 0.03818908706307411, 0.08341250568628311, 0.024717386811971664, 0.007265317719429731, 0.02244638092815876, -0.06576301902532578, -0.09298495948314667, 0.00288011715747416, 0.015102284960448742, 0.011483491398394108, 0.016626818105578423, 0.021752532571554184, 0.007946811616420746, 0.013898670673370361, -0.0019712632056325674, -0.05994019657373428, 0.03513671085238457, 0.015733890235424042, -0.02373318187892437, 0.12411753833293915, -0.03142867237329483, -0.021797126159071922, -0.06104772537946701, -0.04467054083943367, 0.009121796116232872, 0.03277302905917168, -0.01652376912534237, -0.04464668408036232, 0.021193303167819977, 0.012912553735077381, 0.06760001182556152, -0.0277169831097126, -0.07706271857023239, -0.04432003200054169, -0.011387853883206844, -0.01892027072608471, -0.051723651587963104, 0.02211684361100197, 0.016699595376849174, -0.06649944186210632, -0.04503815993666649, 0.02780001610517502, -0.02953249402344227, -0.05482141673564911, 0.03078489564359188, 0.00920626986771822, -0.05814579501748085, 0.01857578195631504, 0.06474196910858154, -0.020308593288064003, -0.03152696043252945, 0.03289582580327988, 0.052609898149967194, 0.003981968853622675, 0.008358838967978954, 0.04200588911771774, -0.020017962902784348, 0.0037214152980595827, -0.02929149568080902, -0.074082151055336, -0.041071921586990356, 0.009391475468873978, -0.0015168654499575496, -0.038120489567518234, 0.0020632734522223473, -0.05914553627371788, -0.042271487414836884, 0.049480140209198, -0.02686651051044464, -0.010203615762293339, 0.05385097488760948, 0.004117260687053204, -0.027006832882761955, -0.04396926984190941, 0.014913083054125309, -0.01486249640583992, 0.021669769659638405, 0.04549400135874748, -0.043966423720121384, 0.014758379198610783, 0.014871783554553986, -0.04436352476477623, 0.06972302496433258, -0.00928383506834507, 0.007257521618157625, 0.02656114101409912, -0.030424393713474274, -0.01005268283188343, -0.00864984467625618, -0.021465962752699852, -0.0008169825887307525, 0.0020205480977892876, 0.006637015845626593, 0.020302478224039078, 0.026789214462041855, -0.07884601503610611, -0.017402715981006622, -0.3447391986846924, -0.05561444163322449, -0.009083208627998829, 0.0035435340832918882, 0.002545118099078536, -0.031123535707592964, -0.028798798099160194, 0.028387365862727165, -0.022149307653307915, 0.1010904461145401, 0.04288094863295555, -0.01443358976393938, -0.010489758104085922, -0.10476779192686081, -0.008318532258272171, 0.008102267049252987, -0.019019385799765587, -0.054962340742349625, -0.039378151297569275, 0.016540294513106346, 0.010206363163888454, -0.021218549460172653, 0.01026453822851181, -0.023013664409518242, 0.023829299956560135, -0.027826670557260513, 0.12009702622890472, 0.0033622831106185913, 0.06275709718465805, -0.04423648491501808, 0.005015352740883827, -0.003903761738911271, 0.012675217352807522, -0.008363437838852406, 0.0013508953852578998, -0.06744465976953506, -0.05720383673906326, 0.04350551590323448, -0.038251444697380066, -0.01932334527373314, -0.006931594107300043, 0.023805983364582062, -0.011839588172733784, -0.02451733872294426, -0.030904293060302734, 0.010450811125338078, 0.03965643793344498, 0.026939935982227325, -0.023460518568754196, 0.10383590310811996, 0.0006741822580806911, 0.022531447932124138, 0.03434082120656967, 0.04764770716428757, 0.03544730320572853, 0.0041436683386564255, -0.06666313111782074, 0.0012685232795774937, -0.016108211129903793, -0.035932451486587524, -0.0062523228116333485, 0.0062657566741108894, 0.07142437249422073, -0.03420154005289078, -0.01978776976466179, -0.020452093333005905, 0.03819699585437775, -0.0019479116890579462, 0.04352454096078873, 0.016737807542085648, -0.0393250472843647, 0.08626796305179596, -0.03509212285280228, 0.05160132795572281, 0.02797660045325756, 0.06741489470005035, -0.0314069427549839, 0.018766777589917183, 0.03177565708756447, -0.01522207260131836, 0.0936313048005104, -0.03095407597720623, 0.010279204696416855, 0.014594868756830692, 0.08515950292348862, 0.00602648826315999, 0.0038080839440226555, 0.01759699359536171, 0.021751604974269867, -0.00020780520571861416, 0.017686692997813225, -0.04000312089920044, -0.02455352060496807, -0.016526484861969948, 0.06409547477960587, 0.0006217935588210821, -0.254062682390213, 0.005777962040156126, -0.012462054379284382, 0.04377839341759682, 0.012835281901061535, -0.026032935827970505, 0.004681053571403027, -0.044518500566482544, 0.01656045950949192, 0.004118673503398895, -0.011965224519371986, 0.0466826893389225, 0.048472724854946136, -0.026493411511182785, -0.036481861025094986, -0.019985511898994446, 0.036107879132032394, 0.02813999354839325, 0.04991641640663147, 0.06051649525761604, 0.041859667748212814, -0.04561500623822212, 0.17413343489170074, 0.021479370072484016, 0.028380218893289566, -0.01895797997713089, 0.005461812950670719, -0.038172755390405655, 0.05802982673048973, 0.052237823605537415, 0.015735775232315063, -0.048644058406353, 0.05755025893449783, 0.009531390853226185, 0.005356237757951021, 0.017151527106761932, -0.02359229326248169, 0.06713919341564178, 0.04777535796165466, -0.04610266909003258, 0.0021737420465797186, 0.027007611468434334, -0.05215167999267578, 0.011995864100754261, 0.06983445584774017, -0.0058479211293160915, -0.006173225585371256, -0.07056249678134918, -0.0007945991819724441, 0.00024122820468619466, -0.02302633598446846, 0.017800379544496536, 0.02523140050470829, -0.02239968255162239, 0.038133345544338226, 0.05810060352087021, 0.03767368197441101, -0.003989565186202526, 0.04263727739453316, -0.04165906086564064, 0.013986158184707165, -0.08204911649227142, 0.10976394265890121, 0.015574981458485126, 0.017614565789699554 ]
[ -0.001980689587071538, 0.03456303849816322, -0.059116341173648834, 0.03415419161319733, 0.016034061089158058, -0.029161494225263596, 0.003986081574112177, -0.0033440401311963797, -0.014958425424993038, -0.023185191676020622, -0.03322761133313179, -0.010653188452124596, -0.020497282966971397, -0.03809640556573868, -0.007638759911060333, -0.03142926096916199, -0.018252000212669373, 0.011282529681921005, 0.04858618974685669, -0.03442765027284622, -0.0550382025539875, 0.06971246749162674, -0.003352303756400943, -0.004340083803981543, -0.01679714396595955, 0.0064416988752782345, -0.01984860934317112, 0.01641281321644783, 0.0018293220782652497, -0.11271537095308304, -0.052613116800785065, -0.010439673438668251, -0.017311949282884598, 0.03848602622747421, -0.004370734561234713, -0.0256898645311594, -0.017522435635328293, 0.03476362302899361, -0.04022273048758507, 0.05722453072667122, -0.003940482158213854, 0.012469306588172913, 0.014485642313957214, 0.0002653226547408849, -0.04741986095905304, 0.005783722270280123, -0.026500975713133812, 0.015229412354528904, 0.01614534854888916, -0.028139224275946617, -0.0582369863986969, 0.04159910976886749, -0.02947172336280346, -0.011617200449109077, -0.012699710205197334, -0.05063168331980705, 0.022534845396876335, -0.03489275276660919, -0.018873604014515877, -0.027622750028967857, -0.017779694870114326, -0.01115577295422554, -0.018841682001948357, -0.012307103723287582, -0.003441773122176528, -0.044217802584171295, -0.049906883388757706, 0.020566344261169434, 0.005510758142918348, -0.019158639013767242, -0.023387355729937553, 0.006455848924815655, -0.05852751433849335, -0.007825746200978756, -0.005833541043102741, 0.0016934421146288514, 0.01655580662190914, -0.06571619212627411, 0.027811894193291664, 0.012145409360527992, -0.04912470653653145, -0.02165192738175392, 0.02801106497645378, -0.01280294731259346, -0.0038827164098620415, -0.02603939361870289, 0.012088247574865818, 0.028207387775182724, -0.009814709424972534, -0.016619721427559853, 0.03089526854455471, -0.0017001755768433213, 0.0226567555218935, 0.01802978292107582, -0.07743125408887863, 0.04605657234787941, 0.02059592492878437, -0.026381146162748337, -0.008450889028608799, 0.8071025013923645, -0.000705104845110327, -0.01773674041032791, 0.0029701951425522566, 0.011116201058030128, 0.021560633555054665, 0.015844279900193214, 0.03892882168292999, 0.01230500265955925, 0.008658493869006634, -0.06108994781970978, 0.015477857552468777, 0.01199109572917223, 0.03286672756075859, -0.009575101546943188, 0.018392905592918396, 0.014570679515600204, -0.009249024093151093, 0.01390319224447012, -0.020723562687635422, -0.03175227716565132, -0.014981231652200222, 0.0035148963797837496, 0.029526056721806526, -0.02710217610001564, -0.021656012162566185, -0.16340340673923492, -0.008894771337509155, -8.825154612544852e-33, -0.000037803907616762444, -0.05936979874968529, 0.033952534198760986, -0.012225410901010036, 0.03328217938542366, -0.012560369446873665, 0.005272969137877226, 0.011247573420405388, 0.020756151527166367, -0.006329329684376717, 0.013402579352259636, -0.013480144552886486, -0.003466414287686348, -0.005983785260468721, 0.01991795003414154, -0.024130843579769135, 0.0008936526137404144, 0.02387862093746662, -0.00029133661882951856, 0.0070688496343791485, 0.06780801713466644, 0.03039156086742878, 0.06083943694829941, 0.032284922897815704, 0.030621178448200226, -0.00636095879599452, -0.020326776430010796, 0.01558434497565031, -0.016010552644729614, -0.042505815625190735, -0.06736154109239578, 0.037274714559316635, -0.004548854660242796, -0.04338546469807625, 0.04194089397788048, -0.0655861422419548, 0.02506221830844879, -0.002817877335473895, -0.0005493804346770048, 0.000971781846601516, -0.031165676191449165, 0.013822338543832302, 0.004722835961729288, -0.02774422988295555, -0.03081020526587963, 0.02797434665262699, 0.05673806369304657, 0.07758217304944992, -0.005521041806787252, 0.013424854725599289, 0.02184412069618702, 0.012960849329829216, 0.029067549854516983, -0.0010616688523441553, -0.0044329408556222916, -0.011749126017093658, 0.020554179325699806, -0.00026238217833451927, 0.036232855170965195, -0.009468398988246918, 0.0027611281257122755, 0.002573193982243538, 0.004495547153055668, 0.008969604037702084, -0.0240482110530138, 0.004083751235157251, 0.07639317214488983, 0.026232494041323662, 0.04619155079126358, -0.016498183831572533, -0.030012985691428185, 0.03441590443253517, -0.012271477840840816, -0.04500068351626396, 0.042242590337991714, -0.02058655209839344, 0.006026932038366795, -0.023694077506661415, 0.0264290738850832, 0.018906543031334877, 0.04658692702651024, -0.001019409392029047, -0.0006637060432694852, 0.015133566223084927, -0.0418856106698513, 0.002845347160473466, 0.03364988788962364, 0.04250122979283333, -0.02987811528146267, -0.04799395427107811, 0.007251737639307976, 0.0005857020150870085, 0.004034463316202164, -0.014594284817576408, -0.004411790985614061, 7.75297078679649e-33, 0.007670171558856964, -0.008088051341474056, -0.02514689415693283, -0.004523686598986387, 0.05359995365142822, -0.003525290871039033, 0.04887084290385246, 0.003694398794323206, -0.010067622177302837, 0.013046183623373508, 0.010483893565833569, -0.003274190006777644, 0.0013376105343922973, 0.009293481707572937, 0.036413371562957764, 0.01590079627931118, -0.04340873658657074, 0.060535673052072525, -0.024195650592446327, -0.02856428734958172, -0.018182093277573586, 0.0038577872328460217, 0.025467535480856895, 0.0019019956234842539, 0.04644905403256416, 0.008945617824792862, -0.027632933109998703, -0.0367850735783577, 0.0032002092339098454, 0.02404836192727089, 0.01276484690606594, 0.0021678567864000797, -0.001546644838526845, -0.01998968981206417, -0.013793866150081158, 0.009634848684072495, 0.040762074291706085, -0.007894312031567097, -0.009641055949032307, -0.003236902877688408, 0.04056653752923012, 0.04920266941189766, -0.0196710042655468, 0.03595159202814102, 0.03297262266278267, 0.028979064896702766, 0.004442953504621983, 0.026281189173460007, -0.01005671825259924, -0.0064741745591163635, -0.009818367660045624, 0.030445296317338943, 0.016004204750061035, 0.03581114485859871, 0.020070834085345268, -0.002209998667240143, -0.006687806453555822, 0.04400156810879707, -0.0450495220720768, 0.008618714287877083, -0.05821730196475983, 0.00796512234956026, -0.047988880425691605, 0.02837955951690674, -0.023913169279694557, 0.02640550583600998, -0.07296864688396454, -0.03298460692167282, 0.0024870189372450113, -0.03154277056455612, 0.0016535583417862654, -0.03036017157137394, 0.0021743178367614746, -0.005231197457760572, -0.04120942950248718, -0.015512920916080475, -0.019945494830608368, -0.002685960615053773, -0.012275461107492447, 0.07571407407522202, 0.0291278213262558, -0.06575889140367508, 0.03767910972237587, 0.03154076263308525, -0.010709788650274277, 0.006568455137312412, 0.005203383509069681, -0.049931470304727554, 0.02683311328291893, 0.02857499197125435, -0.022665871307253838, -0.05278689041733742, -0.002299381187185645, 0.016113582998514175, -0.0006243043462745845, -1.331435139917403e-8, -0.031085388734936714, 0.00821817759424448, 0.018100887537002563, -0.0032686542253941298, 0.02265189401805401, 0.051359694451093674, -0.03950904682278633, -0.015919119119644165, 0.00551875215023756, 0.03647470101714134, 0.03186921775341034, -0.019596310332417488, 0.00681382417678833, 0.01917148381471634, 0.012637786567211151, 0.004733128938823938, 0.010673395358026028, 0.0017544605070725083, 0.040463853627443314, 0.0018821463454514742, 0.007109100464731455, 0.019828714430332184, -0.029125981032848358, 0.0009044986800290644, 0.003801885060966015, -0.006345804315060377, -0.015456332825124264, -0.10066743195056915, 0.0233793742954731, 0.00021076590928714722, -0.0016024482902139425, -0.046993158757686615, -0.02530723623931408, -0.002982113277539611, 0.0038635784294456244, -0.0190576259046793, -0.015395748429000378, 0.014215514063835144, 0.02286210097372532, 0.013713079504668713, -0.018226541578769684, -0.0136463213711977, -0.01577441394329071, -0.024620255455374718, -0.011062226258218288, -0.014166934415698051, -0.05615268275141716, 0.027291471138596535, 0.028201935812830925, -0.05383361876010895, 0.04333840683102608, -0.0077313827350735664, 0.018456265330314636, 0.015490653924643993, 0.05981056019663811, 0.021015867590904236, -0.018216749653220177, 0.0064261858351528645, -0.042858511209487915, -0.02443980798125267, 0.043085649609565735, 0.02398163639008999, -0.011404501274228096, -0.0089043527841568 ]
pythonpandas-column-value-in-list-valueerror-the-truth-value-of-a-series-is-ambiguous
https://markhneedham.com/blog/2015/02/16/pythonpandas-column-value-in-list-valueerror-the-truth-value-of-a-series-is-ambiguous
false
2015-02-19 00:52:10
Python's pandas vs Neo4j's cypher: Exploring popular phrases in How I met your mother transcripts
[ "neo4j", "python" ]
[ "neo4j" ]
I've previously written about http://www.markhneedham.com/blog/2015/02/15/pythonscikit-learn-calculating-tfidf-on-how-i-met-your-mother-transcripts/[extracting TF/IDF scores for phrases in documents using scikit-learn] and the final step in that post involved writing the words into a CSV file for analysis later on. I wasn't sure what the most appropriate tool of choice for that analysis was so I decided to explore the data using Python's pandas library and load it into Neo4j and write some Cypher queries. To do anything with Neo4j we need to first load the CSV file into the database. The easiest way to do that is with Cypher's LOAD CSV command. First we'll load the phrases in and then we'll connect them to the episodes which were previously loaded: [source,cypher] ---- USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-himym/data/import/tfidf_scikit.csv" AS row MERGE (phrase:Phrase {value: row.Phrase}); ---- [source,cypher] ---- USING PERIODIC COMMIT 1000 LOAD CSV WITH HEADERS FROM "file:///Users/markneedham/projects/neo4j-himym/data/import/tfidf_scikit.csv" AS row MATCH (phrase:Phrase {value: row.Phrase}) MATCH (episode:Episode {id: TOINT(row.EpisodeId)}) MERGE (phrase)-[:USED_IN_EPISODE {tfidfScore: TOFLOAT(row.Score)}]->(episode); ---- Now we're ready to start writing some queries. To start with we'll write a simple query to find the top 3 phrases for each episode. In pandas this is quite easy - we just need to group by the appropriate field and then take the top 3 records in that grouping: [source,python] ---- top_words_by_episode = df \ .sort(["EpisodeId", "Score"], ascending = [True, False]) \ .groupby(["EpisodeId"], sort = False) \ .head(3) >>> print(top_words_by_episode.to_string()) EpisodeId Phrase Score 3976 1 ted 0.262518 2912 1 olives 0.195714 2441 1 marshall 0.155515 8143 2 ted 0.292184 5197 2 carlos 0.227454 7482 2 robin 0.195150 12551 3 ted 0.232662 9040 3 barney 0.187255 11254 3 mcneil 0.170619 15641 4 natalie 0.562485 16763 4 ted 0.191873 16234 4 robin 0.102671 20715 5 subtitle 0.310866 18121 5 coat check 0.181682 20861 5 ted 0.169973 ... ---- The cypher version looks quite similar, the main difference being that we use the +++<cite>+++COLLECT+++</cite>+++ to generate an array of phrases by episode and then take the top 3: [source,cypher] ---- MATCH (e:Episode)<-[rel:USED_IN_EPISODE]-(phrase) WITH e, rel, phrase ORDER BY e.id, rel.tfidfScore DESC RETURN e.id, e.title, COLLECT({phrase: phrase.value, score: rel.tfidfScore})[..3] ORDER BY e.id ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | e.id | e.title | COLLECT({phrase: phrase.value, score: rel.tfidfScore})[..3] | ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ==> | 1 | "Pilot" | [{phrase -> "ted", score -> 0.2625177493269755},{phrase -> "olives", score -> 0.19571419072701732},{phrase -> "marshall", score -> 0.15551468983363487}] | ==> | 2 | "Purple Giraffe" | [{phrase -> "ted", score -> 0.292184496766088},{phrase -> "carlos", score -> 0.22745438090499026},{phrase -> "robin", score -> 0.19514993122773566}] | ==> | 3 | "Sweet Taste of Liberty" | [{phrase -> "ted", score -> 0.23266190616714866},{phrase -> "barney", score -> 0.18725456678444408},{phrase -> "officer mcneil", score -> 0.17061872221616137}] | ==> | 4 | "Return of the Shirt" | [{phrase -> "natalie", score -> 0.5624848345525686},{phrase -> "ted", score -> 0.19187323894701674},{phrase -> "robin", score -> 0.10267067360622682}] | ==> | 5 | "Okay Awesome" | [{phrase -> "subtitle", score -> 0.310865508347106},{phrase -> "coat check", score -> 0.18168178787561182},{phrase -> "ted", score -> 0.16997258596683185}] | ==> | 6 | "Slutty Pumpkin" | [{phrase -> "mike", score -> 0.2966610054610693},{phrase -> "ted", score -> 0.19333276951599407},{phrase -> "robin", score -> 0.1656172994411056}] | ==> | 7 | "Matchmaker" | [{phrase -> "ellen", score -> 0.4947912795578686},{phrase -> "sarah", score -> 0.24462913913669443},{phrase -> "ted", score -> 0.23728319597607636}] | ==> | 8 | "The Duel" | [{phrase -> "ted", score -> 0.26713931416222847},{phrase -> "marshall", score -> 0.22816702335751904},{phrase -> "swords", score -> 0.17841675237702592}] | ==> | 9 | "Belly Full of Turkey" | [{phrase -> "ericksen", score -> 0.43145756691027665},{phrase -> "mrs ericksen", score -> 0.1939318283559959},{phrase -> "kendall", score -> 0.1846969793866628}] | ==> | 10 | "The Pineapple Incident" | [{phrase -> "ted", score -> 0.439756993033922},{phrase -> "trudy", score -> 0.36367907631894536},{phrase -> "carl", score -> 0.16413071244131686}] | ==> | 11 | "The Limo" | [{phrase -> "moby", score -> 0.48314164479037003},{phrase -> "party number", score -> 0.30458929780262456},{phrase -> "ranjit", score -> 0.1991061739767796}] | ... ==> +--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ ---- In the cypher version we get one row per episode whereas with the Python version we get 3 rows. It might be possible to achieve this effect with pandas too but I wasn't sure how to do so. Next let's find the top phrases for a single episode - the type of query that might be part of an episode page on a How I met your mother wiki: [source,python] ---- top_words = df[(df["EpisodeId"] == 1)] \ .sort(["Score"], ascending = False) \ .head(20) >>> print(top_words.to_string()) EpisodeId Phrase Score 3976 1 ted 0.262518 2912 1 olives 0.195714 2441 1 marshall 0.155515 4732 1 yasmine 0.152279 3347 1 robin 0.130418 209 1 barney 0.124412 2146 1 lily 0.122925 3637 1 signal 0.103793 1366 1 goanna 0.098138 3524 1 scene 0.095342 710 1 cut 0.091734 2720 1 narrator 0.086462 1147 1 flashback 0.078296 1148 1 flashback date 0.070283 3224 1 ranjit 0.069393 4178 1 ted yasmine 0.058569 1149 1 flashback date robin 0.058569 525 1 carl 0.058210 3714 1 smurf pen1s 0.054365 2048 1 lebanese 0.054365 ---- [source,cypher] ---- MATCH (e:Episode {title: "Pilot"})<-[rel:USED_IN_EPISODE]-(phrase) WITH phrase, rel ORDER BY rel.tfidfScore DESC RETURN phrase.value AS phrase, rel.tfidfScore AS score LIMIT 20 ==> +-----------------------------------------------+ ==> | phrase | score | ==> +-----------------------------------------------+ ==> | "ted" | 0.2625177493269755 | ==> | "olives" | 0.19571419072701732 | ==> | "marshall" | 0.15551468983363487 | ==> | "yasmine" | 0.15227880637176266 | ==> | "robin" | 0.1304175242341549 | ==> | "barney" | 0.12441175186690791 | ==> | "lily" | 0.12292497785945679 | ==> | "signal" | 0.1037932464656365 | ==> | "goanna" | 0.09813798750091524 | ==> | "scene" | 0.09534236041231685 | ==> | "cut" | 0.09173366535740156 | ==> | "narrator" | 0.08646229819848741 | ==> | "flashback" | 0.07829592155397117 | ==> | "flashback date" | 0.07028252601773662 | ==> | "ranjit" | 0.06939276915589167 | ==> | "ted yasmine" | 0.05856877168144719 | ==> | "flashback date robin" | 0.05856877168144719 | ==> | "carl" | 0.058210117288760355 | ==> | "smurf pen1s" | 0.05436505297972703 | ==> | "lebanese" | 0.05436505297972703 | ==> +-----------------------------------------------+ ---- Our next query is a negation - find the episodes which don't mention the phrase 'robin'. In python we can do some simple set operations to work this out: [source,python] ---- all_episodes = set(range(1, 209)) robin_episodes = set(df[(df["Phrase"] == "robin")]["EpisodeId"]) >>> print(set(all_episodes) - set(robin_episodes)) set([145, 198, 143]) ---- In cypher land a query will suffice: [source,cypher] ---- MATCH (episode:Episode), (phrase:Phrase {value: "robin"}) WHERE NOT (episode)<-[:USED_IN_EPISODE]-(phrase) RETURN episode.id AS id, episode.season AS season, episode.number AS episode ---- And finally a mini recommendation engine type query - how many of the top phrases in Episode 1 were used in other episodes: First python: [source,python] ---- phrases_used = set(df[(df["EpisodeId"] == 1)] \ .sort(["Score"], ascending = False) \ .head(10)["Phrase"]) phrases = df[df["Phrase"].isin(phrases_used)] print (phrases[phrases["EpisodeId"] != 1] \ .groupby(["Phrase"]) \ .size() \ .order(ascending = False)) ---- Here we've pulled it out into a few steps - first we identify the top phrases, then we find out where they occur across the whole data set and finally we filter out the occurrences in the first episode and count the other occurrences. [source,python] ---- Phrase marshall 207 barney 207 ted 206 lily 206 robin 204 scene 36 signal 4 goanna 3 olives 1 ---- In cypher we can write a query to do this as well: [source,cypher] ---- MATCH (episode:Episode {title: "Pilot"})<-[rel:USED_IN_EPISODE]-(phrase) WITH phrase, rel, episode ORDER BY rel.tfidfScore DESC LIMIT 10 MATCH (phrase)-[:USED_IN_EPISODE]->(otherEpisode) WHERE otherEpisode <> episode RETURN phrase.value AS phrase, COUNT(*) AS numberOfOtherEpisodes ORDER BY numberOfOtherEpisodes DESC ==> +------------------------------------+ ==> | phrase | numberOfOtherEpisodes | ==> +------------------------------------+ ==> | "barney" | 207 | ==> | "marshall" | 207 | ==> | "ted" | 206 | ==> | "lily" | 206 | ==> | "robin" | 204 | ==> | "scene" | 36 | ==> | "signal" | 4 | ==> | "goanna" | 3 | ==> | "olives" | 1 | ==> +------------------------------------+ ---- Overall there's not much in it - for some of the queries I found it easier in cypher and for others easier with pandas. It's always useful to have multiple tools in the toolbox!
null
null
[ 0.013255891390144825, -0.021133406087756157, 0.018165510147809982, 0.02971523627638817, 0.08740734308958054, -0.0035385468509048223, 0.011171646416187286, 0.02881443314254284, 0.02474544569849968, -0.011780240572988987, 0.025008326396346092, -0.014263828285038471, -0.0457410104572773, 0.017555449157953262, -0.021056508645415306, 0.07394327968358994, 0.061569418758153915, 0.015164664946496487, 0.03655440732836723, -0.0022221773397177458, -0.0008736244635656476, 0.02660636231303215, -0.012256736867129803, 0.043761372566223145, 0.03155067563056946, -0.02083735354244709, -0.013495475985109806, -0.005710444878786802, -0.03224756941199303, -0.0001311503874603659, 0.043175701051950455, -0.048953842371702194, 0.019434958696365356, -0.011676019988954067, 0.017844464629888535, 0.01070545893162489, -0.03500083461403847, 0.027682799845933914, -0.011048696003854275, -0.016825983300805092, -0.04905516654253006, 0.01677970588207245, -0.025017406791448593, -0.00983424112200737, -0.043593112379312515, 0.0024817362427711487, -0.042316634207963943, 0.023839810863137245, 0.008578969165682793, 0.0009661606745794415, -0.058493200689554214, 0.034483712166547775, 0.020333727821707726, -0.03145270422101021, 0.0239072535187006, 0.06941210478544235, 0.0026494187768548727, -0.07978377491235733, 0.034666597843170166, 0.01847672462463379, -0.008817141875624657, -0.02000265195965767, -0.008791289292275906, 0.026069143787026405, 0.011758542619645596, -0.057619500905275345, -0.014283622615039349, 0.07107554376125336, -0.05367236211895943, -0.00744995241984725, -0.017963169142603874, 0.005889980122447014, -0.02415265515446663, -0.000027194450012757443, -0.014399188570678234, -0.0467151440680027, 0.017862843349575996, 0.05168268084526062, 0.030869966372847557, 0.03306082263588905, -0.042696449905633926, 0.004354021977633238, -0.008898783475160599, 0.02258068323135376, -0.0135630052536726, -0.04378453642129898, -0.03622009605169296, -0.03991848975419998, -0.07461495697498322, 0.04576463997364044, 0.007114747539162636, -0.05405073240399361, -0.0030952526722103357, 0.009442292153835297, -0.030701112002134323, -0.0038705244660377502, 0.008184963837265968, 0.008698643185198307, 0.013151082210242748, 0.009109694510698318, -0.058032967150211334, -0.038429271429777145, 0.013066733255982399, 0.016853615641593933, -0.07566066831350327, -0.027332480996847153, -0.00045615050476044416, -0.03397299349308014, -0.002151399850845337, -0.00041796459117904305, -0.02646559849381447, -0.02610609494149685, -0.021844495087862015, -0.010092363692820072, -0.10187265276908875, 0.08071655035018921, 0.03286242112517357, -0.021947147324681282, -0.054955288767814636, 0.015841344371438026, 0.042992137372493744, 0.027140431106090546, -0.01497972384095192, 0.06518551707267761, -0.01951899752020836, 0.04200294613838196, -0.004645108710974455, 0.07078739255666733, -0.00976079422980547, -0.07131513953208923, -0.03379698097705841, 0.04684160649776459, -0.012601884081959724, 0.008475092239677906, -0.011780144646763802, -0.04231138527393341, -0.04319839924573898, 0.02489253506064415, 0.045622121542692184, 0.04854026064276695, 0.015057414770126343, -0.04190567135810852, 0.005828946363180876, 0.022396259009838104, 0.025583939626812935, 0.0016206142026931047, -0.035871852189302444, -0.028415627777576447, -0.03970196843147278, 0.0003815287782344967, -0.00023399261408485472, 0.019429828971624374, 0.06164625659584999, -0.029558982700109482, 0.00645256694406271, 0.1187843307852745, 0.04374859482049942, 0.018143758177757263, 0.002437059534713626, 0.00493525480851531, 0.061879027634859085, 0.03575475513935089, 0.0006217118934728205, 0.022991430014371872, -0.020743153989315033, -0.029030490666627884, 0.014506870880723, 0.07181365042924881, -0.011407559737563133, 0.032070040702819824, -0.018716394901275635, -0.026885731145739555, 0.06928423792123795, -0.022764431312680244, 0.00482915947213769, 0.024774065241217613, 0.05759415775537491, 0.031178832054138184, 0.020590193569660187, -0.008636998012661934, -0.07012993097305298, 0.059397969394922256, 0.00617707334458828, 0.020960824564099312, 0.03213796019554138, 0.006097149103879929, 0.07295013964176178, 0.01815321110188961, 0.013786894269287586, 0.04148254543542862, -0.06998007744550705, -0.07029026746749878, -0.00402610469609499, -0.011663003824651241, 0.050450630486011505, -0.037634000182151794, 0.019724810495972633, 0.06336493045091629, 0.010209156200289726, 0.021097317337989807, 0.013694689609110355, -0.010228442959487438, 0.0370609275996685, -0.031901855021715164, -0.04885435104370117, 0.04288678243756294, 0.019209396094083786, -0.05038575828075409, -0.013989195227622986, 0.00963515043258667, -0.019165635108947754, 0.009214342571794987, 0.04101181402802467, -0.02667716145515442, 0.04133942723274231, 0.030810745432972908, 0.04648490250110626, -0.010301044210791588, 0.011146149598062038, -0.044158514589071274, 0.02168755605816841, -0.031714458018541336, -0.028979124501347542, -0.030239572748541832, -0.015127738937735558, 0.11459209769964218, 0.05654427036643028, -0.032941628247499466, -0.05080745369195938, 0.015465258620679379, -0.005993245635181665, -0.009415808133780956, 0.014923962764441967, -0.014331781305372715, -0.032089315354824066, -0.004055249970406294, -0.048885565251111984, -0.03874201327562332, 0.007024677470326424, -0.031610678881406784, 0.016569528728723526, 0.033605121076107025, -0.026531899347901344, 0.05948822572827339, 0.017187856137752533, -0.0001615950168343261, 0.010240974836051464, -0.038545701652765274, -0.041930731385946274, 0.003199570346623659, 0.005201059393584728, -0.009828832931816578, 0.03926996886730194, -0.011492446064949036, -0.026972996070981026, -0.019168561324477196, -0.053454432636499405, 0.008190537802875042, 0.07081854343414307, 0.05802994593977928, 0.005069842096418142, 0.06436923891305923, -0.01754072867333889, -0.013469927944242954, -0.01539011113345623, -0.04989244416356087, -0.049337200820446014, -0.04766043275594711, 0.007403194904327393, -0.0007150109740905464, 0.02627922222018242, -0.00851223710924387, 0.019897956401109695, 0.008264139294624329, 0.005904186982661486, -0.0011099010007455945, 0.048235148191452026, -0.014924594201147556, 0.005189268384128809, -0.027532566338777542, -0.030101072043180466, 0.03829139471054077, -0.040234751999378204, -0.03517531976103783, -0.008397850207984447, -0.05607014149427414, 0.012632489204406738, -0.04163762554526329, -0.01587585359811783, 0.0021493295207619667, 0.023897286504507065, 0.0609709732234478, 0.016980255022644997, -0.01982213743031025, 0.04003571718931198, 0.025280604138970375, 0.0009684999822638929, 0.020674467086791992, 0.00499960221350193, 0.05806777626276016, -0.003674207255244255, 0.0018814943032339215, 0.061864353716373444, -0.01006995514035225, -0.019527358934283257, -0.036127444356679916, -0.025358304381370544, -0.029120508581399918, -0.29880183935165405, 0.04758043214678764, -0.04621105268597603, -0.034336332231760025, 0.019108697772026062, -0.04215405881404877, -0.007663472555577755, -0.011976807378232479, -0.017241675406694412, 0.026086073368787766, -0.023027855902910233, -0.01667281612753868, -0.016849864274263382, 0.040613893419504166, 0.015264720655977726, 0.015398675575852394, -0.02817007713019848, -0.04036844149231911, 0.000030849572794977576, 0.05882296338677406, 0.0004094486066605896, -0.0451432541012764, -0.021963955834507942, 0.026040781289339066, 0.0325607992708683, 0.05370929837226868, -0.09174398332834244, 0.03183551877737045, -0.07347460836172104, -0.022300440818071365, 0.016593987122178078, -0.03883428871631622, 0.0036233519203960896, -0.015563121996819973, -0.012684003449976444, -0.02241193689405918, 0.044598665088415146, -0.0066136461682617664, -0.012732289731502533, 0.012754382565617561, -0.04179828241467476, -0.050688985735177994, -0.01555262878537178, 0.002910446375608444, 0.0881556048989296, 0.006817835848778486, -0.04878779128193855, -0.001438989071175456, -0.023338858038187027, 0.07834690064191818, -0.02772996947169304, -0.0033406440634280443, -0.050369516015052795, 0.011841155588626862, -0.03125355392694473, -0.028475593775510788, 0.0036684400402009487, 0.0047507518902421, -0.04187270253896713, -0.03576865419745445, -0.01998152770102024, -0.03755415976047516, 0.022977396845817566, -0.06414420902729034, -0.043276142328977585, -0.05290323123335838, -0.06661541759967804, -0.019603081047534943, 0.05555502325296402, 0.04135983809828758, -0.0426144152879715, 0.026089800521731377, 0.0200655534863472, -0.10443821549415588, -0.021779054775834084, -0.024270974099636078, 0.02152782678604126, 0.007991814985871315, -0.0163262989372015, 0.07516346871852875, -0.06768976151943207, -0.04955703392624855, 0.03545522317290306, -0.0025458664167672396, -0.00858496967703104, -0.015307706780731678, 0.0036981352604925632, -0.01572473905980587, -0.0163901187479496, 0.0011683028424158692, 0.0484900176525116, -0.02358199842274189, -0.006168115884065628, 0.03587477654218674, -0.010435870848596096, 0.048283327370882034, 0.0047630988992750645, 0.010086161084473133, 0.019103024154901505, 0.018787933513522148, 0.04240028187632561, -0.037756845355033875, -0.01701505109667778, -0.04729416221380234, -0.015181450173258781, -0.013879925012588501, -0.051079005002975464, 0.019650306552648544, 0.030903996899724007, 0.014144256711006165, -0.00891520082950592, 0.0038396986201405525, 0.005137699656188488, -0.027495751157402992, 0.0006521676550619304, 0.004226207733154297, 0.036888837814331055, 0.020668966695666313, 0.03240056708455086, -0.0022956866305321455, -0.08341894298791885, 0.007268381305038929, -0.007103255949914455, -0.016938697546720505, -0.06553573161363602, -0.028745757415890694, 0.017527751624584198, -0.01992921158671379, 0.005239336285740137, 0.006306828465312719, -0.053962476551532745, 0.006117855664342642, 0.020244909450411797, -0.005932589527219534, 0.0328553207218647, -0.03612896427512169, -0.04841189831495285, -0.02549857832491398, 0.010917414911091328, 0.004605319816619158, 0.007282082457095385, -0.015379004180431366, -0.01366058923304081, 0.04555164650082588, 0.04775350168347359, 0.0059165945276618, 0.005403756629675627, 0.01704007387161255, 0.020232053473591805, -0.0011510559124872088, 0.01804298348724842, 0.018113862723112106, 0.021703898906707764, -0.05321643874049187, -0.043320298194885254, -0.0025209675077348948, 0.037844400852918625, -0.007721796631813049, -0.012817282229661942, -0.03604620695114136, 0.03384598344564438, -0.028143515810370445, 0.02914995700120926, -0.024295318871736526, 0.024437619373202324, 0.06298336386680603, -0.029653863981366158, 0.04672800377011299, 0.006433007773011923, 0.0010712422663345933, 0.000046154433221090585, 0.03415035456418991, -0.04013434797525406, 0.023901522159576416, 0.000801138230599463, -0.02451648749411106, 0.037049613893032074, 0.025906002148985863, 0.019387977197766304, 0.03511568903923035, -0.036746878176927567, -0.04221758618950844, -0.00793170090764761, 0.01915252022445202, 0.055143676698207855, 0.06884574145078659, -0.015731532126665115, -0.00835278257727623, -0.017351334914565086, 0.01100546307861805, -0.024464773014187813, -0.013722961768507957, -0.008965070359408855, 0.014158567413687706, -0.028811024501919746, -0.04812071472406387, 0.03672323375940323, -0.0026237855199724436, -0.0007693753577768803, 0.026249045506119728, -0.026614977046847343, -0.018658235669136047, -0.024711159989237785, 0.02023201994597912, 0.07356075197458267, -0.06668199598789215, -0.02126346342265606, -0.030548425391316414, 0.014244955033063889, -0.018206125125288963, 0.04613663628697395, -0.07828999310731888, -0.058945588767528534, -0.018064875155687332, 0.02588452398777008, -0.021618716418743134, -0.026857608929276466, -0.03461068123579025, 0.04656962305307388, 0.0017948949243873358, 0.03233829140663147, -0.006090391427278519, 0.010872332379221916, -0.016053730621933937, -0.01182846911251545, 0.04328509420156479, -0.002962728263810277, -0.038189612329006195, -0.004967004060745239, -0.009443847462534904, 0.026525933295488358, -0.02155684307217598, 0.04146610572934151, 0.03240201622247696, -0.018952317535877228, -0.013853081502020359, -0.04012100026011467, 0.02146516926586628, -0.005613494664430618, 0.06336186081171036, 0.02595258131623268, -0.006355245131999254, -0.02073531225323677, 0.0006231966544874012, -0.019203120842576027, -0.005128534510731697, 0.01915641501545906, -0.010065331123769283, 0.008171476423740387, 0.05560186505317688, 0.015418346971273422, 0.015203244052827358, -0.01512901857495308, -0.06541450321674347, 0.04148830845952034, -0.045635517686605453, -0.04024159535765648, -0.02684159204363823, -0.05602661520242691, 0.006990470457822084, 0.0043566119857132435, 0.037105266004800797, -0.040070585906505585, 0.05678651109337807, 0.027598515152931213, 0.04785105958580971, 0.0322420671582222, 0.022612201049923897, 0.04106811061501503, -0.03544815257191658, -0.013688626699149609, -0.0969574972987175, -0.01356530375778675, 0.05662598833441734, 0.002173513872548938, 0.02371845580637455, 0.01763272099196911, -0.030784636735916138, 0.022073853760957718, -0.05766265466809273, -0.017200415953993797, 0.046180758625268936, -0.03355179727077484, 0.02594807557761669, -0.0039229909889400005, -0.05722465366125107, 0.002960739191621542, 0.04269757494330406, -0.024424400180578232, -0.010880613699555397, -0.02517518401145935, 0.055749692022800446, 0.0007344504119828343, 0.024202266708016396, 0.014174279756844044, -0.0442233681678772, 0.0817706286907196, 0.028551481664180756, 0.025160524994134903, 0.03379467502236366, -0.011279569007456303, 0.040091436356306076, 0.025975728407502174, -0.014840345829725266, 0.015498506836593151, 0.02047194167971611, -0.005430517718195915, -0.051569074392318726, 0.04882856085896492, 0.020334850996732712, 0.0063431826420128345, -0.04517936706542969, 0.08127276599407196, 0.005223263055086136, -0.0463283397257328, -0.04993614926934242, 0.04269988089799881, -0.026442820206284523, -0.008497719652950764, -0.014510590583086014, 0.004775449633598328, -0.03121182881295681, 0.046525489538908005, -0.0224353838711977, 0.010690247640013695, 0.05063256993889809, -0.03873933479189873, -0.005316689144819975, 0.021676957607269287, 0.07320515066385269, 0.07435847818851471, 0.057110223919153214, 0.001037032576277852, 0.06882388889789581, -0.010556686669588089, -0.04979732632637024, 0.0003751590265892446, -0.017638858407735825, 0.008452036418020725, 0.013029408641159534, 0.019309716299176216, 0.05038391798734665, -0.014207195490598679, 0.08651918917894363, -0.006310323253273964, 0.006266529206186533, -0.012101228348910809, -0.001582086319103837, 0.03240318223834038, 0.023625874891877174, 0.012908786535263062, 0.04682097211480141, -0.03563477843999863, -0.04579005017876625, 0.03035956248641014, 0.010026725940406322, -0.03866218402981758, 0.028269672766327858, -0.021341213956475258, 0.032784514129161835, 0.020463209599256516, 0.03353985771536827, 0.08110509067773819, -0.05187297239899635, -0.0019449563696980476, 0.0007284159073606133, 0.02004285529255867, -0.022214073687791824, 0.013870433904230595, -0.004319467581808567, -0.014015058986842632, 0.000654564646538347, -0.03205812722444534, -0.04688197374343872, -0.017972731962800026, -0.034298092126846313, 0.011790143325924873, -0.003677188651636243, 0.00027289215358905494, 0.025695664808154106, -0.007135557010769844, -0.056348782032728195, -0.04476797208189964, -0.03601519763469696, -0.06183136999607086, -0.07118925452232361, -0.008023735135793686, 0.00668161129578948, 0.008289187215268612, -0.004899812396615744, -0.002211078302934766, -0.043575040996074677, 0.0022316966205835342, 0.017213838174939156, -0.03804059699177742, -0.01376472320407629, 0.011918475851416588, 0.017665984109044075, 0.01650061458349228, -0.00589287094771862, 0.04407525435090065, 0.01119659561663866, -0.00897897221148014, -0.002826899290084839, 0.02196453884243965, 0.05467605218291283, 0.03443562611937523, 0.006954315584152937, -0.08147667348384857, -0.0022494003642350435, 0.002730840817093849, 0.0019259388791397214, -0.07428213953971863, 0.0070619527250528336, 0.05255260691046715, 0.024824418127536774, 0.037112802267074585, -0.0005138495471328497, -0.0101328045129776, -0.037555936723947525, 0.004382948856800795, 0.01163387205451727, 0.0054138582199811935, 0.05332803353667259, -0.0434531606733799, 0.06912734359502792, -0.0033523906022310257, -0.015364517457783222, -0.02925032563507557, -0.01607903651893139, -0.015763601288199425, 0.017601795494556427, -0.040157172828912735, -0.04350963979959488, -0.04181883484125137, -0.053843844681978226, -0.028424808755517006, 0.023623811081051826, -0.04050638526678085, -0.004183516371995211, 0.01931859366595745, -0.0033050021156668663, -0.010822989977896214, 0.028666267171502113, -0.04021656513214111, 0.028598180040717125, -0.0031796556431800127, -0.024694999679923058, -0.032647229731082916, 0.018474744632840157, -0.009501132182776928, 0.01317195687443018, 0.02925879880785942, -0.07541291415691376, -0.0017806885298341513, -0.016085458919405937, 0.019341982901096344, 0.0521850660443306, 0.002242655260488391, 0.007552772294729948 ]
[ -0.040619298815727234, 0.012893008068203926, -0.0282449834048748, -0.03743944317102432, 0.08885430544614792, -0.03043343871831894, -0.020231401547789574, 0.020240316167473793, 0.012770866975188255, -0.010348180308938026, -0.00580205861479044, -0.0297071672976017, 0.015314246527850628, -0.006749216932803392, 0.05975719913840294, -0.00740648852661252, -0.03392539545893669, -0.04207078740000725, -0.029994558542966843, 0.06686770170927048, -0.032468531280756, -0.05279604345560074, -0.008933142758905888, -0.04840872436761856, 0.025763774290680885, 0.0269724540412426, 0.035466909408569336, -0.04799535125494003, -0.028051000088453293, -0.20912335813045502, -0.005640177987515926, 0.003338289214298129, 0.031209230422973633, 0.001598829054273665, 0.029118256643414497, 0.016751818358898163, 0.030365297570824623, -0.016814377158880234, -0.015091849491000175, 0.01988609880208969, 0.02634909562766552, 0.004435723181813955, -0.044740453362464905, -0.036143478006124496, 0.02622932568192482, 0.010492238216102123, -0.02974066324532032, -0.020656941458582878, -0.007626665756106377, 0.03142916411161423, -0.04237882047891617, -0.03849545121192932, -0.016685552895069122, -0.014457717537879944, -0.004171605221927166, 0.005359296686947346, 0.04000839963555336, 0.041362419724464417, 0.017482329159975052, 0.015822671353816986, 0.001705693663097918, 0.018602022901177406, -0.1573096364736557, 0.08939385414123535, 0.00762597844004631, 0.005295399576425552, -0.06103334575891495, -0.0020446840208023787, -0.03837249055504799, 0.09440965205430984, -0.036889441311359406, 0.008391945622861385, -0.017231423407793045, 0.07760497182607651, 0.004454468376934528, 0.02937181107699871, 0.004284479655325413, -0.02499864250421524, 0.029799211770296097, -0.029430700466036797, -0.04448602721095085, 0.04952662065625191, -0.02969214878976345, -0.0009711196762509644, -0.006226653233170509, 0.03404952585697174, -0.02874155156314373, 0.02958710677921772, -0.01111240778118372, 0.02263611927628517, 0.03775985538959503, 0.010449541732668877, 0.030514296144247055, 0.03032425418496132, -0.0817626342177391, -0.05344022065401077, 0.03175988793373108, -0.01085614413022995, 0.03231169283390045, 0.3969656825065613, -0.018928909674286842, -0.015052098780870438, 0.00769928889349103, 0.059949468821287155, -0.0159431304782629, -0.02866308018565178, 0.013391627930104733, -0.05177579075098038, 0.04742885008454323, -0.029781291261315346, -0.019489556550979614, -0.04248914495110512, 0.048929035663604736, -0.09858514368534088, 0.021935807541012764, 0.0226063821464777, 0.03645507991313934, 0.017492206767201424, -0.01143898256123066, 0.024550672620534897, 0.025333363562822342, -0.0022297780960798264, 0.021561289206147194, -0.035719797015190125, 0.020500173792243004, 0.011338423937559128, 0.0478212796151638, 0.041260555386543274, 0.05240960419178009, 0.0047916024923324585, 0.05081556364893913, 0.0007230507908388972, -0.08689004927873611, 0.04920976236462593, 0.017515281215310097, -0.010130508802831173, 0.01905309595167637, -0.02554486319422722, -0.022961653769016266, 0.011149977333843708, 0.018431566655635834, -0.07650384306907654, -0.007219168357551098, 0.024012772366404533, -0.03794868662953377, 0.12653040885925293, -0.013603314757347107, -0.02494482696056366, -0.04561663419008255, -0.03869856521487236, 0.03449282795190811, 0.03743826970458031, 0.03497345745563507, -0.07384170591831207, 0.006182964891195297, 0.014258253388106823, 0.08959139883518219, -0.03072001412510872, -0.09662167727947235, -0.01137214433401823, -0.0014509987086057663, -0.029389090836048126, -0.014666243456304073, 0.05432596057653427, 0.050476908683776855, -0.09883931279182434, -0.029015202075242996, 0.029044438153505325, 0.03568024933338165, -0.07679560035467148, 0.03998679667711258, -0.0036720442585647106, -0.07923377305269241, -0.014136295765638351, 0.04063025116920471, -0.031198829412460327, -0.028266213834285736, 0.013623792678117752, 0.074781633913517, 0.022252660244703293, 0.010592326521873474, -0.0064611732959747314, -0.032769132405519485, 0.035493798553943634, -0.06919198483228683, -0.08492216467857361, -0.04905897378921509, 0.01398519892245531, -0.019099943339824677, -0.05090334638953209, 0.011430414393544197, 0.015407838858664036, -0.025136809796094894, 0.06977152824401855, -0.040516506880521774, -0.022685891017317772, -0.003171117277815938, 0.014813370071351528, -0.016902552917599678, -0.031899306923151016, 0.005049196537584066, -0.004735842812806368, -0.014127695932984352, 0.03343195468187332, -0.032939985394477844, -0.016564592719078064, 0.04455658793449402, -0.025735298171639442, 0.0763426125049591, 0.01950707472860813, -0.019652150571346283, 0.009686201810836792, -0.007637734524905682, 0.02450459823012352, -0.021564047783613205, -0.004845348186790943, -0.008515765890479088, -0.02412327378988266, -0.006351732648909092, 0.05402611568570137, -0.017586614936590195, -0.042038027197122574, -0.0447273775935173, -0.3648994565010071, -0.04573207348585129, 0.01530939619988203, -0.017987169325351715, 0.029674019664525986, -0.022349756211042404, 0.020179355517029762, -0.023897400125861168, 0.019481640309095383, 0.060549747198820114, 0.07697563618421555, -0.004643743857741356, 0.0015203823568299413, -0.12258442491292953, 0.00972425751388073, 0.03766007721424103, -0.010188362561166286, 0.003954677376896143, -0.009115583263337612, 0.04511300474405289, 0.018791884183883667, -0.07412084192037582, -0.013672449626028538, -0.030965516343712807, -0.003767887130379677, 0.0037373709492385387, 0.11865682899951935, 0.008336877450346947, 0.04258359596133232, -0.04869852587580681, 0.024105951189994812, 0.00880771316587925, 0.010068665258586407, -0.06472548842430115, 0.024667376652359962, -0.05176633596420288, 0.029973559081554413, 0.01915886253118515, -0.04313993081450462, -0.014889395795762539, -0.03427291661500931, 0.015067769214510918, -0.0255851112306118, -0.031129062175750732, -0.05848003551363945, -0.002357451943680644, -0.053462520241737366, -0.038775861263275146, 0.008516119793057442, 0.048085495829582214, 0.004524315241724253, 0.027597501873970032, 0.0015369077445939183, 0.021077029407024384, -0.002306265290826559, -0.03761253505945206, -0.06888801604509354, -0.006832507438957691, 0.005772435571998358, 0.0018808423774316907, -0.003991594072431326, 0.027475375682115555, 0.03035873733460903, -0.06358740478754044, 0.004724398721009493, -0.01121168676763773, 0.03890443593263626, 0.015440871939063072, 0.03148777410387993, -0.010236931033432484, -0.030322369188070297, 0.07471198588609695, -0.014780772849917412, 0.034984759986400604, 0.04959014058113098, 0.061177387833595276, 0.00011032391194021329, 0.0058285268023610115, 0.030637744814157486, -0.014169520698487759, 0.0819154679775238, -0.03533528372645378, 0.07117252051830292, -0.031715359538793564, 0.017754318192601204, 0.05711063742637634, 0.05177770182490349, -0.030857648700475693, 0.05284943804144859, 0.02234317548573017, 0.011230149306356907, 0.014642102643847466, -0.00911536905914545, 0.001154397614300251, 0.03895809128880501, -0.0036978248972445726, -0.27007555961608887, 0.05095002427697182, -0.004648005124181509, 0.041814666241407394, 0.024535268545150757, -0.027736958116292953, 0.012730373069643974, -0.014777681790292263, 0.003941394854336977, 0.01571451872587204, 0.019340865314006805, 0.047680359333753586, 0.015084975399076939, -0.03431636840105057, -0.014583282172679901, 0.006635443307459354, 0.07046916335821152, 0.047543320804834366, 0.04469075798988342, -0.007068032398819923, 0.032995663583278656, -0.023916669189929962, 0.15546606481075287, 0.04263780266046524, 0.012941885739564896, 0.012861804105341434, -0.03190826252102852, -0.0005664468626491725, 0.05234160274267197, 0.005577179603278637, -0.01587410271167755, 0.0009763744310475886, -0.008551569655537605, 0.07192625850439072, 0.011668476276099682, -0.050912052392959595, -0.01779746450483799, 0.0552922785282135, 0.04204757511615753, -0.03379083424806595, -0.007916642352938652, 0.021045023575425148, -0.056966084986925125, 0.0030981400050222874, 0.0436616912484169, -0.046995412558317184, 0.00938083790242672, -0.04221748933196068, -0.058700304478406906, -0.012034817598760128, -0.05238863080739975, -0.018863335251808167, 0.0027401705738157034, -0.02928553707897663, -0.0008998896810226142, 0.08477266132831573, 0.03986314311623573, 0.010180669836699963, 0.05105165019631386, -0.0042969658970832825, -0.04264738783240318, -0.06424620002508163, 0.0756763145327568, 0.019908282905817032, 0.002118776785209775 ]
[ 0.05770491063594818, 0.021891653537750244, -0.011168436147272587, -0.004219315014779568, -0.0007927491678856313, 0.012923878617584705, -0.002051308983936906, 0.005464382469654083, 0.013673593290150166, 0.01455795206129551, -0.026128966361284256, -0.0015703203389421105, 0.04208466410636902, -0.015716832131147385, -0.01509387232363224, -0.02315656468272209, -0.03209248557686806, 0.00603387039154768, 0.03261202201247215, -0.025295939296483994, -0.04522325471043587, 0.023991156369447708, 0.04359359294176102, -0.001804342376999557, -0.009809620678424835, 0.03319040685892105, -0.05680999532341957, 0.00020256430434528738, 0.018485505133867264, -0.0689174085855484, -0.0382767915725708, -0.009837605990469456, -0.0006752234767191112, 0.034480370581150055, -0.03410688787698746, -0.03374089300632477, -0.03135903552174568, 0.03034811280667782, -0.03593900799751282, 0.05701597034931183, -0.0046686697751283646, -0.009172255173325539, -0.0012982626212760806, -0.005530261434614658, -0.00004431451088748872, 0.001602852251380682, -0.03144620358943939, -0.04288053140044212, 0.014124390669167042, -0.00530006131157279, -0.051343005150556564, 0.02607160061597824, 0.0023414110764861107, 0.020769529044628143, -0.018607905134558678, -0.009515910409390926, 0.013101110234856606, -0.022324414923787117, 0.0012369450414553285, -0.027652520686388016, 0.013320437632501125, -0.03500307723879814, -0.038336947560310364, -0.012792893685400486, 0.009695830754935741, -0.029590947553515434, -0.015557615086436272, 0.03553054481744766, -0.00572218419983983, 0.010340096428990364, -0.038123417645692825, 0.052235595881938934, -0.05493671074509621, -0.026149658486247063, -0.05404048413038254, 0.021398523822426796, 0.04354442283511162, -0.06939159333705902, 0.012237890623509884, 0.002831588499248028, -0.044607069343328476, 0.0036797213833779097, -0.011503354646265507, -0.011758295819163322, -0.04294145852327347, -0.042337581515312195, -0.018203873187303543, -0.010465014725923538, -0.015027781948447227, 0.04589157924056053, -0.0027126651257276535, 0.020071987062692642, -0.002886415459215641, -0.0171795804053545, -0.08400899171829224, 0.022996459156274796, 0.020346317440271378, -0.03281809762120247, 0.03653322905302048, 0.8358582854270935, 0.009113455191254616, -0.020884264260530472, -0.018092049285769463, -0.026082344353199005, 0.006394571159034967, 0.021655062213540077, 0.034728650003671646, 0.001342459232546389, -0.000657470605801791, -0.0047756703570485115, -0.0155721977353096, 0.008728367276489735, 0.016670819371938705, 0.010316894389688969, 0.026889612898230553, 0.05189494788646698, 0.012222934514284134, 0.030253758653998375, 0.007828541100025177, 0.009328274987637997, 0.017014050856232643, 0.003554463153705001, 0.018107164651155472, -0.008625159040093422, -0.004824608098715544, -0.14491106569766998, 0.022178005427122116, -6.715494901124093e-33, 0.037839125841856, -0.015844492241740227, 0.03156360983848572, 0.004797669127583504, 0.004479697905480862, 0.018173210322856903, -0.010158009827136993, 0.0047180624678730965, -0.018274299800395966, -0.03527473285794258, -0.006891010329127312, 0.011915909126400948, 0.008402376435697079, -0.043747782707214355, 0.0066516948863863945, -0.028804613277316093, -0.0037991839926689863, 0.01852087303996086, -0.011563774198293686, 0.0022584719117730856, 0.034989677369594574, 0.06096942350268364, 0.016145937144756317, 0.03183600679039955, -0.0034071514382958412, 0.012436795979738235, 0.004727242048829794, -0.0077599771320819855, -0.020530305802822113, -0.04654861241579056, -0.05511220172047615, 0.01611577905714512, -0.013446701690554619, -0.0528494156897068, 0.010300795547664165, -0.07250826805830002, -0.028444107621908188, -0.006094061303883791, -0.02034207060933113, -0.027557581663131714, -0.02484133653342724, 0.01527012325823307, -0.00025796829140745103, -0.04774099960923195, -0.034116655588150024, 0.04321809858083725, 0.011938468553125858, 0.023027852177619934, -0.013763406313955784, 0.028504544869065285, 0.026227779686450958, 0.0052686710841953754, 0.018958503380417824, -0.03729705512523651, -0.008018800988793373, 0.043716032058000565, 0.012131781317293644, -0.02463389001786709, 0.01640249602496624, -0.0014095739461481571, -0.007362020667642355, -0.010784195736050606, -0.008051188662648201, 0.03063361719250679, 0.019261615350842476, 0.029935620725154877, 0.04960630089044571, 0.005592746194452047, 0.01424774993211031, 0.005764527712017298, -0.03645145520567894, 0.049165476113557816, -0.010874363593757153, -0.030684160068631172, 0.026178566738963127, -0.024885933846235275, -0.013686987571418285, -0.010029965080320835, 0.00879319105297327, 0.03576817736029625, -0.007704998832195997, -0.0341346301138401, 0.019765332341194153, -0.023876028135418892, -0.011250617913901806, -0.002928255358710885, 0.032764606177806854, 0.04000365734100342, 0.00028989373822696507, -0.016748711466789246, 0.024890223518013954, 0.026348959654569626, 0.020892219617962837, -0.01870042458176613, -0.016849132254719734, 6.287181493882915e-33, -0.0033833503257483244, 0.009112280793488026, -0.021771181374788284, -0.009132548235356808, 0.04791174829006195, 0.027571003884077072, -0.005333557724952698, 0.007876177318394184, -0.059958405792713165, 0.024080226197838783, -0.007455409038811922, -0.051675524562597275, -0.004207408055663109, -0.019822783768177032, 0.038418035954236984, 0.018145237118005753, 0.002109034452587366, -0.005229470785707235, -0.05285094305872917, 0.017170697450637817, 0.017552928999066353, 0.002858714899048209, 0.0007805697387084365, 0.02576139196753502, 0.037828363478183746, -0.006525135599076748, 0.011905631050467491, 0.0008534353110007942, -0.02054494060575962, 0.014260770753026009, -0.009648679755628109, -0.04702548682689667, -0.03097515180706978, -0.003014806192368269, 0.005335279740393162, 0.026457292959094048, 0.019179293885827065, -0.030702348798513412, -0.018689721822738647, 0.017716601490974426, 0.0264259222894907, 0.053635187447071075, -0.004983964841812849, 0.05262506380677223, -0.008161479607224464, 0.038806721568107605, -0.025224031880497932, 0.027053480967879295, 0.018142975866794586, 0.014382269233465195, -0.02580397203564644, 0.012416834011673927, 0.002466331934556365, 0.019422659650444984, 0.02928203158080578, -0.024232501164078712, 0.005638526752591133, 0.00502196978777647, -0.0577007420361042, -0.012488828040659428, -0.041675079613924026, -0.01283203810453415, -0.012276538647711277, 0.00478709489107132, -0.007247054949402809, 0.0052832989022135735, -0.04996925964951515, 0.021148856729269028, -0.026368021965026855, 0.0006542532937601209, -0.006273640785366297, -0.012482195161283016, 0.015588349662721157, -0.004854416940361261, 0.015753841027617455, 0.012442363426089287, -0.026522768661379814, -0.013041570782661438, -0.0524686835706234, 0.02516545169055462, 0.0399971641600132, 0.0058069112710654736, 0.031994301825761795, 0.014645988121628761, -0.00447064870968461, 0.005677139386534691, -0.013465761207044125, 0.012109323404729366, 0.007145448587834835, -0.0012859439011663198, 0.01839335635304451, -0.02703726850450039, 0.013644691556692123, 0.03631226718425751, -0.008453535847365856, -1.2554020045740799e-8, -0.032558623701334, 0.005313053727149963, -0.013952421024441719, 0.02333131618797779, -0.01266324333846569, 0.04046860337257385, -0.017021188512444496, -0.009800365194678307, -0.010695870034396648, -0.012784126214683056, 0.04346168413758278, -0.027617666870355606, 0.010346191935241222, 0.011471196077764034, 0.016482410952448845, -0.020595476031303406, -0.024330975487828255, -0.02859051711857319, 0.024696195498108864, 0.004472663160413504, 0.006267296150326729, 0.029651708900928497, -0.022128045558929443, 0.015991639345884323, 0.017545288428664207, 0.02786947786808014, 0.016977718099951744, -0.07190914452075958, 0.011556567624211311, -0.04312336444854736, 0.010367288254201412, -0.03436749428510666, -0.04739111289381981, 0.00896176416426897, -0.00008231910032918677, -0.03395697847008705, 0.017222486436367035, 0.028168320655822754, 0.01916847564280033, 0.04961756616830826, -0.011311961337924004, 0.005575064569711685, -0.016363926231861115, -0.03150177747011185, -0.029631230980157852, -0.006871778517961502, -0.07372958958148956, -0.0011128573678433895, 0.05101407691836357, -0.05164835974574089, 0.003971991594880819, -0.017417754977941513, 0.015159699134528637, 0.0626048669219017, 0.06591569632291794, 0.01560269482433796, 0.0009025927865877748, 0.0342254601418972, -0.026419632136821747, -0.04635903239250183, 0.04256121441721916, 0.006168637424707413, -0.04428670182824135, 0.0029753176495432854 ]
pythons-pandas-vs-neo4js-cypher-exploring-popular-phrases-in-how-i-met-your-mother-transcripts
https://markhneedham.com/blog/2015/02/19/pythons-pandas-vs-neo4js-cypher-exploring-popular-phrases-in-how-i-met-your-mother-transcripts
false
2015-02-26 00:45:42
R: Conditionally updating rows of a data frame
[ "r-2" ]
[ "R" ]
In a blog post I wrote a couple of days ago about http://www.markhneedham.com/blog/2015/02/24/r-cohort-analysis-of-neo4j-meetup-members/[cohort analysis] I had to assign a monthNumber to each row in a data frame and started out with the following code: [source,r] ---- library(zoo) library(dplyr) monthNumber = function(cohort, date) { cohortAsDate = as.yearmon(cohort) dateAsDate = as.yearmon(date) if(cohortAsDate > dateAsDate) { "NA" } else { paste(round((dateAsDate - cohortAsDate) * 12), sep="") } } cohortAttendance %>% group_by(row_number()) %>% mutate(monthNumber = monthNumber(cohort, date)) %>% filter(monthNumber != "NA") %>% filter(monthNumber != "0") %>% mutate(monthNumber = as.numeric(monthNumber)) %>% arrange(monthNumber) ---- If we time this function using +++<cite>+++system.time+++</cite>+++ we'll see that it's not very snappy: [source,r] ---- system.time(cohortAttendance %>% group_by(row_number()) %>% mutate(monthNumber = monthNumber(cohort, date)) %>% filter(monthNumber != "NA") %>% filter(monthNumber != "0") %>% mutate(monthNumber = as.numeric(monthNumber)) %>% arrange(monthNumber)) user system elapsed 1.968 0.019 2.016 ---- The reason for the poor performance is that we process each row of the data table individually due to the call to +++<cite>+++group_by+++</cite>+++ on the second line. One way we can refactor the code is to use the +++<cite>+++ifelse+++</cite>+++ which can process multiple rows at a time: [source,r] ---- system.time( cohortAttendance %>% mutate(monthNumber = ifelse(as.yearmon(cohort) > as.yearmon(date), paste((round(as.yearmon(date) - as.yearmon(cohort))*12), sep=""), NA))) user system elapsed 0.026 0.000 0.026 ---- https://twitter.com/tonkouts[Antonios] suggested another approach which involves first setting every row to 'NA' and then http://stackoverflow.com/questions/8214303/conditional-replacement-of-values-in-a-data-frame[selectively updating the appropriate rows]. I ended up with the following code: [source,r] ---- cohortAttendance$monthNumber = NA cohortAttendance$monthNumber[as.yearmon(cohortAttendance$cohort) > as.yearmon(cohortAttendance$date)] = paste((round(as.yearmon(cohortAttendance$date) - as.yearmon(cohortAttendance$cohort))*12), sep="") ---- Let's measure that: [source,r] ---- system.time(paste((round(as.yearmon(cohortAttendance$date) - as.yearmon(cohortAttendance$cohort))*12), sep="")) user system elapsed 0.013 0.000 0.013 ---- Both approaches are much quicker than my original version although this one seems to be marginally quicker than the ifelse approach. Note to future Mark: try to avoid grouping by row number - there's usually a better and faster solution!
null
null
[ 0.009217668324708939, -0.034627366811037064, -0.01872600056231022, 0.030518660321831703, 0.08093488216400146, 0.02828904427587986, 0.030295919626951218, -0.009879200719296932, 0.007304457016289234, 0.003027763217687607, 0.02997346594929695, 0.0022011592518538237, -0.04820875823497772, 0.027276622131466866, -0.025249386206269264, 0.07458516955375671, 0.049987878650426865, -0.014676827006042004, 0.012002736330032349, -0.013916123658418655, 0.03627341613173485, 0.04438352212309837, 0.017831241711974144, 0.04651043191552162, 0.041758760809898376, -0.005087126977741718, -0.004612701945006847, -0.01033069845288992, -0.04768656939268112, 0.03838053345680237, 0.037088699638843536, 0.02893918566405773, 0.00979031901806593, 0.01049618236720562, 0.037223637104034424, 0.005107048433274031, -0.016671108081936836, 0.007638636976480484, 0.008687657304108143, -0.008119470439851284, -0.06427551805973053, 0.01617051102221012, -0.0021200149785727262, 0.025851638987660408, -0.047504838556051254, 0.0011967774480581284, -0.049100570380687714, 0.03366120532155037, 0.002217045519500971, 0.003974710125476122, -0.07288393378257751, 0.013109410181641579, -0.0013686856254935265, -0.03599957004189491, -0.002371321665123105, 0.04584593325853348, 0.026098964735865593, -0.06592170149087906, 0.013658391311764717, -0.04715295135974884, 0.0338437482714653, -0.01831790618598461, -0.011669125407934189, 0.0007603030535392463, -0.0028325477614998817, -0.00955455843359232, -0.007095307111740112, 0.05246996879577637, -0.05723392218351364, 0.000199832531507127, -0.012497716583311558, 0.017100149765610695, -0.02020646259188652, 0.00007703527808189392, -0.015366635285317898, -0.047370731830596924, -0.00047544247354380786, 0.07375559210777283, 0.04216016083955765, 0.02789277583360672, -0.0009386027813889086, -0.009921282529830933, 0.015098398551344872, 0.01725102961063385, 0.024036142975091934, -0.027603358030319214, -0.02337433025240898, -0.036958590149879456, -0.05931038782000542, 0.030945686623454094, -0.009668123908340931, -0.04703347384929657, 0.02512473799288273, 0.03120359405875206, -0.017242295667529106, -0.0064172158017754555, 0.01973560079932213, -0.008613748475909233, 0.02256028726696968, -0.012287607416510582, -0.04951705038547516, -0.03522863984107971, 0.0388631708920002, 0.004782854579389095, -0.09619919955730438, -0.019871056079864502, -0.035017695277929306, -0.011156021617352962, 0.021301744505763054, 0.02144700475037098, -0.018602823838591576, 0.01996821165084839, -0.028774475678801537, 0.0072280350141227245, -0.07612525671720505, 0.07721833139657974, 0.008449366316199303, -0.01098446361720562, -0.013473973609507084, -0.018490631133317947, 0.050672467797994614, 0.014558345079421997, -0.011930769309401512, 0.07490266114473343, -0.032775308936834335, 0.06867890059947968, 0.042357876896858215, 0.03929093852639198, -0.01772788166999817, -0.07680413872003555, -0.026171058416366577, 0.05998295545578003, -0.02202487736940384, 0.012344149872660637, -0.007454258855432272, -0.030249053612351418, -0.020173614844679832, 0.000735245761461556, 0.09431736171245575, 0.028522755950689316, 0.03562770038843155, -0.04149884730577469, 0.026972094550728798, -0.029031233862042427, 0.046289410442113876, 0.029258228838443756, -0.010223413817584515, -0.039775341749191284, -0.035941604524850845, -0.011708172038197517, 0.04648098722100258, 0.040637314319610596, 0.047984588891267776, -0.02442070096731186, 0.032920435070991516, 0.06285280734300613, 0.012216292321681976, -0.00639131385833025, -0.012485588900744915, 0.02169308066368103, 0.05080101266503334, 0.03261883556842804, -0.01326571311801672, 0.05370284616947174, -0.012343504466116428, -0.025461416691541672, 0.004272985737770796, 0.03131784871220589, -0.04021204262971878, 0.0012846349272876978, -0.04319285601377487, -0.04735604301095009, 0.043345242738723755, -0.017178716138005257, 0.015332644805312157, 0.051134075969457626, 0.0581718347966671, 0.028286660090088844, 0.037764064967632294, -0.005984580144286156, -0.07726453989744186, 0.06482574343681335, 0.011013464070856571, 0.02834385074675083, 0.034740325063467026, -0.012016970664262772, 0.08906377106904984, 0.014361432753503323, 0.017065487802028656, 0.04173039644956589, -0.08338253945112228, -0.07547488808631897, -0.004100722726434469, -0.02891804464161396, 0.05323496460914612, -0.04095454886555672, 0.009686199016869068, 0.0742657259106636, -0.019863292574882507, 0.03165799751877785, -0.009784748777747154, 0.011525996960699558, 0.03657972440123558, -0.024150021374225616, -0.0310831256210804, 0.02483118325471878, 0.01758306473493576, -0.024430248886346817, -0.010664698667824268, 0.04369835928082466, -0.02875373698771, 0.02351277694106102, 0.017521237954497337, -0.024880146607756615, 0.030767684802412987, 0.03287308290600777, 0.06946317851543427, 0.019926898181438446, 0.023627566173672676, -0.0281954575330019, 0.04816245660185814, -0.005516719538718462, -0.042939525097608566, -0.016466328874230385, 0.009249267168343067, 0.1151595339179039, 0.051088232547044754, -0.024401718750596046, -0.04318607598543167, 0.02637159451842308, 0.009356753900647163, -0.019438063725829124, 0.020688112825155258, -0.00007190535689005628, 0.011418311856687069, 0.016069261357188225, -0.02936716191470623, -0.009699548594653606, -0.003725636750459671, -0.03408431261777878, 0.016331644728779793, 0.060472339391708374, 0.007871943525969982, 0.05518873780965805, -0.0309591144323349, 0.006776496302336454, -0.031630441546440125, -0.019663391634821892, -0.08783614635467529, 0.01171866338700056, 0.03239181265234947, -0.006447130348533392, 0.05411254242062569, -0.025218568742275238, -0.014235121197998524, -0.01884656399488449, -0.0369693748652935, 0.030185775831341743, 0.06348811835050583, 0.03458699584007263, 0.0035920164082199335, 0.028086861595511436, -0.022754445672035217, -0.03620629757642746, -0.021695027127861977, -0.055776920169591904, -0.04433691129088402, -0.022724151611328125, 0.0027115324046462774, 0.00042694792500697076, 0.042485311627388, -0.01106683537364006, 0.020057305693626404, 0.0192663986235857, -0.0014950819313526154, -0.030017217621207237, 0.045333005487918854, -0.0057327537797391415, -0.028299663215875626, -0.022012891247868538, -0.01694488152861595, 0.046723589301109314, -0.02621881291270256, -0.02841457910835743, -0.009610392153263092, -0.02930765599012375, 0.06326689571142197, -0.03315996006131172, -0.026603322476148605, 0.02523392252624035, 0.00882958248257637, 0.058955445885658264, 0.02623268961906433, 0.01139747817069292, 0.05504264310002327, 0.017697559669613838, 0.011095884256064892, 0.006857222877442837, -0.00998143944889307, 0.03340885788202286, 0.018256714567542076, 0.016330691054463387, 0.06924205273389816, -0.0071265557780861855, -0.013317367061972618, -0.04701828956604004, -0.0028170200530439615, -0.01958143338561058, -0.25243911147117615, 0.04077225923538208, -0.034133121371269226, -0.0322224386036396, 0.02009105682373047, -0.05947152525186539, 0.0377192348241806, -0.01975235529243946, -0.029402879998087883, 0.00849046278744936, 0.02232542261481285, -0.01502937451004982, -0.026069505140185356, 0.0505676195025444, 0.03529685363173485, -0.005262802820652723, -0.023616282269358635, -0.03687575086951256, -0.00804576650261879, 0.06476448476314545, 0.05616443231701851, -0.05315273627638817, -0.0299452506005764, 0.030599921941757202, 0.021556755527853966, 0.057022545486688614, -0.05934542790055275, 0.01329464465379715, -0.07879484444856644, -0.05985632911324501, 0.014527116902172565, -0.024446722120046616, 0.038563914597034454, -0.009783408604562283, 0.0003141667984891683, -0.011324210092425346, 0.043465983122587204, 0.04788780212402344, 0.027705997228622437, 0.018998168408870697, -0.028630802407860756, -0.04010190814733505, 0.014828408136963844, -0.011715549975633621, 0.08327037841081619, 0.030060570687055588, -0.06449951231479645, 0.011491247452795506, -0.015063382685184479, 0.06521778553724289, -0.00886838324368, -0.0022412629332393408, -0.021900029852986336, 0.027976933866739273, -0.04684719070792198, -0.050956204533576965, -0.027348129078745842, 0.011262374930083752, -0.021805884316563606, -0.03859763965010643, -0.02667633816599846, -0.040357157588005066, 0.03101280890405178, -0.05130498856306076, -0.04711606726050377, -0.0832718163728714, -0.09008454531431198, -0.016521567478775978, 0.048118799924850464, 0.02291260100901127, -0.03023691289126873, -0.008879982866346836, -0.0010281885042786598, -0.10701341181993484, -0.024348728358745575, -0.04748138412833214, -0.009339520707726479, -0.01662909798324108, -0.035282574594020844, 0.04834635183215141, -0.04746754467487335, -0.06976678222417831, 0.017198868095874786, 0.02135193720459938, 0.031226318329572678, -0.008370083756744862, -0.0035770053509622812, 0.000021375351934693754, -0.051379818469285965, -0.003928856458514929, 0.060290977358818054, -0.03548820689320564, -0.02165093645453453, 0.01585771143436432, -0.010222071781754494, 0.03002491220831871, 0.002944562816992402, 0.013221283443272114, 0.027115071192383766, 0.0388115756213665, 0.043535761535167694, -0.0398607961833477, 0.014271331019699574, -0.08599193394184113, -0.026579946279525757, -0.015008678659796715, -0.0658876970410347, 0.03342744708061218, 0.025011060759425163, 0.022984493523836136, 0.02385294996201992, -0.0027785205747932196, 0.021072298288345337, -0.07037078589200974, -0.030898837372660637, 0.022958647459745407, -0.018010355532169342, 0.0013442152412608266, 0.005215033423155546, 0.007547138724476099, -0.07702483981847763, 0.005293511785566807, -0.021070323884487152, -0.01152530126273632, -0.028820471838116646, -0.02862534299492836, -0.011134457774460316, -0.013874880969524384, -0.005826551467180252, 0.020063843578100204, -0.017931269481778145, 0.02615610510110855, 0.019289547577500343, -0.03594424948096275, 0.029498746618628502, -0.0058561526238918304, -0.04831261187791824, -0.01678396947681904, 0.02330794930458069, 0.02345302700996399, -0.014963570050895214, 0.004610983654856682, -0.0016667017480358481, 0.044157251715660095, 0.010775324888527393, -0.004125641193240881, 0.03456394001841545, 0.0027887483593076468, 0.014412891119718552, 0.02719169855117798, 0.004611560143530369, -0.01570318453013897, -0.008701021783053875, -0.04930516704916954, -0.039753179997205734, -0.007876867428421974, 0.07111254334449768, -0.0175895094871521, -0.026951588690280914, -0.05959875509142876, -0.005910661071538925, -0.041061703115701675, -0.015437623485922813, -0.05361242964863777, 0.014188085682690144, 0.06436812877655029, -0.006919011007994413, 0.012996774166822433, 0.003869272768497467, -0.0076551856473088264, -0.02273648791015148, 0.022549951449036598, -0.024884402751922607, 0.030412808060646057, -0.012175730429589748, -0.026046980172395706, 0.03314603120088577, 0.014876573346555233, 0.018573347479104996, 0.0016619969392195344, -0.012747918255627155, -0.008520593866705894, 0.00884841475635767, 0.008353045210242271, 0.033644236624240875, 0.06163068860769272, -0.006634446792304516, -0.0072952136397361755, -0.015847956761717796, -0.057068392634391785, -0.04126989468932152, -0.015119386836886406, -0.008523168973624706, -0.02013341896235943, -0.04105936363339424, -0.061310842633247375, 0.030917789787054062, 0.04075874015688896, -0.0009792656637728214, 0.030027423053979874, -0.017132170498371124, 0.0026635294780135155, -0.03367231413722038, 0.037968941032886505, 0.05901777371764183, -0.06713756918907166, -0.01467293780297041, -0.00770989153534174, -0.040731485933065414, -0.00007174295751610771, 0.005003925412893295, -0.053869131952524185, -0.02908919006586075, -0.009218025952577591, 0.027349086478352547, -0.0030534989200532436, -0.06210514158010483, -0.05773899331688881, 0.00453995494171977, 0.005288585554808378, 0.021413220092654228, -0.011539814993739128, 0.00423271581530571, -0.03849588707089424, -0.0046639819629490376, 0.02349783480167389, -0.03028063289821148, -0.025071218609809875, 0.027278130874037743, -0.015349077060818672, 0.009969376027584076, -0.010108008980751038, 0.01007006224244833, 0.013810351490974426, -0.017825262621045113, -0.008052002638578415, -0.03717406094074249, 0.012318238615989685, 0.02048279345035553, 0.04299928992986679, -0.02092692255973816, 0.013413220643997192, -0.038512565195560455, 0.023772897198796272, -0.026474468410015106, 0.01084984466433525, -0.0167530570179224, -0.0054741776548326015, 0.0017005716217681766, 0.06694235652685165, 0.015096563845872879, 0.01521290559321642, -0.02556254155933857, -0.01778433658182621, 0.06303495913743973, -0.015530353412032127, -0.037051692605018616, -0.03309335187077522, -0.05275685712695122, 0.024771729484200478, 0.00887465849518776, 0.007653879467397928, -0.01266771275550127, 0.056954022496938705, 0.047550398856401443, 0.03725771978497505, 0.04961797967553139, -0.002385311061516404, 0.03348885476589203, -0.024504056200385094, 0.0051515125669538975, -0.09384020417928696, -0.015521283261477947, 0.022830722853541374, 0.03139588236808777, -0.0102566322311759, -0.040111470967531204, -0.014902779832482338, 0.024496451020240784, -0.05906562879681587, -0.03728228062391281, 0.020861180499196053, -0.015809185802936554, 0.00911118183284998, 0.020596152171492577, -0.0500665083527565, -0.001344727585092187, 0.029032297432422638, -0.03879506140947342, -0.01795453019440174, -0.0204221922904253, 0.07205595076084137, -0.0405397042632103, 0.03592608496546745, -0.0354195162653923, -0.018688281998038292, 0.07712948322296143, 0.011746888980269432, -0.0016551587032154202, 0.03448060527443886, -0.02889278344810009, 0.022668849676847458, 0.0350726880133152, 0.004347725305706263, 0.0024458772968500853, 0.010111742652952671, 0.005237294360995293, -0.02551908791065216, -0.012173401191830635, 0.025392713025212288, -0.015470811165869236, -0.04037422686815262, 0.08953601866960526, 0.0034556325990706682, -0.04287032410502434, -0.054083798080682755, 0.012314853258430958, -0.01451102364808321, -0.002742936136201024, -0.022527344524860382, 0.004352402873337269, -0.0382918156683445, 0.07353929430246353, -0.015259657055139542, 0.009008871391415596, 0.07072445750236511, 0.000001615544988453621, 0.008066650480031967, 0.009639950469136238, 0.06955471634864807, 0.09475687891244888, 0.0642780289053917, -0.023869171738624573, 0.08431363850831985, -0.0337749719619751, -0.0395977720618248, 0.015308834612369537, -0.04410277679562569, -0.02807154878973961, -0.019894419237971306, 0.025333546102046967, 0.09308303147554398, -0.03865618631243706, 0.06983991712331772, -0.02208586595952511, -0.00767317833378911, -0.019101429730653763, -0.0028214191552251577, 0.038294509053230286, 0.05179253965616226, 0.011205439455807209, 0.027950314804911613, -0.032458189874887466, -0.019687382504343987, 0.034975674003362656, -0.010344469919800758, -0.012036286294460297, 0.004055744502693415, 0.005738579668104649, 0.0013980177463963628, -0.01296138484030962, 0.008052448742091656, 0.06933576613664627, -0.053515899926424026, 0.002839232562109828, -0.010753495618700981, 0.038655295968055725, -0.000049924485210794955, 0.015220687724649906, -0.025091880932450294, -0.014731097035109997, -0.026039617136120796, -0.03976602852344513, -0.04227530211210251, -0.0010262422729283571, -0.04929828271269798, 0.013524156995117664, -0.049133408814668655, 0.00786205381155014, -0.0001384539355058223, -0.04157887399196625, -0.02932417020201683, -0.046874333173036575, -0.025010952726006508, -0.044476933777332306, -0.06864496320486069, 0.010241607204079628, 0.0073881931602954865, -0.02944250963628292, -0.025463901460170746, 0.009455496445298195, 0.010653366334736347, -0.030917083844542503, 0.02618921361863613, -0.04898663982748985, -0.02216058038175106, 0.013921350240707397, 0.011408359743654728, 0.009806833229959011, 0.025250224396586418, 0.040986791253089905, -0.0011641256278380752, -0.006451984867453575, 0.004570899996906519, 0.0018555272836238146, 0.049731217324733734, 0.04161553084850311, -0.00469220383092761, -0.06870721280574799, 0.005397280212491751, 0.016057733446359634, -0.00520304124802351, -0.09139424562454224, 0.03723703324794769, 0.015738612040877342, 0.00834023766219616, 0.04264731705188751, -0.01097936276346445, -0.006745950784534216, -0.017677348107099533, 0.005009216722100973, 0.015471571125090122, 0.03978531062602997, 0.011921693570911884, -0.028108611702919006, 0.06390380859375, 0.04541800171136856, -0.027118712663650513, -0.03451910987496376, -0.03136439248919487, -0.008729132823646069, -0.0054584089666605, -0.05983414873480797, -0.0284342672675848, -0.07249675691127777, -0.08908040076494217, -0.0024379994720220566, 0.021859733387827873, -0.04439675062894821, -0.008134935982525349, 0.00013933831360191107, 0.01914108544588089, -0.02322615124285221, 0.010669035837054253, -0.029165349900722504, 0.05302204564213753, -0.028482303023338318, -0.017491186037659645, 0.0030495948158204556, 0.019973374903202057, -0.02683277428150177, 0.018233129754662514, -0.02201543189585209, -0.05373570695519447, 0.0011193233076483011, -0.010366842150688171, 0.017324285581707954, 0.04054275155067444, 0.009200998581945896, 0.04019391909241676 ]
[ -0.08823104947805405, -0.003194820135831833, -0.018169911578297615, 0.0004772418469656259, 0.06364262104034424, -0.04031037166714668, -0.027871940284967422, 0.003590109758079052, 0.011490564793348312, 0.01066031027585268, 0.049941081553697586, -0.021756600588560104, 0.03303264454007149, 0.01701412722468376, 0.0376296266913414, -0.02352430857717991, -0.03551706299185753, -0.0430145300924778, -0.008595539256930351, 0.04372784122824669, -0.020870547741651535, -0.03772534057497978, -0.0425155833363533, -0.03922756016254425, 0.059968363493680954, 0.06219373270869255, -0.0015402494464069605, -0.06025279685854912, -0.04003698378801346, -0.22512097656726837, -0.001201235456392169, 0.03329839929938316, 0.05275735259056091, -0.03159605711698532, 0.008081033825874329, 0.0300820954144001, 0.044136110693216324, 0.007575220428407192, 0.018821652978658676, 0.04969632253050804, -0.01223013736307621, 0.04818909987807274, -0.05549811199307442, -0.016432415693998337, 0.02324732206761837, 0.008282204158604145, -0.06663872301578522, -0.0008926140144467354, -0.025871247053146362, 0.03698413074016571, -0.04197250306606293, 0.010080387815833092, -0.011452093720436096, 0.02972315438091755, 0.021803606301546097, 0.033762264996767044, 0.0450410358607769, 0.0369199700653553, 0.030802330002188683, 0.034196775406599045, 0.0220798309892416, -0.0009564784704707563, -0.1851576566696167, 0.08685419708490372, 0.01609572023153305, 0.01956120878458023, -0.02819773368537426, -0.014399485662579536, -0.014993769116699696, 0.062247611582279205, -0.007487172726541758, 0.017097359523177147, -0.009121043607592583, 0.07241276651620865, 0.03421609848737717, 0.013658612966537476, -0.01725686527788639, 0.0058919875882565975, 0.06339048594236374, -0.02345588617026806, -0.027021100744605064, 0.025410477072000504, -0.021717295050621033, -0.036389246582984924, 0.02334858663380146, 0.006490491796284914, -0.016088221222162247, 0.006216470152139664, -0.018672995269298553, 0.02004014514386654, 0.033974744379520416, 0.02480950765311718, 0.039069466292858124, 0.035238221287727356, -0.07348539680242538, 0.01698182336986065, 0.05427137389779091, 0.022474586963653564, -0.0198199599981308, 0.3877321779727936, -0.004313387908041477, 0.0007730495999567211, 0.002198081463575363, 0.06734888255596161, -0.0074473111890256405, -0.045662324875593185, 0.005759336985647678, -0.06894972920417786, 0.011476325802505016, -0.024940894916653633, -0.02737794816493988, -0.0001801468024495989, 0.0379469059407711, -0.10034465044736862, 0.011907496489584446, -0.010799919255077839, 0.028901705518364906, 0.005050071980804205, 0.027526283636689186, 0.04034457728266716, 0.025950618088245392, -0.018714139237999916, 0.035700663924217224, 0.01739838719367981, 0.02023293264210224, 0.020465264096856117, 0.034277334809303284, 0.06686117500066757, 0.04175383970141411, -0.0018082226160913706, 0.08089347183704376, 0.015073380433022976, -0.08505471050739288, 0.01576666347682476, -0.0018871461506932974, -0.016606885939836502, 0.02452237717807293, -0.05705878138542175, -0.011308589018881321, -0.005955694243311882, -0.012138498947024345, -0.0046744090504944324, 0.017300743609666824, 0.00036186716170050204, -0.05558263510465622, 0.17739851772785187, -0.018481796607375145, -0.005866746883839369, -0.022037671878933907, -0.045359525829553604, 0.006688034627586603, 0.07813660800457001, 0.02428087219595909, -0.04969942942261696, -0.015596485696732998, 0.009193750098347664, 0.0631086453795433, -0.033787958323955536, -0.06440000981092453, -0.022420313209295273, -0.03312021866440773, -0.029570790007710457, -0.03946925327181816, 0.05683698132634163, 0.06562606990337372, -0.06550323963165283, -0.00925714522600174, 0.031416039913892746, 0.03290311619639397, -0.056841377168893814, 0.04414420202374458, 0.0004209068138152361, -0.02813759073615074, 0.012198367156088352, 0.07485101372003555, 0.008748712949454784, -0.006985686719417572, 0.002604340435937047, 0.036554791033267975, 0.0006635487079620361, 0.005755936726927757, 0.040601249784231186, -0.046672992408275604, -0.006304901093244553, -0.025630347430706024, -0.06333688646554947, -0.08136247098445892, 0.010882576927542686, -0.012476351112127304, -0.03820466622710228, -0.013925528153777122, -0.018124738708138466, -0.0696287453174591, 0.09027810394763947, -0.08820182085037231, -0.046892523765563965, 0.012401235289871693, 0.004603697918355465, -0.008923024870455265, -0.03764541074633598, 0.01999845542013645, -0.004748532548546791, 0.014285613782703876, 0.027417214587330818, -0.012019140645861626, -0.0037354312371462584, 0.06417413055896759, -0.06611163914203644, 0.06754827499389648, 0.04746445268392563, -0.025327373296022415, -0.01592986471951008, -0.000929925125092268, 0.00805632770061493, -0.02151794359087944, 0.018163979053497314, -0.009082481265068054, -0.03741401806473732, 0.03020128794014454, 0.028106290847063065, 0.012976807542145252, -0.011303150095045567, 0.003416081890463829, -0.3708969056606293, -0.023299509659409523, 0.02314845100045204, -0.023229317739605904, 0.01407815981656313, -0.039509836584329605, 0.00039038481190800667, -0.02865901216864586, 0.00879865512251854, 0.048516057431697845, 0.041346874088048935, 0.021739114075899124, -0.014789829961955547, -0.08015560358762741, -0.014712944626808167, 0.05031317099928856, -0.01929064653813839, -0.02682478353381157, -0.027843480929732323, -0.013162020593881607, 0.002064247615635395, -0.028425268828868866, -0.006010727491229773, -0.06711465865373611, 0.021344518288969994, -0.03917289897799492, 0.10642172396183014, -0.003400564193725586, 0.013906264677643776, -0.03850819543004036, 0.0612197071313858, -0.02062433771789074, -0.01303920242935419, -0.05739844962954521, 0.01990533620119095, -0.0421283021569252, -0.019291039556264877, 0.004448594991117716, -0.020138312131166458, -0.04158328101038933, -0.02109314315021038, 0.019252318888902664, -0.02415434457361698, -0.03918609768152237, -0.048520397394895554, 0.03990297019481659, -0.022923855111002922, 0.0021853051148355007, -0.019573844969272614, 0.06482531130313873, 0.011848744004964828, -0.013065912760794163, 0.04115639626979828, 0.03634991869330406, 0.04369746148586273, -0.024592047557234764, -0.07789241522550583, 0.01706983707845211, 0.004519599489867687, -0.009657260961830616, 0.011545026674866676, 0.007038365118205547, 0.05071151256561279, -0.06781552731990814, -0.025597447529435158, -0.004920115694403648, -0.019852377474308014, -0.0462450236082077, -0.02128230780363083, 0.01048952154815197, -0.02051088958978653, 0.11155815422534943, -0.031503427773714066, 0.030747823417186737, 0.0343526192009449, 0.006450158543884754, -0.06297452002763748, 0.0007494908641092479, -0.005688362754881382, -0.008374189957976341, 0.04925457388162613, -0.040541086345911026, 0.045438263565301895, -0.012842858210206032, 0.028560670092701912, 0.023638000711798668, 0.019185585901141167, 0.009815148077905178, 0.05528271943330765, 0.022907575592398643, -0.027684813365340233, -0.02958439290523529, -0.0536937415599823, -0.04350990802049637, 0.023171009495854378, -0.009983795695006847, -0.2780812084674835, 0.033658549189567566, 0.001469992334023118, 0.023440437391400337, 0.0026162134017795324, 0.0023978345561772585, -0.031034456565976143, -0.05722539871931076, -0.01707935519516468, 0.017046142369508743, -0.0031811692751944065, 0.058871764689683914, 0.02350456267595291, -0.03174985572695732, 0.01860896684229374, 0.0015452527441084385, 0.008660884574055672, -0.02425495535135269, 0.027605745941400528, -0.012942921370267868, 0.04037642851471901, -0.05291686952114105, 0.15041667222976685, 0.013540091924369335, -0.018709255382418633, 0.007363635115325451, -0.02861316315829754, 0.009883933700621128, 0.0910998284816742, 0.006951938383281231, -0.008329275995492935, 0.022323576733469963, 0.06808169186115265, 0.04137304797768593, 0.007328212261199951, -0.01609667018055916, -0.02521377056837082, 0.0590130053460598, 0.030034782364964485, -0.02784985862672329, -0.00015781122783664614, 0.028610767796635628, -0.01987779326736927, 0.038560979068279266, 0.09081020951271057, -0.009111235849559307, 0.013106080703437328, -0.04228973761200905, -0.02055860124528408, -0.004494738299399614, -0.02276807837188244, -0.019883975386619568, -0.027013784274458885, 0.008225264959037304, -0.007788949646055698, 0.029367828741669655, 0.030998116359114647, -0.03048962727189064, -0.0015948752406984568, -0.01335161179304123, -0.015746142715215683, -0.04646029695868492, 0.07194653898477554, 0.03911920636892319, 0.0042811608873307705 ]
[ -0.0003842377627734095, 0.02098691463470459, -0.024913689121603966, 0.024412760511040688, -0.02150653675198555, 0.0012020542053505778, -0.002810621401295066, -0.004109614994376898, -0.042557161301374435, -0.014732487499713898, -0.030629193410277367, -0.004399282392114401, 0.011636492796242237, -0.025553444400429726, -0.007707902230322361, -0.01326956320554018, -0.006622725166380405, -0.00386896263808012, 0.06147490441799164, 0.007548591587692499, -0.04535146802663803, 0.021297607570886612, 0.003371566766873002, -0.002292054006829858, -0.014109115116298199, 0.015322555787861347, -0.033768270164728165, 0.0016552238957956433, 0.011429856531322002, -0.08551210165023804, -0.018239177763462067, 0.0007626510923728347, 0.01485421508550644, 0.01604629121720791, -0.04307445511221886, -0.01670219749212265, -0.0030060072895139456, 0.02638920769095421, 0.020361965522170067, 0.02908804826438427, -0.014685503207147121, -0.009486343711614609, 0.0017510937759652734, -0.002796225482597947, 0.004354586359113455, -0.0292190033942461, -0.02598174847662449, 0.009078560397028923, -0.02398054674267769, 0.0227410439401865, -0.06295225769281387, -0.00026453903410583735, -0.016412850469350815, 0.00629253126680851, 0.0013806276256218553, -0.04113464057445526, -0.04587145149707794, -0.02894185297191143, -0.021863233298063278, -0.01608613319694996, -0.015101807191967964, -0.01381066907197237, -0.01738036796450615, 0.007852318696677685, 0.012360604479908943, -0.024227948859333992, -0.016328107565641403, 0.024505766108632088, 0.040619220584630966, 0.0006009526550769806, 0.0023883050307631493, 0.032250288873910904, -0.038305073976516724, -0.022340165451169014, -0.04104817286133766, 0.021054545417428017, 0.0014226395869627595, -0.013789774850010872, 0.036739178001880646, -0.02704094909131527, -0.01718735694885254, -0.009527037851512432, -0.013078856281936169, 0.005590701475739479, 0.00551196001470089, -0.0261862650513649, 0.026064332574605942, -0.014347663149237633, -0.016504764556884766, -0.029897501692175865, 0.012496521696448326, 0.03319369629025459, 0.03946256637573242, -0.011392747052013874, -0.10225393623113632, -0.00354743842035532, 0.021001726388931274, 0.010831071063876152, 0.007570785470306873, 0.8467941880226135, 0.019949954003095627, 0.032650623470544815, -0.01652015559375286, 0.040931206196546555, -0.029410671442747116, -0.042358290404081345, 0.016152149066329002, 0.009688136167824268, 0.00189019157551229, 0.018075991421937943, -0.002059059916064143, 0.05803985148668289, 0.035978320986032486, 0.010150536894798279, 0.0403054803609848, 0.024119574576616287, 0.04399631917476654, -0.021544329822063446, 0.01491542998701334, 0.029169274494051933, 0.00930791161954403, 0.019531384110450745, 0.0089308125898242, 0.002682172227650881, 0.008654848672449589, -0.13519011437892914, 0.022312885150313377, -6.214542555157821e-33, 0.036903828382492065, -0.007476218044757843, 0.04158993065357208, -0.010633615776896477, 0.043815214186906815, 0.017897887155413628, -0.02597804181277752, -0.02193153090775013, -0.005320815835148096, -0.036057695746421814, -0.02027464099228382, 0.002080374862998724, 0.0317964106798172, -0.03923948109149933, 0.014011607505381107, -0.021670572459697723, -0.008859403431415558, 0.02818126045167446, 0.021608946844935417, 0.006408046465367079, 0.009308494627475739, 0.024556586518883705, 0.015928147360682487, 0.05027736723423004, 0.010452354326844215, 0.029630566015839577, 0.00978859979659319, -0.0009943513432517648, -0.003081246744841337, -0.03322777897119522, -0.007419074885547161, -0.0018345611169934273, -0.024426160380244255, -0.02836596593260765, 0.008809519000351429, -0.07597903162240982, -0.006843190174549818, -0.015136309899389744, -0.014478053897619247, -0.003317424328997731, -0.04432061314582825, 0.0036584886256605387, -0.019709600135684013, -0.030064458027482033, -0.033584147691726685, -0.012270492501556873, 0.0366482138633728, 0.09419829398393631, -0.024711458012461662, 0.029641197994351387, -0.024648087099194527, -0.010966564528644085, 0.005485241767019033, -0.03596428036689758, -0.050372082740068436, 0.028994619846343994, -0.007890756241977215, 0.005932538770139217, 0.0026562432758510113, 0.03343204781413078, 0.020816991105675697, -0.015428455546498299, 0.010972278192639351, 0.007352447137236595, -0.0027966834604740143, -0.001930713769979775, 0.01822463423013687, -0.015087401494383812, 0.06189920753240585, 0.04046519473195076, -0.033063676208257675, 0.027901476249098778, -0.015538983047008514, -0.0009978177258744836, 0.022296283394098282, -0.028403667733073235, 0.03261369839310646, -0.011732262559235096, 0.005723579786717892, 0.03540419042110443, 0.03316529095172882, 0.023378824815154076, -0.016981717199087143, -0.014899501577019691, -0.028450660407543182, -0.044513437896966934, 0.030648428946733475, 0.029808465391397476, -0.02254852093756199, -0.003444620408117771, 0.03527076914906502, 0.006937684025615454, 0.0035290552768856287, -0.030907338485121727, 0.002004927722737193, 6.0434625767070835e-33, 0.024411015212535858, -0.015388581901788712, 0.0024919328279793262, 0.002433143323287368, 0.06848056614398956, -0.03109942190349102, 0.025233903899788857, 0.03875008225440979, -0.02881341055035591, 0.035442057996988297, 0.013191756792366505, -0.009667886421084404, -0.009267719462513924, 0.047086432576179504, 0.06075366213917732, 0.0065824841149151325, 0.02848873659968376, -0.025171246379613876, -0.013973094522953033, 0.023832004517316818, 0.004317114129662514, -0.020233698189258575, -0.01726607233285904, 0.03219279646873474, 0.03513018786907196, 0.0530562661588192, -0.022534644231200218, -0.030156388878822327, 0.0031139100901782513, -0.005184808745980263, 0.006852523423731327, -0.008553337305784225, -0.02178872376680374, -0.04568547382950783, -0.04111327603459358, 0.03190810978412628, -0.012685897760093212, -0.00596562959253788, 0.0035324401687830687, -0.017842523753643036, 0.02518676035106182, 0.01598650962114334, -0.003826356725767255, 0.023997677490115166, 0.02199573442339897, 0.007929508574306965, 0.023707328364253044, 0.0292002335190773, -0.03605261817574501, 0.007540597580373287, -0.030265014618635178, -0.01715863309800625, -0.024520782753825188, 0.017456738278269768, 0.016655799001455307, -0.046319205313920975, -0.006123445462435484, -0.00262158433906734, -0.04498386010527611, 0.0062194084748625755, -0.012707232497632504, 0.007147317752242088, -0.030541101470589638, -0.0024564354680478573, -0.03469172492623329, -0.0534062422811985, -0.004893876612186432, -0.02564576081931591, -0.02033551037311554, 0.011015087366104126, 0.00802307017147541, -0.023566463962197304, -0.003342940704897046, 0.018305011093616486, 0.0005014360067434609, -0.01514237467199564, -0.046577874571084976, 0.00795240979641676, -0.05262180045247078, 0.026288099586963654, 0.010251794941723347, 0.002402910264208913, 0.03139205649495125, 0.00008632785466033965, -0.02674112468957901, 0.009664766490459442, -0.017980284988880157, 0.021702466532588005, 0.0003260857774876058, -0.012793133966624737, -0.025648456066846848, -0.059863001108169556, -0.04667273163795471, 0.026398450136184692, -0.01946323923766613, -1.2428798434882538e-8, -0.01644127257168293, 0.012804491445422173, 0.00044539975351653993, 0.02274426445364952, 0.020490046590566635, 0.014100390486419201, -0.04224877431988716, -0.008376496843993664, 0.017910145223140717, 0.010987475514411926, 0.0598791278898716, -0.0033874509390443563, 0.028342120349407196, 0.020157109946012497, -0.016760366037487984, -0.025999724864959717, -0.013925587758421898, -0.0341804176568985, 0.015614013187587261, 0.004220339469611645, 0.018272114917635918, 0.00915187131613493, -0.02211197279393673, 0.0015298058278858662, 0.035719022154808044, 0.006874463055282831, -0.02450866624712944, -0.053039487451314926, 0.002238655462861061, -0.0443401113152504, 0.015615887008607388, -0.025538252666592598, -0.004198781214654446, -0.01302351988852024, -0.023961052298545837, -0.04636458680033684, 0.029787877574563026, 0.03595522418618202, 0.008032049983739853, -0.004154330585151911, 0.014485138468444347, -0.00046857507550157607, -0.03193249925971031, -0.01635478250682354, -0.017061160877346992, 0.006527370307594538, -0.03346140310168266, -0.01707431487739086, 0.009462409652769566, -0.04246312007308006, 0.008940156549215317, -0.029841512441635132, 0.03636704012751579, 0.049841344356536865, 0.04250703379511833, 0.020331572741270065, -0.022743484005331993, -0.006191001273691654, -0.003931405954062939, -0.010945657268166542, 0.009995078667998314, 0.008692821487784386, -0.005051921121776104, -0.0326431542634964 ]
r-conditionally-updating-rows-of-a-data-frame
https://markhneedham.com/blog/2015/02/26/r-conditionally-updating-rows-of-a-data-frame
false
2015-02-24 01:19:26
R: Cohort analysis of Neo4j meetup members
[ "r-2", "rstats" ]
[ "R" ]
A few weeks ago I came across a blog post explaining how to apply http://analyzecore.com/2014/07/03/cohort-analysis-in-r-retention-charts/[cohort analysis] to customer retention using R and I thought it'd be a fun exercise to calculate something similar for meetup attendees. In the customer retention example we track customer purchases on a month by month basis and each customer is put into a cohort or bucket based on the first month they made a purchase in. We then calculate how many of them made purchases in subsequent months and compare that with the behaviour of people in other cohorts. In our case we aren't selling anything so our equivalent will be a person attending a meetup. We'll put people into cohorts based on the month of the first meetup they attended. This can act as a proxy for when people become interested in a technology and could perhaps allow us to see how the behaviour of innovators, early adopters and the early majority differs, if at all. The first thing we need to do is get the data showing the events that people RSVP'd 'yes' to. I've already got the data in Neo4j so we'll write a query to extract it as a data frame: [source,r] ---- library(RNeo4j) graph = startGraph("http://127.0.0.1:7474/db/data/") query = "MATCH (g:Group {name: \"Neo4j - London User Group\"})-[:HOSTED_EVENT]->(e), (e)<-[:TO]-(rsvp {response: \"yes\"})<-[:RSVPD]-(person) RETURN rsvp.time, person.id" timestampToDate <- function(x) as.POSIXct(x / 1000, origin="1970-01-01", tz = "GMT") df = cypher(graph, query) df$time = timestampToDate(df$rsvp.time) df$date = format(as.Date(df$time), "%Y-%m") ---- [source,r] ---- > df %>% head() ## rsvp.time person.id time date ## 612 1.404857e+12 23362191 2014-07-08 22:00:29 2014-07 ## 1765 1.380049e+12 112623332 2013-09-24 18:58:00 2013-09 ## 1248 1.390563e+12 9746061 2014-01-24 11:24:35 2014-01 ## 1541 1.390920e+12 7881615 2014-01-28 14:40:35 2014-01 ## 3056 1.420670e+12 12810159 2015-01-07 22:31:04 2015-01 ## 607 1.406025e+12 14329387 2014-07-22 10:34:51 2014-07 ## 1634 1.391445e+12 91330472 2014-02-03 16:33:58 2014-02 ## 2137 1.371453e+12 68874702 2013-06-17 07:17:10 2013-06 ## 430 1.407835e+12 150265192 2014-08-12 09:15:31 2014-08 ## 2957 1.417190e+12 182752269 2014-11-28 15:45:18 2014-11 ---- Next we need to find the first meetup that a person attended - this will determine the cohort that the person is assigned to: [source,r] ---- firstMeetup = df %>% group_by(person.id) %>% summarise(firstEvent = min(time), count = n()) %>% arrange(desc(count)) > firstMeetup ## Source: local data frame [10 x 3] ## ## person.id firstEvent count ## 1 13526622 2013-01-24 20:25:19 2 ## 2 119400912 2014-10-03 13:09:09 2 ## 3 122524352 2014-08-14 14:09:44 1 ## 4 37201052 2012-05-21 10:26:24 3 ## 5 137112712 2014-07-31 09:32:12 1 ## 6 152448642 2014-06-20 08:32:50 17 ## 7 98563682 2014-11-05 17:27:57 1 ## 8 146976492 2014-05-17 00:04:42 4 ## 9 12318409 2014-11-03 05:25:26 2 ## 10 41280492 2014-10-16 19:02:03 5 ---- Let's assign each person to a cohort (month/year) and see how many people belong to each one: [source,r] ---- firstMeetup$date = format(as.Date(firstMeetup$firstEvent), "%Y-%m") byMonthYear = firstMeetup %>% count(date) %>% arrange(date) ggplot(aes(x=date, y = n), data = byMonthYear) + geom_bar(stat="identity", fill = "dark blue") + theme(axis.text.x = element_text(angle = 45, hjust = 1)) ---- image::{{<siteurl>}}/uploads/2015/02/unnamed-chunk-4-1.png[Unnamed chunk 4 1,600] Next we need to track a cohort over time to see whether people keep coming to events. I wrote the following function to work it out: [source,r] ---- countsForCohort = function(df, firstMeetup, cohort) { members = (firstMeetup %>% filter(date == cohort))$person.id attendance = df %>% filter(person.id %in% members) %>% count(person.id, date) %>% ungroup() %>% count(date) allCohorts = df %>% select(date) %>% unique cohortAttendance = merge(allCohorts, attendance, by = "date", all = TRUE) cohortAttendance[is.na(cohortAttendance) & cohortAttendance$date > cohort] = 0 cohortAttendance %>% mutate(cohort = cohort, retention = n / length(members)) } ---- On the first line we get the ids of all the people in the cohort so that we can filter the data frame to only include RSVPs by these people. The first call to 'count' makes sure that we only have one entry per person per month and the second call gives us a count of how many people attended an event in a given month. Next we do the equivalent of a left join using the merge function to ensure we have a row representing each month even if noone from the cohort attended. This will lead to NA entries if there's no matching row in the 'attendance' data frame - we'll replace those with a 0 if the cohort is in the future. If not we'll leave it as it is. Finally we calculate the retention rate for each month for that cohort. e.g. these are some of the rows for the '2011-06' cohort: [source,r] ---- > countsForCohort(df, firstMeetup, "2011-06") %>% sample_n(10) date n cohort retention 16 2013-01 1 2011-06 0.25 5 2011-10 1 2011-06 0.25 30 2014-03 0 2011-06 0.00 29 2014-02 0 2011-06 0.00 40 2015-01 0 2011-06 0.00 31 2014-04 0 2011-06 0.00 8 2012-04 2 2011-06 0.50 39 2014-12 0 2011-06 0.00 2 2011-07 1 2011-06 0.25 19 2013-04 1 2011-06 0.25 ---- We could then choose to plot that cohort: [source,r] ---- ggplot(aes(x=date, y = retention, colour = cohort), data = countsForCohort(df, firstMeetup, "2011-06")) + geom_line(aes(group = cohort)) + theme(axis.text.x = element_text(angle = 45, hjust = 1)) ---- image::{{<siteurl>}}/uploads/2015/02/unnamed-chunk-5-1.png[Unnamed chunk 5 1,600] From this chart we can see that none of the people who first attended a Neo4j meetup in June 2011 have attended any events for the last two years. Next we want to be able to plot multiple cohorts on the same chart which we can easily do by constructing one big data frame and passing it to ggplot: [source,r] ---- cohorts = collect(df %>% select(date) %>% unique())[,1] cohortAttendance = data.frame() for(cohort in cohorts) { cohortAttendance = rbind(cohortAttendance,countsForCohort(df, firstMeetup, cohort)) } ggplot(aes(x=date, y = retention, colour = cohort), data = cohortAttendance) + geom_line(aes(group = cohort)) + theme(axis.text.x = element_text(angle = 45, hjust = 1)) ---- image::{{<siteurl>}}/uploads/2015/02/unnamed-chunk-5-2.png[Unnamed chunk 5 2,600] This all looks a bit of a mess and at the moment we can't easily compare cohorts as they start at different places on the x axis. We can fix that by adding a 'monthNumber' column to the data frame which we calculate with the following function: [source,r] ---- monthNumber = function(cohort, date) { cohortAsDate = as.yearmon(cohort) dateAsDate = as.yearmon(date) if(cohortAsDate > dateAsDate) { "NA" } else { paste(round((dateAsDate - cohortAsDate) * 12), sep="") } } ---- Now let's create a new data frame with the month field added: [source,r] ---- cohortAttendanceWithMonthNumber = cohortAttendance %>% group_by(row_number()) %>% mutate(monthNumber = monthNumber(cohort, date)) %>% filter(monthNumber != "NA") %>% filter(monthNumber != "0") %>% mutate(monthNumber = as.numeric(monthNumber)) %>% arrange(monthNumber) ---- We're also filtering out any 'NA' columns which would represent row entries for months from before the cohort started. We don't want to plot those. finally let's plot a chart containing all cohorts normalised by month number: [source,r] ---- ggplot(aes(x=monthNumber, y = retention, colour = cohort), data = cohortAttendanceWithMonthNumber) + geom_line(aes(group = cohort)) + theme(axis.text.x = element_text(angle = 45, hjust = 1), panel.background = element_blank()) ---- image::{{<siteurl>}}/uploads/2015/02/unnamed-chunk-5-3.png[Unnamed chunk 5 3,600] It's still a bit of a mess but what stands out is that when the number of people in a cohort is small the fluctuation in the retention value can be quite pronounced. The next step is to make the cohorts a bit more coarse grained to see if it reveals some insights. I think I'll start out with a cohort covering a 3 month period and see how that works out.
null
null
[ 0.03196503594517708, -0.019350647926330566, 0.022919107228517532, 0.0382135733962059, 0.08823561668395996, 0.017114104703068733, 0.023363379761576653, 0.023216307163238525, 0.017364658415317535, 0.024036791175603867, 0.008889362215995789, 0.007664720062166452, -0.06231005862355232, 0.030268685892224312, -0.020428402349352837, 0.07065653800964355, 0.060692667961120605, -0.011374399997293949, 0.01368795894086361, -0.0031050483230501413, 0.020095299929380417, 0.044450294226408005, 0.013076992705464363, 0.04367532208561897, 0.04792152717709541, -0.01001572422683239, 0.014939263463020325, -0.017110487446188927, -0.04578319936990738, 0.013804860413074493, 0.04224865138530731, 0.015421988442540169, 0.011628646403551102, 0.002128178719431162, 0.02425614930689335, 0.0020981153938919306, 0.003989578224718571, 0.007194776087999344, -0.0019181863171979785, -0.01984012871980667, -0.07314843684434891, 0.03131183609366417, -0.007099583745002747, 0.011320616118609905, -0.042510610073804855, 0.015410876832902431, -0.05297636613249779, 0.02831609919667244, 0.013287239708006382, 0.012096276506781578, -0.0815562829375267, 0.025208227336406708, -0.004308214411139488, 0.005674522835761309, -0.006766646169126034, 0.018166154623031616, 0.008736016228795052, -0.05887686461210251, 0.009432115592062473, -0.03923014923930168, 0.016391487792134285, -0.010902545414865017, 0.0009372994536533952, 0.011601380072534084, -0.010117527097463608, -0.02436520904302597, 0.024701373651623726, 0.0460103303194046, -0.02708260528743267, 0.0031998399645090103, -0.025077102705836296, 0.008312973193824291, -0.011819694191217422, 0.015008943155407906, -0.022573012858629227, -0.05020323768258095, -0.017248693853616714, 0.057849183678627014, 0.02047247625887394, 0.01866101287305355, -0.018810875713825226, -0.00989107321947813, 0.010723873041570187, 0.022798821330070496, 0.014517716132104397, -0.04117533192038536, -0.02437669038772583, -0.045618340373039246, -0.054828353226184845, 0.04323606565594673, -0.017469415441155434, -0.03369736298918724, 0.019905496388673782, 0.014159804210066795, -0.019170457497239113, 0.010346380062401295, 0.01675509475171566, -0.030318835750222206, 0.0057707494124770164, -0.020954890176653862, -0.03804594650864601, -0.032919976860284805, 0.01807318814098835, 0.009157446213066578, -0.08417242765426636, -0.008138827979564667, -0.017262237146496773, -0.006267348304390907, -0.010663709603250027, -0.004050367511808872, -0.04659326374530792, 0.023011215031147003, -0.01890232227742672, 0.013811937533318996, -0.07598775625228882, 0.07599151879549026, 0.02565515972673893, -0.016555093228816986, -0.0028986625839024782, -0.009916904382407665, 0.03825780749320984, 0.026769418269395828, -0.008702363818883896, 0.05133605748414993, -0.030360033735632896, 0.05871381610631943, 0.010156375356018543, 0.04644312709569931, -0.01556476391851902, -0.06638602912425995, -0.01816362701356411, 0.046865612268447876, -0.027299638837575912, -0.00004042556247441098, -0.02072812058031559, -0.03974224254488945, -0.001624708529561758, -0.012781187891960144, 0.0810125544667244, 0.02306072786450386, 0.04075603932142258, -0.030334141105413437, 0.022056380286812782, 0.008168874308466911, 0.04179074242711067, -0.001647298689931631, -0.014126702211797237, -0.05450144037604332, -0.04885370656847954, -0.019233081489801407, 0.02980337291955948, 0.015279042534530163, 0.046223439276218414, -0.03288102149963379, 0.027711398899555206, 0.08539613336324692, 0.03135484829545021, -0.018323997035622597, -0.010954628698527813, 0.006650582887232304, 0.048766784369945526, 0.031374555081129074, 0.009092622436583042, 0.05677890405058861, 0.0034341493155807257, -0.009650012478232384, -0.004373544827103615, 0.04109381139278412, -0.036507368087768555, 0.009863981045782566, -0.04895554855465889, -0.04311920329928398, 0.04216211661696434, -0.03256116434931755, -0.0012726921122521162, 0.06066599860787392, 0.05999121069908142, 0.043892212212085724, 0.0151099544018507, 0.007322634104639292, -0.0806046575307846, 0.05242692679166794, 0.019765865057706833, 0.026064401492476463, 0.05096807703375816, -0.025613408535718918, 0.06184215098619461, 0.03388649597764015, 0.008230943232774734, 0.02829284407198429, -0.07193975150585175, -0.07895482331514359, -0.014227618463337421, -0.03230050578713417, 0.03792737051844597, -0.055584076792001724, 0.046603184193372726, 0.06483328342437744, 0.010264985263347626, 0.03660187870264053, -0.013067586347460747, 0.011414749547839165, 0.038139697164297104, -0.016296960413455963, -0.05165483057498932, 0.03166995942592621, 0.005721814464777708, -0.031033692881464958, -0.023347795009613037, 0.02162257954478264, -0.02932404726743698, 0.03113955445587635, 0.0313454307615757, -0.03449033945798874, 0.03866204619407654, 0.01905016414821148, 0.04025549069046974, 0.020866747945547104, 0.022036226466298103, -0.02664729580283165, 0.05309994891285896, 0.014568482525646687, -0.023756280541419983, -0.010012581944465637, -0.012719270773231983, 0.12888507544994354, 0.07153169065713882, -0.019169114530086517, -0.05017197132110596, 0.02986808493733406, 0.022562293335795403, -0.03257036581635475, 0.01109115406870842, -0.015451036393642426, 0.02240118198096752, 0.013557358644902706, -0.03812384232878685, -0.015708422288298607, 0.0022675408981740475, -0.04303114488720894, 0.013429445214569569, 0.050551723688840866, -0.01571280136704445, 0.05906100943684578, -0.006747853476554155, 0.01625050976872444, -0.024348894134163857, -0.004908030852675438, -0.06428289413452148, 0.0100721325725317, 0.023874059319496155, -0.0027757103089243174, 0.04546096920967102, -0.025378502905368805, 0.010544635355472565, -0.008580321446061134, -0.021362705156207085, 0.05088735371828079, 0.06819472461938858, 0.048179227858781815, 0.0016338751884177327, 0.04775737598538399, -0.024276012554764748, -0.006953228265047073, -0.012234488502144814, -0.046269740909338, -0.04892626777291298, -0.027425521984696388, -0.0027363356202840805, 0.02226843126118183, 0.05312318354845047, -0.027937451377511024, 0.014223928563296795, 0.028836600482463837, -0.0029966740403324366, -0.022908294573426247, 0.031186187639832497, -0.005975662264972925, -0.006747126579284668, -0.023579129949212074, -0.018265267834067345, 0.04950064420700073, -0.03772823140025139, -0.03834252804517746, 0.007105925586074591, -0.05627067759633064, 0.03153546154499054, -0.026790661737322807, -0.03528430312871933, 0.014619050547480583, 0.030516592785716057, 0.06329759955406189, 0.043011751025915146, 0.006034184712916613, 0.06384068727493286, 0.0315682590007782, 0.00252420362085104, 0.03648688644170761, -0.006757539231330156, 0.04570326954126358, -0.011498511768877506, -0.0001141257380368188, 0.05824777111411095, -0.022921117022633553, 0.00383400684222579, -0.06453887373209, 0.026001757010817528, -0.035051554441452026, -0.2863180339336395, 0.02706819213926792, -0.04679426550865173, -0.034171950072050095, 0.00964482594281435, -0.056154947727918625, 0.046329643577337265, -0.009929399006068707, -0.03814598545432091, 0.00140074931550771, 0.009379326365888119, -0.03368113189935684, -0.02757289633154869, 0.04322250187397003, 0.0296477098017931, 0.05540510267019272, 0.025003494694828987, -0.04159661382436752, 0.0017705799546092749, 0.049644310027360916, 0.025519011542201042, -0.06844998151063919, -0.020078914240002632, 0.04398270696401596, 0.005344548262655735, 0.06693747639656067, -0.07768851518630981, 0.0022911764681339264, -0.07206510007381439, -0.035965077579021454, 0.030614206567406654, -0.029214169830083847, 0.0140604879707098, -0.015041258186101913, 0.0026049744337797165, -0.03302187845110893, 0.04102177172899246, 0.034646838903427124, 0.002944788197055459, -0.007473811041563749, -0.019923485815525055, -0.02845171093940735, -0.010393996722996235, 0.008840227499604225, 0.08647534996271133, 0.0202597975730896, -0.06120748072862625, 0.013033978641033173, -0.022810105234384537, 0.06819509714841843, -0.024859443306922913, -0.010827009566128254, -0.03244215250015259, 0.01913752406835556, -0.05772295594215393, -0.056846268475055695, -0.04015236347913742, 0.011814247816801071, -0.05023657903075218, -0.015420754440128803, -0.023186491802334785, -0.02041250467300415, 0.022724699229002, -0.04727187752723694, -0.05254172533750534, -0.07153016328811646, -0.1021571159362793, -0.020900564268231392, 0.049426011741161346, 0.014656071551144123, -0.03637239336967468, 0.005440059117972851, -0.030066167935729027, -0.09704656898975372, -0.037334635853767395, -0.020637383684515953, 0.01879979483783245, 0.007969086058437824, 0.010448048822581768, 0.05944041907787323, -0.024995746091008186, -0.059000611305236816, 0.018004311248660088, 0.008583083748817444, 0.03593805059790611, -0.0033234325237572193, 0.006543844472616911, 0.004379640333354473, -0.060146477073431015, -0.0005950234481133521, 0.055043939501047134, -0.030549928545951843, -0.027703337371349335, -0.004071587231010199, 0.003068772843107581, 0.013735977001488209, 0.012625269591808319, 0.003737620310857892, 0.013473796658217907, 0.03783336654305458, 0.021063990890979767, -0.04405466094613075, 0.022342219948768616, -0.049108657985925674, -0.0446699820458889, -0.03259763866662979, -0.05536358803510666, 0.02952612191438675, 0.028430551290512085, 0.005869707558304071, 0.03743120655417442, -0.009781291708350182, 0.014574873261153698, -0.06487863510847092, -0.031113119795918465, 0.0008561501163057983, -0.0029236816335469484, 0.022177942097187042, 0.02726639062166214, -0.0022743300069123507, -0.05647270381450653, 0.006964803673326969, -0.009108723141252995, -0.012372815981507301, -0.04470709338784218, -0.025347024202346802, -0.01915113441646099, -0.012760210782289505, 0.014230086468160152, 0.020596811547875404, -0.04065534472465515, 0.021952811628580093, 0.04649744927883148, -0.03731421008706093, 0.05835641920566559, -0.007020687684416771, -0.050230078399181366, -0.02512907050549984, 0.006937216501682997, 0.005667633842676878, -0.007838866673409939, 0.00874653272330761, 0.004867179784923792, 0.045943282544612885, 0.023297658190131187, 0.005467143375426531, 0.008108510635793209, -0.007917890325188637, 0.030162984505295753, 0.007439412642270327, -0.0014393975725397468, -0.019767913967370987, -0.00292830727994442, -0.035766422748565674, -0.010790630243718624, -0.021430604159832, 0.06205755099654198, 0.0027478274423629045, -0.02699485421180725, -0.035410866141319275, 0.018946917727589607, -0.051662277430295944, -0.02102510817348957, -0.03329356014728546, 0.016818391159176826, 0.04845842719078064, -0.019720587879419327, 0.0031381670851260424, -0.008172130212187767, -0.005849177483469248, -0.0169040746986866, 0.019169189035892487, -0.025209685787558556, 0.023613400757312775, -0.01382873672991991, -0.0195950698107481, 0.021810311824083328, 0.0001439909974578768, 0.03789924830198288, -0.02204272709786892, -0.0285610631108284, -0.015761546790599823, 0.007450740784406662, -0.006616579834371805, 0.049159806221723557, 0.0709875300526619, -0.01603304222226143, -0.016560936346650124, -0.00836855173110962, -0.012112044729292393, -0.04734925553202629, -0.02258136309683323, -0.016249721869826317, -0.027940670028328896, -0.03874581307172775, -0.08315636962652206, 0.01742480881512165, 0.01659342460334301, -0.0074779619462788105, 0.03107302263379097, 0.00401794258505106, -0.00475434772670269, -0.009516444057226181, 0.04006579518318176, 0.06149094179272652, -0.045675333589315414, -0.015394235961139202, -0.0064093261025846004, -0.024301089346408844, 0.023967195302248, -0.0014266795478761196, -0.04833357036113739, -0.018347138538956642, -0.02274172566831112, 0.027160534635186195, -0.02946556732058525, -0.048834510147571564, -0.054709095507860184, 0.016081703826785088, 0.02974206954240799, 0.04024070128798485, -0.005626372992992401, -0.018783550709486008, -0.02647504210472107, -0.009187808260321617, 0.03623298928141594, -0.03396119922399521, -0.04106011241674423, 0.005104593932628632, -0.018780214712023735, -0.0243520550429821, -0.031269319355487823, 0.01951606199145317, 0.001986853312700987, -0.04649864509701729, 0.005160094704478979, -0.06637115031480789, 0.03000333160161972, 0.025755424052476883, 0.03928276523947716, -0.030276766046881676, 0.009309994988143444, -0.03226257860660553, 0.008228359743952751, -0.031493108719587326, 0.02289300039410591, 0.005386047530919313, -0.009490285068750381, 0.032065797597169876, 0.04982612654566765, 0.01465774979442358, 0.008198615163564682, -0.015960726886987686, -0.03787805512547493, 0.04222507029771805, -0.020445242524147034, -0.036659348756074905, -0.03405525162816048, -0.04482099786400795, 0.007617081981152296, 0.0034863599576056004, 0.004907486494630575, -0.016701344400644302, 0.02958686091005802, 0.03779036924242973, 0.04685090482234955, 0.05113307759165764, 0.012113123200833797, 0.04020821303129196, -0.02237524837255478, 0.023360859602689743, -0.08636090159416199, -0.004955258220434189, 0.037898942828178406, 0.022995809093117714, -0.010940752923488617, -0.009069619700312614, -0.03813782334327698, 0.03289460763335228, -0.05736900493502617, -0.042268577963113785, 0.024138232693076134, -0.02009042166173458, 0.029321175068616867, 0.018509546294808388, -0.06235038861632347, -0.007778214756399393, 0.031500477343797684, -0.060821533203125, 0.0038224728778004646, -0.031816430389881134, 0.07316716015338898, -0.027326496317982674, 0.02283988520503044, -0.03368624299764633, -0.02013557031750679, 0.06996378302574158, 0.01326457504183054, -0.002790827536955476, 0.0802386924624443, -0.01460513100028038, 0.024997811764478683, 0.02432451955974102, -0.02944987639784813, 0.0019312964286655188, 0.02918471209704876, 0.0013391063548624516, -0.04932764917612076, 0.03137724846601486, 0.0062408894300460815, -0.002041534287855029, -0.045613717287778854, 0.08820459246635437, -0.0029561712872236967, -0.03603523224592209, -0.05707442760467529, 0.02106708474457264, -0.012227139435708523, -0.010049193166196346, -0.015659580007195473, -0.021535346284508705, -0.03684021532535553, 0.07512067258358002, -0.01743164472281933, 0.03358961641788483, 0.06506771594285965, 0.007377383299171925, -0.003944253548979759, 0.0006506933714263141, 0.07806995511054993, 0.10159597545862198, 0.07449913769960403, 0.02349899150431156, 0.07455502450466156, -0.02588135376572609, -0.03785724937915802, -0.014438340440392494, -0.04566339775919914, -0.026257557794451714, -0.01173167210072279, 0.01576961949467659, 0.07426917552947998, -0.028627749532461166, 0.055265456438064575, -0.0004291866789571941, -0.017185954377055168, 0.0018292376771569252, 0.027689741924405098, 0.04927995800971985, 0.04430199787020683, 0.0016758114797994494, 0.01626545563340187, -0.037349604070186615, -0.03875650092959404, 0.03629012778401375, 0.007273466791957617, -0.009369445033371449, 0.025819070637226105, -0.003496673423796892, 0.018313322216272354, 0.01647031307220459, 0.023877274245023727, 0.07998392730951309, -0.05225908383727074, 0.014273003675043583, -0.004095232579857111, 0.020387182012200356, 0.0008338491315953434, 0.021146999672055244, -0.004696985241025686, -0.013906054198741913, -0.010911243036389351, -0.048350367695093155, -0.03276984766125679, 0.00954829715192318, -0.03927617147564888, 0.017233438789844513, -0.03774600103497505, 0.009685124270617962, 0.015373343601822853, -0.024290189146995544, -0.03943565487861633, -0.03592259809374809, -0.02001609094440937, -0.04433463141322136, -0.07854592055082321, -0.002430587075650692, 0.015108199790120125, -0.015011344105005264, -0.030232077464461327, 0.004328098148107529, -0.010337799787521362, -0.007244032341986895, 0.012161393649876118, -0.04465315118432045, -0.0038955099880695343, 0.0048412964679300785, -0.011664641089737415, 0.032074835151433945, 0.005790694151073694, 0.029873715713620186, 0.018977735191583633, 0.006930060684680939, -0.02776886522769928, 0.03912289813160896, 0.054409973323345184, 0.035056620836257935, -0.004405616782605648, -0.0766381099820137, 0.015572592616081238, 0.009066370315849781, -0.026053670793771744, -0.09344659745693207, 0.0209554024040699, 0.0061831423081457615, 0.02193121612071991, 0.024355346336960793, -0.016679830849170685, -0.025741495192050934, -0.029854418709874153, -0.007832539267838001, 0.008772877044975758, 0.03732238709926605, 0.03181534633040428, -0.029411818832159042, 0.07398444414138794, 0.050640493631362915, -0.03279045596718788, -0.03585280478000641, -0.018229639157652855, -0.00391731271520257, -0.013841061852872372, -0.04580534249544144, -0.025532415136694908, -0.03638989478349686, -0.10912021994590759, -0.020986925810575485, 0.004787783604115248, -0.020594397559762, -0.014376360923051834, -0.006183868274092674, 0.027352914214134216, 0.0012937748106196523, 0.02343878336250782, -0.020289728417992592, 0.047432251274585724, -0.012802687473595142, -0.02293064445257187, -0.02797531709074974, 0.01365105900913477, -0.030926387757062912, 0.007327349856495857, 0.0002673211565706879, -0.056912343949079514, -0.003643722739070654, -0.02373672090470791, 0.009461786597967148, 0.03269593417644501, -0.002194867003709078, -0.006971895694732666 ]
[ -0.054179634898900986, -0.006086813285946846, -0.03201798349618912, -0.013166870921850204, 0.05465993285179138, -0.03325687721371651, 0.00780873280018568, 0.014148768037557602, 0.012335095554590225, -0.043828412890434265, 0.04674925282597542, -0.015698999166488647, 0.02230924367904663, -0.018966764211654663, 0.06293126195669174, -0.0075981151312589645, 0.00038491361192427576, -0.07179564237594604, -0.014813888818025589, 0.06258010119199753, -0.050139252096414566, -0.05407102033495903, -0.03284160792827606, -0.020486721768975258, 0.04145733267068863, 0.032336581498384476, 0.025052985176444054, -0.051648255437612534, -0.02733040228486061, -0.17406632006168365, 0.012473640963435173, 0.009745574556291103, 0.06150280311703682, -0.010417982004582882, 0.009369217790663242, 0.058425091207027435, 0.05113019794225693, -0.00022610339510720223, 0.033380914479494095, 0.04731321334838867, 0.007773285266011953, -0.0023398816119879484, -0.04813547059893608, -0.0016670229379087687, 0.02119758538901806, 0.018641209229826927, -0.03172773867845535, -0.012212064117193222, -0.0516539141535759, 0.030238334089517593, -0.02902201935648918, -0.019550561904907227, -0.0056135510094463825, 0.005304576363414526, 0.00045064586447551847, 0.05350921303033829, 0.028267988935112953, 0.027872445061802864, 0.028940187767148018, 0.012533308006823063, 0.010788800194859505, -0.023725485429167747, -0.18794654309749603, 0.07108572870492935, -0.010347927920520306, 0.040188081562519073, -0.041247181594371796, 0.009907844476401806, -0.013122402131557465, 0.06325586885213852, 0.010107183828949928, -0.0056416806764900684, -0.04580217972397804, 0.04688272997736931, 0.025755632668733597, 0.02738415077328682, 0.0077895959839224815, 0.021662982180714607, 0.031824130564928055, -0.02750047855079174, -0.025801684707403183, 0.053563445806503296, -0.01278139092028141, -0.015649404376745224, -0.029322881251573563, 0.00783594697713852, -0.000796902400907129, 0.024320371448993683, -0.007394758984446526, 0.02658354677259922, 0.04433756321668625, 0.03619903326034546, 0.024582765996456146, -0.0027200111653655767, -0.08689828962087631, -0.014619773253798485, 0.03740796446800232, 0.021469851955771446, -0.0008501835982315242, 0.38985416293144226, 0.007586400490254164, 0.01995975337922573, 0.03296992555260658, 0.05526043474674225, -0.008367400616407394, -0.042219676077365875, 0.004327996168285608, -0.05332086607813835, 0.049519188702106476, -0.025312744081020355, -0.012062684632837772, 0.006155882962048054, 0.05332372710108757, -0.07984531670808792, 0.019105542451143265, 0.018533980473876, 0.04635115712881088, 0.019970906898379326, 0.02634177729487419, 0.002542401198297739, -0.006862504407763481, -0.011425411328673363, 0.03416170924901962, 0.0157157089561224, 0.0026383528020232916, 0.00582353537902236, 0.05224856734275818, 0.07192764431238174, 0.016354991123080254, -0.013593420386314392, 0.05967971682548523, -0.022070875391364098, -0.10516998171806335, 0.02696087397634983, -0.016592148691415787, -0.009864866733551025, 0.0015934119001030922, -0.018689194694161415, -0.006876586005091667, 0.035236772149801254, 0.00448134820908308, -0.0007950247963890433, 0.03838198259472847, -0.016351057216525078, -0.03590570017695427, 0.2005581557750702, -0.01101688202470541, -0.023845747113227844, -0.02971593849360943, -0.04917861893773079, 0.026653440669178963, 0.06074155867099762, 0.0019408203661441803, -0.068536177277565, -0.011457731015980244, 0.02621494233608246, 0.1201251745223999, -0.02984670177102089, -0.06012541800737381, 0.00865430012345314, -0.022379184141755104, -0.053115975111722946, -0.03032739646732807, 0.05612877383828163, 0.07640085369348526, -0.12778900563716888, 0.025279076769948006, 0.026730531826615334, 0.03110332600772381, -0.05480918288230896, 0.01998826116323471, -0.0008436026982963085, -0.018954670056700706, -0.0006771173211745918, 0.06483644992113113, -0.01630953513085842, -0.03622978925704956, 0.00875655934214592, 0.022846348583698273, 0.00010188596206717193, -0.00042046638554893434, 0.016128402203321457, -0.054092612117528915, -0.003618081333115697, -0.06177015230059624, -0.06631971150636673, -0.0633588656783104, -0.005745194852352142, -0.02995532564818859, -0.006775223650038242, -0.03516708314418793, -0.02284912019968033, -0.0993225947022438, 0.06323564797639847, -0.039763376116752625, -0.02356646955013275, -0.01781771518290043, -0.006267131771892309, -0.028647983446717262, -0.02838774211704731, -0.03208214044570923, 0.015903931111097336, -0.024199163541197777, 0.019935013726353645, -0.042063090950250626, 0.04697846993803978, 0.06300029158592224, -0.04763054475188255, 0.1082259863615036, 0.01929706707596779, -0.006435156799852848, -0.01807170733809471, 0.0027050424832850695, 0.020679593086242676, 0.013688766397535801, 0.012529326602816582, 0.013371220789849758, -0.02637512981891632, 0.006207719910889864, 0.038711003959178925, 0.022559594362974167, 0.01389716099947691, 0.021567540243268013, -0.3679138123989105, -0.010681926272809505, 0.004826824646443129, 0.011544770561158657, 0.002567018149420619, -0.04648711532354355, 0.0361606627702713, -0.024261539801955223, 0.014830526895821095, 0.05162379890680313, 0.07555962353944778, 0.02057114988565445, -0.00862487219274044, -0.05186449736356735, 0.008216939866542816, 0.03230272978544235, -0.03428258001804352, 0.01126684620976448, -0.03195638209581375, -0.020012017339468002, -0.017869016155600548, -0.03725315257906914, -0.005029992200434208, -0.048987336456775665, 0.037613313645124435, -0.03207172080874443, 0.10948169231414795, 0.016898712143301964, -0.019098319113254547, -0.0606798492372036, 0.0313844159245491, -0.00926247052848339, -0.010727730579674244, -0.07234536111354828, 0.015454277396202087, -0.02935989946126938, -0.00228394428268075, -0.006217112764716148, -0.012223678641021252, -0.04939845949411392, -0.05740481987595558, 0.026523765176534653, -0.020381970331072807, -0.040749967098236084, -0.07320889830589294, 0.019485190510749817, -0.03313179686665535, -0.007916751317679882, -0.0293026864528656, 0.08564545214176178, 0.019537705928087234, -0.016113342717289925, 0.03288418427109718, 0.02677076868712902, 0.02441501058638096, -0.047019533812999725, -0.08616647869348526, 0.01616845838725567, 0.000474480475531891, 0.014438963495194912, 0.00333515671081841, 0.019185667857527733, 0.02944447100162506, -0.0703539177775383, 0.00947024766355753, -0.03242701664566994, -0.018087847158312798, -0.026914769783616066, -0.00890384428203106, -0.02783980220556259, -0.023986099287867546, 0.11279307305812836, -0.029097218066453934, 0.0026583396829664707, 0.024286866188049316, -0.002791952807456255, -0.0692780464887619, -0.014614785090088844, 0.008547136560082436, 0.006358828861266375, 0.04724804684519768, -0.05135098099708557, 0.02954700216650963, -0.02127111330628395, 0.005887468345463276, 0.04862996190786362, 0.04705221951007843, -0.03515726327896118, 0.07467487454414368, 0.03028692863881588, -0.02285129390656948, -0.02716713212430477, -0.044826939702034, -0.03839809074997902, 0.03886069729924202, -0.0038665926549583673, -0.27073630690574646, 0.027223587036132812, 0.004844272509217262, 0.05677200108766556, 0.03899652138352394, 0.016864361241459846, 0.012686977162957191, -0.0273127481341362, -0.010757924057543278, 0.00013575964840129018, 0.024314505979418755, 0.04696853831410408, 0.024063361808657646, -0.024651972576975822, 0.031719040125608444, 0.019840260967612267, 0.03903760015964508, -0.010985401459038258, 0.007836640812456608, -0.018306279554963112, 0.037795353680849075, -0.05205412954092026, 0.13646738231182098, 0.01053862739354372, -0.005661094095557928, 0.01753084734082222, -0.027468545362353325, -0.008351198397576809, 0.07038149982690811, -0.024831654503941536, -0.03047575242817402, 0.008608839474618435, 0.04191694036126137, 0.01641007326543331, 0.01698298193514347, -0.022831909358501434, -0.03502047434449196, 0.016774768009781837, 0.034970734268426895, -0.010024633258581161, 0.02543352171778679, -0.00840144045650959, -0.03095787577331066, 0.03324015811085701, 0.0815606489777565, -0.02240763232111931, 0.032915521413087845, -0.047778308391571045, -0.030861157923936844, -0.007465388160198927, -0.013563712127506733, -0.05174519121646881, -0.022345274686813354, -0.000048066358431242406, 0.028333457186818123, 0.07066185772418976, 0.004934095777571201, -0.018172889947891235, 0.05625484511256218, 0.0011168021010234952, -0.05558374524116516, -0.010575690306723118, 0.060586657375097275, -0.0017104223370552063, 0.019266340881586075 ]
[ 0.0019250011537224054, 0.03533216938376427, 0.0005791657022200525, 0.007338923402130604, -0.014998123049736023, 0.014668898656964302, 0.012591064907610416, 0.019730407744646072, -0.008055934682488441, -0.03138595446944237, -0.0016778274439275265, 0.012548722326755524, 0.01909313164651394, -0.018846528604626656, 0.03053625114262104, -0.0220897626131773, 0.019843364134430885, -0.016025720164179802, 0.06347014755010605, 0.005299852229654789, -0.05579786002635956, 0.002802967093884945, -0.007166864350438118, -0.010992280207574368, -0.030216841027140617, 0.03502017259597778, 0.0027627621311694384, 0.02206098847091198, 0.012946408241987228, -0.07250585407018661, -0.01194933895021677, 0.006887031253427267, -0.00018407090101391077, 0.004322556313127279, -0.026143640279769897, 0.004742350894957781, -0.0006417525582946837, 0.013143747113645077, 0.019440043717622757, 0.02377879060804844, -0.0006235333858057857, -0.03138583526015282, -0.027430174872279167, 0.007500198669731617, 0.01663433387875557, -0.007261443883180618, -0.034086380153894424, 0.028729790821671486, -0.026018476113677025, 0.0003258245997130871, -0.04598616808652878, -0.002397140022367239, -0.019314603880047798, 0.015254361554980278, -0.007437009830027819, -0.002664592582732439, -0.0426754467189312, -0.020371414721012115, -0.03204059228301048, -0.0010965225519612432, 0.0033292085863649845, -0.0256196279078722, -0.030447743833065033, 0.0005477016093209386, -0.012975694611668587, -0.009123340249061584, -0.019487785175442696, 0.02671734057366848, 0.00787825882434845, 0.016523059457540512, -0.0018462215084582567, 0.018073495477437973, -0.09639453887939453, -0.029952798038721085, -0.02503283880650997, 0.03141321614384651, 0.03154613450169563, -0.011183729395270348, 0.01921760104596615, -0.026314090937376022, -0.05899488180875778, -0.006064921151846647, -0.021523576229810715, 0.009158813394606113, -0.04781356826424599, -0.033433619886636734, 0.015437699854373932, -0.023822488263249397, -0.03380461037158966, -0.011112202890217304, -0.026788773015141487, 0.03499920293688774, 0.02335585653781891, -0.032215844839811325, -0.10251236706972122, -0.0062883393839001656, 0.02268202230334282, 0.02781664952635765, 0.02299632877111435, 0.8405067324638367, -0.0048921373672783375, 0.010902667418122292, -0.010588886216282845, 0.04538503289222717, -0.03796834498643875, -0.03052077442407608, -0.018498828634619713, 0.021435892209410667, 0.020850040018558502, 0.017894726246595383, -0.03720242902636528, 0.02750624716281891, 0.016818448901176453, 0.06031234189867973, 0.016117755323648453, 0.03730104863643646, 0.012768364511430264, 0.011304827407002449, -0.011604178696870804, 0.04064156860113144, 0.010534215718507767, 0.03397523984313011, -0.015660360455513, -0.027211828157305717, -0.0185638889670372, -0.17622391879558563, 0.034255869686603546, -7.650190703548373e-33, 0.03470657765865326, -0.013057124800980091, 0.03346448019146919, -0.01867522858083248, 0.027112871408462524, 0.018399707973003387, -0.013432313688099384, -0.01373147964477539, 0.013038555160164833, -0.02592993713915348, 0.00032280682353302836, 0.009583598002791405, 0.007770004216581583, -0.03261302784085274, 0.00949921365827322, 0.00230579636991024, -0.005364844109863043, 0.044675663113594055, 0.006340655032545328, -0.008698037825524807, 0.010257858783006668, 0.01678863912820816, 0.0166493970900774, 0.054717592895030975, -0.011139578185975552, 0.020123222842812538, 0.006111537106335163, 0.024414904415607452, 0.0068265413865447044, -0.041672732681035995, -0.015472953207790852, 0.036582671105861664, 0.002738378709182143, -0.023977743461728096, 0.0039034883957356215, -0.05030931904911995, -0.030554836615920067, -0.015310410410165787, -0.02797171100974083, -0.047832973301410675, -0.05591587349772453, -0.009120606817305088, 0.008473957888782024, 0.011402465403079987, -0.0829911082983017, 0.002393504371866584, 0.011753229424357414, 0.03448261320590973, -0.02388671785593033, 0.03549725189805031, -0.010900973342359066, -0.027501266449689865, 0.015030517242848873, 0.010151385329663754, -0.06767440587282181, 0.009843215346336365, 0.00021302478853613138, -0.0018442115979269147, -0.010215419344604015, -0.019621532410383224, 0.03527535870671272, -0.029014788568019867, 0.006976882927119732, 0.028257105499505997, -0.0026099381502717733, 0.005237361416220665, 0.01375370379537344, -0.019631309434771538, 0.00009240951476385817, 0.03819422051310539, -0.031104333698749542, 0.06620408594608307, -0.035401590168476105, 0.00211650924757123, 0.03515605255961418, -0.038667481392621994, 0.030242877081036568, 0.03397165238857269, 0.016553906723856926, 0.04583440721035004, 0.014331297017633915, -0.013606191612780094, 0.017168432474136353, -0.012037008069455624, -0.010994712822139263, -0.033865369856357574, 0.05862978845834732, 0.022114817053079605, 0.011139431968331337, 0.008960846811532974, 0.010410553775727749, 0.02221485786139965, 0.014607299119234085, -0.01398048922419548, 0.01372550055384636, 7.385060891456284e-33, 0.025155527517199516, 0.0008592292433604598, -0.009288988076150417, 0.0010684393346309662, 0.05763299763202667, 0.000536694482434541, 0.008336254395544529, 0.0376010499894619, -0.049981359392404556, 0.030896557494997978, -0.007929651997983456, -0.015848316252231598, 0.011174576357007027, 0.0479402095079422, 0.022678468376398087, 0.004972252994775772, 0.0389651395380497, -0.03973391652107239, -0.015139167197048664, -0.008160167373716831, -0.007499226834625006, -0.025280626490712166, -0.004844472277909517, -0.00008274347055703402, 0.019683314487338066, 0.031217113137245178, -0.014788806438446045, -0.013632990419864655, -0.015932517126202583, -0.016038885340094566, -0.0005262073827907443, -0.0041955504566431046, -0.013387885875999928, -0.02603398822247982, 0.007977616041898727, 0.00008101535786408931, 0.015403625555336475, -0.022374749183654785, 0.0018414335791021585, -0.02144986018538475, 0.022782010957598686, 0.015314219519495964, -0.016587859019637108, 0.03353820741176605, 0.02708469144999981, 0.013052263297140598, 0.011442192830145359, 0.016774816438555717, -0.009732593782246113, 0.03284831717610359, -0.025676624849438667, 0.01389376912266016, 0.002317200880497694, 0.022468309849500656, -0.01010910514742136, -0.01809125766158104, 0.009825527667999268, 0.016450848430395126, -0.01700001396238804, 0.014299111440777779, -0.008405008353292942, 0.0072304061613976955, -0.03389707952737808, 0.03408818319439888, -0.04087204486131668, -0.054156940430402756, 0.0035492072347551584, -0.020332632586359978, -0.00838019885122776, -0.0019519543275237083, -0.017860054969787598, -0.0383269302546978, -0.003840925171971321, 0.003533206647261977, 0.015896787866950035, -0.03470667824149132, -0.05078721418976784, -0.0027255143504589796, -0.014421792700886726, 0.012094699777662754, 0.02964354120194912, 0.005029816180467606, 0.015897121280431747, 0.008662057109177113, -0.007426606956869364, 0.0034224018454551697, -0.01601439155638218, 0.031594742089509964, -0.0018505670595914125, 0.015018898993730545, -0.0008974074735306203, -0.04953208938241005, -0.027995526790618896, 0.036428630352020264, -0.021943608298897743, -1.3223087513836163e-8, -0.02545594796538353, 0.01761292666196823, 0.025303194299340248, 0.011334664188325405, 0.047961775213479996, -0.01627623289823532, -0.00684545561671257, -0.018021896481513977, 0.00331947673112154, 0.012375892139971256, 0.030168307945132256, -0.025081781670451164, -0.0025426605716347694, -0.0008266529184766114, -0.014390981756150723, -0.056249577552080154, 0.0029417818877846003, -0.025019461289048195, 0.031103895977139473, 0.024495413526892662, 0.02946346625685692, 0.013134661130607128, 0.008585019037127495, 0.023569496348500252, 0.024361763149499893, 0.0015618405304849148, 0.018753288313746452, -0.05206169933080673, 0.018588678911328316, -0.031618162989616394, -0.028607778251171112, -0.015917330980300903, 0.03418352082371712, -0.00990060344338417, -0.044272419065237045, -0.0555538646876812, -0.000725741614587605, 0.04680316522717476, 0.007994912564754486, 0.017778567969799042, 0.0162820927798748, -0.007640812546014786, -0.04020099341869354, -0.021840237081050873, -0.003995111212134361, 0.027773384004831314, -0.0134887071326375, 0.0013021775521337986, -0.0066961683332920074, -0.0348140150308609, 0.003185075242072344, -0.03326665237545967, 0.05275065079331398, 0.03446580842137337, 0.03818296641111374, -0.0013016206212341785, 0.0007162578403949738, -0.026289476081728935, -0.004070165567100048, -0.042089466005563736, 0.006139296106994152, 0.00003456723061390221, 0.010740963742136955, -0.05343306437134743 ]
r-cohort-analysis-of-neo4j-meetup-members
https://markhneedham.com/blog/2015/02/24/r-cohort-analysis-of-neo4j-meetup-members