Application ID Servie Principal Secret Resource Group Name Databricks Workspace Name Subscription ID TenantID
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 re | |
import os | |
import glob | |
import collections | |
import contextlib | |
PatchEntry = collections.namedtuple('PatchEntry', 'version,path') | |
patch_key = lambda x: x.version |
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
function Templetize-ArmTemplateParams { | |
param( | |
$InputParamsFile | |
) | |
$json = Get-Content $InputParamsFile | Out-String | ConvertFrom-Json | |
foreach($param in $json.parameters.PSObject.Properties) | |
{ |
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
# https://docs.microsoft.com/en-us/previous-versions/powershell/module/Microsoft.PowerShell.Utility/Send-MailMessage?view=powershell-5.0 | |
$smtp = "smtp.office365.com" | |
$username = "username here ..." | |
$passwordText = "password here ..." | |
$from = $username | |
$to = $username |
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
# https://docs.databricks.com/dev-tools/api/latest/secrets.html | |
# https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-6 | |
if ( ! $DBConfig ) { | |
$DBConfig = @{ | |
BaseUri = "https://westeurope.azuredatabricks.net/api" | |
Token = "XXXXXXXXXXXXXXXXXXXXXXXXX" | |
} | |
} |
data = [
('1990-05-03', 29, True),
('1994-09-23', 25, False)
]
df = spark.createDataFrame(data, ['dob', 'age', 'is_fan'])
df.printSchema()
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
# Docker image with ImageMagick installed | |
# | |
# To build a docker image, execute: | |
# docker build -t imagick . | |
# | |
# To create a docker container, execute: | |
# docker run -it --rm --name imagick -v ${PWD}:/mydata -w /mydata imagick | |
FROM ubuntu:19.04 | |
RUN apt-get update \ |