Home

[FastAPI] Background For FastAPI

Online Serving 실시간으로 데이터를 처리하고 즉각적인 결과 반환이 중요하다. 주로 Cloud나 On-Premise 서버에서 모델 호스팅 후, 요청 들어오면 모델이 예측을 반환하는 구조 구현 방법 직접 웹 서버 개발 Flask, FaskAPI 등을 사용해 서버 구축 Cloud 서비스 활용 AWS의 SageMaker, GCP의 Vertex AI 등을 사용 MLOps의 다양한 부분을 이미 클라우드 회사에서 구축해 제공 하지만 직접 구축...

Read more

[구름 Level] 환경과 쥐 크기의 상관관계

문제 from collections import Counter n = int(input()) a = list(map(int, input().split())) b = list(map(int, input().split())) def find(ls): dic = Counter(ls) set_ls = set(ls) ans_cnt = 0 ans = 0 for i in range(3, max(set_ls)): ran = list(range(i-2, i+3)) cnt = 0 for j in ran: if j in dic.ke...

Read more

[프로그래머스] 귤 고르기

문제 from collections import Counter def solution(k, tangerine): answer = 0 # 필요한 귤 크기 종류 수를 저장할 변수 dic = Counter(tangerine) # 귤 크기별로 개수를 세어서 딕셔너리로 저장 dic = sorted(dic.items(), key=lambda x: x[1], reverse=True) # 개수를 기준으로 내림차순 정렬 t = 0 # 현재까지 선택한 귤의 개수를 저장할 변수 while t < k: # 선택한 귤의 개수가 k보다 작을 동안 반복 t += di...

Read more

[구름 Level] Knight's Move

문제 def bfs(graph, start, n, m): # bfs 함수 구현 visited = [] route = [] queue = [start] visited.append(start) # 나이트가 이동할 수 있는 방향 dx = [2, 2, -2, -2, 1, -1, 1, -1] dy = [1, -1, 1, -1, 2, 2, -2, -2] while queue: # 큐가 비어있지 않을 동안 반복 tmp = queue.pop(0) route.append(tmp) for i in range(8): ...

Read more