PyKubeGrader 0.0.7__py3-none-any.whl → 0.0.8__py3-none-any.whl
Sign up to get free protection for your applications and to get access to all the features.
- {PyKubeGrader-0.0.7.dist-info → PyKubeGrader-0.0.8.dist-info}/METADATA +1 -1
- {PyKubeGrader-0.0.7.dist-info → PyKubeGrader-0.0.8.dist-info}/RECORD +9 -7
- pykubegrader/mc_widget.py +1 -1
- pykubegrader/seed/__init__.py +5 -0
- pykubegrader/seed/hash_seed.py +25 -0
- pykubegrader/select_base.py +1 -1
- {PyKubeGrader-0.0.7.dist-info → PyKubeGrader-0.0.8.dist-info}/LICENSE.txt +0 -0
- {PyKubeGrader-0.0.7.dist-info → PyKubeGrader-0.0.8.dist-info}/WHEEL +0 -0
- {PyKubeGrader-0.0.7.dist-info → PyKubeGrader-0.0.8.dist-info}/top_level.txt +0 -0
@@ -1,17 +1,19 @@
|
|
1
1
|
pykubegrader/__init__.py,sha256=JHme-EVdE2QbS9_Q2qdHiy5bEsyeQDbZ8aP2OfoSyiw,583
|
2
2
|
pykubegrader/info_widget.py,sha256=x73heTqmqJQ9XkaE3eW4eLXTGJlmmTdGEkGtbIcY7uY,3532
|
3
|
-
pykubegrader/mc_widget.py,sha256=
|
3
|
+
pykubegrader/mc_widget.py,sha256=_qmJ4ZvU-KXamS726LqnCgecRg29hDd7w5WOerkLvuA,2022
|
4
4
|
pykubegrader/misc.py,sha256=dKw6SyRYU3DWRgD3xER7wq-C9e1daWPkqr901LpcwiQ,642
|
5
5
|
pykubegrader/multi_select_base.py,sha256=GJQ-xFJTErar94cFwTxsSmLKPPmywJRUQELhAbv-uFs,3102
|
6
6
|
pykubegrader/reading_base.py,sha256=vSoyThl2vFbnbgB_LDc-DDRPWCM2xGbazEptDjNn4uA,5311
|
7
7
|
pykubegrader/reading_widget.py,sha256=e8lXSzGI9dHCxW7fIvwJUU6j8qWQgHnKR06ke2W1k7w,3022
|
8
|
-
pykubegrader/select_base.py,sha256=
|
8
|
+
pykubegrader/select_base.py,sha256=Z-oAsNRBraqx3_T_hkSDq_quwQsZn8d8PRakI-_LUdQ,2132
|
9
9
|
pykubegrader/select_many_widget.py,sha256=Rmb9Es42qzSdPfhU6ypcKnw_30PwuARX2UKVwgwbQhg,3772
|
10
10
|
pykubegrader/telemetry.py,sha256=3GhItJ9dw18XcFutfQEk4z-DllCVtKXCKKLesf_jxzQ,3194
|
11
11
|
pykubegrader/types_widget.py,sha256=FOrnR2x1eNM-pcFNIC8JnQdylgSUSUzuACmiIRuFTbQ,2244
|
12
12
|
pykubegrader/validate.py,sha256=guEj0yeu9A_-Ig6S8diOfaNEWxud3k7t4tI-i4Steak,10585
|
13
|
-
|
14
|
-
|
15
|
-
PyKubeGrader-0.0.
|
16
|
-
PyKubeGrader-0.0.
|
17
|
-
PyKubeGrader-0.0.
|
13
|
+
pykubegrader/seed/__init__.py,sha256=7Tnb4qTHPIKLirU1IJQbiiQ9FBbeGs-H5clpFS0dPEo,79
|
14
|
+
pykubegrader/seed/hash_seed.py,sha256=tTSyYaMqgALZTNqc74IRjGN0Ii6gs4vYtRb9FavkfAM,651
|
15
|
+
PyKubeGrader-0.0.8.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
|
16
|
+
PyKubeGrader-0.0.8.dist-info/METADATA,sha256=xv-9tAM6NhMoAUQ6AUK0Qh6C9f4LpBdg7X2R-T6PLb0,2505
|
17
|
+
PyKubeGrader-0.0.8.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
18
|
+
PyKubeGrader-0.0.8.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
|
19
|
+
PyKubeGrader-0.0.8.dist-info/RECORD,,
|
pykubegrader/mc_widget.py
CHANGED
@@ -0,0 +1,25 @@
|
|
1
|
+
import hashlib
|
2
|
+
|
3
|
+
def hash_to_seed(input_string):
|
4
|
+
"""
|
5
|
+
Hash a string into a small integer seed less than 500.
|
6
|
+
|
7
|
+
Parameters:
|
8
|
+
input_string (str): The string to hash.
|
9
|
+
|
10
|
+
Returns:
|
11
|
+
int: A seed value (0 <= seed < 500).
|
12
|
+
"""
|
13
|
+
# Ensure the input is a string
|
14
|
+
input_string = str(input_string)
|
15
|
+
|
16
|
+
# Create a SHA-256 hash of the string
|
17
|
+
hash_object = hashlib.sha256(input_string.encode())
|
18
|
+
|
19
|
+
# Convert the hash to an integer
|
20
|
+
large_number = int.from_bytes(hash_object.digest(), 'big')
|
21
|
+
|
22
|
+
# Reduce the number to a value less than 500
|
23
|
+
small_seed = large_number % 500
|
24
|
+
|
25
|
+
return small_seed
|
pykubegrader/select_base.py
CHANGED
@@ -49,7 +49,7 @@ class SelectQuestion:
|
|
49
49
|
|
50
50
|
self.layout = pn.Column(
|
51
51
|
f"# Question {self.question_number}: {title}",
|
52
|
-
*(pn.
|
52
|
+
*(pn.Column(desc_widget, pn.Row(dropdown)) for desc_widget, dropdown in widget_pairs),
|
53
53
|
self.submit_button,
|
54
54
|
)
|
55
55
|
|
File without changes
|
File without changes
|
File without changes
|