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 amaptor | |
base_folder = os.path.split(os.path.abspath(__file__))[0] | |
def make_project(item, base_folder=base_folder, skip_items=()): | |
""" | |
Makes the .mxd in item into an ArcGIS Pro project in the same folder with the same name | |
:param item: a full path to an ArcMap Document |
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
$ProductionVMName = "DAP_Production" | |
$StagingVMName = "DAP_Staging" | |
$ExportFolder = "C:/HyperVExports" # I created a folder that removed all permissions for users - could add anyone with hyper-v permissions to a group with read/write here, along with System | |
$ExportToFolder = "$ExportFolder/$ProductionVMName/" | |
$ImportToFolder = "$ExportFolder/$StagingVMName/" | |
# caution, deletes existing exports in the next block. The try/catch doesn't work as intended. It was supposed to abandon it if it can't find the staging VMs, but proceeds through each step. Needs some work there. | |
try{ | |
Get-VM -Name $StagingVMName # (not true, but this was the design): this will throw an exception if it doesn't exist, so the following lines in this block won't run | |
Stop-VM -Name $StagingVMName -TurnOff # Turn of the VM forcibly - it's fine if it gets corrupted - we're about to destroy it |
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 | |
import re | |
from pathlib import Path | |
def get_public_export_urls(bucket_name, prefix=""): | |
""" | |
Downloads items from a *public* Google Storage bucket without using a GCloud login. Filters only to files | |
with the specified prefix | |
:param bucket_name: | |
:param prefix: A prefix to use to filter items in the bucket - only URLs where the path matches this prefix will be returned - defaults to all files |
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
<html> | |
<head> | |
<title>Mapping with PyScript</title> | |
<meta charset="utf-8"> | |
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" /> | |
<script defer src="https://pyscript.net/latest/pyscript.js"></script> | |
</head> | |
<body> | |
<py-config> |
OlderNewer