전체 글 78

[전시] 하루키를 말할 때 우리가 하고 싶은 이야기

관람 후기 사실 이번 전시에 어떤 기대를 하지는 않았다. 바쁘고 단조로운 일상에 치이다, 예전에 습관처럼 예매 해놓은 티켓을 발견했고, 그냥 한숨 돌리고 오자 정도의 가벼운 마음으로 가게 되었다. 그런데 그 대수롭지 않은 목적에 정말 딱 맞는 전시였기 때문에 만족도가 높았다. 무라카미 하루키라는 작가의 저서를 처음 접한 건 고등학교 때였다. 처음에는 에세이 제목이 독특해서 책을 집어들게 되었는데, 읽다보니 작가의 삶의 태도나 생각, 입담에 이끌려 한 동안 이 작가의 에세이만 계속 찾아 봤던 기억이 있다. 그 뒤로는 한 동안 잊고 살다가 이번 전시를 보니 오랜 만에 그때 생각이 났다. 하루키의 연혁이나 취미들과 그의 소설과 관련된 디오라마 등등의 소품을 천천히 구경했다. 그리고 그의 책을 소재로 한 ..

[Airflow] Airflow Meta Database Version Downgrade

Kubernetes 환경에 설치된 airflow의 meta database 버전 다운그레이드에 대한 문서 helm upgrade를 하다가 airflow 버전이 의도치 않게 업그레이드가 되었다. 이런 경우에는 helm rollback을 하면 되지만, 이미 업그레이드 된 meta database의 스키마 버전은 바뀌지 않기 때문에 따로 downgrade를 해주어야 한다. Airflow Database의 버전은 alembic_version 테이블의 version_num 이라는 컬럼에서 확인할 수 있다. 해당 Revision ID가 airflow의 어떤 버전과 호환되는지는 아래 공식 문서에서 확인 가능하다.https://airflow.apache.org/docs/apache-airflow/stable/mig..

[Codility] Lesson 7. Stacks and Queues - Fish (Python)

문제난이도: Easy상류와 하류로 향하는 물고기가 있고 각 물고기의 크기에 따라 잡아먹을 때, 남은 물고기의 수를 구하는 문제https://app.codility.com/programmers/lessons/7-stacks_and_queues/fish/ Fish coding task - Learn to Code - CodilityN voracious fish are moving along a river. Calculate how many fish are alive.app.codility.com 풀이def solution(A, B): N = len(A) down = [] alive = 0 for i in range(N): current_size = A[i] c..

[Codility] Lesson 6. Sorting - NumberOfDiscIntersections (Python)

문제난이도: Medium N개의 원들의 겹치는 개수를 구하는 문제https://app.codility.com/programmers/lessons/6-sorting/number_of_disc_intersections/ NumberOfDiscIntersections coding task - Learn to Code - CodilityCompute the number of intersections in a sequence of discs.app.codility.com 풀이def solution(A): n = len(A) result = 0 if n 10000000: return -1 return result 이 문제를 해결하기 위한 아이디어는 두 원의 중심 사이의 거리가 ..

[Codility] Lesson 5. Prefix Sums - MinAvgTwoSlice (Python)

문제난이도: Medium배열 A에서 A[P], A[Q] 사이의 값들의 평균을 구할때, 가장 작은 평균의 시작 위치 P를 반환https://app.codility.com/programmers/lessons/5-prefix_sums/min_avg_two_slice/ MinAvgTwoSlice coding task - Learn to Code - CodilityFind the minimal average of any slice containing at least two elements.app.codility.com 풀이def solution(A): l = len(A) min_avg = float('inf') min_index = 0 result = 0 for i in range(l-..

[Codility] Lesson 5. Prefix Sums - GenomicRangeQuery (Python)

문제난이도: Medium배열 P, Q가 주어졌을 때, M개의 쿼리 (P[K], Q[K])에 대해 S[P[K]:Q[K]])에 대한 가장 작은 impact factor 찾기. 단, 조건에 맞는 효율적인 방법으로 구현해야 함. 조건은 아래와 같음N is an integer within the range [1..100,000];M is an integer within the range [1..50,000];each element of arrays P and Q is an integer within the range [0..N - 1];P[K] ≤ Q[K], where 0 ≤ K string S consists only of upper-case English letters A, C, G, T.https://app..

[Codility] Lesson 4. Counting Elements - MissingInteger (Python)

문제난이도: Medium정수 배열 A가 주어지면 그 중 존재하지 않는 가장 작은 양의 정수를 반환하는 문제https://app.codility.com/programmers/lessons/4-counting_elements/missing_integer/ MissingInteger coding task - Learn to Code - CodilityFind the smallest positive integer that does not occur in a given sequence.app.codility.com 풀이def solution(A): # Implement your solution here A_set = set(A) i = 1 while i in A_set: i +=..

[Codility] Lesson 4. Counting Elements - MaxCounters (Python)

문제난이도: Medium N개의 카운터가 있고 주어진 배열 A에 따라 아래와 같은 기능을 할 때,increase(X) → A[K] = X (1 ≤ X ≤ N): X번째 카운터 값을 +1max counter → A[K] = N + 1: 모든 카운터 값을 현재 가장 큰 값으로 설정최종 카운터 상태를 배열로 반환하는 문제 https://app.codility.com/programmers/lessons/4-counting_elements/max_counters/ MaxCounters coding task - Learn to Code - CodilityCalculate the values of counters after applying all alternating operations: increase counte..

[Codility] Lesson 1. Iterations - BinaryGap (Python)

문제난이도: Easy이진수에서 1과 1 사이의 0의 최댓값을 구하는 문제https://app.codility.com/programmers/lessons/1-iterations/binary_gap/ BinaryGap coding task - Learn to Code - CodilityFind longest sequence of zeros in binary representation of an integer.app.codility.com 풀이def solution(N): binary = bin(N)[2:] current_gap = 0 max_gap = 0 counting = False for bit in binary: if bit == '1': ..

[Airflow] AWS EKS(Kubernetes)에 Airflow 설치

AWS EKS(Amazon Elastic Kubernetes Service) 환경에 Airflow를 설치와 관련된 내용을 담은 문서 환경 정보설치하는 환경에 대한 정보Airflow 버전: 2.9.3 (https://github.com/apache/airflow/tree/2.9.3/chart)EKS 버전: 1.31노드 프로비저닝: Karpenter 구성 환경Airflow를 어떻게 구성(설치)할 지에 대한 설명EKS 환경에 KubernetesExecutor 방식으로 Airflow를 설치한다.Airflow의 DAG는 GitLab에서 관리 한다.Airflow Trigger나 Scheduler 같은 코어 컴포넌트들의 Pod와, 실제 Job이 수행(Airflow Worker)되는 Pod는 네임스페이스를 분리해 구성..

반응형