This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| job('example-job') { | |
| wrappers { | |
| colorizeOutput() | |
| preBuildCleanup() | |
| } | |
| logRotator { | |
| numToKeep(10) | |
| } | |
| steps { | |
| shell('./gradlew clean build') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| - name: EC2 CPU Utilization | |
| query: avg(last_1h):avg:aws.ec2.cpuutilization by {host} > 95 | |
| message: EC2 CPU utilization is {{comparator}} {{threshold}} on host {{host.ip}}. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "app": { | |
| "instance_type": "m4.large", | |
| "app_description": "Edge Forrest Demo application" | |
| }, | |
| "asg": { | |
| "min_inst": 2, | |
| "max_inst": 5 | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| def solution(A): | |
| highest_distance = 0 | |
| earliest_seen = {} | |
| for index, value in enumerate(A): | |
| if earliest_seen.get(value): | |
| distance = index - earliest_seen[value] + 1 | |
| if distance > highest_distance: | |
| highest_distance = distance | |
| else: | |
| earliest_seen[value] = index + 1 |
OlderNewer