What do you want to save?
Add Code snippet
New code examples
-
Python 2022-01-22 02:35:30
how to load wav file python
import matplotlib.pyplot as plt from scipy import signal from scipy.io import wavfile sample_rate, samples = wavfile.read('path-to-mono-audio-file.wav') frequencies, times, spectrogram = signal.spectrogram(samples, sample_rate) plt.pcolormesh(times, fre... Add solution -
Python 2022-01-22 00:46:22
python get stock data
import yfinance as yf import matplotlib.pyplot as plt # Get the data for the stock Apple by specifying the stock ticker, start date, and end date data = yf.download('AAPL','2016-01-01','2018-01-01') # Plot the close prices data.Close.plot() plt.show() Add solution -
Python 2021-11-22 07:05:27
norm.pdf python
# import required libraries from scipy.stats import norm import numpy as np import matplotlib.pyplot as plt import seaborn as sb # Creating the distribution data = np.arange(1,10,0.01) pdf = norm.pdf(data , loc = 5.3 , scale = 1 ) #Visualizi... Add solution -
Python 2021-11-22 02:21:07
how to plot a bar using matplotlib
import matplotlib.pyplot as plt # creating the dataset data = {'C':20, 'C++':15, 'Java':30, 'Python':35} courses = list(data.keys()) values = list(data.values()) fig = plt.figure(figsize = (5, 5)) # creating the bar plot p... Add solution -
Other 2021-11-21 21:57:18
PCA with covariance
import numpy as npimport pandas as pdimport seaborn as snsimport matplotlib.pyplot as plt# Load datasetdataset = pd.read_csv('src/dataset.csv')pca = PCA(dataset, standardize=True, method='eig')normalized_dataset = pca.transformed_data# Covariance Matrix# ... Add solution -
Other 2021-11-21 21:21:11
get data from elasticsearch to jupyter
from datetime import datetime from elasticsearch import Elasticsearch from pandas import DataFrame, Series import pandas as pd import matplotlib.pyplot as plt es = Elasticsearch(host="192.168.121.252") res = es.search(index="_all", doc... Add solution -
Python 2021-11-21 19:03:18
python plot a dictionary
# credit to the Stack Overflow user in the source link import matplotlib.pylab as plt lists = sorted(d.items()) # sorted by key, return a list of tuples x, y = zip(*lists) # unpack a list of pairs into two tuples plt.plot(x, y) plt.show() Add solution -
Python 2021-11-21 15:33:27
skimage marching cubes lewiner
import numpy as np import matplotlib.pyplot as plt from mpl_toolkits.mplot3d.art3d import Poly3DCollection from skimage import measure from skimage.draw import ellipsoid # Generate a level set about zero of two identical ellipsoids in 3D ellip_base = e... Add solution