def user(request, nickname, type=None):
    if request.session.get('nickname', None):
        f = friendfeed.FriendFeed(request.session['nickname'],
            request.session['key'])
        key = 'profile/' + request.session['nickname']
        current_user = memcache.get(key)
        if not current_user:
            current_user = {}
            try:
                current_user = f.fetch_user_profile(request.session['nickname']) 
                memcache.set(key, current_user, 60*60)
            except:
                pass
        subscriptions = [s['nickname'] for s in current_user.get('subscriptions', [])]
        subscribed = nickname in subscriptions
    else:
        f = friendfeed.FriendFeed()
        subscribed = False
    start = max(get_integer_argument(request, 'start', 0), 0)
    num = get_integer_argument(request, 'num', NUM)
    kwargs = request_to_feed_args_dict(request)
    if type == 'comments':
        data = f.fetch_user_comments_feed(nickname, **kwargs)
    elif type == 'likes':
        data = f.fetch_user_likes_feed(nickname, **kwargs)
    elif type == 'discussion':
        data = f.fetch_user_discussion_feed(nickname, **kwargs)
    elif type == 'friends':
        data = f.fetch_user_friends_feed(nickname, **kwargs)
    else:
        data = f.fetch_user_feed(nickname, **kwargs)
    try:
        profile = f.fetch_user_profile(nickname)
    except:
        profile = {
            'name': data['entries'][0]['user']['name'],
        }
    if 'errorCode' in data:
        return error(request, data)
    entries = [entry for entry in data['entries'] if not entry['hidden']]
    hidden = [entry for entry in data['entries'] if entry['hidden']]
    extra_context = {
        'entries': entries,
        'hidden': hidden,
        'next': start + num,
        'profile': profile,
        'subscribed': subscribed,
        'type': type,
    }
    if start > 0:
        extra_context['has_previous'] = True
        extra_context['previous'] = max(start - num, 0)
    if request.GET.get('output', 'html') == 'atom':
        return atom(entries)
    return render_to_response('user.html', extra_context, context_instance=RequestContext(request))
Clear the list of warning filters, so that no filters are active.
dataset/ETHPy150Open bgolub/fftogo/fftogo/views.py/user--crossover with--dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/warnings.py/resetwarnings