emory-courses / data-science Goto Github PK
View Code? Open in Web Editor NEWPractical Approaches to Data Science with Text
Home Page: http://www.cs.emory.edu/~choi
Practical Approaches to Data Science with Text
Home Page: http://www.cs.emory.edu/~choi
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.
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.
Then, you can retrieve the requested courseid from the event, and call your tiny get_exam function right?
Hope it helps.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.