wget https://repo.anaconda.com/miniconda/Miniconda3-latest-Linux-x86_64.sh
bash Miniconda3-latest-Linux-x86_64.sh
# yes yes
source ~/.bashrc
rm Miniconda3-latest-Linux-x86_64.sh
# to ensure WSL can start normally without an active conda env
Conda helps you manage python environments on your local machine, keeping your system python free of packages that you may need for your python experiments.
The Device login routine used by the AML Python SDK uses the default tenant associated with the login account. This can create issues when working with AML instances in other tenants.
Use the simple login if your AML workspace is within your default tenant. Use the alternative login to force login into a specific tenant.
This uses the config.json file in the directory structure of the local system. For an AML-provisioned compute VM, this file is located at the root /config.json. If you get an error here as a result of logging into the wrong tenant, use the alternative below.
from azureml.core import Workspace
ws.Workspace.from_config()
Here’s a scala notebook cell to run an arbitrary TSQL batch using JDBC:
%scala
import java.util.Properties
import java.sql.DriverManager
val jdbcUsername = dbutils.secrets.get(scope = "kv", key = "sqluser")
val jdbcPassword = dbutils.secrets.get(scope = "kv", key = "sqlpassword")
#!/bin/bash | |
######################################################################################## | |
# Check for or stop all running Azure ML compute instances within the current # | |
# subscription or specified workspace # | |
# * uses the azure resource graph to check for resources across resource groups # | |
# * assumes Azure CLI is installed and a default subscription is set (az account set) # | |
# * use the -h option to see usage # | |
######################################################################################## |
Note: these are tested on WSLv2 - add them to
~/.bash_aliases
or other bash profile file.
alias newgist='wslview https://gist.github.com'
alias newgit='wslview https://github.com'
alias ap='wslview https://portal.azure.com'
# go to current repo web page - requires cli.github.com (ref [1])
alias gg='gh repo view --web'
Disclaimer: There are many subtleties to using git - this is a very basic workflow. Discuss in your team how you want to work!
This gist assumes that you have authorisation to clone/pull/push from your repo. Either it is public, or you have set up ssh authentication.
git clone <http or ssh link from git portal>
# change into the folder that is created as a result of the cloning.
cd <repo name>
Merge conflicts are not scary. Any good text editor like VSCode for example will help with buttons and visualisations of what you need to do. But here's the gist...
When a merge conflict occurs, git will actually insert some lines in the file to mark the spot and show both versions of lines that are conflicting:
<<<<<<< HEAD
my current text in the file
=======
Note that service principal role assignments may take a short while to become available, so give it a few minutes before testing the access.
az ad sp create-for-rbac --name myAMLWorkspaceRep
Note the appId (client ID) and password (client secret) returned: