@@ -0,0 +1,1170 @@
+from bs4 import BeautifulSoup%0Aimport urllib.parse%0Aimport urllib.request%0Aimport urllib.error%0Aimport pandas as pd%0Afrom sklearn.linear_model import LinearRegression%0Afrom sklearn.preprocessing import LabelEncoder%0A%0A%22%22%22%0Abase_url = 'http://runningstatus.in/history'%0Atrain_no = str(input(%22Enter Train No.%22))%0Aquerr = %7B'querry':train_no%7D%0Aquerr = urllib.parse.urlencode(querr)%0Aurl = '/'.join(%5Bbase_url,querr%5D)%0Aresponse = urllib.request.urlopen(url)%0Ahtml_bytes = response.read()%0Ahtml= html_bytes.decode('utf-8')%0Asoup = BeautifulSoup(html,'html.parser')%0A%0Aclass Neo_Engine:%0A%0A    def __int__(self):%0A        self.clf = LinearRegression()%0A%0A    def getdata(self,df):%0A        # Train the model of particular locomotive%0A        # Example : Get train data from user. convert results to DataFrame and feed it.%0A        pass%0A%0A    def predict_delay(self):%0A        #based on training will predict delay of locomotive next day%0A%22%22%22%0A%0A%0Adf = pd.read_csv('data.csv')%0Adf.fillna(value=0,inplace=True)%0Anew_df = df.drop(%5B'Status'%5D,axis=1)%0A#new_df = new_df.drop(%5B'ReachTime'%5D,axis=1)%0A%0Anew_df = new_df.apply(LabelEncoder().fit_transform)%0A%0AX = new_df.drop(%5B'Delay'%5D,axis=1)%0Ay = new_df%5B'Delay'%5D%0A%0Aprint(new_df)%0A

Create neo.py