Skip to content

Instantly share code, notes, and snippets.

View gabriel4649's full-sized avatar

Gabriel gabriel4649

View GitHub Profile
@gabriel4649
gabriel4649 / class_list_export.py
Last active January 26, 2018 21:42
Get list of Canvas sortable names
import csv
from canvasapi import Canvas
CANVAS_API_URL = ''
CANVAS_TOKEN = ''
COURSE_ID = 9999 # int class id
def get_canvas_client():
@gabriel4649
gabriel4649 / s3.py
Created July 12, 2016 20:28
Create a download link that expires using Amazon S3 with Python and the Amazon SDK
s3 = boto3.client('s3')
url = s3.generate_presigned_url('get_object',
Params = {'Bucket': 'buket-name',
'Key': 'file-name'},
ExpiresIn = 100)