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
# METHOD 1: INDEX ON GRID, LOOP THROUGH ISOCHRONES | |
# Add columns of zero and empty dictionaries | |
grid_copy['count_unique'] = 0 | |
grid_copy['sum_times'] = 0 | |
empty = {key: np.inf for key in isochrones.origin.unique()} | |
grid_copy['unique_ids'] = [[] for i in range(len(grid_copy))] | |
grid_copy['min_times'] = [{key: np.inf for key in isochrones.origin.unique()} for i in range(len(grid_copy))] | |
spatial_index = grid_copy.sindex | |
for idx, isochrone in isochrones.iterrows(): | |
possible_matches_index = list(spatial_index.intersection(isochrone.geometry.bounds)) |
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 faker import Faker | |
fake = Faker() | |
print(fake.name()) | |
print(fake.company()) | |
print(fake.address()) |
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 numpy as np | |
from datetime import datetime, timedelta | |
start_date=datetime(2017,1,1) | |
end_date=datetime.today() | |
spring_peak = datetime(2017,4,5) | |
fall_peak = datetime(2017,9,15) | |
num_visits = 10000 |
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
def play_tic_tac_toe(): | |
print("""Let's play tictactoe! The board looks like | |
# 1 2 3 | |
# A A1 A2 A3 | |
# B B1 B2 B3 | |
# C C1 C2 C3""") | |
board = [('A', 1), ('A', 2), ('A', 3), | |
('B', 1), ('B', 2), ('B', 3), | |
('C', 1), ('C', 2), ('C', 3)] |
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.
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 lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<title>Flotsam and Jetsam</title> | |
<!-- Include Leaflet 1.2.0 Library --> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" /> | |
<script src="https://unpkg.com/[email protected]/dist/leaflet.js"></script> | |
<!-- Fonts --> | |
<link href='https://fonts.googleapis.com/css?family=Oswald:300,400,600,700' rel='stylesheet' type='text/css'> |
NewerOlder