diff --git a/Week02/.vscode/settings.json b/Week02/.vscode/settings.json new file mode 100644 index 0000000..d9d37f2 --- /dev/null +++ b/Week02/.vscode/settings.json @@ -0,0 +1,6 @@ +{ + "workbench.colorCustomizations": { + "minimap.background": "#00000000", + "scrollbar.shadow": "#00000000" + } +} \ No newline at end of file diff --git a/Week02/__pycache__/data.cpython-313.pyc b/Week02/__pycache__/data.cpython-313.pyc new file mode 100644 index 0000000..69ff3b0 Binary files /dev/null and b/Week02/__pycache__/data.cpython-313.pyc differ diff --git a/Week03/weighted_alihan_esentas.py b/Week03/weighted_alihan_esentas.py new file mode 100644 index 0000000..f2f014d --- /dev/null +++ b/Week03/weighted_alihan_esentas.py @@ -0,0 +1,3 @@ +import random +def weighted_srs(data, n, weights, with_replacement): + return random.choices(data, weights=weights, k=n) if with_replacement==True else random.sample(data, k=n)