<commit_before>from time import sleep


def build_url(city):
    sleep(.2)
    # check whether input is a string
    if type(city) != str:
        raise ValueError("The input city " + str(city) + " wasn't of type string")

    url = 'http://api.openweathermap.org/data/2.5/forecast/daily?q=' \
          + city \
          + '&mode=xml' \
          + '&units=metric' \
          + '&cnt=16' # 'cnt = 16' means next 16 days

    return url
<commit_msg>changed openweathermap query to json (from xml)<commit_after>from time import sleep


def build_url(city):
    sleep(.2)
    # check whether input is a string
    if type(city) != str:
        raise ValueError("The input city " + str(city) + " wasn't of type string")

    url = 'http://api.openweathermap.org/data/2.5/forecast/daily?q=' \
          + city \
          + '&mode=json' \
          + '&units=metric' \
          + '&cnt=16' # 'cnt = 16' means next 16 days

    return url

{'fraction_non_alphanumeric': 0.14087513340448238, 'fraction_numerical': 0.0192102454642476, 'mean_word_length': 2.223367697594502, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '3000585', 'n_tokens_mistral': 331, 'n_tokens_neox': 303, 'n_words': 84}