<commit_before>import abc
import json
import requests
import urllib
from collections import namedtuple
from django.conf import settings
from django.utils.translation import ugettext as _


Directions = namedtuple('Directions', [
    'walk_time', 'walk_dist', 'route', 'precision', 'source'])


class DirectionsException(Exception):
    pass


class DirectionsClient(metaclass=abc.ABCMeta):

    def __init__(self):
        pass

    @abc.abstractmethod
    def get_route(self, start, end):
        pass


class GoogleDirectionsClient(DirectionsClient):

    precision = 5

    def get_base_url(self):
        return "{base}&key={key}".format(
            base=settings.BASE_GOOGLE_URL,
            key=settings.GOOGLE_API_KEY
        )

    def get_data(self, url):
        resp = requests.get(url)
        if resp.status_code != 200:
            raise DirectionsException("Google Directions API error: HTTP status code %i" % resp.status_code)
        return resp.json()
<commit_msg>remove unused method<commit_after>import abc
import json
import requests
import urllib
from collections import namedtuple
from django.conf import settings
from django.utils.translation import ugettext as _


Directions = namedtuple('Directions', [
    'walk_time', 'walk_dist', 'route', 'precision', 'source'])


class DirectionsException(Exception):
    pass


class DirectionsClient(metaclass=abc.ABCMeta):

    @abc.abstractmethod
    def get_route(self, start, end):
        pass


class GoogleDirectionsClient(DirectionsClient):

    precision = 5

    def get_base_url(self):
        return "{base}&key={key}".format(
            base=settings.BASE_GOOGLE_URL,
            key=settings.GOOGLE_API_KEY
        )

    def get_data(self, url):
        resp = requests.get(url)
        if resp.status_code != 200:
            raise DirectionsException("Google Directions API error: HTTP status code %i" % resp.status_code)
        return resp.json()

{'fraction_non_alphanumeric': 0.09354005167958657, 'fraction_numerical': 0.004134366925064599, 'mean_word_length': 3.350561797752809, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2399709', 'n_tokens_mistral': 587, 'n_tokens_neox': 549, 'n_words': 143}