release 2.3 prep. Notebooks wip
121
experimental/aws-workspace/1.15.0.package.json
Normal file
|
@ -0,0 +1,121 @@
|
|||
{
|
||||
"private": true,
|
||||
"theia": {
|
||||
"frontend": {
|
||||
"config": {
|
||||
"applicationName": "Theia IDE",
|
||||
"warnOnPotentiallyInsecureHostPattern": false,
|
||||
"preferences": {
|
||||
"files.enableTrash": false
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"dependencies": {
|
||||
"@theia/editor-preview": "1.15.0",
|
||||
"@theia/file-search": "1.15.0",
|
||||
"@theia/getting-started": "1.15.0",
|
||||
"@theia/git": "1.15.0",
|
||||
"@theia/markers": "1.15.0",
|
||||
"@theia/messages": "1.15.0",
|
||||
"@theia/monaco": "1.15.0",
|
||||
"@theia/navigator": "1.15.0",
|
||||
"@theia/outline-view": "1.15.0",
|
||||
"@theia/plugin-ext-vscode": "1.15.0",
|
||||
"@theia/preferences": "1.15.0",
|
||||
"@theia/preview": "1.15.0",
|
||||
"@theia/search-in-workspace": "1.15.0",
|
||||
"@theia/terminal": "1.15.0",
|
||||
"@theia/vsx-registry": "1.15.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@theia/cli": "1.15.0"
|
||||
},
|
||||
"scripts": {
|
||||
"preinstall": "node-gyp install"
|
||||
},
|
||||
"theiaPluginsDir": "plugins",
|
||||
"theiaPlugins": {
|
||||
"vscode-builtin-bat": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/bat-1.39.1-prel.vsix",
|
||||
"vscode-builtin-clojure": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/clojure-1.39.1-prel.vsix",
|
||||
"vscode-builtin-coffeescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/coffeescript-1.39.1-prel.vsix",
|
||||
"vscode-builtin-configuration-editing": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/configuration-editing-1.39.1-prel.vsix",
|
||||
"vscode-builtin-cpp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/cpp-1.39.1-prel.vsix",
|
||||
"vscode-builtin-csharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/csharp-1.39.1-prel.vsix",
|
||||
"vscode-builtin-css": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/css-1.39.1-prel.vsix",
|
||||
"vscode-builtin-debug-auto-launch": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/debug-auto-launch-1.39.1-prel.vsix",
|
||||
"vscode-builtin-docker": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/docker-1.39.1-prel.vsix",
|
||||
"vscode-builtin-emmet": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/emmet-1.39.1-prel.vsix",
|
||||
"vscode-builtin-fsharp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/fsharp-1.39.1-prel.vsix",
|
||||
"vscode-builtin-go": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/go-1.39.1-prel.vsix",
|
||||
"vscode-builtin-groovy": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/groovy-1.39.1-prel.vsix",
|
||||
"vscode-builtin-grunt": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/grunt-1.39.1-prel.vsix",
|
||||
"vscode-builtin-gulp": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/gulp-1.39.1-prel.vsix",
|
||||
"vscode-builtin-handlebars": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/handlebars-1.39.1-prel.vsix",
|
||||
"vscode-builtin-hlsl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/hlsl-1.39.1-prel.vsix",
|
||||
"vscode-builtin-html": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/html-1.39.1-prel.vsix",
|
||||
"vscode-builtin-html-language-features": "https://open-vsx.org/api/vscode/html-language-features/1.49.0/file/vscode.html-language-features-1.49.0.vsix",
|
||||
"vscode-builtin-ini": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ini-1.39.1-prel.vsix",
|
||||
"vscode-builtin-jake": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/jake-1.39.1-prel.vsix",
|
||||
"vscode-builtin-java": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/java-1.39.1-prel.vsix",
|
||||
"vscode-builtin-javascript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/javascript-1.39.1-prel.vsix",
|
||||
"vscode-builtin-json": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/json-1.39.1-prel.vsix",
|
||||
"vscode-builtin-json-language-features": "https://open-vsx.org/api/vscode/json-language-features/1.46.1/file/vscode.json-language-features-1.46.1.vsix",
|
||||
"vscode-builtin-less": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/less-1.39.1-prel.vsix",
|
||||
"vscode-builtin-log": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/log-1.39.1-prel.vsix",
|
||||
"vscode-builtin-lua": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/lua-1.39.1-prel.vsix",
|
||||
"vscode-builtin-make": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/make-1.39.1-prel.vsix",
|
||||
"vscode-builtin-markdown": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/markdown-1.39.1-prel.vsix",
|
||||
"vscode-builtin-merge-conflicts": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/merge-conflict-1.39.1-prel.vsix",
|
||||
"vscode-builtin-npm": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/npm-1.39.1-prel.vsix",
|
||||
"vscode-builtin-node-debug": "https://github.com/theia-ide/vscode-node-debug/releases/download/v1.35.3/node-debug-1.35.3.vsix",
|
||||
"vscode-builtin-node-debug2": "https://github.com/theia-ide/vscode-node-debug2/releases/download/v1.33.0/node-debug2-1.33.0.vsix",
|
||||
"vscode-builtin-objective-c": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/objective-c-1.39.1-prel.vsix",
|
||||
"vscode-builtin-perl": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/perl-1.39.1-prel.vsix",
|
||||
"vscode-builtin-powershell": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/powershell-1.39.1-prel.vsix",
|
||||
"vscode-builtin-pug": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/pug-1.39.1-prel.vsix",
|
||||
"vscode-builtin-python": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/python-1.39.1-prel.vsix",
|
||||
"vscode-builtin-r": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/r-1.39.1-prel.vsix",
|
||||
"vscode-builtin-razor": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/razor-1.39.1-prel.vsix",
|
||||
"vscode-builtin-ruby": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/ruby-1.39.1-prel.vsix",
|
||||
"vscode-builtin-rust": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/rust-1.39.1-prel.vsix",
|
||||
"vscode-builtin-scss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/scss-1.39.1-prel.vsix",
|
||||
"vscode-builtin-shaderlab": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shaderlab-1.39.1-prel.vsix",
|
||||
"vscode-builtin-shellscript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/shellscript-1.39.1-prel.vsix",
|
||||
"vscode-builtin-sql": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/sql-1.39.1-prel.vsix",
|
||||
"vscode-builtin-swift": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/swift-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-abyss": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-abyss-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-defaults": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-defaults-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-kimbie-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-kimbie-dark-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-monokai": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-dimmed": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-monokai-dimmed-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-quietlight": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-quietlight-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-red": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-red-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-solarized-dark": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-solarized-dark-1.39.1-prel.vsix",
|
||||
"vscode-builtin-theme-tomorrow-night-blue": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/theme-tomorrow-night-blue-1.39.1-prel.vsix",
|
||||
"vscode-builtin-typescript": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-1.39.1-prel.vsix",
|
||||
"vscode-builtin-typescript-language-features": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/typescript-language-features-1.39.1-prel.vsix",
|
||||
"vscode-builtin-vb": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vb-1.39.1-prel.vsix",
|
||||
"vscode-builtin-icon-theme-seti": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/vscode-theme-seti-1.39.1-prel.vsix",
|
||||
"vscode-builtin-xml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/xml-1.39.1-prel.vsix",
|
||||
"vscode-builtin-yaml": "https://github.com/theia-ide/vscode-builtin-extensions/releases/download/v1.39.1-prel/yaml-1.39.1-prel.vsix",
|
||||
"vscode-editorconfig": "https://github.com/theia-ide/editorconfig-vscode/releases/download/v0.14.4/EditorConfig-0.14.4.vsix",
|
||||
"vscode-python": "https://github.com/microsoft/vscode-python/releases/download/2020.1.58038/ms-python-release.vsix",
|
||||
"nadim-vscode.infinity-dark-theme": "https://open-vsx.org/api/nadim-vscode/infinity-dark-theme/1.0.1/file/nadim-vscode.infinity-dark-theme-1.0.1.vsix",
|
||||
"emroussel.atomize-atom-one-dark-theme": "https://open-vsx.org/api/emroussel/atomize-atom-one-dark-theme/1.5.5/file/emroussel.atomize-atom-one-dark-theme-1.5.5.vsix",
|
||||
"mhutchie.git-graph": "https://open-vsx.org/api/mhutchie/git-graph/1.30.0/file/mhutchie.git-graph-1.30.0.vsix",
|
||||
"teabyii.ayu": "https://open-vsx.org/api/teabyii/ayu/0.20.1/file/teabyii.ayu-0.20.1.vsix",
|
||||
"yurihs.sublime-vscode-theme": "https://open-vsx.org/api/yurihs/sublime-vscode-theme/1.4.1/file/yurihs.sublime-vscode-theme-1.4.1.vsix",
|
||||
"wesbos.theme-cobalt2": "https://open-vsx.org/api/wesbos/theme-cobalt2/2.1.6/file/wesbos.theme-cobalt2-2.1.6.vsix",
|
||||
"robbowen.synthwave-vscode": "https://open-vsx.org/api/RobbOwen/synthwave-vscode/0.1.8/file/RobbOwen.synthwave-vscode-0.1.8.vsix",
|
||||
|
||||
"4ops.terraform": "https://open-vsx.org/api/4ops/terraform/0.2.1/file/4ops.terraform-0.2.1.vsix",
|
||||
"samuelcolvin.jinjahtml": "https://open-vsx.org/api/samuelcolvin/jinjahtml/0.16.0/file/samuelcolvin.jinjahtml-0.16.0.vsix",
|
||||
|
||||
"amazonwebservices.aws-toolkit-vscode": "https://open-vsx.org/api/amazonwebservices/aws-toolkit-vscode/1.38.0/file/amazonwebservices.aws-toolkit-vscode-1.38.0.vsix",
|
||||
"sebastianbille.iam-legend": "https://open-vsx.org/api/sebastianbille/iam-legend/1.1.0/file/sebastianbille.iam-legend-1.1.0.vsix",
|
||||
"dsteenman.cloudformation-yaml-snippets": "https://open-vsx.org/api/dsteenman/cloudformation-yaml-snippets/3.57.0/file/dsteenman.cloudformation-yaml-snippets-3.57.0.vsix"
|
||||
|
||||
}
|
||||
}
|
||||
|
28
experimental/aws-workspace/Dockerfile
Normal file
|
@ -0,0 +1,28 @@
|
|||
ARG docker_registry=docker.io/alnoda
|
||||
ARG image_tag=2.2
|
||||
|
||||
## Images used:
|
||||
# ARG BUILD_IMAGE=node:12.18.3
|
||||
ARG DEPLOY_IMAGE=${docker_registry}/ansible-terraform-workspace:${image_tag}
|
||||
|
||||
# Theia rebuild here
|
||||
|
||||
|
||||
FROM ${DEPLOY_IMAGE}
|
||||
USER root
|
||||
|
||||
RUN echo "------------------------------------------------------ AWS CLI" \
|
||||
&& curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip" \
|
||||
&& cd /tmp && unzip /tmp/awscliv2.zip \
|
||||
&& sh /tmp/aws/install \
|
||||
&& rm /tmp/awscliv2.zip \
|
||||
&& rm -r /tmp/aws \
|
||||
&& echo "------------------------------------------------------ Pipx" \
|
||||
&& python3 -m pip install --user pipx \
|
||||
&& echo "------------------------------------------------------ Saws" \
|
||||
&& pipx install saws
|
||||
&& echo "------------------------------------------------------ Infra-graph" \
|
||||
&& pipx install aws-infra-graph
|
||||
|
||||
USER abc
|
||||
COPY settings.json /home/abc/.theia/settings.json
|
25
experimental/aws-workspace/README.md
Normal file
|
@ -0,0 +1,25 @@
|
|||
# AWS Workspace
|
||||
|
||||
__WIP__
|
||||
|
||||
## Tools
|
||||
|
||||
- https://github.com/duo-labs/cloudmapper
|
||||
- https://github.com/ludwigm/infrastructure-graph
|
||||
- https://github.com/prparikh02/aws-vpc-visualizer
|
||||
|
||||
## VS-code extensions
|
||||
|
||||
- https://open-vsx.org/extension/amazonwebservices/aws-toolkit-vscode
|
||||
|
||||
## Security
|
||||
|
||||
- https://github.com/prowler-cloud/prowler
|
||||
- https://github.com/salesforce/cloudsplaining
|
||||
- https://github.com/anaynayak/aws-security-viz
|
||||
|
||||
## Other (special)
|
||||
|
||||
- https://github.com/dbcli/athenacli
|
||||
- https://github.com/aws/aws-sam-cli
|
||||
- https://github.com/barnybug/cli53
|
70
experimental/aws-workspace/mkdocs/mkdocs.yml
Normal file
|
@ -0,0 +1,70 @@
|
|||
# ===========================================================
|
||||
# NAVIGATION
|
||||
# ===========================================================
|
||||
|
||||
nav:
|
||||
- Home: README.md
|
||||
- My apps: pages/my-apps.md
|
||||
- Docs: https://docs.alnoda.org/aws-workspace/
|
||||
|
||||
|
||||
# ===========================================================
|
||||
# CONFIGURATION
|
||||
# ===========================================================
|
||||
|
||||
site_name: AWS workspace
|
||||
repo_url: https://github.com/bluxmit/alnoda-workspaces
|
||||
site_url: https://docs.alnoda.org
|
||||
edit_uri: ""
|
||||
|
||||
# ===========================================================
|
||||
# APPEARANCE
|
||||
# ===========================================================
|
||||
|
||||
theme:
|
||||
name: 'material'
|
||||
favicon: 'assets/favicon.ico'
|
||||
logo: 'assets/Alnoda-logo.svg'
|
||||
custom_dir: overrides
|
||||
icon:
|
||||
repo: fontawesome/brands/git-alt
|
||||
features:
|
||||
- navigation.instant
|
||||
palette:
|
||||
- scheme: default
|
||||
toggle:
|
||||
icon: material/toggle-switch-off-outline
|
||||
name: Switch to light mode
|
||||
primary: orange
|
||||
accent: deep orange
|
||||
- scheme: slate
|
||||
toggle:
|
||||
icon: material/toggle-switch
|
||||
name: Switch to dark mode
|
||||
primary: orange
|
||||
accent: deep orange
|
||||
|
||||
extra:
|
||||
# Link to open when your logo is clicked
|
||||
homepage: https://docs.alnoda.org
|
||||
host_url: http://docs.alnoda.org
|
||||
|
||||
plugins:
|
||||
- search
|
||||
# Enable Macros and jinja2 templates
|
||||
- macros:
|
||||
module_name: macros/helpers
|
||||
|
||||
|
||||
extra_javascript:
|
||||
- javascripts/config.js
|
||||
- https://polyfill.io/v3/polyfill.min.js?features=es6
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
5
experimental/aws-workspace/settings.json
Normal file
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"terminal.integrated.shell.linux": "/bin/zsh",
|
||||
"workbench.colorTheme": "Infinity Dark Theme Eye Friendly Colors",
|
||||
"git-graph.maxDepthOfRepoSearch": 3
|
||||
}
|
12
experimental/jupyterlite-workspace/README.md
Normal file
|
@ -0,0 +1,12 @@
|
|||
# Jupyterlite workspace
|
||||
|
||||
__WIP__
|
||||
|
||||
Planned features:
|
||||
|
||||
- [jupyterlite](https://jupyterlite.readthedocs.io/en/latest/)
|
||||
- [GitHub](https://github.com/jupyterlite/jupyterlite)
|
||||
- [sqlite kernel](https://github.com/jupyterlite/xeus-sqlite-kernel)
|
||||
- [lua kernel](https://github.com/jupyterlite/xeus-lua-kernel)
|
||||
- [p5.js kernel](https://github.com/jupyterlite/p5-kernel)
|
||||
- [Javascript Kernels](https://github.com/deathbeds/jyve)
|
|
@ -76,7 +76,6 @@ RUN apt-get update \
|
|||
&& apt-get install -y libsecret-1-dev
|
||||
|
||||
COPY --from=theia-builder /opt/theia /opt/theia
|
||||
COPY settings.json /home/abc/.theia/settings.json
|
||||
|
||||
COPY --from=nbviewerbuilder /wheels /wheels
|
||||
# To change the number of threads use env var NBVIEWER_THREADS
|
||||
|
@ -85,13 +84,18 @@ ENV LANG=C.UTF-8 NBVIEWER_THREADS=2
|
|||
COPY supervisord-notebooks.conf /etc/supervisord/
|
||||
|
||||
COPY notebooks-requirements.txt /home/abc/installed-python-packages
|
||||
COPY jupyter-requirements.txt /home/abc/installed-python-packages
|
||||
COPY luigi/ /opt/luigi/
|
||||
COPY examples/ /home/examples/
|
||||
COPY tutorials/ /home/project/tutorials/
|
||||
|
||||
COPY ./mkdocs/mkdocs.yml /home/docs/mkdocs.yml
|
||||
COPY ./mkdocs/img/* /home/docs/docs/assets/home/
|
||||
COPY ./mkdocs/helpers.py /home/docs/macros
|
||||
COPY ./mkdocs/README.md /home/docs/docs/README.md
|
||||
COPY ./mkdocs/results.md /home/docs/docs/pages/results.md
|
||||
COPY ./mkdocs/results /home/docs/docs/pages/results
|
||||
COPY settings.json /home/abc/.theia/settings.json
|
||||
|
||||
RUN echo "------------------------------------------------------ Nbviewer" \
|
||||
&& apt-get -y update \
|
||||
|
@ -113,13 +117,16 @@ RUN echo "------------------------------------------------------ Nbviewer" \
|
|||
&& mkdir -p /etc/service/luigid/ \
|
||||
&& mkdir /var/log/luigi \
|
||||
&& echo "------------------------------------------------------ user" \
|
||||
&& mkdir -p /usr/local/share/jupyter && chown -R abc /usr/local/share/jupyter \
|
||||
&& chown -R abc /opt/theia \
|
||||
&& chown -R abc /opt/nbviewer \
|
||||
&& chown -R abc /home/project/nbviewer \
|
||||
&& chown -R abc /etc/service/luigid/ \
|
||||
&& chown -R abc /var/log/jupyter \
|
||||
&& chown -R abc /var/log/luigi \
|
||||
&& find /home -type d | xargs -I{} chown -R abc {}
|
||||
&& mkdir /usr/etc && chmod -R 777 /usr/etc \
|
||||
&& find /home -type d | xargs -I{} chown -R abc {} \
|
||||
&& find /home -type f | xargs -I{} chown abc {}
|
||||
|
||||
USER abc
|
||||
|
||||
|
@ -132,14 +139,32 @@ RUN echo "------------------------------------------------------ Pipx" \
|
|||
&& rm /home/abc/miniconda3/miniconda.sh \
|
||||
&& /home/abc/miniconda3/bin/conda init zsh \
|
||||
&& /home/abc/miniconda3/bin/conda init bash \
|
||||
&& echo "------------------------------------------------------ Jupyter" \
|
||||
&& echo "------------------------------------------------------ Jupyterlab" \
|
||||
&& /home/abc/miniconda3/bin/conda install -y -c conda-forge jupyterlab==3.4.2 \
|
||||
&& echo "------------------------------------------------------ Voila" \
|
||||
&& mkdir /home/project/voila
|
||||
&& mkdir /home/project/voila \
|
||||
&& echo "------------------------------------------------------ Notebooks in terminal" \
|
||||
&& pipx install nbterm \
|
||||
&& pipx install nbclient
|
||||
|
||||
RUN echo "------------------------------------------------------ Mercury" \
|
||||
&& pip install mljar-mercury==0.8.6
|
||||
RUN echo "------------------------------------------------------ libs & extensions" \
|
||||
&& /home/abc/miniconda3/bin/conda install -y pip \
|
||||
&& /home/abc/miniconda3/bin/pip install -U -r /home/abc/installed-python-packages/jupyter-requirements.txt \
|
||||
&& echo "------------------------------------------------------ Jupyter-lux" \
|
||||
&& /home/abc/miniconda3/bin/jupyter nbextension install --py luxwidget \
|
||||
&& /home/abc/miniconda3/bin/jupyter nbextension enable --py luxwidget \
|
||||
&& /home/abc/miniconda3/bin/jupyter labextension install @jupyter-widgets/jupyterlab-manager \
|
||||
&& /home/abc/miniconda3/bin/jupyter labextension install luxwidget \
|
||||
&& echo "------------------------------------------------------ Jupyter-qgrid (Jupyter only)" \
|
||||
&& /home/abc/miniconda3/bin/jupyter nbextension enable --py --sys-prefix widgetsnbextension \
|
||||
&& /home/abc/miniconda3/bin/jupyter nbextension enable --py --sys-prefix qgrid \
|
||||
&& echo "------------------------------------------------------ Luigi" \
|
||||
&& pipx install luigi
|
||||
|
||||
# echo "------------------------------------------------------ Ploomber" \
|
||||
# && /home/abc/miniconda3/bin/conda install -y -c conda-forge ploomber \
|
||||
|
||||
ENV PATH="/home/abc/miniconda3/bin:$PATH"
|
||||
|
||||
ENV PATH="/home/abc/miniconda3/bin:$PATH"
|
||||
|
||||
|
94
experimental/notebook-workspace/Dockerfile-ds
Normal file
|
@ -0,0 +1,94 @@
|
|||
ARG docker_registry=docker.io/alnoda
|
||||
ARG image_tag=2.2
|
||||
|
||||
FROM ${docker_registry}/notebook-workspace:${image_tag}
|
||||
|
||||
RUN echo "------------------------------------------------------ Nbconvert dependencies" \
|
||||
&& apt-get install -y pandoc \
|
||||
&& apt-get install -y texlive-xetex texlive-fonts-recommended texlive-plain-generic
|
||||
|
||||
USER abc
|
||||
|
||||
# Jupyter extensions
|
||||
RUN echo "------------------------------------------------------ BeakerX" \
|
||||
&& /home/abc/miniconda3/bin/conda install -y -c conda-forge ipywidgets beakerx \
|
||||
&& echo "------------------------------------------------------ Elyra" \
|
||||
&& conda install -c conda-forge elyra[all] \
|
||||
&& conda install -c conda-forge nbsafety
|
||||
&& echo "------------------------------------------------------ SQL for pandas" \
|
||||
&& https://github.com/fugue-project/fugue \
|
||||
&& echo "------------------------------------------------------ Nbsafety" \
|
||||
&& https://nbsafety.org/
|
||||
&& echo "------------------------------------------------------ Jupyter-lsp" \
|
||||
pip install python-language-server
|
||||
&& /home/abc/miniconda3/bin/conda install -y -c conda-forge jupyter-lsp-python \
|
||||
&& echo "------------------------------------------------------ Tabnine" (no need if Jupyter LSP is installed) \
|
||||
&& pip install jupyter-tabnine==1.2.3 \
|
||||
&& jupyter nbextension install --py jupyter_tabnine \
|
||||
&& jupyter nbextension enable jupyter_tabnine --py \
|
||||
&& jupyter serverextension enable --py jupyter_tabnine
|
||||
|
||||
|
||||
# Compute
|
||||
# https://github.com/ipython/ipyparallel
|
||||
# https://github.com/modin-project/modin
|
||||
https://github.com/pola-rs/polars
|
||||
https://github.com/vaexio/vaex
|
||||
https://github.com/fugue-project/fugue
|
||||
|
||||
# Kernels
|
||||
# https://github.com/jupyter/jupyter/wiki/Jupyter-kernels
|
||||
# https://github.com/jupyter-xeus/xeus-python
|
||||
|
||||
# Data gathering
|
||||
https://github.com/MartinHeinz/ga-extractor
|
||||
https://docs.meltano.com/guide/installation
|
||||
https://www.singer.io/
|
||||
|
||||
# Data exploration/profiling
|
||||
https://github.com/finos/perspective/
|
||||
https://github.com/mito-ds/monorepo
|
||||
https://github.com/ydataai/pandas-profiling
|
||||
https://github.com/sfu-db/dataprep
|
||||
https://github.com/fbdesignpro/sweetviz
|
||||
https://github.com/ing-bank/popmon
|
||||
https://github.com/bluenote10/tabloo
|
||||
https://docs.bamboolib.8080labs.com/
|
||||
|
||||
# Plotting
|
||||
https://plotly.com/python/getting-started/#jupyterlab-support
|
||||
https://github.com/plotly/jupyter-dash
|
||||
https://www.pygal.org/en/stable/
|
||||
https://github.com/yhat/ggpy
|
||||
https://github.com/bokeh/bokeh
|
||||
|
||||
|
||||
# Vidgets
|
||||
https://github.com/jupyter-widgets/ipyleaflet
|
||||
https://github.com/bqplot/bqplot
|
||||
|
||||
# Reports
|
||||
https://jupyter-flex.danielfrg.com/widgets-voila/
|
||||
https://jupyter-flex.danielfrg.com/
|
||||
|
||||
# Productionalization
|
||||
https://panel.holoviz.org/getting_started/index.html
|
||||
https://github.com/mljar/mercury
|
||||
https://mljar.com/blog/how-to-use-jupyter-notebook/
|
||||
|
||||
# Tests
|
||||
https://testbook.readthedocs.io/en/latest/index.html
|
||||
|
||||
# Other
|
||||
https://github.com/jtpio/jupyterlab-theme-toggle # theme toggler
|
||||
https://github.com/kenshohara/theme-nord-extension
|
||||
|
||||
|
||||
# Tools
|
||||
# https://pypi.org/project/jupyter-paperboy/
|
||||
RUN echo "------------------------------------------------------ Jut" \
|
||||
&& pipx install jut
|
||||
|
||||
|
||||
|
||||
|
13
experimental/notebook-workspace/docs/candidates.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
## Interactive
|
||||
|
||||
- https://github.com/mljar/mercury
|
||||
- https://jupyter-flex.danielfrg.com/widgets-voila/
|
||||
- https://github.com/holoviz/panel
|
||||
|
||||
## Notebooks
|
||||
|
||||
- https://github.com/nteract/commuter
|
||||
|
||||
## CLI
|
||||
|
||||
- https://github.com/saulpw/visidata
|
160
experimental/notebook-workspace/examples/jupyter/fileio.ipynb
Normal file
|
@ -0,0 +1,160 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# [File I/O](https://docs.python.org/3/tutorial/inputoutput.html#reading-and-writing-files)\n",
|
||||
"Reading and writing files."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Working with paths"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import os\n",
|
||||
"\n",
|
||||
"current_file = os.path.realpath('file_io.ipynb') \n",
|
||||
"print('current file: {}'.format(current_file))\n",
|
||||
"# Note: in .py files you can get the path of current file by __file__\n",
|
||||
"\n",
|
||||
"current_dir = os.path.dirname(current_file) \n",
|
||||
"print('current directory: {}'.format(current_dir))\n",
|
||||
"# Note: in .py files you can get the dir of current file by os.path.dirname(__file__)\n",
|
||||
"\n",
|
||||
"data_dir = os.path.join(os.path.dirname(current_dir), '/')\n",
|
||||
"print('data directory: {}'.format(data_dir))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Checking if path exists"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print('exists: {}'.format(os.path.exists(data_dir)))\n",
|
||||
"print('is file: {}'.format(os.path.isfile(data_dir)))\n",
|
||||
"print('is directory: {}'.format(os.path.isdir(data_dir)))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Reading files"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"file_path = os.path.join(data_dir, 'simple_file.txt')\n",
|
||||
"\n",
|
||||
"with open(file_path, 'r') as simple_file:\n",
|
||||
" for line in simple_file:\n",
|
||||
" print(line.strip())"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"The [`with`](https://docs.python.org/3/reference/compound_stmts.html#the-with-statement) statement is for obtaining a [context manager](https://docs.python.org/3/reference/datamodel.html#with-statement-context-managers) that will be used as an execution context for the commands inside the `with`. Context managers guarantee that certain operations are done when exiting the context. \n",
|
||||
"\n",
|
||||
"In this case, the context manager guarantees that `simple_file.close()` is implicitly called when exiting the context. This is a way to make developers life easier: you don't have to remember to explicitly close the file you openened nor be worried about an exception occuring while the file is open. Unclosed file maybe a source of a resource leak. Thus, prefer using `with open()` structure always with file I/O.\n",
|
||||
"\n",
|
||||
"To have an example, the same as above without the `with`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"file_path = os.path.join(data_dir, 'simple_file.txt')\n",
|
||||
"\n",
|
||||
"# THIS IS NOT THE PREFERRED WAY\n",
|
||||
"simple_file = open(file_path, 'r')\n",
|
||||
"for line in simple_file:\n",
|
||||
" print(line.strip())\n",
|
||||
"simple_file.close() # This has to be called explicitly "
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Writing files"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"new_file_path = os.path.join(data_dir, 'new_file.txt')\n",
|
||||
"\n",
|
||||
"with open(new_file_path, 'w') as my_file:\n",
|
||||
" my_file.write('This is my first file that I wrote with Python.')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Now go and check that there is a new_file.txt in the data directory. After that you can delete the file by:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"if os.path.exists(new_file_path): # make sure it's there\n",
|
||||
" os.remove(new_file_path)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
220
experimental/notebook-workspace/examples/jupyter/magpye.ipynb
Normal file
386
experimental/notebook-workspace/examples/jupyter/strings.ipynb
Normal file
|
@ -0,0 +1,386 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# [Strings](https://docs.python.org/3/library/stdtypes.html#text-sequence-type-str)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"my_string = 'Python is my favorite programming language!'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"my_string"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"type(my_string)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"len(my_string)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"### Respecting [PEP8](https://www.python.org/dev/peps/pep-0008/#maximum-line-length) with long strings"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"long_story = ('Lorem ipsum dolor sit amet, consectetur adipiscing elit.' \n",
|
||||
" 'Pellentesque eget tincidunt felis. Ut ac vestibulum est.' \n",
|
||||
" 'In sed ipsum sit amet sapien scelerisque bibendum. Sed ' \n",
|
||||
" 'sagittis purus eu diam fermentum pellentesque.')\n",
|
||||
"long_story"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## `str.replace()`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"If you don't know how it works, you can always check the `help`:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"help(str.replace)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"This will not modify `my_string` because replace is not done in-place."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"my_string.replace('a', '?')\n",
|
||||
"print(my_string)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"You have to store the return value of `replace` instead."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"my_modified_string = my_string.replace('is', 'will be')\n",
|
||||
"print(my_modified_string)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## `str.format()`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"secret = '{} is cool'.format('Python')\n",
|
||||
"print(secret)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print('My name is {} {}, you can call me {}.'.format('John', 'Doe', 'John'))\n",
|
||||
"# is the same as:\n",
|
||||
"print('My name is {first} {family}, you can call me {first}.'.format(first='John', family='Doe'))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## `str.join()`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pandas = 'pandas'\n",
|
||||
"numpy = 'numpy'\n",
|
||||
"requests = 'requests'\n",
|
||||
"cool_python_libs = ', '.join([pandas, numpy, requests])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print('Some cool python libraries: {}'.format(cool_python_libs))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Alternatives (not as [Pythonic](http://docs.python-guide.org/en/latest/writing/style/#idioms) and [slower](https://waymoot.org/home/python_string/)):"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"cool_python_libs = pandas + ', ' + numpy + ', ' + requests\n",
|
||||
"print('Some cool python libraries: {}'.format(cool_python_libs))\n",
|
||||
"\n",
|
||||
"cool_python_libs = pandas\n",
|
||||
"cool_python_libs += ', ' + numpy\n",
|
||||
"cool_python_libs += ', ' + requests\n",
|
||||
"print('Some cool python libraries: {}'.format(cool_python_libs))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## `str.upper(), str.lower(), str.title()`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"mixed_case = 'PyTHoN hackER'"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"mixed_case.upper()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"mixed_case.lower()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"mixed_case.title()"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## `str.strip()`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ugly_formatted = ' \\n \\t Some story to tell '\n",
|
||||
"stripped = ugly_formatted.strip()\n",
|
||||
"\n",
|
||||
"print('ugly: {}'.format(ugly_formatted))\n",
|
||||
"print('stripped: {}'.format(ugly_formatted.strip()))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## `str.split()`"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"sentence = 'three different words'\n",
|
||||
"words = sentence.split()\n",
|
||||
"print(words)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"type(words)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"secret_binary_data = '01001,101101,11100000'\n",
|
||||
"binaries = secret_binary_data.split(',')\n",
|
||||
"print(binaries)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## Calling multiple methods in a row"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"ugly_mixed_case = ' ThIS LooKs BAd '\n",
|
||||
"pretty = ugly_mixed_case.strip().lower().replace('bad', 'good')\n",
|
||||
"print(pretty)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"Note that execution order is from left to right. Thus, this won't work:"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"pretty = ugly_mixed_case.replace('bad', 'good').strip().lower()\n",
|
||||
"print(pretty)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"## [Escape characters](http://python-reference.readthedocs.io/en/latest/docs/str/escapes.html#escape-characters)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"two_lines = 'First line\\nSecond line'\n",
|
||||
"print(two_lines)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"indented = '\\tThis will be indented'\n",
|
||||
"print(indented)"
|
||||
]
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.5.4"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 1
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
# https://gist.github.com/tomsing1/4c433655b3ac1aedb372ddfb1c7954db
|
||||
# python luigitutorial.py --local-scheduler HelloWorld
|
||||
# to run, execute in terminal
|
||||
# python helloworld.py --local-scheduler HelloWorl
|
||||
|
||||
import luigi
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
Few of the Extended Markdown features
|
||||
# Extended Markdown demo
|
||||
|
||||
#### Code
|
||||
```{.py3 linenums="1" hl_lines="5-7"}
|
||||
|
@ -68,30 +68,3 @@ $$
|
|||
\left(\frac{\left(\sqrt{\frac{73^2}{12x}}\sqrt{\frac{x|x|}{\log_x}}\right)}{\sqrt[3]{\frac xy}}\right)
|
||||
$$
|
||||
|
||||
#### Diagrams
|
||||
|
||||
```mermaid
|
||||
classDiagram
|
||||
Animal <|-- Duck
|
||||
Animal <|-- Fish
|
||||
Animal <|-- Zebra
|
||||
class Animal{
|
||||
+int age
|
||||
+String gender
|
||||
+isMammal()
|
||||
+mate()
|
||||
}
|
||||
class Duck{
|
||||
+String beakColor
|
||||
+swim()
|
||||
+quack()
|
||||
}
|
||||
class Fish{
|
||||
-int sizeInFeet
|
||||
-canEat()
|
||||
}
|
||||
class Zebra{
|
||||
+bool is_wild
|
||||
+run()
|
||||
}
|
||||
```
|
|
@ -3,14 +3,16 @@
|
|||
# ===========================================================
|
||||
|
||||
nav:
|
||||
- Home: index.md
|
||||
- standard-notebook.ipynb
|
||||
- scientific-notebook-demo.ipynb
|
||||
- index.md
|
||||
|
||||
|
||||
# ===========================================================
|
||||
# CONFIGURATION
|
||||
# ===========================================================
|
||||
|
||||
site_name: MkDocs Showcase
|
||||
site_name: MkDocs ++ Jupyter
|
||||
edit_uri: ""
|
||||
|
||||
# ===========================================================
|
||||
|
@ -28,7 +30,7 @@ theme:
|
|||
toggle:
|
||||
icon: material/weather-sunny
|
||||
name: Switch to light mode
|
||||
primary: indigo
|
||||
primary: black
|
||||
accent: blue
|
||||
- scheme: slate
|
||||
toggle:
|
||||
|
@ -44,15 +46,10 @@ extra:
|
|||
|
||||
plugins:
|
||||
- search
|
||||
- mkdocs-jupyter
|
||||
- include-markdown
|
||||
# Enable Macros and jinja2 templates
|
||||
- awesome-pages
|
||||
# mermaid2 diagrams: https://mermaid-js.github.io/mermaid/#/
|
||||
- mermaid2:
|
||||
arguments:
|
||||
theme: forest # default, forest, dark, neutral, base
|
||||
themeCSS: ".er.entityLabel{fill: black;} .messageLine0{stroke: orange;} .messageLine1{stroke: orange;} #arrowhead{fill: orange;} .messageText{fill: black; stroke: black}"
|
||||
|
||||
|
||||
markdown_extensions:
|
||||
- def_list
|
||||
|
@ -63,12 +60,6 @@ markdown_extensions:
|
|||
- admonition
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.details
|
||||
- pymdownx.superfences:
|
||||
# make exceptions to highlighting of code:
|
||||
custom_fences:
|
||||
- name: mermaid
|
||||
class: mermaid
|
||||
format: !!python/name:mermaid2.fence_mermaid
|
||||
- pymdownx.tabbed
|
||||
- abbr
|
||||
- pymdownx.snippets
|
|
@ -0,0 +1,71 @@
|
|||
# https://squidfunk.github.io/mkdocs-material/getting-started/#installation
|
||||
mkdocs-material==8.2.14
|
||||
mkdocs-material-extensions==1.0.3
|
||||
|
||||
mkdocs-jupyter==0.21.0
|
||||
|
||||
# https://pygments.org/
|
||||
Pygments== 2.12.0
|
||||
|
||||
# https://facelessuser.github.io/pymdown-extensions/
|
||||
pymdown-extensions==9.4
|
||||
|
||||
# https://github.com/mkdocstrings/mkdocstrings
|
||||
mkdocstrings==0.18.1
|
||||
|
||||
# https://ai2business.github.io/mkdocstrings-sourcelink/
|
||||
mkdocstrings-sourcelink==0.3.2
|
||||
|
||||
# https://github.com/fralau/mkdocs-mermaid2-plugin
|
||||
mkdocs-mermaid2-plugin==0.6.0
|
||||
|
||||
# https://github.com/backstage/mkdocs-monorepo-plugin
|
||||
mkdocs-monorepo-plugin==1.0.1
|
||||
|
||||
# https://github.com/jdoiro3/mkdocs-multirepo-plugin
|
||||
mkdocs-multirepo-plugin==0.3.5
|
||||
|
||||
# https://github.com/fralau/mkdocs_macros_plugin
|
||||
mkdocs-macros-plugin==0.5.12
|
||||
|
||||
# https://github.com/apenwarr/mkdocs-exclude
|
||||
mkdocs-exclude==1.0.2
|
||||
|
||||
# https://github.com/chrieke/mkdocs-exclude-search
|
||||
mkdocs-exclude-search==0.5.2
|
||||
|
||||
# https://github.com/datarobot/mkdocs-redirects
|
||||
mkdocs-redirects==1.0.3
|
||||
|
||||
# https://github.com/midnightprioriem/mkdocs-autolinks-plugin
|
||||
mkdocs-autolinks-plugin==0.4.0
|
||||
|
||||
# https://github.com/fiinnnn/mkdocs-mktemplate-plugin
|
||||
mkdocs-mktemplate-plugin==1.0.0
|
||||
|
||||
# https://github.com/rosscdh/mkdocs-markdownextradata-plugin
|
||||
mkdocs-markdownextradata-plugin==0.2.4
|
||||
|
||||
# https://github.com/lukasgeiter/mkdocs-awesome-pages-plugin
|
||||
mkdocs-awesome-pages-plugin==2.5.0
|
||||
|
||||
# https://github.com/christo-ph/mkdocs_build_plantuml
|
||||
mkdocs-build-plantuml-plugin==1.5.0
|
||||
|
||||
# https://github.com/mikitex70/plantuml-markdown
|
||||
plantuml-markdown==3.4.2
|
||||
|
||||
# https://github.com/mondeja/mkdocs-include-markdown-plugin
|
||||
mkdocs-include-markdown-plugin==3.2.1
|
||||
|
||||
# https://github.com/zhaoterryy/mkdocs-pdf-export-plugin
|
||||
mkdocs-pdf-export-plugin==0.5.8
|
||||
|
||||
# https://github.com/orzih/mkdocs-with-pdf
|
||||
mkdocs-with-pdf==0.9.2
|
||||
|
||||
# https://github.com/derJD/python-mkblog
|
||||
mkblog==1.2.0
|
||||
|
||||
# https://github.com/timvink/mkdocs-table-reader-plugin
|
||||
mkdocs-table-reader-plugin==0.6
|
|
@ -0,0 +1,88 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"# So easy, *voilà*!\n",
|
||||
"\n",
|
||||
"In this example notebook, we demonstrate how Voilà can render Jupyter notebooks with interactions requiring a roundtrip to the kernel."
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Jupyter Widgets"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"import ipywidgets as widgets\n",
|
||||
"\n",
|
||||
"slider = widgets.FloatSlider(description='$x$')\n",
|
||||
"text = widgets.FloatText(disabled=True, description='$x^2$')\n",
|
||||
"\n",
|
||||
"def compute(*ignore):\n",
|
||||
" text.value = str(slider.value ** 2)\n",
|
||||
"\n",
|
||||
"slider.observe(compute, 'value')\n",
|
||||
"\n",
|
||||
"slider.value = 4\n",
|
||||
"\n",
|
||||
"widgets.VBox([slider, text])"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"source": [
|
||||
"## Basic outputs of code cells"
|
||||
],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [
|
||||
"import pandas as pd\n",
|
||||
"\n",
|
||||
"iris = pd.read_csv('https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv')\n",
|
||||
"iris"
|
||||
],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"source": [],
|
||||
"outputs": [],
|
||||
"metadata": {}
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.8.5"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 4
|
||||
}
|
61
experimental/notebook-workspace/examples/voila/interactive.ipynb
Executable file
|
@ -0,0 +1,61 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"metadata": {},
|
||||
"source": [
|
||||
"# So easy, *voilà*!\n",
|
||||
"\n",
|
||||
"In this example notebook, we demonstrate how Voilà can render notebooks making use of ipywidget's `@interact`."
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"from ipywidgets import HBox, VBox, IntSlider, interactive_output\n",
|
||||
"from IPython.display import display\n",
|
||||
"\n",
|
||||
"a = IntSlider()\n",
|
||||
"b = IntSlider()\n",
|
||||
"\n",
|
||||
"def f(a, b):\n",
|
||||
" print(\"{} * {} = {}\".format(a, b, a * b))\n",
|
||||
"\n",
|
||||
"out = interactive_output(f, { \"a\": a, \"b\": b })\n",
|
||||
"\n",
|
||||
"display(HBox([VBox([a, b]), out]))"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.7.3"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
92
experimental/notebook-workspace/examples/voila/reveal.ipynb
Normal file
|
@ -0,0 +1,92 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"slideshow": {
|
||||
"slide_type": "slide"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print('hi')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import ipywidgets as widgets\n",
|
||||
"slider = widgets.FloatSlider(description='x')\n",
|
||||
"text = widgets.FloatText(disabled=True, description='$x^2$')\n",
|
||||
"text.disabled\n",
|
||||
"def compute(*ignore):\n",
|
||||
" text.value = str(slider.value**2)\n",
|
||||
"slider.observe(compute, 'value')\n",
|
||||
"slider.value = 14\n",
|
||||
"widgets.VBox([slider, text])"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"slideshow": {
|
||||
"slide_type": "slide"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"print('voila')"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"slideshow": {
|
||||
"slide_type": "subslide"
|
||||
}
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"1+2"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"celltoolbar": "Slideshow",
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.6.4"
|
||||
},
|
||||
"voila": {
|
||||
"template": "reveal"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 2
|
||||
}
|
53
experimental/notebook-workspace/examples/voila/widgets.ipynb
Normal file
|
@ -0,0 +1,53 @@
|
|||
{
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "ebaa184b-765f-4261-9c5c-285bbde8fad5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"import ipywidgets as widgets\n",
|
||||
"def generate(n):\n",
|
||||
" widget = []\n",
|
||||
" for i in range(n):\n",
|
||||
" inner = []\n",
|
||||
" for j in range(n):\n",
|
||||
" inner.append(widgets.Button(description=f'{i*n+j+1}'))\n",
|
||||
" widget.append(widgets.HBox(inner))\n",
|
||||
"\n",
|
||||
" return widgets.VBox(widget)\n",
|
||||
"generate(20)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "8b59589a-7c71-4b1a-896a-b1139cbcf70f",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": []
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"kernelspec": {
|
||||
"display_name": "Python 3 (ipykernel)",
|
||||
"language": "python",
|
||||
"name": "python3"
|
||||
},
|
||||
"language_info": {
|
||||
"codemirror_mode": {
|
||||
"name": "ipython",
|
||||
"version": 3
|
||||
},
|
||||
"file_extension": ".py",
|
||||
"mimetype": "text/x-python",
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.9.6"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 5
|
||||
}
|
21
experimental/notebook-workspace/jupyter-requirements.txt
Normal file
|
@ -0,0 +1,21 @@
|
|||
|
||||
## Notebook Extensions
|
||||
jupyter-lsp==1.5.1 # Autocompletion
|
||||
RISE==5.7.1 # Slides
|
||||
ipywidgets==7.7.0
|
||||
qgrid==1.3.1 # dataframe viz (Jupyter only)
|
||||
lux-api==0.5.1 # data discovery (both Jupyter and Jupyterlab)
|
||||
lux-widget==0.1.11
|
||||
dtale==2.5.1 # perfect data viz and discovery (Jupyterlab only)
|
||||
fugue==0.6.6 # SQL on pandas
|
||||
|
||||
## Basic data packages
|
||||
numpy==1.22.4
|
||||
pandas==1.4.2
|
||||
scipy==1.8.1
|
||||
matplotlib==3.5.2
|
||||
seaborn==0.11.2
|
||||
plotnine==0.8.0
|
||||
altair==4.2.0
|
||||
plotly==5.8.0
|
||||
jupyter-dash==0.4.2
|
|
@ -87,11 +87,18 @@
|
|||
"image": "assets/home/Jupyterlab.png",
|
||||
"description": "Notebook development environment. Great for complex notebook projects"
|
||||
},
|
||||
{
|
||||
"env": "DTALE_URL",
|
||||
"name": "D-Tale",
|
||||
"image": "assets/home/dtale.png",
|
||||
"description": "Comprehensive visual exploration, analysis and discovery from dataset files."
|
||||
},
|
||||
{
|
||||
"env": "NBVIEWER_URL",
|
||||
"subpath": "localfile/",
|
||||
"name": "Notebook viewer",
|
||||
"image": "assets/home/nbviewer.png",
|
||||
"description": "Display notebooks from folder <b>/home/project/nbviewer (10 minutes refresh delay)</b>"
|
||||
"description": "Display notebooks from folder <b>/home/project/nbviewer</b>"
|
||||
},
|
||||
{
|
||||
"env": "VOILA_URL",
|
||||
|
@ -99,18 +106,18 @@
|
|||
"image": "assets/home/voila.png",
|
||||
"description": "Render live Jupyter notebooks with interactive widgets from folder <b>/home/project/voila</b>"
|
||||
},
|
||||
{
|
||||
"env": "MERCURY_URL",
|
||||
"name": "Mercury",
|
||||
"image": "assets/home/mercury.png",
|
||||
"description": "Serve notebooks in any folder. To start app, cd to folder and run, i.e. <b>cd /home/examples/mercury; mercury run 0.0.0.0:8034</b>"
|
||||
},
|
||||
{
|
||||
"env": "LUIGI_URL",
|
||||
"name": "Luigi",
|
||||
"image": "assets/home/luigi.png",
|
||||
"description": "Luigi helps you build complex pipelines of batch jobs in Python"
|
||||
},
|
||||
{
|
||||
"env": "PORT_8038",
|
||||
"name": "Kedro",
|
||||
"image": "assets/home/kedro.png",
|
||||
"description": "Create reproducible, maintainable and modular data science pipelines. To start cd to kedro project and run <b>kedro viz --host 0.0.0.0 --port 8038 --no-browser</b>"
|
||||
},
|
||||
{
|
||||
"env": "CRONICLE_URL",
|
||||
"name": "Cronicle",
|
||||
|
@ -149,7 +156,11 @@
|
|||
{% for tool in tools %}
|
||||
{% set tool_url = get_tool_url(tool.env) %}
|
||||
<div>
|
||||
<a href="{{ tool_url }}" target="_blank" rel="noopener noreferrer">
|
||||
{% if tool.subpath is defined %}
|
||||
<a href="{{ tool_url }}/{{ tool.subpath }}" target="_blank" rel="noopener noreferrer">
|
||||
{% else %}
|
||||
<a href="{{ tool_url }}" target="_blank" rel="noopener noreferrer">
|
||||
{% endif %}
|
||||
<img src="{{ tool.image }}" class="tool-img"/>
|
||||
</a>
|
||||
<a href="{{ tool_url }}">
|
|
@ -19,7 +19,7 @@ port_increments = {
|
|||
"NBVIEWER_URL": 11,
|
||||
"LUIGI_URL": 12,
|
||||
"VOILA_URL": 13,
|
||||
"MERCURY_URL": 14,
|
||||
"DTALE_URL": 14,
|
||||
"PORT_8038": 18,
|
||||
"PORT_8039": 19,
|
||||
"PORT_8040": 20
|
Before Width: | Height: | Size: 640 KiB After Width: | Height: | Size: 640 KiB |
Before Width: | Height: | Size: 1.5 MiB After Width: | Height: | Size: 1.5 MiB |
BIN
experimental/notebook-workspace/mkdocs/img/dtale-charts.png
Normal file
After Width: | Height: | Size: 446 KiB |
BIN
experimental/notebook-workspace/mkdocs/img/dtale.png
Normal file
After Width: | Height: | Size: 550 KiB |
BIN
experimental/notebook-workspace/mkdocs/img/kedro.png
Normal file
After Width: | Height: | Size: 86 KiB |
Before Width: | Height: | Size: 108 KiB After Width: | Height: | Size: 108 KiB |
Before Width: | Height: | Size: 144 KiB After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
Before Width: | Height: | Size: 42 KiB After Width: | Height: | Size: 42 KiB |
Before Width: | Height: | Size: 23 KiB After Width: | Height: | Size: 23 KiB |
|
@ -4,6 +4,7 @@
|
|||
|
||||
nav:
|
||||
- Home: README.md
|
||||
- Results: pages/results.md
|
||||
- My apps: pages/my-apps.md
|
||||
- Docs: https://docs.alnoda.org/python-workspace/
|
||||
|
111
experimental/notebook-workspace/mkdocs/results.md
Normal file
|
@ -0,0 +1,111 @@
|
|||
<style>
|
||||
/* These styles apply only to this page! */
|
||||
.md-content__button {
|
||||
display: none;
|
||||
}
|
||||
.md-sidebar--secondary{
|
||||
display: none !important;
|
||||
}
|
||||
.md-typeset h1 {
|
||||
line-height: 0;
|
||||
margin: 0;
|
||||
margin-left: -9999px;
|
||||
}
|
||||
.quickstart-wrapper {
|
||||
min-width: 300px;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding-left: -50px;
|
||||
column-gap: 50px;
|
||||
row-gap: 50px;
|
||||
}
|
||||
.quickstart-wrapper > div {
|
||||
flex: 300px;
|
||||
max-width: 300px;
|
||||
}
|
||||
.tool-img{
|
||||
box-shadow: rgba(0, 0, 0, 0.24) 0px 5px 5px;
|
||||
border-radius: 5px;
|
||||
min-width: 300px;
|
||||
max-width: 300px;
|
||||
max-height: 170px;
|
||||
min-height: 170px;
|
||||
}
|
||||
.tool-caption{
|
||||
font-family: Roboto, Helvetica, sans-serif;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
font-size: 1.2rem;
|
||||
font-weight: bold;
|
||||
|
||||
/* font-size: 1.25em;
|
||||
font-weight: 400; */
|
||||
letter-spacing: -.02em;
|
||||
line-height: 1.5;
|
||||
}
|
||||
.tool-description{
|
||||
font-family: Helvetica, sans-serif;
|
||||
text-align: center;
|
||||
margin-top: 10px;
|
||||
font-size: 0.7rem;
|
||||
font-style: oblique;
|
||||
/* font-weight: bold; */
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
{%
|
||||
set tools = [
|
||||
{
|
||||
"env": "FILEBROWSER_URL",
|
||||
"name": "File Browser",
|
||||
"image": "Filebrowser.png",
|
||||
"description": "Browse, upload and download files and folders to and from the Workspace"
|
||||
},
|
||||
{
|
||||
"env": "NBVIEWER_URL",
|
||||
"subpath": "localfile/",
|
||||
"name": "Notebook viewer",
|
||||
"image": "nbviewer.png",
|
||||
"description": "Display notebooks from folder <b>/home/project/nbviewer</b>"
|
||||
},
|
||||
{
|
||||
"env": "VOILA_URL",
|
||||
"name": "Voila",
|
||||
"image": "voila.png",
|
||||
"description": "Render live Jupyter notebooks with interactive widgets from folder <b>/home/project/voila</b>"
|
||||
},
|
||||
{
|
||||
"env": "STATICFS_URL",
|
||||
"name": "Static File Server",
|
||||
"image": "Static-server.png",
|
||||
"description": "Serve any static websites like a breeze"
|
||||
},
|
||||
]
|
||||
%}
|
||||
|
||||
|
||||
<div class="quickstart-wrapper">
|
||||
{% for tool in tools %}
|
||||
{% set tool_url = get_tool_url(tool.env) %}
|
||||
<div>
|
||||
{% if tool.subpath is defined %}
|
||||
<a href="{{ tool_url }}/{{ tool.subpath }}" target="_blank" rel="noopener noreferrer">
|
||||
{% else %}
|
||||
<a href="{{ tool_url }}" target="_blank" rel="noopener noreferrer">
|
||||
{% endif %}
|
||||
<img src="{{ tool.image }}" class="tool-img"/>
|
||||
</a>
|
||||
<a href="{{ tool_url }}">
|
||||
<div class="tool-caption">{{ tool.name }}</div>
|
||||
</a>
|
||||
<div class="tool-description">{{ tool.description }}</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
BIN
experimental/notebook-workspace/mkdocs/results/Filebrowser.png
Normal file
After Width: | Height: | Size: 124 KiB |
BIN
experimental/notebook-workspace/mkdocs/results/Static-server.png
Normal file
After Width: | Height: | Size: 169 KiB |
BIN
experimental/notebook-workspace/mkdocs/results/mercury.png
Normal file
After Width: | Height: | Size: 144 KiB |
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
BIN
experimental/notebook-workspace/mkdocs/results/voila.png
Normal file
After Width: | Height: | Size: 23 KiB |
|
@ -331,7 +331,7 @@ class NBViewer(Application):
|
|||
default_value=1, help="Number of threads to use for Async Memcache."
|
||||
).tag(config=True)
|
||||
|
||||
no_cache = Bool(default_value=False, help="Do not cache results.").tag(config=True)
|
||||
no_cache = Bool(default_value=True, help="Do not cache results.").tag(config=True)
|
||||
|
||||
no_check_certificate = Bool(
|
||||
default_value=False, help="Do not validate SSL certificates."
|