Regexes to de-junk VAERS, removing nominal test results, maintenance and other non-symptomatic entities.
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 base64 | |
from typing import Union, Literal, Optional | |
import openai | |
import requests | |
import os, io | |
from PIL import Image | |
from openai import OpenAI | |
import uuid | |
import argparse |
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 datetime import datetime | |
t = datetime.now() | |
tstring = f"{t.day:02}{t.hour:02}{t.minute:02}{t.strftime('%b').upper()}{t.year}" |
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
states_by_borders = { | |
# does not include water borders: | |
# MI < > MN | |
# NY < > RI | |
"AL": ["FL", "GA", "MS", "TN"], | |
"AK": [], | |
"AZ": ["CA", "CO", "NV", "NM", "UT"], | |
"AR": ["LA", "MS", "MO", "OK", "TN", "TX"], | |
"CA": ["AZ", "NV", "OR"], | |
"CO": ["AZ", "KS", "NE", "NM", "OK", "UT", "WY"], |
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 pandas as pd | |
from random import choices | |
import dash | |
import dash_core_components as dcc | |
import dash_html_components as html | |
import pandas as pd | |
import numpy as np | |
import plotly.graph_objects as go | |
from dash.dependencies import Input, Output |
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 sshtunnel import SSHTunnelForwarder | |
from sqlalchemy import create_engine | |
from sqlalchemy.orm import sessionmaker | |
from functools import wraps | |
# secrets.py contains credentials, etc. | |
import secrets | |
def get_engine_for_port(port): | |
return create_engine('postgresql://{user}:{password}@{host}:{port}/{db}'.format( |
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:18.10 | |
LABEL maintainer="Chris von Csefalvay <[email protected]>" | |
RUN apt-get update | |
RUN apt-get install -y python3 python3-dev python3-pip | |
COPY requirements.txt /tmp/requirements.txt | |
RUN pip3 install -r /tmp/requirements.txt |
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
# R code that checks if a package is installed, and installs it from CRAN if not. | |
#' Install packages from a list if not present | |
#' | |
#' Installs packages from a provided list if they are not already installed. | |
#' | |
#' @param packages_list a list of packages to be installed | |
#' | |
#' @export | |
cran_install_if_not_present <- function(packages_list) { |
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
# Fetch most recent DRC data. | |
library(readr) | |
library(curl) | |
current_drc_data <- Sys.time() %>% | |
format("%d%H%M%S%b%Y") %>% | |
paste("raw_data/drc/", "drc-", ., ".csv", sep = "") %T>% | |
curl_fetch_disk("https://raw.githubusercontent.com/cmrivers/ebola_drc/master/drc/data.csv", .) %>% | |
read_csv() |
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
POWERLEVEL9K_MODE='awesome-patched' | |
POWERLEVEL9K_BATTERY_CHARGED='green' | |
POWERLEVEL9K_BATTERY_DISCONNECTED='$DEFAULT_COLOR' | |
POWERLEVEL9K_BATTERY_LOW_THRESHOLD='10' | |
POWERLEVEL9K_BATTERY_LOW_COLOR='red' | |
POWERLEVEL9K_BATTERY_ICON='\uf1e6 ' | |
POWERLEVEL9K_MULTILINE_FIRST_PROMPT_PREFIX='\n ' | |
POWERLEVEL9K_MULTILINE_LAST_PROMPT_PREFIX='\n' | |
POWERLEVEL9K_MULTILINE_SECOND_PROMPT_PREFIX="$> " |
NewerOlder