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
# -*- coding: cp1252 -*- | |
# Using http://openweathermap.org/ | |
import urllib2 | |
import json | |
def Convert(k): | |
return k - 273.15 | |
location = raw_input("Select a city: ") |
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 CalcDate(string): | |
if (len(string) <> 8): | |
return | |
else: | |
return "{0}-{1}-{2}".format(string[:4], string[4:6], string[6:]) | |
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
# Recording Daily Commute History | |
# West Queen West <----> North York | |
# Approx Route: Gardiner eastbound - D.V.P. northboutd - Eglinton Ave. E. | |
# Google Distance Matrix API | |
# https://developers.google.com/maps/documentation/distancematrix/ | |
'''The departure time may be specified by Google Maps API for Business customers | |
for to specify the departure_time to receive trip duration considering current | |
traffic conditions. The departure_time must be set to within a few minutes of the current time.''' |
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 arcpy | |
point = arcpy.Point(592326.779, 6241287.454) | |
ref = arcpy.SpatialReference(26708) #SRID | |
ptGeometry = arcpy.PointGeometry(point, ref) | |
conn = r'Database Connections\[email protected]' | |
layer = "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
import arcpy | |
streets = [] | |
# | |
#Search cursor code here to get list of streets | |
# | |
arcpy.MakeFeatureLayer_management("<file path>","roads_lyr") | |
arcpy.MakeFeatureLayer_management("<file path>","points_lyr") |
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 arcpy | |
import os | |
in_raster = r"C:\gisworkspace\CASES\_DEVELOPMENT\156950\47_072.tif'" | |
out_folder = r"C:\gisworkspace\CASES\_DEVELOPMENT\156950" | |
desc = arcpy.Describe(in_raster) | |
for band in desc.children: | |
indiv_band = os.path.join(in_raster, band.name) |
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
require(["dojo/request/xhr"], function(xhr){ | |
var category | |
feat = //code to get selected feature element | |
fcName = feat.attributes.Name; | |
fcType = feat.attributes.Type | |
//The following if statement does not cover all feature cases | |
//such as Ruins and Towns... | |
if (fcType == "City") { | |
category = "GoTCities" | |
} else if (fcType == "Castle") { |
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 arcpy import da | |
import os | |
inTable = r'Database Connections\[email protected]\GISDB.SDE.Canada__ATTACH' | |
fileLocation = r"C:\Users\AMarinelli\Downloads\blob" | |
with da.SearchCursor(inTable,['DATA','ATT_NAME']) as cursor: | |
for row in cursor: | |
binaryRep = row[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
''' | |
==Inputs== (starting at line 95) | |
server --> AGS machine name - (string) | |
port --> AGS port - (string) | |
adminUser --> administrator or publisher user - (string) | |
adminPass --> administrator or publisher password - (string) | |
service --> name of service starting with folder (if applicable) <name>.<type> notation - (string) | |
full_service_path --> path to the .ags connection file and the service folder and <name>.<type> notation - (string) | |
scales --> semicolon delimited list of scale values - (string) |
OlderNewer