This file contains hidden or 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 biomsa from 'biomsa' | |
| import fetch from 'node-fetch' | |
| const sequence = async (id) => { | |
| const params = new URLSearchParams({ | |
| db: 'nuccore', | |
| retmode: 'text', | |
| rettype: 'fasta', | |
| id, | |
| }) |
This file contains hidden or 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
| /static/* | |
| Cache-Control: max-age=31536000 |
This file contains hidden or 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 fs from 'fs-extra' | |
| import Twitter from 'twitter-v2' | |
| const usernames = [] | |
| const auth = fs.readJSONSync('auth.json') | |
| const client = new Twitter(auth) | |
| for (const username of usernames) { |
This file contains hidden or 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
| curl -L https://data.usaid.gov/api/views/b6qu-bswt/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db event-dwellings - --csv --pk=PREDICT_EventID | |
| curl -L https://data.usaid.gov/api/views/dsdz-699h/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db event-value-chain - --csv --pk=PREDICT_EventID | |
| curl -L https://data.usaid.gov/api/views/ganm-umas/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db pcr-tests - --csv --pk=PREDICT_TestID --pk=PREDICT_SampleID | |
| curl -L https://data.usaid.gov/api/views/y7ch-pxe8/rows.csv?accessType=DOWNLOAD | sqlite-utils insert predict.db site-event-characterization - --csv --pk=PREDICT_EventID | |
| sqlite-utils create-index predict.db pcr-tests ViralFamilyTested | |
| sqlite-utils create-index predict.db pcr-tests TestResult | |
| sqlite-utils enable-fts predict.db pcr-tests Interpretation | |
| datasette publish cloudrun predict.db --service=predict --memory=1Gi --metadata=metadata.json |
This file contains hidden or 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
| @font-face { | |
| font-family: "STIX Two Text"; | |
| src: url("https://raw.githubusercontent.com/stipub/stixfonts/master/fonts/variable_ttf_woff2/STIXTwoText%5Bwght%5D.woff2") | |
| format("woff2-variations"); | |
| font-weight: 125 950; | |
| font-stretch: 75% 125%; | |
| font-style: normal; | |
| } |
This file contains hidden or 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
| const express = require('express') | |
| express().use('/api', require('./api')).use(express.static('public')).listen() |
This file contains hidden or 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
| docker run --rm -v "$PWD":/app -w /app --platform linux/amd64 node:12 npm install |
This file contains hidden or 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
| const { issueCommand, issue } = require('@actions/core/lib/command') | |
| const pathPrefixLength = process.cwd().length + 1 | |
| module.exports = results => { | |
| issue('group', 'ESLint Annotations') | |
| for (const result of results) { | |
| for (const message of result.messages) { | |
| const { fatal, severity, line, column: col } = message |
This file contains hidden or 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
| const robustFetch = async (url, tries = 3) => { | |
| let response | |
| do { | |
| try { | |
| response = await fetch(url) | |
| // TODO: check for response.ok | |
| return response |
This file contains hidden or 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
| // https://api.biorxiv.org/covid19/help | |
| let cursor = 0 | |
| do { | |
| const url = `https://api.biorxiv.org/covid19/${cursor}` | |
| const response = await fetch(url) | |
| const { messages: [message], collection } = await response.json() | |
| console.log(message) |