def create_tasks(self,model,input_format,trainfile,outdir,num_items,num_engines,max_similar_items,done):
        if num_engines == 0:
            # special marker for sequential run
            num_engines = 1
        items_per_engine = int(math.ceil(num_engines/float(num_items)))
        tasks = []
        for start in xrange(0,num_items,items_per_engine):
            end = min(num_items,start+items_per_engine)
            if (start,end) not in done:
                tasks.append((model,input_format,trainfile,outdir,start,end,max_similar_items))
        return tasks
dataset/ETHPy150Open Mendeley/mrec/mrec/parallel/item_similarity.py/ItemSimilarityRunner.create_tasks/swapped operands of `/`