Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
"""
Prints the global toctree hierarchy generated as part of a Sphinx build.
Requires that :file:`build/doctrees/environment.pickle` exists.
"""
import pickle
import sphinx.addnodes
from pathlib import Path
from sys import argv
diff --git a/.venv/lib/python3.8/site-packages/sphinxcontrib/autoprogram.py b/autoprogram.py
index 635ea82..f63d2d3 100644
--- a/.venv/lib/python3.8/site-packages/sphinxcontrib/autoprogram.py
+++ b/autoprogram.py
@@ -25,8 +25,7 @@ from docutils import nodes
from docutils.parsers.rst import Directive
from docutils.parsers.rst.directives import unchanged
from docutils.statemachine import StringList, ViewList
-from six import exec_
-from six.moves import builtins, reduce
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
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;
}
};
}