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.time.Instant | |
import scala.collection.mutable | |
import scilube.Matlib | |
class BudgetTimeSeries { | |
private[this] val series = new mutable.TreeMap[Instant, Double] | |
def addToSeries(events: Seq[Transaction]): Unit = { |
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.time.{Duration, Instant} | |
object BudgetPlot extends App with scalax.chart.module.Charting { | |
val budget = CurrentBudget | |
val endDate = Instant.now.plus(Duration.ofDays(365)) | |
def filter(s: Stream[Transaction]): Stream[Transaction] = s.takeWhile(i => i.date.isBefore(endDate)) | |
val timeseries = new BudgetTimeSeries | |
budget.events |
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", |
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
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 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 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
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
# 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
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 "" |