Exemplo n.º 1
0
def get_lists(recommendation):
    ts = int(time.time())
    datapoint = np.array([weekday(ts), hour_of_day(ts), 1])
    #print datapoint
    #datapoint = np.array([6,10,1])
    list_of_rec = recommendation.get_kmeans_recommendations(datapoint)
    return jsonify({'lists': mapping.programs_to_data(list_of_rec, recommendation.get_meta_data())})
Exemplo n.º 2
0
def get_trending_concepts(recommendation):
    list_of_rec = recommendation.get_trend_recommendations()
    return jsonify({'lists': mapping.programs_to_data(list_of_rec, recommendation.get_meta_data())})