Edit: This doesn't work for lists > 20 items, because pagination does not work. Please see here
This script allows extracting name and coordinates for gmaps shared lists. It is incredibly unstable and may break anytime. Good luck figuring out why, because the syntax is extremely confusing and basically makes no sense at all. Thanks to google for not providing an api for this after LITERALLY 12 YEARS
How to use this script:
- Share a list and open the link in a browser window. It will redirect. The new link will look like this:
google.com/maps/@<your coords>/data=....
- Take the
data
-portion and paste it into the following link:https://google.com/maps/@/data=?ucbcb=1
This file contains 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 pathlib import Path | |
import argparse | |
import jsonlines | |
import csv | |
def jsonl2csv(filepath, type_=None, include=None, exclude=None): | |
def valid_type(item): | |
if type_: | |
return item.get('_type') == type_ |
Picking the right architecture = Picking the right battles + Managing trade-offs
- Clarify and agree on the scope of the system
- User cases (description of sequences of events that, taken together, lead to a system doing something useful)
- Who is going to use it?
- How are they going to use it?
Magic words:
psql -U postgres
Some interesting flags (to see all, use -h
or --help
depending on your psql version):
-E
: will describe the underlaying queries of the\
commands (cool for learning!)-l
: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)