본문 바로가기

파이썬4

[python][pytube] youtube 영상 다운로드 갑자기 youtube 영상을 다운 받을 필요가 생겼다. 기존 크롬 extension에 있던것으로 받을려고 하니 정책상 더이상 지원할 수 없다고 떴다. 그리고는 자기네들 SW를 사용하라고 링크를 준다. 돈을 내란다.. 파이썬에 library가 있을 것 같아서 찾아보니 아니나 다를까 pytube가 있다. 영상 하나 다운 받거나, play list 받아서 모든 영상 다 다운 받는 것으로 만들었다. 실행 파일은 여기서 다운 받을 수 있다. 아니면 아래 복사해서 이름.py로 저장해서 실행해도 된다. 실행하고 영상 주소나, play list 주소를 넣고 엔터 누르면 된다. 실행한 경로에 videos 폴더를 만들고 거기 다운을 받는다. play list는 play list 제목으로 폴더 하나를 더 만들고 그 안에 다.. 2022. 10. 19.
[python][matplotlib] 파이썬에서 그래프 그리기 plot graph #reference link ##https://stackoverflow.com/questions/62783909/matplotlib-set-data-not-showing-a-line import numpy as np import matplotlib.pyplot as plt import matplotlib.patches as patches import matplotlib.gridspec as gridspec #initial grid size with 3rows and 1 column gs = gridspec.GridSpec(3, 1) plt.close('all') plt.ion() fig = plt.figure(figsize=(10, 12)) fig.suptitle(f'Overall plot name', .. 2022. 10. 17.
Visual Studio Code Python pip install 설정하기 컴퓨터 포맷을 하고 나서 예전 환경 설정하는 게 보통일이 아니다. 다했다 생각했는데 하나 둘 다른일을 할 때 마다 아직 안 한것들이 너무 많은 것을 깨닫는다. 파이썬 pip install 설정 방법 Windows 10에서 python을 하기위해 python 3.10.1을 설치했고, visual studio code도 설치했다. pip install pyautogui 를 터미널에서 입력하니, "Python pip is not recognized..." 이런식으로 pip을 못 알아보겠다고 에러를 뱉어낸다. 설정하는 방법을 확인해보자. 1. visual studio code 에서 작업하는 폴더를 선택한다. 보통 PythonWorkspace 혹은 Project라는 폴더로 많이들 사용하는 것 같다. 나는 Pyth.. 2021. 12. 15.
[leetcode] 20. Valid Parentheses 20. Valid Parentheses Easy 6619269Add to ListShare Given a string s containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. An input string is valid if: Open brackets must be closed by the same type of brackets. Open brackets must be closed in the correct order. Example 1: Input: s = "()" Output: true Example 2: Input: s = "()[]{}" Output: true Exa.. 2021. 1. 22.
반응형