def get_resource(self, request, filename):
        response = super(DebuggedApplication, self).get_resource(request,
            filename)
        if response.status_code != 404 or not os.path.exists(ZIP_PATH):
            return response

        filepath = os.path.join('werkzeug', 'debug', 'shared', filename)
        mimetype = mimetypes.guess_type(filename)[0] or \
            'application/octet-stream'

        f = zipfile.ZipFile(ZIP_PATH, 'r')
        try:
            response = Response(f.read(filepath), mimetype=mimetype)
            return response
        except Exception:
            pass
        finally:
            f.close()

        return Response('Not Found', status=404)
Count and smooth feature occurrences.
dataset/ETHPy150Open moraes/tipfy/tipfy/debugger/__init__.py/DebuggedApplication.get_resource--crossover with--dataset/ETHPy150Open scikit-learn/scikit-learn/sklearn/naive_bayes.py/BernoulliNB._count