当前位置:网站首页>[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 !

边栏推荐
- PyQt5快速开发与实战 4.3 QLabel and 4.4 文本框类控件
- 同源与跨域
- Common methods of object learning [clone and equals]
- [rctf2015]easysql-1 | SQL injection
- Zepto入门详解
- Clickhouse implements materializedpostgresql
- 2019年全球半导体营收同比下滑12%,中国市场份额第一
- Codeworks 5 questions per day (average 1500) - day 24
- LED high precision scale scheme specification
- Anfulai embedded weekly report no. 275: 2022.07.18--2022.07.24
猜你喜欢

Oracle Xe installation and user operation

Learn about the 12 necessary animation plug-ins of blender

Redis queue、rdb学习

C language -- array

Redis 事物学习

2022.07.11

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

Office automation solution - docuware cloud is a complete solution to migrate applications and processes to the cloud

Knowledge dry goods: basic storage service novice Experience Camp

Preprocessing and macro definition
随机推荐
Kubectl's access to pod logs -- the way to build a dream
ZJNU 22-07-26 competition experience
多点双向重发布及路由策略的简单应用
MySQL 日志错误日志
Use cpolar to build a business website (5)
一看就懂的ESLint
Datepicker date selector in viewui compatible solution in ie11 browser
MongoDB 学习笔记: BSON 结构分析
Under the epidemic, I left my job for a year, and my income increased 10 times
Injection attack
Following Huawei and MediaTek, the mobile phone chip manufacturer announced a donation of 7million yuan to Wuhan
Koin simple to use
My approval of OA project (Query & meeting signature)
[rctf2015]easysql-1 | SQL injection
Redis-基本了解,五大基本数据类型
MySQL 日志查询日志
C language -- array
京东:获得商品详情原数据 API
ES6--解构赋值
Codeforces Round #810 (Div. 2)B.party(思维题)超详细题解