0% found this document useful (0 votes)
30 views146 pages

Python

Uploaded by

Halil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
30 views146 pages

Python

Uploaded by

Halil
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PYTHON TUTORIAL

Fehmi UYAR
01 What is Python? 02 What can Python
✔ Python popüler bir programlama dilidir. Guido ✔
do?
Python, web uygulamaları oluşturmak için sunucuda

PYTHON van Rossum tarafından yaratılmış ve 1991'de


yayınlanmıştır. Şunun için kullanılır:
kullanılabilir.
✔ İş akışları oluşturmak için yazılımlarla birlikte Python
✔ web geliştirme (sunucu tarafı),
INTRO ✔ Masaüstü ve mobil yazılım geliştirme,
✔ matematik, veri analizi
kullanılabilir.
✔ Python veritabanı sistemlerine bağlanabilir. Ayrıca dosyaları
okuyabilir ve değiştirebilir.
✔ sistem betiği, makine öğrenimi ✔ Python, büyük verileri işlemek ve karmaşık matematik
işlemleri gerçekleştirmek için kullanılabilir.
03 Why Python? ✔ Python, hızlı prototipleme veya üretime hazır yazılım
geliştirme için kullanılabilir.
✔ Python farklı platformlarda (Windows, Mac, Linux, Raspberry Pi, vb.)
çalışır.
✔ Python'un İngilizce'ye benzer basit bir söz dizimi vardır.
04 Warning!
✔ Python, geliştiricilerin diğer bazı programlama dillerine göre daha az
✔ Python'un en son büyük sürümü, bu eğitimde
satırla program yazmalarına olanak tanıyan bir söz dizimine sahiptir. kullanacağımız Python 3'tür. Ancak, Python 2, güvenlik
✔ Python bir yorumlayıcı sistemde çalışır, yani kod yazıldığı anda güncellemeleri dışında hiçbir şeyle güncellenmemiş
olmasına rağmen, hala oldukça popülerdir.
çalıştırılabilir.. ✔ Python, bir komutu tamamlamak için yeni satırlar kullanır;
✔ Python, zengin bir kütüphaneye sahiptir diğer programlama dilleri ise noktalı virgül veya parantez
kullanır.
Timeline Python

1994 2000 2010 2008 2015 2020 2022 2024

Python 1.x Python 2.7 Python 3.5 Python 3.11


