Opening an external notebook with DSX Desktop - data-science-experience

I have an IPython notebook on a directory in my Desktop. This directory also contains supporting Python (.py) files that the notebook imports.
How can I open the notebook with DSX Desktop without moving everything to the 'mynotebooks' directory? (/Users/username/Library/Application Support/ibm-dsx-desktop/Notebooks/mynotebooks in mac, source: https://datascience.ibm.com/docs/content/desktop/files.html) ?

To import your notebook
Go inside a project
Click the "+" icon in the top-right corner and choose "Create notebook"
Select "From File" and choose the notebook to import
To upload your supporting python files (and assets in general)
Go inside a project or have a notebook open
Click the "+" icon in the top-right corner and choose "Add data set"
Choose the assets to upload (your python files)
Accessing your assets from inside a notebook
You can access your assets from inside a notebook via the path ../datasets/<asset name>. Jupyter provides code completion which is helpful.

Related

Programmatically enable installed extensions in Vertex AI Managed Notebook instance

I am working in JupyterLab within a Managed Notebook instance, accessed through the Vertex AI workbench, as part of a Google Cloud Project. When the instance is created, there are a number of JupyterLab extensions that are installed by default. In the web GUI, one can click the puzzle piece icon and enable/disable all extensions with a single button click. I currently run a post-startup bash script to manage environments and module installations, and I would like to add to this script whatever commands would turn on the existing extensions. My understanding is that I can do this with
# Status of extensions
jupyter labextension list
# Enable/disable some extension
jupyter labextension enable extensionIdentifierHere
However, when I test the enable/disable command in an instance Terminal window, I receive, for example
[Errno 13] Permission denied: '/opt/conda/etc/jupyter/labconfig/page_config.json'
If I try to run this with sudo, I am asked for a password, but have no idea what that would be, given that I just built the environment and didn't set any password.
Any insights on how to set this up, what the command(s) may be, or how else to approach this, would be appreciated.
Potentially relevant:
Not able to install Jupyterlab extensions on GCP AI Platform Notebooks
Unable to sudo to Deep Learning Image
https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#enabling-and-disabling-extensions
Edit 1:
Adding more detail in response to answers and comments (#gogasca, #kiranmathew). My goal is to use ipyleaft-based mapping, through the geemap and earthengine-api python modules, within the notebook. If I create a Managed Notebook instance (service account, Networks shared with me, Enable terminal, all other defaults), launch JupyterLab, open the Terminal from the Launcher, and then run a bash script that creates a venv virtual environment, exposes a custom kernel, and performs the installations, I can use geemap and ipywidgets to visualize and modify (e.g., widget sliders that change map properties) Google Earth Engine assets in a Notebook. If I try to replicate this using a Docker image, it seems to break the connection with ipyleaflet, such that when I start the instance and use a Notebook, I have access to the modules (they can be imported) but can't use ipyleaflet to do the visualization. I thought the issue was that I was not properly enabling the extensions, per the "Error displaying widget: model not found" error, addressed in this, this, this, this, etc. -- hence the title of my post. I tried using and modifying #TylerErickson 's Dockerfile that modifies a Google deep learning container and should handle all of this (here), but both the original and modifications break the ipyleaflet connection when booting the Managed Notebook instance from the Docker image.
Google Managed Notebooks do not support third-party JL extensions. Most of these extensions require a rebuild of the JupyterLab static assets bundle. This requires root access which our Managed Notebooks do not support.
Untangling this limitation would require a significant change to the permission and security model that Managed Notebooks provides. It would also have implications for the supportability of the product itself since a user could effectively break their Managed Notebook by installing something rogue.
I would suggest to use User Managed Notebooks.

How do I import a live template .jar file for React snippets into JetBrains WebStorm?

I downloaded a live template .jar file from jinsihou19 ReactSnippets on GitHub, referred by the JetBrains Marketplace.
I could not find any documentation on how to install the .jar file on either sites.
Does anyone know how to install this .jar file into WebStorm?
To install a plugin from a jar, follow the documentation:
Download the plugin archive (ZIP or JAR).
Press Ctrl+Alt+S to open the IDE settings and select Plugins.
On the Plugins page, click The Settings button and then click Install Plugin from Disk.
Select the plugin archive file and click OK.
Click OK to apply the changes and restart the IDE if prompted.
However, it's probably easier to search the marketplace in Webstorm for React snippets and click install there, as you'll find the same plugin.

Customizing the cloud environment to include a package permanently

I have been using some packages by installing them using the sudo apt-get command in the cloud shell. But now I want to make it permanent. I got this message in the shell
You are running apt-get inside of Cloud Shell. Note that your Cloud Shell
machine is ephemeral and no system-wide change will persist beyond session end.
You can customize your environment to permanently include this package by
updating your environment at https://cloud.google.com/console/cloudshell/environment/view.
So how to customize the cloud environment to include a package permanently?
You have several options.
1) Reinstall everything each time you launch Cloud Shell. This sounds bad but if you keep your files on GCS, the copy happens very fast.
2) Cloud Shell is a Docker container. You can modify that container so that you launch Cloud Shell using your customized container. Launch Cloud Shell. In the title bar on the right hand side is a icon that looks like a laptop. Click it. This will open a window with details on configuring the Docker container.
3) Keep everything local to your home directory. You home directory tree is persistent and will be restored each time your Cloud Shell VM is recreated.

Using google cloud code editor

How to open files using code editor which is stored in compute engine created under google cloud? I can open for files stored using temporary cloud shell but not for the ones stored in compute engine.
Google Cloud Shell code editor can only open files that are stored in your Cloud Shell home directory (which, by the way, is not temporary; unlike Cloud Shell VMs that are recycled, home directory persists between sessions).
Cloud Shell code editor is based on the open source Orion editor. If you like that editor, you can install it on your GCE VM and connect to it directly.

Eclipse C/C++ (CDT) switching workspaces (sharing)

I am trying to share a workspace in Eclipse. To test it I copied my current workspace to a different directory. Then when eclipse loads it pops up a dialog box to select a workspace.
When I changed the workspace to the one I copied it did not work. It did not load the workspace I copied and loaded the default screen. Is there anyway to save a workspace to a different location and reload it for later use?
I am using eclipse 3.7.0 on ubuntu 11.10.
I solved this by exporting a project archive. Then importing the project as an archive in a new workspace.