Skip to content

Instantly share code, notes, and snippets.

# Example of an OS-specific installer for Windows.
#
# XXX FIXME: Replace hardcoded URL below with something like https://nextstrain.org/download/cli/windows
$ErrorActionPreference = "Stop"
if (!$IsWindows -and !$env:TESTING) {
echo "This is not Windows. Aborting!"
exit 1
}
commit 18010940faba6c5d20fbf19e37bcb3faf79f0b4b
Author: Thomas Sibley <tsibley@fredhutch.org>
Date: Fri Dec 7 12:33:17 2018 -0800
titers tree: Add a --branch-filter option allowing for a custom function
Sidney and I talked about this as a way to support a custom branch
"criterium" function. In her dengue work, she only includes
interserotype branches in the model.
diff --git a/augur/__init__.py b/augur/__init__.py
index 31ee6826..a69dcf44 100644
--- a/augur/__init__.py
+++ b/augur/__init__.py
@@ -142,4 +142,9 @@ def command_name(command):
package = command.__package__
module_name = command.__name__
+ # If the command module is also a package, e.g. augur/x/__init__.py instead
+ # of augur/x.py, then use the parent package.
@tsibley
tsibley / a
Last active June 23, 2022 18:13
changes
#!/bin/bash
# Extract changelog for a specified version (or __NEXT__ if no version
# specified).
set -euo pipefail
cd "$(dirname "$0")/.."
version="${1:-__NEXT__}"
export version
#!/bin/bash
set -euo pipefail
main() {
local domain="$1"
shift
local paths=("$@")
local distribution invalidation
echo "-> Finding CloudFront distribution"
2022-06-10T19:36:39.0592611Z Software Licensing Summary
2022-06-10T19:36:39.0593298Z ==========================
2022-06-10T19:36:39.0593757Z
2022-06-10T19:36:39.0594119Z 87 distinct software components
2022-06-10T19:36:39.0594432Z 0 lack a known software license
2022-06-10T19:36:39.0594733Z 22 have unknown license expressions
2022-06-10T19:36:39.0594978Z 15 distinct SPDX licenses
2022-06-10T19:36:39.0595262Z 2 components in the public domain
2022-06-10T19:36:39.0595517Z 2 have copyleft licenses
2022-06-10T19:36:39.0595670Z
#!/usr/bin/env python3
from netrc import netrc
from os.path import basename
from sys import argv, exit, stderr
if len(argv) < 2:
print(f"usage: {basename(__file__)} <machine> [login [password]]")
exit(1)
machine = argv[1]
# Example of a compact, OS-specific installer for Linux.
#
# XXX FIXME: Replace hardcoded URL below with something like https://nextstrain.org/download/cli/linux
dest="${XDG_DATA_HOME:-$HOME/.local/share}/nextstrain/cli/standalone" &&
mkdir -p "${dest}-new" &&
curl -fsSL --proto "=https" https://github.com/nextstrain/cli/releases/download/4.1.1/nextstrain-cli-4.1.1-standalone-x86_64-unknown-linux-gnu.tar.gz \
| tar xzf - -C "${dest}-new" &&
if [[ -d "$dest" ]]; then mv "$dest" "${dest}-old"; fi &&
mv "${dest}-new" "$dest" &&
printf 'Please add PATH="%s:$PATH" to your shell initialization files.\n' "$dest"
# This file defines how PyOxidizer application building and packaging is
# performed. See PyOxidizer's documentation at
# https://pyoxidizer.readthedocs.io/en/stable/ for details of this
# configuration file format.
# Define how to bundle a Python interpreter + our Python code + shared
# libraries + other resources into an executable and adjacent filesystem "lib/"
# tree.
def make_exe():
LS_COLORS='rs=0:di=01;34:ln=01;36:mh=00:pi=40;33:so=01;35:do=01;35:bd=40;33;01:cd=40;33;01:or=40;31;01:mi=00:su=37;41:sg=30;43:ca=30;41:tw=30;42:ow=34;42:st=37;44:ex=01;32:*.tar=01;31:*.tgz=01;31:*.arc=01;31:*.arj=01;31:*.taz=01;31:*.lha=01;31:*.lz4=01;31:*.lzh=01;31:*.lzma=01;31:*.tlz=01;31:*.txz=01;31:*.tzo=01;31:*.t7z=01;31:*.zip=01;31:*.z=01;31:*.Z=01;31:*.dz=01;31:*.gz=01;31:*.lrz=01;31:*.lz=01;31:*.lzo=01;31:*.xz=01;31:*.zst=01;31:*.tzst=01;31:*.bz2=01;31:*.bz=01;31:*.tbz=01;31:*.tbz2=01;31:*.tz=01;31:*.deb=01;31:*.rpm=01;31:*.jar=01;31:*.war=01;31:*.ear=01;31:*.sar=01;31:*.rar=01;31:*.alz=01;31:*.ace=01;31:*.zoo=01;31:*.cpio=01;31:*.7z=01;31:*.rz=01;31:*.cab=01;31:*.wim=01;31:*.swm=01;31:*.dwm=01;31:*.esd=01;31:*.jpg=01;35:*.jpeg=01;35:*.mjpg=01;35:*.mjpeg=01;35:*.gif=01;35:*.bmp=01;35:*.pbm=01;35:*.pgm=01;35:*.ppm=01;35:*.tga=01;35:*.xbm=01;35:*.xpm=01;35:*.tif=01;35:*.tiff=01;35:*.png=01;35:*.svg=01;35:*.svgz=01;35:*.mng=01;35:*.pcx=01;35:*.mov=01;35:*.mpg=01;35:*.mpeg=01;35:*.m2v=01;35:*.mkv=01;35:*