Beispiel #1
0
 def applied():
     #users name is stored in variable 'name'
     #fetch data of all the applied jobs
     #give job title in variable 'jobtitle'
     #give company name in variable 'company'
     #start loop
     c = util.Utility()
     for row in c.fetchApplied(name, userId):
         jobtitle = row[4]
         company = row[5]
         status = row[7]
         title = Label(s1, text="Jobtitle : " + jobtitle,
                       bg=bgcolor).place(x=55, y=100)
         compname = Label(s1, text="Company : " + company,
                          bg=bgcolor).place(x=55, y=120)
         #give status like shortlisted,selected,rejected in variable 'status'
         statusl = Label(s1, text="Status : " + status, fg="white")
         statusl.place(x=205, y=110)
         if (status == 'Rejected'):
             statusl.configure(bg="red")
         elif (status == 'Shortlisted'):
             statusl.configure(bg="maroon")
         elif (status == 'Selected'):
             statusl.configure(bg="green")
         elif (status == 'Applied' or status == 'Sorted'):
             statusl.configure(bg="blue")
         else:
             statusl.configure(bg=bgcolor)
Beispiel #2
0
def startToShortlist(postedBy):
    candidate = 0
    c = util.Utility()
    result = c.fetchJobWhereId(postedBy)
    if (result):
        jobId = result[0][0]
        requirements = result[0][8].lower().split(',')
        applications = c.fetchAppliedToSort(jobId)
        passing = len(requirements)
        print("Passing Criteria", passing)
        if (applications != False):
            for application in applications:
                textCv = util.pdfToText(application[2])
                scores = scoreAlgorithm.calculateScore(application,
                                                       textCv[0].lower(),
                                                       requirements)
                print("score=", scores[4])
                if (scores[4] >= passing):
                    if (c.insertScore(scores)):
                        c.updateStatus(application[6], application[3],
                                       "Shortlisted")
                        candidate += 1
                else:
                    if (c.insertScore(scores)):
                        c.updateStatus(application[6], application[3],
                                       "Rejected")
                        candidate += 1

    return True
Beispiel #3
0
 def change():
     prevpass = p.get()  #old password in variable 'prevpass'
     newpass = cp.get()  #old password in variable 'newpass'
     c = util.Utility()
     if (c.authenticate(name, prevpass)):
         c.changePassword(name, prevpass, newpass)
         l = Label(s1, text="Successfully changed !!!",
                   bg=bgcolor).place(x=60, y=270)
Beispiel #4
0
                def apply():
                    c = util.Utility()

                    c.applyJob(name, cvPath, jobId, title, company, userId,
                               "Applied")
                    l = Label(s1,
                              text="Applied successfully",
                              bg=bgcolor,
                              fg="blue").place(x=100, y=240)
Beispiel #5
0
def forgot():
    email = simpledialog.askstring("Forgot Password",
                                   "Please enter your registered email id")
    #email is stored in 'email'
    #code to fetch the corresponding password from the database
    c = util.Utility()
    password = c.forgotPassword(email)
    #give the password in variable 'password'
    #
    #code ends
    messagebox.showinfo(email + "'s Password", "Password is " + password)
