목록정리 (19)
어읽로꾸거
FastApi로 MSA 서비스를 만들었다. 이걸 Eureka에 연결해보자 pip install py_eureka_client pip에서 py_eureka_client를 설치해주고 from fastapi import FastAPI import py_eureka_client.eureka_client as eureka_client import py_eureka_client.logger as logger app = FastAPI() @app.on_event("startup") async def startup_event(): await eureka_client.init_async(eureka_server="유레카 서버의 IP", app_name="서비스의 이름", instance_port=포트, instance_..
어떤 외국 글 번역함 셀러리는 작업 큐입니다. 이 셀러리에 풀이라는 옵션이 있는 이게 뭘까 셀러리 워커 셀러리 워커는 작업을 하지 않는다. 워커는 자식 프로세스(혹은 스레드)들을 호출해서 실제 작업을 실행한다. 이 자식들은 Execution Pool 이라고 한다. 이 자식 프로세스들의 개수가 셀러리가 동시에 처리하는 프로세스들의 수다. 더 많을수록 더 많이 동시에 작업함 이걸 정하는게 사실 엄청 복잡함. 얼마나 많이 실행할지에 대해서는 너가 프로세스를 쓰느냐 스레드를 쓰느냐에 따라서 달림. 그리고 프로세스를 쓸지 스레드를 쓸지는 니 작업이 뭐할지에 따라서 달림 --pool (-P) 옵션 너는 --pool 옵션을 통해 프로세스와 스레드 중에서 고를수 있다. 아래처럼 gevent를 쓰면, 100개의 그린 스..
www.educative.io/blog/javascript-data-structures [ 7 JavaScript data structures you must know Data structures are a foundational part of JS programming, whether you're just starting out or you've been coding for years. Let's look at the 7 data structures you should never forget. www.educative.io ](https://www.educative.io/blog/javascript-data-structures) 이 글을 거의 번역함 보면 그냥 어떤 언어든 다 맞는..
integrated terminal 이 열리지 않을때 Cmd 속성에서 레거시 모드를 해제하면 새창으로 뜨지 않고 내장으로 뜸
q=collections.deque([]) q.append(item) 오른쪽에 추가함 q.appendleft(item) 왼쪽에 추가함 q.popleft() 왼쪽 가져오고 제거함 q.clear() 다지움 q.insert(i,x) i위치에 x넣음 q.pop() 오른쪽 가져오고 제거함 q.remove(item) 해당값 제거 q.reverse()
HashMap HashMap은 동기화(Synchronized) 처리가 되어있지 않음. 싱글스레드 환경에서 이용할 수 있지만 멀티스레드 환경에선 안정성을 보장할 수 없음. Key, Value에 null 사용할 수 있음 HashTable HashTable은 동기화(Synchronized) 처리가 되어있음. 싱글스레드에서는 느리므로 굳이 이용할 필요는 없음. 대신 멀티스레드 환경에서 안정성이 보장됨. Key, Value에 null 사용할 수 없음 ConcurrentHashMap ConcurrentHashMap은 HashMap에 동기화(Synchronized) 처리를 한 상태임. HashTable보다 빠른 성능을 가짐. 하지만 Key, Value에 null 사용할 수 없음 SynchronizedMap과 다른점?..
Queue.Queue and collections.deque serve different purposes. Queue.Queue is intended for allowing different threads to communicate using queued messages/data, whereas collections.deque is simply intended as a datastructure. That's why Queue.Queue has methods like put_nowait(), get_nowait(), and join(), whereas collections.deque doesn't. Queue.Queue isn't intended to be used as a collection, which..
힙이란? 자료구조의 종류중 하나로 지난번에 포스팅한 트리의 종류중 완전이진트리입니다. 힙의 특징은 자료를 삽입할때 빠르게 정렬을 한 상태로 삽입이 되어 자료를 빼낼때 아주 빠르게 빼낼 수 있습니다. 검색이진트리의 업글버전이라고 생각합니다. 다익스트라 알고리즘을 할때 우선순위 큐(priority queue)로 많이 이용하죠. 자료구조 - 트리(Tree) with C 트리란? 트리는 데이터 사이의 계층 관계를 나타내는 자료구조입니다. 루트는 트리의 가장 위쪽에 있는 노드입니다. 하나의 트리에는 하나의 루트가 있습니다. 그림을 거꾸로 보면 나무처럼 생겼죠? 리프는 트리.. postbarca.tistory.com 기본적인 구조는 이진노드로 이뤄진 트리입니다. 부모노드를 p라고 하고 자식노드를 c라고 가정하면 올..