Beispiel #1
0
def fireEmployee(x):
    fileName = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Employee.txt'
    fileName2 = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Previous_Employee.txt'

    info = str(
        input(
            '\nEnter one of the following for the employee being fire: ID, First Name, Last Name, or Email: '
        ))
    fReason = str(
        input(
            'Enter the reason for being fired: Fired (1), Layed off (2), Quit (3): '
        ))

    if fReason == '1':
        reason = 'Fired'
    elif fReason == '2':
        reason = 'Lay off'
    elif fReason == '3':
        reason = 'Quit'
    else:
        print('Invalid input')

    DataModule.fireProcess(fileName, fileName2, info, reason)

    print('Employee removed from List')
Beispiel #2
0
def FillTeacherDictForMonth(ht_or_vt, offset, index, teachers):
    HtmlReuse.CalcDateOffset(offset)
    year = HtmlReuse.year
    month = HtmlReuse.month
    reports = DataModule.GetReports(ht_or_vt, year, month)
    assignments = DataModule.GetAssignments(ht_or_vt, year, month)
    for d in assignments:
        district = assignments[d]
        for c in district.companionships:
            comp = district.companionships[c]
            s = comp.senior_comp.first_name + " " + comp.senior_comp.last_name
            j = comp.junior_comp.first_name + " " + comp.junior_comp.last_name
            if not teachers.has_key(s):
                teachers[s] = {}
            if not teachers.has_key(j):
                teachers[j] = {}
            for teachee in comp.assignments:
                if reports[teachee.first_name + " " +
                           teachee.last_name].visited:
                    teachers[s][index] = "visited"
                    teachers[j][index] = "visited"
                    break
                elif reports[teachee.first_name + " " +
                             teachee.last_name].reported:
                    teachers[s][index] = "not_visited"
                    teachers[j][index] = "not_visited"
            if not teachers[s].has_key(index):
                teachers[s][index] = "not_reported"
                teachers[j][index] = "not_reported"
Beispiel #3
0
def promoteEmployee(x):
    fileName = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Employee.txt'
    info = str(
        input(
            '\nEnter one of the following for the employee being promoted: ID, First Name, Last Name, or Email: '
        ))
    DataModule.promotion(fileName, info)
Beispiel #4
0
def UpdateReportInfo(ht_or_vt, teachee, reporter, visited, comment,
                     contact_type):
    reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)

    r = reports[teachee]
    r.visited = visited
    r.reported = True
    r.report_notes = comment
    r.reported_by = reporter
    r.contact_type = contact_type

    DataModule.PutReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month, reports)
Beispiel #5
0
def hireEmployee(info):
    fileName = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Employee.txt'
    fileName2 = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Previous_Employee.txt'

    while True:
        info = str(
            input(
                'Enter the new employee\'s in the format id,first_name,last_name,email,gender,department,Salary: '
            ))
        if DataModule.checkEmployeeInfo(info):
            DataModule.hireProcess(fileName, fileName2, info)
            break
        else:
            print('Re-Enter your information')
            continue
def VNA_read(fstart,fstop,power=-60,wait=60):
    x, y = vna_m.collect_sparam(fstart,fstop,power,wait)  
        
    dat = d_m.data_2d()
    dat.load_var(x,y)
    
    return dat
Beispiel #7
0
    def collect_single(self, f_range, npoints=1601, navg=999, power=-50, wait=1, BW=1e3):
        """This function reads S-parameter from the VNA using the specified setting:
        f_range: frequency range in form of a list [f_start, f_stop]
        npoints: the the number of frequency points to measure
        navg = number of averaging measurements (average coefficient)
        power = RF_out power in dB
        wait =  data collection time in seconds
        BW = IF bandwidth"""
        self.IFBW(BW)
        self.freq_npoints(npoints)
        self.freq_start(f_range[0])
        self.freq_stop(f_range[1])
        self.power(power)
        if navg == 0:
            self.average_state(0)
        else:
            self.average_state(1)
            self.average_count(navg)

        self.average_reset()
        time.sleep(wait)  # delay
        x = np.asarray(self.freq_read(), dtype="float")
        y = np.asarray(self.trace_read()[0], dtype="float")

        dat = dm.data_2d()
        dat.load_var(x, y)
        return dat
