From c36fe6586263fd079959775cc8be43cc5dd990c0 Mon Sep 17 00:00:00 2001 From: Tim Green Date: Mon, 8 Jul 2024 13:28:23 +0200 Subject: [PATCH] fix execution count --- .../working-with-vector-data/notebook.ipynb | 182 +++++++++--------- resources/nb-check.py | 6 + 2 files changed, 97 insertions(+), 91 deletions(-) diff --git a/notebooks/working-with-vector-data/notebook.ipynb b/notebooks/working-with-vector-data/notebook.ipynb index 127e1639..f02ae629 100644 --- a/notebooks/working-with-vector-data/notebook.ipynb +++ b/notebooks/working-with-vector-data/notebook.ipynb @@ -170,7 +170,7 @@ "data": { "text/plain": "[array([0.94529617, 0.5391597 , 0.3666218 , 0.27040002, 0.33434793,\n 0.81942284, 0.7387169 , 0.0188459 , 0.07248586, 0.5413058 ],\n dtype=float32),\n array([0.39620587, 0.56646174, 0.09738464, 0.6073699 , 0.86925113,\n 0.40876037, 0.17535466, 0.5120548 , 0.03570552, 0.842908 ],\n dtype=float32),\n array([0.10918448, 0.43081337, 0.03388631, 0.55986017, 0.80183506,\n 0.6763027 , 0.25283858, 0.41930103, 0.7678156 , 0.13405219],\n dtype=float32)]" }, - "execution_count": 21, + "execution_count": 6, "metadata": {}, "output_type": "execute_result" } @@ -194,7 +194,7 @@ }, { "cell_type": "code", - "execution_count": 6, + "execution_count": 7, "id": "c72202fa-3a15-42a0-83f2-2650a6d5faa6", "metadata": {}, "outputs": [ @@ -202,7 +202,7 @@ "data": { "text/plain": "[[0.9452961683273315,\n 0.5391597151756287,\n 0.36662179231643677,\n 0.2704000174999237,\n 0.3343479335308075,\n 0.8194228410720825,\n 0.7387169003486633,\n 0.018845897167921066,\n 0.07248586416244507,\n 0.5413057804107666],\n [0.396205872297287,\n 0.5664617419242859,\n 0.09738463908433914,\n 0.6073698997497559,\n 0.8692511320114136,\n 0.4087603688240051,\n 0.17535465955734253,\n 0.5120548009872437,\n 0.03570551797747612,\n 0.8429080247879028],\n [0.10918448120355606,\n 0.43081337213516235,\n 0.03388631343841553,\n 0.5598601698875427,\n 0.8018350601196289,\n 0.6763026714324951,\n 0.2528385818004608,\n 0.41930103302001953,\n 0.7678155899047852,\n 0.13405218720436096]]" }, - "execution_count": 22, + "execution_count": 8, "metadata": {}, "output_type": "execute_result" } @@ -235,7 +235,7 @@ }, { "cell_type": "code", - "execution_count": 7, + "execution_count": 9, "id": "35cd7e37-d05f-424f-98c7-ae61958c42d5", "metadata": {}, "outputs": [], @@ -269,7 +269,7 @@ }, { "cell_type": "code", - "execution_count": 8, + "execution_count": 10, "id": "5fa23885-106d-4b37-ade2-d7b6e6c8b593", "metadata": {}, "outputs": [], @@ -288,7 +288,7 @@ }, { "cell_type": "code", - "execution_count": 9, + "execution_count": 11, "id": "9fcdb1ce-254b-4420-815e-76cb2199ac05", "metadata": {}, "outputs": [ @@ -296,7 +296,7 @@ "data": { "text/plain": "[array([0.94529617, 0.5391597 , 0.3666218 , 0.27040002, 0.33434793,\n 0.81942284, 0.7387169 , 0.0188459 , 0.07248586, 0.5413058 ],\n dtype=float32),\n array([0.39620587, 0.56646174, 0.09738464, 0.6073699 , 0.86925113,\n 0.40876037, 0.17535466, 0.5120548 , 0.03570552, 0.842908 ],\n dtype=float32),\n array([0.10918448, 0.43081337, 0.03388631, 0.55986017, 0.80183506,\n 0.6763027 , 0.25283858, 0.41930103, 0.7678156 , 0.13405219],\n dtype=float32)]" }, - "execution_count": 25, + "execution_count": 12, "metadata": {}, "output_type": "execute_result" } @@ -316,7 +316,7 @@ }, { "cell_type": "code", - "execution_count": 10, + "execution_count": 13, "id": "b55d0954-9e8c-468b-b1da-019a3adf4fd2", "metadata": {}, "outputs": [ @@ -324,7 +324,7 @@ "data": { "text/plain": "1000" }, - "execution_count": 26, + "execution_count": 14, "metadata": {}, "output_type": "execute_result" } @@ -345,7 +345,7 @@ }, { "cell_type": "code", - "execution_count": 11, + "execution_count": 15, "id": "218071ef-0742-460b-b0a4-b079970ae568", "metadata": {}, "outputs": [ @@ -353,7 +353,7 @@ "data": { "text/plain": "5" }, - "execution_count": 27, + "execution_count": 16, "metadata": {}, "output_type": "execute_result" } @@ -373,7 +373,7 @@ }, { "cell_type": "code", - "execution_count": 12, + "execution_count": 17, "id": "52bfac93-5503-4144-8700-95db21f13897", "metadata": {}, "outputs": [ @@ -381,7 +381,7 @@ "data": { "text/plain": "[array([0.7970012 , 0.34688511, 0.14492278, 0.73332036, 0.37237272,\n 0.15225586, 0.26400378, 0.1706023 , 0.2066024 , 0.2986435 ],\n dtype=float32),\n array([0.15736586, 0.7116634 , 0.55218774, 0.8527479 , 0.8662606 ,\n 0.21808125, 0.19137949, 0.19946271, 0.31750116, 0.4048979 ],\n dtype=float32),\n array([0.329683 , 0.7214109 , 0.48456433, 0.6002015 , 0.4030805 ,\n 0.32164323, 0.02634622, 0.10913838, 0.13508031, 0.33974582],\n dtype=float32),\n array([0.35889304, 0.37261793, 0.22267127, 0.57628405, 0.10873934,\n 0.66360027, 0.67708856, 0.69097304, 0.8924684 , 0.07560002],\n dtype=float32),\n array([0.46105748, 0.24171682, 0.3059963 , 0.95824414, 0.33805165,\n 0.30686185, 0.89336896, 0.70329565, 0.45199844, 0.6623023 ],\n dtype=float32)]" }, - "execution_count": 28, + "execution_count": 18, "metadata": {}, "output_type": "execute_result" } @@ -413,7 +413,7 @@ }, { "cell_type": "code", - "execution_count": 13, + "execution_count": 19, "id": "5707a569-4361-4d69-a078-5c71bb547dce", "metadata": {}, "outputs": [], @@ -423,7 +423,7 @@ }, { "cell_type": "code", - "execution_count": 14, + "execution_count": 20, "id": "a0777da4-daba-4b06-8fb6-c7fcc30dcc25", "metadata": {}, "outputs": [ @@ -431,7 +431,7 @@ "data": { "text/plain": "[b'\\xee\\xfeq?_\\x06\\n?\\xda\\xb5\\xbb>\\xdfq\\x8a>\\xa7/\\xab>\\xb2\\xc5Q?\\x8d\\x1c=?\\xb6b\\x9a\\xa3\\x03\\x11?\\x99q\\xc7=\\x98|\\x1b?>\\x87^?\\nI\\xd1>,\\x903>\\x06\\x16\\x03?\\xf3?\\x12=\\xd2\\xc8W?',\n b'\\x1d\\x9c\\xdf=\\x92\\x93\\xdc>`\\xcc\\n=\\xffR\\x0f?\\x10EM?,\"-?\\x0ft\\x81>\\xa0\\xae\\xd6>\\x90\\x8fD?\\xfaD\\t>']" }, - "execution_count": 31, + "execution_count": 21, "metadata": {}, "output_type": "execute_result" } @@ -457,7 +457,7 @@ }, { "cell_type": "code", - "execution_count": 15, + "execution_count": 22, "id": "0a1f4d5b-50f1-4987-b8f8-613b2b6f03bd", "metadata": {}, "outputs": [ @@ -465,7 +465,7 @@ "data": { "text/plain": "1000" }, - "execution_count": 32, + "execution_count": 23, "metadata": {}, "output_type": "execute_result" } @@ -476,7 +476,7 @@ }, { "cell_type": "code", - "execution_count": 16, + "execution_count": 24, "id": "171acbee-c663-4073-843b-a3f83fa0a99a", "metadata": {}, "outputs": [ @@ -484,7 +484,7 @@ "data": { "text/plain": "5" }, - "execution_count": 33, + "execution_count": 25, "metadata": {}, "output_type": "execute_result" } @@ -504,7 +504,7 @@ }, { "cell_type": "code", - "execution_count": 17, + "execution_count": 26, "id": "63490736-c68b-49d5-8db1-8ec203c7a583", "metadata": {}, "outputs": [ @@ -512,7 +512,7 @@ "data": { "text/plain": "[[0.3937252461910248,\n 0.5025281310081482,\n 0.17226243019104004,\n 0.7201003432273865,\n 0.987917423248291,\n 0.36919161677360535,\n 0.03498654067516327,\n 0.7478368878364563,\n 0.34253644943237305,\n 0.33940786123275757],\n [0.761231005191803,\n 0.8932342529296875,\n 0.06776423007249832,\n 0.8769919276237488,\n 0.48779383301734924,\n 0.9544709920883179,\n 0.8270399570465088,\n 0.9150049686431885,\n 0.8350704908370972,\n 0.9739500880241394],\n [0.9656015634536743,\n 0.4987963140010834,\n 0.6006644368171692,\n 0.000701306969858706,\n 0.5339081287384033,\n 0.22828376293182373,\n 0.3365790545940399,\n 0.2838159203529358,\n 0.3415278196334839,\n 0.7082713842391968]]" }, - "execution_count": 34, + "execution_count": 27, "metadata": {}, "output_type": "execute_result" } @@ -539,7 +539,7 @@ }, { "cell_type": "code", - "execution_count": 18, + "execution_count": 28, "id": "7d715701-eba1-4868-b223-a17a6fa4b6ce", "metadata": {}, "outputs": [], @@ -571,7 +571,7 @@ }, { "cell_type": "code", - "execution_count": 19, + "execution_count": 29, "id": "74707c74-2529-43e1-ba87-b693403b5e8d", "metadata": {}, "outputs": [], @@ -591,7 +591,7 @@ }, { "cell_type": "code", - "execution_count": 20, + "execution_count": 30, "id": "03905527-9239-4fd7-9a9b-4c35da0b7447", "metadata": {}, "outputs": [ @@ -599,7 +599,7 @@ "data": { "text/plain": "" }, - "execution_count": 38, + "execution_count": 31, "metadata": {}, "output_type": "execute_result" } @@ -620,7 +620,7 @@ }, { "cell_type": "code", - "execution_count": 21, + "execution_count": 32, "id": "d7b22128-188c-475e-a1cb-5c52261d8403", "metadata": {}, "outputs": [], @@ -639,7 +639,7 @@ }, { "cell_type": "code", - "execution_count": 22, + "execution_count": 33, "id": "3391ee73-86c5-4913-b412-bf4d12fb9b68", "metadata": {}, "outputs": [ @@ -647,7 +647,7 @@ "data": { "text/plain": "[array([0.06707381, 0.3336899 , 0.23638362, 0.54146034, 0.21330866,\n 0.57814604, 0.7436944 , 0.21778256, 0.32921487, 0.18143076],\n dtype=float32),\n array([0.17625922, 0.6122456 , 0.65093136, 0.680956 , 0.99456173,\n 0.785619 , 0.8397423 , 0.34446132, 0.9549833 , 0.53008443],\n dtype=float32),\n array([0.12105445, 0.27007556, 0.33191404, 0.35239697, 0.104354 ,\n 0.560923 , 0.95614606, 0.6793355 , 0.12789273, 0.01870769],\n dtype=float32),\n array([0.05535996, 0.13312466, 0.9434161 , 0.52270526, 0.24034844,\n 0.73964477, 0.8723515 , 0.02157358, 0.14537902, 0.8052284 ],\n dtype=float32),\n array([0.17335513, 0.87024 , 0.11818643, 0.40915504, 0.65390265,\n 0.519701 , 0.1028851 , 0.8442223 , 0.64491796, 0.31468135],\n dtype=float32)]" }, - "execution_count": 40, + "execution_count": 34, "metadata": {}, "output_type": "execute_result" } @@ -672,7 +672,7 @@ }, { "cell_type": "code", - "execution_count": 23, + "execution_count": 35, "id": "4a4124d1-588b-408a-9d85-dc2acd8d8f31", "metadata": {}, "outputs": [], @@ -692,7 +692,7 @@ }, { "cell_type": "code", - "execution_count": 24, + "execution_count": 36, "id": "465ffe10-cc32-400c-adec-f4e91f25fb98", "metadata": {}, "outputs": [ @@ -700,7 +700,7 @@ "data": { "text/plain": "[b'\\xee\\xfeq?_\\x06\\n?\\xda\\xb5\\xbb>\\xdfq\\x8a>\\xa7/\\xab>\\xb2\\xc5Q?\\x8d\\x1c=?\\xb6b\\x9a\\xa3\\x03\\x11?\\x99q\\xc7=\\x98|\\x1b?>\\x87^?\\nI\\xd1>,\\x903>\\x06\\x16\\x03?\\xf3?\\x12=\\xd2\\xc8W?',\n b'\\x1d\\x9c\\xdf=\\x92\\x93\\xdc>`\\xcc\\n=\\xffR\\x0f?\\x10EM?,\"-?\\x0ft\\x81>\\xa0\\xae\\xd6>\\x90\\x8fD?\\xfaD\\t>']" }, - "execution_count": 42, + "execution_count": 37, "metadata": {}, "output_type": "execute_result" } @@ -711,7 +711,7 @@ }, { "cell_type": "code", - "execution_count": 25, + "execution_count": 38, "id": "97b2069f-2cd2-4af5-95cc-87637d1fc838", "metadata": {}, "outputs": [ @@ -719,7 +719,7 @@ "data": { "text/plain": "" }, - "execution_count": 43, + "execution_count": 39, "metadata": {}, "output_type": "execute_result" } @@ -731,7 +731,7 @@ }, { "cell_type": "code", - "execution_count": 26, + "execution_count": 40, "id": "ea364348-8b95-4835-9481-11a7bf67fce0", "metadata": {}, "outputs": [], @@ -750,7 +750,7 @@ }, { "cell_type": "code", - "execution_count": 27, + "execution_count": 41, "id": "78b0619f-a057-4edb-a230-1e96c5b0b2e7", "metadata": {}, "outputs": [ @@ -758,7 +758,7 @@ "data": { "text/plain": "[[0.6067176461219788,\n 0.2106485515832901,\n 0.6345869302749634,\n 0.6352039575576782,\n 0.829525887966156,\n 0.2823314368724823,\n 0.017225714400410652,\n 0.22034095227718353,\n 0.24362443387508392,\n 0.7712428569793701],\n [0.26649677753448486,\n 0.6021978259086609,\n 0.8979067206382751,\n 0.9429398775100708,\n 0.589701771736145,\n 0.24339258670806885,\n 0.3752290904521942,\n 0.34352484345436096,\n 0.647399365901947,\n 0.19694264233112335],\n [0.6997039914131165,\n 0.08066725730895996,\n 0.19695895910263062,\n 0.08963707834482193,\n 0.3289657235145569,\n 0.8245747089385986,\n 0.782729983329773,\n 0.43013912439346313,\n 0.765410304069519,\n 0.8552709817886353]]" }, - "execution_count": 45, + "execution_count": 42, "metadata": {}, "output_type": "execute_result" } @@ -783,7 +783,7 @@ }, { "cell_type": "code", - "execution_count": 28, + "execution_count": 43, "id": "a53088c8-af5e-40f6-84b5-aa83cc81303f", "metadata": {}, "outputs": [], @@ -793,7 +793,7 @@ }, { "cell_type": "code", - "execution_count": 29, + "execution_count": 44, "id": "50511825-6506-45b4-9b36-607dcee37dea", "metadata": {}, "outputs": [], @@ -821,7 +821,7 @@ }, { "cell_type": "code", - "execution_count": 30, + "execution_count": 45, "id": "7f871623-9176-4865-97f4-5e89cf7c3a70", "metadata": {}, "outputs": [ @@ -830,7 +830,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0[0.94529617, 0.5391597, 0.3666218, 0.27040002,...
1[0.39620587, 0.56646174, 0.09738464, 0.6073699...
2[0.10918448, 0.43081337, 0.033886313, 0.559860...
3[0.027094776, 0.03226529, 0.49422556, 0.171387...
4[0.65606296, 0.022113293, 0.57438064, 0.867151...
\n
", "text/plain": " vec_f32\n0 [0.94529617, 0.5391597, 0.3666218, 0.27040002,...\n1 [0.39620587, 0.56646174, 0.09738464, 0.6073699...\n2 [0.10918448, 0.43081337, 0.033886313, 0.559860...\n3 [0.027094776, 0.03226529, 0.49422556, 0.171387...\n4 [0.65606296, 0.022113293, 0.57438064, 0.867151..." }, - "execution_count": 48, + "execution_count": 46, "metadata": {}, "output_type": "execute_result" } @@ -852,7 +852,7 @@ }, { "cell_type": "code", - "execution_count": 31, + "execution_count": 47, "id": "1a853637-f29e-434a-9dd4-d2fb92bc4597", "metadata": {}, "outputs": [ @@ -860,7 +860,7 @@ "data": { "text/plain": "1000" }, - "execution_count": 49, + "execution_count": 48, "metadata": {}, "output_type": "execute_result" } @@ -881,7 +881,7 @@ }, { "cell_type": "code", - "execution_count": 32, + "execution_count": 49, "id": "a75c5726-0ee7-4876-aac7-e71dc9752eae", "metadata": {}, "outputs": [ @@ -911,7 +911,7 @@ }, { "cell_type": "code", - "execution_count": 33, + "execution_count": 51, "id": "48b56238-b251-479f-9d1f-271f46a7111e", "metadata": {}, "outputs": [], @@ -921,7 +921,7 @@ }, { "cell_type": "code", - "execution_count": 34, + "execution_count": 52, "id": "c4e77d6b-a93c-47d2-89ce-b1c502950c71", "metadata": {}, "outputs": [ @@ -930,7 +930,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0[0.01576937, 0.84008086, 0.40135244, 0.7519893...
1[0.4305454, 0.26922098, 0.76273954, 0.4918053,...
2[0.6721296, 0.8615232, 0.20488219, 0.6555235, ...
\n
", "text/plain": " vec_f32\n0 [0.01576937, 0.84008086, 0.40135244, 0.7519893...\n1 [0.4305454, 0.26922098, 0.76273954, 0.4918053,...\n2 [0.6721296, 0.8615232, 0.20488219, 0.6555235, ..." }, - "execution_count": 52, + "execution_count": 53, "metadata": {}, "output_type": "execute_result" } @@ -953,7 +953,7 @@ }, { "cell_type": "code", - "execution_count": 35, + "execution_count": 54, "id": "43187411-efe0-465d-b6dd-a167534f6823", "metadata": {}, "outputs": [], @@ -972,7 +972,7 @@ }, { "cell_type": "code", - "execution_count": 36, + "execution_count": 55, "id": "1ed1b6c2-3c79-42b9-a671-41b2828c4c31", "metadata": {}, "outputs": [ @@ -981,7 +981,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0[0.9452961683273315, 0.5391597151756287, 0.366...
1[0.396205872297287, 0.5664617419242859, 0.0973...
2[0.10918448120355606, 0.43081337213516235, 0.0...
\n
", "text/plain": " vec_f32\n0 [0.9452961683273315, 0.5391597151756287, 0.366...\n1 [0.396205872297287, 0.5664617419242859, 0.0973...\n2 [0.10918448120355606, 0.43081337213516235, 0.0..." }, - "execution_count": 54, + "execution_count": 56, "metadata": {}, "output_type": "execute_result" } @@ -1003,7 +1003,7 @@ }, { "cell_type": "code", - "execution_count": 37, + "execution_count": 57, "id": "3cb1b6e1-a732-4a2f-a751-095d6727e6ae", "metadata": {}, "outputs": [ @@ -1011,7 +1011,7 @@ "data": { "text/plain": "'<10f'" }, - "execution_count": 55, + "execution_count": 58, "metadata": {}, "output_type": "execute_result" } @@ -1022,7 +1022,7 @@ }, { "cell_type": "code", - "execution_count": 38, + "execution_count": 59, "id": "6cdaafa5-7406-488b-a780-744f23b5c0e4", "metadata": {}, "outputs": [], @@ -1032,7 +1032,7 @@ }, { "cell_type": "code", - "execution_count": 39, + "execution_count": 60, "id": "af739340-e5fd-482a-96c8-5eedf8202f1c", "metadata": {}, "outputs": [ @@ -1040,7 +1040,7 @@ "data": { "text/plain": "0 b'\\xee\\xfeq?_\\x06\\n?\\xda\\xb5\\xbb>\\xdfq\\x8a>\\xa...\n1 b'\\x7f\\xdb\\xca>\\xa3\\x03\\x11?\\x99q\\xc7=\\x98|\\x1...\n2 b'\\x1d\\x9c\\xdf=\\x92\\x93\\xdc>`\\xcc\\n=\\xffR\\x0f?...\nName: vec_f32, dtype: object" }, - "execution_count": 57, + "execution_count": 61, "metadata": {}, "output_type": "execute_result" } @@ -1060,7 +1060,7 @@ }, { "cell_type": "code", - "execution_count": 40, + "execution_count": 62, "id": "49dde7bd-9823-4c55-8f34-4e16643e6b8e", "metadata": {}, "outputs": [ @@ -1068,7 +1068,7 @@ "data": { "text/plain": "1000" }, - "execution_count": 58, + "execution_count": 63, "metadata": {}, "output_type": "execute_result" } @@ -1079,7 +1079,7 @@ }, { "cell_type": "code", - "execution_count": 41, + "execution_count": 64, "id": "137a7f8e-d713-4179-bcad-66f194d1f839", "metadata": {}, "outputs": [ @@ -1088,7 +1088,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0b'>kS?;\\xec\\x8b>0\\xe5\\x19?\\r\\xddF?\\xf2\\x044?u\\...
1b'\\xedJ[=\\xbfq\\xce=G#\\xa4<\\xcbV\\xe3=\\xeb:;?\\xa...
2b'\\x0e\\x08n>\\xe8\\xb2\\x98>\\x10\\x133>\\xd4\\xf7\\x1...
\n
", "text/plain": " vec_f32\n0 b'>kS?;\\xec\\x8b>0\\xe5\\x19?\\r\\xddF?\\xf2\\x044?u\\...\n1 b'\\xedJ[=\\xbfq\\xce=G#\\xa4<\\xcbV\\xe3=\\xeb:;?\\xa...\n2 b'\\x0e\\x08n>\\xe8\\xb2\\x98>\\x10\\x133>\\xd4\\xf7\\x1..." }, - "execution_count": 59, + "execution_count": 65, "metadata": {}, "output_type": "execute_result" } @@ -1109,7 +1109,7 @@ }, { "cell_type": "code", - "execution_count": 42, + "execution_count": 66, "id": "a60f967c-c8fe-4ad9-a11f-25f5fb35ce69", "metadata": {}, "outputs": [], @@ -1119,7 +1119,7 @@ }, { "cell_type": "code", - "execution_count": 43, + "execution_count": 67, "id": "2924f8b8-f543-4a2f-90c8-8e6e5c15275d", "metadata": {}, "outputs": [ @@ -1128,7 +1128,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0[0.8258551359176636, 0.2732866704463959, 0.601...
1[0.0535382516682148, 0.10080289095640182, 0.02...
2[0.2324526011943817, 0.29823994636535645, 0.17...
\n
", "text/plain": " vec_f32\n0 [0.8258551359176636, 0.2732866704463959, 0.601...\n1 [0.0535382516682148, 0.10080289095640182, 0.02...\n2 [0.2324526011943817, 0.29823994636535645, 0.17..." }, - "execution_count": 61, + "execution_count": 68, "metadata": {}, "output_type": "execute_result" } @@ -1153,7 +1153,7 @@ }, { "cell_type": "code", - "execution_count": 44, + "execution_count": 69, "id": "5f13939e-2254-4956-9537-315f1dde1b63", "metadata": {}, "outputs": [], @@ -1177,7 +1177,7 @@ }, { "cell_type": "code", - "execution_count": 45, + "execution_count": 70, "id": "f6781046-e636-4495-8a99-e035db8988aa", "metadata": {}, "outputs": [ @@ -1185,7 +1185,7 @@ "data": { "text/plain": "'eefe713f5f060a3fdab5bb3edf718a3ea72fab3eb2c5513f8d1c3d3fb6629a3c7873943d04930a3f'" }, - "execution_count": 63, + "execution_count": 71, "metadata": {}, "output_type": "execute_result" } @@ -1197,7 +1197,7 @@ }, { "cell_type": "code", - "execution_count": 46, + "execution_count": 72, "id": "957f98e1-c3d5-4e7c-b43a-5583cdff045e", "metadata": {}, "outputs": [ @@ -1205,7 +1205,7 @@ "data": { "text/plain": "'eefe713f5f060a3fdab5bb3edf718a3ea72fab3eb2c5513f8d1c3d3fb6629a3c7873943d04930a3f'" }, - "execution_count": 64, + "execution_count": 73, "metadata": {}, "output_type": "execute_result" } @@ -1229,7 +1229,7 @@ }, { "cell_type": "code", - "execution_count": 47, + "execution_count": 74, "id": "e269be32-5b56-4e19-baed-6420d6fd4bfb", "metadata": {}, "outputs": [ @@ -1237,7 +1237,7 @@ "data": { "text/plain": "[\"(X'eefe713f5f060a3fdab5bb3edf718a3ea72fab3eb2c5513f8d1c3d3fb6629a3c7873943d04930a3f')\",\n \"(X'7fdbca3ea303113f9971c73d987c1b3f3e875e3f0a49d13e2c90333e0616033ff33f123dd2c8573f')\",\n \"(X'1d9cdf3d9293dc3e60cc0a3dff520f3f10454d3f2c222d3f0f74813ea0aed63e908f443ffa44093e')\"]" }, - "execution_count": 65, + "execution_count": 75, "metadata": {}, "output_type": "execute_result" } @@ -1249,7 +1249,7 @@ }, { "cell_type": "code", - "execution_count": 48, + "execution_count": 76, "id": "bd51d277-eec1-4787-b9b9-7a943f3eea0c", "metadata": {}, "outputs": [ @@ -1258,7 +1258,7 @@ "text/html": "\n \n \n \n \n \n \n
", "text/plain": "++\n||\n++\n++" }, - "execution_count": 66, + "execution_count": 77, "metadata": {}, "output_type": "execute_result" } @@ -1279,7 +1279,7 @@ }, { "cell_type": "code", - "execution_count": 49, + "execution_count": 78, "id": "8a9ce43b-2ebc-4c9a-8898-afacaff13df9", "metadata": {}, "outputs": [], @@ -1290,7 +1290,7 @@ }, { "cell_type": "code", - "execution_count": 50, + "execution_count": 79, "id": "b10b2f71-02fd-4630-8ae0-7845a8385934", "metadata": {}, "outputs": [ @@ -1299,7 +1299,7 @@ "text/html": "\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
b'\\xfe\\xd7@?\\xecr\\xec>\\xbdW1?\\xbb_\\xcb>\\x88\\xb9\\xf4>\\x04G\\xaa>#d\\xf3=\\x07\\xb5\\xcb>\\xcd\\xd7&?{Es?'
b'\\x0e\\x08n>\\xe8\\xb2\\x98>\\x10\\x133>\\xd4\\xf7\\x1b?Q$-?t\\x11\\xfa>,}S?\\xa8\\x14k;\\x1a\\xf8h>\\xf8\\xbc-?'
b'1~\\x01>\\xb7>/?\\xd3\\x10\\x1f?Z\\xcc\\x05=>X\\xa8>\\x01\\r\\x1b>Q\\xf1\\xc3>/-\\xab=\\xea\\x9c6?\\xbc\\xd6|?'
b'\\xe3\\x02\\xba=zz)?<\\xa33?\\x15\\x03\\x14>\\x99\\x97\\x19?(\\x13#?!\\xe9\\xe9>\\xba#i?\\xdc\\xe1y?\\xe1\\xc1)?'
b'\\x8c\\x86\\x12?\\xc3+h?\\xba?=<\\xa45\\xda>\\xb5\\xf2\\r?\\xdb\\xa8\\x08?]\\x84&?\\xf2\\xd1s?\\xec\\xce\\xab>\\x10\\x19k?'
", "text/plain": "+----------------------------------------------------------------------------------------------------------+\n| vec_f32 |\n+----------------------------------------------------------------------------------------------------------+\n| b'\\xfe\\xd7@?\\xecr\\xec>\\xbdW1?\\xbb_\\xcb>\\x88\\xb9\\xf4>\\x04G\\xaa>#d\\xf3=\\x07\\xb5\\xcb>\\xcd\\xd7&?{Es?' |\n| b'\\x0e\\x08n>\\xe8\\xb2\\x98>\\x10\\x133>\\xd4\\xf7\\x1b?Q$-?t\\x11\\xfa>,}S?\\xa8\\x14k;\\x1a\\xf8h>\\xf8\\xbc-?' |\n| b'1~\\x01>\\xb7>/?\\xd3\\x10\\x1f?Z\\xcc\\x05=>X\\xa8>\\x01\\r\\x1b>Q\\xf1\\xc3>/-\\xab=\\xea\\x9c6?\\xbc\\xd6|?' |\n| b'\\xe3\\x02\\xba=zz)?<\\xa33?\\x15\\x03\\x14>\\x99\\x97\\x19?(\\x13#?!\\xe9\\xe9>\\xba#i?\\xdc\\xe1y?\\xe1\\xc1)?' |\n| b'\\x8c\\x86\\x12?\\xc3+h?\\xba?=<\\xa45\\xda>\\xb5\\xf2\\r?\\xdb\\xa8\\x08?]\\x84&?\\xf2\\xd1s?\\xec\\xce\\xab>\\x10\\x19k?' |\n+----------------------------------------------------------------------------------------------------------+" }, - "execution_count": 68, + "execution_count": 80, "metadata": {}, "output_type": "execute_result" } @@ -1320,7 +1320,7 @@ }, { "cell_type": "code", - "execution_count": 51, + "execution_count": 81, "id": "5b6d0c98-a016-423c-a460-aa617615bcdf", "metadata": {}, "outputs": [], @@ -1330,7 +1330,7 @@ }, { "cell_type": "code", - "execution_count": 52, + "execution_count": 82, "id": "5a3e6552-b66c-460e-9394-04b6b1a25795", "metadata": {}, "outputs": [], @@ -1340,7 +1340,7 @@ }, { "cell_type": "code", - "execution_count": 53, + "execution_count": 83, "id": "821ac65c-b8d5-47f5-8b14-945ed8e8d1fa", "metadata": {}, "outputs": [ @@ -1349,7 +1349,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0[0.7532958, 0.46181428, 0.69274503, 0.39721474...
1[0.2324526, 0.29823995, 0.1748774, 0.6092503, ...
2[0.12645794, 0.6845507, 0.62135047, 0.03266558...
\n
", "text/plain": " vec_f32\n0 [0.7532958, 0.46181428, 0.69274503, 0.39721474...\n1 [0.2324526, 0.29823995, 0.1748774, 0.6092503, ...\n2 [0.12645794, 0.6845507, 0.62135047, 0.03266558..." }, - "execution_count": 71, + "execution_count": 84, "metadata": {}, "output_type": "execute_result" } @@ -1374,7 +1374,7 @@ }, { "cell_type": "code", - "execution_count": 54, + "execution_count": 85, "id": "df5af6d1-15e1-4867-a02c-31634a65393b", "metadata": {}, "outputs": [], @@ -1384,7 +1384,7 @@ }, { "cell_type": "code", - "execution_count": 55, + "execution_count": 86, "id": "79f06760-9039-408a-a4c2-6331947dd3e4", "metadata": {}, "outputs": [ @@ -1392,7 +1392,7 @@ "data": { "text/plain": "['(JSON_ARRAY_PACK(\"[0.9452961683273315, 0.5391597151756287, 0.36662179231643677, 0.2704000174999237, 0.3343479335308075, 0.8194228410720825, 0.7387169003486633, 0.018845897167921066, 0.07248586416244507, 0.5413057804107666]\"))',\n '(JSON_ARRAY_PACK(\"[0.396205872297287, 0.5664617419242859, 0.09738463908433914, 0.6073698997497559, 0.8692511320114136, 0.4087603688240051, 0.17535465955734253, 0.5120548009872437, 0.03570551797747612, 0.8429080247879028]\"))',\n '(JSON_ARRAY_PACK(\"[0.10918448120355606, 0.43081337213516235, 0.03388631343841553, 0.5598601698875427, 0.8018350601196289, 0.6763026714324951, 0.2528385818004608, 0.41930103302001953, 0.7678155899047852, 0.13405218720436096]\"))']" }, - "execution_count": 73, + "execution_count": 87, "metadata": {}, "output_type": "execute_result" } @@ -1404,7 +1404,7 @@ }, { "cell_type": "code", - "execution_count": 56, + "execution_count": 88, "id": "92217c8d-f374-49a6-8fb8-f21666681f95", "metadata": {}, "outputs": [ @@ -1413,7 +1413,7 @@ "text/html": "\n \n \n \n \n \n \n
", "text/plain": "++\n||\n++\n++" }, - "execution_count": 74, + "execution_count": 89, "metadata": {}, "output_type": "execute_result" } @@ -1434,7 +1434,7 @@ }, { "cell_type": "code", - "execution_count": 57, + "execution_count": 90, "id": "b9aac5ba-efea-466b-82c7-12fa02174630", "metadata": {}, "outputs": [], @@ -1445,7 +1445,7 @@ }, { "cell_type": "code", - "execution_count": 58, + "execution_count": 91, "id": "9f9e9b6e-5a25-483b-9d40-aea95a302b5f", "metadata": {}, "outputs": [ @@ -1454,7 +1454,7 @@ "text/html": "
\n\n\n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n \n
vec_f32
0[0.177021876, 0.717939079, 0.825487614, 0.7764...
1[0.749338746, 0.589595854, 0.704872251, 0.9270...
2[0.971682549, 0.574555218, 0.174982488, 0.4692...
3[0.814588428, 0.773147047, 0.970053494, 0.9038...
4[0.247024894, 0.828292727, 0.599695325, 0.4499...
\n
", "text/plain": " vec_f32\n0 [0.177021876, 0.717939079, 0.825487614, 0.7764...\n1 [0.749338746, 0.589595854, 0.704872251, 0.9270...\n2 [0.971682549, 0.574555218, 0.174982488, 0.4692...\n3 [0.814588428, 0.773147047, 0.970053494, 0.9038...\n4 [0.247024894, 0.828292727, 0.599695325, 0.4499..." }, - "execution_count": 76, + "execution_count": 92, "metadata": {}, "output_type": "execute_result" } @@ -1466,7 +1466,7 @@ }, { "cell_type": "code", - "execution_count": 59, + "execution_count": 93, "id": "bbfe895a-0f09-4094-a835-793329ee388e", "metadata": {}, "outputs": [ @@ -1474,7 +1474,7 @@ "data": { "text/plain": "[0.177021876,\n 0.717939079,\n 0.825487614,\n 0.77646929,\n 0.137723535,\n 0.358667195,\n 0.41495508,\n 0.027805429,\n 0.291372836,\n 0.413403481]" }, - "execution_count": 77, + "execution_count": 94, "metadata": {}, "output_type": "execute_result" } @@ -1495,7 +1495,7 @@ }, { "cell_type": "code", - "execution_count": 60, + "execution_count": 95, "id": "b5234146-b058-4462-b5d0-516ae699efc6", "metadata": {}, "outputs": [ @@ -1503,7 +1503,7 @@ "data": { "text/plain": "list" }, - "execution_count": 79, + "execution_count": 96, "metadata": {}, "output_type": "execute_result" } @@ -1542,7 +1542,7 @@ }, { "cell_type": "code", - "execution_count": 61, + "execution_count": 97, "id": "8f911f36-0153-4959-828a-41e637cc9887", "metadata": {}, "outputs": [], diff --git a/resources/nb-check.py b/resources/nb-check.py index 331a0e7f..91213698 100755 --- a/resources/nb-check.py +++ b/resources/nb-check.py @@ -250,6 +250,12 @@ def new_markdown_cell(cell_id: str, content: list[str]) -> dict[str, Any]: cell['execution_count'] = code_idx code_idx += 1 + if 'outputs' in cell and len(cell['outputs']) > 0: + for output in cell['outputs']: + if 'execution_count' in output: + output['execution_count'] = code_idx + code_idx += 1 + with open(f, 'w') as outfile: outfile.write(json.dumps(nb, indent=2)) outfile.write('\n')