def useCaseOne(): print "Use case one - Given a time window provide a list of open time within window" availableMeetingSlots = list() slots = list() index = 0 for i in range(0, numOfWindowSlots): if meetingMatrix[index][i] == 0: availableMeetingSlots.append(i) for i in availableMeetingSlots: slots.append(str(func.posixToPST(timeWindowSlots[i]))) return slots
def useCaseOne(): print 'Use case one - Given a single username, provide his open times within the window specified.' availableMeetingSlots = list() index = 0 for i in range(0, numOfWindowSlots): if meetingMatrix[index][i] == 0: availableMeetingSlots.append(i) email = participants[0].getEmail() print '\n', email, 'is available at the following times for 30 minutes at each time:' for i in availableMeetingSlots: slot = func.posixToPST(timeWindowSlots[i]) print slot print '\n'
def useCaseThree(): availableMeetingSlots = list() slots = list() for i in range(0, numOfWindowSlots): # each time slot for j in range(0, numOfParticipants): # each participant if meetingMatrix[j][i] == 1: # if participant is not available in this slot break # go to next time slot if j == numOfParticipants - 1: # if at last participant, make slot available availableMeetingSlots.append(i) # Display times when all participants are available during timeWindow print "Use Case Three - time slots when all participants are available for 30 minutes:" for i in availableMeetingSlots: slots.append(str(func.posixToPST(timeWindowSlots[i]))) return slots
def useCaseThree(): availableMeetingSlots = list() for i in range(0, numOfWindowSlots): #each time slot for j in range(0, numOfParticipants): #each participant if(meetingMatrix[j][i] == 1): #if participant is not available in this slot break #go to next time slot if(j == numOfParticipants - 1): #if at last participant, make slot available availableMeetingSlots.append(i) #Display times when all participants are available during timeWindow print 'Use Case Three - given a more broad window and a list of usernames, provide all times when all participant\'s are available during for at least 30 minutes' print '\nAll participant\'s are available during the following times for 30 minutes:' for i in availableMeetingSlots: slot = func.posixToPST(timeWindowSlots[i]) print slot print '\n'