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 psutil | |
import platform | |
from datetime import datetime | |
def get_size(bytes, suffix="B"): | |
""" | |
Scale bytes to its proper format | |
e.g: | |
1253656 => '1.20MB' | |
1253656678 => '1.17GB' |
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 math | |
from arcgis.geometry import Polygon | |
def get_simplified_polygon(geometry: Polygon, simplification_factor: float = 0.1) -> Polygon: | |
# ensure working with a polygon | |
assert isinstance(geometry, Polygon) |
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
name: arcgis | |
channels: | |
- esri | |
- conda-forge | |
dependencies: | |
- arcgis | |
- arcpy | |
- jupyterlab |
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 modules | |
from ftplib import FTP | |
import os | |
def get_day_one(directory_target): | |
""" | |
Retrieve zero to 30 hour precipitation forecasts | |
""" | |
# ftp url | |
url = 'ftp.hpc.ncep.noaa.gov' |
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 pro_at_least_version(version: str) -> bool: | |
""" | |
Test the current ArcGIS Pro version to be equal or greater than. | |
Args: | |
version: Version number eg ('2', '2.1', '2.8.1') | |
Returns: | |
Boolean indicating if version is at least or greater than specified version. | |
""" | |
# late import since may or may not already be loaded |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
( | |
$feature.commute_ACSTWORKU5 * 2.5 | |
+ $feature.commute_ACSTWORK5 * 7.0 | |
+ $feature.commute_ACSTWORK10 * 12.0 | |
+ $feature.commute_ACSTWORK15 * 17.0 | |
+ $feature.commute_ACSTWORK20 * 22.0 | |
+ $feature.commute_ACSTWORK25 * 27.0 | |
+ $feature.commute_ACSTWORK30 * 32.0 | |
+ $feature.commute_ACSTWORK35 * 37.0 | |
+ $feature.commute_ACSTWORK40 * 42.0 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.