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 os | |
import subprocess | |
filenames = [] | |
# old path with ibooks | |
oldpath = "/path/to/ibooks/" | |
# Path to store new epub files in | |
newpath = "/new/path/for/epubs/" | |
# Function to store all filenames in a 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
import requests, json, re, time, itertools, datetime, sys, os, subprocess | |
from random import randint | |
redditThreads = [ | |
"https://www.reddit.com/r/AccidentalRenaissance/comments/kryhzt/us_capitol_protests_megathread_please_post_all/", | |
"https://www.reddit.com/r/DataHoarder/comments/krx449/megathread_archiving_the_capitol_hill_riots/", | |
"https://www.reddit.com/r/news/comments/krvwkf/megathread_protrump_protesters_storm_us_capitol/", | |
"https://www.reddit.com/r/politics/comments/kryi79/megathread_us_capitol_locked_down_as_trump/", | |
"https://www.reddit.com/r/PublicFreakout/comments/khs5k2/happening_now_trump_supporters_trying_to_destroy/", | |
"https://www.reddit.com/r/news/comments/krue9q/capitol_police_order_evacuation_of_some_capitol/", |
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 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 -- |
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
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") |
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
// t.prefs_.set('color-palette-overrides',["#121418", "#c94234", "#85c54c", "#f5ae2e", "#1398b9", "#d0633d", "#509552", "#e5c6aa", "#675f54", "#ff645a", "#98e036", "#e0d561", "#5fdaff", "#ff9269", "#84f088", "#f6f7ec"]); | |
t.prefs_.set('color-palette-overrides', ["#424242","#F4e2d9", "#8cd1b9", "#f4e2d9", | |
"#8ca4d1", "#ff9191", "#8cd1b9", "#C8a2a1", | |
"#f4e2d9", | |
"#ff9191", | |
"#8cd1b9", "#8cd1b9", | |
"#f8cac8", "#f8cac8", | |
"#8ca4d1", "#8ca4d1", | |
"#f9a47f", "#f9a47f", |
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
// t.prefs_.set('color-palette-overrides',["#121418", "#c94234", "#85c54c", "#f5ae2e", "#1398b9", "#d0633d", "#509552", "#e5c6aa", "#675f54", "#ff645a", "#98e036", "#e0d561", "#5fdaff", "#ff9269", "#84f088", "#f6f7ec"]); | |
t.prefs_.set('color-palette-overrides', ["#424242","#F4e2d9", "#8cd1b9", "#f4e2d9", | |
"#8ca4d1", "#ff9191", "#8cd1b9", "#C8a2a1", | |
"#f4e2d9", | |
"#ff9191", | |
"#8cd1b9", "#8cd1b9", | |
"#f8cac8", "#f8cac8", | |
"#8ca4d1", "#8ca4d1", | |
"#f9a47f", "#f9a47f", |
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
// t.prefs_.set('color-palette-overrides',["#121418", "#c94234", "#85c54c", "#f5ae2e", "#1398b9", "#d0633d", "#509552", "#e5c6aa", "#675f54", "#ff645a", "#98e036", "#e0d561", "#5fdaff", "#ff9269", "#84f088", "#f6f7ec"]); | |
t.prefs_.set('color-palette-overrides', ["#2e2e2e", "#F4e2d9", "#8cd1b9", "#f4e2d9", | |
"#8ca4d1", "#ff9191", "#8cd1b9", "#C8a2a1", | |
"#f4e2d9", "#ff9191", | |
"#8cd1b9", "#8cd1b9", | |
"#f8cac8", "#f8cac8", | |
"#8ca4d1", "#8ca4d1", | |
"#f9a47f", "#f9a47f", | |
"#8cd1b9", "#8cd1b9", |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
## 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.
NewerOlder