Beispiel #8
0
    def collect_scan(self, f_range_mat, npoints_v=[1601], navg_v=[999], power_v=[-50], wait_v=[1], BW_v=[1e3]):
        x = []
        y = []
        range_mat = np.array(f_range_mat)
        len_loop = len(range_mat[:, 0])

        def vector_handling(vector):
            if len(vector) == 1:
                out = vector[0] * np.ones(len_loop)
            else:
                out = vector
            return out

        npoints = vector_handling(npoints_v)
        navg = vector_handling(npoints_v)
        power = vector_handling(power_v)
        wait = vector_handling(wait_v)
        BW = vector_handling(BW_v)

        for i in np.arange(len_loop):
            f_range = range_mat[i, :]
            dat_tmp = self.collect_single(f_range, npoints[i], navg[i], power[i], wait[i], BW[i])
            x = np.hstack((x, dat_tmp.x))
            y = np.hstack((y, dat_tmp.y))

        dat = dm.data_2d()
        dat.load_var(x, y)
        return dat
Beispiel #9
0
 def collect_single_ave(self,f_range,Name,Trace=1,Spar='S21',npoints=1601,navg = 100,power=-50,BW=1e3):
     '''This function reads S-parameter from the VNA using the specified setting:
     f_range: frequency range in form of a list [f_start, f_stop]
     npoints: the the number of frequency points to measure
     navg = number of averaging measurements (average coefficient)
     power = RF_out power in dB
     wait =  data collection time in seconds
     BW = IF bandwidth'''
     self.IFBW(BW)
     self.freq_npoints(npoints)    
     self.freq_start(f_range[0])
     self.freq_stop(f_range[1])
     self.power(power)
     if (navg==0):
         self.average_state(0)
     else:
         self.average_state(1)
         self.average_count(navg)
         
     self.average_reset()
     
     while(self.average_completed() == False):
         time.sleep(1)
     
     self.cmd('CALC'+str(Trace)+':PAR:EXT','\''+Name+'\', \''+Spar+'\'')        
     
     x = np.array(self.freq_read(Name),dtype='float')
     y = np.asarray(self.trace_read(),dtype='float') 
 
     dat = dm.data_2d()  
     dat.load_var(x,y)
     return dat
Beispiel #10
0
 def collect_scan_correct(self,f_range_mat,npoints_v=[1601],navg_v = [999],power_v=[-50],corr_power_v=[-10],wait_v=[10],corr_wait_v=[1],BW_v=[1e3]):
         dat_cor = self.collect_scan(f_range_mat,npoints_v,navg_v,corr_power_v,corr_wait_v,BW_v)        
         
         dat_mes = self.collect_scan(f_range_mat,npoints_v,navg_v,power_v,wait_v,BW_v)        
     
         dat = dm.data_2d()
         dat.load_var(dat_mes.x,dat_mes.y-dat_cor.y)
         return dat
Beispiel #11
0
    def __init__(self,
                 user_name = '',
                 password = '',
                 core = 'local',
                 type = 'HistoryTrading',
                 initial_time='2018-01-01',
                 end_date = datetime.datetime.today(),
                 initial_money=100000):
        '''
        测试引擎总接口,包括本地测试内核和海知平台测试内核。
        接口中需要根据不同的引擎内核进行相应的操作分流
        注:
        海知平台内核只提供交易必须的接口,回测模块本身不设置开始和结束时间,启动资金默认为1000000
        :param core:回测引擎内核,可以选择本地内核或者海知平台回测内核
        :param type: 实盘测试或者是历史回测(仅海知平台内核支持历史回测)
        '''
        #用户名和用户登录密码初始化
        if user_name and password:
            self._user_name = user_name
            self._password = password
        else:
            raise (ValueError,'请输入用户名和密码!')

        # 初始化各个模块
        self._StateModule = StateModule.StateModule(initial_time=initial_time, initial_money=initial_money)
        self._DataModule = DataModule.DataModule(self._StateModule)


        #初始化回测引擎核心组件
        if core == 'local':
            # 初始化结束日期
            if isinstance(end_date, str):
                self._end_date = datetime.datetime.strptime(end_date, '%Y-%m-%d')
            elif isinstance(end_date, datetime.datetime):
                self._end_date = end_date
            self._TradeModule = TradeModule(self._StateModule,self._DataModule)
            self._core = LocalEngine(StateModule = self._StateModule,
                                     DataModule = self._DataModule,
                                     TradeModule = self._TradeModule)

        elif core == 'HaiZhi':
            self._core = HaiZhiTestEngine(user_id = self._user_name, password= self._password,type = type)
            if type =='HistoryTrading':
                self._core.current_time = initial_time
                self._core.del_stratagy(user_name)
                self._core.create_stratagy(user_name)
                self._core.set_stratagy(user_name)
                #初始化结束日期
                if isinstance(end_date,str):
                    self._end_date = datetime.datetime.strptime(end_date,'%Y-%m-%d')
                elif isinstance(end_date,datetime.datetime):
                    self._end_date = end_date

            elif type =='RealTimeTrading':
                initial_time = datetime.datetime.today().strftime('%Y-%m-%d')

        #初始化context
        self._context = Context(self._StateModule,self._DataModule)
