Skip to content

Instantly share code, notes, and snippets.

View adamochayon's full-sized avatar

Adam Ochayon adamochayon

View GitHub Profile
@adamochayon
adamochayon / colorado_schools.geojson
Last active November 24, 2020 22:03
Tile 6/13/24 for schoolDistricts
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
func (api *SearchApi) BuildBoundingBox(
ctx context.Context,
query *search.SearchQuery,
) (bbox *GeoBoundingBox, err error) {
queries := buildSubQueries(query)
boundingBoxes, err = api.getSubBoundingBoxes(ctx, queries)
if err != nil {
return nil, err
}
bbox = api.mergeAndFitBoundingBoxes(ctx, boundingBoxes, query)
...
synonyms = defaultdict(set)
for w1, w2 in synonym_words:
synonyms[w1].add(w2)
...
elif (w2 in synonyms.get(w1, tuple()) or
w1 in synonyms.get(w2, tuple())):
continue