Example #1
0
def ajax_recommentation_in():
    date = request.args.get('date', '') # '2013-09-01'
    # test
    #date = test_date 
    input_ts = datetime2ts(date)
    now_ts = time.time()
    now_ts = test_time
    if now_ts - 3600*24*7 > input_ts:
        return None
    else:
        results = recommentation_in(input_ts)

    return json.dumps(results)
def ajax_recommentation_in():
    date = request.args.get('date', '') # '2013-09-01'
    recomment_type = request.args.get('type', 'influence')
    input_ts = datetime2ts(date)
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time
    if now_ts - 3600*24*7 >= input_ts:
        return json.dumps([])
    else:
        results = recommentation_in(input_ts, recomment_type)
    return json.dumps(results)
def ajax_recommentation_in():
    date = request.args.get('date', '')  # '2013-09-01'
    recomment_type = request.args.get('type', 'influence')
    input_ts = datetime2ts(date)
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time
    if now_ts - 3600 * 24 * 7 >= input_ts:
        return json.dumps([])
    else:
        results = recommentation_in(input_ts, recomment_type)
    return json.dumps(results)
Example #4
0
def ajax_recommentation_in():
    #按影响力推荐,按敏感度推荐
    date = request.args.get('date', '2016-11-27') # '2013-09-01'
    recomment_type = request.args.get('type', 'influence')  #influence  sensitive
    submit_user = request.args.get('submit_user', 'admin') # 提交人
    input_ts = datetime2ts(date)
    #run_type
    if RUN_TYPE == 1:
        now_ts = time.time()
    else:
        now_ts = test_time
    if now_ts - 3600*24*7 >= input_ts:
        return json.dumps([])
    else:
        results = recommentation_in(input_ts, recomment_type, submit_user)
    return json.dumps(results)