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
| [ | |
| { | |
| "abbr": "", | |
| "bounds": [ | |
| -123.17382499999999, | |
| 37.639829999999996, | |
| -122.28178, | |
| 37.929823999999996 | |
| ], | |
| "id": "County:San_Francisco:9q8yvv", |
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
| #!/bin/bash | |
| regions="ak al ar az ca co ct dc de fl ga hi ia id il in ks ky la ma md me mi mn mo ms mt nc nd ne nh nj nm nv ny oh ok or pa ri sc sd tn tx ut va vt wa wi wv wy australia austria belgium canada denmark france germany india italy netherlands new_zealand spain switzerland turkey united_kingdom" | |
| for region in $regions; do | |
| echo $region | |
| psql -U postgres -d geocodesource -c "delete from ${region}_clean where (latitude, longitude) in (select distinct latitude, longitude from ${region}_full where replace(upper(address), ' ', '') like '%P.O.BOX%' or replace(upper(address), ' ', '') like '%POBOX%' or address is null)" | |
| done |
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
| $ git clone https://github.com/simplegeo/java-simplegeo.git |
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
| $ ant places-jar-with-libs |
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
| package com.simplejavaapp; | |
| import java.io.IOException; | |
| import java.util.ArrayList; | |
| import com.simplegeo.client.SimpleGeoPlacesClient; | |
| import com.simplegeo.client.types.Feature; | |
| import com.simplegeo.client.types.FeatureCollection; | |
| public class SimpleJavaClass { |
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
| String jsonResponse = client.searchByIP(queryParams); | |
| FeatureCollection collection = FeatureCollection.fromJSONString(jsonResponse); |
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
| lazydog.getProperties().set("name") = "Lazy Dog Sports Bar & Grill"; | |
| String jsonResponse = client.updatePlace(feature); | |
| JSONObject updatePlaceJson = new JSONObject(jsonResponse); |
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
| Bad data received | |
| Traceback (most recent call last): | |
| File "/home/vagrant/sg/simplegeo.com/lib/python2.6/site-packages/django_sentry-1.6.6-py2.6.egg/sentry/views.py", line 347, in store | |
| data = pickle.loads(base64.b64decode(data).decode('zlib')) | |
| File "/usr/lib/python2.6/base64.py", line 76, in b64decode | |
| raise TypeError(msg) | |
| TypeError: Incorrect padding | |
| [%] sentry.server - ERROR - Bad data received | |
| Traceback (most recent call last): | |
| File "/home/vagrant/sg/simplegeo.com/lib/python2.6/site-packages/django_sentry-1.6.6-py2.6.egg/sentry/views.py", line 347, in store |
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 argparse | |
| import csv | |
| from datetime import datetime, timedelta | |
| import dateutil.parser | |
| import eventlet | |
| eventlet.monkey_patch() | |
| import getopt | |
| import itertools | |
| import logging | |
| import sys |
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
| Second simultaneous read on fileno 10 detected. Unless you really know what you're doing, make sure that only one greenthread can read any particular socket. Consider using a pools.Pool. If you do know what you're doing and want to disable this error, call eventlet.debug.hub_multiple_reader_prevention(False) | |
| Traceback (most recent call last): | |
| File "nash.py", line 87, in load_services_rows | |
| return client.set_billing_service_count(*row) | |
| File "/Users/caseycrites/.virtualenvs/nash/lib/python2.6/site-packages/simplegeo_internal/__init__.py", line 70, in set_billing_service_count | |
| return self._set_stat('BillingServiceHourCounter', user, service, method, value, timestamp) | |
| File "/Users/caseycrites/.virtualenvs/nash/lib/python2.6/site-packages/simplegeo_internal/__init__.py", line 76, in _set_stat | |
| data=json.dumps(data))[1]) | |
| File "/Users/caseycrites/.virtualenvs/nash/lib/python2.6/site-packages/simplegeo/__init__.py", line 129, in _request | |
| self.headers, content = self.http.request(endpoint, meth |