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 folium | |
def simple_folium_map(lat, lng, description): | |
""" | |
Create a simple webmap with a green circle marker | |
Stamen map tile options = ['Stamen Toner', 'Stamen Terrain'] | |
""" | |
# Create webmap html |
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 datetime | |
import calendar | |
def get_weekdays_in_month(weekday, month, year): | |
""" | |
Calculate a list of all dates of a given weekday in a particular month/year | |
:param weekday: (str) String of the day of the week | |
:param month: (int) of the month within the year | |
:param year: (int) four-digit 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
import os | |
def clean_up_folder(dir_path, ext_keep=(".zip", ".kmz", ".GeoJSON", ".csv")): | |
""" | |
Loop through a directory looking for files with extensions | |
that match an extension in an array. If the file's extension | |
does not match, delete the file. | |
:param dir_path: (str) path to directory to search |
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
# Compiled source # | |
################### | |
*.com | |
*.class | |
*.dll | |
*.exe | |
*.o | |
*.pyc | |
*.so |
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
{% with messages = get_flashed_messages() %} | |
{% if messages %} | |
<ul class="flashes list-group"> | |
{% for message in messages %} | |
<li class="list-group-item"> | |
<div class="alert alert-success">{{message}}</div> | |
</li> | |
{% endfor %} | |
</ul> | |
{% endif %} |
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>Geoserver layer in Leaflet Example</title> | |
<meta charset="utf-8"/> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="shortcut icon" type="image/x-icon" href="docs/images/favicon.ico"/> | |
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" | |
integrity="sha512-M2wvCLH6DSRazYeZRIm1JnYyh22purTM+FDB5CsyxtQJYeKq83arPe5wgbNmcFXGqiSH2XR8dT/fJISVA1r/zQ==" | |
crossorigin=""/> |
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
#include <SPI.h> | |
#include <Adafruit_VS1053.h> | |
#include <SD.h> | |
// These are the pins used for the music maker shield | |
const int SHIELD_RESET = -1; // VS1053 reset pin (unused!) | |
const int SHIELD_CS = 7; // VS1053 chip select pin (output) | |
const int SHIELD_DCS = 6; // VS1053 Data/command select pin (output) | |
const int DREQ = 3; // VS1053 Data request, ideally an Interrupt pin |