I leverage Docker containers to launch JupyterLabs and would like the ability to apply user settings directly at launch, instead of configuring user settings through the "Advanced Settings Editor" GUI at every container launch.
In reviewing the following pull request, it does seem that this functionality should exist: https://github.com/jupyterlab/jupyterlab/pull/2585
I have not found anything referencing this capability in the JupyterLab documentation, so any leads would be greatly appreciated!
Running jupyter-lab --generate-config should generate a config file in /home/<USER>/.jupyter/jupyter_notebook_config.py
Settings for extensions are documented here:
https://jupyterlab.readthedocs.io/en/stable/user/extensions.html#settings
In short, you can supply and overrides.json in <sys-prefix>/share/jupyter/lab/settings where <sys-prefix> can be found by running jupyter lab path.
The example from the docs shows an overrides.json like this:
{
"#jupyterlab/apputils-extension:themes": {
"theme": "JupyterLab Dark"
}
}
I couldn't find any documentations, however in your folder ~/.jupyter/lab/user-settings/#jupyterlab if you create a custom notebook configuration (for instance), you will have a file created in notebook-extension/tracker.jupyterlab-settings.
You can copy the folder(s) you want to use for each of your container in this location, then when you start a jupyter lab, you should see the custom configuration(s) loaded correctly.
In /usr/local/share/jupyter/lab/schemas/#jupyterlab, you can find all default settings.
And in notebook-extension/tracker.json, you can find the recordTiming.
Change the default value will help.
Related
I created an Edge extension what if I install manually works perfectly. But if I want to install by registry settings it doesn't work. I tried to set up the registry:
HKEY_LOCAL_MACHINE\Software\Microsoft\Edge\Extensions
HKEY_LOCAL_MACHINE\Software\Wow6432Node\Microsoft\Edge\Extensions
key aaaaaaaaaabbbbbbbbbbcccccccccc
path: C:/extensions/extension.crx
version: 1.0
OR
HKEY_LOCAL_MACHINE\Software\Policies\Microsoft\Edge\ExtensionForceInstalllist
key 1
value aaaaaaaaaabbbbbbbbbbcccccccccc;C:/extensions/extension.crx
but it doesn't work.
The group policy you mentioned is indeed for installing extensions silently, but it has some limitations. For example this paragraph in the documentation description:
In this case, I think you need to check if your current environment matches this situation. In addition, if you need to publish your extension to the Edge Add-ons webstore, you can refer to this document: Publish a Microsoft Edge extension.
The problem was solved to place the crx file and update.xml a file server what is reachable from everywhere. The firewall caused the problem.
I have been trying to activate a virtual environment using Python built-in module venv from VSCode, But it didn't work properly And I didn't receive any error message. However, and also If I use venv\Scripts\activate.bat command in terminal it doesn't work.
Are you correctly setting up the venv?
python3 -m venv env
Then in the below section of your vscode taskbar you will find
Then select your interpreter(env) to use:
There are three things that I would check:
Does your vs-code have a default virtual environment defined as a user setting? Is that the one your current workspace is using?
Have you moved the folder you are working in since creating a virtual environment? If so, you should edit your venv/bin/activate script so that it has the correct value for the VIRTUAL_ENV variable.
In your project, do you have a .vscode/settings.json file that is referring to the wrong location or a location which doesn't exist? Specifically thinking of the "python.defaultInterpreterPath" setting.
These are things that I came across today when I had a similar problem. Hopefully that helps someone else!
{Ctrl+shift+'}
this will open a new terminal and automatically activate your virtual environment, found this in vs code documentation for flask virtual environments.
I also tried venv\Scripts\activate.bat and it wasn't having it; however cant remember the issue I was having.
Hope this saves some one a lot of time.
I'm working with node-red, on boilerplate IBM cloud. I know that there is a way, changing the value of enviroments variables(NODE_RED_USERNAME and NODE_RED_PASSWORD), to change username and password of the editor flow. But, what about UI dashboard? I mean using dashboard nodes. Forbid access to
https://noderedservicename.mybluemix.net/ui/
I know that on the code, changing the variable httpNodeAuth on the file settings.js I can do what I want. What is the way for doing that on IBM Cloud?
Thank you in advance!
You need to add the httpNodeAuth (not the httpAdminAuth as this is for controlling access to the Node-RED editor and can done with the environment variables discussed in the other answer.) to the app/bluemix-settings.js file.
Something like this:
...
httpStatic: path.join(__dirname,"public"),
httpNodeAuth: {user:"user",pass:"$2a$08$zZWtXTja0fB1pzD4sHCMyOCMYz2Z6dNbM6tl8sJogENOMcxWV9DN."},
functionGlobalContext: { },
...
Details of how to generate the pass can be found here
There are a number of ways you can edit the file, some of which include linking the Node-RED deployment to a git repository or downloading the whole app, editing the file and pushing it back to Bluemix (when you first deploy Node-RED from the starter pack it gives you instructions on how to download the source to make changes and then push them back. You can get to these instructions by clicking on the "Getting started" link in your Node-RED Bluemix console page).
But the quickest/simplest/dirtiest way is probably to just SSH into the instance and change the file with something like vi. Details on how to ssh to an app instance can be found here. But the following should work:
cf ssh [app name]
Once you have edited the file you will need to tell bluemix to restart the app. You can do this from the web console or with the cf command line tool.
(The changes made by this method will not survive if the app is restaged, or bluemix decides to move your instance to another machine internally because it will rebuild the app from the pushed sources. The permanent solution is to download the source, edit and push back)
This link will help you but it's written in Japanese.
http://dotnsf.blog.jp/archives/1030376575.html
Summary
You can define the "user-defined" environment variables through the IBM Cloud dashboard.
It contains the variables to protect Node-RED GUI.
You have to be set as follows
NODE_RED_USERNAME : username
NODE_RED_PASSWORD : password
I have set up deployR on an Azure VM, and have logged in as the testuser which comes as default with the installation.
Upon running the ccFraudScore.R model, I get the following error:
> if(!exists('fraudModel')){load('fraudModel.rData')}
Console Error cannot open the connection
API Error cannot open the connection
I also get the same error on my own scripts when trying to load or read.csv data, either from the same folder as the script, or using the deployrExternal() function, with a file to read in the appropriate folder in here: C:\Program Files\Microsoft\DeployR-<version>\deployr\external.
I have set all the inbound Windows Firewall rules to "public" and enabled them, as described in the install documentation.
Please could anyone point me in the direction of where to look next?
Update
Thanks to #warmoverflow, I looked at the diagnostics and the app logs, and it appears everything is configured correctly, and the updated Microsoft installation guide.
If I log in to <IP Address>:<Port>/deployr/landing as administrator, then go to Administration Console > The Grid, I can edit the External directory configuration Storage Context, which by default is /deployr/external/data, as expected from the installation guide.
However, the problem persists.
Temporary Fix
As a temporary fix, I use a full file path to reference any other scripts or data files I need to use, and this works, as follows:
> if(!exists('fraudModel')){load('C:\\Program Files\\Microsoft\\DeployR-8.0.5\\deployr\\external\\repository\\testuser\\example-fraud-score\\fraudModel.rData')}
Note that I have not edited the above file path from installation.
For some reason I cannot get this to work. I'm following the exact procedure described here
http://developer.chrome.com/extensions/external_extensions.html#registry
And I still cannot get the extension listed. If I install it manually, using "Add Unpacked Extension" it works just fine.
Any help would be greatly appreciated
One of many writeups on this subject:
Google on Friday announced that it is changing its stance for silently
installing extensions in its browser. As of Chrome 25, external
extension deployment options on Windows will be disabled by default
and all extensions previously installed using them will be
automatically disabled.
You're much better off submitting your extension to the Chrome Web Store. If you really want to install off-store, consider inline installation.
I have been struggling with installing an addon via the registry as well. I was successful with installing an addon without adding reg keys. And using the preferences file.
I extracted my extension to Local\Google\Chrome\User Data\Default\Extensions\${ADDONID}\${VERSION}
I then added my extension directly to the Preferences file in Local\Google\Chrome\User Data\Default under the section extensions settings ${ADDONID} <-- add your extension. Compare the Preferences file to an instance you have already installed your addon. And copy that to the Preferences file along with the extension directory on a fresh install. And it should work.
This thread gave me some direction:
https://superuser.com/questions/462804/how-to-copy-an-extension-from-one-chrome-installation-to-another