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
| { | |
| # sudo nix --experimental-features "nix-command flakes" run github:nix-community/disko/latest -- --mode destroy,format,mount --yes-wipe-all-disks ./disk-config.nix | |
| # nixos-install --flake github:damienpontifex/nixos-homelab?ref=main#homeserver | |
| disko.devices = { | |
| disk = { | |
| main = { | |
| device = "/dev/sda"; # Change to your actual disk (e.g., /dev/nvme0n1) | |
| type = "disk"; | |
| content = { | |
| type = "gpt"; |
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 argparse | |
| import psutil | |
| import tensorflow as tf | |
| from typing import Dict, Any, Callable, Tuple | |
| ## Data Input Function | |
| def data_input_fn(data_param, | |
| batch_size:int=None, | |
| shuffle=False) -> Callable[[], Tuple]: | |
| """Return the input function to get the test data. |
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
| .SHELLFLAGS := -o errexit -o nounset -o pipefail | |
| .DELETE_ON_ERROR: | |
| MAKEFLAGS += --warn-undefined-variables | |
| MAKEFLAGS += --no-builtin-rules | |
| .PHONY: help all fmt validate | |
| ## help: Display available commands and their descriptions | |
| help: | |
| @echo "Usage:" | |
| @sed -n 's/^##//p' $(MAKEFILE_LIST) \ |
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 | |
| # Add your use account as "Storage Blob Data Contributor" RBAC to the Access Control of the storage account | |
| STORAGE_ACCOUNT=<account-name> | |
| STORAGE_ACCESS_TOKEN=$(az account get-access-token --resource https://storage.azure.com/ --query accessToken -o tsv) | |
| curl \ | |
| -H "Authorization: Bearer $STORAGE_ACCESS_TOKEN" \ |
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
| # Interactive read the storage account name | |
| read -p "Storage account name: " STORAGE_ACCOUNT | |
| # Or set variable directly here | |
| # STORAGE_ACCOUNT=azurestorageaccountname | |
| STORAGE_CONTAINER=bazel-cpp-tutorial | |
| ACCESS_TOKEN=$(az account get-access-token \ | |
| --resource="https://${STORAGE_ACCOUNT}.blob.core.windows.net/" \ | |
| --query accessToken --output tsv) |
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
| Purposefully left blank for naming |
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
| pool: | |
| vmImage: 'ubuntu-latest' | |
| jobs: | |
| - job: Job1 | |
| steps: | |
| - script: | | |
| LABELS_JSON=$(curl -H "Authorization: Bearer ${SYSTEM_ACCESSTOKEN}" "$(System.TeamFoundationCollectionUri)$(System.TeamProject)/_apis/git/repositories/$(Build.Repository.Name)/pullRequests/$(System.PullRequest.PullRequestId)/labels?api-version=5.1-preview.1") | |
| echo $LABELS_JSON | |
| env: |
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
| <# | |
| .DESCRIPTION | |
| An example runbook which gets all the ARM resources using the Managed Identity | |
| .NOTES | |
| AUTHOR: Azure Automation Team | |
| LASTEDIT: Oct 26, 2021 | |
| #> | |
| try | |
| { |
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/env/bin python3 | |
| import argparse | |
| import os | |
| import sys | |
| import glob | |
| import pickle | |
| import tensorflow as tf | |
| import numpy as np | |
| from PIL import Image |
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
| # yaml-language-server: $schema=https://s3.amazonaws.com/cfn-resource-specifications-us-east-1-prod/schemas/2.15.0/all-spec.json | |
| AWSTemplateFormatVersion: 2010-09-09 | |
| Resources: |
NewerOlder