@cached
async def get(self, user, **namespace):
    page = self.get_argument('page', None)
    params = {}
    if page:
        params['page'] = page
    with self.catch_client_error():
        response = (await self.github_client.get_gists(user, params=params))
    (prev_url, next_url) = self.get_page_links(response)
    gists = json.loads(response_text(response))
    entries = []
    for gist in gists:
        notebooks = [f for f in gist['files'] if f.endswith('.ipynb')]
        if notebooks:
            entries.append(dict(id=gist['id'], notebooks=notebooks, description=(gist['description'] or '')))
    if (self.github_url == 'https://github.com/'):
        gist_base_url = 'https://gist.github.com/'
    else:
        gist_base_url = url_path_join(self.github_url, 'gist/')
    provider_url = url_path_join(gist_base_url, '{user}'.format(user=user))
    html = self.render_usergists_template(entries=entries, user=user, provider_url=provider_url, prev_url=prev_url, next_url=next_url, **namespace)
    (await self.cache_and_finish(html))
@cached
async def get(self, user, **namespace):
    page = self.get_argument('page', None)
    params = {}
    if page:
        params['page'] = page
    with self.catch_client_error():
        response = (await self.github_client.get_gists(user, params=params))
    (prev_url, next_url) = self.get_page_links(response)
    gists = json.loads(response_text(response))
    entries = []
    for gist in gists:
        notebooks = [f for f in gist['files'] if f.endswith('.ipynb')]
        if notebooks:
            entries.append(dict(id=gist['id'], notebooks=notebooks, description=(gist['description'] or )))
    if (self.github_url == 'https://github.com/'):
        gist_base_url = 'https://gist.github.com/'
    else:
        gist_base_url = url_path_join(self.github_url, 'gist/')
    provider_url = url_path_join(gist_base_url, '{user}'.format(user=user))
    html = self.render_usergists_template(entries=entries, user=user, provider_url=provider_url, prev_url=prev_url, next_url=next_url, **namespace)
    (await self.cache_and_finish(html))