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
# Problem Set 7: Simulating the Spread of Disease, Body Temperature and Virus Population Dynamics | |
# Name: Kuan Butts | |
# Time: 22:00 | |
import numpy | |
import random | |
import pylab | |
# for checking work from prob. 3, 4, 5, 6 | |
#from ps7_precompiled_27 import * |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="UTF-8" /> | |
<title>Find a route using Geolocation and Google Maps API</title> | |
<script type="text/javascript" src="jquery-2.1.1.js"></script> | |
<script src="http://maps.google.com/maps/api/js?sensor=true"></script> | |
<script type="text/javascript" src="read-csv.js"></script> | |
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp"></script> | |
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> |
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
def adjacent_hanoi(num_discs, start_peg, end_peg): | |
""" | |
For this problem, discs should always start on the first peg and | |
end on the last peg. | |
num_discs: an integer number of discs | |
start_peg: starting peg | |
end_peg: ending peg | |
returns: integer number of moves, actual moves required | |
""" |
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
<!DOCTYPE HTML> | |
<html> | |
<head> | |
<title>CSS Only Dynamic Header</title> | |
</head> | |
<script type="text/javascript" src="https://code.jquery.com/jquery-2.1.4.min.js"></script> | |
<style type="text/css"> | |
body { |
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
[{ | |
"lat": "40.79142677512476", | |
"lng": "-73.93807411193848", | |
"name": "1 Ave @ 110 St", | |
"camera": "http://207.251.86.238/cctv261.jpg" | |
}, { | |
"lat": "40.800426144169315", | |
"lng": "-73.93155097961426", | |
"name": "1 Ave @ 124 St", | |
"camera": "http://207.251.86.238/cctv254.jpg" |
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
'use strict'; | |
const fs = require('fs'); | |
const parse = require('csv-parse'); | |
const db = require('knex')({ | |
client: 'postgresql', | |
connection: { | |
user: '', | |
database: 'clientcomm', | |
}, |
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 sys, csv, time | |
from dask import dataframe as dd | |
import geopandas as gpd | |
import pandas as pd | |
from shapely.wkt import loads | |
# log/monitor performance | |
start_time = time.time() | |
def log(message): |
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 matplotlib | |
# Force matplotlib to not use any Xwindows backend. | |
matplotlib.use('Agg') | |
import geopandas as gpd | |
import pandas as pd | |
from shapely.geometry import Point | |
import osmnx as ox | |
COUNTER = 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
import networkx as nx | |
import numpy as np | |
import pandas as pd | |
import time | |
from dgna.utils import format_pandana_edges_nodes | |
# read in osm data, load into top level variable | |
osm_edges = pd.read_csv('./data/osm_edges.csv') | |
osm_nodes = pd.read_csv('./data/osm_nodes.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
import dask.dataframe as dd | |
import geopandas as gpd | |
import logging | |
import math | |
import numpy as np | |
import pandas as pd | |
import sys | |
from dask.distributed import Client | |
from shapely.wkt import loads as wkt_loads | |
from shapely.wkb import loads as wkb_loads |
OlderNewer