<commit_before># -*- coding: utf-8 -*-
from base import *
from json import loads
from urllib.request import urlopen
from decimal import *
import pygeoip
gi = pygeoip.GeoIP('pygeoip/GeoLiteCity.dat')


class weatherinfo:
    data = {}

    def getinfo(self, number):
        data = self.data
        name = data["name"]
        if len(name) == 0:
            name = self.dname
        #checks what the request wants
        if number == "currenttemp":
            if self.outputtemp == "kel":
                return "It is " +\
                str(data["main"]["temp"]) + " kel in " + name
            elif self.outputtemp == "cel":
                temp = Decimal(str(data["main"]["temp"])) - Decimal('273.15')
                return "It is " + str(temp) + " cel in " + name
            elif self.outputtemp == "far":
                temp = Decimal(str(data["main"]["temp"])) - Decimal('273.15')
                temp = Decimal(str(temp)) * Decimal('1.8') + Decimal('32.0')
                return "It is " + str(temp) + " far in " + name
            else:
                raise ValueError(
                    "Invalid Temperature Style: " + self.outputtemp)
        elif number == "currentwindspeed":
            return "The Wind is Blowing at " +\
            str(data["wind"]["speed"]) + " m/s in " + name

    def __init__(self, url, style, altname):
        jsonobj = urlopen(url)
        jsonobj = jsonobj.read()
        self.data = loads(jsonobj.decode())
        self.outputtemp = style
        self.dname = altname


def msg(mp):<commit_msg>Return Changes WEATHER<commit_after># -*- coding: utf-8 -*-
from base import *
from json import loads
from urllib.request import urlopen
from decimal import *
import pygeoip
gi = pygeoip.GeoIP('pygeoip/GeoLiteCity.dat')


class weatherinfo:
    data = {}

    def getinfo(self, number):
        data = self.data
        name = data["name"]
        if len(name) == 0:
            name = self.dname
        #checks what the request wants
        if number == "currenttemp":
            if self.outputtemp == "kel":
                return "It is " +\
                str(data["main"]["temp"]) + " Kelvin in " + name
            elif self.outputtemp == "cel":
                temp = Decimal(str(data["main"]["temp"])) - Decimal('273.15')
                return "It is " + str(temp) + " Celcius in " + name
            elif self.outputtemp == "far":
                temp = Decimal(str(data["main"]["temp"])) - Decimal('273.15')
                temp = Decimal(str(temp)) * Decimal('1.8') + Decimal('32.0')
                return "It is " + str(temp) + " Farenheit in " + name
            else:
                raise ValueError(
                    "Invalid Temperature Style: " + self.outputtemp)
        elif number == "currentwindspeed":
            return "The Wind is Blowing at " +\
            str(data["wind"]["speed"]) + " m/s in " + name

    def __init__(self, url, style, altname):
        jsonobj = urlopen(url)
        jsonobj = jsonobj.read()
        self.data = loads(jsonobj.decode())
        self.outputtemp = style
        self.dname = altname


def msg(mp):
{'fraction_non_alphanumeric': 0.1404746632456703, 'fraction_numerical': 0.010904425914047467, 'mean_word_length': 1.8746543778801843, 'pattern_counts': {'":': 10, '<': 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': '1180455', 'n_tokens_mistral': 950, 'n_tokens_neox': 922, 'n_words': 243}