This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
python -Bc "import pathlib; [p.unlink() for p in pathlib.Path('.').rglob('*.py[co]')]" | |
python -Bc "import pathlib; [p.rmdir() for p in pathlib.Path('.').rglob('__pycache__')]" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Songs | |
youtube-dl -f m4a --add-metadata https://www.youtube.com/watch?v=UDVtMYqUAyw | |
#Playlist | |
youtube-dl -f m4a --add-metadata --yes-playlist https://www.youtube.com/watch?v=UDVtMYqUAyw | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
df = YOUR_DATAFRAME | |
ones = np.ones([df_shape[0],df_shape[0]]) | |
dev_mat = df - (ones @ df)/df_shape[0] | |
cov_mat = (dev_mat.T @ dev_mat) / df_shape[0] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Import modules | |
import plotly | |
import plotly.graph_objs as go | |
#Make Plotly figure | |
fig1 = go.Scatter(x=data['curb-weight'], | |
y=data['price'], | |
mode='markers') | |
#Make Plot.ly Layout |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly | |
import plotly.graph_objs as go |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
data = pd.read_csv("cars.csv") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
import plotly | |
import plotly.graph_objs as go | |
#Read cars data from csv | |
data = pd.read_csv("cars.csv") | |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import plotly.graph_objs as go | |
import plotly | |
import pandas as pd | |
data = pd.read_csv("my_data.csv") | |
fig1 = go.Scatter(x=data['rpm'], | |
y=data['speed'], | |
mode='markers', | |
marker=dict(size=10, |