<commit_before>from bs4 import BeautifulSoup
import requests
import re

class TrainSchedule:

    url_pnr = "http://www.indianrail.gov.in/cgi_bin/inet_trnpath_cgi.cgi"
    headers = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0"}
    error = ""

    def __init__(self,train_number, month, day, day_count="0"):
        self.response_json = {}
        self.train_number = train_number
        self.month = month
        self.day = day
        self.day_count = day_count

    def request(self):
        request_data = {}
        request_data["lccp_submitpath"] = "Get Schedule"
        request_data["lccp_trn_no"] = self.train_number
        request_data["lccp_month"] = self.month
        request_data["lccp_day"] = self.day
        request_data["lccp_daycnt"] = self.day_count
        try:
            r = requests.post(self.url_pnr,request_data,headers=self.headers)
        except requests.exceptions.RequestException as e:
            self.error = str(e)
            return False
        if r.text.find("Please try again later") > 0:
            self.error = "Service unavailable"
            return False
        elif r.text.find("Facility Not Avbl due to Network Connectivity Failure") > 0:
            self.error = "Facility not available"
            return False
        elif r.text.find("TRAIN ROUTE") > 0:<commit_msg>making train number the only compulsory item<commit_after>from bs4 import BeautifulSoup
import requests
import re

class TrainSchedule:

    url_pnr = "http://www.indianrail.gov.in/cgi_bin/inet_trnpath_cgi.cgi"
    headers = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:19.0) Gecko/20100101 Firefox/19.0"}
    error = ""

    def __init__(self,train_number, month="0", day="0", day_count="0"):
        self.response_json = {}
        self.train_number = train_number
        self.month = month
        self.day = day
        self.day_count = day_count

    def request(self):
        request_data = {}
        request_data["lccp_submitpath"] = "Get Schedule"
        request_data["lccp_trn_no"] = self.train_number
        request_data["lccp_month"] = self.month
        request_data["lccp_day"] = self.day
        request_data["lccp_daycnt"] = self.day_count
        try:
            r = requests.post(self.url_pnr,request_data,headers=self.headers)
        except requests.exceptions.RequestException as e:
            self.error = str(e)
            return False
        if r.text.find("Please try again later") > 0:
            self.error = "Service unavailable"
            return False
        elif r.text.find("Facility Not Avbl due to Network Connectivity Failure") > 0:
            self.error = "Facility not available"
            return False
        elif r.text.find("TRAIN ROUTE") > 0:
{'fraction_non_alphanumeric': 0.10843806104129264, 'fraction_numerical': 0.020107719928186715, 'mean_word_length': 2.54002541296061, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '2530830', 'n_tokens_mistral': 927, 'n_tokens_neox': 870, 'n_words': 191}