This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#/bin/bash -e | |
az config set extension.use_dynamic_install=yes_without_prompt | |
# az extension add -n azure-cli-ml -y | |
# Attach the AKS to Azure ML as compute cluster | |
null=$(az ml computetarget attach aks \ | |
--name $AKS_COMPUTE_NAME_IN_AML \ | |
--resource-group $RESOURCE_GROUP_NAME \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pat_token_config=$(jq -n -c \ | |
--arg ls "$PAT_LIFETIME" \ | |
--arg co "Example Token" \ | |
'{lifetime_seconds: ($ls|tonumber), | |
comment: $co | |
}') | |
# Databricks Auth headers | |
adbGlobalToken=$(az account get-access-token --resource 2ff814a6-3304-4ab8-85cb-cd0e6f879c1d --output json | jq -r .accessToken) | |
azureApiToken=$(az account get-access-token --resource https://management.core.windows.net/ --output json | jq -r .accessToken) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"$schema": "https://schema.management.azure.com/schemas/2018-05-01/subscriptionDeploymentTemplate.json#", | |
"contentVersion": "1.0.0.0", | |
"metadata": { | |
"_generator": { | |
"name": "bicep", | |
"version": "0.4.412.5873", | |
"templateHash": "16564748480524566385" | |
} | |
}, |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cProfile | |
import io | |
import pstats | |
import random | |
import pandas as pd | |
from mimesis import Address, Datetime, Person | |
from mimesis.enums import Gender | |
person = Person('en') | |
addess = Address() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
import os | |
import logging | |
from subprocess import run, PIPE | |
import requests | |
import json | |
import time | |
from datetime import datetime | |
| |
now_file = f"{datetime.utcnow().strftime('%X').replace(':','-')}.log" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get 2 values from the output | |
command | jq -r '[.Key1.key2,.Key1.key2]' | |
# Get last element from list | |
command | jq .key[-1].key2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
export ARM_SUBSCRIPTION_ID= XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export ARM_TENANT_ID= XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export ARM_CLIENT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export ARM_CLIENT_SECRET=XXXXXXXXXXXXX | |
# Login using service principle |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/bash | |
set -o errexit | |
set -o nounset | |
set -o pipefail | |
export ARM_SUBSCRIPTION_ID= XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export ARM_TENANT_ID= XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export ARM_CLIENT_ID=XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX | |
export ARM_CLIENT_SECRET=XXXXXXXXXXXXX | |
export MANAGEMENT_RESOURCE_ENDPOINT="https://management.core.windows.net/" # This is Fixed value (DO NOT CHANGE) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Azure DevOps pipeline to build Databricks cluster | |
# This pipeline depends on "variable-group-01" to provide the below variables | |
# ARM_CLIENT_ID | |
# ARM_SUBSCRIPTION_ID | |
# ARM_TENANT_ID | |
# mySecret NOTE: This variable is mapped to ARM_CLIENT_SECRET below | |
trigger: | |
- starter |