Skip to content

Commit

Permalink
Show how to do more jupyter stuff.
Browse files Browse the repository at this point in the history
  • Loading branch information
jwg4 committed Nov 11, 2023
1 parent c100678 commit 6093692
Show file tree
Hide file tree
Showing 2 changed files with 160 additions and 0 deletions.
6 changes: 6 additions & 0 deletions examples/.ipynb_checkpoints/display_boards-checkpoint.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
154 changes: 154 additions & 0 deletions examples/display_boards.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 5,
"id": "2f48725f",
"metadata": {},
"outputs": [],
"source": [
"from polyomino.board import Chessboard\n",
"from polyomino.constant import DOMINO"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "325f7427",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAMAAAC45U6nAAAABlBMVEX///8AAABVwtN+AAAAV0lEQVR4nO3ZyQ0AIAgAQe2/aTsgGokHmS2A4eNHWpP0Wj2n2MjZlMFgLE2ZfaFbRspkBoPBYDAYDAaDwWAwGAwGg8FgMKob8a/93xcJBqOAceBqLulGA1OUAUFeFCJvAAAAAElFTkSuQmCC\n",
"text/plain": [
"<polyomino.board.DeletedRectangle at 0x6f56ef58>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Chessboard().remove((0, 0)).remove((7, 7))"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "c9cc6b80",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAMAAAC45U6nAAAABlBMVEX///8AAABVwtN+AAAAV0lEQVR4nO3ZsQ0AIAgAQdx/aTcwGJFQ3LcmnI2NREia1qrpbNTclMFgXE3JvtAno2Qyg8FgMBgMBoPBYDAYDAaDwWAwGIONhv/27CmDwfhuNOzPJfW1AVLMAUGKU2ZPAAAAAElFTkSuQmCC\n",
"text/plain": [
"<polyomino.board.DeletedRectangle at 0x6f56e8b0>"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Chessboard().remove((0, 0)).remove((0, 7))"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "1d7225b7",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAAYFBMVEUAAADRfMe128vfBLykVLaAn4yORk/ED0Y7BRi4APlDH8DH99yFDqL6Syfy7QqxZoaXsVkrI/w6ikMOoXxywYIZDnn655alzz6GxzDOGxJq621IrlMSBZmPuhg0uoxthljQxCNxAAAAb0lEQVR4nO3MSQ6CQAAAwYmoKCKLiops/v+V3JoTyZwnXQ+oEHBAhiNOOCPHBcHQMMnwCkNDw5iwwA0l7qhQo4GhYZphC0NDw5jwgSde6PDGB18YGqYZ9jA0NIwJfxgwYsKMBX8YGqYZbgwNDXfDFSiJm8jaDSAvAAAAAElFTkSuQmCC\n",
"text/plain": [
"<polyomino.solution.Solution at 0x6f558c10>"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Chessboard().remove((0, 0)).remove((0, 7)).tile_with_many(DOMINO).solve()"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "722aee60",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAGMAAABjCAMAAAC45U6nAAAABlBMVEX///8AAABVwtN+AAAAZklEQVR4nO3ZSQrAIBAAQf3/pz0L4gLjAlYfQ6DMYQRNSpLeKEfXMqLXzGAwGAwGg8FgMBgMxldG/9wdZEy+x2AwNhmNOV+/c1vfr/rfxmAwthsH5nywAgaDwWAwGPWzA//PJd2oACSvAZFe6vBVAAAAAElFTkSuQmCC\n",
"text/plain": [
"<polyomino.board.DeletedRectangle at 0x65fd08e0>"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Chessboard().remove((3, 4)).remove((5, 5))"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "a8b83b0a",
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAFAAAABQCAMAAAC5zwKfAAAAYFBMVEUAAAD/WpECZ4JtsHwtqH/UjXsc4mfFa/yqRlVFJ7raNUcvOyNN8Q0Hhde1j2rAMtm5mlOnufGBFbMsR9seR9flE24JuRvEDZodeWqCj4X3DFETOpC+wkNJ57OeZkN2KD3VpDDiAAAAdElEQVR4nO3N2xWCMADA0B4FBBFUQPCJ7j+lf+lPJ6C5AyRhhz0KlKhwQI0GwaBBgwYNZhs8osUJHXqcccEVBg0aNGgw3+CAERMCbpgTFhg0mGPwjhiMkwcMGtx68IkX3ojBT0IMrjBoMMfgN+GXYNDgxoN/pFKbyN9fg4YAAAAASUVORK5CYII=\n",
"text/plain": [
"<polyomino.solution.Solution at 0x65fd0118>"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"Chessboard().remove((3, 4)).remove((5, 5)).tile_with_many(DOMINO).solve()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "eeb51823",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"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.9.2"
}
},
"nbformat": 4,
"nbformat_minor": 5
}

0 comments on commit 6093692

Please sign in to comment.