Skip to content

Instantly share code, notes, and snippets.

@jasongrout
Created November 16, 2019 04:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongrout/2d11e33788288c637a716fca0cabbeaf to your computer and use it in GitHub Desktop.
Save jasongrout/2d11e33788288c637a716fca0cabbeaf to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Before your interview, write a program that lets two humans play a game of Tic Tac Toe in a terminal. \n",
"The program should let the players take turns to input their moves. \n",
"The program should report the outcome of the game"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"%matplotlib widget\n",
"import itertools\n",
"import random \n",
"\n",
"import matplotlib.pyplot as plt\n",
"import matplotlib.patches as mpatches\n",
"import matplotlib.path as mpath\n",
"import matplotlib.cm as mcm\n",
"import matplotlib.transforms as mtransforms\n",
"from matplotlib.collections import PatchCollection\n",
"# https://matplotlib.org/3.1.1/gallery/shapes_and_collections/artist_reference.html\n",
"import numpy as np"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [],
"source": [
"class TicTacToe(object):\n",
" loc = [0, .25, .5, .75]\n",
" inds = dict(zip(loc, [0,1,2,3]))\n",
" facecolor = \"0.99\"\n",
" gridcolor = \"#11557c\"\n",
" edgecolor = '0.5'\n",
" radii = 10 * np.array([0.2, 0.6, 0.8, 0.7, 0.4, 0.5, 0.8])\n",
" colors = [mcm.jet(r/10.) for r in radii]\n",
"\n",
" def __init__(self, game_type=None):\n",
" self.game_type = game_type\n",
" \n",
" self.players = itertools.cycle(['X','O'])\n",
" self.player = next(self.players)\n",
" self.get_symbol = {'X':self.draw_x, 'O':self.draw_o}\n",
" self.board = np.empty(shape=(4,4), dtype='object')\n",
" self.plays = 0\n",
" self.game_over = False\n",
" \n",
" self.fig, self.ax = plt.subplots()\n",
" \n",
" #MPL dev Tom Caswell suggested I use patches\n",
" for (x,y) in itertools.product(self.loc, repeat=2):\n",
" patch = mpatches.Rectangle((x,y), height=.25, width=.25, \n",
" ec=self.edgecolor, fc=self.facecolor,\n",
" picker=True)\n",
" self.ax.add_patch(patch)\n",
"\n",
" self.ax.set_aspect('equal')\n",
" #self.ax.set_xlim(0,.96) # set clean borders\n",
" #self.ax.set_ylim(0,.96)\n",
" self.ax.set_facecolor(self.gridcolor)\n",
" for spine in self.ax.spines.values():\n",
" spine.set_edgecolor(self.edgecolor)\n",
" self.ax.set_xticks([])\n",
" self.ax.set_yticks([])\n",
"\n",
" # Connect the click function to the button press event\n",
" # bind pick events to our on_pick function\n",
" self.fig.canvas.mpl_connect('pick_event', self.on_pick)\n",
" plt.show()\n",
"\n",
" def draw_x(self, x, y):\n",
" width, height = .25, .25\n",
" span = .03\n",
" verts = [(x+width/2-span, y), (x+width/2+span,y), (x+width/2+span,y+height/2-span), \n",
" (x+width,y+height/2-span), (x+width, y+height/2+span), (x+width/2+span, y+height/2+span),\n",
" (x+width/2+span, y+height), (x+width/2-span, y+height), (x+width/2-span, y+height/2+span),\n",
" (x, y+height/2+span), (x, y+height/2-span), (x+width/2-span, y+height/2-span), \n",
" (x+width/2-span, y)]\n",
"\n",
" codes = [mpath.Path.MOVETO, mpath.Path.LINETO, mpath.Path.LINETO, mpath.Path.LINETO, mpath.Path.LINETO,\n",
" mpath.Path.LINETO, mpath.Path.LINETO, mpath.Path.LINETO, mpath.Path.LINETO,mpath.Path.LINETO, \n",
" mpath.Path.LINETO, mpath.Path.LINETO, mpath.Path.CLOSEPOLY,]\n",
"\n",
" path = mpath.Path(verts, codes)\n",
" #https://stackoverflow.com/questions/4285103/matplotlib-rotating-a-patch\n",
" path = path.transformed(mtransforms.Affine2D().rotate_deg_around(x+width/2, y+height/2, 45))\n",
" return [mpatches.PathPatch(path, fc=self.colors[2], ec = self.gridcolor)]\n",
" \n",
" \n",
" def draw_o(self, x, y):\n",
" return [mpatches.Circle((x +.125, y +.125), radius=.1, fc=self.colors[1], ec=self.gridcolor),\n",
" mpatches.Circle((x +.125, y +.125), radius=.05, fc=self.facecolor, ec=self.gridcolor)]\n",
" \n",
" def check_win(self):\n",
" \"\"\"\n",
" down, across, \\ diagonal, /diagonal \n",
" \"\"\"\n",
" return ((self.board==self.player).all(axis=0).any() | \n",
" (self.board==self.player).all(axis=1).any() | \n",
" (np.diag(self.board)==self.player).all()|\n",
" (np.diag(np.flip(self.board,axis=1))== self.player).all())\n",
" \n",
" def auto_move(self):\n",
" xcoord, ycoord = np.where(self.board==None)\n",
" x, y = random.choice(list(zip(xcoord, ycoord)))\n",
" self.draw_symbol(self.loc[x], self.loc[y])\n",
" self.next_turn()\n",
" \n",
" #https://jakevdp.github.io/blog/2012/12/06/minesweeper-in-matplotlib/\n",
" # Function to be called when mouse is clicked\n",
" # create a function to be bound to pick events: here the event has an\n",
" # attribute `artist` which points to the object which was clicked\n",
" \n",
" def draw_symbol(self, x, y):\n",
" patches = self.get_symbol[self.player](x, y)\n",
" [self.ax.add_patch(p) for p in patches]\n",
" self.fig.canvas.draw()\n",
" self.board[self.inds[x], self.inds[y]] = self.player\n",
" self.plays += 1\n",
" \n",
" \n",
" def next_turn(self):\n",
" if self.plays > 4 and self.check_win():\n",
" self.ax.set_title(f'Player {self.player} won!', fontsize=24)\n",
" self.game_over = True\n",
" self.fig.canvas.draw()\n",
" elif self.plays == 16:\n",
" self.ax.set_title(\"Draw\",fontsize=24)\n",
" self.game_over = True\n",
" self.fig.canvas.draw()\n",
" else:\n",
" self.player = next(self.players)\n",
" return\n",
" \n",
" def on_pick(self, event): \n",
" xy = event.artist.get_xy()\n",
" x, y = xy[0], xy[1]\n",
" \n",
" #exits if game is over\n",
" if self.game_over:\n",
" return #don't overwrite board \n",
" \n",
" print(x,y)\n",
" print(self.board[self.inds[x], self.inds[y]])\n",
" \n",
" \n",
" self.draw_symbol(x, y)\n",
" #self.next_turn()\n",
" \n",
" \n",
" if not self.game_over and self.game_type == 'auto':\n",
" self.auto_move()\n",
" return"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "17909442e0144915b1ae7df99daa8d21",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"<__main__.TicTacToe at 0x1262fe4a8>"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"TicTacToe()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[0, 1, 2, 3]"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"[0,1,2,3]"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"[(0, 0),\n",
" (0, 1),\n",
" (0, 2),\n",
" (0, 3),\n",
" (1, 0),\n",
" (1, 1),\n",
" (1, 2),\n",
" (1, 3),\n",
" (2, 0),\n",
" (2, 1),\n",
" (2, 2),\n",
" (2, 3),\n",
" (3, 0),\n",
" (3, 1),\n",
" (3, 2),\n",
" (3, 3)]"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"list(itertools.product([0,1,2,3], repeat=2))"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"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.7.3"
},
"varInspector": {
"cols": {
"lenName": 16,
"lenType": 16,
"lenVar": 40
},
"kernels_config": {
"python": {
"delete_cmd_postfix": "",
"delete_cmd_prefix": "del ",
"library": "var_list.py",
"varRefreshCmd": "print(var_dic_list())"
},
"r": {
"delete_cmd_postfix": ") ",
"delete_cmd_prefix": "rm(",
"library": "var_list.r",
"varRefreshCmd": "cat(var_dic_list()) "
}
},
"types_to_exclude": [
"module",
"function",
"builtin_function_or_method",
"instance",
"_Feature"
],
"window_display": false
},
"widgets": {
"application/vnd.jupyter.widget-state+json": {
"state": {
"07e1fbc46fee455b8c61dc6c631fb9f8": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"0c96e4842214488e8458758bdc83a823": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_c2cf0d230d534013bed0deec419b9d84",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"113488377aec44e4aba5ceacc5f74a74": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_ee2946b0b94145d6ad6104315e6381c1",
"toolbar": "IPY_MODEL_a9ed765b49964e50a440ccaee6ee72d1",
"toolbar_position": "left"
}
},
"14552b29770746d48b38ba0304ac4fe0": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_4ced0953065d4c10ba8bea088a429cae",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"17909442e0144915b1ae7df99daa8d21": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_6d3c1674b4024f37ae1c8d517ddb1c97",
"toolbar": "IPY_MODEL_0c96e4842214488e8458758bdc83a823",
"toolbar_position": "left"
}
},
"1ce24bd8d9c24d5a83d0fc7f7820a979": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_75ba913d4662483ca4819e8d60d7db40",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"274749ffd0ba46c0ad7dbf0ab6638e47": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_983418360e9c44ada2cdfbfe6238dc7b",
"toolbar": "IPY_MODEL_a04838039b9942d4bb4ec3fd9470f15a",
"toolbar_position": "left"
}
},
"2ebd72a38736414194e3fcea39f1e497": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_9755b513b3df473ba73b2e7023028123",
"toolbar": "IPY_MODEL_fef1fe6ec03845ca8a2591a2b2e4e477",
"toolbar_position": "left"
}
},
"3028b6d322cb44a79764cd06d5973242": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_481fe70f5a5d49419b82de11a97aca79",
"toolbar": "IPY_MODEL_1ce24bd8d9c24d5a83d0fc7f7820a979",
"toolbar_position": "left"
}
},
"34a3d7e477f44793ba77725e8746a6d2": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"36388c68c1cd47d0a8fe3ada32a35aa5": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_9d4851116e384f8dab18f0c1d0f9ba94",
"toolbar": "IPY_MODEL_72e7acde9e804727a2bfd8321955c4d4",
"toolbar_position": "left"
}
},
"3763d304de524b52aaf7acbfe96d1e56": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_e88e90eec03f47849a19c46c03188e31",
"toolbar": "IPY_MODEL_14552b29770746d48b38ba0304ac4fe0",
"toolbar_position": "left"
}
},
"38e7f722c7934045bda616589b77b5f5": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_34a3d7e477f44793ba77725e8746a6d2",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"409579299c1647b0ae4817de99d302af": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"481fe70f5a5d49419b82de11a97aca79": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"4ced0953065d4c10ba8bea088a429cae": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"5425376ded9c48f48bee929e3ec8e240": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"5c2b5c268a1446a4922231261b312fff": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"69f50494206f46729ed95ce37fb9e924": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_5425376ded9c48f48bee929e3ec8e240",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"6cc522b7acea4fa0b77b34864346721e": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"6d3c1674b4024f37ae1c8d517ddb1c97": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"72e7acde9e804727a2bfd8321955c4d4": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_07e1fbc46fee455b8c61dc6c631fb9f8",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"75ba913d4662483ca4819e8d60d7db40": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"8357846928b9450896d17f222b03e021": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"90380d642f224628af1e8ffbd62820a7": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_edbc9d89c28f43fbb70fd9e68a079951",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"9755b513b3df473ba73b2e7023028123": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"983418360e9c44ada2cdfbfe6238dc7b": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"9d4851116e384f8dab18f0c1d0f9ba94": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"9ec582c77b35402ca878454ca89ff737": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_f29297d071ba451cb835840f1416c342",
"toolbar": "IPY_MODEL_38e7f722c7934045bda616589b77b5f5",
"toolbar_position": "left"
}
},
"a04838039b9942d4bb4ec3fd9470f15a": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_c6dcf7e2c6b4442d9ff844edfa4dcc0e",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"a9ed765b49964e50a440ccaee6ee72d1": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_5c2b5c268a1446a4922231261b312fff",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"c2cf0d230d534013bed0deec419b9d84": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"c6dcf7e2c6b4442d9ff844edfa4dcc0e": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"dd9381e018ce4324ae554f6ed9c2dde4": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"dea8182724d749bcafbdee5cf48a129a": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"e23194c4af8d45d2b4a2bf8dd6317ff7": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_dd9381e018ce4324ae554f6ed9c2dde4",
"toolbar": "IPY_MODEL_90380d642f224628af1e8ffbd62820a7",
"toolbar_position": "left"
}
},
"e88e90eec03f47849a19c46c03188e31": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"edbc9d89c28f43fbb70fd9e68a079951": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"ee2946b0b94145d6ad6104315e6381c1": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"f29297d071ba451cb835840f1416c342": {
"model_module": "@jupyter-widgets/base",
"model_module_version": "1.2.0",
"model_name": "LayoutModel",
"state": {}
},
"f95e2ced5f5f4843a8dffdd13a128f72": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_8357846928b9450896d17f222b03e021",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"fa8977f37b1c40d39e8c95ad4d3a6d2a": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_dea8182724d749bcafbdee5cf48a129a",
"toolbar": "IPY_MODEL_69f50494206f46729ed95ce37fb9e924",
"toolbar_position": "left"
}
},
"fef1fe6ec03845ca8a2591a2b2e4e477": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "ToolbarModel",
"state": {
"layout": "IPY_MODEL_6cc522b7acea4fa0b77b34864346721e",
"toolitems": [
[
"Home",
"Reset original view",
"home",
"home"
],
[
"Back",
"Back to previous view",
"arrow-left",
"back"
],
[
"Forward",
"Forward to next view",
"arrow-right",
"forward"
],
[
"Pan",
"Pan axes with left mouse, zoom with right",
"arrows",
"pan"
],
[
"Zoom",
"Zoom to rectangle",
"square-o",
"zoom"
],
[
"Download",
"Download plot",
"floppy-o",
"save_figure"
]
]
}
},
"fefd786305d049908842bf60783439b8": {
"model_module": "jupyter-matplotlib",
"model_module_version": "^0.4.2",
"model_name": "MPLCanvasModel",
"state": {
"layout": "IPY_MODEL_409579299c1647b0ae4817de99d302af",
"toolbar": "IPY_MODEL_f95e2ced5f5f4843a8dffdd13a128f72",
"toolbar_position": "left"
}
}
},
"version_major": 2,
"version_minor": 0
}
}
},
"nbformat": 4,
"nbformat_minor": 4
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment