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
curl -X POST \ | |
-H "Ocp-Apim-Subscription-Key: YOUR_DOCUMENT_INTELLIGENCE_SUBSCRIPTION_KEY" \ | |
-H "Content-Type: multipart/form-data" \ | |
-F "file=@c:/data/example.pdf" \ | |
"YOUR_DOCUMENT_INTELLIGENCE_ENDPOINT/documentintelligence/rest/v1.0-preview/custom/models/YOUR_MODEL_GUID/analyze" |
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
param ( | |
[Parameter(Mandatory = $true)] | |
[string]$Organization, | |
[Parameter(Mandatory = $true)] | |
[string]$Project, | |
[Parameter(Mandatory = $true)] | |
[string]$ClientId, |
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
# read a json local file from local disk and extract the build information | |
import json | |
import requests | |
json_url = 'http://localhost:8080/v1/rules' | |
# load json form url and extract the build information | |
json_file = requests.get(json_url).json() | |
# json_file = 'test.json' | |
# get base adress from json_url |
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://583c-77-201-81-191.ngrok-free.app/dashboards |
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
cluster: | |
name: my-cluster | |
externalServices: | |
prometheus: | |
host: http://mimir-nginx.observability.svc:80 | |
# queryEndpoint: /api/v1/push | |
writeEndpoint: /api/v1/push | |
authMode: none | |
tenantId: "1" |
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
# Powershell script to download and install grafana alloy in silent mode | |
# https://github.com/grafana/alloy/releases/download/v1.1.1/alloy-installer-windows-amd64.exe.zip | |
# Define the URL of the alloy installer | |
$url = "https://github.com/grafana/alloy/releases/download/v1.1.1/alloy-installer-windows-amd64.exe.zip" | |
# Define the path where the installer will be saved | |
$installerPath = "$env:TEMP\alloy-installer-windows-amd64.exe.zip" | |
# Download the installer | |
Invoke-WebRequest -Uri $url -OutFile $installerPath |
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 run -it \ | |
--name pytorch \ | |
--network=host \ | |
--cap-add=SYS_PTRACE \ | |
--security-opt seccomp=unconfined \ | |
--device=/dev/kfd \ | |
--device=/dev/dri \ | |
--group-add video \ | |
--ipc=host \ | |
--shm-size 8G \ |
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
output_address_cidr = "${join(".", [split(".", local.base_address)[0], split(".", local.base_address)[1], split(".", local.base_address)[2], split(".", split("/", local.other_address_cidr)[0])[3]])}/${split("/", local.other_address_cidr)[1]}" |
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
# terraformer import azure -R edgeprime-oss -r subnet | |
# terraform plan -out=tfplan | |
# terraform show -json tfplan > plan.json | |
# bash script to automatically import state to terraform | |
#!/bin/bash | |
# get all the ressources id and name from the state file | |
file="imported.tfstate" | |
# jq '.modules[].resources | .[] | {type: .type, id: .primary.id, name: .primary.attributes.name}' "$file" | |
# put the ressources id and name, and type with jq into the variable ressources | |
existing_ressources=$(jq '[.modules[].resources | .[] | { type: .type, name: .primary.attributes.name, id: .primary.id}]' imported.tfstate) |
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
provider "azurerm" { | |
features {} | |
} | |
data "azurerm_container_registry" "acr" { | |
name = var.registry_name | |
resource_group_name = var.resource_group_name | |
} | |
resource "azurerm_container_registry_task" "daily_purge_prod_images" { |
NewerOlder