diff --git a/api/contents/all.json b/api/contents/all.json index 0e49b5c..e57c603 100644 --- a/api/contents/all.json +++ b/api/contents/all.json @@ -2,11 +2,11 @@ "content": [ { "content": null, - "created": "2024-11-02T09:46:02.013668Z", + "created": "2024-11-02T09:55:17.979016Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-11-02T09:45:59.381630Z", + "last_modified": "2024-11-02T09:55:15.514986Z", "mimetype": "application/json", "name": "data.json", "path": "data.json", @@ -16,11 +16,11 @@ }, { "content": null, - "created": "2024-11-02T09:46:02.013668Z", + "created": "2024-11-02T09:55:17.983016Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-11-02T09:45:59.381630Z", + "last_modified": "2024-11-02T09:55:15.514986Z", "mimetype": "application/json", "name": "ticker2.json", "path": "ticker2.json", @@ -30,11 +30,11 @@ }, { "content": null, - "created": "2024-11-02T09:46:02.013668Z", + "created": "2024-11-02T09:55:17.979016Z", "format": null, "hash": null, "hash_algorithm": null, - "last_modified": "2024-11-02T09:45:59.381630Z", + "last_modified": "2024-11-02T09:55:15.514986Z", "mimetype": "application/json", "name": "beam.json", "path": "beam.json", @@ -43,11 +43,11 @@ "writable": true } ], - "created": "2024-11-02T09:46:02.013668Z", + "created": "2024-11-02T09:55:17.983016Z", "format": "json", "hash": null, "hash_algorithm": null, - "last_modified": "2024-11-02T09:46:02.013668Z", + "last_modified": "2024-11-02T09:55:17.983016Z", "mimetype": null, "name": "", "path": "", diff --git a/extensions/jupyter_app_launcher/package.json b/extensions/jupyter_app_launcher/package.json index 811d548..525c560 100644 --- a/extensions/jupyter_app_launcher/package.json +++ b/extensions/jupyter_app_launcher/package.json @@ -1,6 +1,6 @@ { "name": "jupyter_app_launcher", - "version": "0.3.0", + "version": "0.3.1", "description": "A JupyterLab extension.", "keywords": [ "jupyter", @@ -114,7 +114,7 @@ "extension": true, "outputDir": "jupyter_app_launcher/labextension", "_build": { - "load": "static/remoteEntry.dd12c7784542c3d8507b.js", + "load": "static/remoteEntry.e230b731736932d34404.js", "extension": "./extension", "style": "./style" } diff --git a/extensions/jupyter_app_launcher/static/remoteEntry.dd12c7784542c3d8507b.js b/extensions/jupyter_app_launcher/static/remoteEntry.e230b731736932d34404.js similarity index 99% rename from extensions/jupyter_app_launcher/static/remoteEntry.dd12c7784542c3d8507b.js rename to extensions/jupyter_app_launcher/static/remoteEntry.e230b731736932d34404.js index fecf0e7..578e6f2 100644 --- a/extensions/jupyter_app_launcher/static/remoteEntry.dd12c7784542c3d8507b.js +++ b/extensions/jupyter_app_launcher/static/remoteEntry.e230b731736932d34404.js @@ -1 +1 @@ -var _JUPYTERLAB;(()=>{"use strict";var e,r,t,a,n,o,u,i,l,f,s,p,d,c,h,v,b,y,g,m,j,w,k,S,_,E={569:(e,r,t)=>{var a={"./index":()=>t.e(24).then((()=>()=>t(9024))),"./extension":()=>t.e(24).then((()=>()=>t(9024))),"./style":()=>t.e(526).then((()=>()=>t(526)))},n=(e,r)=>(t.R=r,r=t.o(a,e)?a[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),o=(e,r)=>{if(t.S){var a="default",n=t.S[a];if(n&&n!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[a]=e,t.I(a,r)}};t.d(r,{get:()=>n,init:()=>o})}},P={};function T(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return E[e].call(t.exports,t,t.exports,T),t.exports}T.m=E,T.c=P,T.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return T.d(r,{a:r}),r},T.d=(e,r)=>{for(var t in r)T.o(r,t)&&!T.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},T.f={},T.e=e=>Promise.all(Object.keys(T.f).reduce(((r,t)=>(T.f[t](e,r),r)),[])),T.u=e=>e+"."+{24:"064fdc839336b31a1912",526:"2dda23b9254c1257f6f7",668:"d1e2775e166b785467bd"}[e]+".js?v="+{24:"064fdc839336b31a1912",526:"2dda23b9254c1257f6f7",668:"d1e2775e166b785467bd"}[e],T.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),T.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="jupyter_app_launcher:",T.l=(t,a,n,o)=>{if(e[t])e[t].push(a);else{var u,i;if(void 0!==n)for(var l=document.getElementsByTagName("script"),f=0;f{u.onerror=u.onload=null,clearTimeout(d);var n=e[t];if(delete e[t],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach((e=>e(a))),r)return r(a)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=p.bind(null,u.onerror),u.onload=p.bind(null,u.onload),i&&document.head.appendChild(u)}},T.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{T.S={};var e={},r={};T.I=(t,a)=>{a||(a=[]);var n=r[t];if(n||(n=r[t]={}),!(a.indexOf(n)>=0)){if(a.push(n),e[t])return e[t];T.o(T.S,t)||(T.S[t]={});var o=T.S[t],u="jupyter_app_launcher",i=(e,r,t,a)=>{var n=o[e]=o[e]||{},i=n[r];(!i||!i.loaded&&(!a!=!i.eager?a:u>i.from))&&(n[r]={get:t,from:u,eager:!!a})},l=[];return"default"===t&&(i("gridstack","6.0.3",(()=>T.e(668).then((()=>()=>T(3668))))),i("jupyter_app_launcher","0.3.0",(()=>T.e(24).then((()=>()=>T(9024)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;T.g.importScripts&&(e=T.g.location+"");var r=T.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),T.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),a=t[1]?r(t[1]):[];return t[2]&&(a.length++,a.push.apply(a,r(t[2]))),t[3]&&(a.push([]),a.push.apply(a,r(t[3]))),a},a=(e,r)=>{e=t(e),r=t(r);for(var a=0;;){if(a>=e.length)return a=r.length)return"u"==o;var u=r[a],i=(typeof u)[0];if(o!=i)return"o"==o&&"n"==i||"s"==i||"u"==o;if("o"!=o&&"u"!=o&&n!=u)return n{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var a=1,o=1;o0?".":"")+(a=2,i);return t}var u=[];for(o=1;o{if(0 in e){r=t(r);var a=e[0],n=a<0;n&&(a=-a-1);for(var u=0,i=1,l=!0;;i++,u++){var f,s,p=i=r.length||"o"==(s=(typeof(f=r[u]))[0]))return!l||("u"==p?i>a&&!n:""==p!=n);if("u"==s){if(!l||"u"!=p)return!1}else if(l)if(p==s)if(i<=a){if(f!=e[i])return!1}else{if(n?f>e[i]:fe&&T.o(e,r),i=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),f=(e,r,t)=>{var n=t?l(e[r]):e[r];return(r=Object.keys(n).reduce(((e,r)=>!e||a(e,r)?r:e),0))&&n[r]},s=(e,r,t,n)=>{var u=n?l(e[r]):e[r];return(r=Object.keys(u).reduce(((e,r)=>!o(t,r)||e&&!a(e,r)?e:r),0))&&u[r]},p=(e,r,t)=>{var n=t?l(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},d=(e,r,t,a)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(a)+")",c=(e,r,t,a,o)=>{var u=e[t];return"No satisfying version ("+n(a)+")"+(o?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(u).map((e=>e+" from "+u[e].from)).join(", ")},h=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},y=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),g=(b=e=>function(r,t,a,n,o){var u=T.I(r);return u&&u.then&&!a?u.then(e.bind(e,r,T.S[r],t,!1,n,o)):e(r,T.S[r],t,a,n,o)})(((e,r,t,a,n,o)=>{if(!u(r,t))return y(e,t,o);var l=s(r,t,n,a);return l?i(l):(v(c(r,e,t,n,a)),i(f(r,t,a)))})),m=b(((e,r,t,a,n,o)=>{if(!u(r,t))return y(e,t,o);var l=s(r,t,n,a);return l?i(l):o?o():void h(c(r,e,t,n,a))})),j=b(((e,r,t,a,n,l)=>{if(!u(r,t))return y(e,t,l);var f=p(r,t,a);return o(n,f)||v(d(r,t,f,n)),i(r[t][f])})),w={},k={528:()=>j("default","@jupyterlab/notebook",!1,[1,4,3,0]),3439:()=>g("default","@jupyterlab/docregistry",!1,[1,4,3,0]),4030:()=>j("default","@jupyterlab/apputils",!1,[1,4,4,0]),4602:()=>j("default","@lumino/signaling",!1,[1,2,0,0]),4651:()=>j("default","@jupyterlab/codeeditor",!1,[1,4,3,0]),4855:()=>g("default","@jupyterlab/cells",!1,[1,4,3,0]),4916:()=>j("default","@jupyterlab/ui-components",!1,[1,4,3,0]),5256:()=>j("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",0]),5439:()=>j("default","@jupyterlab/rendermime",!1,[1,4,3,0]),5537:()=>j("default","@jupyterlab/coreutils",!1,[1,6,3,0]),5607:()=>j("default","@jupyterlab/launcher",!1,[1,4,3,0]),5778:()=>j("default","@jupyterlab/services",!1,[1,7,3,0]),6230:()=>j("default","@lumino/messaging",!1,[1,2,0,0]),7262:()=>j("default","@lumino/coreutils",!1,[1,2,0,0]),8051:()=>m("default","gridstack",!1,[1,6,0,1],(()=>T.e(668).then((()=>()=>T(3668))))),8144:()=>j("default","@jupyterlab/docmanager",!1,[1,4,3,0]),8353:()=>j("default","@jupyterlab/filebrowser",!1,[1,4,3,0]),8979:()=>j("default","@jupyterlab/terminal",!1,[1,4,3,0]),9074:()=>g("default","@jupyterlab/outputarea",!1,[1,4,3,0]),9145:()=>g("default","@jupyterlab/running",!1,[1,4,3,0]),9662:()=>j("default","@jupyterlab/markdownviewer",!1,[1,4,3,0])},S={24:[528,3439,4030,4602,4651,4855,4916,5256,5439,5537,5607,5778,6230,7262,8051,8144,8353,8979,9074,9145,9662]},_={},T.f.consumes=(e,r)=>{T.o(S,e)&&S[e].forEach((e=>{if(T.o(w,e))return r.push(w[e]);if(!_[e]){var t=r=>{w[e]=0,T.m[e]=t=>{delete T.c[e],t.exports=r()}};_[e]=!0;var a=r=>{delete w[e],T.m[e]=t=>{throw delete T.c[e],r}};try{var n=k[e]();n.then?r.push(w[e]=n.then(t).catch(a)):t(n)}catch(e){a(e)}}}))},(()=>{T.b=document.baseURI||self.location.href;var e={921:0};T.f.j=(r,t)=>{var a=T.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var n=new Promise(((t,n)=>a=e[r]=[t,n]));t.push(a[2]=n);var o=T.p+T.u(r),u=new Error;T.l(o,(t=>{if(T.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+r+" failed.\n("+n+": "+o+")",u.name="ChunkLoadError",u.type=n,u.request=o,a[1](u)}}),"chunk-"+r,r)}};var r=(r,t)=>{var a,n,[o,u,i]=t,l=0;if(o.some((r=>0!==e[r]))){for(a in u)T.o(u,a)&&(T.m[a]=u[a]);i&&i(T)}for(r&&r(t);l{"use strict";var e,r,t,a,n,o,u,i,l,f,s,p,d,c,h,v,b,y,g,m,j,w,k,S,_,E={569:(e,r,t)=>{var a={"./index":()=>t.e(24).then((()=>()=>t(9024))),"./extension":()=>t.e(24).then((()=>()=>t(9024))),"./style":()=>t.e(526).then((()=>()=>t(526)))},n=(e,r)=>(t.R=r,r=t.o(a,e)?a[e]():Promise.resolve().then((()=>{throw new Error('Module "'+e+'" does not exist in container.')})),t.R=void 0,r),o=(e,r)=>{if(t.S){var a="default",n=t.S[a];if(n&&n!==e)throw new Error("Container initialization failed as it has already been initialized with a different share scope");return t.S[a]=e,t.I(a,r)}};t.d(r,{get:()=>n,init:()=>o})}},P={};function T(e){var r=P[e];if(void 0!==r)return r.exports;var t=P[e]={id:e,exports:{}};return E[e].call(t.exports,t,t.exports,T),t.exports}T.m=E,T.c=P,T.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return T.d(r,{a:r}),r},T.d=(e,r)=>{for(var t in r)T.o(r,t)&&!T.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},T.f={},T.e=e=>Promise.all(Object.keys(T.f).reduce(((r,t)=>(T.f[t](e,r),r)),[])),T.u=e=>e+"."+{24:"064fdc839336b31a1912",526:"2dda23b9254c1257f6f7",668:"d1e2775e166b785467bd"}[e]+".js?v="+{24:"064fdc839336b31a1912",526:"2dda23b9254c1257f6f7",668:"d1e2775e166b785467bd"}[e],T.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),T.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="jupyter_app_launcher:",T.l=(t,a,n,o)=>{if(e[t])e[t].push(a);else{var u,i;if(void 0!==n)for(var l=document.getElementsByTagName("script"),f=0;f{u.onerror=u.onload=null,clearTimeout(d);var n=e[t];if(delete e[t],u.parentNode&&u.parentNode.removeChild(u),n&&n.forEach((e=>e(a))),r)return r(a)},d=setTimeout(p.bind(null,void 0,{type:"timeout",target:u}),12e4);u.onerror=p.bind(null,u.onerror),u.onload=p.bind(null,u.onload),i&&document.head.appendChild(u)}},T.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{T.S={};var e={},r={};T.I=(t,a)=>{a||(a=[]);var n=r[t];if(n||(n=r[t]={}),!(a.indexOf(n)>=0)){if(a.push(n),e[t])return e[t];T.o(T.S,t)||(T.S[t]={});var o=T.S[t],u="jupyter_app_launcher",i=(e,r,t,a)=>{var n=o[e]=o[e]||{},i=n[r];(!i||!i.loaded&&(!a!=!i.eager?a:u>i.from))&&(n[r]={get:t,from:u,eager:!!a})},l=[];return"default"===t&&(i("gridstack","6.0.3",(()=>T.e(668).then((()=>()=>T(3668))))),i("jupyter_app_launcher","0.3.1",(()=>T.e(24).then((()=>()=>T(9024)))))),e[t]=l.length?Promise.all(l).then((()=>e[t]=1)):1}}})(),(()=>{var e;T.g.importScripts&&(e=T.g.location+"");var r=T.g.document;if(!e&&r&&(r.currentScript&&"SCRIPT"===r.currentScript.tagName.toUpperCase()&&(e=r.currentScript.src),!e)){var t=r.getElementsByTagName("script");if(t.length)for(var a=t.length-1;a>-1&&(!e||!/^http(s?):/.test(e));)e=t[a--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),T.p=e})(),t=e=>{var r=e=>e.split(".").map((e=>+e==e?+e:e)),t=/^([^-+]+)?(?:-([^+]+))?(?:\+(.+))?$/.exec(e),a=t[1]?r(t[1]):[];return t[2]&&(a.length++,a.push.apply(a,r(t[2]))),t[3]&&(a.push([]),a.push.apply(a,r(t[3]))),a},a=(e,r)=>{e=t(e),r=t(r);for(var a=0;;){if(a>=e.length)return a=r.length)return"u"==o;var u=r[a],i=(typeof u)[0];if(o!=i)return"o"==o&&"n"==i||"s"==i||"u"==o;if("o"!=o&&"u"!=o&&n!=u)return n{var r=e[0],t="";if(1===e.length)return"*";if(r+.5){t+=0==r?">=":-1==r?"<":1==r?"^":2==r?"~":r>0?"=":"!=";for(var a=1,o=1;o0?".":"")+(a=2,i);return t}var u=[];for(o=1;o{if(0 in e){r=t(r);var a=e[0],n=a<0;n&&(a=-a-1);for(var u=0,i=1,l=!0;;i++,u++){var f,s,p=i=r.length||"o"==(s=(typeof(f=r[u]))[0]))return!l||("u"==p?i>a&&!n:""==p!=n);if("u"==s){if(!l||"u"!=p)return!1}else if(l)if(p==s)if(i<=a){if(f!=e[i])return!1}else{if(n?f>e[i]:fe&&T.o(e,r),i=e=>(e.loaded=1,e.get()),l=e=>Object.keys(e).reduce(((r,t)=>(e[t].eager&&(r[t]=e[t]),r)),{}),f=(e,r,t)=>{var n=t?l(e[r]):e[r];return(r=Object.keys(n).reduce(((e,r)=>!e||a(e,r)?r:e),0))&&n[r]},s=(e,r,t,n)=>{var u=n?l(e[r]):e[r];return(r=Object.keys(u).reduce(((e,r)=>!o(t,r)||e&&!a(e,r)?e:r),0))&&u[r]},p=(e,r,t)=>{var n=t?l(e[r]):e[r];return Object.keys(n).reduce(((e,r)=>!e||!n[e].loaded&&a(e,r)?r:e),0)},d=(e,r,t,a)=>"Unsatisfied version "+t+" from "+(t&&e[r][t].from)+" of shared singleton module "+r+" (required "+n(a)+")",c=(e,r,t,a,o)=>{var u=e[t];return"No satisfying version ("+n(a)+")"+(o?" for eager consumption":"")+" of shared module "+t+" found in shared scope "+r+".\nAvailable versions: "+Object.keys(u).map((e=>e+" from "+u[e].from)).join(", ")},h=e=>{throw new Error(e)},v=e=>{"undefined"!=typeof console&&console.warn&&console.warn(e)},y=(e,r,t)=>t?t():((e,r)=>h("Shared module "+r+" doesn't exist in shared scope "+e))(e,r),g=(b=e=>function(r,t,a,n,o){var u=T.I(r);return u&&u.then&&!a?u.then(e.bind(e,r,T.S[r],t,!1,n,o)):e(r,T.S[r],t,a,n,o)})(((e,r,t,a,n,o)=>{if(!u(r,t))return y(e,t,o);var l=s(r,t,n,a);return l?i(l):(v(c(r,e,t,n,a)),i(f(r,t,a)))})),m=b(((e,r,t,a,n,o)=>{if(!u(r,t))return y(e,t,o);var l=s(r,t,n,a);return l?i(l):o?o():void h(c(r,e,t,n,a))})),j=b(((e,r,t,a,n,l)=>{if(!u(r,t))return y(e,t,l);var f=p(r,t,a);return o(n,f)||v(d(r,t,f,n)),i(r[t][f])})),w={},k={528:()=>j("default","@jupyterlab/notebook",!1,[1,4,3,0]),3439:()=>g("default","@jupyterlab/docregistry",!1,[1,4,3,0]),4030:()=>j("default","@jupyterlab/apputils",!1,[1,4,4,0]),4602:()=>j("default","@lumino/signaling",!1,[1,2,0,0]),4651:()=>j("default","@jupyterlab/codeeditor",!1,[1,4,3,0]),4855:()=>g("default","@jupyterlab/cells",!1,[1,4,3,0]),4916:()=>j("default","@jupyterlab/ui-components",!1,[1,4,3,0]),5256:()=>j("default","@lumino/widgets",!1,[1,2,3,1,,"alpha",0]),5439:()=>j("default","@jupyterlab/rendermime",!1,[1,4,3,0]),5537:()=>j("default","@jupyterlab/coreutils",!1,[1,6,3,0]),5607:()=>j("default","@jupyterlab/launcher",!1,[1,4,3,0]),5778:()=>j("default","@jupyterlab/services",!1,[1,7,3,0]),6230:()=>j("default","@lumino/messaging",!1,[1,2,0,0]),7262:()=>j("default","@lumino/coreutils",!1,[1,2,0,0]),8051:()=>m("default","gridstack",!1,[1,6,0,1],(()=>T.e(668).then((()=>()=>T(3668))))),8144:()=>j("default","@jupyterlab/docmanager",!1,[1,4,3,0]),8353:()=>j("default","@jupyterlab/filebrowser",!1,[1,4,3,0]),8979:()=>j("default","@jupyterlab/terminal",!1,[1,4,3,0]),9074:()=>g("default","@jupyterlab/outputarea",!1,[1,4,3,0]),9145:()=>g("default","@jupyterlab/running",!1,[1,4,3,0]),9662:()=>j("default","@jupyterlab/markdownviewer",!1,[1,4,3,0])},S={24:[528,3439,4030,4602,4651,4855,4916,5256,5439,5537,5607,5778,6230,7262,8051,8144,8353,8979,9074,9145,9662]},_={},T.f.consumes=(e,r)=>{T.o(S,e)&&S[e].forEach((e=>{if(T.o(w,e))return r.push(w[e]);if(!_[e]){var t=r=>{w[e]=0,T.m[e]=t=>{delete T.c[e],t.exports=r()}};_[e]=!0;var a=r=>{delete w[e],T.m[e]=t=>{throw delete T.c[e],r}};try{var n=k[e]();n.then?r.push(w[e]=n.then(t).catch(a)):t(n)}catch(e){a(e)}}}))},(()=>{T.b=document.baseURI||self.location.href;var e={921:0};T.f.j=(r,t)=>{var a=T.o(e,r)?e[r]:void 0;if(0!==a)if(a)t.push(a[2]);else{var n=new Promise(((t,n)=>a=e[r]=[t,n]));t.push(a[2]=n);var o=T.p+T.u(r),u=new Error;T.l(o,(t=>{if(T.o(e,r)&&(0!==(a=e[r])&&(e[r]=void 0),a)){var n=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;u.message="Loading chunk "+r+" failed.\n("+n+": "+o+")",u.name="ChunkLoadError",u.type=n,u.request=o,a[1](u)}}),"chunk-"+r,r)}};var r=(r,t)=>{var a,n,[o,u,i]=t,l=0;if(o.some((r=>0!==e[r]))){for(a in u)T.o(u,a)&&(T.m[a]=u[a]);i&&i(T)}for(r&&r(t);lSimple 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": "04663340-cd9d-40b9-af37-5767f9c2576b", + "id": "527a1c16-ddc0-45de-96db-2ab6cda4916c", "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": "c2c19a73-b09a-4633-b1a2-0c37dde58fdc", + "id": "e1d1ad32-0ffd-4cc8-a2c7-ec4844f1b455", "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": "73376cd6-4ce4-4c00-b0f8-05f18f10afc6", + "id": "cd79155c-0300-425b-926c-923127357adb", "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": "5353a19d-e28c-463a-aa2d-20d392c27867", + "id": "d2e02069-5034-4a2c-81d3-2a8459a1b084", "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": "64e9c7a5-49a2-4f8c-938e-720b678528d8", + "id": "9d1011a4-ff4b-4975-a3a6-2a645be94953", "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": "f9af76e6-b6b4-4e8d-94da-9fcf4343de5d", + "id": "0b30c0ca-3779-40ca-aabf-bf1c89be6248", "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": "11d1a890-c152-40a0-92bf-09523463f23b", + "id": "8abdb5ad-e04b-45e3-99bd-52f0c5694ac3", "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 7cc6f18..a7c3e63 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": "a120aae2-63c2-41c8-bd33-7afab4d102c2", "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": "04663340-cd9d-40b9-af37-5767f9c2576b", "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": "c2c19a73-b09a-4633-b1a2-0c37dde58fdc", "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": "73376cd6-4ce4-4c00-b0f8-05f18f10afc6", "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": "5353a19d-e28c-463a-aa2d-20d392c27867", "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": "64e9c7a5-49a2-4f8c-938e-720b678528d8", "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": "f9af76e6-b6b4-4e8d-94da-9fcf4343de5d", "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": "11d1a890-c152-40a0-92bf-09523463f23b", "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": "a996c0bf-fdcc-434f-86a1-ff8453a53d5f", "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": "527a1c16-ddc0-45de-96db-2ab6cda4916c", "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": "e1d1ad32-0ffd-4cc8-a2c7-ec4844f1b455", "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": "cd79155c-0300-425b-926c-923127357adb", "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": "d2e02069-5034-4a2c-81d3-2a8459a1b084", "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": "9d1011a4-ff4b-4975-a3a6-2a645be94953", "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": "0b30c0ca-3779-40ca-aabf-bf1c89be6248", "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": "8abdb5ad-e04b-45e3-99bd-52f0c5694ac3", "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