示例#1
0
    def runProcess(self):
        # Import user data
        usrIn = ui.userInput(self.setupFile)
        param, re_run = usrIn.fread()

        # --------------------- Import Raw Data ---------------------
        if param['import_raw']:
            # Import raw data
            raw_data = dt.data_import(param['TSloc'], param['PVloc'],
                                      param['import_dtype'], param)
            self.Database = raw_data.run_data_import()

        if re_run or re_run is None:
            print(' ----------',
                  'New critical input parameters detected, begin processing',
                  '----------')

            # --------------------- Apply pre processing ---------------------
            pre_process = prp.preProcess(self.Database, param)
            pre_process.run_PP()

            # --------------------- Cross-correlations ---------------------
            dt.utilities.DB_attrs_save(self.Database, param)
            process = cc.cross_correlation_survey(self.Database, verbose=True)
            process.CC_run()

#            # --------------------- Post Process data ---------------------
#            post_process = pop.postProcess(param, PV_df, CC, TScut)
#            TScut_DB, PV_df = post_process.postProcess_run()

        if param['disp_DB']:
            plot_db = dcwi.dispCWI2(self.Database)
            hdl_cc, recPos_slider, srcPos_slider = plot_db.plot_DB()
def local() -> tuple:
    casos: list = fetchCasos()
    doencas: list = extractDoencas(casos)
    test_case: list = userInput()
    aux: int = 2
    simLocal: list = []
    final: dict = {}

    for index, caso in enumerate(casos):
        for index_labels, label in enumerate(LABELS):
            pesos: list = dbHandler.fetchPesos(label)
            if "?" in pesos[0]:
                pesos[0] = (0, 'Desconhecido')
            dicPesos: dict = dict(
                ((v, int(k)) for k, v in dict(pesos).items()))
            res: float = Similaridade.local(max(dicPesos.values()),
                                            min(dicPesos.values()),
                                            dicPesos[test_case[index_labels]],
                                            int(dicPesos[casos[index][aux]]))
            simLocal.append(res)
            aux += 1
        aux = 2
        tmp = {casos[index][0]: list(simLocal)}
        final.update(tmp)
        simLocal.clear()

    return (final, test_case, doencas)
示例#3
0
def moodleLogin():
    """ This function login to moodle.iitb.ac.in
        @input: None
        @output: instance of login page of moodle
    """ 
    userInfo = userInput();
    cj = cookielib.CookieJar()
    opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cj))
    login_data = urllib.urlencode(userInfo);
    opener.open('http://moodle.iitb.ac.in/login/index.php', login_data)
    return opener 
示例#4
0
def main():
    #Print the Menu Options
    print_screen = True
    while print_screen == True:
        #menuChoice = menuOptions()
        #menuChoices = menuChoice.Menu()
        print("0. Exit" + "\n" + "1. New" + "\n" + "2. List" + "\n" +
              "3. Edit" + "\n" + "4. View" + "\n" + "5. Delete")

        #Retreieve User Input and Direct them to the correct file handling logic
        userChoice = userInput()
        print_screen = userChoice.userInputValueInput()
示例#5
0
from userInput import userInput
from scraperUtils import *
from excelOutput import excelOutput
import getpass

#Initializing User Input Object
user_obj = userInput()

#Asking for company list input (comma-seperated)
company_input = input("Enter companies as comma-seperated list:")
user_obj.set_companies(company_input)

#Asking for location list input (comma-seperated and Linkedin validated)
location_input = input("Enter locations as comma-seperated list:")
user_obj.set_locations(location_input)

#Asking for titles list input (comma-seperated)
title_input = input("Enter titles as comma-seperated list:")
user_obj.set_titles(title_input)

#Asking for Linkedin Authentication
username_input = input("Enter Linkedin username:"******"Enter Linkedin password:"******"test.xlsx")

execute(excel_file, user_obj)
示例#6
0
 def __init__(self):
     self.inputs = userInput()
     self.display = display()
     self.dron = dronIo()
     self._running = False
示例#7
0
 def __init__(self):
     self.ui = userInput.userInput(self, 'userInput.json')
     self.pl = PubgLogic.PubgLogic(self)
     self.sl = SheetsLogic.SheetsLogic(self)
     self.cl = CombinedLogic.CombinedLogic(self)
     self.ps = PlayerStats.PlayerStats(self)