Esempio n. 1
0
def comparepais(id, entry):
    
    identry = me.getKey(entry)
    if (id == identry):
        return 0
    elif (id > identry):
        return 1
    else:
        return -1
Esempio n. 2
0
def compareMapVideocatid(id, entry):
    
    identry = me.getKey(entry)
    if (int(id) == int(identry)):
        return 0
    elif (int(id) > int(identry)):
        return 1
    else:
        return -1
def compareGeners(keyname, genero):

    Generoentry = me.getKey(genero)
    if (keyname == Generoentry):
        return 0
    elif (keyname > Generoentry):
        return 1
    else:
        return -1
def comparePaises(keyname, pais):

    paisentry = me.getKey(pais)
    if (keyname == paisentry):
        return 0
    elif (keyname > paisentry):
        return 1
    else:
        return -1
Esempio n. 5
0
def compararCategoria(name, categoria):

    tagentry = me.getKey(categoria)
    if (name == tagentry):
        return 0
    elif (name > tagentry):
        return 1
    else:
        return -1
Esempio n. 6
0
def compareCountries(keyname, author):

    authentry = me.getKey(author)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
def compareActorsByName(keyname, actor):
    """Designed by: Juliana Andrea Galeano Caicedo"""
    authentry = me.getKey(actor)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
Esempio n. 8
0
def printGenre(analyzer):

    llaves = mp.keySet(analyzer["musical_genre"])
    for every_key in lt.iterator(llaves):
        if every_key != None:
            item = mp.get(analyzer["musical_genre"], every_key)
        llave = me.getKey(item)
        print(llave)
    return "-------"
Esempio n. 9
0
def compareDirectorByName(keyname, director):

    authentry = me.getKey(director)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
def compareMapActorsByName(keyname, actor):
    actorentry = me.getKey(actor)
    if keyname == actorentry:
        return 0
    elif keyname > actorentry:
        return 1
    else:
        return -1
    return 0
def comparar_estados(keyname, estado):

    authentry = me.getKey(estado)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
Esempio n. 12
0
def compareMoviesByName(keyname, movie):

    authentry = me.getKey(movie)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
Esempio n. 13
0
def compareMoviesIds(keyname, ids):

    authentry = me.getKey(ids)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
Esempio n. 14
0
def compararEstaciones(E1, E2):

    entry = me.getKey(E2)
    if (E1 == entry):
        return 0
    elif (E1 > entry):
        return 1
    else:
        return -1
Esempio n. 15
0
def compareChannels(id, entry):

    identry = me.getKey(entry)
    if (int(id) == int(identry)):
        return 0
    elif (int(id) > int(identry)):
        return 1
    else:
        return -1
Esempio n. 16
0
def comparekeys(key1, key2):

    key = me.getKey(key2)
    if (key1 == key):
        return 0
    elif (key1 > key):
        return 1
    else:
        return -1
def compareMapMovieIds(id, entry):

    identry = me.getKey(entry)
    if (int(id) == int(identry)):
        return 0
    elif (int(id) > int(identry)):
        return 1
    else:
        return -1
Esempio n. 18
0
def compareCompanyByName(keyname, company):

    authentry = me.getKey(company)
    if (keyname == authentry):
        return 0
    elif (keyname > authentry):
        return 1
    else:
        return -1
Esempio n. 19
0
def lastGenre(analyzer, new_genre):

    llaves = mp.keySet(analyzer["musical_genre"])
    for every_key in lt.iterator(llaves):
        if every_key != None:
            item = mp.get(analyzer["musical_genre"], every_key)
        llave = me.getKey(item)
        if llave == new_genre:
            answer = llave
    return answer
Esempio n. 20
0
def compareDates(date1, date2):
    date20=me.getKey(date2)
    #print(date1)
    #print(date2)
    if (date1 == date20):
        return 0
    elif (date1 > date20):
        return 1
    else:
        return -1
Esempio n. 21
0
def cmpbyId(id1, id2):

    ID2 = me.getKey(id2)

    if id1 == ID2:
        return 0
    elif id1 > ID2:
        return 1
    else:
        return -1
Esempio n. 22
0
def cmpbyId2(id1, id2):

    ID2 = me.getKey(id2)

    if int(id1) == int(ID2):
        return 0
    elif int(id1) > int(ID2):
        return 1
    else:
        return -1
Esempio n. 23
0
def comparecountries(name, country):

    countryKey = me.getKey(country)

    if (name == countryKey):
        return 0
    elif (name < countryKey):
        return -1
    else:
        return 1
Esempio n. 24
0
def compararPais(pais, video):

    paisentry = me.getKey(video)

    if (pais == paisentry):
        return 0
    elif pais > paisentry:
        return 1
    else:
        return -1
Esempio n. 25
0
def comparecategories(name, category):

    categoryKey = me.getKey(category)

    if (name == categoryKey):
        return 0
    elif (name < categoryKey):
        return -1
    else:
        return 1
Esempio n. 26
0
def getMoviesinTagbyName(catalog, tag, name):
    """
    Retorna los peliculas publicadas por una productora
    """

    pro = mp.get(catalog[tag], name)
    if pro:
        movies = me.getValue(pro)
        return {"name": me.getKey(pro), "movies": me.getValue(pro), "size": lt.size(movies)}
    return None
def compareProductionCompanies(id, entry):
    """
    Compara dos ids de compañias productoras
    """
    identry = me.getKey(entry)
    if (id == identry):
        return 0
    elif (id > identry):
        return 1
    else:
        return -1
def compareMoviesIds(id, entry):
    """
    Compara dos ids de peliculas
    """
    identry = me.getKey(entry)
    if (int(id) == int(identry)):
        return 0
    elif (int(id) > int(identry)):
        return 1
    else:
        return -1
Esempio n. 29
0
def compareOffenses(offense1, offense2):
    """
    Compara dos tipos de crimenes
    """
    offense = me.getKey(offense2)
    if (offense1 == offense):
        return 0
    elif (offense1 > offense):
        return 1
    else:
        return -1
Esempio n. 30
0
def compareHashtags(hashtag1, hashtag2):
    """
    Compara dos hastags
    """
    hashtag = me.getKey(hashtag2)
    if (hashtag1 == hashtag):
        return 0
    elif (hashtag1 > hashtag):
        return 1
    else:
        return -1