Beispiel #12
0
 def collect_single_correct_ave(self,f_range,name,npoints=1601,navg=100,power=-50,corr_power=-10,corr_wait=1,BW=1e3):
         dat_cor = self.collect_single(f_range,name,npoints=npoints,navg=999,power=corr_power,wait=corr_wait,BW=1e3)        
         self.power(-70)            
         time.sleep(2)
         dat_mes = self.collect_single_ave(f_range,name,npoints=npoints,navg=navg,power=power,BW=BW)        
     
         dat = dm.data_2d()
         dat.load_var(dat_mes.x,dat_mes.y-dat_cor.y)
         return dat
Beispiel #13
0
    def collect_single_correct(
        self, f_range, npoints=1601, navg=999, power=-50, corr_power=-10, wait=10, corr_wait=1, BW=1e3
    ):
        dat_cor = self.collect_single(f_range, npoints, navg, corr_power, corr_wait, BW)
        dat_mes = self.collect_single(f_range, npoints, navg, power, wait, BW)

        dat = dm.data_2d()
        dat.load_var(dat_mes.x, dat_mes.y - dat_cor.y)
        return dat
Beispiel #14
0
def ADD_DATA(checkpoint_csv):
    current_checkpoint = [CURRENT_TIME()]
    with open(checkpoint_csv, "a", newline="") as file:
        writer = csv.writer(file)
        writer.writerow(current_checkpoint)
        print(' ')
    MainDataFile = open('data/' + str(CURRENT_TIME()) + '.txt', 'w')
    MainDataFile.write(str(DataModule.GETCOIN()))
    MainDataFile.close()
    CHECK_TIMER(timerequest)
Beispiel #15
0
def StubReportInfo(ht_or_vt, districts):
  reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)

  for d in districts:
    comps = districts[d].companionships
    for c in comps:
      as = comps[c].assignments
      for a in as:
        name = a.first_name + " " + a.last_name
        if not reports.has_key(name):
          reports[name] = Sm3Ht.ReportInfo()
Beispiel #16
0
def checkInfo(x):  #Check the file and print out the employee's information
    fileName = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Employee.txt'

    info = str(
        input(
            'How would you like to check the employee\'s info: ID (1), First Name (2), Last Name (3), or Email (4): '
        ))

    if info == '1':
        ID = str(input('Enter ID: '))
        print(DataModule.employeeInfo(fileName, ID))
    elif info == '2':
        ID = str(input('Enter First Name: '))
        print(DataModule.employeeInfo(fileName, ID))
    elif info == '3':
        ID = str(input('Enter Last Name: '))
        print(DataModule.employeeInfo(fileName, ID))
    elif info == '4':
        ID = str(input('Enter Email: '))
        print(DataModule.employeeInfo(fileName, ID))
    else:
        print('Invaild Input')
Beispiel #17
0
def PrintCsvReports(ht_or_vt):
  import csv
  districts = DataModule.GetAssignments(ht_or_vt,
                                       HtmlReuse.year,
                                       HtmlReuse.month)
  reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)
  writer = csv.writer(sys.stdout)
  writer.writerow(["Name",
		   "Visited",
		   "Reported",
		   "Reported By",
		   "Report Notes",
		   "Contact Type",
		   "Senior Companion",
		   "Junior Companion"])

  for d in districts:
    comps = districts[d].companionships
    for c in comps:
      as = comps[c].assignments
      for a in as:
        name = a.first_name + " " + a.last_name
        if reports.has_key(name):
          report = reports[name]
        else:
          report = Sm3Ht.ReportInfo()
        
        writer.writerow([name,
			 report.visited,
			 report.reported,
			 report.reported_by,
			 report.report_notes,
			 report.contact_types,
			 comps[c].senior_comp.first_name + " " +
			 comps[c].senior_comp.last_name,
			 comps[c].junior_comp.first_name + " " +
			 comps[c].junior_comp.last_name])
