This file contains hidden or 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
""" | |
Author: Ashley S (MarieAshley) | |
Versions: Oracle 12c, ArcGIS for Desktop 10.3.1 | |
""" | |
import cx_Oracle | |
class IterationError(Exception): | |
pass |
This file contains hidden or 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
""" | |
In Oracle 12c, using the SDO Geometry type, this script will create the | |
polygons from the golden ratio spiral. | |
Authors: | |
Danny B | |
-- original concept and code | |
-- added and subtracted coordinates to generate new polygons | |
Ashley S | |
-- cleared up rough spots by using phi to create perfect squares |
This file contains hidden or 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 agol import AGOL | |
class geocodeService(AGOL): | |
"""Geocode Service object, that inherits properties from the AGOL object.""" | |
def geocodeAddresses(self): | |
""" | |
The geocodeAddresses operation is performed on a Geocode Service resource. \ | |
The result of this operation is a resource representing the list of geocoded addresses. \ | |
This resource provides information about the addresses including the address, location, score, and other geocode service-specific attributes. |
This file contains hidden or 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 agol import AGOL | |
class community(AGOL): | |
""" | |
Community object that contains operations related to users and groups, \ | |
and inherits properties from the AGOL object. | |
""" | |
def groupSearch(self): | |
""" |
This file contains hidden or 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 urllib, urllib2, json | |
class AGOL(object): | |
""" | |
Superclass that includes most commonly used methods. | |
""" | |
def __init__(self, username, password): | |
self.username = username | |
self.password = password |
This file contains hidden or 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 random, unittest | |
def generateMagicKey(): | |
magicKey = {} | |
list1 = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] | |
list2 = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"] | |
while len(list2) > 0: | |
z = random.randint(0, len(list2)-1) | |
y = random.randint(0, len(list2)-1) | |
a, b = list1[z], list2[y] |