-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
157 lines (131 loc) · 4.33 KB
/
main.py
File metadata and controls
157 lines (131 loc) · 4.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
"""
Created on Wed Dec 9 23:03:23 2020
@author: francescoserraino
"""
import re
import pandas as pd
import numpy as np
import xgboost
from sklearn.model_selection import train_test_split
from sklearn.metrics import confusion_matrix, accuracy_score
import scipy.spatial.distance as dist
import math
from sklearn.model_selection import train_test_split
import math
from sklearn.neighbors import KNeighborsClassifier
from sklearn.metrics import confusion_matrix, accuracy_score
import matplotlib.pyplot as plt
import seaborn as sns
from imblearn.over_sampling import SMOTE
from sklearn.ensemble import RandomForestClassifier
from sklearn.svm import LinearSVC
from sklearn.linear_model import LogisticRegression
from sklearn.preprocessing import StandardScaler
from sklearn.pipeline import make_pipeline
from sklearn.ensemble import StackingClassifier
import sys
sys.path.append("/".join(x for x in __file__.split("/")[:-1]))
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import Screen, NoTransition, CardTransition
from kivy.properties import DictProperty
from kivy.uix.button import ButtonBehavior
from kivy.uix.image import Image
from kivy.uix.scrollview import ScrollView
import sys
sys.path.append("/".join(x for x in __file__.split("/")[:-1]))
from kivy.app import App
from kivy.lang import Builder
from kivy.uix.screenmanager import Screen, NoTransition, CardTransition
from kivy.properties import DictProperty
from functools import partial
from os import walk
from datetime import datetime
import kivy.utils
from kivy.utils import platform
import requests
import json
import traceback
from kivy.graphics import Color, RoundedRectangle
import pickle
from functions import Functions
from itertools import chain, combinations
from kivy.app import App
from kivy.uix.popup import Popup
from kivy.lang import Builder
from kivy.uix.button import Button
import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.popup import Popup
from kivy.core.text import Label as CoreLabel
from kivy.uix.label import Label
from kivy.base import runTouchApp
from kivy.lang import Builder
from kivy.properties import NumericProperty
from kivy.app import App
from kivy.uix.button import Button
from kivy.uix.gridlayout import GridLayout
from kivy.lang import Builder
from kivy.properties import StringProperty
from random import randint
import kivy
from kivy.app import App
from kivy.uix.widget import Widget
from kivy.properties import ObjectProperty
from kivy.uix.label import Label
from kivy.uix.floatlayout import FloatLayout
from kivy.uix.popup import Popup
import requests
from kivy.properties import StringProperty
import time
from small_func import test_func
class P(FloatLayout):
# def call_value(self):
# x = Functions.grade_predictor(self,'a1', 'd4,d5', 'd3,g6')
# pass
idea_texto = StringProperty()
# <<<<<<<<<<<<<<<<<<<<
def __init__(self, idea, **kwargs):
super(P, self).__init__(**kwargs)
self.idea_texto = idea
#class Widgets(Widget):
# def btn(self):
# show_popup()
def show_popup():
# my_list = moonboardscreen.get_text_inputs(moonboardscreen)
# start= my_list[0]
# inter = my_list[1]
# finish = my_list[2]
with open('surname.txt') as f:
idea = f.read()#Functions.grade_predictor(Functions, 'a2', 'd4,d5', 'd3,g6')
show = P(idea) # Create a new instance of the P class
popupWindow = Popup(title='RESULTS', content=show, size_hint=(None,None),size=(300,300))
# Create the popup window
popupWindow.open()
class HomeScreen(Screen):
pass
class moonboardscreen(Screen):
def btn(self):
show_popup()
# def load(self):
# with open("surname.txt") as fobj:
# for surname in fobj:
# self.surname = surname.rstrip()
class results(Screen):
pass
class ImageButton(ButtonBehavior, Image):
pass
GUI = Builder.load_file('main.kv')
class MainApp(App):
def build(self):
self.functions = Functions()
self.small_func = test_func()
return GUI
def change_screen(self, screen_name):
screen_manager = self.root.ids['screen_manager']
screen_manager.current = screen_name
MainApp().run()