Beispiel #18
0
def GetDictByAssignment(ht_or_vt, month_diff):
    assignment_reports = {}
    offset = month_diff
    reports = {}
    while offset > month_diff - 12:
        HtmlReuse.CalcDateOffset(offset)
        reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year,
                                        HtmlReuse.month)
        for key in reports:
            if not assignment_reports.has_key(key):
                assignment_reports[key] = {}
            assignment_reports[key][11 - (month_diff - offset)] = reports[key]
        offset -= 1
    FillEmptyMonths(ht_or_vt, assignment_reports)
    return assignment_reports
Beispiel #19
0
def PrintTotalReported(ht_or_vt, month_diff):
    HtmlReuse.CalcDateOffset(month_diff)
    reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)
    total_reported = 0
    total_houses = 0
    for key in reports:
        total_houses += 1
        if reports[key].reported:
            total_reported += 1
    if total_reported == 0:
        print "No visits recorded yet"
    elif total_houses == 0:
        print ""
    else:
        perc2 = 100 * total_reported / total_houses
        print "Total reported: %d" % total_reported, "out of %d" % total_houses, ": %.1f" % perc2, "%"
Beispiel #20
0
def PrintTotalVisits(ht_or_vt, month_diff):
    HtmlReuse.CalcDateOffset(month_diff)
    reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)
    total_visits = 0
    total_houses = 0
    for key in reports:
        total_houses += 1
        if reports[key].visited:
            total_visits += 1
    if total_visits == 0:
        print "No visits recorded yet"
    elif total_houses == 0:
        print "No Report Yet"
    else:
        perc = 100 * total_visits / total_houses
        print "Total visits for this month: %d" % total_visits, "out of %d" % total_houses, ": %.1f" % perc, "%"
Beispiel #21
0
if ht_or_vt == None:
    print "Don't know what type of page this is!"
    sys.exit(0)

month_diff = 0
if form.has_key("chm"):
    month_diff = int(form["chm"].value)
    HtmlReuse.CalcDateOffset(month_diff)

d = -1
c = -1
if form.has_key("d"):
    d = int(form["d"].value)
if form.has_key("c"):
    c = int(form["c"].value)

assignments = DataModule.GetAssignments(ht_or_vt, HtmlReuse.year,
                                        HtmlReuse.month)
reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)

#
#
#
HtmlReuse.PrintCal("contact?group=%s&d=%d&c=%d" % (ht_or_vt, d, c), month_diff)
print "<br><br>"
if len(assignments) > 0 and d != -1 and c != -1:
    DisplayContactDynamic.PrintHtml(d, c, ht_or_vt, assignments, reports,
                                    month_diff)
else:
    print "<h2>Assignments for this month have not been uploaded yet.</h2>"
Beispiel #22
0
    if DataPath:
        print(' ')
    else:
        print(' ')
    return DataPath


def GET_LAST_CHECKPOINT():
    with open('data/checkpoints.csv', 'r') as fp:
        reader = csv.reader(fp)
        data_read = [row for row in reader]
    last_checkpoint_list_unit = str(data_read[len(data_read) - 1])
    last_checkpoint = int(last_checkpoint_list_unit[2:-2])
    return last_checkpoint


GET_LAST_CHECKPOINT()
current_time = int(time.time())
last_checkpoint = GET_LAST_CHECKPOINT()


def DATA_MEGERING():
    CheckpointMegering = current_time - last_checkpoint
    return CheckpointMegering


