当前位置:网站首页>[benefit activity] stack a buff for your code! Click "tea" to receive the gift
[benefit activity] stack a buff for your code! Click "tea" to receive the gift
2022-07-27 20:35:00 【Amazon cloud developer】
Welfare activities
2022 Season two
The scorching summer fades
Welfare activities officially kicked off
From now on to 7 month 25 Friday night
Just get involved User Group Welfare activities
Submit participation code
Learning experience development deployment program
You can get 【 Naixue's tea coupon 】
In a tired afternoon
Have a drink User Group
Naixue's tea for everyone
01、 Participate in the way
Any AWS All partners of the account can participate , Everyone can participate once .
02、 The rules of the game
By writing Python The code implements the following calculation .
A laboratory has accumulated n Calculation jobs to be run , In order to complete these assignments , The laboratory rented a server for continuous free Machine hours of units .
We use a length of n Array of times Indicates the processing time required for each job , among times[i] It means the first one i Processing time required for jobs . The lab wants to run enough jobs with these machines . Give you an array of processing times times and free, Please calculate and return to the Laboratory free The maximum number of jobs that a unit can complete .
Be careful : Jobs can be executed in any order .
A single job needs to be completed continuously , Job execution cannot be interrupted .
03、 Submit request
Please submit a single Python Source file To solve the above problem .
04、 Code execution environment
Python 3.9 / 128MB memory Other class libraries available : AWS SDK for Python Specific version information , Please refer to the documentation ( Copy the link and open it in the browser )Lambda runtimes - AWS Lambda
05、Python Code requirements
The code must include the following entry functions , Get from s3 File path as a parameter , And return the calculation result required above .
The format of input file content is ,
free_number\ttimes[0],times[1],times[2],...,times[n]
def handler(event, context): inputfile = event['url']
# input Is the target S3 file , The format is similar s3://mybucket-name/myfiles/inputfile1
result = yourmethod_find_maximum_number_of_jobs(inputfile)
return resultExample : Input event:{"url": "s3://mybucket-name/myfiles/inputfile1"}s3://mybucket-name/myfiles/inputfile1 The content of the document is :20\t3,8,8,10 Input above indicates times = [3, 8, 8, 10], free = 20 Output :3 explain : The laboratory can complete the subscript 0、1、2 The homework , The total time is 3 + 8 + 8 = 19
06、 Submit code steps
Step one
Register an Amazon cloud account (https://s.awsevents.cn/1cg8t4 Copy to the browser to open or click directly Read the original To jump ), And log in to the console . Existing accounts can be used .( You can click the picture to zoom in and see the specific operation )

Step two
Create a new API( You can click the picture to zoom in and see the specific operation )





Please note that Lambda Please fill in the following content at the function arn:aws:lambda:ap-southeast-1:324908031092:function:contest-checker-checker31A6B3BF-td0E0mBsHMyY
notes : The function string does not contain spaces until here You have successfully created API 了 ~
Step three
Submit the completed procedure to User Group Intelligent assistant judges and redeems rewards . The format is as follows HTTP form-data Submit the form to your previously deployed API Interface .
"eventId": "20220701",
# Required , The activity code of this period is 20220701, Do not modify the
"nickname": Your name is ,
# Required , Your nickname "result": Challenging code files
# Required , To achieve the task of this period Python Code file Step 3 example :
1. Use the programmer's favorite command line tool to submit examples curl -F eventId=20220701 -F [email protected]/home/myname/aws-user-group-challenge.py -F nickname= Xiaofeixia https://.execute-api.ap-northeast-1.amazonaws.com
2. Use graphics HTTP Request tool Postman Submit sample

Q1 : Participating in activities will bring benefits ?A: Of course. ! Who let User Group Favorite fan developer ! Every developer who successfully runs this activity , The system will directly distribute 【 Naixue's tea coupon 】, In a tired afternoon , Have a cup of Amazon cloud technology User Group Here is Naixue's tea for you !
Q2 : adopt HTTP Methods will participate in the submission of works , Is there anything else to do ?A: No more than 30 Seconds of waiting , If the submission is correct , You will immediately receive the tea code of electronic Naixue ; If the error , The system will remind you to test once .
And remember to pay attention to official account 【User Group】, Otherwise, don't blame small U I didn't remind you to get more activity benefits ! See below for details of benefits !
Q3 : There are other benefits ?A: There has to be ! besides , We will select the top ten participants and send them to Amazon cloud technology User Group A nice one !
Ranking method : On the premise of successful operation , Rank according to the completion time . The list will be tweeted later , We must continue to pay attention to official account 【User Group】, Reply to the receiving information , In order to receive benefits as soon as possible !
Q4 : Series of activities are related every time ?A: There must be ! It's not just , Plus benefits !
This series of welfare activities is a multi issue serial model , If developers who participated in the welfare activities at the beginning of the year , We will record the participation for you , And selected in the year-end award 【 Annual talent 】, Give the annual mysterious gift !
ha-ha ! Don't worry if you don't catch up with the activities at the beginning of the year , from now on , Join in ! Scan code into group ! The time is now , Don't miss a game User Group A series of welfare activities ! Let's accumulate the number of participation ! You are the man of the year !

边栏推荐
猜你喜欢

使用cpolar建立一个商业网站(5)

PyQt5快速开发与实战 4.3 QLabel and 4.4 文本框类控件

多点双向重发布及路由策略的简单应用

A new UI testing method: visual perception test

发布2年后涨价100美元,Meta Quest 2的逆生长

OA项目之我的审批(查询&会议签字)

学习Blender必备的12款动画插件,来了解一下

My approval of OA project (Query & meeting signature)

Redis-基本了解,五大基本数据类型

Simple application of multipoint bidirectional republication and routing strategy
随机推荐
Built in functions other functions
京东:获得商品详情原数据 API
康佳首批10万颗存储主控芯片售罄,2020年预计销量1亿颗
为什么需要第三方支付?
【Map 集合】
JVM overview and memory management (to be continued)
盘点下互联网大厂的实习薪资:有了它,你也可以进厂
set--数据解构
Solve the problem of displaying the scroll bar when there is no data in the viewui table
我也是醉了,Eureka 延迟注册还有这个坑
Understand the wonderful use of dowanward API, and easily grasp kubernetes environment variables
Leetcode exercise 2 - sum of two numbers
It is said that Intel will stop the nervana chip manufactured by TSMC at 16nm
站在巨人肩膀上学习,京东爆款架构师成长手册首发
Idea: solve the problem of code without prompt
PyQt5快速开发与实战 4.7 QSpinBox(计数器) and 4.8 QSlider(滑动条)
调整数组使奇数全部都位于偶数前
My approval of OA project (Query & meeting signature)
JS realizes video recording - Take cesium as an example
In 2019, the global semiconductor revenue fell by 12% year-on-year, and China's market share ranked first