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 io.reactivex.Observable; | |
| import java.util.function.Supplier; | |
| /** | |
| * Wrapper around a Supplier (intended to be making remote service request), | |
| * that will attempt to retry a request if an exception occurs. | |
| * | |
| * @author Brian Schlining | |
| * @since 2019-04-24T13:54:00 |
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 scala.collection.BitSet | |
| import scala.collection.mutable | |
| case class CompressedGene(nucleotideCount: Int, bits: BitSet) { | |
| override def toString(): String = CompressedGene.decompress(this) | |
| } | |
| object CompressedGene { | |
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
| class CompressedGene: | |
| def __init__(self, gene: str) -> None: | |
| self._compress(gene) | |
| def _compress(self, gene: str) -> None: | |
| self.bit_string = 1 # start with sentinal | |
| for nucleotide in gene.upper(): | |
| self.bit_string <<= 2 # shift left 2 mits | |
| if nucleotide == "A": | |
| self.bit_string |= 0b00 |
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
| set -g __fish_prompt_grey A3A3A3 | |
| set -g __fish_git_prompt_char_cleanstate "✔" | |
| set -g __fish_git_prompt_char_conflictedstate "✖" | |
| set -g __fish_git_prompt_char_dirtystate "✚" | |
| set -g __fish_git_prompt_char_stagedstate "●" | |
| set -g __fish_git_prompt_char_stateseparator \U0020 #\Ue725 | |
| set -g __fish_git_prompt_char_untrackedfiles "…" | |
| set -g __fish_git_prompt_char_upstream_ahead "↑" | |
| set -g __fish_git_prompt_char_upstream_behind "↓" | |
| set -g __fish_git_prompt_char_upstream_prefix "" |
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
| # I keep all my config settings in .bashrc. | |
| # .bash_profile redirects there | |
| if [ -f ~/.bashrc ]; then | |
| source ~/.bashrc | |
| fi |
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 datetime | |
| import json | |
| import sys | |
| import requests | |
| # This example uses mock data. But it outlines the general steps needed. | |
| # If you have a lot of images, they can all be registered in a single | |
| # POST request, but you will need to build a JSON array of data first. | |
| # The details of this bulk load are NOT covered in this example |
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 java.net.http.HttpClient; | |
| import java.net.http.HttpRequest; | |
| import java.net.http.HttpResponse; | |
| import java.net.http.HttpResponse.BodyHandlers; | |
| import java.net.http.HttpResponse.BodySubscriber; | |
| import java.net.URI; | |
| import java.nio.ByteBuffer; | |
| import java.nio.charset.StandardCharsets; | |
| import java.util.ArrayList; | |
| import java.util.concurrent.CompletableFuture; |
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
| from datetime import datetime, timedelta | |
| from typing import List, Dict | |
| import iso8601 | |
| import requests | |
| import subprocess | |
| import sys | |
| __author__ = "Brian Schlining" | |
| __copyright__ = "Copyright 2018, Monterey Bay Aquarium Research Institute" |
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 datetime | |
| import json | |
| import sys | |
| import requests | |
| host = "http://localhost:8084" | |
| client_secret = "foo" | |
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
| FROM ubuntu | |
| RUN apt-get update \ | |
| && apt-get install -y --no-install-recommends \ | |
| build-essential \ | |
| curl \ | |
| cmake \ | |
| && rm -rf /var/lib/apt/lists/* | |
| RUN curl -qsSLkO \ |