Exemplo n.º 1
0
def getVideosByCategoryAndCountry(catalog, categoryname, countryname):
    """
    Retorna los videos dado una categoria y pais
    """
    videos = model.getVideosByCategoryAndCountry(catalog, categoryname,
                                                 countryname)
    return videos
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
def getVideosByCategoryAndCountry(catalog, category_name, country,  numvid):
    return model.getVideosByCategoryAndCountry(category_name, country, numvid)
Exemplo n.º 5
0
def getVideosByCategoryAndCountry(catalog, category, country):
    '''
    Retorna los videos dado un país y categoría específicos
    '''
    return model.getVideosByCategoryAndCountry(catalog, category, country)
Exemplo n.º 6
0
def Requerimiento_2(catalogo, categoria, pais):
    result1 = model.getVideosByCategoryAndCountry(catalogo, categoria, pais)
    result = model.sortVideos(result1, lt.size(result1), 'ms',
                              'cmpVideosByViews')
    return result