diff --git a/api/contents/all.json b/api/contents/all.json
index 500c038..e21236a 100644
--- a/api/contents/all.json
+++ b/api/contents/all.json
@@ -2,11 +2,11 @@
"content": [
{
"content": null,
- "created": "2024-12-30T09:34:55.909077Z",
+ "created": "2024-12-30T09:57:50.455956Z",
"format": null,
"hash": null,
"hash_algorithm": null,
- "last_modified": "2024-12-30T09:34:53.425074Z",
+ "last_modified": "2024-12-30T09:57:47.963980Z",
"mimetype": "application/json",
"name": "data.json",
"path": "data.json",
@@ -16,11 +16,11 @@
},
{
"content": null,
- "created": "2024-12-30T09:34:55.913077Z",
+ "created": "2024-12-30T09:57:50.455956Z",
"format": null,
"hash": null,
"hash_algorithm": null,
- "last_modified": "2024-12-30T09:34:53.425074Z",
+ "last_modified": "2024-12-30T09:57:47.963980Z",
"mimetype": "application/json",
"name": "ticker2.json",
"path": "ticker2.json",
@@ -30,11 +30,11 @@
},
{
"content": null,
- "created": "2024-12-30T09:34:55.909077Z",
+ "created": "2024-12-30T09:57:50.451956Z",
"format": null,
"hash": null,
"hash_algorithm": null,
- "last_modified": "2024-12-30T09:34:53.429074Z",
+ "last_modified": "2024-12-30T09:57:47.963980Z",
"mimetype": "application/json",
"name": "beam.json",
"path": "beam.json",
@@ -43,11 +43,11 @@
"writable": true
}
],
- "created": "2024-12-30T09:34:55.913077Z",
+ "created": "2024-12-30T09:57:50.455956Z",
"format": "json",
"hash": null,
"hash_algorithm": null,
- "last_modified": "2024-12-30T09:34:55.913077Z",
+ "last_modified": "2024-12-30T09:57:50.455956Z",
"mimetype": null,
"name": "",
"path": "",
diff --git a/jupyter-lite.json b/jupyter-lite.json
index a71882c..ad6f415 100644
--- a/jupyter-lite.json
+++ b/jupyter-lite.json
@@ -348,7 +348,7 @@
"catalog": "Simply supported beam computation",
"cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples",
"description": "Simply supported beam computation",
- "id": "5eaf6078-0d12-4679-8811-78d4a694d676",
+ "id": "85384ba1-60a0-4170-8cf6-d5f6715b64c1",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.md",
"sourceCode": "
Simple beam modeling
\n\n
\n
\n\n## Theory\n\nThis model is based on classical Solid Mechanics and Strenght of Materials results to solve the beam equilibirum problem. A simple outline follows in the present section, without entering in any mathematical derivations.\n\n- **Reaction computation** - This model does not allow axial loads, currently. Therefore, depending on the support type, one shall need to compute a either a transverse reaction force or a reaction moment. These are computed by solving the algebraic system of linear equations arising from the equilibirum of forces and moments of the structure, accounting simultaneously for point loads and moments and distributed forces.\n\n$$\n\\sum F_y = 0 \\qquad \\sum M_O = 0\n$$\n\n- **Bending diagrams** - the shear force and bending moment diagrams are computed by integrating the differential equations of equilibirum of the beam and imposing the boundary conditions in a sequential manner, starting from the initial point at `x0`. The expressions obtained at the previous segment are used to set the boundary conditions for the next one.\n\n\n$$\n\\frac{\\\\text{d}V}{\\text{d}x} = -q(x) \\qquad \\frac{\\text{d}M}{\\text{d}x} = -V(x)\n$$\n
\n\n- **Deflection** - the slope and deflection of the beam are obtained by integration the elastic curve equation in each segment one and two times, respectively. The geometrical boundary conditions are used to build a system of algebraic equations for the integration constants (twice the number of segments).\n\n\n$$\n\\frac{\\text{d}^2v}{\\text{d}x^2} = \\frac{M}{EI}\n$$\n
\n",
"title": "Simply supported beam theory",
@@ -358,7 +358,7 @@
"catalog": "Simply supported beam computation",
"cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples",
"description": "Simply supported beam computation",
- "id": "61db858e-314e-4ed9-a864-155a8cef0897",
+ "id": "02431ee2-a73e-4c7d-a5b8-23e643d53cde",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.ipynb",
"sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"026a49a0-a0a2-41c5-95ec-0c6d8a7077d7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 3,\n \"height\": 6,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 358,\n \"width\": 9\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"Simple beam modeling
\\n\",\n \"\\n\",\n \"
\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b132a882-6f77-46ae-a371-1acaa75d8dda\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'plotly', 'cosapp'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"01ddcc7d-6223-4296-9884-3a9bcb19bd7a\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from cosapp.ports import Port\\n\",\n \"from cosapp.systems import System\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"class GeometryPort(Port):\\n\",\n \" def setup(self):\\n\",\n \" self.add_variable(\\\"visible\\\", True, desc=\\\"Should this geometry be shown?\\\")\\n\",\n \" self.add_variable(\\\"shape\\\", None, desc=\\\"Geometrical object\\\")\\n\",\n \"class BeamGeo(System):\\n\",\n \" \\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"file\\\",\\\"path\\\")\\n\",\n \" self.add_inward(\\\"mesh_size\\\",100)\\n\",\n \" self.add_inward('width', 0.5, unit = 'm')\\n\",\n \" self.add_inward('height',0.5, unit = 'm')\\n\",\n \" self.add_inward('length', 5., unit = 'm')\\n\",\n \" self.add_outward('I', desc='Second area moment')\\n\",\n \" self.add_outward('grid', np.zeros(1))\\n\",\n \" self.add_outward(\\\"section\\\", [])\\n\",\n \" self.add_output(GeometryPort, 'geom')\\n\",\n \" def compute(self):\\n\",\n \" self.I = self.width*self.height**3/12.\\n\",\n \" self.grid = np.array([i*self.length/self.mesh_size for i in range(0,int(self.mesh_size)+1)])\\n\",\n \" section = [[],[]]\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((- 0.5 + i/100.)*self.width)\\n\",\n \" section[1].append(-0.5*self.height)\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append(0.5*self.width)\\n\",\n \" section[1].append((- 0.5 + i/100.)*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((0.5 - i/100.)*self.width)\\n\",\n \" section[1].append(0.5*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append( -0.5*self.width)\\n\",\n \" section[1].append((0.5 - i/100.)*self.height) \\n\",\n \" self.section = section\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"5cc948e4-115b-459b-80fc-b24d8546b426\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class BeamMeca(System):\\n\",\n \" def setup(self):\\n\",\n \" \\n\",\n \" self.add_inward('E', 270, desc = \\\"Young modulus\\\", valid_range = [100,150],limits = [50,200])\\n\",\n \" self.add_inward(\\\"grid\\\", np.zeros(101), valid_range = [2,4],limits = [-np.inf,10] )\\n\",\n \" self.add_inward(\\\"I\\\", 1., desc='Second area moment' )\\n\",\n \" self.add_inward(\\\"force\\\", -1., desc='Force value', unit = 'N' )\\n\",\n \" self.add_inward(\\\"position\\\", 0.5, desc=\\\"force relative position\\\",limits= [0.2,0.3], valid_range = [0.1,0.8] )\\n\",\n \" self.add_outward(\\\"M\\\", np.zeros(1), desc = \\\"Bending moments\\\" )\\n\",\n \" self.add_outward(\\\"Q\\\", np.zeros(1), desc = \\\"Shear forces\\\" )\\n\",\n \" self.add_outward(\\\"W\\\", np.zeros(1), desc = \\\"Deflections\\\" )\\n\",\n \" self.add_outward(\\\"maxW\\\", 0, desc = \\\"Max deflections\\\" )\\n\",\n \" self.add_outward(\\\"f_position\\\", 0.5, desc=\\\"force position\\\")\\n\",\n \" self.add_outward(\\\"maxW_loc\\\", 0, desc = \\\"Max deflections location\\\" )\\n\",\n \" def compute(self):\\n\",\n \" if self.position > 1.:\\n\",\n \" position = 0.99\\n\",\n \" elif self.position < 0:\\n\",\n \" position = 0.\\n\",\n \" else:\\n\",\n \" position = self.position\\n\",\n \" mesh_size = len(self.grid)\\n\",\n \" L = self.grid[-1]\\n\",\n \" b = (1.- position)*L\\n\",\n \" a = position*L\\n\",\n \" M =[]\\n\",\n \" Q = []\\n\",\n \" W = []\\n\",\n \" for i in range(0, int(mesh_size*position)):\\n\",\n \" x = self.grid[i]\\n\",\n \" M.append(self.force*b*x/L)\\n\",\n \" Q.append(self.force*b/L)\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)) \\n\",\n \" for j in range(int(mesh_size*position), mesh_size):\\n\",\n \" x = self.grid[j]\\n\",\n \" M.append(self.force*a*(L - x)/L)\\n\",\n \" Q.append(self.force*(b/L-1))\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)+ self.force*(x-a)**3/(6*self.E*self.I))\\n\",\n \" self.M = np.array(M)\\n\",\n \" self.Q = np.array(Q) \\n\",\n \" self.W = np.array(W)\\n\",\n \" self.maxW_loc = int(np.argmax(np.absolute(self.W)))-1\\n\",\n \" self.maxW = self.W[self.maxW_loc]\\n\",\n \" self.f_position = mesh_size*position\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"3f5f7ee7-819e-4690-b6ec-34f57ce9a3fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class Main(System):\\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"maintest\\\",0)\\n\",\n \" self.add_child(BeamGeo(\\\"geo\\\"))\\n\",\n \" self.add_child(BeamMeca(\\\"meca\\\"))\\n\",\n \" self.connect(self.geo.outwards, self.meca.inwards, [\\\"I\\\", \\\"grid\\\"])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"20ec9af0-99e4-40dc-8ccd-cdade154b36b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"main = Main(\\\"main\\\")\\n\",\n \"main.run_drivers()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"9cad584d-3a0e-4278-95fd-90b216d458a7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\\n\",\n \"import ipyflex\\n\",\n \"import plotly.graph_objects as go\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"d2247985-b5fb-474c-a31c-8cdd8c7178bd\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_M = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.M,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_Q = go.FigureWidget(go.Scatter(\\n\",\n \" y=main.meca.Q ,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_W = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.W,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"), layout_yaxis_range=[-10,0])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"ce89045a-45c3-4409-b1d5-75896ace81db\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"87ad8d18-1628-4a58-89b8-cdde8bae95a1\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"E_slider = ipywidgets.FloatSlider( value=150,\\n\",\n \" min=50,\\n\",\n \" max=250,description='Young modulus:',\\n\",\n \" continuous_update=False,)\\n\",\n \"def on_E_change(change):\\n\",\n \" main.meca.E = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"E_slider.observe(on_E_change, names='value')\\n\",\n \"\\n\",\n \"position_slider = ipywidgets.FloatSlider( value=0.5,\\n\",\n \" min=0.1,\\n\",\n \" max=0.8,\\n\",\n \" continuous_update=False,\\n\",\n \" description='Force position',)\\n\",\n \"def on_position_change(change):\\n\",\n \" main.meca.position = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"position_slider.observe(on_position_change, names='value')\\n\",\n \"control = ipywidgets.VBox([E_slider, position_slider])\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"id\": \"ad86a098-ef40-48eb-b097-27b529ead5be\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_dict = {'Moment': widget_M, 'Deflection': widget_W, 'Shear forces':widget_Q, 'Control': control}\\n\",\n \"w = ipyflex.FlexLayout(widget_dict, \\n\",\n \" template='beam.json',\\n\",\n \" editable=False,\\n\",\n \" header={'title':'Simply supported beam', 'buttons':[]},\\n\",\n \" )\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8c9fd04f-04bc-4cb8-9238-5d343f9be7cf\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 19,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f346a26e591b4efe8ec5db4d26f7d282\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Moment': FigureWidget({\\n\",\n \" 'data': [{'name': 'M',\\n\",\n \" 'type': 'bar',\\n\",\n \" \u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8003d3d4-6513-4480-a379-4e17424118bc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"0f248175-273b-4031-8d59-6536913ac5fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n",
"title": "Simulation Dashboard",
@@ -368,7 +368,7 @@
"catalog": "Simply supported beam computation",
"cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples",
"description": "Simply supported beam computation",
- "id": "cb7122e8-afcd-415b-97ba-9b8dac8a65ba",
+ "id": "d6ec1749-ec27-4e57-9e94-68050c1df47f",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.ipynb",
"sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"026a49a0-a0a2-41c5-95ec-0c6d8a7077d7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 3,\n \"height\": 6,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 358,\n \"width\": 9\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"Simple beam modeling
\\n\",\n \"\\n\",\n \"
\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b132a882-6f77-46ae-a371-1acaa75d8dda\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'plotly', 'cosapp'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"01ddcc7d-6223-4296-9884-3a9bcb19bd7a\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from cosapp.ports import Port\\n\",\n \"from cosapp.systems import System\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"class GeometryPort(Port):\\n\",\n \" def setup(self):\\n\",\n \" self.add_variable(\\\"visible\\\", True, desc=\\\"Should this geometry be shown?\\\")\\n\",\n \" self.add_variable(\\\"shape\\\", None, desc=\\\"Geometrical object\\\")\\n\",\n \"class BeamGeo(System):\\n\",\n \" \\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"file\\\",\\\"path\\\")\\n\",\n \" self.add_inward(\\\"mesh_size\\\",100)\\n\",\n \" self.add_inward('width', 0.5, unit = 'm')\\n\",\n \" self.add_inward('height',0.5, unit = 'm')\\n\",\n \" self.add_inward('length', 5., unit = 'm')\\n\",\n \" self.add_outward('I', desc='Second area moment')\\n\",\n \" self.add_outward('grid', np.zeros(1))\\n\",\n \" self.add_outward(\\\"section\\\", [])\\n\",\n \" self.add_output(GeometryPort, 'geom')\\n\",\n \" def compute(self):\\n\",\n \" self.I = self.width*self.height**3/12.\\n\",\n \" self.grid = np.array([i*self.length/self.mesh_size for i in range(0,int(self.mesh_size)+1)])\\n\",\n \" section = [[],[]]\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((- 0.5 + i/100.)*self.width)\\n\",\n \" section[1].append(-0.5*self.height)\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append(0.5*self.width)\\n\",\n \" section[1].append((- 0.5 + i/100.)*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((0.5 - i/100.)*self.width)\\n\",\n \" section[1].append(0.5*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append( -0.5*self.width)\\n\",\n \" section[1].append((0.5 - i/100.)*self.height) \\n\",\n \" self.section = section\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"5cc948e4-115b-459b-80fc-b24d8546b426\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class BeamMeca(System):\\n\",\n \" def setup(self):\\n\",\n \" \\n\",\n \" self.add_inward('E', 270, desc = \\\"Young modulus\\\", valid_range = [100,150],limits = [50,200])\\n\",\n \" self.add_inward(\\\"grid\\\", np.zeros(101), valid_range = [2,4],limits = [-np.inf,10] )\\n\",\n \" self.add_inward(\\\"I\\\", 1., desc='Second area moment' )\\n\",\n \" self.add_inward(\\\"force\\\", -1., desc='Force value', unit = 'N' )\\n\",\n \" self.add_inward(\\\"position\\\", 0.5, desc=\\\"force relative position\\\",limits= [0.2,0.3], valid_range = [0.1,0.8] )\\n\",\n \" self.add_outward(\\\"M\\\", np.zeros(1), desc = \\\"Bending moments\\\" )\\n\",\n \" self.add_outward(\\\"Q\\\", np.zeros(1), desc = \\\"Shear forces\\\" )\\n\",\n \" self.add_outward(\\\"W\\\", np.zeros(1), desc = \\\"Deflections\\\" )\\n\",\n \" self.add_outward(\\\"maxW\\\", 0, desc = \\\"Max deflections\\\" )\\n\",\n \" self.add_outward(\\\"f_position\\\", 0.5, desc=\\\"force position\\\")\\n\",\n \" self.add_outward(\\\"maxW_loc\\\", 0, desc = \\\"Max deflections location\\\" )\\n\",\n \" def compute(self):\\n\",\n \" if self.position > 1.:\\n\",\n \" position = 0.99\\n\",\n \" elif self.position < 0:\\n\",\n \" position = 0.\\n\",\n \" else:\\n\",\n \" position = self.position\\n\",\n \" mesh_size = len(self.grid)\\n\",\n \" L = self.grid[-1]\\n\",\n \" b = (1.- position)*L\\n\",\n \" a = position*L\\n\",\n \" M =[]\\n\",\n \" Q = []\\n\",\n \" W = []\\n\",\n \" for i in range(0, int(mesh_size*position)):\\n\",\n \" x = self.grid[i]\\n\",\n \" M.append(self.force*b*x/L)\\n\",\n \" Q.append(self.force*b/L)\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)) \\n\",\n \" for j in range(int(mesh_size*position), mesh_size):\\n\",\n \" x = self.grid[j]\\n\",\n \" M.append(self.force*a*(L - x)/L)\\n\",\n \" Q.append(self.force*(b/L-1))\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)+ self.force*(x-a)**3/(6*self.E*self.I))\\n\",\n \" self.M = np.array(M)\\n\",\n \" self.Q = np.array(Q) \\n\",\n \" self.W = np.array(W)\\n\",\n \" self.maxW_loc = int(np.argmax(np.absolute(self.W)))-1\\n\",\n \" self.maxW = self.W[self.maxW_loc]\\n\",\n \" self.f_position = mesh_size*position\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"3f5f7ee7-819e-4690-b6ec-34f57ce9a3fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class Main(System):\\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"maintest\\\",0)\\n\",\n \" self.add_child(BeamGeo(\\\"geo\\\"))\\n\",\n \" self.add_child(BeamMeca(\\\"meca\\\"))\\n\",\n \" self.connect(self.geo.outwards, self.meca.inwards, [\\\"I\\\", \\\"grid\\\"])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"20ec9af0-99e4-40dc-8ccd-cdade154b36b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"main = Main(\\\"main\\\")\\n\",\n \"main.run_drivers()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"9cad584d-3a0e-4278-95fd-90b216d458a7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\\n\",\n \"import ipyflex\\n\",\n \"import plotly.graph_objects as go\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"d2247985-b5fb-474c-a31c-8cdd8c7178bd\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_M = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.M,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_Q = go.FigureWidget(go.Scatter(\\n\",\n \" y=main.meca.Q ,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_W = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.W,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"), layout_yaxis_range=[-10,0])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"ce89045a-45c3-4409-b1d5-75896ace81db\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"87ad8d18-1628-4a58-89b8-cdde8bae95a1\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"E_slider = ipywidgets.FloatSlider( value=150,\\n\",\n \" min=50,\\n\",\n \" max=250,description='Young modulus:',\\n\",\n \" continuous_update=False,)\\n\",\n \"def on_E_change(change):\\n\",\n \" main.meca.E = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"E_slider.observe(on_E_change, names='value')\\n\",\n \"\\n\",\n \"position_slider = ipywidgets.FloatSlider( value=0.5,\\n\",\n \" min=0.1,\\n\",\n \" max=0.8,\\n\",\n \" continuous_update=False,\\n\",\n \" description='Force position',)\\n\",\n \"def on_position_change(change):\\n\",\n \" main.meca.position = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"position_slider.observe(on_position_change, names='value')\\n\",\n \"control = ipywidgets.VBox([E_slider, position_slider])\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"id\": \"ad86a098-ef40-48eb-b097-27b529ead5be\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_dict = {'Moment': widget_M, 'Deflection': widget_W, 'Shear forces':widget_Q, 'Control': control}\\n\",\n \"w = ipyflex.FlexLayout(widget_dict, \\n\",\n \" template='beam.json',\\n\",\n \" editable=False,\\n\",\n \" header={'title':'Simply supported beam', 'buttons':[]},\\n\",\n \" )\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8c9fd04f-04bc-4cb8-9238-5d343f9be7cf\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 19,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f346a26e591b4efe8ec5db4d26f7d282\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Moment': FigureWidget({\\n\",\n \" 'data': [{'name': 'M',\\n\",\n \" 'type': 'bar',\\n\",\n \" \u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8003d3d4-6513-4480-a379-4e17424118bc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"0f248175-273b-4031-8d59-6536913ac5fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n",
"title": "Simulation Notebook",
@@ -378,7 +378,7 @@
"catalog": "Stock dashboard",
"cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples",
"description": "Nvidia stock dashboard",
- "id": "2858273a-db6b-415e-8c13-0747775e01a2",
+ "id": "db023441-3dff-487f-b447-8abe6cc9b35d",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/stock.ipynb",
"sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.2', 'ipyflex', 'ipyvuetify==1.8.2', 'ipyvue==1.7.0', 'plotly', 'pandas'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from datetime import datetime\\n\",\n \"import ipyvuetify as v\\n\",\n \"import ipywidgets as ipw\\n\",\n \"from ipyflex import FlexLayout\\n\",\n \"import pandas\\n\",\n \"import json\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class TickerData:\\n\",\n \" def __init__(self, ticker: str) -> None:\\n\",\n \" ticker = ticker.upper()\\n\",\n \" self.fetch_ticker(ticker)\\n\",\n \"\\n\",\n \" def fetch_ticker(self, ticker: str):\\n\",\n \" with open('data.json', 'r') as f:\\n\",\n \" cache = json.load(f)\\n\",\n \" self._cached_data = cache.get(ticker, None)\\n\",\n \" if self._cached_data:\\n\",\n \" self._info = self._cached_data['data']['info']\\n\",\n \" self.news = self._cached_data['data']['news']\\n\",\n \" self._price = pandas.DataFrame.from_dict(self._cached_data['price'])\\n\",\n \" # self._price.index = [datetime.fromtimestamp(int(x)/1000) for x in self._price.index]\\n\",\n \" self._balance_sheet = pandas.DataFrame.from_dict(self._cached_data['balance_sheet'])\\n\",\n \" self._analysis = pandas.DataFrame.from_dict(self._cached_data['analysis'])\\n\",\n \" @property\\n\",\n \" def financial_info(self):\\n\",\n \" data = [\\n\",\n \" {'title': 'Market cap', 'value': self._info['marketCap']},\\n\",\n \" {'title': 'PE Ratio', 'value': self._info['forwardPE']},\\n\",\n \" {'title': 'Total revenue', 'value': self._info['totalRevenue']},\\n\",\n \" {'title': 'Gross profit', 'value': self._info['grossProfits']},\\n\",\n \" {'title': 'Debt to equity', 'value': self._info['debtToEquity']},\\n\",\n \" {'title': 'Profit margin', 'value': self._info['profitMargins']},\\n\",\n \" ]\\n\",\n \" return data\\n\",\n \"\\n\",\n \" def price(self):\\n\",\n \" return self._price\\n\",\n \"\\n\",\n \" @property\\n\",\n \" def balance_sheet(self):\\n\",\n \" return self._balance_sheet\\n\",\n \"\\n\",\n \" @property\\n\",\n \" def analysis(self):\\n\",\n \" return self._analysis.transpose()\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"\\n\",\n \"from typing import Dict, List\\n\",\n \"import plotly.graph_objects as go\\n\",\n \"from plotly.subplots import make_subplots\\n\",\n \"\\n\",\n \"v.theme.dark = True\\n\",\n \"\\n\",\n \"\\n\",\n \"def new_factory(news: List[Dict]) -> v.Html:\\n\",\n \" children = []\\n\",\n \" for new in news:\\n\",\n \" date = datetime.fromtimestamp(new['providerPublishTime'])\\n\",\n \" btn = v.Btn(\\n\",\n \" small=True,\\n\",\n \" text=True,\\n\",\n \" block=True,\\n\",\n \" children=['Open'],\\n\",\n \" href=new['link'],\\n\",\n \" target='_blank',\\n\",\n \" )\\n\",\n \" card = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" children=[new['title']],\\n\",\n \" style_='font-size: 1.1rem',\\n\",\n \" ),\\n\",\n \" v.CardSubtitle(\\n\",\n \" children=[\\n\",\n \" f'{new[\\\"publisher\\\"]} ({date.strftime(\\\"%m/%d/%Y, %H:%M\\\")})'\\n\",\n \" ]\\n\",\n \" ),\\n\",\n \" v.CardActions(children=[btn]),\\n\",\n \" ],\\n\",\n \" )\\n\",\n \" children.append(card)\\n\",\n \" return v.Html(tag='div', class_='d-flex flex-column', children=children)\\n\",\n \"\\n\",\n \"\\n\",\n \"def financial_info_factory(data: List[Dict], logo_url: str = None) -> v.Html:\\n\",\n \" children = []\\n\",\n \" if logo_url is not None:\\n\",\n \" logo = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" class_='ma-1',\\n\",\n \" children=[v.Img(src=logo_url, height='100px', contain=True)],\\n\",\n \" style_='width: calc(14.28% - 8px); min-width: 150px',\\n\",\n \" )\\n\",\n \" children.append(logo)\\n\",\n \"\\n\",\n \" for item in data:\\n\",\n \" card = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" class_='ma-1',\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" primary_title=True,\\n\",\n \" children=[item['title']],\\n\",\n \" style_='font-size: 18px; color: #51ef98',\\n\",\n \" ),\\n\",\n \" v.CardText(children=[str(item['value'])]),\\n\",\n \" ],\\n\",\n \" style_='width: calc(14.28% - 8px); min-width: 150px',\\n\",\n \" )\\n\",\n \" children.append(card)\\n\",\n \" return v.Html(\\n\",\n \" tag='div',\\n\",\n \" class_='d-flex flex-row',\\n\",\n \" children=children,\\n\",\n \" style_='flex-wrap: wrap',\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def price_chart_factory(df: List, ticker: str = '') -> ipw.Widget:\\n\",\n \" # Create figure with secondary y-axis\\n\",\n \" fig = make_subplots(specs=[[{'secondary_y': True}]])\\n\",\n \" index = [datetime.fromtimestamp(int(x)/1000).strftime('%m/%d') for x in df.index]\\n\",\n \" # include candlestick with rangeselector\\n\",\n \" fig.add_trace(\\n\",\n \" go.Candlestick(\\n\",\n \" x=index,\\n\",\n \" open=df['Open'],\\n\",\n \" high=df['High'],\\n\",\n \" low=df['Low'],\\n\",\n \" close=df['Close'],\\n\",\n \" name='OHLC',\\n\",\n \" ),\\n\",\n \" secondary_y=True,\\n\",\n \" )\\n\",\n \" fig.add_trace(\\n\",\n \" go.Bar(\\n\",\n \" x=index,\\n\",\n \" y=df['Volume'],\\n\",\n \" marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='Volume',\\n\",\n \" ),\\n\",\n \" secondary_y=False,\\n\",\n \" )\\n\",\n \"\\n\",\n \" fig.layout.yaxis2.showgrid = False\\n\",\n \" fig.update_layout(\\n\",\n \" autosize=True,\\n\",\n \" xaxis_rangeslider_visible=False,\\n\",\n \" template='plotly_dark',\\n\",\n \" title={\\n\",\n \" 'text': f'{ticker.upper()} PRICE CHART',\\n\",\n \" 'xanchor': 'center',\\n\",\n \" 'yanchor': 'top',\\n\",\n \" 'x': 0.5,\\n\",\n \" },\\n\",\n \" )\\n\",\n \" widget = go.FigureWidget(fig, layout=ipw.Layout(height='100%'))\\n\",\n \" return widget\\n\",\n \"\\n\",\n \"\\n\",\n \"def price_history_factory(df: List, ticker: str = '') -> ipw.Widget:\\n\",\n \" # include candlestick with rangeselector\\n\",\n \" index = [datetime.fromtimestamp(int(x)/1000).strftime('%m/%d') for x in df.index]\\n\",\n \" widget = go.FigureWidget(go.Scatter(x=index, y=df['Close']))\\n\",\n \" widget.update_layout(\\n\",\n \" autosize=True,\\n\",\n \" template='plotly_dark',\\n\",\n \" title={\\n\",\n \" 'text': f'{ticker.upper()} PRICE HISTORY',\\n\",\n \" 'xanchor': 'center',\\n\",\n \" 'yanchor': 'top',\\n\",\n \" 'x': 0.5,\\n\",\n \" },\\n\",\n \" )\\n\",\n \" return widget\\n\",\n \"\\n\",\n \"\\n\",\n \"def text_widget(title: str, text: str) -> ipw.Widget:\\n\",\n \" return v.Card(\\n\",\n \" outlined=True,\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" children=[title],\\n\",\n \" style_='font-size: 1.1rem',\\n\",\n \" ),\\n\",\n \" v.CardText(children=[text]),\\n\",\n \" ],\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def balance_sheet_factory(df) -> ipw.Widget:\\n\",\n \" items = []\\n\",\n \" for i in range(df.shape[0]):\\n\",\n \" row = df.iloc[i]\\n\",\n \" item = {'name': row.name}\\n\",\n \" item.update(json.loads(row.to_json()))\\n\",\n \" items.append(item)\\n\",\n \" titles = [x for x in items[0].keys() if x != 'name']\\n\",\n \" headers = [\\n\",\n \" {\\n\",\n \" 'text': 'Property',\\n\",\n \" 'align': 'start',\\n\",\n \" 'sortable': False,\\n\",\n \" 'value': 'name',\\n\",\n \" }\\n\",\n \" ]\\n\",\n \" for title in titles:\\n\",\n \" date = datetime.fromtimestamp(int(title) / 1000)\\n\",\n \" header = {'text': date.strftime('%m/%d/%Y, %H:%M'), 'value': title}\\n\",\n \" headers.append(header)\\n\",\n \" return v.DataTable(\\n\",\n \" headers=headers,\\n\",\n \" items=items,\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def analysis_factory(df) -> ipw.Widget:\\n\",\n \" items = []\\n\",\n \" for i in range(df.shape[0]):\\n\",\n \" row = df.iloc[i]\\n\",\n \" item = {'name': row.name}\\n\",\n \" item.update(json.loads(row.to_json()))\\n\",\n \" items.append(item)\\n\",\n \" titles = [x for x in items[0].keys() if x != 'name']\\n\",\n \" headers = [\\n\",\n \" {\\n\",\n \" 'text': 'Property',\\n\",\n \" 'align': 'start',\\n\",\n \" 'sortable': False,\\n\",\n \" 'value': 'name',\\n\",\n \" }\\n\",\n \" ]\\n\",\n \" for title in titles:\\n\",\n \" header = {'text': title, 'value': title}\\n\",\n \" headers.append(header)\\n\",\n \" return v.DataTable(\\n\",\n \" headers=headers,\\n\",\n \" items=items,\\n\",\n \" )\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"editable = False\\n\",\n \"height = \\\"900px\\\"\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"ticker_name = \\\"NVDA\\\"\\n\",\n \"ticker = TickerData(ticker_name)\\n\",\n \"news = new_factory(ticker.news)\\n\",\n \"info = financial_info_factory(ticker.financial_info, ticker._info[\\\"logo_url\\\"])\\n\",\n \"price = price_chart_factory(ticker.price(), ticker_name)\\n\",\n \"history = price_history_factory(ticker.price(), ticker_name)\\n\",\n \"summary = text_widget(\\\"Business Summary \\\", ticker._info[\\\"longBusinessSummary\\\"])\\n\",\n \"balance_sheet = balance_sheet_factory(ticker.balance_sheet)\\n\",\n \"analysis = analysis_factory(ticker.analysis)\\n\",\n \"widgets = {\\n\",\n \" \\\"news\\\": news,\\n\",\n \" \\\"info\\\": info,\\n\",\n \" \\\"price\\\": price,\\n\",\n \" \\\"history\\\": history,\\n\",\n \" \\\"summary\\\": summary,\\n\",\n \" \\\"balance_sheet\\\": balance_sheet,\\n\",\n \" \\\"analysis\\\": analysis\\n\",\n \"}\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"w = FlexLayout(\\n\",\n \" widgets,\\n\",\n \" style={\\\"height\\\": height},\\n\",\n \" header={\\\"title\\\": \\\"STOCK DASHBOAD\\\", \\\"style\\\": {\\\"backgroundColor\\\": \\\"rgb(53 53 53)\\\"}, \\\"buttons\\\":[\\\"export\\\",\\\"import\\\"]},\\n\",\n \" template=\\\"ticker2.json\\\",\\n\",\n \" editable=False,\\n\",\n \")\\n\",\n \"style = ipw.HTML(\\\"\\\"\\\" \\\"\\\"\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 24,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n",
"title": "NVIDIA",
@@ -387,7 +387,7 @@
{
"cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples",
"description": "Example of opening a notebook in dashboard mode without Voila",
- "id": "7f2ef0d8-370e-4824-a0c4-66c41e42046f",
+ "id": "8763c3c0-6af1-47bd-9141-db2e320769c1",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.ipynb",
"sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"a8da280e-cebd-4762-9d73-d60225f6c79c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'ipyleaflet'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"e5cf8261-0e2e-4a78-8366-40cc62ede883\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"d87541d9-58d8-4a42-9922-edbdfb90518c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 2,\n \"hidden\": false,\n \"locked\": false,\n \"row\": 17,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"79ea1c75d95b4f0e98705fd10316a4b1\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"37d51c24-4f21-4089-8c62-f96ecefaf8fc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 6,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f5bcf49ac33d4679a455aff9bd9bfeae\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"from ipyleaflet import Map, basemaps, basemap_to_tiles\\n\",\n \"\\n\",\n \"m = Map(\\n\",\n \" basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \\\"2017-04-08\\\"),\\n\",\n \" center=(52.204793, 360.121558),\\n\",\n \" zoom=4\\n\",\n \")\\n\",\n \"\\n\",\n \"m\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"59e16c67-d06e-4caf-89c1-d7a6addb3589\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 4,\n \"height\": 3,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 18,\n \"width\": 5\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"8ae2f3d26cd541a2bc6acbbd214532fc\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"b7c5a2c3-5686-40b8-9d86-1c0325d9117d\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 3,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"# Render a notebook as dashboard without Voila!\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"add0b305-71da-4e4e-9026-65af5ba3614b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipyflex\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"0f31e190-31cd-481e-bd7a-1b4ef9285a23\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"509f4ab165614f4792f2423d88a4db72\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Widget 1': HTML(value='Widget 1
'), 'Widget 2': HTML(value='Widget 2
'),\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"widgets = {\\n\",\n \" 'Widget 1' : ipywidgets.HTML('Widget 1
'),\\n\",\n \" 'Widget 2' : ipywidgets.HTML('Widget 2
'),\\n\",\n \" 'Widget 3' : ipywidgets.HTML('Widget 3
'),\\n\",\n \" 'Widget 4' : ipywidgets.HTML('Widget 4
')\\n\",\n \"}\\n\",\n \"\\n\",\n \"ipyflex.FlexLayout(widgets, style={'height':'400px'}, template='./layout.json', editable=False, header=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"09809959-7398-42db-a20d-6097a06b0072\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.13\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n",
"title": "Dashboard example",
@@ -396,7 +396,7 @@
{
"cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples",
"description": "Example of opening a notebook in dashboard mode without Voila",
- "id": "72269c0b-32ec-462b-8f42-2f1a5a7b2f00",
+ "id": "97fdc069-caf1-4b62-acb6-9f5597784231",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.ipynb",
"sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"a8da280e-cebd-4762-9d73-d60225f6c79c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'ipyleaflet'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"e5cf8261-0e2e-4a78-8366-40cc62ede883\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"d87541d9-58d8-4a42-9922-edbdfb90518c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 2,\n \"hidden\": false,\n \"locked\": false,\n \"row\": 17,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"79ea1c75d95b4f0e98705fd10316a4b1\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"37d51c24-4f21-4089-8c62-f96ecefaf8fc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 6,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f5bcf49ac33d4679a455aff9bd9bfeae\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"from ipyleaflet import Map, basemaps, basemap_to_tiles\\n\",\n \"\\n\",\n \"m = Map(\\n\",\n \" basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \\\"2017-04-08\\\"),\\n\",\n \" center=(52.204793, 360.121558),\\n\",\n \" zoom=4\\n\",\n \")\\n\",\n \"\\n\",\n \"m\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"59e16c67-d06e-4caf-89c1-d7a6addb3589\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 4,\n \"height\": 3,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 18,\n \"width\": 5\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"8ae2f3d26cd541a2bc6acbbd214532fc\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"b7c5a2c3-5686-40b8-9d86-1c0325d9117d\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 3,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"# Render a notebook as dashboard without Voila!\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"add0b305-71da-4e4e-9026-65af5ba3614b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipyflex\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"0f31e190-31cd-481e-bd7a-1b4ef9285a23\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"509f4ab165614f4792f2423d88a4db72\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Widget 1': HTML(value='Widget 1
'), 'Widget 2': HTML(value='Widget 2
'),\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"widgets = {\\n\",\n \" 'Widget 1' : ipywidgets.HTML('Widget 1
'),\\n\",\n \" 'Widget 2' : ipywidgets.HTML('Widget 2
'),\\n\",\n \" 'Widget 3' : ipywidgets.HTML('Widget 3
'),\\n\",\n \" 'Widget 4' : ipywidgets.HTML('Widget 4
')\\n\",\n \"}\\n\",\n \"\\n\",\n \"ipyflex.FlexLayout(widgets, style={'height':'400px'}, template='./layout.json', editable=False, header=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"09809959-7398-42db-a20d-6097a06b0072\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.13\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n",
"title": "Notebook example",
@@ -413,7 +413,7 @@
]
},
"description": "Example of opening a URL in a tab",
- "id": "bd6af339-fe66-4f02-a510-f49d15a905a4",
+ "id": "2117866f-1943-4cb9-ad33-3c9159e408c0",
"source": "https://jupyterlab.readthedocs.io/en/stable/",
"sourceCode": null,
"title": "URL example",
@@ -421,7 +421,7 @@
},
{
"description": "Example of opening a Markdown file in a tab",
- "id": "40a03390-8062-400f-a946-caa86b32ae19",
+ "id": "8c6d2208-7c46-4737-88f5-d951b3eca68a",
"source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.md",
"sourceCode": "# Hello world\n\n## Foo\n\n### Bar\n\nTo insert a mathematical formula we use the dollar symbol $, as follows:\n\nEuler's identity: $ e^{i \\pi} + 1 = 0 $\n\nTo isolate and center the formulas and enter in math display mode, we use 2 dollars symbol:\n\n$$\n...\n$$\n\nEuler's identity: $$ e^{i \\pi} + 1 = 0 $$\n",
"title": "Markdown example",
diff --git a/overrides.json b/overrides.json
index 54d015b..6fd7495 100644
--- a/overrides.json
+++ b/overrides.json
@@ -1 +1 @@
-{"appLauncherData": {"config": [{"title": "Simply supported beam theory", "description": "Simply supported beam computation", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.md", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "markdown", "catalog": "Simply supported beam computation", "id": "5eaf6078-0d12-4679-8811-78d4a694d676", "sourceCode": "Simple beam modeling
\n\n
\n
\n\n## Theory\n\nThis model is based on classical Solid Mechanics and Strenght of Materials results to solve the beam equilibirum problem. A simple outline follows in the present section, without entering in any mathematical derivations.\n\n- **Reaction computation** - This model does not allow axial loads, currently. Therefore, depending on the support type, one shall need to compute a either a transverse reaction force or a reaction moment. These are computed by solving the algebraic system of linear equations arising from the equilibirum of forces and moments of the structure, accounting simultaneously for point loads and moments and distributed forces.\n\n$$\n\\sum F_y = 0 \\qquad \\sum M_O = 0\n$$\n\n- **Bending diagrams** - the shear force and bending moment diagrams are computed by integrating the differential equations of equilibirum of the beam and imposing the boundary conditions in a sequential manner, starting from the initial point at `x0`. The expressions obtained at the previous segment are used to set the boundary conditions for the next one.\n\n\n$$\n\\frac{\\\\text{d}V}{\\text{d}x} = -q(x) \\qquad \\frac{\\text{d}M}{\\text{d}x} = -V(x)\n$$\n
\n\n- **Deflection** - the slope and deflection of the beam are obtained by integration the elastic curve equation in each segment one and two times, respectively. The geometrical boundary conditions are used to build a system of algebraic equations for the integration constants (twice the number of segments).\n\n\n$$\n\\frac{\\text{d}^2v}{\\text{d}x^2} = \\frac{M}{EI}\n$$\n
\n"}, {"title": "Simulation Dashboard", "description": "Simply supported beam computation", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook-grid", "catalog": "Simply supported beam computation", "id": "61db858e-314e-4ed9-a864-155a8cef0897", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"026a49a0-a0a2-41c5-95ec-0c6d8a7077d7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 3,\n \"height\": 6,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 358,\n \"width\": 9\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"Simple beam modeling
\\n\",\n \"\\n\",\n \"
\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b132a882-6f77-46ae-a371-1acaa75d8dda\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'plotly', 'cosapp'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"01ddcc7d-6223-4296-9884-3a9bcb19bd7a\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from cosapp.ports import Port\\n\",\n \"from cosapp.systems import System\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"class GeometryPort(Port):\\n\",\n \" def setup(self):\\n\",\n \" self.add_variable(\\\"visible\\\", True, desc=\\\"Should this geometry be shown?\\\")\\n\",\n \" self.add_variable(\\\"shape\\\", None, desc=\\\"Geometrical object\\\")\\n\",\n \"class BeamGeo(System):\\n\",\n \" \\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"file\\\",\\\"path\\\")\\n\",\n \" self.add_inward(\\\"mesh_size\\\",100)\\n\",\n \" self.add_inward('width', 0.5, unit = 'm')\\n\",\n \" self.add_inward('height',0.5, unit = 'm')\\n\",\n \" self.add_inward('length', 5., unit = 'm')\\n\",\n \" self.add_outward('I', desc='Second area moment')\\n\",\n \" self.add_outward('grid', np.zeros(1))\\n\",\n \" self.add_outward(\\\"section\\\", [])\\n\",\n \" self.add_output(GeometryPort, 'geom')\\n\",\n \" def compute(self):\\n\",\n \" self.I = self.width*self.height**3/12.\\n\",\n \" self.grid = np.array([i*self.length/self.mesh_size for i in range(0,int(self.mesh_size)+1)])\\n\",\n \" section = [[],[]]\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((- 0.5 + i/100.)*self.width)\\n\",\n \" section[1].append(-0.5*self.height)\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append(0.5*self.width)\\n\",\n \" section[1].append((- 0.5 + i/100.)*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((0.5 - i/100.)*self.width)\\n\",\n \" section[1].append(0.5*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append( -0.5*self.width)\\n\",\n \" section[1].append((0.5 - i/100.)*self.height) \\n\",\n \" self.section = section\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"5cc948e4-115b-459b-80fc-b24d8546b426\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class BeamMeca(System):\\n\",\n \" def setup(self):\\n\",\n \" \\n\",\n \" self.add_inward('E', 270, desc = \\\"Young modulus\\\", valid_range = [100,150],limits = [50,200])\\n\",\n \" self.add_inward(\\\"grid\\\", np.zeros(101), valid_range = [2,4],limits = [-np.inf,10] )\\n\",\n \" self.add_inward(\\\"I\\\", 1., desc='Second area moment' )\\n\",\n \" self.add_inward(\\\"force\\\", -1., desc='Force value', unit = 'N' )\\n\",\n \" self.add_inward(\\\"position\\\", 0.5, desc=\\\"force relative position\\\",limits= [0.2,0.3], valid_range = [0.1,0.8] )\\n\",\n \" self.add_outward(\\\"M\\\", np.zeros(1), desc = \\\"Bending moments\\\" )\\n\",\n \" self.add_outward(\\\"Q\\\", np.zeros(1), desc = \\\"Shear forces\\\" )\\n\",\n \" self.add_outward(\\\"W\\\", np.zeros(1), desc = \\\"Deflections\\\" )\\n\",\n \" self.add_outward(\\\"maxW\\\", 0, desc = \\\"Max deflections\\\" )\\n\",\n \" self.add_outward(\\\"f_position\\\", 0.5, desc=\\\"force position\\\")\\n\",\n \" self.add_outward(\\\"maxW_loc\\\", 0, desc = \\\"Max deflections location\\\" )\\n\",\n \" def compute(self):\\n\",\n \" if self.position > 1.:\\n\",\n \" position = 0.99\\n\",\n \" elif self.position < 0:\\n\",\n \" position = 0.\\n\",\n \" else:\\n\",\n \" position = self.position\\n\",\n \" mesh_size = len(self.grid)\\n\",\n \" L = self.grid[-1]\\n\",\n \" b = (1.- position)*L\\n\",\n \" a = position*L\\n\",\n \" M =[]\\n\",\n \" Q = []\\n\",\n \" W = []\\n\",\n \" for i in range(0, int(mesh_size*position)):\\n\",\n \" x = self.grid[i]\\n\",\n \" M.append(self.force*b*x/L)\\n\",\n \" Q.append(self.force*b/L)\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)) \\n\",\n \" for j in range(int(mesh_size*position), mesh_size):\\n\",\n \" x = self.grid[j]\\n\",\n \" M.append(self.force*a*(L - x)/L)\\n\",\n \" Q.append(self.force*(b/L-1))\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)+ self.force*(x-a)**3/(6*self.E*self.I))\\n\",\n \" self.M = np.array(M)\\n\",\n \" self.Q = np.array(Q) \\n\",\n \" self.W = np.array(W)\\n\",\n \" self.maxW_loc = int(np.argmax(np.absolute(self.W)))-1\\n\",\n \" self.maxW = self.W[self.maxW_loc]\\n\",\n \" self.f_position = mesh_size*position\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"3f5f7ee7-819e-4690-b6ec-34f57ce9a3fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class Main(System):\\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"maintest\\\",0)\\n\",\n \" self.add_child(BeamGeo(\\\"geo\\\"))\\n\",\n \" self.add_child(BeamMeca(\\\"meca\\\"))\\n\",\n \" self.connect(self.geo.outwards, self.meca.inwards, [\\\"I\\\", \\\"grid\\\"])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"20ec9af0-99e4-40dc-8ccd-cdade154b36b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"main = Main(\\\"main\\\")\\n\",\n \"main.run_drivers()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"9cad584d-3a0e-4278-95fd-90b216d458a7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\\n\",\n \"import ipyflex\\n\",\n \"import plotly.graph_objects as go\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"d2247985-b5fb-474c-a31c-8cdd8c7178bd\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_M = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.M,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_Q = go.FigureWidget(go.Scatter(\\n\",\n \" y=main.meca.Q ,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_W = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.W,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"), layout_yaxis_range=[-10,0])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"ce89045a-45c3-4409-b1d5-75896ace81db\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"87ad8d18-1628-4a58-89b8-cdde8bae95a1\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"E_slider = ipywidgets.FloatSlider( value=150,\\n\",\n \" min=50,\\n\",\n \" max=250,description='Young modulus:',\\n\",\n \" continuous_update=False,)\\n\",\n \"def on_E_change(change):\\n\",\n \" main.meca.E = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"E_slider.observe(on_E_change, names='value')\\n\",\n \"\\n\",\n \"position_slider = ipywidgets.FloatSlider( value=0.5,\\n\",\n \" min=0.1,\\n\",\n \" max=0.8,\\n\",\n \" continuous_update=False,\\n\",\n \" description='Force position',)\\n\",\n \"def on_position_change(change):\\n\",\n \" main.meca.position = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"position_slider.observe(on_position_change, names='value')\\n\",\n \"control = ipywidgets.VBox([E_slider, position_slider])\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"id\": \"ad86a098-ef40-48eb-b097-27b529ead5be\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_dict = {'Moment': widget_M, 'Deflection': widget_W, 'Shear forces':widget_Q, 'Control': control}\\n\",\n \"w = ipyflex.FlexLayout(widget_dict, \\n\",\n \" template='beam.json',\\n\",\n \" editable=False,\\n\",\n \" header={'title':'Simply supported beam', 'buttons':[]},\\n\",\n \" )\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8c9fd04f-04bc-4cb8-9238-5d343f9be7cf\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 19,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f346a26e591b4efe8ec5db4d26f7d282\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Moment': FigureWidget({\\n\",\n \" 'data': [{'name': 'M',\\n\",\n \" 'type': 'bar',\\n\",\n \" \u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8003d3d4-6513-4480-a379-4e17424118bc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"0f248175-273b-4031-8d59-6536913ac5fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "Simulation Notebook", "description": "Simply supported beam computation", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook", "catalog": "Simply supported beam computation", "id": "cb7122e8-afcd-415b-97ba-9b8dac8a65ba", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"026a49a0-a0a2-41c5-95ec-0c6d8a7077d7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 3,\n \"height\": 6,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 358,\n \"width\": 9\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"Simple beam modeling
\\n\",\n \"\\n\",\n \"
\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b132a882-6f77-46ae-a371-1acaa75d8dda\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'plotly', 'cosapp'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"01ddcc7d-6223-4296-9884-3a9bcb19bd7a\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from cosapp.ports import Port\\n\",\n \"from cosapp.systems import System\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"class GeometryPort(Port):\\n\",\n \" def setup(self):\\n\",\n \" self.add_variable(\\\"visible\\\", True, desc=\\\"Should this geometry be shown?\\\")\\n\",\n \" self.add_variable(\\\"shape\\\", None, desc=\\\"Geometrical object\\\")\\n\",\n \"class BeamGeo(System):\\n\",\n \" \\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"file\\\",\\\"path\\\")\\n\",\n \" self.add_inward(\\\"mesh_size\\\",100)\\n\",\n \" self.add_inward('width', 0.5, unit = 'm')\\n\",\n \" self.add_inward('height',0.5, unit = 'm')\\n\",\n \" self.add_inward('length', 5., unit = 'm')\\n\",\n \" self.add_outward('I', desc='Second area moment')\\n\",\n \" self.add_outward('grid', np.zeros(1))\\n\",\n \" self.add_outward(\\\"section\\\", [])\\n\",\n \" self.add_output(GeometryPort, 'geom')\\n\",\n \" def compute(self):\\n\",\n \" self.I = self.width*self.height**3/12.\\n\",\n \" self.grid = np.array([i*self.length/self.mesh_size for i in range(0,int(self.mesh_size)+1)])\\n\",\n \" section = [[],[]]\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((- 0.5 + i/100.)*self.width)\\n\",\n \" section[1].append(-0.5*self.height)\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append(0.5*self.width)\\n\",\n \" section[1].append((- 0.5 + i/100.)*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((0.5 - i/100.)*self.width)\\n\",\n \" section[1].append(0.5*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append( -0.5*self.width)\\n\",\n \" section[1].append((0.5 - i/100.)*self.height) \\n\",\n \" self.section = section\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"5cc948e4-115b-459b-80fc-b24d8546b426\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class BeamMeca(System):\\n\",\n \" def setup(self):\\n\",\n \" \\n\",\n \" self.add_inward('E', 270, desc = \\\"Young modulus\\\", valid_range = [100,150],limits = [50,200])\\n\",\n \" self.add_inward(\\\"grid\\\", np.zeros(101), valid_range = [2,4],limits = [-np.inf,10] )\\n\",\n \" self.add_inward(\\\"I\\\", 1., desc='Second area moment' )\\n\",\n \" self.add_inward(\\\"force\\\", -1., desc='Force value', unit = 'N' )\\n\",\n \" self.add_inward(\\\"position\\\", 0.5, desc=\\\"force relative position\\\",limits= [0.2,0.3], valid_range = [0.1,0.8] )\\n\",\n \" self.add_outward(\\\"M\\\", np.zeros(1), desc = \\\"Bending moments\\\" )\\n\",\n \" self.add_outward(\\\"Q\\\", np.zeros(1), desc = \\\"Shear forces\\\" )\\n\",\n \" self.add_outward(\\\"W\\\", np.zeros(1), desc = \\\"Deflections\\\" )\\n\",\n \" self.add_outward(\\\"maxW\\\", 0, desc = \\\"Max deflections\\\" )\\n\",\n \" self.add_outward(\\\"f_position\\\", 0.5, desc=\\\"force position\\\")\\n\",\n \" self.add_outward(\\\"maxW_loc\\\", 0, desc = \\\"Max deflections location\\\" )\\n\",\n \" def compute(self):\\n\",\n \" if self.position > 1.:\\n\",\n \" position = 0.99\\n\",\n \" elif self.position < 0:\\n\",\n \" position = 0.\\n\",\n \" else:\\n\",\n \" position = self.position\\n\",\n \" mesh_size = len(self.grid)\\n\",\n \" L = self.grid[-1]\\n\",\n \" b = (1.- position)*L\\n\",\n \" a = position*L\\n\",\n \" M =[]\\n\",\n \" Q = []\\n\",\n \" W = []\\n\",\n \" for i in range(0, int(mesh_size*position)):\\n\",\n \" x = self.grid[i]\\n\",\n \" M.append(self.force*b*x/L)\\n\",\n \" Q.append(self.force*b/L)\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)) \\n\",\n \" for j in range(int(mesh_size*position), mesh_size):\\n\",\n \" x = self.grid[j]\\n\",\n \" M.append(self.force*a*(L - x)/L)\\n\",\n \" Q.append(self.force*(b/L-1))\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)+ self.force*(x-a)**3/(6*self.E*self.I))\\n\",\n \" self.M = np.array(M)\\n\",\n \" self.Q = np.array(Q) \\n\",\n \" self.W = np.array(W)\\n\",\n \" self.maxW_loc = int(np.argmax(np.absolute(self.W)))-1\\n\",\n \" self.maxW = self.W[self.maxW_loc]\\n\",\n \" self.f_position = mesh_size*position\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"3f5f7ee7-819e-4690-b6ec-34f57ce9a3fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class Main(System):\\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"maintest\\\",0)\\n\",\n \" self.add_child(BeamGeo(\\\"geo\\\"))\\n\",\n \" self.add_child(BeamMeca(\\\"meca\\\"))\\n\",\n \" self.connect(self.geo.outwards, self.meca.inwards, [\\\"I\\\", \\\"grid\\\"])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"20ec9af0-99e4-40dc-8ccd-cdade154b36b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"main = Main(\\\"main\\\")\\n\",\n \"main.run_drivers()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"9cad584d-3a0e-4278-95fd-90b216d458a7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\\n\",\n \"import ipyflex\\n\",\n \"import plotly.graph_objects as go\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"d2247985-b5fb-474c-a31c-8cdd8c7178bd\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_M = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.M,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_Q = go.FigureWidget(go.Scatter(\\n\",\n \" y=main.meca.Q ,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_W = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.W,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"), layout_yaxis_range=[-10,0])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"ce89045a-45c3-4409-b1d5-75896ace81db\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"87ad8d18-1628-4a58-89b8-cdde8bae95a1\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"E_slider = ipywidgets.FloatSlider( value=150,\\n\",\n \" min=50,\\n\",\n \" max=250,description='Young modulus:',\\n\",\n \" continuous_update=False,)\\n\",\n \"def on_E_change(change):\\n\",\n \" main.meca.E = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"E_slider.observe(on_E_change, names='value')\\n\",\n \"\\n\",\n \"position_slider = ipywidgets.FloatSlider( value=0.5,\\n\",\n \" min=0.1,\\n\",\n \" max=0.8,\\n\",\n \" continuous_update=False,\\n\",\n \" description='Force position',)\\n\",\n \"def on_position_change(change):\\n\",\n \" main.meca.position = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"position_slider.observe(on_position_change, names='value')\\n\",\n \"control = ipywidgets.VBox([E_slider, position_slider])\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"id\": \"ad86a098-ef40-48eb-b097-27b529ead5be\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_dict = {'Moment': widget_M, 'Deflection': widget_W, 'Shear forces':widget_Q, 'Control': control}\\n\",\n \"w = ipyflex.FlexLayout(widget_dict, \\n\",\n \" template='beam.json',\\n\",\n \" editable=False,\\n\",\n \" header={'title':'Simply supported beam', 'buttons':[]},\\n\",\n \" )\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8c9fd04f-04bc-4cb8-9238-5d343f9be7cf\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 19,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f346a26e591b4efe8ec5db4d26f7d282\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Moment': FigureWidget({\\n\",\n \" 'data': [{'name': 'M',\\n\",\n \" 'type': 'bar',\\n\",\n \" \u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8003d3d4-6513-4480-a379-4e17424118bc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"0f248175-273b-4031-8d59-6536913ac5fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "NVIDIA", "description": "Nvidia stock dashboard", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/stock.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook-grid", "catalog": "Stock dashboard", "id": "2858273a-db6b-415e-8c13-0747775e01a2", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.2', 'ipyflex', 'ipyvuetify==1.8.2', 'ipyvue==1.7.0', 'plotly', 'pandas'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from datetime import datetime\\n\",\n \"import ipyvuetify as v\\n\",\n \"import ipywidgets as ipw\\n\",\n \"from ipyflex import FlexLayout\\n\",\n \"import pandas\\n\",\n \"import json\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class TickerData:\\n\",\n \" def __init__(self, ticker: str) -> None:\\n\",\n \" ticker = ticker.upper()\\n\",\n \" self.fetch_ticker(ticker)\\n\",\n \"\\n\",\n \" def fetch_ticker(self, ticker: str):\\n\",\n \" with open('data.json', 'r') as f:\\n\",\n \" cache = json.load(f)\\n\",\n \" self._cached_data = cache.get(ticker, None)\\n\",\n \" if self._cached_data:\\n\",\n \" self._info = self._cached_data['data']['info']\\n\",\n \" self.news = self._cached_data['data']['news']\\n\",\n \" self._price = pandas.DataFrame.from_dict(self._cached_data['price'])\\n\",\n \" # self._price.index = [datetime.fromtimestamp(int(x)/1000) for x in self._price.index]\\n\",\n \" self._balance_sheet = pandas.DataFrame.from_dict(self._cached_data['balance_sheet'])\\n\",\n \" self._analysis = pandas.DataFrame.from_dict(self._cached_data['analysis'])\\n\",\n \" @property\\n\",\n \" def financial_info(self):\\n\",\n \" data = [\\n\",\n \" {'title': 'Market cap', 'value': self._info['marketCap']},\\n\",\n \" {'title': 'PE Ratio', 'value': self._info['forwardPE']},\\n\",\n \" {'title': 'Total revenue', 'value': self._info['totalRevenue']},\\n\",\n \" {'title': 'Gross profit', 'value': self._info['grossProfits']},\\n\",\n \" {'title': 'Debt to equity', 'value': self._info['debtToEquity']},\\n\",\n \" {'title': 'Profit margin', 'value': self._info['profitMargins']},\\n\",\n \" ]\\n\",\n \" return data\\n\",\n \"\\n\",\n \" def price(self):\\n\",\n \" return self._price\\n\",\n \"\\n\",\n \" @property\\n\",\n \" def balance_sheet(self):\\n\",\n \" return self._balance_sheet\\n\",\n \"\\n\",\n \" @property\\n\",\n \" def analysis(self):\\n\",\n \" return self._analysis.transpose()\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"\\n\",\n \"from typing import Dict, List\\n\",\n \"import plotly.graph_objects as go\\n\",\n \"from plotly.subplots import make_subplots\\n\",\n \"\\n\",\n \"v.theme.dark = True\\n\",\n \"\\n\",\n \"\\n\",\n \"def new_factory(news: List[Dict]) -> v.Html:\\n\",\n \" children = []\\n\",\n \" for new in news:\\n\",\n \" date = datetime.fromtimestamp(new['providerPublishTime'])\\n\",\n \" btn = v.Btn(\\n\",\n \" small=True,\\n\",\n \" text=True,\\n\",\n \" block=True,\\n\",\n \" children=['Open'],\\n\",\n \" href=new['link'],\\n\",\n \" target='_blank',\\n\",\n \" )\\n\",\n \" card = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" children=[new['title']],\\n\",\n \" style_='font-size: 1.1rem',\\n\",\n \" ),\\n\",\n \" v.CardSubtitle(\\n\",\n \" children=[\\n\",\n \" f'{new[\\\"publisher\\\"]} ({date.strftime(\\\"%m/%d/%Y, %H:%M\\\")})'\\n\",\n \" ]\\n\",\n \" ),\\n\",\n \" v.CardActions(children=[btn]),\\n\",\n \" ],\\n\",\n \" )\\n\",\n \" children.append(card)\\n\",\n \" return v.Html(tag='div', class_='d-flex flex-column', children=children)\\n\",\n \"\\n\",\n \"\\n\",\n \"def financial_info_factory(data: List[Dict], logo_url: str = None) -> v.Html:\\n\",\n \" children = []\\n\",\n \" if logo_url is not None:\\n\",\n \" logo = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" class_='ma-1',\\n\",\n \" children=[v.Img(src=logo_url, height='100px', contain=True)],\\n\",\n \" style_='width: calc(14.28% - 8px); min-width: 150px',\\n\",\n \" )\\n\",\n \" children.append(logo)\\n\",\n \"\\n\",\n \" for item in data:\\n\",\n \" card = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" class_='ma-1',\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" primary_title=True,\\n\",\n \" children=[item['title']],\\n\",\n \" style_='font-size: 18px; color: #51ef98',\\n\",\n \" ),\\n\",\n \" v.CardText(children=[str(item['value'])]),\\n\",\n \" ],\\n\",\n \" style_='width: calc(14.28% - 8px); min-width: 150px',\\n\",\n \" )\\n\",\n \" children.append(card)\\n\",\n \" return v.Html(\\n\",\n \" tag='div',\\n\",\n \" class_='d-flex flex-row',\\n\",\n \" children=children,\\n\",\n \" style_='flex-wrap: wrap',\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def price_chart_factory(df: List, ticker: str = '') -> ipw.Widget:\\n\",\n \" # Create figure with secondary y-axis\\n\",\n \" fig = make_subplots(specs=[[{'secondary_y': True}]])\\n\",\n \" index = [datetime.fromtimestamp(int(x)/1000).strftime('%m/%d') for x in df.index]\\n\",\n \" # include candlestick with rangeselector\\n\",\n \" fig.add_trace(\\n\",\n \" go.Candlestick(\\n\",\n \" x=index,\\n\",\n \" open=df['Open'],\\n\",\n \" high=df['High'],\\n\",\n \" low=df['Low'],\\n\",\n \" close=df['Close'],\\n\",\n \" name='OHLC',\\n\",\n \" ),\\n\",\n \" secondary_y=True,\\n\",\n \" )\\n\",\n \" fig.add_trace(\\n\",\n \" go.Bar(\\n\",\n \" x=index,\\n\",\n \" y=df['Volume'],\\n\",\n \" marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='Volume',\\n\",\n \" ),\\n\",\n \" secondary_y=False,\\n\",\n \" )\\n\",\n \"\\n\",\n \" fig.layout.yaxis2.showgrid = False\\n\",\n \" fig.update_layout(\\n\",\n \" autosize=True,\\n\",\n \" xaxis_rangeslider_visible=False,\\n\",\n \" template='plotly_dark',\\n\",\n \" title={\\n\",\n \" 'text': f'{ticker.upper()} PRICE CHART',\\n\",\n \" 'xanchor': 'center',\\n\",\n \" 'yanchor': 'top',\\n\",\n \" 'x': 0.5,\\n\",\n \" },\\n\",\n \" )\\n\",\n \" widget = go.FigureWidget(fig, layout=ipw.Layout(height='100%'))\\n\",\n \" return widget\\n\",\n \"\\n\",\n \"\\n\",\n \"def price_history_factory(df: List, ticker: str = '') -> ipw.Widget:\\n\",\n \" # include candlestick with rangeselector\\n\",\n \" index = [datetime.fromtimestamp(int(x)/1000).strftime('%m/%d') for x in df.index]\\n\",\n \" widget = go.FigureWidget(go.Scatter(x=index, y=df['Close']))\\n\",\n \" widget.update_layout(\\n\",\n \" autosize=True,\\n\",\n \" template='plotly_dark',\\n\",\n \" title={\\n\",\n \" 'text': f'{ticker.upper()} PRICE HISTORY',\\n\",\n \" 'xanchor': 'center',\\n\",\n \" 'yanchor': 'top',\\n\",\n \" 'x': 0.5,\\n\",\n \" },\\n\",\n \" )\\n\",\n \" return widget\\n\",\n \"\\n\",\n \"\\n\",\n \"def text_widget(title: str, text: str) -> ipw.Widget:\\n\",\n \" return v.Card(\\n\",\n \" outlined=True,\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" children=[title],\\n\",\n \" style_='font-size: 1.1rem',\\n\",\n \" ),\\n\",\n \" v.CardText(children=[text]),\\n\",\n \" ],\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def balance_sheet_factory(df) -> ipw.Widget:\\n\",\n \" items = []\\n\",\n \" for i in range(df.shape[0]):\\n\",\n \" row = df.iloc[i]\\n\",\n \" item = {'name': row.name}\\n\",\n \" item.update(json.loads(row.to_json()))\\n\",\n \" items.append(item)\\n\",\n \" titles = [x for x in items[0].keys() if x != 'name']\\n\",\n \" headers = [\\n\",\n \" {\\n\",\n \" 'text': 'Property',\\n\",\n \" 'align': 'start',\\n\",\n \" 'sortable': False,\\n\",\n \" 'value': 'name',\\n\",\n \" }\\n\",\n \" ]\\n\",\n \" for title in titles:\\n\",\n \" date = datetime.fromtimestamp(int(title) / 1000)\\n\",\n \" header = {'text': date.strftime('%m/%d/%Y, %H:%M'), 'value': title}\\n\",\n \" headers.append(header)\\n\",\n \" return v.DataTable(\\n\",\n \" headers=headers,\\n\",\n \" items=items,\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def analysis_factory(df) -> ipw.Widget:\\n\",\n \" items = []\\n\",\n \" for i in range(df.shape[0]):\\n\",\n \" row = df.iloc[i]\\n\",\n \" item = {'name': row.name}\\n\",\n \" item.update(json.loads(row.to_json()))\\n\",\n \" items.append(item)\\n\",\n \" titles = [x for x in items[0].keys() if x != 'name']\\n\",\n \" headers = [\\n\",\n \" {\\n\",\n \" 'text': 'Property',\\n\",\n \" 'align': 'start',\\n\",\n \" 'sortable': False,\\n\",\n \" 'value': 'name',\\n\",\n \" }\\n\",\n \" ]\\n\",\n \" for title in titles:\\n\",\n \" header = {'text': title, 'value': title}\\n\",\n \" headers.append(header)\\n\",\n \" return v.DataTable(\\n\",\n \" headers=headers,\\n\",\n \" items=items,\\n\",\n \" )\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"editable = False\\n\",\n \"height = \\\"900px\\\"\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"ticker_name = \\\"NVDA\\\"\\n\",\n \"ticker = TickerData(ticker_name)\\n\",\n \"news = new_factory(ticker.news)\\n\",\n \"info = financial_info_factory(ticker.financial_info, ticker._info[\\\"logo_url\\\"])\\n\",\n \"price = price_chart_factory(ticker.price(), ticker_name)\\n\",\n \"history = price_history_factory(ticker.price(), ticker_name)\\n\",\n \"summary = text_widget(\\\"Business Summary \\\", ticker._info[\\\"longBusinessSummary\\\"])\\n\",\n \"balance_sheet = balance_sheet_factory(ticker.balance_sheet)\\n\",\n \"analysis = analysis_factory(ticker.analysis)\\n\",\n \"widgets = {\\n\",\n \" \\\"news\\\": news,\\n\",\n \" \\\"info\\\": info,\\n\",\n \" \\\"price\\\": price,\\n\",\n \" \\\"history\\\": history,\\n\",\n \" \\\"summary\\\": summary,\\n\",\n \" \\\"balance_sheet\\\": balance_sheet,\\n\",\n \" \\\"analysis\\\": analysis\\n\",\n \"}\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"w = FlexLayout(\\n\",\n \" widgets,\\n\",\n \" style={\\\"height\\\": height},\\n\",\n \" header={\\\"title\\\": \\\"STOCK DASHBOAD\\\", \\\"style\\\": {\\\"backgroundColor\\\": \\\"rgb(53 53 53)\\\"}, \\\"buttons\\\":[\\\"export\\\",\\\"import\\\"]},\\n\",\n \" template=\\\"ticker2.json\\\",\\n\",\n \" editable=False,\\n\",\n \")\\n\",\n \"style = ipw.HTML(\\\"\\\"\\\" \\\"\\\"\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 24,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"}, {"title": "Dashboard example", "description": "Example of opening a notebook in dashboard mode without Voila", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook-grid", "id": "7f2ef0d8-370e-4824-a0c4-66c41e42046f", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"a8da280e-cebd-4762-9d73-d60225f6c79c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'ipyleaflet'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"e5cf8261-0e2e-4a78-8366-40cc62ede883\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"d87541d9-58d8-4a42-9922-edbdfb90518c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 2,\n \"hidden\": false,\n \"locked\": false,\n \"row\": 17,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"79ea1c75d95b4f0e98705fd10316a4b1\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"37d51c24-4f21-4089-8c62-f96ecefaf8fc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 6,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f5bcf49ac33d4679a455aff9bd9bfeae\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"from ipyleaflet import Map, basemaps, basemap_to_tiles\\n\",\n \"\\n\",\n \"m = Map(\\n\",\n \" basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \\\"2017-04-08\\\"),\\n\",\n \" center=(52.204793, 360.121558),\\n\",\n \" zoom=4\\n\",\n \")\\n\",\n \"\\n\",\n \"m\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"59e16c67-d06e-4caf-89c1-d7a6addb3589\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 4,\n \"height\": 3,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 18,\n \"width\": 5\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"8ae2f3d26cd541a2bc6acbbd214532fc\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"b7c5a2c3-5686-40b8-9d86-1c0325d9117d\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 3,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"# Render a notebook as dashboard without Voila!\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"add0b305-71da-4e4e-9026-65af5ba3614b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipyflex\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"0f31e190-31cd-481e-bd7a-1b4ef9285a23\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"509f4ab165614f4792f2423d88a4db72\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Widget 1': HTML(value='Widget 1
'), 'Widget 2': HTML(value='Widget 2
'),\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"widgets = {\\n\",\n \" 'Widget 1' : ipywidgets.HTML('Widget 1
'),\\n\",\n \" 'Widget 2' : ipywidgets.HTML('Widget 2
'),\\n\",\n \" 'Widget 3' : ipywidgets.HTML('Widget 3
'),\\n\",\n \" 'Widget 4' : ipywidgets.HTML('Widget 4
')\\n\",\n \"}\\n\",\n \"\\n\",\n \"ipyflex.FlexLayout(widgets, style={'height':'400px'}, template='./layout.json', editable=False, header=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"09809959-7398-42db-a20d-6097a06b0072\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.13\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "Notebook example", "description": "Example of opening a notebook in dashboard mode without Voila", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook", "id": "72269c0b-32ec-462b-8f42-2f1a5a7b2f00", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"a8da280e-cebd-4762-9d73-d60225f6c79c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'ipyleaflet'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"e5cf8261-0e2e-4a78-8366-40cc62ede883\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"d87541d9-58d8-4a42-9922-edbdfb90518c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 2,\n \"hidden\": false,\n \"locked\": false,\n \"row\": 17,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"79ea1c75d95b4f0e98705fd10316a4b1\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"37d51c24-4f21-4089-8c62-f96ecefaf8fc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 6,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f5bcf49ac33d4679a455aff9bd9bfeae\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"from ipyleaflet import Map, basemaps, basemap_to_tiles\\n\",\n \"\\n\",\n \"m = Map(\\n\",\n \" basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \\\"2017-04-08\\\"),\\n\",\n \" center=(52.204793, 360.121558),\\n\",\n \" zoom=4\\n\",\n \")\\n\",\n \"\\n\",\n \"m\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"59e16c67-d06e-4caf-89c1-d7a6addb3589\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 4,\n \"height\": 3,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 18,\n \"width\": 5\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"8ae2f3d26cd541a2bc6acbbd214532fc\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"b7c5a2c3-5686-40b8-9d86-1c0325d9117d\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 3,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"# Render a notebook as dashboard without Voila!\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"add0b305-71da-4e4e-9026-65af5ba3614b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipyflex\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"0f31e190-31cd-481e-bd7a-1b4ef9285a23\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"509f4ab165614f4792f2423d88a4db72\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Widget 1': HTML(value='Widget 1
'), 'Widget 2': HTML(value='Widget 2
'),\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"widgets = {\\n\",\n \" 'Widget 1' : ipywidgets.HTML('Widget 1
'),\\n\",\n \" 'Widget 2' : ipywidgets.HTML('Widget 2
'),\\n\",\n \" 'Widget 3' : ipywidgets.HTML('Widget 3
'),\\n\",\n \" 'Widget 4' : ipywidgets.HTML('Widget 4
')\\n\",\n \"}\\n\",\n \"\\n\",\n \"ipyflex.FlexLayout(widgets, style={'height':'400px'}, template='./layout.json', editable=False, header=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"09809959-7398-42db-a20d-6097a06b0072\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.13\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "URL example", "description": "Example of opening a URL in a tab", "source": "https://jupyterlab.readthedocs.io/en/stable/", "type": "url", "args": {"sandbox": ["allow-same-origin", "allow-scripts", "allow-downloads", "allow-modals", "allow-popups"]}, "id": "bd6af339-fe66-4f02-a510-f49d15a905a4", "sourceCode": null}, {"title": "Markdown example", "description": "Example of opening a Markdown file in a tab", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.md", "type": "markdown", "id": "40a03390-8062-400f-a946-caa86b32ae19", "sourceCode": "# Hello world\n\n## Foo\n\n### Bar\n\nTo insert a mathematical formula we use the dollar symbol $, as follows:\n\nEuler's identity: $ e^{i \\pi} + 1 = 0 $\n\nTo isolate and center the formulas and enter in math display mode, we use 2 dollars symbol:\n\n$$\n...\n$$\n\nEuler's identity: $$ e^{i \\pi} + 1 = 0 $$\n"}]}}
\ No newline at end of file
+{"appLauncherData": {"config": [{"title": "Simply supported beam theory", "description": "Simply supported beam computation", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.md", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "markdown", "catalog": "Simply supported beam computation", "id": "85384ba1-60a0-4170-8cf6-d5f6715b64c1", "sourceCode": "Simple beam modeling
\n\n
\n
\n\n## Theory\n\nThis model is based on classical Solid Mechanics and Strenght of Materials results to solve the beam equilibirum problem. A simple outline follows in the present section, without entering in any mathematical derivations.\n\n- **Reaction computation** - This model does not allow axial loads, currently. Therefore, depending on the support type, one shall need to compute a either a transverse reaction force or a reaction moment. These are computed by solving the algebraic system of linear equations arising from the equilibirum of forces and moments of the structure, accounting simultaneously for point loads and moments and distributed forces.\n\n$$\n\\sum F_y = 0 \\qquad \\sum M_O = 0\n$$\n\n- **Bending diagrams** - the shear force and bending moment diagrams are computed by integrating the differential equations of equilibirum of the beam and imposing the boundary conditions in a sequential manner, starting from the initial point at `x0`. The expressions obtained at the previous segment are used to set the boundary conditions for the next one.\n\n\n$$\n\\frac{\\\\text{d}V}{\\text{d}x} = -q(x) \\qquad \\frac{\\text{d}M}{\\text{d}x} = -V(x)\n$$\n
\n\n- **Deflection** - the slope and deflection of the beam are obtained by integration the elastic curve equation in each segment one and two times, respectively. The geometrical boundary conditions are used to build a system of algebraic equations for the integration constants (twice the number of segments).\n\n\n$$\n\\frac{\\text{d}^2v}{\\text{d}x^2} = \\frac{M}{EI}\n$$\n
\n"}, {"title": "Simulation Dashboard", "description": "Simply supported beam computation", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook-grid", "catalog": "Simply supported beam computation", "id": "02431ee2-a73e-4c7d-a5b8-23e643d53cde", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"026a49a0-a0a2-41c5-95ec-0c6d8a7077d7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 3,\n \"height\": 6,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 358,\n \"width\": 9\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"Simple beam modeling
\\n\",\n \"\\n\",\n \"
\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b132a882-6f77-46ae-a371-1acaa75d8dda\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'plotly', 'cosapp'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"01ddcc7d-6223-4296-9884-3a9bcb19bd7a\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from cosapp.ports import Port\\n\",\n \"from cosapp.systems import System\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"class GeometryPort(Port):\\n\",\n \" def setup(self):\\n\",\n \" self.add_variable(\\\"visible\\\", True, desc=\\\"Should this geometry be shown?\\\")\\n\",\n \" self.add_variable(\\\"shape\\\", None, desc=\\\"Geometrical object\\\")\\n\",\n \"class BeamGeo(System):\\n\",\n \" \\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"file\\\",\\\"path\\\")\\n\",\n \" self.add_inward(\\\"mesh_size\\\",100)\\n\",\n \" self.add_inward('width', 0.5, unit = 'm')\\n\",\n \" self.add_inward('height',0.5, unit = 'm')\\n\",\n \" self.add_inward('length', 5., unit = 'm')\\n\",\n \" self.add_outward('I', desc='Second area moment')\\n\",\n \" self.add_outward('grid', np.zeros(1))\\n\",\n \" self.add_outward(\\\"section\\\", [])\\n\",\n \" self.add_output(GeometryPort, 'geom')\\n\",\n \" def compute(self):\\n\",\n \" self.I = self.width*self.height**3/12.\\n\",\n \" self.grid = np.array([i*self.length/self.mesh_size for i in range(0,int(self.mesh_size)+1)])\\n\",\n \" section = [[],[]]\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((- 0.5 + i/100.)*self.width)\\n\",\n \" section[1].append(-0.5*self.height)\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append(0.5*self.width)\\n\",\n \" section[1].append((- 0.5 + i/100.)*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((0.5 - i/100.)*self.width)\\n\",\n \" section[1].append(0.5*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append( -0.5*self.width)\\n\",\n \" section[1].append((0.5 - i/100.)*self.height) \\n\",\n \" self.section = section\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"5cc948e4-115b-459b-80fc-b24d8546b426\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class BeamMeca(System):\\n\",\n \" def setup(self):\\n\",\n \" \\n\",\n \" self.add_inward('E', 270, desc = \\\"Young modulus\\\", valid_range = [100,150],limits = [50,200])\\n\",\n \" self.add_inward(\\\"grid\\\", np.zeros(101), valid_range = [2,4],limits = [-np.inf,10] )\\n\",\n \" self.add_inward(\\\"I\\\", 1., desc='Second area moment' )\\n\",\n \" self.add_inward(\\\"force\\\", -1., desc='Force value', unit = 'N' )\\n\",\n \" self.add_inward(\\\"position\\\", 0.5, desc=\\\"force relative position\\\",limits= [0.2,0.3], valid_range = [0.1,0.8] )\\n\",\n \" self.add_outward(\\\"M\\\", np.zeros(1), desc = \\\"Bending moments\\\" )\\n\",\n \" self.add_outward(\\\"Q\\\", np.zeros(1), desc = \\\"Shear forces\\\" )\\n\",\n \" self.add_outward(\\\"W\\\", np.zeros(1), desc = \\\"Deflections\\\" )\\n\",\n \" self.add_outward(\\\"maxW\\\", 0, desc = \\\"Max deflections\\\" )\\n\",\n \" self.add_outward(\\\"f_position\\\", 0.5, desc=\\\"force position\\\")\\n\",\n \" self.add_outward(\\\"maxW_loc\\\", 0, desc = \\\"Max deflections location\\\" )\\n\",\n \" def compute(self):\\n\",\n \" if self.position > 1.:\\n\",\n \" position = 0.99\\n\",\n \" elif self.position < 0:\\n\",\n \" position = 0.\\n\",\n \" else:\\n\",\n \" position = self.position\\n\",\n \" mesh_size = len(self.grid)\\n\",\n \" L = self.grid[-1]\\n\",\n \" b = (1.- position)*L\\n\",\n \" a = position*L\\n\",\n \" M =[]\\n\",\n \" Q = []\\n\",\n \" W = []\\n\",\n \" for i in range(0, int(mesh_size*position)):\\n\",\n \" x = self.grid[i]\\n\",\n \" M.append(self.force*b*x/L)\\n\",\n \" Q.append(self.force*b/L)\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)) \\n\",\n \" for j in range(int(mesh_size*position), mesh_size):\\n\",\n \" x = self.grid[j]\\n\",\n \" M.append(self.force*a*(L - x)/L)\\n\",\n \" Q.append(self.force*(b/L-1))\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)+ self.force*(x-a)**3/(6*self.E*self.I))\\n\",\n \" self.M = np.array(M)\\n\",\n \" self.Q = np.array(Q) \\n\",\n \" self.W = np.array(W)\\n\",\n \" self.maxW_loc = int(np.argmax(np.absolute(self.W)))-1\\n\",\n \" self.maxW = self.W[self.maxW_loc]\\n\",\n \" self.f_position = mesh_size*position\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"3f5f7ee7-819e-4690-b6ec-34f57ce9a3fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class Main(System):\\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"maintest\\\",0)\\n\",\n \" self.add_child(BeamGeo(\\\"geo\\\"))\\n\",\n \" self.add_child(BeamMeca(\\\"meca\\\"))\\n\",\n \" self.connect(self.geo.outwards, self.meca.inwards, [\\\"I\\\", \\\"grid\\\"])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"20ec9af0-99e4-40dc-8ccd-cdade154b36b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"main = Main(\\\"main\\\")\\n\",\n \"main.run_drivers()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"9cad584d-3a0e-4278-95fd-90b216d458a7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\\n\",\n \"import ipyflex\\n\",\n \"import plotly.graph_objects as go\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"d2247985-b5fb-474c-a31c-8cdd8c7178bd\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_M = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.M,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_Q = go.FigureWidget(go.Scatter(\\n\",\n \" y=main.meca.Q ,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_W = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.W,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"), layout_yaxis_range=[-10,0])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"ce89045a-45c3-4409-b1d5-75896ace81db\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"87ad8d18-1628-4a58-89b8-cdde8bae95a1\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"E_slider = ipywidgets.FloatSlider( value=150,\\n\",\n \" min=50,\\n\",\n \" max=250,description='Young modulus:',\\n\",\n \" continuous_update=False,)\\n\",\n \"def on_E_change(change):\\n\",\n \" main.meca.E = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"E_slider.observe(on_E_change, names='value')\\n\",\n \"\\n\",\n \"position_slider = ipywidgets.FloatSlider( value=0.5,\\n\",\n \" min=0.1,\\n\",\n \" max=0.8,\\n\",\n \" continuous_update=False,\\n\",\n \" description='Force position',)\\n\",\n \"def on_position_change(change):\\n\",\n \" main.meca.position = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"position_slider.observe(on_position_change, names='value')\\n\",\n \"control = ipywidgets.VBox([E_slider, position_slider])\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"id\": \"ad86a098-ef40-48eb-b097-27b529ead5be\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_dict = {'Moment': widget_M, 'Deflection': widget_W, 'Shear forces':widget_Q, 'Control': control}\\n\",\n \"w = ipyflex.FlexLayout(widget_dict, \\n\",\n \" template='beam.json',\\n\",\n \" editable=False,\\n\",\n \" header={'title':'Simply supported beam', 'buttons':[]},\\n\",\n \" )\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8c9fd04f-04bc-4cb8-9238-5d343f9be7cf\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 19,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f346a26e591b4efe8ec5db4d26f7d282\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Moment': FigureWidget({\\n\",\n \" 'data': [{'name': 'M',\\n\",\n \" 'type': 'bar',\\n\",\n \" \u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8003d3d4-6513-4480-a379-4e17424118bc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"0f248175-273b-4031-8d59-6536913ac5fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "Simulation Notebook", "description": "Simply supported beam computation", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/beam.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook", "catalog": "Simply supported beam computation", "id": "d6ec1749-ec27-4e57-9e94-68050c1df47f", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"markdown\",\n \"id\": \"026a49a0-a0a2-41c5-95ec-0c6d8a7077d7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 3,\n \"height\": 6,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 358,\n \"width\": 9\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"Simple beam modeling
\\n\",\n \"\\n\",\n \"
\\n\",\n \"
\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"b132a882-6f77-46ae-a371-1acaa75d8dda\",\n \"metadata\": {},\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'plotly', 'cosapp'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"01ddcc7d-6223-4296-9884-3a9bcb19bd7a\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from cosapp.ports import Port\\n\",\n \"from cosapp.systems import System\\n\",\n \"import numpy as np\\n\",\n \"\\n\",\n \"class GeometryPort(Port):\\n\",\n \" def setup(self):\\n\",\n \" self.add_variable(\\\"visible\\\", True, desc=\\\"Should this geometry be shown?\\\")\\n\",\n \" self.add_variable(\\\"shape\\\", None, desc=\\\"Geometrical object\\\")\\n\",\n \"class BeamGeo(System):\\n\",\n \" \\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"file\\\",\\\"path\\\")\\n\",\n \" self.add_inward(\\\"mesh_size\\\",100)\\n\",\n \" self.add_inward('width', 0.5, unit = 'm')\\n\",\n \" self.add_inward('height',0.5, unit = 'm')\\n\",\n \" self.add_inward('length', 5., unit = 'm')\\n\",\n \" self.add_outward('I', desc='Second area moment')\\n\",\n \" self.add_outward('grid', np.zeros(1))\\n\",\n \" self.add_outward(\\\"section\\\", [])\\n\",\n \" self.add_output(GeometryPort, 'geom')\\n\",\n \" def compute(self):\\n\",\n \" self.I = self.width*self.height**3/12.\\n\",\n \" self.grid = np.array([i*self.length/self.mesh_size for i in range(0,int(self.mesh_size)+1)])\\n\",\n \" section = [[],[]]\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((- 0.5 + i/100.)*self.width)\\n\",\n \" section[1].append(-0.5*self.height)\\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append(0.5*self.width)\\n\",\n \" section[1].append((- 0.5 + i/100.)*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append((0.5 - i/100.)*self.width)\\n\",\n \" section[1].append(0.5*self.height) \\n\",\n \" for i in range(0,100):\\n\",\n \" section[0].append( -0.5*self.width)\\n\",\n \" section[1].append((0.5 - i/100.)*self.height) \\n\",\n \" self.section = section\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"5cc948e4-115b-459b-80fc-b24d8546b426\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class BeamMeca(System):\\n\",\n \" def setup(self):\\n\",\n \" \\n\",\n \" self.add_inward('E', 270, desc = \\\"Young modulus\\\", valid_range = [100,150],limits = [50,200])\\n\",\n \" self.add_inward(\\\"grid\\\", np.zeros(101), valid_range = [2,4],limits = [-np.inf,10] )\\n\",\n \" self.add_inward(\\\"I\\\", 1., desc='Second area moment' )\\n\",\n \" self.add_inward(\\\"force\\\", -1., desc='Force value', unit = 'N' )\\n\",\n \" self.add_inward(\\\"position\\\", 0.5, desc=\\\"force relative position\\\",limits= [0.2,0.3], valid_range = [0.1,0.8] )\\n\",\n \" self.add_outward(\\\"M\\\", np.zeros(1), desc = \\\"Bending moments\\\" )\\n\",\n \" self.add_outward(\\\"Q\\\", np.zeros(1), desc = \\\"Shear forces\\\" )\\n\",\n \" self.add_outward(\\\"W\\\", np.zeros(1), desc = \\\"Deflections\\\" )\\n\",\n \" self.add_outward(\\\"maxW\\\", 0, desc = \\\"Max deflections\\\" )\\n\",\n \" self.add_outward(\\\"f_position\\\", 0.5, desc=\\\"force position\\\")\\n\",\n \" self.add_outward(\\\"maxW_loc\\\", 0, desc = \\\"Max deflections location\\\" )\\n\",\n \" def compute(self):\\n\",\n \" if self.position > 1.:\\n\",\n \" position = 0.99\\n\",\n \" elif self.position < 0:\\n\",\n \" position = 0.\\n\",\n \" else:\\n\",\n \" position = self.position\\n\",\n \" mesh_size = len(self.grid)\\n\",\n \" L = self.grid[-1]\\n\",\n \" b = (1.- position)*L\\n\",\n \" a = position*L\\n\",\n \" M =[]\\n\",\n \" Q = []\\n\",\n \" W = []\\n\",\n \" for i in range(0, int(mesh_size*position)):\\n\",\n \" x = self.grid[i]\\n\",\n \" M.append(self.force*b*x/L)\\n\",\n \" Q.append(self.force*b/L)\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)) \\n\",\n \" for j in range(int(mesh_size*position), mesh_size):\\n\",\n \" x = self.grid[j]\\n\",\n \" M.append(self.force*a*(L - x)/L)\\n\",\n \" Q.append(self.force*(b/L-1))\\n\",\n \" W.append(self.force*b*x*(L**2 - b**2 - x**2)/(6*L*self.E*self.I)+ self.force*(x-a)**3/(6*self.E*self.I))\\n\",\n \" self.M = np.array(M)\\n\",\n \" self.Q = np.array(Q) \\n\",\n \" self.W = np.array(W)\\n\",\n \" self.maxW_loc = int(np.argmax(np.absolute(self.W)))-1\\n\",\n \" self.maxW = self.W[self.maxW_loc]\\n\",\n \" self.f_position = mesh_size*position\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"3f5f7ee7-819e-4690-b6ec-34f57ce9a3fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class Main(System):\\n\",\n \" def setup(self):\\n\",\n \" self.add_inward(\\\"maintest\\\",0)\\n\",\n \" self.add_child(BeamGeo(\\\"geo\\\"))\\n\",\n \" self.add_child(BeamMeca(\\\"meca\\\"))\\n\",\n \" self.connect(self.geo.outwards, self.meca.inwards, [\\\"I\\\", \\\"grid\\\"])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"20ec9af0-99e4-40dc-8ccd-cdade154b36b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"main = Main(\\\"main\\\")\\n\",\n \"main.run_drivers()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"9cad584d-3a0e-4278-95fd-90b216d458a7\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\\n\",\n \"import ipyflex\\n\",\n \"import plotly.graph_objects as go\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"d2247985-b5fb-474c-a31c-8cdd8c7178bd\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_M = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.M,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_Q = go.FigureWidget(go.Scatter(\\n\",\n \" y=main.meca.Q ,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"))\\n\",\n \"widget_W = go.FigureWidget(go.Bar(\\n\",\n \" y=main.meca.W,\\n\",\n \" # marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='M',\\n\",\n \"), layout_yaxis_range=[-10,0])\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"ce89045a-45c3-4409-b1d5-75896ace81db\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"87ad8d18-1628-4a58-89b8-cdde8bae95a1\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"E_slider = ipywidgets.FloatSlider( value=150,\\n\",\n \" min=50,\\n\",\n \" max=250,description='Young modulus:',\\n\",\n \" continuous_update=False,)\\n\",\n \"def on_E_change(change):\\n\",\n \" main.meca.E = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"E_slider.observe(on_E_change, names='value')\\n\",\n \"\\n\",\n \"position_slider = ipywidgets.FloatSlider( value=0.5,\\n\",\n \" min=0.1,\\n\",\n \" max=0.8,\\n\",\n \" continuous_update=False,\\n\",\n \" description='Force position',)\\n\",\n \"def on_position_change(change):\\n\",\n \" main.meca.position = change['new']\\n\",\n \" main.run_drivers()\\n\",\n \" widget_M.data[0].y = main.meca.M\\n\",\n \" widget_Q.data[0].y = main.meca.Q\\n\",\n \" widget_W.data[0].y = main.meca.W\\n\",\n \"position_slider.observe(on_position_change, names='value')\\n\",\n \"control = ipywidgets.VBox([E_slider, position_slider])\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 8,\n \"id\": \"ad86a098-ef40-48eb-b097-27b529ead5be\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"widget_dict = {'Moment': widget_M, 'Deflection': widget_W, 'Shear forces':widget_Q, 'Control': control}\\n\",\n \"w = ipyflex.FlexLayout(widget_dict, \\n\",\n \" template='beam.json',\\n\",\n \" editable=False,\\n\",\n \" header={'title':'Simply supported beam', 'buttons':[]},\\n\",\n \" )\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8c9fd04f-04bc-4cb8-9238-5d343f9be7cf\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 19,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f346a26e591b4efe8ec5db4d26f7d282\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Moment': FigureWidget({\\n\",\n \" 'data': [{'name': 'M',\\n\",\n \" 'type': 'bar',\\n\",\n \" \u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"8003d3d4-6513-4480-a379-4e17424118bc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 9,\n \"id\": \"0f248175-273b-4031-8d59-6536913ac5fb\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "NVIDIA", "description": "Nvidia stock dashboard", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/stock.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook-grid", "catalog": "Stock dashboard", "id": "db023441-3dff-487f-b447-8abe6cc9b35d", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.2', 'ipyflex', 'ipyvuetify==1.8.2', 'ipyvue==1.7.0', 'plotly', 'pandas'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"from datetime import datetime\\n\",\n \"import ipyvuetify as v\\n\",\n \"import ipywidgets as ipw\\n\",\n \"from ipyflex import FlexLayout\\n\",\n \"import pandas\\n\",\n \"import json\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"class TickerData:\\n\",\n \" def __init__(self, ticker: str) -> None:\\n\",\n \" ticker = ticker.upper()\\n\",\n \" self.fetch_ticker(ticker)\\n\",\n \"\\n\",\n \" def fetch_ticker(self, ticker: str):\\n\",\n \" with open('data.json', 'r') as f:\\n\",\n \" cache = json.load(f)\\n\",\n \" self._cached_data = cache.get(ticker, None)\\n\",\n \" if self._cached_data:\\n\",\n \" self._info = self._cached_data['data']['info']\\n\",\n \" self.news = self._cached_data['data']['news']\\n\",\n \" self._price = pandas.DataFrame.from_dict(self._cached_data['price'])\\n\",\n \" # self._price.index = [datetime.fromtimestamp(int(x)/1000) for x in self._price.index]\\n\",\n \" self._balance_sheet = pandas.DataFrame.from_dict(self._cached_data['balance_sheet'])\\n\",\n \" self._analysis = pandas.DataFrame.from_dict(self._cached_data['analysis'])\\n\",\n \" @property\\n\",\n \" def financial_info(self):\\n\",\n \" data = [\\n\",\n \" {'title': 'Market cap', 'value': self._info['marketCap']},\\n\",\n \" {'title': 'PE Ratio', 'value': self._info['forwardPE']},\\n\",\n \" {'title': 'Total revenue', 'value': self._info['totalRevenue']},\\n\",\n \" {'title': 'Gross profit', 'value': self._info['grossProfits']},\\n\",\n \" {'title': 'Debt to equity', 'value': self._info['debtToEquity']},\\n\",\n \" {'title': 'Profit margin', 'value': self._info['profitMargins']},\\n\",\n \" ]\\n\",\n \" return data\\n\",\n \"\\n\",\n \" def price(self):\\n\",\n \" return self._price\\n\",\n \"\\n\",\n \" @property\\n\",\n \" def balance_sheet(self):\\n\",\n \" return self._balance_sheet\\n\",\n \"\\n\",\n \" @property\\n\",\n \" def analysis(self):\\n\",\n \" return self._analysis.transpose()\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"\\n\",\n \"from typing import Dict, List\\n\",\n \"import plotly.graph_objects as go\\n\",\n \"from plotly.subplots import make_subplots\\n\",\n \"\\n\",\n \"v.theme.dark = True\\n\",\n \"\\n\",\n \"\\n\",\n \"def new_factory(news: List[Dict]) -> v.Html:\\n\",\n \" children = []\\n\",\n \" for new in news:\\n\",\n \" date = datetime.fromtimestamp(new['providerPublishTime'])\\n\",\n \" btn = v.Btn(\\n\",\n \" small=True,\\n\",\n \" text=True,\\n\",\n \" block=True,\\n\",\n \" children=['Open'],\\n\",\n \" href=new['link'],\\n\",\n \" target='_blank',\\n\",\n \" )\\n\",\n \" card = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" children=[new['title']],\\n\",\n \" style_='font-size: 1.1rem',\\n\",\n \" ),\\n\",\n \" v.CardSubtitle(\\n\",\n \" children=[\\n\",\n \" f'{new[\\\"publisher\\\"]} ({date.strftime(\\\"%m/%d/%Y, %H:%M\\\")})'\\n\",\n \" ]\\n\",\n \" ),\\n\",\n \" v.CardActions(children=[btn]),\\n\",\n \" ],\\n\",\n \" )\\n\",\n \" children.append(card)\\n\",\n \" return v.Html(tag='div', class_='d-flex flex-column', children=children)\\n\",\n \"\\n\",\n \"\\n\",\n \"def financial_info_factory(data: List[Dict], logo_url: str = None) -> v.Html:\\n\",\n \" children = []\\n\",\n \" if logo_url is not None:\\n\",\n \" logo = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" class_='ma-1',\\n\",\n \" children=[v.Img(src=logo_url, height='100px', contain=True)],\\n\",\n \" style_='width: calc(14.28% - 8px); min-width: 150px',\\n\",\n \" )\\n\",\n \" children.append(logo)\\n\",\n \"\\n\",\n \" for item in data:\\n\",\n \" card = v.Card(\\n\",\n \" outlined=True,\\n\",\n \" class_='ma-1',\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" primary_title=True,\\n\",\n \" children=[item['title']],\\n\",\n \" style_='font-size: 18px; color: #51ef98',\\n\",\n \" ),\\n\",\n \" v.CardText(children=[str(item['value'])]),\\n\",\n \" ],\\n\",\n \" style_='width: calc(14.28% - 8px); min-width: 150px',\\n\",\n \" )\\n\",\n \" children.append(card)\\n\",\n \" return v.Html(\\n\",\n \" tag='div',\\n\",\n \" class_='d-flex flex-row',\\n\",\n \" children=children,\\n\",\n \" style_='flex-wrap: wrap',\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def price_chart_factory(df: List, ticker: str = '') -> ipw.Widget:\\n\",\n \" # Create figure with secondary y-axis\\n\",\n \" fig = make_subplots(specs=[[{'secondary_y': True}]])\\n\",\n \" index = [datetime.fromtimestamp(int(x)/1000).strftime('%m/%d') for x in df.index]\\n\",\n \" # include candlestick with rangeselector\\n\",\n \" fig.add_trace(\\n\",\n \" go.Candlestick(\\n\",\n \" x=index,\\n\",\n \" open=df['Open'],\\n\",\n \" high=df['High'],\\n\",\n \" low=df['Low'],\\n\",\n \" close=df['Close'],\\n\",\n \" name='OHLC',\\n\",\n \" ),\\n\",\n \" secondary_y=True,\\n\",\n \" )\\n\",\n \" fig.add_trace(\\n\",\n \" go.Bar(\\n\",\n \" x=index,\\n\",\n \" y=df['Volume'],\\n\",\n \" marker_color='rgba(91, 91, 91, 0.73)',\\n\",\n \" name='Volume',\\n\",\n \" ),\\n\",\n \" secondary_y=False,\\n\",\n \" )\\n\",\n \"\\n\",\n \" fig.layout.yaxis2.showgrid = False\\n\",\n \" fig.update_layout(\\n\",\n \" autosize=True,\\n\",\n \" xaxis_rangeslider_visible=False,\\n\",\n \" template='plotly_dark',\\n\",\n \" title={\\n\",\n \" 'text': f'{ticker.upper()} PRICE CHART',\\n\",\n \" 'xanchor': 'center',\\n\",\n \" 'yanchor': 'top',\\n\",\n \" 'x': 0.5,\\n\",\n \" },\\n\",\n \" )\\n\",\n \" widget = go.FigureWidget(fig, layout=ipw.Layout(height='100%'))\\n\",\n \" return widget\\n\",\n \"\\n\",\n \"\\n\",\n \"def price_history_factory(df: List, ticker: str = '') -> ipw.Widget:\\n\",\n \" # include candlestick with rangeselector\\n\",\n \" index = [datetime.fromtimestamp(int(x)/1000).strftime('%m/%d') for x in df.index]\\n\",\n \" widget = go.FigureWidget(go.Scatter(x=index, y=df['Close']))\\n\",\n \" widget.update_layout(\\n\",\n \" autosize=True,\\n\",\n \" template='plotly_dark',\\n\",\n \" title={\\n\",\n \" 'text': f'{ticker.upper()} PRICE HISTORY',\\n\",\n \" 'xanchor': 'center',\\n\",\n \" 'yanchor': 'top',\\n\",\n \" 'x': 0.5,\\n\",\n \" },\\n\",\n \" )\\n\",\n \" return widget\\n\",\n \"\\n\",\n \"\\n\",\n \"def text_widget(title: str, text: str) -> ipw.Widget:\\n\",\n \" return v.Card(\\n\",\n \" outlined=True,\\n\",\n \" children=[\\n\",\n \" v.CardTitle(\\n\",\n \" children=[title],\\n\",\n \" style_='font-size: 1.1rem',\\n\",\n \" ),\\n\",\n \" v.CardText(children=[text]),\\n\",\n \" ],\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def balance_sheet_factory(df) -> ipw.Widget:\\n\",\n \" items = []\\n\",\n \" for i in range(df.shape[0]):\\n\",\n \" row = df.iloc[i]\\n\",\n \" item = {'name': row.name}\\n\",\n \" item.update(json.loads(row.to_json()))\\n\",\n \" items.append(item)\\n\",\n \" titles = [x for x in items[0].keys() if x != 'name']\\n\",\n \" headers = [\\n\",\n \" {\\n\",\n \" 'text': 'Property',\\n\",\n \" 'align': 'start',\\n\",\n \" 'sortable': False,\\n\",\n \" 'value': 'name',\\n\",\n \" }\\n\",\n \" ]\\n\",\n \" for title in titles:\\n\",\n \" date = datetime.fromtimestamp(int(title) / 1000)\\n\",\n \" header = {'text': date.strftime('%m/%d/%Y, %H:%M'), 'value': title}\\n\",\n \" headers.append(header)\\n\",\n \" return v.DataTable(\\n\",\n \" headers=headers,\\n\",\n \" items=items,\\n\",\n \" )\\n\",\n \"\\n\",\n \"\\n\",\n \"def analysis_factory(df) -> ipw.Widget:\\n\",\n \" items = []\\n\",\n \" for i in range(df.shape[0]):\\n\",\n \" row = df.iloc[i]\\n\",\n \" item = {'name': row.name}\\n\",\n \" item.update(json.loads(row.to_json()))\\n\",\n \" items.append(item)\\n\",\n \" titles = [x for x in items[0].keys() if x != 'name']\\n\",\n \" headers = [\\n\",\n \" {\\n\",\n \" 'text': 'Property',\\n\",\n \" 'align': 'start',\\n\",\n \" 'sortable': False,\\n\",\n \" 'value': 'name',\\n\",\n \" }\\n\",\n \" ]\\n\",\n \" for title in titles:\\n\",\n \" header = {'text': title, 'value': title}\\n\",\n \" headers.append(header)\\n\",\n \" return v.DataTable(\\n\",\n \" headers=headers,\\n\",\n \" items=items,\\n\",\n \" )\\n\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"editable = False\\n\",\n \"height = \\\"900px\\\"\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"ticker_name = \\\"NVDA\\\"\\n\",\n \"ticker = TickerData(ticker_name)\\n\",\n \"news = new_factory(ticker.news)\\n\",\n \"info = financial_info_factory(ticker.financial_info, ticker._info[\\\"logo_url\\\"])\\n\",\n \"price = price_chart_factory(ticker.price(), ticker_name)\\n\",\n \"history = price_history_factory(ticker.price(), ticker_name)\\n\",\n \"summary = text_widget(\\\"Business Summary \\\", ticker._info[\\\"longBusinessSummary\\\"])\\n\",\n \"balance_sheet = balance_sheet_factory(ticker.balance_sheet)\\n\",\n \"analysis = analysis_factory(ticker.analysis)\\n\",\n \"widgets = {\\n\",\n \" \\\"news\\\": news,\\n\",\n \" \\\"info\\\": info,\\n\",\n \" \\\"price\\\": price,\\n\",\n \" \\\"history\\\": history,\\n\",\n \" \\\"summary\\\": summary,\\n\",\n \" \\\"balance_sheet\\\": balance_sheet,\\n\",\n \" \\\"analysis\\\": analysis\\n\",\n \"}\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": [\n \"w = FlexLayout(\\n\",\n \" widgets,\\n\",\n \" style={\\\"height\\\": height},\\n\",\n \" header={\\\"title\\\": \\\"STOCK DASHBOAD\\\", \\\"style\\\": {\\\"backgroundColor\\\": \\\"rgb(53 53 53)\\\"}, \\\"buttons\\\":[\\\"export\\\",\\\"import\\\"]},\\n\",\n \" template=\\\"ticker2.json\\\",\\n\",\n \" editable=False,\\n\",\n \")\\n\",\n \"style = ipw.HTML(\\\"\\\"\\\" \\\"\\\"\\\")\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 24,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"w\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.6\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 4\n}\n"}, {"title": "Dashboard example", "description": "Example of opening a notebook in dashboard mode without Voila", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook-grid", "id": "8763c3c0-6af1-47bd-9141-db2e320769c1", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"a8da280e-cebd-4762-9d73-d60225f6c79c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'ipyleaflet'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"e5cf8261-0e2e-4a78-8366-40cc62ede883\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"d87541d9-58d8-4a42-9922-edbdfb90518c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 2,\n \"hidden\": false,\n \"locked\": false,\n \"row\": 17,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"79ea1c75d95b4f0e98705fd10316a4b1\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"37d51c24-4f21-4089-8c62-f96ecefaf8fc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 6,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f5bcf49ac33d4679a455aff9bd9bfeae\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"from ipyleaflet import Map, basemaps, basemap_to_tiles\\n\",\n \"\\n\",\n \"m = Map(\\n\",\n \" basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \\\"2017-04-08\\\"),\\n\",\n \" center=(52.204793, 360.121558),\\n\",\n \" zoom=4\\n\",\n \")\\n\",\n \"\\n\",\n \"m\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"59e16c67-d06e-4caf-89c1-d7a6addb3589\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 4,\n \"height\": 3,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 18,\n \"width\": 5\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"8ae2f3d26cd541a2bc6acbbd214532fc\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"b7c5a2c3-5686-40b8-9d86-1c0325d9117d\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 3,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"# Render a notebook as dashboard without Voila!\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"add0b305-71da-4e4e-9026-65af5ba3614b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipyflex\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"0f31e190-31cd-481e-bd7a-1b4ef9285a23\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"509f4ab165614f4792f2423d88a4db72\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Widget 1': HTML(value='Widget 1
'), 'Widget 2': HTML(value='Widget 2
'),\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"widgets = {\\n\",\n \" 'Widget 1' : ipywidgets.HTML('Widget 1
'),\\n\",\n \" 'Widget 2' : ipywidgets.HTML('Widget 2
'),\\n\",\n \" 'Widget 3' : ipywidgets.HTML('Widget 3
'),\\n\",\n \" 'Widget 4' : ipywidgets.HTML('Widget 4
')\\n\",\n \"}\\n\",\n \"\\n\",\n \"ipyflex.FlexLayout(widgets, style={'height':'400px'}, template='./layout.json', editable=False, header=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"09809959-7398-42db-a20d-6097a06b0072\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.13\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "Notebook example", "description": "Example of opening a notebook in dashboard mode without Voila", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.ipynb", "cwd": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples", "type": "notebook", "id": "97fdc069-caf1-4b62-acb6-9f5597784231", "sourceCode": "{\n \"cells\": [\n {\n \"cell_type\": \"code\",\n \"execution_count\": 1,\n \"id\": \"a8da280e-cebd-4762-9d73-d60225f6c79c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"try:\\n\",\n \" import piplite\\n\",\n \" await piplite.install(['ipywidgets==7.7.0', 'ipyflex', 'ipyleaflet'])\\n\",\n \"except:\\n\",\n \" pass\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 2,\n \"id\": \"e5cf8261-0e2e-4a78-8366-40cc62ede883\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipywidgets\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 3,\n \"id\": \"d87541d9-58d8-4a42-9922-edbdfb90518c\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 2,\n \"hidden\": false,\n \"locked\": false,\n \"row\": 17,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"79ea1c75d95b4f0e98705fd10316a4b1\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 4,\n \"id\": \"37d51c24-4f21-4089-8c62-f96ecefaf8fc\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 6,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"f5bcf49ac33d4679a455aff9bd9bfeae\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"Map(center=[52.204793, 360.121558], controls=(ZoomControl(options=['position', 'zoom_in_text', 'zoom_in_title'\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"from ipyleaflet import Map, basemaps, basemap_to_tiles\\n\",\n \"\\n\",\n \"m = Map(\\n\",\n \" basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, \\\"2017-04-08\\\"),\\n\",\n \" center=(52.204793, 360.121558),\\n\",\n \" zoom=4\\n\",\n \")\\n\",\n \"\\n\",\n \"m\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 5,\n \"id\": \"59e16c67-d06e-4caf-89c1-d7a6addb3589\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 4,\n \"height\": 3,\n \"hidden\": true,\n \"locked\": true,\n \"row\": 18,\n \"width\": 5\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"8ae2f3d26cd541a2bc6acbbd214532fc\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"IntSlider(value=0)\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"ipywidgets.IntSlider()\"\n ]\n },\n {\n \"cell_type\": \"markdown\",\n \"id\": \"b7c5a2c3-5686-40b8-9d86-1c0325d9117d\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 3,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 0,\n \"width\": 12\n }\n }\n }\n },\n \"tags\": []\n },\n \"source\": [\n \"# Render a notebook as dashboard without Voila!\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 6,\n \"id\": \"add0b305-71da-4e4e-9026-65af5ba3614b\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [],\n \"source\": [\n \"import ipyflex\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": 7,\n \"id\": \"0f31e190-31cd-481e-bd7a-1b4ef9285a23\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": 0,\n \"height\": 14,\n \"hidden\": false,\n \"locked\": true,\n \"row\": 3,\n \"width\": 6\n }\n }\n }\n },\n \"tags\": []\n },\n \"outputs\": [\n {\n \"data\": {\n \"application/vnd.jupyter.widget-view+json\": {\n \"model_id\": \"509f4ab165614f4792f2423d88a4db72\",\n \"version_major\": 2,\n \"version_minor\": 0\n },\n \"text/plain\": [\n \"FlexLayout(children={'Widget 1': HTML(value='Widget 1
'), 'Widget 2': HTML(value='Widget 2
'),\u2026\"\n ]\n },\n \"metadata\": {},\n \"output_type\": \"display_data\"\n }\n ],\n \"source\": [\n \"widgets = {\\n\",\n \" 'Widget 1' : ipywidgets.HTML('Widget 1
'),\\n\",\n \" 'Widget 2' : ipywidgets.HTML('Widget 2
'),\\n\",\n \" 'Widget 3' : ipywidgets.HTML('Widget 3
'),\\n\",\n \" 'Widget 4' : ipywidgets.HTML('Widget 4
')\\n\",\n \"}\\n\",\n \"\\n\",\n \"ipyflex.FlexLayout(widgets, style={'height':'400px'}, template='./layout.json', editable=False, header=True)\"\n ]\n },\n {\n \"cell_type\": \"code\",\n \"execution_count\": null,\n \"id\": \"09809959-7398-42db-a20d-6097a06b0072\",\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"views\": {\n \"grid_default\": {\n \"col\": null,\n \"height\": 2,\n \"hidden\": true,\n \"locked\": true,\n \"row\": null,\n \"width\": 2\n }\n }\n }\n }\n },\n \"outputs\": [],\n \"source\": []\n }\n ],\n \"metadata\": {\n \"extensions\": {\n \"jupyter_dashboards\": {\n \"activeView\": \"grid_default\",\n \"version\": 1,\n \"views\": {\n \"grid_default\": {\n \"cellMargin\": 2,\n \"defaultCellHeight\": 40,\n \"maxColumns\": 12,\n \"name\": \"grid\",\n \"type\": \"grid\"\n }\n }\n }\n },\n \"kernelspec\": {\n \"display_name\": \"Python 3 (ipykernel)\",\n \"language\": \"python\",\n \"name\": \"python3\"\n },\n \"language_info\": {\n \"codemirror_mode\": {\n \"name\": \"ipython\",\n \"version\": 3\n },\n \"file_extension\": \".py\",\n \"mimetype\": \"text/x-python\",\n \"name\": \"python\",\n \"nbconvert_exporter\": \"python\",\n \"pygments_lexer\": \"ipython3\",\n \"version\": \"3.10.13\"\n },\n \"vscode\": {\n \"interpreter\": {\n \"hash\": \"185c460d523eefc55d6b39dbbc1977f00a990069d85a8be858709cefa84b6425\"\n }\n }\n },\n \"nbformat\": 4,\n \"nbformat_minor\": 5\n}\n"}, {"title": "URL example", "description": "Example of opening a URL in a tab", "source": "https://jupyterlab.readthedocs.io/en/stable/", "type": "url", "args": {"sandbox": ["allow-same-origin", "allow-scripts", "allow-downloads", "allow-modals", "allow-popups"]}, "id": "2117866f-1943-4cb9-ad33-3c9159e408c0", "sourceCode": null}, {"title": "Markdown example", "description": "Example of opening a Markdown file in a tab", "source": "/home/runner/work/jupyter_app_launcher/jupyter_app_launcher/samples/sample.md", "type": "markdown", "id": "8c6d2208-7c46-4737-88f5-d951b3eca68a", "sourceCode": "# Hello world\n\n## Foo\n\n### Bar\n\nTo insert a mathematical formula we use the dollar symbol $, as follows:\n\nEuler's identity: $ e^{i \\pi} + 1 = 0 $\n\nTo isolate and center the formulas and enter in math display mode, we use 2 dollars symbol:\n\n$$\n...\n$$\n\nEuler's identity: $$ e^{i \\pi} + 1 = 0 $$\n"}]}}
\ No newline at end of file