Giter Site home page Giter Site logo

products_in_radius's Introduction

Backend Recruiting Task

The story

At Acme 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 Acme products around you. You will be building the backend for that!

Provided goodies

  1. A server boilerplate using Flask. To run the server:
$ python runserver.py
  1. A rudimentary client so you can visualize the results more easily. The client does not have any way to communicate with the API so you will need to implement that. To run the client:
$ cd client
$ python -m SimpleHTTPServer
  1. Four datasets in CSV format: shops.csv, products.csv, tags.csv and taggings.csv.

What you need to do

  1. Implement the Searcher.search() method in the client so it can communicate with your API. We've included jQuery on the page so you can use that if you like.

  2. Build an endpoint that returns a number of most popular products given some coordinates, a search radius and, optionally, some tags. If tags are provided, a shop needs to have at least one of them to be considered a candidate. 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).

  3. 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.

What we look for

  1. Correctness: Your solution should return the correct results and deal with as many edge cases as you can think of.

  2. 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 and implement to make it production-quality (tests, code quality, input validation, documentation, etc)?

  3. 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?

A good rule of thumb is to submit something that you're proud of. Good luck!

N.B: Your code is provided solely for the purposes of this exercise and will not be used by Acme under any circumstances.

links: https://gist.github.com/farazdagi/1089923

products_in_radius's People

Contributors

solon-aguiar avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.