#. Problem https://www.acmicpc.net/problem/5884 * The copyright in this matter is in acmicpc #. Resolution Process Read and understand problem Redefine the problem + abstract Create solution plan (select Algorithm, Data structure) Prove the plan (check performance time and usage memory) Carry out the plan Look back on the plan and find a way to improve it #. Solve - 최대 세 개의 감시 카메라로 N(1 ≤ N ≤ 50,..
#. Problem https://www.acmicpc.net/problem/21235 * The copyright in this matter is in acmicpc #. Resolution Process Read and understand problem Redefine the problem + abstract Create solution plan (select Algorithm, Data structure) Prove the plan (check performance time and usage memory) Carry out the plan Look back on the plan and find a way to improve it #. Solve N 은 최대 100이니까.. 배려심이 좋은 문제다. 각..
#. Problem https://www.acmicpc.net/problem/21237 * The copyright in this matter is in acmicpc #. Resolution Process Read and understand problem Redefine the problem + abstract Create solution plan (select Algorithm, Data structure) Prove the plan (check performance time and usage memory) Carry out the plan Look back on the plan and find a way to improve it #. Solve ㅇ 범위 - 1
#. Problem https://www.acmicpc.net/problem/20652 * The copyright in this matter is in acmicpc #. Resolution Process Read and understand problem Redefine the problem + abstract Create solution plan (select Algorithm, Data structure) Prove the plan (check performance time and usage memory) Carry out the plan Look back on the plan and find a way to improve it #. Solve 소 1
#. Problem https://www.acmicpc.net/problem/20647 * The copyright in this matter is in acmicpc #. Resolution Process Read and understand problem Redefine the problem + abstract Create solution plan (select Algorithm, Data structure) Prove the plan (check performance time and usage memory) Carry out the plan Look back on the plan and find a way to improve it #. Solve 농장 : 1 ~ N^5 길 : 1 ~ N-1 이벤트 1..
Python Multiprocessing GIL(Global Interpreter Lock) 파이썬에서는 하나의 프로세스 안에 모든 자원의 Lock을 Global하게 관리함으로써 한번에 하나의 쓰레드만 자원을 컨트롤하여 동작 여러 쓰레드를 동시에 실행시키지만, 결국 GIL 때문에 한번에 하나의 쓰레드만 계산을 실행 GIL로 자원 관리(GC..)를 쉽게 구현 가능해졌지만, 멀티 코어 부분에서는 아쉬움 파이썬의 경우에는 GIL이 존재하여 멀티 쓰레드보다는 멀티 프로세스를 사용하는 것이 좋음 multiprocessing 쓰레딩 모듈로 쓰레드를 생성 할 수 있는 것과 동일한 방식으로 프로세스를 생성 프로세스는 각자가 고유한 메모리 영역을 가지기 때문에 쓰레드에 비하면 메모리 사용이 늘어난다는 단점 싱글 머신 아..
Python Crawling Useful features Read Excel File & Show Progress bar & Make DataFrame import pandas as pd from tqdm import tqdm file_name = 'test_file' file_df = pd.read_excel('C:\\Users\\cristoval\\Desktop\\data\\' + file_name + '.xlsx') data = {'id': [], 'title': [], 'link' : []} result_df = pd.DataFrame(data=data) for idx, row in tqdm(file_df.iterrows()): # do something result_df = result_df.a..
Wikipedia 국/영문 데이터 수집/분석 자연어 처리를 위해 wikipedia 데이터를 활용해보자. Download Wiki dump file https://dumps.wikimedia.org/kowiki/latest/ https://dumps.wikimedia.org/kowiki/latest/kowiki-latest-pages-articles.xml.bz2 2021/07 기준 데이터 : 1208126 건 https://dumps.wikimedia.org/enwiki/latest/ https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-pages-articles.xml.bz2 2021/07 기준 데이터 : 15839021 건 pages-articles.xm..