From a6aeeb1e6a8c008fafb45bdb15e2b11f090f10de Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recep=20G=C3=B6ktu=C4=9F=20Avc=C4=B1?= Date: Wed, 8 Apr 2026 23:10:33 +0300 Subject: [PATCH 1/2] Week01_by_recepgoktugavci --- Week01/info_recepgoktug_avci.py | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 Week01/info_recepgoktug_avci.py diff --git a/Week01/info_recepgoktug_avci.py b/Week01/info_recepgoktug_avci.py new file mode 100644 index 00000000..39097443 --- /dev/null +++ b/Week01/info_recepgoktug_avci.py @@ -0,0 +1,3 @@ + +student_id = "220316021" +full_name = "Recep Göktuğ Avcı" From e776a7e0876db40beebc456b76682120495efb4c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Recep=20G=C3=B6ktu=C4=9F=20Avc=C4=B1?= Date: Wed, 8 Apr 2026 23:11:11 +0300 Subject: [PATCH 2/2] Create weighted_recepgoktug_avci.py --- Week02/weighted_recepgoktug_avci.py | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 Week02/weighted_recepgoktug_avci.py diff --git a/Week02/weighted_recepgoktug_avci.py b/Week02/weighted_recepgoktug_avci.py new file mode 100644 index 00000000..5d89c981 --- /dev/null +++ b/Week02/weighted_recepgoktug_avci.py @@ -0,0 +1,6 @@ +import random +def weighted_srs(data, n, weights, with_replacement = False): + if with_replacement: + return random.choices(data, k = n, weights = weights) + else: + return random.sample(data, n, counts = weights)