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": [
{
"cell_type": "code",
"execution_count": 87,
"execution_count": 3,
"metadata": {},
"outputs": [],
"source": [
"#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",
"\n",
"data = [line.strip() for line in data]\n"
@@ -15,7 +15,7 @@
},
{
"cell_type": "code",
"execution_count": 88,
"execution_count": 4,
"metadata": {},
"outputs": [
{
@@ -24,7 +24,7 @@
"421"
]
},
"execution_count": 88,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -36,7 +36,7 @@
},
{
"cell_type": "code",
"execution_count": 89,
"execution_count": 5,
"metadata": {},
"outputs": [
{
@@ -45,7 +45,7 @@
"463"
]
},
"execution_count": 89,
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
@@ -57,7 +57,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"metadata": {},
"outputs": [
{
@@ -66,7 +66,7 @@
"1640"
]
},
"execution_count": 90,
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
@@ -89,7 +89,7 @@
},
{
"cell_type": "code",
"execution_count": 91,
"execution_count": 7,
"metadata": {},
"outputs": [
{
@@ -98,7 +98,7 @@
"2524"
]
},
"execution_count": 91,
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
@@ -109,7 +109,7 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 8,
"metadata": {},
"outputs": [],
"source": [
@@ -122,29 +122,16 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 9,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"array([[ True, False, True],\n",
" [False, True, False],\n",
" [ True, False, True]])"
]
},
"execution_count": 106,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"mask = pattern != '.'"
]
},
{
"cell_type": "code",
"execution_count": 129,
"execution_count": 10,
"metadata": {},
"outputs": [
{
@@ -153,7 +140,7 @@
"1873"
]
},
"execution_count": 129,
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
@@ -173,9 +160,21 @@
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"display_name": "Python 3",
"language": "python",
"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,

1135
5/5.ipynb

File diff suppressed because it is too large Load Diff

View File

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