Skip to content

Instantly share code, notes, and snippets.

name: Run the Nextstrain public builds
on:
workflow_dispatch:
inputs:
dockerImage:
description: "Specific container image to use for build (will override the default of `nextstrain build`)"
required: false
type: string
from typing import MutableMapping, Mapping, Union
t = MutableMapping[str, Union[str, None]]
s = Mapping[str, Union[str, None]]
def f(x: t):
...
def g(x: s):
...
#!/bin/bash
#
# Try different dirs each with the following contents to observe differences in
# implementations.
#
# file "abc" with contents "A\nB\nC\n"
# file "xyz" with contents "X\0Y\0Z\n"
# file "e" with contents "\nEEE\n"
# empty file "x=y"
# file "x=y" with contents "Z"
#!/bin/bash
#
# Extracts the cache date from the registry images and provides them into the
# environment so local images may be built with caching even on the first time.
#
set -euo pipefail
main() {
local registry tag
#!/bin/bash
#
# Downloads the latest images, extracts their caching keys, and provides them
# into the environment so local images may be built using downloaded cached
# layers.
#
# This is necessary because usually local builds only use other locally built
# layers, so you must pay the cost of a full build at the beginning.
#
set -euo pipefail
from typing import NamedTuple
class Foo(NamedTuple):
name: str
def __getattribute__(self, attrname):
value = super().__getattribute__(attrname)
if attrname in super().__getattribute__("_fields"):
return lambda: value
function queryXPath(root, path) {
const result = document.evaluate(path, root);
return {
*[Symbol.iterator]() {
let node;
while ((node = result.iterateNext()) !== null)
yield node;
}
};
}
'
<p></p>
<div style=3D"background-color:#FFEB9C; width:100%; border-style: solid; bo=
rder-color:#9C6500; border-width:1pt; padding:2pt; font-size:10pt; line-hei=
ght:12pt; font-family:''Calibri''; color:Black; text-align: left;">
From c04b4e79916b73706deed209600dcee9ee1694b4 Mon Sep 17 00:00:00 2001
From: Thomas Sibley <tsibley@fredhutch.org>
Date: Thu, 27 Apr 2023 12:13:17 -0700
Subject: [PATCH] Use "href" template literals for safe-by-construction URL
strings
Avoids having to write out encodeURIComponent(), which is quite a
mouthful!
---
src/app.js | 7 +++----
#!/usr/bin/env perl
use strict;
use warnings;
use open qw< :std :encoding(UTF-8) >;
use utf8;
use HTML::FromANSI::Tiny;
my $conv = HTML::FromANSI::Tiny->new(
auto_reverse => 1,