Last active
October 31, 2017 01:38
-
-
Save evanfrisch/bbcf4858d54099dcf59394c3507f6ebb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
⋮ | |
s3 = boto3.resource('s3') | |
bucket_name = 'so_predict' | |
⋮ | |
def setQuestionsQuantiles(): | |
"""Reads data about Stack Overflow questions by quantile from an AWS S3 bucket into a dictionary.""" | |
print("Starting setQuestionsQuantiles()") | |
obj = s3.Object(bucket_name,'questions_quantiles.json') | |
global questions_quantiles | |
questions_quantiles = json.loads(obj.get()['Body'].read().decode()) | |
print("questions_quantiles: {}".format(questions_quantiles)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment