From ef696774b05e9e9fd42c8eaa57c62cc903bd461a Mon Sep 17 00:00:00 2001 From: canergundas <230316044@ogr.cbu.edu.tr> Date: Fri, 27 Feb 2026 10:31:09 +0300 Subject: [PATCH 1/6] =?UTF-8?q?Create=20info=5Fcaner=5Fg=C3=BCnda=C5=9F.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- "Week01/info_caner_g\303\274nda\305\237.py" | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 "Week01/info_caner_g\303\274nda\305\237.py" diff --git "a/Week01/info_caner_g\303\274nda\305\237.py" "b/Week01/info_caner_g\303\274nda\305\237.py" new file mode 100644 index 00000000..25f3c08f --- /dev/null +++ "b/Week01/info_caner_g\303\274nda\305\237.py" @@ -0,0 +1,2 @@ +student_id = "230316044" +full_name = "Caner Gündaş" From fcdaf4d67e800c59932fc23a611647562b506d84 Mon Sep 17 00:00:00 2001 From: canergundas <230316044@ogr.cbu.edu.tr> Date: Thu, 12 Mar 2026 20:47:38 +0300 Subject: [PATCH 2/6] =?UTF-8?q?Rename=20info=5Fcaner=5Fg=C3=BCnda=C5=9F.py?= =?UTF-8?q?=20to=20info=5Fcaner=5Fgundas.py?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../info_caner_gundas.py | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename "Week01/info_caner_g\303\274nda\305\237.py" => Week01/info_caner_gundas.py (100%) diff --git "a/Week01/info_caner_g\303\274nda\305\237.py" b/Week01/info_caner_gundas.py similarity index 100% rename from "Week01/info_caner_g\303\274nda\305\237.py" rename to Week01/info_caner_gundas.py From 11dbe701fad720afd69eb6bcb05c17d4f28749f3 Mon Sep 17 00:00:00 2001 From: canergundas <230316044@ogr.cbu.edu.tr> Date: Thu, 12 Mar 2026 20:59:27 +0300 Subject: [PATCH 3/6] Create weighted_caner_gundas.py --- Week02/weighted_caner_gundas.py | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 Week02/weighted_caner_gundas.py diff --git a/Week02/weighted_caner_gundas.py b/Week02/weighted_caner_gundas.py new file mode 100644 index 00000000..e5def804 --- /dev/null +++ b/Week02/weighted_caner_gundas.py @@ -0,0 +1,10 @@ +import random + +def weighted_srs(data, n, weights, with_replacement): + if with_replacement: return random.choices(data, weights=weights, k=n) + res, d, w = [], list(data), list(weights) + for _ in range(n): + idx = random.choices(range(len(d)), weights=w)[0] + res.append(d.pop(idx)) + w.pop(idx) + return res From eec4bb14668a421c851fc316739fcbcf9e5d37a7 Mon Sep 17 00:00:00 2001 From: Bora Canbula Date: Fri, 13 Mar 2026 09:31:29 +0300 Subject: [PATCH 4/6] Add empty line before weighted_srs function --- Week02/weighted_caner_gundas.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Week02/weighted_caner_gundas.py b/Week02/weighted_caner_gundas.py index e5def804..04a9db14 100644 --- a/Week02/weighted_caner_gundas.py +++ b/Week02/weighted_caner_gundas.py @@ -1,5 +1,6 @@ import random + def weighted_srs(data, n, weights, with_replacement): if with_replacement: return random.choices(data, weights=weights, k=n) res, d, w = [], list(data), list(weights) From 6cac6a515a420108dd3729afdcf22e4d5b4db9e3 Mon Sep 17 00:00:00 2001 From: canergundas <230316044@ogr.cbu.edu.tr> Date: Sun, 15 Mar 2026 19:28:08 +0300 Subject: [PATCH 5/6] Update weighted_caner_gundas.py --- Week02/weighted_caner_gundas.py | 1 + 1 file changed, 1 insertion(+) diff --git a/Week02/weighted_caner_gundas.py b/Week02/weighted_caner_gundas.py index 04a9db14..d347ee55 100644 --- a/Week02/weighted_caner_gundas.py +++ b/Week02/weighted_caner_gundas.py @@ -1,6 +1,7 @@ import random + def weighted_srs(data, n, weights, with_replacement): if with_replacement: return random.choices(data, weights=weights, k=n) res, d, w = [], list(data), list(weights) From 280cb0ede96a18b9b68294795ebc37e6fdc7f242 Mon Sep 17 00:00:00 2001 From: canergundas <230316044@ogr.cbu.edu.tr> Date: Sun, 15 Mar 2026 19:31:32 +0300 Subject: [PATCH 6/6] Update weighted_caner_gundas.py