Skip to content

Instantly share code, notes, and snippets.

@SergLam
SergLam / locale-capital.json
Created January 15, 2020 15:00
Locale - country capital city datasheet (usefull for map centring)
[
{"locale_key": "bs", "Marathi": "Bosnian",
"capital": {
"name": "New Delhi",
"latitude": 28.6357600,
"longitude": 77.2244500
}
},
{"locale_key": "ee_TG", "Marathi": "Ewe (Togo)",
"capital": {
@prziborowski
prziborowski / gist:ba3ebf610dd6cca3f4e7be5e2874499f
Last active November 15, 2024 02:10
Use property collector to retrieve names quickly
#!/usr/bin/env python
"""
Written by Nathan Prziborowski
Github: https://github.com/prziborowski
This code is released under the terms of the Apache 2
http://www.apache.org/licenses/LICENSE-2.0.html
The property collector can be used to fetch a subset of properties
for a large amount of objects with fewer round trips that iterating.
This sample shows how to use the TraversalSpec to get properties
of another object without multiple calls.