def __call__(self, request, parser):
        logger.info('requesting %r', request)

        uri = request.uri
        data = None

        if request.method.upper() in http.URLENCODE_METHODS:
            uri = encode_uri(request)
        else:
            data = encode_data(request)

        logger.debug('request uri: %r, data: %r, headers: %r',
                     uri, data, request.headers)

        req = RequestWithMethod(uri, data, request.headers)
        req.set_method(request.method)

        opener = port.urllib_request.build_opener(*self.handlers)
        resp = opener.open(req)

        body = resp.read()
        headers = dict(resp.info())
        logger.debug('response code: %r, body: %r, headers: %r',
                     resp.code, body, headers)

        return parser(body, resp.code, headers)
Compute average of a vector, just compute non-zero numbers
dataset/ETHPy150Open ducksboard/libsaas/libsaas/executors/urllib2_executor.py/Urllib2Executor.__call__--crossover with--dataset/ETHPy150Open jasonwbw/DensityPeakCluster/distance/distance.py/PearsonDistance._avg