|
4 years ago | |
---|---|---|
client | 4 years ago | |
data | 4 years ago | |
server | 4 years ago | |
tests | 4 years ago | |
.coveragerc | 4 years ago | |
.editorconfig | 4 years ago | |
.gitignore | 4 years ago | |
.travis.yml | 4 years ago | |
README.md | 4 years ago | |
THOUGHTS.md | 4 years ago | |
requirements.txt | 4 years ago | |
requirements_dev.txt | 4 years ago | |
runserver.py | 4 years ago |
At Tictail we organize bi-annual Demo Weeks where we hack on creative projects. It’s a good way to get that side project going or validate an idea for a new feature. One of the ideas for the upcoming Demo Week is spatial search for Tictail products around you. You will be building the backend for that!
Flask
. To run the server: $ python runserver.py
$ cd client
$ python -m SimpleHTTPServer
shops.csv
, products.csv
, tags.csv
and taggings.csv
.Implement the Searcher.search()
method in the client so it can communicate with your
API. We’ve included zepto
on the page so you can use that if you like.
Build an endpoint that returns a number of most popular products given some coordinates, a search radius and, optionally, some tags. The number of products to return should be given as a parameter as well. You can use popular Python libraries to your aid but you can’t use any external databases or search engines (e.g PostGIS, Elasticsearch, etc).
Document your design and thought process in THOUGHTS.md
. Keep it short :-)
You should deliver your solution as a git
repository, preferably hosted on GitHub.
Quality & design: Imagine that your solution will be delivered to production as-is, and maintained by your fellow engineers. What are the things you need to consider to make it production-quality?
Performance: In real-life the datasets will be big enough to cause problems to a simple brute-force approach, so your solution should account for that. Can you do any preprocessing or use specialized data structures?
Good luck!
N.B: Your code is provided solely for the purposes of this exercise and will not be used by Tictail under any circumstances.