전체 글
-
Collecting Event Data 1. Slack Push notification for Elastic beanstalk (Elasticbeanstalk 서버 Slack 알림 설정하기)Project/Collecting Event Data 2023. 1. 10. 19:24
AWS SNS is a push notification service. We can send a slack notification through a below pipeline : SNS subscribes an EB application Once the application's status changes, EB send an event msg to SNS SNS fowards the event msg to a Lambda function The Lambda function send a notification to Slack via webhook Create an SNS topic First of all, we need to create an SNS subscription and topic for EB. ..
-
Glue Spark UI 서버 띄워서 Job 상세 실행 내역 확인하기Data Engineering/AWS, Spark 2023. 1. 6. 11:33
1. aws glue sample 레포지토리에서 Glue 버전에 맞는 docker file과 pom.xml을 다운받는다. 2. 다음 명령어로 도커 이미지를 빌드한다. docker build -t glue/sparkui:latest 3. 다음 중 하나의 방법으로 컨테이너를 띄운다. Glue job event log s3 uri는 s3://.. 가 아닌 s3a://... 로 넣어야한다. 만약 자주 실행한다면 로그 디렉토리 경로 등을 환경변수로 저장해놓는 것이 편하다. 이 포스팅을 볼 정도면 다들 알겠지만 백그라운드로 실행하고 싶지 않다면 -itd가 아닌 -it로 run하면 된다. Beijing, Ningxia 리전의 경우 추가적인 옵션이 필요하다. 위 레포지토리의 README.md를 참고하면 된다. 1) A..
-
[Leet Code] Two Pointers (투포인터): 19.Remove Nth Node From End of List - MediumCS기초/Coding Test 2023. 1. 5. 02:43
문제 / 코드 Description Remove the nth node from the end of the list and return its head. How to solve Since the given linked list can only be traversed from the first to the last node, we need to find a way to calculate where nth node from the end is from the start. However, the length of a linked list is not fixed, how can we find it? Let the length of the given linked list be l. Then the position..
-
[Leet Code] Two Pointers (투포인터): 876.Middle of the Linked List - EasyCS기초/Algorithm, Data Structures 2023. 1. 2. 02:04
문제 / 코드 드디어 linked list가 나왔다. 링크드리스트 자료구조 포스팅이랑 같이 올리려고 했는데 시간이 너무 늦어 다음 코드리뷰 포스팅이랑 같이 올려야겠다 (어차피 앞으로 링크드리스트 주구장창 나올 예정이기 때문에..) Description Return middle node of the linked list. If there are two middle nodes, return the second middle node. How to solve Simple way Iterate the linked list from the first node to get the full length. Iterate the linked list from the first node again, change the cu..
-
[Leet Code] Two Pointers (투포인터): 189. Rotate Array - Medium (What "modify in-place" means on Leetcode?)CS기초/Coding Test 2022. 12. 20. 01:36
문제 / 코드 사실 이 문제도 미디움치고는 정말 빨리 풀었다. 나중에 나오는 링크드 리스트 미디움에 비하면 정말.. 이건 이지다. 릿코드에서 이 문제를 투포인터로 분류해놨는데 나는 왜 이 문제가 투 포인터인지 한참을 생각했다 (심지어 투 포인터로 푸는 방법이 따로 있는지 계속 생각함). 원리를 이해하니 두 점을 찍고 푼다는 점에서 투 포인터가 맞는데 기존의 투 포인터 푸는 방식과 다르다는 이유로 투 포인터라고 생각을 안했다니, 역시 고정관념에서 벗어나는 것이 참 힘들다. Leetcode said it's a Two pointers problem, I was confused how it can be done with two pointers with O(1) extra space (well, it wasn'..
-
[Leet Code] Two Pointers (투포인터): 167. Two Sum 2 - Input Array Is Sorted - MediumCS기초/Coding Test 2022. 12. 19. 21:37
* Two Pointers 알고리즘 설명 문제 / 코드 개인적으로 medium 중 제일 쉬웠던 문제. Two pointers에서 항상 중앙값을 가지고 풀던 것을 끝 값을 활용하는 것으로 아이디어만 바꾸면 수월하게 풀 수 있는 문제이다. Description Find two numbers such that they add up to a specific target number and return a list of those integers' index in the input array. Condition - The input array is 1-indexed - The array is already sorted in non-decreasing order - There is only one solution ..
-
도커를 공부하다보면 마주치게 되는 가상화란, 가상화의 종류CS기초/OS,HW 2022. 12. 18. 22:34
가상화는 이해하기 어렵다. 그 이유는 추상적이고 눈에 보이지 않는 개념이기 때문이다. 수학을 잘하는 사람이 물리를 못하는 이유와 같다 (=나). 4차원, 5차원 공간이 나오고 중력에 대해 이야기 하는데, 나는 그것을 본적이 없어서 그저 머리로 상상해서 그려야하기 때문이다. 그래서 자료를 많이 보고, 실제로 사용해보는 수 밖에 없다. 그러니 처음 공부하는 사람들이 가상화 자료를 몇 번 읽어 봤다 해서 이해가 안 되는 것은 당연하니, 이 글이 위안이 되었으면 좋겠다 (사실 나도 아직 잘 모르겠다). 가상화는 말 그대로 하나의 물리 리소스를 여러 개인 것 처럼 나누는 것이다. 맥에서 도커를 띄우려면 Docker Desktop이라는 것을 설치해야하는데, Docker desktop 환경 설정에 보면 하드웨어 리소..