Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save evanfrisch/bbcf4858d54099dcf59394c3507f6ebb to your computer and use it in GitHub Desktop.
Save evanfrisch/bbcf4858d54099dcf59394c3507f6ebb to your computer and use it in GitHub Desktop.
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