Beispiel #6
0
        def select():
            jobtitle = var.get()
            #title selected in variable 'jobtitle'
            #fetch all the jobs posted on this title along with their perks.
            #get the variables company name,salary,jobtype,requirements,location,experience,description
            c = util.Utility()
            xp = c.fetchJobWhere(jobtitle)
            print(xp)
            for row in c.fetchJobWhere(jobtitle):
                print(row)
                jobId = row[0]
                title = row[1]
                company = row[2]
                salary = row[3]
                jobtype = row[4]
                requirements = row[8].split(',')
                location = row[5]
                exp = row[6]
                desc = row[7]
                companyl = Label(s1,
                                 text="Company Name : " + company,
                                 bg=bgcolor).place(x=55, y=100)
                salaryl = Label(s1,
                                text="Salary : Rs. " + str(salary),
                                bg=bgcolor).place(x=55, y=120)
                jobypel = Label(s1, text="Job Type : " + jobtype,
                                bg=bgcolor).place(x=55, y=140)
                reql = Label(s1, text="Requirements : ",
                             bg=bgcolor).place(x=55, y=160)
                xp = 100
                for i in requirements:
                    txt = ", " + i
                    xp = xp + 30
                    reql = Label(s1, text=txt, bg=bgcolor).place(x=xp, y=160)
                locationl = Label(s1,
                                  text="Location : " + location,
                                  bg=bgcolor).place(x=55, y=180)
                expl = Label(s1, text="Experience : " + str(exp),
                             bg=bgcolor).place(x=55, y=200)
                descl = Label(s1, text="Description : " + desc,
                              bg=bgcolor).place(x=55, y=220)

                def apply():
                    c = util.Utility()

                    c.applyJob(name, cvPath, jobId, title, company, userId,
                               "Applied")
                    l = Label(s1,
                              text="Applied successfully",
                              bg=bgcolor,
                              fg="blue").place(x=100, y=240)

                apply = Button(s1, text="Apply", command=apply).place(x=55,
                                                                      y=240)
Beispiel #7
0
def login():
    global name
    global userId
    global cvPath
    name = username.get()
    password = passwd.get()
    #code to check if name and password matches
    c = util.Utility()
    row = c.authenticate(name, password)
    if (row):
        userId = row[0]
        cvPath = row[10]
        s.destroy()
        home()
Beispiel #8
0
def applyJob():
    c = util.Utility()
    # 5 lines prints all JOB from database
    result = c.fetchJobs()
    for row in result:
        print("========================")
        print(row[0], ".", row[1])
        print("Description: ", row[2])
        print("Requirements: ", row[3])
        print("========================")

    # takes application and stores them in database
    apply = int(input("Bol kidar apply karega? : "))
    name = input("Naam kya hai bhai?: ")
    cvpath = os.getcwd() + '/' + input("cv name? (enter extension too):")
    if (c.applyJobs(name, cvpath, apply)):
        print("Applied Successfully!! ")
Beispiel #9
0
    def signup():
        fn = username.get()  #user's name stored in 'fn'
        ln = sname.get()  #user's surname stored in 'ln'
        age = ages.get()  #user's age stored in 'age'
        gender = var.get()  #user's gender stored in 'gender'
        contact = contacts.get()  #user's contact stored in 'contact'
        email = emails.get()  #user's email stored in 'email'
        add = adds.get()  #user's address stored in 'add'
        city = citys.get(ACTIVE)  #user's city stored in 'city'
        #password
        if (passwd.get() and cpasswd.get() and email and contact and city
                and fn and ln and age):
            if (passwd.get() != cpasswd.get()):
                l = Label(s2,
                          text="Error!!! Please retype the password",
                          bg=bgcolor,
                          fg="red").place(x=280, y=240)
            else:
                password = passwd.get()
                #user's password is stored in 'password'

                #code to enter data in database#
                c = util.Utility()
                if (c.createUser(fn, ln, age, gender, contact, email, add,
                                 city, password, filename)):
                    pass
                #
                #
                #
                #
                #code ends#
                global name
                global userId
                global cvPath
                name = fn
                row = c.authenticate(name, password)
                if (row):
                    userId = row[0]
                    cvPath = row[10]
                    s2.destroy()
                    home()
        else:
            l = Label(s2,
                      text="Please enter all required fields",
                      bg=bgcolor,
                      fg="red").place(x=280, y=500)
