목록분류 전체보기 (75)
Kim Jinung
Heap (data structure) - Wikipedia From Wikipedia, the free encyclopedia Jump to navigation Jump to search Computer science data structure For the memory heap (in low-level computer programming), which bears no relation to the data structure, see C dynamic memory allocation. Example of a bi en.wikipedia.org Heap은 tree 기반의 자료구조로, max heap과 min heap이 있다. max heap은 root node가 항상 최댓값이며 반대로 min heap은 ..
heapq — Heap queue algorithm — Python 3.11.1 documentation heapq — Heap queue algorithm Source code: Lib/heapq.py This module provides an implementation of the heap queue algorithm, also known as the priority queue algorithm. Heaps are binary trees for which every parent node has a value less than or equal to an docs.python.org heapq 모듈은 heap queue 알고리즘의 구현을 제공한다. (우선순위 큐 알고리즘으로도 알려져있다.) *주의할 점은..
collections — Container datatypes — Python 3.11.0 documentation collections — Container datatypes Source code: Lib/collections/__init__.py This module implements specialized container datatypes providing alternatives to Python’s general purpose built-in containers, dict, list, set, and tuple. namedtuple() factory f docs.python.org Counter 클래스는 Dictionary의 subclass로 hashable한 객체를 카운팅할 때 사용할 수 있다...

Cache replacement policies - Wikipedia From Wikipedia, the free encyclopedia Jump to navigation Jump to search Algorithm for caching data This article is about general cache algorithms. For detailed algorithms specific to paging, see page replacement algorithm. For detailed algorithms specific en.wikipedia.org 캐시 교체 알고리즘 이름 그대로 최근에 가장 적게 사용된 순서로 교체 한다. 최근 사용된 값을 캐시에 저장한다. 만약 새로운 값이 이미 저장되어 있다면 새..
4. More Control Flow Tools — Python 3.11.0 documentation 4. More Control Flow Tools Besides the while statement just introduced, Python uses the usual flow control statements known from other languages, with some twists. 4.1. if Statements Perhaps the most well-known statement type is the if statement. For examp docs.python.org for loop 순회 중 특정 조건을 찾고 break를 걸어야하는 일이 있다. 그리고 break 조건에 해당하는 케이스를 ..
re — Regular expression operations — Python 3.11.0 documentation re — Regular expression operations Source code: Lib/re/ This module provides regular expression matching operations similar to those found in Perl. Both patterns and strings to be searched can be Unicode strings (str) as well as 8-bit strings (bytes). Ho docs.python.org Regex(Regular Expression)은 텍스트에서 패턴을 찾아내어 복잡한 문자열 처리에 사용하는 기법이..
What Is the Python Global Interpreter Lock (GIL)? – Real Python Python's Global Interpreter Lock or GIL, in simple words, is a mutex (or a lock) that allows only one thread to hold the control of the Python interpreter at any one time. In this article you'll learn how the GIL affects the performance of your Python prog realpython.com What is the Python Global Interpreter Lock (GIL)? Understandin..

0. Goal 쿠버네티스를 사용하고있지만 내부에서 어떤 흐름으로 동작하고 있는지 이해가 부족하다. kube-system 네임스페이스에서 기본적으로 실행되고 있는 kube-proxy, api-server 등이 어떤 역할을 담당하는지 모르고있다. 이번 글에서는 쿠버네티스의 아키텍처를 살펴보고 각 컴포넌트들이 어떤 역할을 하는지 정리한다. 1. 쿠버네티스 클러스터 컴포넌트 쿠버네티스 클러스터는 노드(node)라고 부르는 worker machine(node)들과, 이러한 node들을 관리하는 control plane으로 구성되어있다. master, worker 형태로 구성되어있는 것이다. 유저의 모든 요청은 API server를 통해서 전달된다. API server 컴포넌트가 소속된 control plane 내..

파이썬의 리스트, 딕셔너리, 스트링 같이 원소를 가지는 데이터 구조를 컨테이너라고 부른다. 그리고 컨테이너는 이터레이블하며 이는 반복이 가능한, 순회가 가능한 자료구조라는 의미다. 그리고 이터레이블한 객체는 이터레이터라는 인스턴스를 생성할 수 있다. num_list = [1, 2, 3] for num in num_list: print(num) num_list는 리스트라는 컨테이너다. 따라서 이터레이블하다. for 문에서는 이터레이블한 num_list를 순회하고자 한다. 이때 num_list를 그대로 사용하는 것이 아니라 num_list를 활용해서 이터레이터 인스턴스를 생성한다. 이터레이터는 값 생성기로 다음 값을 요청하면 반환하고 그 다음 값을 반환하게 된다. 위 for 문에서 num 변수는 처음 1을 ..

Prerequisite Kubernetes executor에 대한 설명은 제일 첫 번째 글에서 다루어서 생략한다. Goal - Airflow Kubernetes exeucotr 설정 1. Kubernetes excutor (1) Kubernetes executor 설정 두 번째 포스팅에서 만들었던 Airflow helm value.yaml 파일에 Airflow executor 항목이 있다. 기본 옵션은 "CeleryExecutor" 인데, 이를 "KubernetesExecutor" 로 변경 한다. (2) Airflow upgrade 변경한 yaml 파일로 airflow 업그레이드를 진행한다. helm upgrade --install airflow apache-airflow/airflow -n airflo..