Skip to content

Instantly share code, notes, and snippets.

'
<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 <[email protected]>
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,
#!/usr/bin/env python3
"""
usage: tsv-cast-header <target.tsv> <source.tsv>
Casts a <source.tsv> into the header of <target.tsv>.
Columns are reordered, dropped, and added as necessary. Added columns will
have blank values.
No output will be emitted if <source.tsv> has no rows. <target.tsv> must have
diff --git a/tmp/babel b/tmp/ts
index c714d34cb..53848a13a 100644
--- a/tmp/babel
+++ b/tmp/ts
@@ -5,43 +5,20 @@
"body": [
{
"computed": false,
- "end": 75,
"key": {
commit 481c822bc0eff8173be7788ca9b4acc48359c0c2
Author: Thomas Sibley <[email protected]>
Date: Wed Nov 9 09:39:37 2022 -0800
wip! remote download: not in manifest
diff --git a/nextstrain/cli/remote/nextstrain_dot_org.py b/nextstrain/cli/remote/nextstrain_dot_org.py
index 4c7f5c8..fd4c420 100644
--- a/nextstrain/cli/remote/nextstrain_dot_org.py
+++ b/nextstrain/cli/remote/nextstrain_dot_org.py
#!/bin/bash
# usage: pypreload <code> <cmd> [<arg> [<arg> […]]]
#
# See <https://docs.python.org/3/library/site.html> for how the "sitecustomize"
# module works.
#
set -euo pipefail
code="$1"
shift
From 3c10552e28e1133a521b3150038ed100261a9ef9 Mon Sep 17 00:00:00 2001
From: Thomas Sibley <[email protected]>
Date: Tue, 28 Feb 2023 16:24:24 -0800
Subject: [PATCH 1/2] wip! crossbreed's autopilots
---
nextstrain/cli/runner/aws_batch/jobs.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/nextstrain/cli/runner/aws_batch/jobs.py b/nextstrain/cli/runner/aws_batch/jobs.py
SHELL := bash -euo pipefail
plan:
terraform plan -out=plan
apply: plan
terraform apply plan
init:
terraform init
@tsibley
tsibley / trace.py
Last active February 10, 2023 19:19
"""
Trace Python execution at a function level.
Usage::
import trace
trace.start()
Currently only traces the current thread, but it could be extended to handle
multiple threads using :py:func:`threading.setprofile` and