Skip to content

Instantly share code, notes, and snippets.

View dcalacci's full-sized avatar
🦩
wfh baby

Dana Calacci dcalacci

🦩
wfh baby
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dcalacci
dcalacci / nn.py
Last active July 25, 2017 19:55
Simple Neural Network in Tensorflow
## Authors: Dan Calacci
## Adapted from Natashe Jaque's NN code for PML '17
## intended to be used with a larger framework for deep learning
import tensorflow as tf
import numpy as np
import math
import json
import matplotlib.pyplot as plt
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@dcalacci
dcalacci / blink.js
Last active June 18, 2019 13:42
blink shell theme
@dcalacci
dcalacci / covid-mobility-sir.R
Last active May 7, 2020 20:47
contagion modeling with mobility O/D matrices
library(tidyverse)
library(data.table)
library(glue)
library(parallel)
library(pbmcapply)
here <- here::here
OD <- read_csv(here("output/OD.csv"))
OD.norm <- t(t(OD) / colSums(OD))
pop <- read_csv(here("output/pop.csv"), col_types="nc")
@dcalacci
dcalacci / get-bos-incident-reports.py
Last active May 14, 2020 02:12
Daily script to pull boston incident reports
from bs4 import BeautifulSoup
import time
import os
import requests
import urllib
f = urllib.request.urlopen('https://data.boston.gov/dataset/crime-incident-reports-august-2015-to-date-source-new-system')
soup = BeautifulSoup(f.fp)
# finds all the "primary" buttons on the page -- these are those blue ones --