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
from pptx import Presentation | |
from pptx.enum.shapes import MSO_SHAPE | |
from pptx.dml.color import RGBColor | |
from pptx.util import Inches, Pt | |
from pptx.enum.dml import MSO_THEME_COLOR | |
title='Automated Presentation Creating Process\n\ | |
How to Create PowerPoint Presentations with Python ' | |
pylogo='pylogo.png' | |
pptlogo='pptlogo.png' |
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
from fpdf import FPDF | |
import os | |
import plotly.express as px | |
import plotly | |
df = px.data.iris() | |
pltx = px.scatter(df, x="sepal_width", y="sepal_length", color="species", | |
size='petal_length', hover_data=['petal_width']) | |
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
#setting current working directory as path | |
import pandas as pd | |
import os | |
from os import listdir | |
from os.path import isfile,join | |
import csv | |
file_path=os.getcwd() | |
data_path=file_path+'\\'+'data' # setting path for data folder |
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
f_loop=[1,5,7,-10,12,14,-16] | |
pos=[] | |
neg=[] | |
for i in f_loop: | |
if i<0: | |
neg.append(i) | |
elif i>0: | |
pos.append(i) |
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
list_ex1=[1,5,7,-10,12,14,-16,-8,0] | |
pos=[] | |
neg=[] | |
neg.append(list_ex1[0]) if list_ex1[0]<0 else pos.append(list_ex1[0]) | |
neg.append(list_ex1[1]) if list_ex1[1]<0 else pos.append(list_ex1[1]) | |
neg.append(list_ex1[2]) if list_ex1[2]<0 else pos.append(list_ex1[2]) | |
neg.append(list_ex1[3]) if list_ex1[3]<0 else pos.append(list_ex1[3]) | |
neg.append(list_ex1[4]) if list_ex1[4]<0 else pos.append(list_ex1[4]) |
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
from sklearn.datasets import make_regression | |
import matplotlib.pyplot as plt | |
%matplotlib inline | |
#generating random dataset for linear regression | |
x,y,coef=make_regression(n_samples=10,n_features=1,n_informative=1,n_targets=1,noise= | |
3,bias=1.0,coef=True,random_state=42) | |
#modelling |
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 | |
desc=open(r"abalone_names.txt") | |
print(desc.read()) | |
df = pd.read_csv('https://query.data.world/s/is7jwu2tdgeqqxho53vrsq5bhjmf7d',header=None) | |
df.head() | |
columns=['Sex','Length','Diameter','Height','Whole weight','Shucked weight','Viscera weight','Shell weight','Rings'] | |
df.columns=columns |
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 | |
movies_1=pd.DataFrame({'ID':[1,2,3,4,5,6], | |
'Movies': ['Breaking Bad','The Wire','Cosmos','The Sopranos','Chernobyl','Fargo'], | |
'Release Date':[2008,2002,1980,1999,2019,2014]}) | |
movies_2=pd.DataFrame({'ID':[1,7,8,4,5,6], | |
'Movies':['Breaking Bad','Westworld','The Crown','The Sopranos','Chernobyl','Fargo'], | |
'IMDB Rating': [9.4,8.7,8.6,9.2,9.4,8.9] }) |
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 requests | |
url = "https://community-open-weather-map.p.rapidapi.com/find" | |
querystring = {"type":"link%2C accurate","units":"metric","q":"istanbul"} | |
headers = { | |
'x-rapidapi-host': "community-open-weather-map.p.rapidapi.com", | |
'x-rapidapi-key': "{API KEY'inizi buraya girmelisiniz.}" | |
} |
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
from forex_python.converter import CurrencyRates | |
c = CurrencyRates() | |
usd_rates=c.get_rates('USD') | |
usd=1.0 | |
eur=usd_rates['EUR'] | |
trl=usd_rates['TRY'] | |
def capraz_kur_via_func(x,y,z): | |
return x/y*z |
NewerOlder