DATA_MEGERING()
open(str(CURRENT_TIME()) + '.txt', 'w')
close()
print(DataModule.GETCOIN())
Beispiel #23
0
def updateInfo(x):
    fileName = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Employee.txt'
    employee = str(
        input(
            '\nEnter one of the following for the employee whose information is being updated: ID, First Name, Last Name, or Email: '
        ))
    section = str(
        input(
            'Enter which of the following needs to be changed: First Name (1), Last Name (2), Email (3), Department (4), Salary (5)'
        ))

    y = True
    while y == True:
        if section == '1':
            position = 1
            info = str(input('Enter the updated First Name: '))
            if len(info) > 20 and (info[0] == ' ' or info[-1] == ' '):
                print('Invalid First Name: Re-Enter')
                continue
            else:
                break

        elif section == '2':
            position = 2
            info = str(input('Enter the updated Last Name: '))
            if len(info) > 20 and (info[0] == ' ' or info[-1] == ' '):
                print('Invalid Last Name: Re-Enter')
                continue
            else:
                break

        elif section == '3':
            position = 3
            info = str(input('Enter the new Email: '))
            if '@' not in info:
                print('Invalid email, Re-Enter')
                continue
            else:
                break

        elif section == '4':
            department = int(
                input(
                    'Enter the new department: Accounting(1), Business(2), Development(3), Engineering(4), Human Resources(5), Legal(6), \nMarketing(7), Product Managment(8), Research and Development(9), Sales(10), Services(11), Support(12), Training(13)'
                ))
            position = 5
            if department == 1:
                info = 'Accounting'
                break
            elif department == 2:
                info = 'Business'
                break
            elif department == 3:
                info = 'Development'
                break
            elif department == 4:
                info = 'Engineering'
                break
            elif department == 5:
                info = 'Human Resources'
                break
            elif department == 6:
                info = 'Legal'
                break
            elif department == 7:
                info = 'Marketing'
                break
            elif department == 8:
                info = 'Product Managment'
                break
            elif department == 9:
                info = 'Research and Development'
                break
            elif department == 10:
                info = 'Sales'
                break
            elif department == 11:
                info = 'Services'
                break
            elif department == 12:
                info = 'Support'
                break
            elif department == 13:
                info = 'Training'
                break
            else:
                print('Invalid input. Enter Again')
                continue

        elif section == '5':
            position = 6
            info = str(input('Enter the new salary for the employee'))
            if salary > '100000' or salary < '50000':
                print('Invalid salary entered. Please re-enter')
                continue
            else:
                break

        else:
            print('Invalid Input')
            section = str(
                input(
                    'Re-Enter which of the following needs to be changed: First Name (1), Last Name (2), Email (3), Department (4), Salary (5)'
                ))
            continue

    DataModule.update(fileName, employee, info, position)

    print('Info updated')
Beispiel #24
0
import datetime
import time

import CryptWatchModule
import DataModule
import TimeModule
import GraphModule
import TwitterModule

#====Param====
DataDir = '../tradedata'
PicDir = '../pic'
dt_now = datetime.datetime.now()
filename = str(dt_now.year) + str(dt_now.month).zfill(2) + str(
    dt_now.day).zfill(2)
DataMod = DataModule.DataModule(DataDir, filename)
DataDay = int(dt_now.day)
DataMonth = dt_now.month
CryWat = CryptWatchModule.CryptWatchModule()
#sec
alpha = 10 * 60
#min
delta = 60
#resume_back[hour]
resume_back = 4
#sleep min
s_delta = 1
#========

#====Resume====
if (DataMod.Find_Flag):
Beispiel #25
0
# -*- coding: utf-8 -*-
"""
Created on Thu Mar 21 18:16:04 2019

@author: zLimbo
"""

import DataModule
import RandomModule

if __name__ == '__main__':
    RandomModule.Initial()
    DataModule.PrintData()
Beispiel #26
0
import Common
import DataModule

def StubReportInfo(ht_or_vt, districts):
  reports = DataModule.GetReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month)

  for d in districts:
    comps = districts[d].companionships
    for c in comps:
      as = comps[c].assignments
      for a in as:
        name = a.first_name + " " + a.last_name
        if not reports.has_key(name):
          reports[name] = Sm3Ht.ReportInfo()

  DataModule.PutReports(ht_or_vt, HtmlReuse.year, HtmlReuse.month, reports)

def ReplaceHtAssignments(ht_or_vt):
  sm3_ht = Sm3Ht.SM3HomeTeaching(form["membership_file"].value.split("\n"))
  districts = sm3_ht.GetHTDistricts()
  DataModule.PutAssignments(ht_or_vt, HtmlReuse.year, HtmlReuse.month,
                            districts)
  return districts