Python’un ilk resmi Python 2.x async ve await anahtar Performans
sürümü ocak serisinin son kelimeleri tanıtıldı, bu iyileştirmeleri (Python
1994'te geldi. sürümüdür da asenkron 3.10'a kıyasla %10-60
Aralık 1997'de 1.5 programlamayı daha arasında daha hızlı)
anlaşılır hale getirdi
sürümü geldi

Python 2.x Python 3.x Python 3.9 Python 3.13


Serisi
Python’un önemli bir Python 3, önceki Python dict birleşim Son sürümüdür
kilometre taşıdır. sürümlerine tam uyumlu operatörleri (| ve
Listelerdeki kapsamlı değildir, yani Python 2
kodları Python 3'te
|=) eklendi
listeler ve bir çöp
toplama sistemi çalışmayabilir. Python 3
eklendi ile dilde önemli
değişiklikler yapılmıştır
What can you do with python?
Matematiksel Hesaplamalar Veri Analizi
NumPy, SciPy gibi kütüphaneler Pandas, NumPy, ve Matplotlib
bilimsel hesaplamalar için gibi kütüphaneler sayesinde veri
yaygın olarak kullanılır. setleri üzerinde kolayca analiz
yapılabilir

Makine Öğrenimi Web Geliştirme Otomasyon ve Betik Yazımı


TensorFlow, Keras, Scikit-learn Python, Django ve Flask gibi Python, tekrar eden görevleri otomatikleştirmek
gibi kütüphaneler makine popüler web framework'leri ile ve sistem üzerinde komut dosyaları çalıştırmak
öğrenimi modelleri geliştirmek web siteleri geliştirmek için için idealdir. Örneğin, dosya işlemleri, veri
için kullanılır kullanılabilir kazıma (web scraping), e-posta gönderimi gibi
işlevler otomatikleştirilebilir
What can you do with python?
Veritabanı İşlemleri API ile Entegrasyon
Python ile veritabanlarına (MySQL, Python, REST API'ler ile iletişim
PostgreSQL, SQLite gibi) kurmak, veri çekmek ve veri
bağlanabilir ve veri çekme, ekleme, göndermek için kullanılabilir
güncelleme gibi işlemler yapılabilir

Görsel ve Grafik İşleme Oyun Geliştirme Yapay Zeka


OpenCV, PIL (Pillow) gibi Pygame gibi kütüphanelerle Doğal dil işleme, görüntü işleme, derin
kütüphanelerle görsel işlemler basit oyunlar geliştirebilirsiniz öğrenme gibi yapay zeka alanlarında Python
yapılabilir. Görüntü analizleri, çok güçlüdür. Keras, PyTorch gibi kütüphaneler
filtreleme ve grafiksel bu alanda sıkça kullanılır
düzenlemeler mümkündür
Variable Names
Kural 3
Bir variable'ın kısa bir adı (x ve y gibi) Bir variable adı yalnızca alfa-sayısal
veya daha açıklayıcı bir adı (age, karakterler ve alt çizgiler (Az, 0-9 ve _ )
carname, toplam_hacim) olabilir. içerebilir

Python variable kuralları 1 Kural 4


Bir variable adı bir harfle veya alt çizgi Variable adları büyük/küçük harfe
karakteriyle başlamalıdır duyarlıdır (age, Age ve AGE üç farklı
değişkendir)

Kural 2 Kural 5
Bir variable adı sayı ile başlayamaz Bir variable adı Python anahtar
sözcüklerinden hiçbiri olamaz
Python Anahtar Sözcükleri
Keyword Description Keyword Description
and A logical operator for To create a for loop

as To create an alias from To import specific parts of a module

assert For debugging global To declare a global variable

break To break out of a loop if To make a conditional statement

class To define a class import To import a module

continue To continue to the next iteration of a loop in To check if a value is present in a list, tuple, etc.

def To define a function is To test if two variables are equal

del To delete an object lambda To create an anonymous function

elif Used in conditional statements, same as else if None Represents a null value

else Used in conditional statements nonlocal To declare a non-local variable

except Used with exceptions, what to do when an exception not A logical operator
occurs
or A logical operator
False Boolean value, result of comparison operations
pass A null statement, a statement that will do nothing
finally Used with exceptions, a block of code that will be
executed no matter if there is an exception or not raise To raise an exception
return To exit a function and return a value Boolean value, result of comparison operations
True
try To make a try...except statement To create a while loop
while
Multi Camel Case
İlk kelime hariç her kelime
büyük harfle başlar

Words
Variable
Names Pascal Case
Her kelime büyük harfle başlar. Daha
yaygın olarak ‘UpperCamelCase’ olarak da
bilinir

Her kelime bir alt çizgi karakteriyle ayrılır

Snake Case
Data
Types
Text Type str
Numeric Types int, float, complex
Sequence Types list, tuple, range
Mapping Type dict
Set Types set, frozenset
Boolean Type bool
Binary Types bytes, bytearray, memoryview
None Type NoneType
ASCII TABLE
ASCII TABLE
Extended
ASCII TABLE
Python Numbers
int
Tam sayılar için veri tipi

float
Ondalıklı sayılar için veri tipi

complex
Karmaşık sayılar için veri tipi
Random Number
seed() Initialize the random number generator
getstate() Returns the current internal state of the random number generator
setstate() Restores the internal state of the random number generator
getrandbits() Returns a number representing the random bits
randrange() Returns a random number between the given range
randint() Returns a random number between the given range
choice() Returns a random element from the given sequence
choices() Returns a list with a random selection from the given sequence
shuffle() Takes a sequence and returns the sequence in a random order
sample() Returns a given sample of a sequence
random() Returns a random float number between 0 and 1
uniform() Returns a random float number between two given parameters
triangular() Returns a random float number between two given parameters, you can also set a mode parameter to
specify the midpoint between the two other parameters
Random Number
betavariate() Returns a random float number between 0 and 1 based on the Beta distribution (used in
statistics)
expovariate() Returns a random float number based on the Exponential distribution (used in statistics)
gammavariate() Returns a random float number based on the Gamma distribution (used in statistics)
gauss() Returns a random float number based on the Gaussian distribution (used in probability theories)
lognormvariate() Returns a random float number based on a log-normal distribution (used in probability theories)
normalvariate() Returns a random float number based on the normal distribution (used in probability theories)
vonmisesvariate() Returns a random float number based on the von Mises distribution (used in directional statistics)
paretovariate() Returns a random float number based on the Pareto distribution (used in probability theories)
weibullvariate() Returns a random float number based on the Weibull distribution (used in statistics)
Escape Characters
Code Result
\' Single Quote
\\ Backslash
\n New Line
\r Carriage Return
\t Tab
\b Backspace
\ooo Octal value
\xhh Hex value
STRING METHODS
Method Description Method Description
capitalize Converts the first character to upper case isascii Returns True if all characters in the string are ascii
characters
casefold Converts string into lower case
isdecimal Returns True if all characters in the string are decimals
center Returns a centered string
isdigit Returns True if all characters in the string are digits
count Returns the number of times a specified value occurs
in a string isidentifier Returns True if the string is an identifier

encode Returns an encoded version of the string islower Returns True if all characters in the string are lower case

endswith Returns true if the string ends with the specified value isnumeric Returns True if all characters in the string are numeric

expandtabs Sets the tab size of the string isprintable Returns True if all characters in the string are printable

find Searches the string for a specified value and returns isspace Returns True if all characters in the string are
the position of where it was found whitespaces
format Formats specified values in a string istitle Returns True if the string follows the rules of a title

format_map Formats specified values in a string isupper Returns True if all characters in the string are upper case

index Searches the string for a specified value and returns join Joins the elements of an iterable to the end of the string
the position of where it was found
ljust Returns a left justified version of the string
isalnum Returns True if all characters in the string are
alphanumeric lower Converts a string into lower case
isalpha Returns True if all characters in the string are in the Returns a left trim version of the string
lstrip
alphabet
STRING METHODS
Method Description Method Description
maketrans Returns a translation table to be used in translations strip Returns a trimmed version of the string

partition Returns a tuple where the string is parted into three swapcase Swaps cases, lower case becomes upper case and vice
parts versa
replace Returns a string where a specified value is replaced title Converts the first character of each word to upper case
with a specified value
translate Returns a translated string
rfind Searches the string for a specified value and returns
the last position of where it was found upper Converts a string into upper case
rindex Searches the string for a specified value and returns Fills the string with a specified number of 0 values at the
zfill
the last position of where it was found beginning
rjust Returns a right justified version of the string

rpartition Returns a tuple where the string is parted into three


parts
rsplit Splits the string at the specified separator, and returns
a list
rstrip Returns a right trim version of the string

split Splits the string at the specified separator, and returns


a list
splitlines Splits the string at line breaks and returns a list

startswith Returns true if the string starts with the specified value
Formatting Types
Format Description Method Description
:< Left aligns the result (within the available space) :E Scientific format, with an upper case E

:> Right aligns the result (within the available space) :f Fix point number format

:^ Center aligns the result (within the available space) :F Fix point number format, in uppercase format
(show inf and nan as INF and NAN)
:= Places the sign to the left most position
:g General format
:+ Use a plus sign to indicate if the result is positive or negative
:G General format (using a upper case E for scientific
:- Use a minus sign for negative values only notations)

Use a space to insert an extra space before positive :o Octal format


:
numbers (and a minus sign before negative numbers) Hex format, lower case
:x
:, Use a comma as a thousand separator
:X Hex format, upper case
:_ Use a underscore as a thousand separator
:n Number format
:b Binary format
:% Percentage format
:c Converts the value into the corresponding unicode character

:d Decimal format

:e Scientific format, with a lower case e


Python Operators
1 Arithmetic operators

2 Assignment operators

3 Comparison operators

4 Logical operators

5 Identity operators

6 Membership operators

7 Bitwise operators
Python Arithmetic Operators
Python Assignment Operators
AND
X Y X&Y
1 1 1
1 0 0
0 1 0
0 0 0

OR
X Y X|Y
1 1 1
1 0 1
0 1 1
0 0 0
Python Comparison Operators
Python Logical Operators

Python Identity Operators


Python Membership Operators

XOR
X Y X^Y
1 1 0
1 0 1
0 1 1
0 0 0
Python Bitwise Operators
Operator Precedence
List Methods
Method Description
append() Adds an element at the end of the list
clear() Removes all the elements from the list
copy() Returns a copy of the list
count() Returns the number of elements with the specified value
extend() Add the elements of a list (or any iterable), to the end of the current list
index() Returns the index of the first element with the specified value
insert() Adds an element at the specified position
pop() Removes the element at the specified position
remove() Removes the item with the specified value
reverse() Reverses the order of the list
sort() Sorts the list
Python Collections (Arrays)
Collections Ordered Changeable Duplicate
List sıralı değiştirilebilir yinelenebilir
Tuple sıralı değiştirilemez yinelenebilir
Set sıralanmamış değiştirilemez* yinelenmez
Dictionary sıralı** değiştirilebilir yinelenmez
*Set öğeleri değiştirilemez, ancak istediğiniz zaman öğeleri kaldırabilir ve/veya ekleyebilirsiniz.
**Python 3.7 sürümünden itibaren sözlükler sıralıdır . Python 3.6 ve öncesinde sözlükler sırasızdır
Set
Methods
Dictionary Methods
Method Description
clear Removes all the elements from the dictionary
copy Returns a copy of the dictionary
fromkeys Returns a dictionary with the specified keys and value
get Returns the value of the specified key
items Returns a list containing a tuple for each key value pair
keys Returns a list containing the dictionary's keys
pop Removes the element with the specified key
popitem Removes the last inserted key-value pair
setdefault Returns the value of the specified key. If the key does not exist: insert the key, with the specified value
update Updates the dictionary with the specified key-value pairs
values Returns a list of all the values in the dictionary
MATH MODULE
Method Description Method Description
[Link] Returns the arc cosine of a number [Link] Returns the error function of a number

[Link] Returns the inverse hyperbolic cosine of a number [Link] Returns the complementary error function of a number

[Link] Returns the arc sine of a number [Link] Returns E raised to the power of x

[Link] Returns the inverse hyperbolic sine of a number math.expm1 Returns Ex - 1

[Link] Returns the arc tangent of a number in radians [Link] Returns the absolute value of a number

math.atan2 Returns the arc tangent of y/x in radians [Link] Returns the factorial of a number

[Link] Returns the inverse hyperbolic tangent of a number [Link] Rounds a number down to the nearest integer

[Link] Rounds a number up to the nearest integer [Link] Returns the remainder of x/y

[Link] Returns the number of ways to choose k items from n [Link] Returns the mantissa and the exponent, of a specified
items without repetition and order number
[Link] Returns a float consisting of the value of the first [Link] Returns the sum of all items in any iterable (tuples,
parameter and the sign of the second parameter arrays, lists, etc.)
[Link] Returns the cosine of a number [Link] Returns the gamma function at x

[Link] Returns the hyperbolic cosine of a number [Link] Returns the greatest common divisor of two integers

[Link] Converts an angle from radians to degrees [Link] Returns the Euclidean norm

[Link] Returns the Euclidean distance between two points (p and [Link] Checks whether two values are close to each other, or
q), where p and q are the coordinates of that point not
MATH MODULE
Method Description Method Description
[Link] Checks whether a number is finite or not [Link] Returns the closest value that can make numerator
completely divisible by the denominator
[Link] Checks whether a number is infinite or not
[Link] Returns the sine of a number
[Link] Checks whether a value is NaN (not a number) or not
[Link] Returns the hyperbolic sine of a number
[Link] Rounds a square root number downwards to the nearest
integer [Link] Returns the square root of a number

[Link] Returns the inverse of [Link]() which is x * (2**i) of [Link] Returns the tangent of a number
the given numbers x and i
[Link] Returns the hyperbolic tangent of a number
[Link] Returns the log gamma value of x
[Link] Returns the truncated integer parts of a number
[Link] Returns the natural logarithm of a number, or the logarithm
of number to base
Constant Description
math.log10 Returns the base-10 logarithm of x
math.e Returns Euler's number (2.7182...)
math.log1p Returns the natural logarithm of 1+x
[Link] Returns a floating-point positive infinity
math.log2 Returns the base-2 logarithm of x
[Link] Returns a floating-point NaN (Not a Number)
[Link] Returns the number of ways to choose k items from n
items with order and without repetition
value
[Link] Returns the value of x to the power of y [Link] Returns PI (3.1415...)

[Link] Returns the product of all the elements in an iterable [Link] Returns tau (6.2831...)

[Link] Converts a degree value into radians


Method Description
CMATH MODULE cmath.log10 Returns the base-10 logarithm of x
Method Description
[Link] Return the phase of a complex number
[Link] Returns the arc cosine value of x
[Link] Convert a complex number to polar coordinates
[Link] Returns the hyperbolic arc cosine of x
[Link] Convert polar coordinates to rectangular form
[Link] Returns the arc sine of x
[Link] Returns the sine of x
[Link] Returns the hyperbolic arc sine of x
[Link] Returns the hyperbolic sine of x
[Link] Returns the arc tangent value of x
[Link] Returns the square root of x
[Link] Returns the hyperbolic arctangent value of x
[Link] Returns the tangent of x
[Link] Returns the cosine of x
[Link] Returns the hyperbolic tangent of x
[Link] Returns the hyperbolic cosine of x

[Link] Returns the value of Ex, where E is Euler's number Constant Description
(approximately 2.718281...), and x is the number passed cmath.e Returns Euler's number (2.7182...)
to it
[Link] Checks whether two values are close, or not [Link] Returns a floating-point positive infinity value

[Link] Checks whether x is a finite number [Link] Returns a complex infinity value

[Link] Check whether x is a positive or negative infinty [Link] Returns floating-point NaN (Not a Number) value

[Link] Checks whether x is NaN (not a number) [Link] Returns coplext NaN (Not a Number) value

[Link] Returns the logarithm of x to the base [Link] Returns PI (3.1415...)

[Link] Returns tau (6.2831...)


PYTHON STATISTICS MODULE
Method Description
statistics.harmonic_mean Calculates the harmonic mean (central location) of the given data
[Link] Calculates the mean (average) of the given data
[Link] Calculates the median (middle value) of the given data
statistics.median_grouped Calculates the median of grouped continuous data
statistics.median_high Calculates the high median of the given data
statistics.median_low Calculates the low median of the given data
[Link] Calculates the mode (central tendency) of the given numeric or nominal data
[Link] Calculates the standard deviation from an entire population
[Link] Calculates the standard deviation from a sample of data
[Link] Calculates the variance of an entire population
[Link] Calculates the variance from a sample of data
DATETIME MODULE
Method Description Method Description
%a Weekday, short version %z UTC offset
%A Weekday, full version %Z Timezone
%w Weekday as a number 0-6, 0 is Sunday %j Day number of year 001-366
%d Day of month 01-31 %U Week number of year, Sunday as the first day
of week, 00-53
%b Month name, short version
%W Week number of year, Monday as the first day
%B Month name, full version of week, 00-53
%m Month as a number 01-12 %c Local version of date and time
%y Year, short version, without century %C Century
%Y Year, full version %x Local version of date
%H Hour 00-23 %X Local version of time
%I Hour 00-12 %% A % character
%p AM/PM %G ISO 8601 year
%M Minute 00-59 %u ISO 8601 weekday (1-7)
%S Second 00-59 %V ISO 8601 weeknumber (01-53)
%f Microsecond 000000-999999
MAGIC METHODS
MAGIC METHODS
MAGIC
METHODS
MAGIC METHODS
MAGIC METHODS
DOSYA AÇMA MODLARI

Mod Description
r Okuma modu : Varsayılan değer. Okuma için bir dosya açar, dosya mevcut değilse hata verir

a Ekleme modu : Ekleme için bir dosya açar, dosya yoksa dosyayı oluşturur

w Yazma modu : Yazma için bir dosya açar, dosya yoksa dosyayı oluşturur. Dosya varsa içeriği silinir ve yeniden
oluşturulur
x Oluşturma modu - Belirtilen dosyayı oluşturur, dosya mevcutsa bir hata döndürür

r+ Okuma ve yazma modu: Dosya varsa açılır; dosya yoksa hata alınır

w+ Yazma ve okuma modu: Dosya varsa içeriği silinir ve yeniden oluşturulur; dosya yoksa oluşturulur

a+ Ekleme ve okuma modu: Dosya varsa açılır ve imleç dosyanın sonuna yerleştirilir; dosya yoksa oluşturulur

t Varsayılan değer. Metin modu

b İkili mod (örneğin resimler)


Method Description
close Closes the file
File
detach Returns the separated raw stream from the buffer Methods
fileno Returns a number that represents the stream, from the operating system's perspective
flush Flushes the internal buffer
isatty Returns whether the file stream is interactive or not
read Returns the file content
readable Returns whether the file stream can be read or not
readline Returns one line from the file
readlines Returns a list of lines from the file
seek Change the file position
seekable Returns whether the file allows us to change the file position
tell Returns the current file position
truncate Resizes the file to a specified size
writable Returns whether the file can be written to or not
write Writes the specified string to the file
writelines Writes a list of strings to the file
BUILT-IN EXCEPTIONS
Exception Description Exception Description
ArithmeticError Sayısal hesaplamalarda bir hata oluştuğunda NotImplementedError Abstract bir metodun, metodu geçersiz kılmak
için miras alınan bir sınıf gerektirmesi
AssertionError Bir assert ifadesi başarısız olduğunda durumunda
AttributeError Attribute referansı veya ataması başarısız olduğunda OSError Sistemle ilgili bir işlem bir hataya neden
olduğunda ortaya çıkar
Exception Tüm istisnalar için temel sınıf
OverflowError Sayısal bir hesaplamanın sonucu çok büyük
EOFError input() metodu "dosya sonu" koşuluna (EOF) olduğunda ortaya çıkar
ulaştığında ReferenceError Zayıf bir referans nesnesi mevcut olmadığında
FloatingPointError Kayan nokta hesaplaması başarısız olduğunda ortaya çıkar
RuntimeError Belirli bir istisnaya ait olmayan bir hata
GeneratorExit Bir generator kapatıldığında (close() metoduyla)
oluştuğunda ortaya çıkar
ImportError İçe aktarılan bir modül mevcut olmadığında StopIteration Bir yineleyicinin next() yönteminin başka değeri
olmadığında ortaya çıkar
IndentationError Girinti doğru olmadığında çalışır
SyntaxError Bir sözdizimi hatası oluştuğunda ortaya çıkar
IndexError Bir dizinin indeksi mevcut olmadığında ortaya çıkar
TabError Girinti sekmelerden veya boşluklardan
KeyError Bir dictionary'de anahtar bulunmadığında ortaya çıkar oluştuğunda ortaya çıkar
KeyboardInterrupt Kullanıcı Ctrl+c tuşuna bastığında ortaya çıkar SystemError Bir sistem hatası oluştuğunda ortaya çıkar

LookupError Ortaya çıkan hatalar bulunamadığında ortaya çıkar SystemExit [Link]() fonksiyonu çağrıldığında ortaya çıkar

MemoryError Bir programın belleği dolduğunda ortaya çıkar TypeError İki farklı tür bir araya geldiğinde ortaya çıkar

NameError Bir variable mevcut olmadığında ortaya çıkar UnboundLocalError Local bir variable atama öncesinde referans
alındığında
BUILT-IN EXCEPTIONS
Exception Description
UnicodeError Bir unicode sorunu oluştuğunda ortaya çıkar

UnicodeEncodeError Bir unicode kodlama sorunu oluştuğunda ortaya çıkar

UnicodeDecodeError Bir unicode kod çözme sorunu oluştuğunda ortaya çıkar

UnicodeTranslateError Bir unicode çeviri sorunu oluştuğunda ortaya çıkar

ValueError Belirtilen veri türünde yanlış bir değer olduğunda ortaya çıkar

ZeroDivisionError Bölme işlemindeki ikinci operatör sıfır olduğunda ortaya çıkar


REGULAR EXPRESSION FUNCTIONS

Function Description
findall Tüm eşleşmeleri içeren bir list döndürür
search Metin içinde bir deseni (pattern) arar, ilk bulduğunu döner
split Desene göre metni parçalara böler. Bir list döndürür
sub Desene uyan yerleri başka bir metinle değiştirir.
match Metnin başında deseni arar. Sadece başta varsa eşleşir.
METACHARACTERS

Character Description

[] A set of characters
\ Signals a special sequence (can also be used to escape special characters)
. Any character (except newline character)
^ Starts with
$ Ends with
* Zero or more occurrences
+ One or more occurrences
? Zero or one occurrences
{} Exactly the specified number of occurrences
| Either or
() Capture and group
SPECIAL SEQUENCES
Character Description
\A Returns a match if the specified characters are at the beginning of the string
\b Returns a match where the specified characters are at the beginning or at the end of a word
(the "r" in the beginning is making sure that the string is being treated as a "raw string")
\B Returns a match where the specified characters are present, but NOT at the beginning (or at the end) of a word
(the "r" in the beginning is making sure that the string is being treated as a "raw string")
\d Returns a match where the string contains digits (numbers from 0-9)
\D Returns a match where the string DOES NOT contain digits
\s Returns a match where the string contains a white space character
\S Returns a match where the string DOES NOT contain a white space character
\w Returns a match where the string contains any word characters (characters from a to Z, digits from 0-9, and the
underscore _ character)
\W Returns a match where the string DOES NOT contain any word characters
\Z Returns a match if the specified characters are at the end of the string
SETS
Set Description
[arn] Returns a match where one of the specified characters (a, r, or n) is present
[a-n] Returns a match for any lower case character, alphabetically between a and n
[^arn] Returns a match for any character EXCEPT a, r, and n
[0123] Returns a match where any of the specified digits (0, 1, 2, or 3) are present
[0-9] Returns a match for any digit between 0 and 9
[0-5][0-9] Returns a match for any two-digit numbers from 00 and 59
[a-zA-Z] Returns a match for any character alphabetically between a and z, lower case OR upper case
[+] In sets, +, *, ., |, (), $,{} has no special meaning, so [+] means: return a match for any + character in the
string
STATUS CODE IN REQUESTS MODULE
Code Description
1xx:Bilgi (Informational): İstek alındı ve işleniyor 100 Continue: Sunucu, isteğin başlıklarını aldı; istemci, isteğin gövdesini göndermeye devam edebilir
101 Switching Protocols: İstemcinin protokol değiştirme talebi kabul edildi
2xx: Başarılı (Success): İstek başarıyla alındı, 200 OK: İstek başarılı
anlaşıldı ve kabul edildi 201 Created: İstek başarılı ve yeni bir kaynak oluşturuldu
204 No Content: İstek başarılı, ancak döndürülecek içerik yok
3xx: Yönlendirme (Redirection): İsteğin 301 Moved Permanently: Kaynak kalıcı olarak taşındı; yeni URL belirtilir
tamamlanması için ek işlem gerekiyor 302 Found: Kaynak geçici olarak taşındı; istemci yeni URL'yi kullanmalıdır
304 Not Modified: Kaynakta bir değişiklik yok; önbellekteki versiyon kullanılabilir
4xx: İstemci Hatası (Client Error): İstek hatalı 400 Bad Request: Geçersiz istek
veya işlenemiyor 401 Unauthorized: Yetkilendirme gerekli
403 Forbidden: Erişim yasaklandı
404 Not Found: Kaynak bulunamadı
5xx:Sunucu Hatası (Server Error): Sunucu, 500 Internal Server Error: Genel sunucu hatası
geçerli bir isteği yerine getiremedi 502 Bad Gateway: Sunucu, geçersiz bir yanıt aldı
503 Service Unavailable: Sunucu şu anda kullanılamıyor; genellikle geçicidir
MySQL
customer_id customer_name customer_lastname customer_age Product Name
1 Fehmi UYAR 34 Gömlek
2 Murat BAŞTUĞ 37 Ceket
3 Şükrü EVRAN 36 Gömlek
4 Emrullah ÖZCAN 36 Pantolon

Product_id Product_name
1 Gömlek
2 Ceket
3 Pantolon
4 Kaban
PostgreSQL
PostgreSQL gelişmiş bir ilişkisel
Option B veritabanı sistemidir

❖ PostgreSQL hem ilişkisel (SQL) hem de ilişkisel olmayan


Option A
(JSON) sorguları destekler

❖ PostgreSQL ücretsiz ve açık kaynaklıdır Option B

PostgreSQL, diğer veritabanı yönetim


sistemlerinin desteklediği özelliklerin hemen Option A
hemen hepsini destekler.
PostgreSQL'in Desteklediği Diller

1 Python

2 Java

3 C / C++ / C#

4 [Link]

5 Go

6 Ruby

7 Perl ve Tcl
PostgreSQL Tarihi
PostgreSQL, Kaliforniya Üniversitesi
Berkeley Bilgisayar Bilimleri
Bölümü'nde icat edildi.

1986 yılında, birden fazla veri türünü


destekleyecek asgari özelliklere sahip
bir veritabanı sistemi oluşturma
hedefiyle bir proje olarak başladı.

PostgreSQL başlangıçta UNIX


platformlarında çalışıyordu ancak
artık Windows ve MacOS da dahil
olmak üzere çeşitli platformlarda
çalışabiliyor
Postgre Bir Tablo Max
Bir tablonun maksimum boyutu:
32 TB

SQL
Kapasite
Maksimum satır boyutu:
1.6 TB
Bir Satır Max

Bir sütunun alabileceği maksimum boyut


1GB
Bir Sütun Max
VERİ TUTUCULAR
NoSQL Çeşitleri
Key – Value Tabanlı Veritabanları
ÖR: Redis

Document Tabanlı Veritabanları


ÖR: MongoDB

Column Family Tabanlı Veritabanları


ÖR: Apache Cassandra

Graph Tabanlı Veritabanları


ÖR: Neo4j
MongoDB
Filtreleme Operatörleri

Operatör Açıklama
$and ve
$or veya
$not değil
Why Use NumPy?

Listelerin yavaşlığı Neden listelerden daha hızlı?

ndarray nesnesinin Hangi dilde yazıldı? NumPy


işlevselliği

Array lerin veri biliminde çok 1. Çok Boyutlu Diziler (Arrays)


sık kullanılması oluşturmak ve yönetmek
2. Toplama, çarpma, trigonometrik
işlemler, istatistiksel analizler vb.
matematiksel işlemler yapmak
3. Verimli ve Hızlı Hesaplama
4. Bilimsel Hesaplama ve Veri
Analizi
Data Types in Python

Data Types Description


strings Metin verilerini temsil etmek için kullanılır, metin tırnak işaretleri altında verilir. Örneğin "Fehmi"
integer tam sayıları temsil etmek için kullanılır. örneğin 7, 19, -3
float Ondalıklı sayıları temsil etmek için kullanılır. örneğin 7,19 veya 71,34
boolean True ve False temsil etmek için kullanılır
complex karmaşık sayıları temsil etmek için kullanılır. örneğin 1.7 + 2.5j
Data Types in NumPy
Data Types in NumPy
Data Types Description
i integer
b boolean
u unsigned integer
f float
c complex float
m timedelta
M datetime

O object
S string
U unicode string
NumPy Array Concatenation

Function Description
[Link]() Dizi birleştirme (ekseni belirleyerek)
[Link]() Yeni bir eksenle dizileri üst üste koyma
[Link]() Yatay (horizontal) birleştirme
[Link]() Dikey (vertical) birleştirme
[Link]() Derinlik (depth) ekseniyle birleştirme
np.column_stack() Sütunlara göre birleştirme
np.row_stack() Satırlara göre birleştirme
NumPy Array Concatenation

Function Description
[Link]() Dizi birleştirme (ekseni belirleyerek)
[Link]() Yeni bir eksenle dizileri üst üste koyma
[Link]() Yatay (horizontal) birleştirme
[Link]() Dikey (vertical) birleştirme
[Link]() Derinlik (depth) ekseniyle birleştirme
np.column_stack() Sütunlara göre birleştirme
np.row_stack() Satırlara göre birleştirme
NumPy Splitting Array

Function Description
[Link]() Belirtilen indekslerde eşit veya özel dilimleme
np.array_split() Eşit olmasa bile bölmeye izin verir
[Link]() Sütunlara göre (horizontal) bölme
[Link]() Satırlara göre (vertical) bölme
[Link]() Derinliğe göre (3. eksen) bölme
NumPy Searching Arrays and Sorting Arrays
Function Description
[Link]() Koşula göre indeks döner
[Link]() Eleman başka dizide var mı?
[Link]() Sıfır olmayanların indekslerini döner
[Link]() / [Link]() En büyük / en küçük değerin indeksi
[Link]() Sıralı diziye öğe yerleştirme konumu

Function Description
[Link]() Sıralı yeni dizi döner
[Link]() Sıralama için gerekli indeksleri döner
[Link]() Yerinde (in-place) sıralama
[Link]() Birden fazla anahtarla sıralama (tuple)
Basic Charts in Seaborn

Chart Type Function Description


Serpme Grafiği scatterplot İki değişkenin ilişkisini gösterir
Çizgi Grafiği lineplot Bir değişkenin zaman içindeki değişimi
Çubuk Grafiği barplot Kategorilere göre ortalamalar
boxplot,
Kutu Grafiği Dağılımı ve aykırı değerleri gösterir
violinplot
Histogram histplot Bir değişkenin dağılımı
Korelasyon Haritası heatmap Değişkenler arasındaki ilişkiyi gösterir
Verilerin dağılımını gösteren histogram, kde eğrisi veya
Dağılım grafiği displot
ecdf grafiği çizer
kdeplot,
Diğer
ecdfplot
NumPy UFUNC'lar
NumPy UFUNC'lar
NumPy UFUNC'lar
NumPy UFUNC'lar
NumPy UFUNC'lar
NumPy UFUNC'lar
NumPy UFUNC'lar
NumPy UFUNC'lar
Example
# Employee Department Age City Salary
1 Fehmi Uyar Information Technology 34 Kütahya 10000
2 Bruce Wayne Human Resources 34 Gotham 250000
3 Albus Dumbledore Information Technology 63 Eskişehir 10000
4 Gandalf the Gray Human Resources 71 Eskişehir 30000
5 Tony Stark Information Technology 40 Eskişehir 50000
6 Stanley Ipkiss Finance 35 Kütahya 75000
7 Vito Corleone Human Resources 58 Van 94000
Pandas String Functions
[Link]() Tüm harfleri küçük yapar
[Link]() Tüm harfleri büyük yapar
[Link]() Her kelimenin ilk harfi büyük
[Link]() Sadece ilk harf büyük
[Link]('abc') Belirli bir metni içeriyor mu?
[Link]('abc') Belirli metinle başlıyor mu?
[Link]('xyz') Belirli metinle bitiyor mu?
[Link]() Baş/son boşlukları siler
[Link]('a', 'b') Metni değiştirir
[Link](',') Metni ayırır → liste döner
[Link](n) Split sonrası n. elemanı alır
[Link](start, end) Parça alır
[Link]() Karakter sayısını verir
[Link]('a') Belirli harf/kelime sayısını verir
SciPy'nin Modül Yapısı (Alt Paketleri)
Modül Amaç
[Link] Sayısal entegrasyon (örneğin: quad, odeint)
[Link] Optimizasyon problemleri (örneğin: minimize, root)
[Link] İstatistiksel testler, dağılımlar
[Link] Lineer cebir (NumPy'ye göre daha gelişmiş)
[Link] Fourier dönüşümleri
[Link] Sinyal işleme (filtreleme, dönüşümler)
[Link] Uzamsal algoritmalar, mesafe hesaplamaları
[Link] Görüntü işleme (çok boyutlu)
SciPy Constants
Ön Ek Kısaltma Değer (10^x) Sayısal Gösterim Örnek
yotta Y 10²⁴ 1e+24 1 YW = 10²⁴ watt
zetta Z 10²¹ 1e+21 1 ZB = 10²¹ byte
exa E 10¹⁸ 1e+18 1 EHz = 10¹⁸ hertz
peta P 10¹⁵ 1e+15 1 PFLOP = 10¹⁵ işlem
tera T 10¹² 1e+12 1 TB = 10¹² byte
giga G 10⁹ 1e+9 1 GHz = 10⁹ hertz
mega M 10⁶ 1e+6 1 MB = 10⁶ byte
kilo k 10³ 1e+3 1 km = 1000 metre
hecto h 10² 1e+2 1 hektar = 10000 m²
deka da 10¹ 1e+1 1 dekalitre = 10 litre
SciPy Constants
Ön Ek Kısaltma Değer (10^x) Sayısal Gösterim Örnek
deci d 10⁻¹ 0.1 1 desimetre = 0.1 m
centi c 10⁻² 0.01 1 cm = 0.01 m
milli m 10⁻³ 0.001 1 ml = 0.001 litre
micro µ 10⁻⁶ 1e-6 1 µm = 0.000001 m
nano n 10⁻⁹ 1e-9 1 nm = 10⁻⁹ m
pico p 10⁻¹² 1e-12 1 pF = 10⁻¹² farad
femto f 10⁻¹⁵ 1e-15 1 fs = 10⁻¹⁵ saniye
atto a 10⁻¹⁸ 1e-18 1 aJ = 10⁻¹⁸ joule
zepto z 10⁻²¹ 1e-21 1 zg = 10⁻²¹ gram
SciPy Constants
İsim Kısaltma Değer (2^n) Byte cinsinden Yaklaşık değer
kibi Ki 2¹⁰ = 1024 1 KiB ~1.02 KB
mebi Mi 2²⁰ = 1,048,576 1 MiB ~1.05 MB
gibi Gi 2³⁰ = 1,073,741,824 1 GiB ~1.07 GB
tebi Ti 2⁴⁰ = ~1.1×10¹² 1 TiB ~1.10 TB
pebi Pi 2⁵⁰ = ~1.13×10¹⁵ 1 PiB ~1.13 PB
exbi Ei 2⁶⁰ = ~1.15×10¹⁸ 1 EiB ~1.15 EB
zebi Zi 2⁷⁰ = ~1.18×10²¹ 1 ZiB ~1.18 ZB
yobi Yi 2⁸⁰ = ~1.21×10²⁴ 1 YiB ~1.21 YB
SciPy Constants
Metrik Birimler (Standart)
Sabit Açıklama Değeri (kg cinsinden)
[Link] 1 gram 0.001 kg
constants.metric_ton 1 metrik ton (tonne) 1000.0 kg
[Link] 1 karat (mücevherlerde) 0.0002 kg
constants.atomic_mass 1 atomik kütle birimi (amu) 1.66053904×10⁻²⁷ kg
constants.m_u / u Aynı şekilde atomik kütle birimi 1.66053904×10⁻²⁷ kg

İngiliz/Amerikan Ağırlık Birimleri


Sabit Açıklama Değeri (kg cinsinden)
[Link] 1 grain (tahıl ağırlığı) 0.00006479891 kg
[Link] / pound 1 pound (libre) 0.45359237 kg
[Link] / ounce 1 ounce (ons) 0.02834952 kg
[Link] 1 stone (İngiltere'de yaygın) 6.35029318 kg
constants.short_ton 1 Amerikan tonu (US ton) 907.18474 kg
constants.long_ton 1 İngiliz tonu (UK ton) 1016.0469088 kg
SciPy Constants
Troy Sistem Birimleri (Kıymetli metaller için)
Sabit Açıklama Değeri (kg cinsinden)
constants.troy_ounce 1 troy onsu (altın, gümüş) 0.03110348 kg
constants.troy_pound 1 troy pound (12 troy ounce) 0.37324172 kg

Açı Birimleri

Sabit Açıklama Değer (radyan cinsinden)


[Link] 1 derece (°) 0.017453292519943295 rad
[Link] 1 yay dakikası (arcminute, ′) 0.0002908882086657216 rad
[Link] arcmin ile aynı 0.0002908882086657216 rad
[Link] 1 yay saniyesi (arcsecond, ″) 4.84813681109536e-6 rad
[Link] arcsec ile aynı 4.84813681109536e-6 rad
SciPy Constants
Zaman Sabitleri

Sabit Anlamı Değeri (saniye cinsinden)


[Link] 1 dakika 60.0 saniye
[Link] 1 saat 3600.0 saniye
[Link] 1 gün 86400.0 saniye
[Link] 1 hafta 604800.0 saniye
[Link] 1 yıl (365 gün) 31536000.0 saniye
constants.Julian_year 1 Julian yılı (365.25 gün) 31557600.0 saniye
SciPy Constants
İngiliz/Imperial Ölçü Birimleri

Sabit Açıklama Değeri (metre)


inch 1 inç (in) 0.0254 m
foot 1 fit (ft) 0.3048 m
yard 1 yarda (yd) 0.9144 m
mile 1 kara mili 1609.344 m
mil 1 mil (inçin binde biri) 2.54×10⁻⁵ m
pt / point 1 yazı tipi noktası (typography) 0.000352777... m

ABD Survey (Arazi Ölçüm) Sistemine Özel

Sabit Açıklama Değeri (metre)


survey_foot 1 survey foot 0.3048006096 m
survey_mile 1 survey mile 1609.3472187 m
SciPy Constants
Denizcilik Birimi

Sabit Açıklama Değeri (metre)


nautical_mile 1 deniz mili 1852.0 m

Çok Küçük Ölçü Birimleri (Bilimsel)

Sabit Açıklama Değeri (metre)


fermi 1 fermi = 1 femtometre (fm) 1e-15 m (1 × 10⁻¹⁵ demek)
angstrom 1 ångström (Å) 1e-10 m
micron 1 mikron = 1 mikrometre (μm) 1e-6 m
SciPy Constants
Astronomik Mesafe Birimleri

Sabit Açıklama Değeri (metre)


au / astronomical_unit 1 astronomik birim (AU) 149,597,870,691 m
light_year 1 ışık yılı 9,460,730,472,580,800 m
parsec 1 parsek 3.0856775814913673e+16 m
SciPy Constants
Basınç Birimleri

Sabit Anlamı Değeri (Pascal cinsinden)


[Link] 1 atmosfer (atm) 101325.0 Pa
[Link] Aynı değer, farklı isim 101325.0 Pa
[Link] 1 bar 100000.0 Pa
[Link] 1 torr (mm cıva eşdeğeri) 133.32236842105263 Pa
[Link] 1 mm cıva (milimetre cıva) 133.32236842105263 Pa
[Link] 1 psi (pound per square inch) 6894.76 Pa

Birim Değer (Pa) Kullanım Alanı


atm 101,325 Standart atmosfer basıncı
bar 100,000 Endüstriyel ve teknik uygulamalar
torr 133.322 Vakum sistemleri, laboratuvar
mmHg 133.322 Kan basıncı, eski medikal sistemler
psi 6,894.76 Otomotiv, endüstriyel ekipman
SciPy Constants
Alan Ölçü Birimleri
Sabit Anlamı Değeri (m²)
[Link] 1 hektar 10,000.0 m²
[Link] 1 acre (akr) 4046.8564224 m²
Hacim Ölçü Birimleri
Sabit Anlamı Değeri (m³)
[Link] 1 litre (L) 0.001 m³
[Link] 1 litre (İngiliz yazımı) 0.001 m³
[Link] 1 ABD galonu 0.003785411784 m³
constants.gallon_US Aynı değer: 1 ABD galonu 0.003785411784 m³
constants.gallon_imp 1 İngiliz galonu 0.00454609 m³
constants.fluid_ounce 1 ABD sıvı onsu 2.95735295625e-05 m³
constants.fluid_ounce_US Aynı değer: 1 ABD sıvı onsu 2.95735295625e-05 m³
constants.fluid_ounce_imp 1 İngiliz sıvı onsu 2.84130625e-05 m³
[Link] 1 petrol varili (ABD) 0.158987294928 m³
[Link] Aynı değer: 1 ABD petrol varili (bbl) 0.158987294928 m³
SciPy Constants
Hız Birimleri
Sabit Anlamı Değeri (m/s)
[Link] 1 kilometre/saat (km/h) 0.27777778 m/s
[Link] 1 mil/saat (mile per hour) 0.44704 m/s
[Link] 1 Mach (ses hızı - yaklaşık) 340.5 m/s
constants.speed_of_sound Ses hızı (yaklaşık, havada) 340.5 m/s
[Link] 1 knot (deniz mili/saat) 0.514444 m/s

Sıcaklık Sabitleri

Sabit Anlamı Değeri


constants.zero_Celsius 0°C'nin Kelvin cinsinden değeri 273.15 K
constants.degree_Fahrenheit Fahrenheit cinsinden 1 derece farkı 5/9 ≈ 0.555555...
SciPy Constants
Dönüşüm Formülleri

Dönüşüm Formül
Celsius → Kelvin K = °C + 273.15
Kelvin → Celsius °C = K - 273.15
Fahrenheit → Celsius °C = (°F - 32) × 5/9
Celsius → Fahrenheit °F = (°C × 9/5) + 32
Fahrenheit → Kelvin K = ((°F - 32) × 5/9) + 273.15
Kelvin → Fahrenheit °F = ((K - 273.15) × 9/5) + 32
SciPy Constants
Enerji Birimleri
Sabit Değer (Joule cinsinden) Açıklama
[Link] 1.6021766208e-19 Elektron volt – atom altı parçacıkların enerjisini ölçmekte kullanılır.
constants.electron_volt 1.6021766208e-19 Yukarıdakiyle aynıdır.
Termokimyasal kalori – klasik kalori, 1 gram suyu 1°C ısıtmak için
[Link] 4.184
gereken enerji.
constants.calorie_th 4.184 Termokimyasal kalori (aynı değeri verir).
constants.calorie_IT 4.1868 Uluslararası Tablo Kalorisi – biraz daha hassas tanımlama.
[Link] 1e-07 Erg – CGS sisteminde küçük enerji birimi.
British Thermal Unit – İngiliz birim sisteminde enerji ölçer (genelde
[Link] 1055.05585262
ısıtma-soğutma sistemlerinde).
constants.Btu_IT 1055.05585262 Uluslararası Tablo BTU’su.
constants.Btu_th 1054.3502644888888 Termokimyasal BTU.
constants.ton_TNT 4.184e9 TNT tonu – patlayıcı enerjiyi ölçer. 1 ton TNT = 4.184 gigajoule.
SciPy Constants
Beygir Gücü Sabitleri
Sabit İsmi Değeri (Watt) Açıklama
[Link] 745.6998715822701 W Mekanik beygir gücü (horsepower), genelde otomotiv ve makine gücü ölçümünde kullanılır.
[Link] 745.6998715822701 W Yukarıdaki ile aynı; hp sabitinin eşdeğeridir.

Ek Bilgi: Farklı Beygir Gücü Tanımları

Tür Yaklaşık Değer (Watt) Açıklama


Mekanik hp (ABD) 745.7 W [Link] değeri, en yaygın kullanılan tanımdır.
Metrik hp (PS) 735.5 W Avrupa'da, Türkiye’de bazı sektörlerde kullanılır.
Elektriksel hp 746 W Elektrik motorları için tanımlanır.
Kazan hp (boiler hp) ≈ 9809.5 W Buhar kazanlarının gücünü belirtir.
SciPy Constants
Kuvvet Birimleri
Değer (Newton
Sabit İsmi Açıklama
cinsinden)
[Link] 1×10−5 N Dine (dyne) — CGS birim sisteminde kuvvet birimi. 1 dyne = 10−5 Newton’dur.
[Link] 1×10−5 N Yukarıdaki ile aynı; dyne’nin başka yazımı.
Pound-force (lbf) — İngiliz birim sisteminde kuvvet. 1 pound-force yaklaşık 4.44822
[Link] 4.4482216152605 N
N.
constants.pound_force 4.4482216152605 N Yukarıdaki ile aynı; pound-force’un tam ismi.
Kilogram-force (kgf) — 1 kg kütlenin standart yerçekimi altında uyguladığı kuvvet
[Link] 9.80665 N
(yaklaşık 9.81 N).
constants.kilogram_force 9.80665 N Yukarıdaki ile aynı; kilogram-force’un tam ismi.
Matplotlib Marker Reference
Marker Description Marker Description
o Circle ^ Triangle Up
* Star < Triangle Left
. Point > Triangle Right
, Pixel 1 Tri Down
x x 2 Tri Up
X x(filled) 3 Tri Left
+ plus 4 Tri Right

P Plus (filled) | Vline


s Square _ (underscore) Hline
D Diamond
d Diamond (thin)
p Pentagon
H Hexagon
h Hexagon
v Triangle Down
Matplotlib Line and Color Reference
Line Syntax Description
- Solid line

: Dotted line

-- Dashed line

-. Dashed/dotted line

Color Syntax Description


r Red
g Green
b Blue
c Cyan
m Magenta
y Yellow
k Black
w White
Color Names Supported by All Browsers
Color Names Supported by All Browsers
Color Names Supported by All Browsers
Color Names Supported by All Browsers
Color Names Supported by All Browsers
ColorMaps

Name Reverse Name Reverse Name Reverse


Accent Accent_r PiYG PiYG_r Wistia Wistia_r
Blues Blues_r PuBu PuBu_r YlGn YlGn_r
BrBG BrBG_r PuBuGn PuBuGn_r YlGnBu YlGnBu_r
BuGn BuGn_r PuOr PuOr_r YlOrBr YlOrBr_r
BuPu BuPu_r PuRd PuRd_r YlOrRd YlOrRd_r
CMRmap CMRmap_r Purples Purples_r afmhot afmhot_r
Dark2 Dark2_r RdBu RdBu_r autumn autumn_r
GnBu GnBu_r RdGy RdGy_r binary binary_r
Greens Greens_r RdPu RdPu_r bone bone_r
Greys Greys_r RdYlBu RdYlBu_r brg brg
OrRd OrRd_r RdYlGn RdYlGn_r bwr bwr_r
Oranges Oranges_r Reds Reds_r cividis cividis_r
PRGn PRGn_r Set1 Set1_r cool cool_r
Paired Paired_r Set2 Set2_r coolwarm coolwarm_r
Pastel1 Pastel1_r Set3 Set3_r copper copper_r
Pastel2 Pastel2_r Spectral Spectral_r cubehelix cubehelix_r
ColorMaps

Name Reverse Name Reverse Name Reverse


flag flag_r nipy_spectral nipy_spectral_r viridis viridis_r
gist_earth gist_earth_r ocean ocean_r winter winter_r
gist_gray gist_gray_r pink pink_r
gist_heat gist_heat_r plasma plasma_r
gist_ncar gist_ncar_r prism prism_r
gist_rainbow gist_rainbow_r rainbow rainbow_r
gist_stern gist_stern_r seismic seismic_r
gist_yarg gist_yarg_r spring spring_r
gnuplot gnuplot_r summer summer_r
gnuplot2 gnuplot2_r tab10 tab10_r
gray gray_r tab20 tab20_r
hot hot_r tab20b tab20b_r
hsv hsv_r tab20c tab20c_r
inferno inferno_r terrain terrain_r
jet jet_r twilight twilight_r
magma magma_r twilight_shifted twilight_shifted_r
Data Set
Ağırlık (gram) Renk Yüzey Etiket (Sonuç)
150 kırmızı düz Elma
130 turuncu pürüzlü Portakal
155 kırmızı düz Elma
140 turuncu pürüzlü Portakal

Bir array örneği:


Data Set (Example of a database)
Araba adı Renk Yaş Hız Otomatik Vites
BMW kırmızı 5 99 Evet
Nissan siyah 7 86 Evet
Skoda gri 8 87 Hayır
Skoda beyaz 7 88 Evet
Ford beyaz 2 111 Evet
Skoda beyaz 19 86 Evet
Tesla kırmızı 2 103 Evet
BMW siyah 9 87 Evet
Nissan gri 4 94 Hayır
Ford beyaz 11 78 Hayır
Toyota gri 12 77 Hayır
Skoda beyaz 9 85 Hayır
Toyota mavi 6 86 Evet
Linear Regression

x (Çalışma saati) y (Sınav puanı)


1 50
2 55
3 65
4 70

r değeri Yorum
0.9 – 1.0 veya -0.9 – -1.0 Çok güçlü ilişki
0.7 – 0.9 veya -0.7 – -0.9 Güçlü ilişki
0.4 – 0.7 veya -0.4 – -0.7 Orta düzeyde ilişki
0.2 – 0.4 veya -0.2 – -0.4 Zayıf ilişki
0 – 0.2 veya -0 – -0.2 Çok zayıf ya da yok
Multiple Regression (Sample Table)
Scale Features (Sample Table)
Confusion Matrix
Bir kişinin komedi gösterisine gidip gitmeyeceğini tahmin eden bir modelimiz olsun

Tahmin: Evet Tahmin: Hayır


Gerçek: Evet TP (True Positive) ✅ FN (False Negative) ❌
Gerçek: Hayır FP (False Positive) ❌ TN (True Negative) ✅

Tahmin: 1 Tahmin: 0
Gerçek: 1 True Positive False Negative
Gerçek: 0 False Positive True Negative

Kısaltma Açıklama
TP - Doğru Pozitif Gerçekten giden birini doğru tahmin etti
TN - Doğru Negatif Gerçekten gitmeyen birini doğru tahmin etti
FP - Yanlış Pozitif Gitmeyen birini gitmiş gibi tahmin etti
FN - Yanlış Negatif Giden birini gitmemiş gibi tahmin etti
Confusion Matrix Metrics

Metrik Formül Anlamı


Accuracy (TP + TN) / Tüm tahminler Doğru tahmin oranı
Precision TP / (TP + FP) Pozitif dediğin şeylerin ne kadarı gerçekten pozitif
Recall TP / (TP + FN) Gerçek pozitiflerin ne kadarını bulabildin
Specificity TN / (TN + FP) Gerçek negatifleri doğru bulma oranı
F1 Score 2x(PrecisionxRecall)/(Precision+Recall) Precision ve Recall dengesinin puanı
Logistic Regression
Boy (cm) Kilo (kg) Obez mi? (1=Evet, 0=Hayır)
170 60 0
165 80 1
180 90 1
175 65 0
Cross Validation
Cross Validation
K-nearest neighbors (KNN)
K-nearest neighbors (KNN)
THANK YOU
Hazırlayan Fehmi UYAR
Section Break
Insert the Subtitle of Your Presentation
Meet John Wastson
You can simply impress your audience and
add a unique zing and appeal to your
Presentations.

Our Programmer

Team
Get a modern You can simply impress your audience and
PowerPoint add a unique zing and appeal to your
Tony Wilson Presentations.
Presentation that is
beautifully designed. Manager

You can simply impress your audience and


add a unique zing and appeal to your
Max Jones Presentations.
Designer
Infographic Style
Content Here

32% Easy to change


colors, photos
and Text.

❖ Get a PowerPoint Presentation


❖ Get a PowerPoint Presentation
❖ Get a PowerPoint Presentation
❖ Get a PowerPoint Presentation

Content Here

15% Easy to change


colors, photos
and Text.

❖ Get a PowerPoint Presentation


❖ Get a PowerPoint Presentation
❖ Get a PowerPoint Presentation
❖ Get a PowerPoint Presentation

Contents_Here
Example Text : Get a modern PowerPoint Presentation that is beautifully designed. I hope and I
believe that this Template will your Time, Money and Reputation. You can simply impress your
audience and add a unique zing.
We Create
Quality Professional
PPT Presentation

You can simply impress your


audience and add a unique zing and
appeal to your Presentations. Easy to
change colors, photos and Text. Get
a modern PowerPoint Presentation
that is beautifully designed.
Infographic Style
SIMPLE PRESENTATION

ALLPPT Layout
Clean Text Slide for
your Presentation

$350
You can simply impress your audience and add
a unique zing and appeal to your Presentations.
Easy to change colors, photos and Text.

PRESENTATION
Infographic Style
Your Text Here Your Text Here
You can simply impress your You can simply impress your
audience and add a unique audience and add a unique
zing and appeal to your zing and appeal to your
Presentations. Presentations.

Your Text Here Your Text Here


You can simply impress your You can simply impress your Add Text
audience and add a unique audience and add a unique Easy to change
zing and appeal to your zing and appeal to your colors, photos
Presentations. Presentations. and Text.

Your Text Here Your Text Here


You can simply impress your You can simply impress your
audience and add a unique audience and add a unique
zing and appeal to your zing and appeal to your
Presentations. Presentations.
AWESOME
SLIDE
LOREM IPSUM
DOLOR SIT AMET,
LOREM IPSUM DOLOR SIT AMET,
CU USU AGAM INTEGRE IMPEDIT.

Easy to change Easy to change Easy to change Easy to change


colors, photos colors, photos colors, photos colors, photos
and Text. and Text. and Text. and Text.
Infographic Style

Add Text Add Text

Contents Here Contents Here


Easy to change colors, photos Easy to change colors, photos
and Text. and Text.

Get a modern PowerPoint Presentation that is beautifully designed. I hope and I believe that this Template will your Time, Money and Reputation. Easy
to change colors, photos and Text. Get a modern PowerPoint Presentation that is beautifully designed. Get a modern PowerPoint Presentation that is
beautifully designed. I hope and I believe that this Template will your Time, Money and Reputation. You can simply impress your audience and add a
unique zing and appeal to your Reports and Presentations with our Templates.
Infographic Style
ALLPPT Layout ALLPPT Layout
Clean Text Slide Clean Text Slide
for your Presentation for your Presentation

Contents_Here Contents_Here

Get a modern PowerPoint Presentation Get a modern PowerPoint Presentation


that is beautifully designed. I hope and I that is beautifully designed. I hope and I
believe that this Template will your Time, believe that this Template will your Time,
Money and Reputation. Money and Reputation.

Contents_Here Contents_Here

Get a modern PowerPoint Presentation Get a modern PowerPoint Presentation


that is beautifully designed. I hope and I that is beautifully designed. I hope and I
believe that this Template will your Time, believe that this Template will your Time,
Money and Reputation. Money and Reputation.
Infographic Style
Get a modern PowerPoint Presentation that is beautifully designed. I hope and I
believe that this Template will your Time.

80 % Text

Your Content Here


Get a modern PowerPoint Presentation that is beautifully designed. I
hope and I believe that this Template will your Time, Money and
Reputation. Easy to change colors, photos and Text. Get a modern
PowerPoint Presentation that is beautifully designed.

Get a modern PowerPoint Presentation that is beautifully designed.

ALLPPT Layout
Clean Text Slide for your Presentation
Infographic Style

VALUE VALUE VALUE


You can simply impress your You can simply impress your You can simply impress your
audience and add a unique zing audience and add a unique zing audience and add a unique zing
and appeal to your and appeal to your and appeal to your
Presentations. Presentations. Presentations.
Infographic Style
Add Title
You can simply impress your audience
Option B and add a unique zing and appeal to
your Presentations. Easy to change
colors, photos and Text.

Add Contents Title


❖ Get a modern PowerPoint
Option A
❖ Get a modern PowerPoint
❖ Get a modern PowerPoint

Add Contents Title


❖ Get a modern PowerPoint Option B
❖ Get a modern PowerPoint
❖ Get a modern PowerPoint

Add Title
You can simply impress your audience
and add a unique zing and appeal to Option A
your Presentations. Easy to change
colors, photos and Text.
We Create
Professional Presentation

Power PowerPoint Presentation

2008 ~ 2015 Text here


Example Text : Get a modern PowerPoint Presentation that
is beautifully designed.

2016 ~ 2020 Text here


Example Text : Get a modern PowerPoint Presentation that
is beautifully designed

LOREM IPSUM
DOLOR SIT AMET,
LOREM IPSUM DOLOR SIT AMET,
CU USU AGAM INTEGRE IMPEDIT.
Infographic Style
Your Text Here
You can simply impress your audience and add a unique
zing and appeal to your Presentations.

Your Text Here


You can simply impress your audience and add a unique
zing and appeal to your Presentations.

Your Text Here


You can simply impress your audience and add a unique
zing and appeal to your Presentations.

Your Text Here


You can simply impress your audience and add a unique
zing and appeal to your Presentations.
Modern Portfolio Designed

AWESOME
PRESENTATION
We Create Quality
Professional PPT Presentation

Get a modern PowerPoint Presentation that is beautifully designed. I hope and I believe that this Template will your Time. Easy
to change colors, photos. You can simply impress your audience and add a unique zing and appeal to your Presentations.
Awesome
Presentation
Your Text Here
I hope and I believe that this
Template will your Time, Money
and Reputation.

Your Text Here


I hope and I believe that this
Template will your Time, Money
and Reputation.

We Create Your Text Here

Quality I hope and I believe that this


Template will your Time, Money
Professional and Reputation.

PPT Presentation
Infographic Style
40% 50% 60% 70%

Contents Contents Contents Contents

Contents A Add Text Add Text Add Text Add Text

Contents B Content Here Content Here Content Here Content Here

Contents C Add Text Add Text Add Text Add Text

Contents D Content Here Content Here Content Here Content Here

Contents E Add Text Add Text Add Text Add Text

Contents F Content Here Content Here Content Here Content Here

Content Here
Get a modern PowerPoint Presentation that is beautifully designed. I hope and I believe that this Template will your Time, Money and Reputation.
Easy to change colors, photos and Text. You can simply impress your audience.
Infographic Style
Text Here Text Here

You can simply impress your audience and add a You can simply impress your audience and add a
unique zing and appeal to your Presentations. unique zing and appeal to your Presentations.

Text Here
Text Here
You can simply impress your audience and add a
You can simply impress your audience and add a unique zing and appeal to your Presentations.
unique zing and appeal to your Presentations.

Text Here
Text Here
You can simply impress your audience and add a
You can simply impress your audience and add a unique zing and appeal to your Presentations.
unique zing and appeal to your Presentations.

Simple PowerPoint Presentation


ALLPPT
Layout
Clean Text
Slide for your
Presentation

AWESOME
PRESENTATION
We Create Quality
Professional PPT Presentation
Infographic Style
Your Text Here
01 You can simply impress your audience and add a unique zing and
appeal to your Presentations.
40% Text Here

Your Text Here


02 You can simply impress your audience and add a unique zing and
appeal to your Presentations.
80% Text Here

Your Text Here


03 You can simply impress your audience and add a unique zing and
appeal to your Presentations.
50% Text Here

Your Text Here


04 You can simply impress your audience and add a unique zing and
appeal to your Presentations.
60% Text Here
Infographic Style

Text Here Text Here Text Here


You can simply impress You can simply impress You can simply impress
your audience and add a your audience and add a your audience and add a
unique zing and appeal to unique zing and appeal to unique zing and appeal to
your Presentations. your Presentations. your Presentations.

Your Text Here Your Text Here Your Text Here


I hope and I believe that this Template will I hope and I believe that this Template will I hope and I believe that this Template will
your Time, Money and Reputation. Get a your Time, Money and Reputation. Get a your Time, Money and Reputation. Get a
modern PowerPoint Presentation that is modern PowerPoint Presentation that is modern PowerPoint Presentation that is
beautifully designed. beautifully designed. beautifully designed.
Infographic Style

Text Here Text Here

You can simply impress your You can simply impress your
audience and add a unique zing audience and add a unique zing
and appeal to your and appeal to your
Presentations. Presentations.

Text Here Text Here

You can simply impress your You can simply impress your
audience and add a unique zing audience and add a unique zing
and appeal to your and appeal to your
Presentations. Presentations.
Infographic Style
Your Text Here
You can simply impress your audience
and add a unique zing and appeal to Your Text Here
your Presentations.
You can simply impress your audience
and add a unique zing and appeal to
your Presentations.

Your Text Here Your Text Here


You can simply impress your audience You can simply impress your audience
and add a unique zing and appeal to and add a unique zing and appeal to
your Presentations. your Presentations.

Your Text Here


You can simply impress your audience
and add a unique zing and appeal to Your Text Here
your Presentations.
You can simply impress your audience
and add a unique zing and appeal to
your Presentations.
LOREM IPSUM DOLOR SIT AMET, CU USU AGAM INTEGRE
IMPEDIT. LOREM IPSUM DOLOR SIT AMET,
You can simply impress your audience and add a unique zing and appeal to your Presentations. I
hope and I believe that this Template will your Time, Money and Reputation. Easy to change colors,
photos and Text. Get a modern PowerPoint Presentation that is beautifully designed. You can
simply impress your audience and add a unique zing and appeal to your Presentations. I hope and I
believe that this Template will your Time, Money and Reputation. Easy to change colors, photos and
Text. Get a modern PowerPoint Presentation that is beautifully designed. You can simply impress
your audience and add a unique zing and appeal to your Presentations. I hope and I believe that this
Template will your Time, Money and Reputation. Easy to change colors, photos and Text. You can
simply impress your audience and add a unique zing and appeal to your Presentations. I hope and I
believe that this Template will your Time, Money and Reputation. Get a modern PowerPoint
Presentation that is beautifully designed. I hope and I believe that this Template will your Time,
Money and Reputation. Easy to change colors, photos and Text.

Get a modern PowerPoint Presentation that is beautifully designed. You can simply impress your
audience and add a unique zing and appeal to your Presentations. I hope and I believe that this

Columns Template will your Time, Money and Reputation.

You can simply impress your audience and add a unique zing and appeal to your Presentations.
Easy to change colors, photos and Text.

Style
Column Style
Contents A Contents B Contents C
Example Text : Get a modern PowerPoint Example Text : Get a modern PowerPoint Example Text : Get a modern PowerPoint
Presentation that is beautifully designed. I Presentation that is beautifully designed. I Presentation that is beautifully designed. I
hope and I believe that this Template will your hope and I believe that this Template will your hope and I believe that this Template will your
Time, Money and Reputation. Easy to change Time, Money and Reputation. Easy to change Time, Money and Reputation. Easy to change
colors, photos and Text. Get a modern colors, photos and Text. Get a modern colors, photos and Text. Get a modern
PowerPoint Presentation that is beautifully PowerPoint Presentation that is beautifully PowerPoint Presentation that is beautifully
designed. I hope and I believe that this designed. I hope and I believe that this designed. I hope and I believe that this
Template will your Time, Money and Template will your Time, Money and Template will your Time, Money and
Reputation. Easy to change colors, photos Reputation. Easy to change colors, photos Reputation. Easy to change colors, photos
and Text. and Text. and Text.

Example Text : Get a modern PowerPoint Example Text : Get a modern PowerPoint Example Text : Get a modern PowerPoint
Presentation that is beautifully designed. I Presentation that is beautifully designed. I Presentation that is beautifully designed. I
hope and I believe that this Template will your hope and I believe that this Template will your hope and I believe that this Template will your
Time, Money and Reputation. Easy to change Time, Money and Reputation. Easy to change Time, Money and Reputation. Easy to change
colors, photos and Text. colors, photos and Text. colors, photos and Text.

Get a modern PowerPoint Presentation that Get a modern PowerPoint Presentation that Get a modern PowerPoint Presentation that
is beautifully designed. I hope and I believe is beautifully designed. I hope and I believe is beautifully designed. I hope and I believe
that this Template will your Time, Money and that this Template will your Time, Money and that this Template will your Time, Money and
Reputation. Get a modern PowerPoint Reputation. Get a modern PowerPoint Reputation. Get a modern PowerPoint
Presentation that is beautifully designed. Presentation that is beautifully designed. Presentation that is beautifully designed.
Fully Editable Shapes
Fully Editable Shapes
Fully Editable Icon Sets: A
You can Resize without
losing quality
You can Change Fill
Color &
Line Color

FREE
PPT
TEMPLATES
[Link]
Fully Editable Icon Sets: B
You can Resize without
losing quality
You can Change Fill
Color &
Line Color

FREE
PPT
TEMPLATES
[Link]
Fully Editable Icon Sets: C
You can Resize without
losing quality
You can Change Fill
Color &
Line Color

FREE
PPT
TEMPLATES
[Link]

You might also like