@get('/worksheets/sample/')
def get_sample_worksheets():
    service = BundleService()

    # Select good high-quality worksheets and randomly choose some
    list_worksheets = service.search_worksheets(['tag=paper,software,data'])
    list_worksheets = random.sample(list_worksheets, min(3, len(list_worksheets)))

    # Always put home worksheet in
    list_worksheets = service.search_worksheets(['name=home']) + list_worksheets

    # Reformat
    list_worksheets = [{'uuid': val['uuid'],
                        'display_name': val.get('title') or val['name'],
                        'owner_name': val['owner_name']} for val in list_worksheets]

    response.content_type = 'application/json'
    return json.dumps(list_worksheets)
Method for generate 100x100 square thumbnails.
dataset/ETHPy150Open codalab/codalab-cli/codalab/rest/legacy.py/get_sample_worksheets--crossover with--dataset/ETHPy150Open niwinz/niwi-web/src/niwi/photo/image.py/ImageAdapter.square