form = cgi.FieldStorage()

#
# Perform Authorization
#
Common.AuthorizePage(["htadmin", "vtadmin", "admin"])
Beispiel #27
0
def ReplaceHtAssignments(ht_or_vt):
  sm3_ht = Sm3Ht.SM3HomeTeaching(form["membership_file"].value.split("\n"))
  districts = sm3_ht.GetHTDistricts()
  DataModule.PutAssignments(ht_or_vt, HtmlReuse.year, HtmlReuse.month,
                            districts)
  return districts
Beispiel #28
0
#GetBackData.py
#Modifled 2018/5/24
import sys

sys.path.append('../module')

import CryptWatchModule
import DataModule
import TimeModule

DataDir = './tradedata'
filename = 'Before_20180524_000000'
CryWat = CryptWatchModule.CryptWatchModule()
DataMod = DataModule.DataModule(str(DataDir) + '/' + str(filename))

end_time = TimeModule.GetUtime_j(2018, 5, 24, 0, 0, 0)
start_time = end_time - 60 * 60

end_flag = False
count = 0
while (not end_flag):
    ohlc_list = CryWat.GetOHLC(end_time, start_time, 60)
    ohlc_list.reverse()

    if (len(ohlc_list) != 0):
        if (count != 0):
            del ohlc_list[0]
        DataMod.AddOHLC(ohlc_list)

        print(
            TimeModule.GetTime_j(end_time) + ' - ' +
Beispiel #29
0
def reportMod(x):
    fileName = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Employee.txt'
    fileName2 = 'C:/Users/nahid.DESKTOP-S18FO6A/Desktop/Final Project/Previous_Employee.txt'

    reportType = int(
        input(
            'What type of report would you like to generate: \n\n(1) Salary Range of Workers \n(2) Head Count in a Department \n(3) Gender \n(4) Employees that left the company\n'
        ))

    while True:
        if reportType == 1:
            #Report by determining the amount of employees that fall in a salary range
            salaryRange = int(
                input('Enter the salary range in the format (min,max): '))

            if int(salaryRange.split(',')[0]) < 0 or int(
                    salaryRange.split(',')[1]) > 100000 or int(
                        salaryRange.split(',')[0]) > 100000 or int(
                            salaryRange.split(',')[1]) < 0:
                print('Invalid range entered. Please re-enter the range.')
                continue
            else:
                DataModule.salaryReport(fileName, salaryRange)
                break

            #End

        elif reportType == 2:
            #Report Separator By Department
            department = int(
                input(
                    'Enter the department to report on: \n\nAccounting(1) \nBusiness(2) \nDevelopment(3) \nEngineering(4) \nHuman Resources(5) \nLegal(6) \nMarketing(7) \nProduct Managment(8) \nResearch and Development(9) \nSales(10) \nServices(11) \nSupport(12) \nTraining(13) \nQuit(0)\n'
                ))

            if department == 1:
                info = 'Accounting'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 2:
                info = 'Business'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 3:
                info = 'Development'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 4:
                info = 'Engineering'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 5:
                info = 'Human Resources'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 6:
                info = 'Legal'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 7:
                info = 'Marketing'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 8:
                info = 'Product Managment'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 9:
                info = 'Research and Development'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 10:
                info = 'Sales'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 11:
                info = 'Services'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 12:
                info = 'Support'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 13:
                info = 'Training'
                DataModule.departmentReport(fileName, info)
                break
            elif department == 0:
                break
            else:
                print('Invalid input. Enter Again')
                continue

            #End

        elif reportType == 3:
            #Report generating the number of males and females in the company

            type1 = 'Male'
            type2 = 'Female'

            DataModule.genderReport(fileName, type1, type2)

            break

        elif reportType == 4:
            type1 = 'Fired'
            type2 = 'Lay off'
            type3 = 'Quit'

            DataModule.previousCount(fileName2, type1, type2, type3)

            break

        else:
            print('Invalid Input. Please Re-Enter.')
            reportType = int(
                input(
                    '\nWhat type of report would you like to generate: \n\n(1) Salary Range of Workers \n(2) Head Count in a Department \n(3) Gender \n(4) Blacklisted Employee Count \n(5) Lay Off Employee Count \n(6) Employee Quit Count\n'
                ))
            continue

    print('\nReport Generated')