개발
-
[프로젝트] 해양 재난 상황판 (1)개발/프로젝트 2022. 2. 10. 00:27
(깃헙은 프라이빗인데다가 교수님이 포크를 막아놓으셨다....... 그럴실필요는 없었는데요 ) 4학년 여름, 현장실습 기간동안 진행한 프로젝트 해양경찰이 사용할 수 있을법한 상황판 프로그램을 만드는 것이 목표이다. 나는 DB설계와 스프링 부트를 사용한 REST API 서버를 만들었다. 따라서 닷넷을 이용해 구현한 클라이언트쪽은 잘 모른다... SI회사에서 진행해서 회사에서 진행하는 방법대로 프로젝트의 시작부터 끝까지 배울 수 있었다. 총 4가지의 단계로 프로젝트를 진행했다. 글이 길어질 것 같아서 이번 글에서는 분석, 설계를 정리할 것이다. 0.분석 왜 0번인진 모르겠는데 암튼 분석단계에서는 요구사항을 분석하고, 기능을 정의했다. 소프트웨어 공학때 요구사항 분석, 유스케이스 작성 이런것들을 배우고 과제에서..
-
[자료구조] 힙(Heap)개발/자료구조와 알고리즘 2022. 2. 5. 01:52
Heap 최대값, 혹은 최소값을 빠르게 찾기 위한 자료구조이며, 일반적으로 완전이진트리를 활용하여 구현하고, 우선순위 큐에 사용한다. 우선순위 큐란 FIFO구조의 일반적인 큐가 아니라, 각 데이터에 우선순위가 있어서, 우선순위가 높은 데이터가 먼저 POP되는 자료형태이다. 예를 들어 운영체제에서 프로그램들을 스케쥴링 할 때, FIFO방식으로 프로세스를 처리한다면, 처리시간이 긴 프로세스를 처리하는 동안 처리시간이 짧은 프로세스는 대기시간이 길어지게 되고, 이는 비효율적이다. 따라서 처리시간이 짧은 프로세스에 높은 우선순위를 두어 이를 먼저 처리하고, 처리시간이 긴 프로세스를 나중에 처리하려고 할 때 우선순위 큐를 사용할 수 있다. Heap의 구조 힙은 두가지로 나뉜다. 루트노드가 가장 작은 값인 Min ..
-
[자료구조] 이진 탐색 트리(Binary Search Tree)개발/자료구조와 알고리즘 2022. 1. 31. 01:50
이진 탐색 트리 앞으로 글을 쓰겠지만 선형 자료 구조에서는 원하는 값을 탖는 방법이 여러가지가 있다. 가장 먼저 생각할 수 있는 것은 앞 혹은 뒤에서부터 하나씩 살펴보는 선형탐색이다. 그렇다면 트리형 자료구조에서는 원하는 값을 어떻게 찾을 수 있을까? 가장 기초적인 방법이 바로 이진탐색 트리이다. (물론 모두 살펴볼 수도 있을 것이다.) 먼저 그림부터 보자. 루트 노드에 값 K가 담겨있다고 생각하자. 그렇다면 이 루트 노드의 왼쪽에 있는 서브 트리에는 K보다 작은 값이, 오른쪽에는 K보다 큰 값만이 들어있는 트리를 생각할 수 있고, 이 모든 서브트리에도 같은 생각이 적용된다면 원하는 값을 찾기가 쉬울 것이다. 이를 이진 탐색 트리라 한다. 실제 값을 넣어서 확인해보자 위 트리에서 13을 찾고 싶다고 생각..
-
[자료구조] 트리개발/자료구조와 알고리즘 2022. 1. 26. 02:03
트리 단순 선형 자료구조에서는 계층을 나타내기가 어렵다. 따라서 계층적 자료구조를 만들기 위해서 트리를 생각했다. 값을 가지는 노드와, 노드 사이를 잇는 간선으로 이루어져 있으며, 부모 - 자식 관계를 가진다. 트리를 그림으로 나타내면 위와 같다. 여기서 A - B, C, D의 관계를 부모 - 자식 관계라 하며, 마찬가지로 B - E, F의 관계도 부모 - 자식 관계이다. 가장 위에 있는 노드인 A를 루트(Root)노드라 하고, 자식이 없는 노드들(E, F, C, G)를 리프(Leaf)노드라 한다. 위의 트리는 3개의 층으로 되어있는데, 이를 높이가 3인 트리라고 한다. 트리는 서브트리로 나눌 수 있다. 이렇게 나누면 B와 D는 각각의 서브트리에서 루트노드가 된다. 트리의 자식이 연결되어 싸이클이 생기면..
-
[자료구조] LinkedList개발/자료구조와 알고리즘 2022. 1. 24. 01:07
LinkedList 대표적으로 C같은 경우 선형 자료구조인 Array가 있다. 그러나 이 배열의 경우는 시작부터 크기를 지정해주어야하고, 새로운 요소를 추가하거나, 배열 안의 요소를 제거할 때 비용(시간)이 많이 든다. 이를 개선하기 위해서 구조체를 만드는데, 이 구조체에는 하나의 요소 값과, 다음 구조체의 정보를 가진다. 이 구조체를 연결하여 만드는 리스트가 바로 LinkedList이다. LinkedList를 사용함으로써 크기가 유동적인 자료형을 만들 수 있고, 삽입, 제거에 시간이 적게 든다. 특히 값을 탐색하다가 데이터를 추가, 제거하기에 용이하다. 단점으로는 index가 없어 값을 앞에서부터 탐색해야 한다. -> 탐색에 시간이 많이 소요된다. 종류로는 단순(Single), 양방향(Double)이 ..
-
[Kaggle] Titanic - Machine Learning from Disaster개발/머신러닝-딥러닝 2022. 1. 23. 02:29
이제 케글도 정리하고 싶어서 시작한다. 첫번째 글은 모두가 아는 타이타닉 생존자 예측. 0. 목표 데이터는 타이타닉호의 승객들에 대한 정보와 생존 유무가 있으며, TrainSet의 생존 유무를 label로 하여 학습한 후에, TestSet의 승객정보를 통해 생존 유무를 예측하는 것이 목표이다. 1. 전체 데이터 확인 총 12개의 feature가 있고, 이 중 Survived를 제외한 나머지 정보들을 이용해 Survived를 예측하는 것이 목표이다. 이 데이터에는 대부분 결측치가 없으나, 선실을 나타내는 Cabin에 결측이가 많이 있다. 총 891개의 데이터 중 687개의 결측치는 굉장히 크다. 또 Age에도 꽤 많은 결측값들이 있다. 숫자 데이터간 상관계수 확인. Survived와 상관계수가 높은 데이터..
-
[자료구조] Queue & Stack개발/자료구조와 알고리즘 2022. 1. 21. 02:48
Queue 한쪽 끝으로 데이터를 넣고 반대쪽 끝으로 데이터가 나오는 FIFO(First In First Out)형식의 자료 구조 사용 사례 데이터를 입력된 시간 순서대로 처리해야 할 필요가 있는 상황에 이용(대기열) 캐시(Cache) 프로세스 관리 코드와 연산 # 리스트 형태의 큐 # 큐 생성 queue = [] # 큐에 값 추가 (enqueue) queue.append(1) # 큐에서 값 제거 후 반환 (dequeue) queue.pop(0) 파이썬 기본 모듈을 이용한 큐 import queue # 큐 생성 q = queue.Queue() # 큐에 요소 추가 q.put(123) # 큐에서 요소 제거 후 반환 q.get() queue — 동기화된 큐 클래스 — Python 3.9.10 문서 queue —..
-
[프로젝트] TradingBot / 업비트 자동 매매 봇개발/프로젝트 2022. 1. 18. 01:21
원래 굉장히 거창한 목적으로 만들었지만 기본 기능만 구현하고 멈춰버린 봇...... https://github.com/LJBang/Coin_Trading_Bot GitHub - LJBang/Coin_Trading_Bot Contribute to LJBang/Coin_Trading_Bot development by creating an account on GitHub. github.com 프로젝트 시작 2020년 말에 동아리 해커톤에서 뭘 하지 생각하다가 아는 동생이랑 매매봇을 만들기로 했다. 처음에는 그냥 api받아와서 뭔가를 하려고 했는데, 쉽지 않았다... 계속 찾아보니까 pyupbit라는 라이브러리가 있어서 대충 가격만 받아와서 매매 시뮬레이션만 돌려봤었다. 그러다가 21년 초에 갑자기 코인 붐이 ..