Beispiel #10
0
        def posted():
            #fetch data of all posted jobs
            #give job title in variable 'jobtitle'
            #give vacancy in variable 'vacancy'
            #start loop
            jobtitle = "Maybe no one applied or all rejected"
            candidate = []
            vacancy = 2
            c = util.Utility()
            ms.startToShortlist(userId)
            title = Label(s1, text="Jobtitle : " + jobtitle,
                          bg=bgcolor).place(x=445, y=100)
            vacancy = Label(s1, text="Vacancy : " + str(vacancy),
                            bg=bgcolor).place(x=600, y=100)
            yp = 120
            xp = 500
            for row in c.fetchPostedJobs_status_Sorted(userId):
                jobtitle = row[2]
                cvpath = row[1]
                userIdx = row[5]
                jobIdx = row[4]
                cvs = cvpath.split("/")
                theCV = ""
                for cv in cvs:
                    if (cv.find(".pdf") != -1):
                        theCV = cv

                def select():
                    select.configure(relief=SUNKEN)
                    c.updateStatus(userIdx, jobIdx, "Selected")

                def reject():
                    c.updateStatus(userIdx, jobIdx, "Rejected")

                def hire():
                    c.updateStatus(userIdx, jobIdx, "Hired")

                l = Label(s1, text=theCV, bg=bgcolor).place(x=xp, y=yp)
                select = Button(s1, text="Select", command=select)
                select.place(x=xp + 50, y=yp)
                reject = Button(s1, text="Reject", command=reject)
                reject.place(x=xp + 100, y=yp)
                hire = Button(s1, text="HIRE", command=hire)
                hire.place(x=xp + 200, y=yp)
                yp = yp + 50
Beispiel #11
0
def newJob(msg):
    print(msg)
    title = input("1. Enter Job Title:")  # Job title wala box
    description = input("2. Enter Job Description:")  # description wala box
    requirements = []
    req = '0'
    # yaha se while loop hatake tujhe jitna requirements chaiye woh lele
    # FOR eg
    # 10th 12th SCIENCE etc etc and save it in requirements ka list
    while (req != 'q'):
        req = input("Enter Requirements and press enter press q to exit : ")
        requirements.append(req)
    requirements.pop()  # ignore this

    # INSERT THIS STUFF INTO DATABASE
    c = util.Utility()
    if (c.insertJob(title, description, requirements)):
        print("Successfull!!")
    else:
        print("Beta tumse na ho payega!")
Beispiel #12
0
 def post_submit():
     title1 = title.get()
     company1 = company.get()
     salary1 = salary.get()
     jobtype1 = jobtype.get()
     if (jobtype1 == 1):
         jobType = "Full Time"
     elif (jobtype1 == 2):
         jobType = "Part Time"
     else:
         jobType = "Work From Home"
     location1 = location.get()
     exp1 = exp.get()
     desc1 = desc.get()
     #to database
     c = util.Utility()
     if (c.insertJob(title1, company1, salary1, jobType, location1,
                     exp1, desc1, requirements, userId)):
         # Zeel Iske baad write Code TO clear Screen And go to Home
         pass
Beispiel #13
0
def authentication():
    u = input("USERNAME DAAL:")
    p = input("password DAAL:")
    c = util.Utility()
    return c.authenticate(u, p)
Beispiel #14
0
def plotGraph(userId):
    c = util.Utility()
    jobScore = c.getScores(userId)
    cvScore = c.getCVScore(userId)
    score = 0
    i = 0
    scorey = [0]
    for scorex in jobScore:
        scorey.append(scorex[0])

    application = cvScore[2]

    shortlisted = cvScore[3]
    selected = cvScore[4]
    hired = cvScore[5]
    rejected = cvScore[6]

    maxtest = application * 3
    ch = []
    simplescore = [0]
    s = 0
    while (maxtest > 0):
        if (shortlisted <= application):
            ch.append(shortlisted)
            s = s + shortlisted
            maxtest -= 1
            shortlisted -= 1
        if (selected <= shortlisted):
            ch.append(selected)
            s = s + selected
            maxtest -= 1
            selected -= 1
        if (hired <= selected):
            ch.append(hired)
            s = s + hired
            maxtest -= 1
            hired -= 1
        if (rejected <= shortlisted):
            ch.append(-rejected)
            s = s - rejected
            maxtest -= 1
            rejected -= 1
        maxtest -= 1
        simplescore.append(s)
        s = 0
    j = 1
    app = [0]
    for k in range(application):
        app.append(j)
        j += 1
    cy = ch[::-1]
    plt.plot(simplescore, label="personal scores")
    plt.plot(app, scorey, label="Score given by companies")
    plt.axis([0, application, -2, 10])
    plt.xlabel("Applications")
    plt.ylabel("Scores")
    plt.legend()
    path = str(userId) + ".png"
    print(path)
    plt.savefig(path)
    return path