[Python] 내장함수 list() list 연장 a = [1,2,3] b = [4,5] a.extend(b) print(a) >>> [1,2,3,4,5] list element 추가 a = [1,2,3] b = 4 a.insert(2,b) print(a) >>> [1,2,4,3] Code & Framework/Python Numpy 2023.06.19
[Python] 내장함수 zip() 두 개의 데이터 원소를 각각 tuple 로 짝지어줌 Transpose 로 볼 수도 있음 >>> for item in zip([1, 2, 3], ['sugar', 'spice', 'everything nice']): print(item) (1, 'sugar') (2, 'spice') (3, 'everything nice') # unzip >>> *zip 두 개의 데이터의 길이가 같지 않다면 길이가 짧은 데이터 기준으로 stop Code & Framework/Python Numpy 2023.06.19
[Linux] 코드에서 특정 내용을 찾고싶을 때 # 찾고싶은 디렉토리 내부에서 grep -r '찾고 싶은 내용' ./ Code & Framework/Linux Conda 2023.06.07
Git clone # Master branch clonegit clone [repo link]# Developer branch clonegit clone -b [branch name] [repo link] 가끔 레포 안쪽에 symbolic link 로 연결되어있는 경우, 패키지가 제대로 깔리지 않을 수 있음 git clone [repo link] --recursive Code & Framework/Git SVN 2023.05.30
UTC, GMT, KST Conference Deadline 체크할 때 헷갈려서 정리 UTC: Coordinated Universal Time, KST-9 UTC-12: UTC 보다 12시간 더 느림, KST-21 GMT: Greenwich Mean Time, UTC 랑 거의 같지만 기술적인 표기는 보통 UTC로 함 KST: Korea Standard Time 예시) 2023.08.15 11:59 PM UTC-12 → 2023.08.16 8:59 PM KST ETC/잡동사니 2023.05.17
Linear, Bilinear Interpolation Interpolation: 보간 Linear interpolation: 1D 선형보간법 위치를 알고 있는 두 점 $(x_0,y_0), (x_1,y_1)$ 이 있을 때 그 사이에 있는 점 $(x,y)$를 추정하는 방법 Bilinear interpolation: 2D 선형보간법 1D 선형보간법을 확장한 것 Mathematics/Linear Algebra 2023.05.16
[Pytorch] Batch 개수, Data 개수 # batch 개수 len(dataloader) # train/test data 개수 len(dataloader.dataset) Code & Framework/Pytorch 2023.05.14
[Pytorch] Seed 고정 torch.manual_seed(seed) np.random.seed(seed) random.seed(seed) torch.cuda.manual_seed(seed) torch.cuda.manual_seed_all(seed) torch.backends.cudnn.deterministic = True torch.backends.cudnn.benchmark = False Code & Framework/Pytorch 2023.05.09
[Chapter 1] Algorithm: Efficiency, Analysis, and Order 경희대학교 한치근 교수님 알고리즘 수업을 바탕으로 작성되었습니다. 알고리즘 (Algorithm) 페르시아의 수학자 이름 'al Khowarizmi' 로부터 유래된 단어 정의: 문제를 잘 해결할 수 있는 well defined 그리고 finite 한 시간 내에 종료되는 computational procedure Algorithm vs Method Algorithm: Ends in a finite time manner Method: Don't know if it ends in finite time 알고리즘의 분석 (Analysis) 공간복잡도 (Memory complexity) 시간복잡도 (Time complexity) - 더 중요하게 생각 분석 방법의 종류 모든 경우 분석 (Every-case Analys.. Computer Science/Data Structure, Algorithm 2023.04.23
[Linux] GPU서버에 dataset 다운로드 (wget, Google Drive, scp) 1. 링크로 바로 다운 받는 경우cd data/dataset/wget $url 1-1. wget 링크로 다운받을 때 로그인이 필요한 경우 가끔 로그인이 필요한 dataset 제공 사이트가 있음 (NTU RGB+D, ...) 이런 경우 그냥 wget 으로 진행하면 제대로 다운로드가 되지 않음 따라서 웹에서 로그인한 상태로 쿠키정보를 복사해서 wget 옵션에 넣어주면 됨 쿠키 복사하는법더보기해당 데이터셋 홈페이지에서 F12 로 개발자모드 진입Network 탭에서 Preserve log 체크다운받고자 하는 파일 링크 클릭하면 해당 이름으로 발생한 요청 항목 선택Headers 탭에서 Request headers 확인그 안에 'Cookie:' 의 내용을 아래 예시와 같이 통째로 복사wget --header $쿠키.. Code & Framework/Linux Conda 2023.04.18