Python

    [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] 251. Flatten 2D Vector

    251. Flatten 2D Vector Medium 602338Add to ListShare Design an iterator to flatten a 2D vector. It should support the next and hasNext operations. Implement the Vector2D class: Vector2D(int[][] vec) initializes the object with the 2D vector vec. next() returns the next element from the 2D vector and moves the pointer one step forward. You may assume that all the calls to next are valid. hasNext(..

    [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..

    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..

    [골빈해커의 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분 정도...

    [골빈해커의 3분 딥러닝 텐서플로맛] Part 1. 딥러닝 정의 그리고 텐써플로

    [골빈해커의 3분 딥러닝 텐서플로맛] Part 1. 딥러닝 정의 그리고 텐써플로

    안녕하세요, 나무 토끼 입니다. 오늘은 골빈해커의 3분 딥러닝 텐서플로맛을 기록하려고 합니다. 제목 : 골빈해커의 3분 딥러닝 1. 딥러닝의 정의-- 출처 : 나무위키 https://ko.wikipedia.org/wiki/%EB%94%A5_%EB%9F%AC%EB%8B%9D딥 러닝(영어: deep learning), 심층학습(深層學習)은 여러 비선형 변환기법의 조합을 통해 높은 수준의 추상화(abstractions, 다량의 데이터나 복잡한 자료들 속에서 핵심적인 내용 또는 기능을 요약하는 작업)를 시도하는 기계학습(machine learning) 알고리즘의 집합[1] 으로 정의되며, 큰 틀에서 사람의 사고방식을 컴퓨터에게 가르치는 기계학습의 한 분야라고 이야기할 수 있다.어떠한 데이터가 있을 때 이를 컴퓨..