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 simplegeo.models import Record | |
>>> r = Record('com.simplegeo.test', '4', 37.786521, -122.397850) |
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 simplegeo import Client | |
>>> client = simplegeo.places.Client('your-oauth-token', 'your-oauth-secret') | |
>>> simplegeo_handle = 'SG_3ckjlXmAXOR2XjpuJQ0p7E' # India | |
>>> annotations = { | |
... 'country_codes': | |
... { | |
... 'alpha-2': 'IN', | |
... 'alpha-3': 'IND', | |
... 'numeric': '356', |
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 simplegeo import Client | |
>>> from simplegeo.models import Feature | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> properties = {"province":"CA","city":"San Francisco","name":"SimpleGeo SF", \\ | |
"country":"US", "phone":"+1 415 626 1375","address":"41 Decatur St", \\ | |
"postcode":"94103"} | |
>>> f = Feature((37.772392, -122.405752), properties=properties) | |
>>> client.places.add_feature(f) | |
'SG_5uZpvipNjVaSbbDv5bvZaa_37.772392_-122.405752@1291847366' |
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
>>> results = client.places.search(40.016983, -105.27753) | |
>>> results = client.places.search(40.016983, -105.27753, query='coffee') | |
>>> results = client.places.search(40.016983, -105.27753, category='restaurant') | |
>>> results = client.places.search(40.016983, -105.27753, query='coffee', category='restaurant') |
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 simplegeo import Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> results = client.places.search(37.788081, -122.402147, query='hotel') | |
>>> results[0].to_dict() |
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 simplegeo import Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> client.get_feature('SG_7L9nQHjsporBjZUz8KVt5t').to_dict() |
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 simplegeo import Client | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
>>> client.context.get_context(37.770918, -122.494383) |
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 simplegeo import Client | |
>>> from simplegeo.models import Feature, Record, Layer | |
>>> client = Client('your-oauth-token', 'your-oauth-secret') | |
# Storage | |
>>> help(client.storage) | |
>>> help(Layer) # model for client.storage.create_layer() | |
>>> help(Record) # model for client.storage.add_record() |
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 django import template | |
from django.utils.safestring import mark_safe | |
from django.utils.encoding import force_unicode | |
from discoengine.settings import MEDIA_URL | |
register = template.Library() | |
@register.tag | |
def literal(parser, token): | |
nodelist = parser.parse(('endliteral',)) |
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
64 bytes from 69.147.125.65: icmp_seq=277 ttl=49 time=78665.688 ms | |
64 bytes from 69.147.125.65: icmp_seq=279 ttl=49 time=85000.004 ms | |
64 bytes from 69.147.125.65: icmp_seq=278 ttl=49 time=86000.088 ms | |
64 bytes from 69.147.125.65: icmp_seq=280 ttl=49 time=84007.815 ms | |
64 bytes from 69.147.125.65: icmp_seq=281 ttl=49 time=83008.816 ms | |
64 bytes from 69.147.125.65: icmp_seq=282 ttl=49 time=82008.778 ms | |
64 bytes from 69.147.125.65: icmp_seq=283 ttl=49 time=81016.736 ms | |
64 bytes from 69.147.125.65: icmp_seq=284 ttl=49 time=80016.659 ms | |
64 bytes from 69.147.125.65: icmp_seq=288 ttl=49 time=76107.152 ms | |
64 bytes from 69.147.125.65: icmp_seq=286 ttl=49 time=78107.299 ms |