Giter Club home page Giter Club logo

data-science's People

Contributors

hankcs avatar jdchoi77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

data-science's Issues

Hints for HW4

Hi guys,

I'm grading HW4. Some of you did a really good job with correct results generated in an efficient way, while others are still struggling to deploy your code to AWS. If you are one of those, please check if this hint helps or not.

This whole assignment is to simulate a real life problem, where you write some codes and you want to provide your codes as a service to your customers. In this stage you are asked to use AWS lambda as a third party platform to deploy your codes. Of course no textbook will cover how to use AWS, this is a problem we programmers always encounter in reality. But we can always explore right?

Here is how I explored the lambda function, simply edit the starter code a little bit to check what we can get from the parameters.

import json

def lambda_handler(event, context):
    # TODO implement
    return {
        'statusCode': 200,
        'body': json.dumps(event)
    }

A screenshot is attached here.
hankcs com 2019-04-25 δΈ‹εˆ4 18 11

Use the API Gateway to create a trigger for your function. AWS will give you a URL like this:

https://xxxxxxxx.execute-api.ap-northeast-1.amazonaws.com/default/demo

Let's append a parameter to it, click it and see what happens.

https://xxxxxxxx.execute-api.ap-northeast-1.amazonaws.com/default/demo?courseid=qtm

The output is a json object, we can see the courseid in its queryStringParameters field.

2019-04-25_16-08-20

Then, you can retrieve the requested courseid from the event, and call your tiny get_exam function right?

  • If you encounter any errors, just google it since you're not the first one who have such errors.
  • Do things step by step. Don't rush to upload a whole zip to AWS and gave up if it failed.

Hope it helps.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.