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
func() { | |
echo "Hello world!" | |
} | |
export -f func | |
yes '' | parallel -j 10 --delay 0auto func |
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
<Project Sdk="Microsoft.NET.Sdk"> | |
<PropertyGroup> | |
<PublishDir>../Assets/NuGet</PublishDir> | |
<TargetFramework>netstandard2.1</TargetFramework> | |
<UnityBuildArchitecture>win-x64</UnityBuildArchitecture> | |
<ProtobufClientDir>../Assets</ProtobufClientDir> | |
</PropertyGroup> |
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 typing import Annotated, Callable, NamedTuple, Protocol, TypeVar | |
class MaxLength(NamedTuple): | |
""" | |
Summary | |
------- | |
a data structure for annotating the maximum length of a list | |
Attributes |
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 random import sample | |
from typing import Callable, Protocol, TypeVar | |
class Comparable(Protocol): | |
""" | |
Summary | |
------- | |
a protocol for comparable types | |
""" |
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
services: | |
consul: | |
container_name: consul | |
image: hashicorp/consul-enterprise:1.9.17-ent | |
network_mode: host | |
volumes: [./Consul.Test:/config:ro] | |
command: consul agent -dev -config-file config/test_config.json -log-level=error | |
healthcheck: | |
test: ['CMD-SHELL', 'curl localhost:8500/v1/status/leader'] | |
interval: 1s |
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 enum import Enum | |
class Players(Enum): | |
""" | |
Summary | |
------- | |
an enum to represent the players | |
""" | |
NULL = 0 |
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 type { Browser, BrowserContext, BrowserType, LaunchOptions, Page } from 'playwright' | |
import { chromium, firefox, webkit } from 'playwright' | |
type BrowserTypes = 'chromium' | 'webkit' | 'firefox' | |
type Endpoint = { | |
url: string | |
headers: Record<string, string> | |
} |
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
org=USER_NAME | |
repo=REPO_NAME | |
workflow_ids=(1 2 3) | |
for workflow_id in "${workflow_ids[@]}" | |
do | |
echo "Listing runs for the workflow ID $workflow_id" | |
run_ids=( $(gh api repos/$org/$repo/actions/workflows/$workflow_id/runs --paginate | jq '.workflow_runs[].id') ) | |
for run_id in "${run_ids[@]}" |
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 ubuntu:rolling | |
ENV DEBIAN_FRONTEND noninteractive | |
RUN apt update | |
RUN apt upgrade | |
RUN apt install r-base -y | |
RUN apt install python3-pip -y | |
RUN pip install -U radian | |
RUN echo "alias r='radian'" >> ~/.bashrc |
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 http.server import HTTPServer, SimpleHTTPRequestHandler | |
from json import dumps, loads | |
from sys import argv | |
from typing import Literal | |
class Server(SimpleHTTPRequestHandler): | |
""" | |
Summary | |
------- |
NewerOlder