Esempio n. 1
0
 def getSizes(self):
     files = []
     y = 0
     self.returns = []
     self.leaderData=[]
     size = []
     for name in self.p3.names:
         files.append([name.get(), self.p3.entries[y]])
         #files[name.get()] = self.p3.entries[y]
         y += 1
     x = 0
     for f in files:
         self.returns.append(studentImport.scan(f[1], f[0]))
         size.append([f[0], len(self.returns[x][0])])
         x+=1
     a,b,self.leaderData = leaderImport.scan(self.p3.leadSheet.get())
     number=len(self.leaderData)
     self.p4 = getClasses(self, 'Calculate', size, number, height=400, width=600)
     self.p4.place(x=0, y=0, relwidth=1, relheight=1)
     self.p4.callback = self.runCombos
     self.p4.onlift()
Esempio n. 2
0
 def getSizes(self):
     files = []
     y = 0
     self.returns = []
     self.leaderData = []
     size = []
     for name in self.p3.names:
         files.append([name.get(), self.p3.entries[y]])
         # files[name.get()] = self.p3.entries[y]
         y += 1
     x = 0
     for f in files:
         self.returns.append(studentImport.scan(f[1], f[0]))
         size.append([f[0], len(self.returns[x][0])])
         x += 1
     a, b, self.leaderData = leaderImport.scan(self.p3.leadSheet.get())
     number = len(self.leaderData)
     self.p4 = getClasses(self, "Calculate", size, number, height=400, width=600)
     self.p4.place(x=0, y=0, relwidth=1, relheight=1)
     self.p4.callback = self.runCombos
     self.p4.onlift()
Esempio n. 3
0
import time
#import excel file, print data
starttime=time.time()
import studentImport
blah=[]
datas=[]
data,times = studentImport.scan('/home/jasper/pilot/data.xls','Calc II')
data2,times2 = studentImport.scan('/home/jasper/pilot/data2.xls','Chem I')
import importRooms
rooms,roomCount=importRooms.scan('/home/jasper/pilot/rooms.xlsx')
blah.append(times)
blah.append(times2)
datas.append(data)
datas.append(data2)
import combinations
combos=[]
combos.append(combinations.combinations(blah[0],8,data,roomCount))
combos.append(combinations.combinations(blah[1],10,data2,roomCount))
print(len(combos[0]))
print(len(combos[1]))

import sort
finalCombo,finalAssignments,finalWaitList=sort.Sorter(datas,combos,['Calc II','Chem I'],[8,10],rooms,blah)
print(len(finalCombo))
#determine which finalCombo fits the leader availability the best

#leaderData=leaderImport.scan()

#import assign