Radial bar chart inspired by Peter Cook's work.
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
#!/usr/bin/env python | |
''' | |
This script creates an .sd from a .pyt | |
.. It assumes that all tools can be called with no parameters (i.e., | |
all parameters are "optional". Not ideal for all services, but | |
works fine for services that arn't called from ArcMap anyway. | |
If you are calling your service from ArcMap, publish the traditional | |
way .. |
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 arcpy | |
import os | |
#"unregistering as versioned" multiple datasets using arcpy | |
try: | |
conn_path = "c:/temp/RUTACONN.SDE" | |
datasets = ["DATASET_01", "DATASET_02", "DATASET_03", "DATASET_04", "DATASET_05"] | |
for dataset in datasets: | |
dataset_path = os.path.join(conn_path,dataset ) | |
print dataset_path | |
datasetVersioned = arcpy.Describe(dataset_path).isVersioned |
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 os | |
import urllib | |
import urllib2 | |
import base64 | |
import json | |
import sys | |
import argparse | |
try: | |
import requests | |
except ImportError: |
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 requests | |
import json | |
import random | |
import urllib | |
class MapInstance(object): | |
def __init__(self, definition, url, headers=None): | |
self.url = url | |
self.definition = definition |
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
# | |
# converts a shapefile to an elasticsearch geo_point type with this mapping: | |
# | |
# { | |
# "zipcode" : { | |
# "properties" : { | |
# "geometry": { | |
# "properties": { | |
# "coordinates": { | |
# "type": "geo_point" |
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 org.apache.xmlrpc.XmlRpcException; | |
import org.apache.xmlrpc.client.XmlRpcClient; | |
import org.apache.xmlrpc.client.XmlRpcClientConfigImpl; | |
@SuppressWarnings({ "unchecked", "rawtypes" }) | |
@Override | |
/** | |
* Create New Posts in Wordpress using Java | |
* | |
* //http://codex.wordpress.org/XML-RPC_WordPress_API/Posts#wp.newPost |
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
require 'rubygems' | |
require 'twitter' | |
require 'builder' | |
client = Twitter::Client.new( | |
:consumer_key => "your consumer key", | |
:consumer_secret => "your consumer secret", | |
:oauth_token => "your oauth token", | |
:oauth_token_secret => "your oauth secret" | |
) |
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 re | |
def title(value): | |
value = value.decode('utf-8') | |
t = re.sub("([a-z])'([A-Z])", lambda m: m.group(0).lower(), value.title()) | |
return re.sub("\d([A-Z])", lambda m: m.group(0).lower(), t) | |
title(!NOM_MUNICI!) |
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
#-*- coding: UTF-8 -*- | |
#Script para ejecutar el compress y analyze de la base de datos | |
#Basado en el Script original para arcgis 9.3.1 por Mike Long - [email protected] | |
import string, os, arcpy, time | |
import traceback,sys | |
from arcpy import env | |
# Set the date. |