<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>
-
URL
<The URL Structure (path only, no root url)>
-
Method:
| #!/usr/bin/env python | |
| from multiprocessing import Process, Pool | |
| import time | |
| import urllib2 | |
| def millis(): | |
| return int(round(time.time() * 1000)) | |
| def http_get(url): |
##Google Interview Questions: Product Marketing Manager
| user www-data; | |
| worker_processes 4; # number of cores on machine | |
| error_log /var/log/nginx/error.log; | |
| events { | |
| worker_connections 1024; | |
| } | |
| http { |
| import web | |
| import json | |
| from restful_controller import RESTfulController | |
| urls = ( | |
| r'/resources(?:/(?P<resource_id>[0-9]+))?', | |
| 'ResourceController', | |
| ) |
| import time | |
| from flask import Flask, request, g, render_template | |
| app = Flask(__name__) | |
| app.config['DEBUG'] = True | |
| @app.before_request | |
| def before_request(): | |
| g.request_start_time = time.time() |
| from datetime import datetime | |
| class LRUCacheItem(object): | |
| """Data structure of items stored in cache""" | |
| def __init__(self, key, item): | |
| self.key = key | |
| self.item = item | |
| self.timestamp = datetime.now() |
| import web | |
| import json | |
| urls = ( | |
| '/', 'index', | |
| '/random', 'random', | |
| '/dump', 'dump' | |
| ) |