def getVideosByCategoryAndCountry(catalog, categoryname, countryname): """ Retorna los videos dado una categoria y pais """ videos = model.getVideosByCategoryAndCountry(catalog, categoryname, countryname) return videos
def getVideosByCategoryAndCountry(catalog, category_name, country, numvid): print(category_name, country) delta_time = -1.0 delta_memory = -1.0 tracemalloc.start() start_time = getTime() start_memory = getMemory() answer = model.getVideosByCategoryAndCountry(catalog, category_name, country, numvid) stop_memory = getMemory() stop_time = getTime() tracemalloc.stop() delta_time = stop_time - start_time delta_memory = deltaMemory(start_memory, stop_memory) return answer, delta_time, delta_memory
def getVideosByCategoryAndCountry(catalog, categoryid, country): """ Retorna los videos de la categoría y país seleccionados """ deltatime = -1.0 deltamemory = -1.0 tracemalloc.start() starttime = getTime() startmemory = getMemory() videos = model.getVideosByCategoryAndCountry(catalog, categoryid, country) stopmemory = getMemory() stoptime = getTime() tracemalloc.stop() deltatime = stoptime - starttime deltamemory = deltaMemory(startmemory, stopmemory) return videos, deltatime, deltamemory
def getVideosByCategoryAndCountry(catalog, category_name, country, numvid): return model.getVideosByCategoryAndCountry(category_name, country, numvid)
def getVideosByCategoryAndCountry(catalog, category, country): ''' Retorna los videos dado un país y categoría específicos ''' return model.getVideosByCategoryAndCountry(catalog, category, country)
def Requerimiento_2(catalogo, categoria, pais): result1 = model.getVideosByCategoryAndCountry(catalogo, categoria, pais) result = model.sortVideos(result1, lt.size(result1), 'ms', 'cmpVideosByViews') return result