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 \ |
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
>> ffprobe -loglevel quiet -show_streams -show_format -show_error -print_format json C01_2017_S027_S003_T002.MOV | |
# NOTES: File looks good. Has creation-time atom | |
{ | |
"streams": [ | |
{ | |
"index": 0, | |
"codec_name": "pcm_s24le", | |
"codec_long_name": "PCM signed 24-bit little-endian", | |
"codec_type": "audio", | |
"codec_time_base": "1/48000", |