This file contains 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
from collections import Counter | |
from argparse import ArgumentParser, FileType | |
from csv import DictReader, DictWriter | |
from sys import stdout | |
parser = ArgumentParser() | |
parser.add_argument("infile", type=FileType("r", encoding="utf-8")) | |
parser.add_argument("column_name") | |
parser.add_argument("-o", "--outfile", type=FileType("w", encoding="utf-8"), default=stdout) | |
args = parser.parse_args() |
This file contains 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 typing | |
def convert(it, context: str): | |
if isinstance(it, dict): | |
return typing.TypedDict( | |
context, | |
{ | |
k: convert(v, f"{context.capitalize()}{k.capitalize()}") | |
for (k, v) in it.items() |
This file contains 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
// define the name of the Azure Databricks notebook to run | |
val notebookToRun = ??? | |
// define some way to generate a sequence of workloads to run | |
val jobArguments = ??? | |
// define the number of workers per job | |
val workersPerJob = ??? | |
import java.util.concurrent.Executors |
This file contains 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 sh | |
# This docker-entrypoint populates environment variables from docker secrets. | |
# The docker secrets are assumed to be files in dotenv syntax. The requested | |
# secrets should be declared in the environment variable DOTENV_SECRETS, with | |
# multiple secret names separated by a semi-colon. | |
if [ ! -d /run/secrets ]; then | |
exec "$@" | |
fi |
This file contains 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 python | |
import re | |
ARQ_COL = '|' | |
ARQ_HLINE = '-' | |
ARQ_HHLINE = '=' |