Python
-
Introducing Positron (data science)Python 2024. 12. 10. 18:43
https://isabel.quarto.pub/end-to-end-data-science-with-the-positron-ide/#/title-slide End-to-end data science with the Positron IDEThe origin story Multi-language IDE for data science Made by Positron is a fork of the open source VSCode, customized for data science similar strategy to other IDEs such as Cursor able to use Open VSX extensions enables multilingual data science perhaps misabel.quar..
-
Visualize STFTPython 2024. 11. 27. 11:52
fft_size가 frame_size( = 25) 이상인 가장 작은 2제곱 값따라서 fft_size는 32frame_shift = 10 # -*- coding: utf-8 -*-import waveimport numpy as npimport matplotlib.pyplot as pltif __name__ == "__main__": wav_file = './data/wav/xxx.wav' frame_size = 25 frame_shift = 10 out_plot = './spectrogram.png' with wave.open(wav_file) as wav: sample_frequency = wav.getframerate() num_samples = ..
-
Visualize FFTPython 2024. 11. 25. 14:17
복소수 스펙트럼 계산:spectrum: np.fft.fft(frame)frame은 0.58초에서 시작 1024(2의 제곱승)만큼 크기 진폭스펙트럼 : 복소수 스펙터럼의 절대치 np.abs(spectrum)좌우대칭이므로 좌측만 사용 0~512까지 절대치 취함 로그 진폭 스펙트럼: 흔들리는 폭이 크므로 로그를 취함 np.logflooring: 진폭이 0인 주파수가 있으면 로그를 취할 때 마이너스 무한대 가능아주 작은 수인 1E-7(10의 마이너스 7승)을 더함 # -*- coding: utf-8 -*-import waveimport numpy as npimport matplotlib.pyplot as pltif __name__ == "__main__": wav_file = './data/wav/fft..
-
Visualize Speech WavePython 2024. 11. 25. 14:06
# -*- coding: utf-8 -*-import waveimport numpy as npimport matplotlib.pyplot as pltif __name__ == "__main__": wav_file = '../../data/wav/xxx.wav' out_plot = '../../plot.png' with wave.open(wav_file) as wav: sampling_frequency = wav.getframerate() sample_size = wav.getsampwidth() num_channels = wav.getnchannels() num_samples = wav.getnframes() waveform ..
-
[Python]파이썬 출력 화면 지우기Python 2024. 5. 10. 14:04
https://jellyho.com/blog/96/ [Python]파이썬 출력 화면 지우기 (1줄 지우기, 윈도우, 리눅스, 주피터, 구글 코랩)코딩을 하다보면 다양한 이유로 출력된 화면을 지우고 싶을 때가 있다. 장기간 비슷한 내용을 출력해야 하는데 …jellyho.com 코딩을 하다보면 다양한 이유로 출력된 화면을 지우고 싶을 때가 있다. 장기간 비슷한 내용을 출력해야 하는데 화면을 지우지 않고 계속 출력하다보면 계속 아래로 내려가기 때문에 지저분하기도 하고....이번 포스트에서는 파이썬에서 출력을 지우는 다양한 방법을 알아보겠다.먼저 1줄을 지우는 방법이다. 간단하게 print()함수의 end옵션과 \r를 이용하면 된다.print("hello", end="")print("\rgoodbye", en..
-
[Python]PyQt WidgetsPython 2024. 5. 7. 15:52
https://www.pythonguis.com/tutorials/pyqt-basic-widgets/ PyQt5 Widgets — QCheckBox, QComboBox, QPushButton, QLabel, QSliderPyQt5 has a huge library of widgets, including buttons, checkboxes, list boxes, and sliders or dials. Learn how to use them in your apps. In Qt, like in most GUI frameworks, widget is the name given to a component of the UI that the user can interact with.www.pythonguis.com ..
-
[Python] Candle Stick ChartPython 2024. 5. 7. 15:49
https://levelup.gitconnected.com/7-fascinating-python-financial-graphs-that-will-amaze-you-b21d5f65cd1a 7 Fascinating Python Financial Graphs That Will Amaze You!Introduction: Exploring the Power of Python in Financial Graphslevelup.gitconnected.com import plotly.graph_objects as goimport pandas as pd# Sample data: Date, Open, High, Low, Closedata = { 'Date': pd.date_range(start='2024-01-01'..