Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains 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
#!/usr/bin/env bash | |
set -Eeuo pipefail | |
cd "$(dirname "${BASH_SOURCE[0]}")" >/dev/null 2>&1 | |
trap cleanup SIGINT SIGTERM ERR EXIT | |
usage() { | |
cat <<EOF |
This file contains 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
#!/bin/bash | |
# Genesets aggregated by taxid | |
aggs=`curl -s "https://mygeneset.info/v1/query?q=*&facets=taxid&facet_size=100"` | |
taxids=`echo $aggs | jq -r '.facets.taxid.terms | map(.term) | @csv'` | |
counts=`echo $aggs | jq -r '.facets.taxid.terms | map(.count) | @csv'` | |
# Query scientific name for each taxid | |
resp=`curl -s -X POST -d "q=${taxids}" "http://t.biothings.io/v1/query"` | |
species=`echo $resp | jq -r 'map(.scientific_name) | @csv'` |
This file contains 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
"""Web config to run MyGeneset API on GitHub Actions""" | |
import os | |
ES_INDEX = 'user_genesets' | |
COOKIE_SECRET = "JKA#9%Wc4ofuqM@C!&yLFsYE" | |
# ORCID keys | |
ORCID_CLIENT_ID = os.environ['ORCID_CLIENT_ID'] |
This file contains 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
#!/bin/bash | |
set -euo pipefail | |
# This script sends a request to the OpenAI completions endpoint and parses the output using jq. | |
# It is recommended that the API key is stored in an environment variable. | |
usage() { | |
echo "Usage: $0 [-k OPENAI_API_KEY] [-m MODEL] [-t MAX_TOKENS] PROMPT" | |
echo "Example: $0 -m text-davinci-002 -t 500 \"What is the capital of France?\"" |
OlderNewer