This file contains 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
explicit_list = [] | |
unknown_list = [] | |
def parse(expressions: []): | |
for exp in expressions: | |
arr = exp.split(" ") | |
if arr[4] == "X": | |
unknown_list.append(arr) | |
else: |
This file contains 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
list = [] | |
cnt = 0 | |
g_points = [] | |
g_routes = [] | |
robot_pos_list = [] | |
robot_num = 0 | |
end_robot_check = [False for i in range(101)] | |
end_robot_cnt = 0 | |
def move_cycle(): |
This file contains 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(diffs, times, limit): | |
max_level = max(diffs) #최대 diff 구해두기 | |
l = 1 | |
r = max_level | |
answer = max_level #정답이 max_diff인 경우를 대비해서 answer에 넣어두기 | |
while l < r: | |
level = int((l + r) /2) | |
time = times[0] | |
This file contains 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
import json | |
import urllib3 | |
import os | |
# 환경 변수는 다시 가져올 필요가 없음!!! 전역에 | |
slack_webhook_url = os.environ['SLACK_WEBHOOK_URL'] | |
def lambda_handler(event, context): | |
# 매개변수의 추출은 항상 이뤄져야 함. | |
message = json.loads(event['Records'][0]['Sns']['Message']) |
This file contains 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
locals { | |
build_name = "${var.project_name}-${var.build_name}" | |
} | |
# codebuild | |
resource "aws_codebuild_project" "this" { | |
depends_on = [ data.aws_codecommit_repository.source_repository ] | |
name = local.build_name #"${var.project_name}-build" | |
build_timeout = 6 | |
service_role = aws_iam_role.build_task_role.arn #module.iam.iam_role_arn |
This file contains 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
version: 0.2 | |
env: # 환경변수를 정의 | |
variables: | |
AWS_DEFAULT_REGION: "ap-northeast-1" | |
ECR_URL: "awsid.dkr.ecr.ap-northeast-1.amazonaws.com/milliapp" | |
IMAGE_REPO_NAME: "milliapp" | |
IMAGE_TAG: "appv02" | |
AWS_ACCOUNT_ID: "awsid" | |
ECS_FAMILY: "app-service" | |
CONTAINER_NAME: "appv02" |
This file contains 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": "aws-otel-collector", | |
"image": "851725230407.dkr.ecr.ap-northeast-1.amazonaws.com/otel:v0.39.0", | |
"cpu": 0, | |
"portMappings": [], | |
"essential": true, | |
"environment": [ | |
{ | |
"name": "AWS_PROMETHEUS_ENDPOINT", | |
"value": "https://aps-workspaces.ap-northeast-1.amazonaws.com/workspaces/ws-ddab0164-4917-44b4-9854-0abf2551f6a6/api/v1/remote_write" |
This file contains 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
resource "aws_ecs_service" "web_service" { | |
name = local.web_name | |
cluster = aws_ecs_cluster.web_cluster.id | |
task_definition = aws_ecs_task_definition.web_task.arn | |
desired_count = 2 | |
launch_type = "FARGATE" | |
scheduling_strategy = "REPLICA" | |
deployment_controller { | |
type = "CODE_DEPLOY" |
This file contains 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
import json | |
import urllib3 | |
import os | |
def lambda_handler(event, context): | |
# SNS 메시지 추출 | |
message = event['Records'][0]['Sns']['Message'] | |
# Slack Webhook URL 가져오기 | |
slack_webhook_url = os.environ['SLACK_WEBHOOK_URL'] |
This file contains 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
#!/bin/bash | |
# Nginx 설치 | |
apt update | |
apt install -y nginx | |
index_file="/var/www/html/index.html" | |
cat <<EOF > $index_file |
NewerOlder