파이썬

    [LeetCode] 621. Task Scheduler

    621. Task Scheduler Medium Given a characters array tasks, representing the tasks a CPU needs to do, where each letter represents a different task. Tasks could be done in any order. Each task is done in one unit of time. For each unit of time, the CPU could complete either one task or just be idle. However, there is a non-negative integer n that represents the cooldown period between two same ta..

    [LeetCode] 916. Word Subsets

    916. Word Subsets Medium You are given two string arrays words1 and words2. A string b is a subset of string a if every letter in b occurs in a including multiplicity. For example, "wrr" is a subset of "warrior" but is not a subset of "world". A string a from words1 is universal if for every string b in words2, b is a subset of a. Return an array of all the universal strings in words1. You may r..

    [LeetCode] 890. Find and Replace Pattern

    890. Find and Replace Pattern Medium 2584138Add to ListShare Given a list of strings words and a string pattern, return a list of words[i] that match pattern. You may return the answer in any order. A word matches the pattern if there exists a permutation of letters p so that after replacing every letter x in the pattern with p(x), we get the desired word. Recall that a permutation of letters is..

    [딥러닝/머신러닝] 넘파이 NumPy, 맷플롯립 Matplotilb

    [딥러닝/머신러닝] 넘파이 NumPy, 맷플롯립 Matplotilb

    NumPy [ 넘파이 ] 데이터를 간단한 코드로 처리할 수 있는 확장 모듈 - 벡터 & 행렬 계산 Matplotlib [ 맷플롯립 ] 그래프, 이미지, 애니매이션 생성 가능 Numpy 배열 생성 shape 함수 위의 3차원 배열은 구별하기 쉽게 일부로 앤터를 입력 했다. arr.shape 는 순서대로, 가장 바깥의 배열의 묶여있는 각각의 원소 수[ [?], [?] ], 다음 안쪽 배열의 묶여있는 각각의 원소 수 [ [ [?], [?] ] , [ [?], [?] ] ], 마지막으로 가장 안쪽에 있는 각각의 원소 수 [ [ [?, ?, ?], [?, ?, ?] ], [ [?, ?, ?], [?, ?, ?] ] ] 이렇게 갯수를 이해하면 된다. len 함수 shape 함수에서 가장 바깥의 각각 묶인 원소의 수..

    Python 문자를 아스키코드로 변환, 아스키코드를 문자로 변환

    문자를 인덱스로 하여 문제를 풀때 필요한 소스코드 A는 65부터 시작하고, a는 97로 시작한다. ch = 'A' # 문자 저장 i = ord(ch) # 아스키코드로 저장 j = chr(i) # 문자로 저장 print(i) # 65 출력 print(j) # A 출력

    Python 입력 방법 및 빠른 입/출력, 숫자 2차원 배열, 문자 2차원 배열 입력, 띄어쓰기 없이 2차원 배열 입력

    알고리즘 문제를 풀때 입력의 속도를 빠르게 하는방법 C : scanf 사용 C++ : ios_base :: sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL); JAVA : BufferedReader br = new BufferedReader( new InputStreamReader ( System.in ) ); str = br.readline(); 파이썬도 위와 마찬가지로 입/출력 속도를 빠르게하는 문법이 있음 입력 예제 0: 1 정수 한개를 입력 받는 방법 n = int(sys.stdin.readline()) 입력 예제 1: ABCDE 띄어쓰기가 없는 문자열을 1차원 리스트(배열)에 각각 인덱스를 가지도록 입력. member=list(sys.stdin.re..

    [Yolo v3] Object Detection 물체 인식 오픈소스 darknet 소스 분석

    [Yolo v3] Object Detection 물체 인식 오픈소스 darknet 소스 분석

    안녕하세요, 나무토끼 입니다. 새로운 프로젝트를 위해서 물체인식에 대해서 알아보려고 합니다. 영상 처리가 필요했기 때문에 OpenCV , 딥러닝 여러 단어들을 검색하다 우연히 발견하게 된 YOLO v3 , 이것은 다른 딥러닝 기술보다 빠르다고 하고,,, 원리나 내용은 우선 넘어갈게요. https://github.com/pjreddie/darknet위의 주소에서 다운로드를 받을 수 있습니다. 웹 캡을 이용해 실시간으로 물체인식을 수행하는 것도 가능하내요! 원리나 관련된 기술은 나중에 하는 것으로 하겠습니다. 1. 소스 ?YOLO v3는 C언어로 되어 있습니다. 컴파일한 실행파일에 학습 시킨 cfg 파일과 이미지 파일을 입력하면 , 현재 280개 정도의 아이템이 인식이 되는것 같습니다. 사람을 인식 하고 싶..

    [골빈해커의 3분 딥러닝 텐서플로맛] Part 2. 텐서플로 설치 / 주피터 노트북

    [골빈해커의 3분 딥러닝 텐서플로맛] Part 2. 텐서플로 설치 / 주피터 노트북

    안녕하세요, 나무 토끼 입니다. 골빈해커의 3분 딥러닝 텐서플로맛 예제들을 실습하겠습니다. 환경 : Max OS Version : High Sierra Tool : Terminal 2-1. 파이썬 / 라이브러리 설치하기 pip3 install --upgrade tensorflow tennsorflow / keras-applications / tennsorboard / setuptools / gast / six / termcolor / grpcio / wheel / absl-py / astor / protobuf / numpy / keras-preprocessing / h5py / markdown / werkzeung / 살펴 보니 위에 것들이 설치가 되었어요. 설치가 꾀 오래 걸립니다. 약 20분 정도...