#Docker Snippets
# Use official image, debian slim build used vs alpine. see https://pythonspeed.com/articles/base-image-python-docker-images/
FROM python:3.7-slim| // Implementation of Atom's One Dark for hterm | |
| // JS forked from russelldavies/hterm_solarized.js | |
| // One Dark values taken from nathanbuchar/atom-one-dark-terminal | |
| // values for One Light soon. | |
| // Run in the JavaScript console of the hterm browser window | |
| // Clear all existing settings - you probably don't want to do this. | |
| // Preferences are now stored in "chrome.storage.sync" instead of | |
| // "window.localStorage" so if you clear your preferences the changes |
| ; NR cmd.exe PowerShell ONDEARK HEX DWORD | |
| ; -- ------- ----------- --------- ------- -------- | |
| ; 00 Black Black base03 #5C6370 0070635c | |
| ; 01 Blue DarkBlue base0 #61AFEF 00efaf61 | |
| ; 02 Green DarkGreen base01 #98C379 0079c398 | |
| ; 03 Aqua DarkCyan base1 #56B6C2 00c2b656 | |
| ; 04 Red DarkRed orange #E06C75 00756ce0 | |
| ; 05 Purple DarkMagenta violet #6c71c4 00c4716c | |
| ; 06 Yellow DarkYellow base00 #D19A66 00669ad1 | |
| ; 07 White Gray base2 #ABB2BF 00bfb2ab |
| deb http://ftp.sjtu.edu.cn/ubuntu trusty main restricted universe multiverse | |
| deb http://ftp.sjtu.edu.cn/ubuntu trusty-updates main restricted universe multiverse | |
| deb http://ftp.sjtu.edu.cn/ubuntu trusty-backports main restricted universe multiverse | |
| deb http://ftp.sjtu.edu.cn/ubuntu trusty-security main restricted universe multiverse |
| #Standard Library Python | |
| ## Basic CLI to run subprocess - based on file converter | |
| #!/usr/bin/env python | |
| import os | |
| import shutil | |
| import subprocess | |
| import re | |
| import argparse |
| from collections.abc import Iterable | |
| from numbers import Real | |
| import numpy as np | |
| import pandas as pd | |
| import matplotlib.pyplot as plt | |
| from numpy_financial import pv, fv | |
| def variable_contribution(initial, growth_rate,years): | |
| months = years * 12 |
| #!/usr/bin/env bash | |
| # | |
| # Bootstrap script for setting up a new MacOS machine | |
| # | |
| # TODO This should be idempotent so it can be run multiple times. | |
| # | |
| # Some apps don't have a cask and so still need to be installed by hand. These | |
| # include: | |
| # | |
| # - |
| import requests | |
| import pandas as pd | |
| from bs4 import BeautifulSoup | |
| BASE_URL = 'https://www.usbr.gov/projects/index.php?id=' | |
| def scrape_power_plant(id: int) -> dict: | |
| """ | |
| Returns power plant information from "Main-well" div as a dict |