wylee
Joined 15 years ago
Joined 15 years ago
Edit: This is probably a better direct link: http://neighborhoodpulsepdx.org/portland21/growing-portland/...
You can also set up a project so the source is shown by default on the "landing page" instead of the overview.
Edit: slight re-wording
Edit: Grammar
It seems like a lot of hiring managers/companies treat a job description as an afterthought when it actually has a huge effect on who applies for a position (_obviously_). People who have more options will tend to ignore the sloppy, vague postings.
The person who wrote this article seems more conscientious than this, but it's something to consider.
Tangentially, I can't imagine using Django without DRF. It makes setting up RESTful(ish) APIs so easy. Even if you don't care much about the RESTful aspects, it provides a much nicer way to organize your code than default Django IMO. I especially like how serialization works versus Django forms.
One way I've approached this problem that seems pretty fast is to load a set of points into a PostGIS-enabled database, then use the `ST_Distance` function and order by distance.
[Edit]
Shapely solution:
points = MultiPoint(((0, 0), (1, 1), (4, 4)))
point = Point((3, 3))
sorted(((p, p.distance(point)) for p in points), key=lambda item: item[1])