kvebers / Python_Piscine

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

42Python_Piscine

This is in preperation to the Porsche Hackathon

Notes

Day00

Day00 ex00

Each of the datatypes are definied in decleration of the variable not by the define of the variable, set dose not have any particular order tuple is const variable list lift is a list and dict corresponds is similar as C++ map

Day00 ex01

install comand for fancyer librarys python 3.10 -m pip install time
defult start time of time is 1970, 01, 01 or time 0 f can be used for form

Day00 ex02

Command [in] is amazing example line: elif printable in ["list", "tuple", "set", "dict"]:
printable[0].upper() + printable[1:]
the [1:] would acces the rest of the elements of the array in this case
Importint your functions from other file happens like this [from NULL_not_found import NULL_not_found]

Day00 ex03 the same thing as previous execerise

Day00 ex04

Input comprehension from argv

Day00 ex05

2 diffrent types of input taking

Day00 ex06

Creates a new list of elements that corespond to the function data Iteration trought the list of args, manipulation with this args with preselected functions lambda

Day00 ex07

So not all data types you can opperate in similar manner, but is is super easy go from 1 data type to another in this case from the dict or map to the string

Day00 ex08

Recreated the ft_tqdm, static variables in context of C and yield return for updates

Day00 ex09

Too Boring to Do

Day01

Day01 ex00

Modification of the data types and selection of specific data

Day01 ex01

Removal of certain type of data from the data set

Day01 ex02

Transfering image to a array of data

Day01 ex03

Zooming in the image, croping image and resizing

Day01 ex04

Rotation of the image

Day01 ex05

Editing the color values of the image, we acces the array of the images and we modif the values in this array

[:, :, 0] = 0 this indicates if we want to select rows, colums or arrays

Day02 ex00

Just an import function from the panda library why panda is awesome, it is not complaing about the data set beeing wack, meanwhile np and list of list have diffrent problems, such as np complains about data set list of list is hard to display on the grap

Day02 ex01

Just a simple graph with plotting the data set

Day02 ex02

Same excerise with more countries

Day02 ex03

need to merge 2 datasets to find overlays and then to merge it

Day03 ex00

Make the basic class with abstract value called Character Make a class Startk inheriting from the character

Day03 ex01

Make Lannister class and Baratheon class that inherits from the Character

Day03 ex02

2 approaches dirrectly call and constructor or call and super() that specifies that you should use the function from the base inheritence class

Day03 ex03

Just a simple calculator

Day03 ex04

Simple calculator with extra steps