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
package tofti.java.popularquestions; | |
import java.util.LinkedList; | |
import java.util.Queue; | |
import java.util.concurrent.atomic.AtomicLong; | |
public class NotifyNotifyAll { | |
static class Buffer<T> { | |
static final int MAX_CAPACITY = 1; |
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
import requests | |
import matplotlib.pyplot as plt | |
import time | |
def main(): | |
response = requests.get('https://covidtracking.com/api/states/daily') | |
data = response.json() | |
fig, subplots = plt.subplots(2, 2) | |
figure_row = 0 |
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
FROM ubuntu:latest | |
MAINTAINER Iain Toft | |
LABEL version="1.0" location="US" type="ubuntu-with-bitcoind" | |
ENV TZ=America/New_York | |
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone ; \ | |
apt-get -y update; \ | |
apt-get -y install sudo; \ | |
apt-get -y install vim; \ | |
apt-get -y install openssh-server; \ | |
apt-get -y install tmux; \ |
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
from urllib.request import urlopen | |
from hashlib import sha256 | |
from os.path import expanduser | |
def main(): | |
seed_words_url = 'https://raw.githubusercontent.com/bitcoin/bips/master/bip-0039/english.txt' | |
seed_words_file = urlopen(seed_words_url) | |
seed_words = seed_words_file.read().decode("utf8").split("\n") | |
seed_words_count = len(seed_words) |