Light Clean up

This commit is contained in:
Tobias Kessels
2024-12-12 12:50:03 +01:00
parent 69bf933f03
commit 77c5f531f0
11 changed files with 403 additions and 2394 deletions

View File

@@ -1,6 +0,0 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}

View File

@@ -1,18 +0,0 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}

File diff suppressed because one or more lines are too long

View File

@@ -2,12 +2,12 @@
"cells": [ "cells": [
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 87, "execution_count": 3,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
"#read lines from input and store each list of space separeted integers into left and right lists respectively.\n", "#read lines from input and store each list of space separeted integers into left and right lists respectively.\n",
"with open('4/input', 'r') as f:\n", "with open('input', 'r') as f:\n",
" data=f.readlines()\n", " data=f.readlines()\n",
"\n", "\n",
"data = [line.strip() for line in data]\n" "data = [line.strip() for line in data]\n"
@@ -15,7 +15,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 88, "execution_count": 4,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -24,7 +24,7 @@
"421" "421"
] ]
}, },
"execution_count": 88, "execution_count": 4,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@@ -36,7 +36,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 89, "execution_count": 5,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -45,7 +45,7 @@
"463" "463"
] ]
}, },
"execution_count": 89, "execution_count": 5,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@@ -57,7 +57,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 6,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -66,7 +66,7 @@
"1640" "1640"
] ]
}, },
"execution_count": 90, "execution_count": 6,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@@ -89,7 +89,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 91, "execution_count": 7,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -98,7 +98,7 @@
"2524" "2524"
] ]
}, },
"execution_count": 91, "execution_count": 7,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@@ -109,7 +109,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 8,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -122,29 +122,16 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": null, "execution_count": 9,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [],
{
"data": {
"text/plain": [
"array([[ True, False, True],\n",
" [False, True, False],\n",
" [ True, False, True]])"
]
},
"execution_count": 106,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [ "source": [
"mask = pattern != '.'" "mask = pattern != '.'"
] ]
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 129, "execution_count": 10,
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
{ {
@@ -153,7 +140,7 @@
"1873" "1873"
] ]
}, },
"execution_count": 129, "execution_count": 10,
"metadata": {}, "metadata": {},
"output_type": "execute_result" "output_type": "execute_result"
} }
@@ -173,9 +160,21 @@
], ],
"metadata": { "metadata": {
"kernelspec": { "kernelspec": {
"display_name": "Python 3 (ipykernel)", "display_name": "Python 3",
"language": "python", "language": "python",
"name": "python3" "name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
} }
}, },
"nbformat": 4, "nbformat": 4,

1135
5/5.ipynb

File diff suppressed because it is too large Load Diff

View File

@@ -1,12 +1,5 @@
{ {
"cells": [ "cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": 1,
@@ -11050,7 +11043,7 @@
"name": "python", "name": "python",
"nbconvert_exporter": "python", "nbconvert_exporter": "python",
"pygments_lexer": "ipython3", "pygments_lexer": "ipython3",
"version": "3.12.8" "version": "3.8.10"
} }
}, },
"nbformat": 4, "nbformat": 4,

1027
7/7.ipynb

File diff suppressed because it is too large Load Diff

445
8/8.ipynb

File diff suppressed because one or more lines are too long