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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: PyKubeGrader
3
- Version: 0.0.7
3
+ Version: 0.0.8
4
4
  Summary: Add a short description here!
5
5
  Home-page: https://github.com/pyscaffold/pyscaffold/
6
6
  Author: jagar2
@@ -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=eOFuZwEIc8NtgZS-Xnc9e49C1i0qYJvwFPyDVy7jq0c,2025
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=cyTWKYRbsGYsYJh6ntW2vPub4r15c8IgcsMFSCG3St4,2121
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
- PyKubeGrader-0.0.7.dist-info/LICENSE.txt,sha256=YTp-Ewc8Kems8PJEE27KnBPFnZSxoWvSg7nnknzPyYw,1546
14
- PyKubeGrader-0.0.7.dist-info/METADATA,sha256=rmUxwQyFpzf0gyMrEMp-jIbE5wkjekRYmied9BACpeQ,2505
15
- PyKubeGrader-0.0.7.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
16
- PyKubeGrader-0.0.7.dist-info/top_level.txt,sha256=e550Klfze6higFxER1V62fnGOcIgiKRbsrl9CC4UdtQ,13
17
- PyKubeGrader-0.0.7.dist-info/RECORD,,
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
@@ -21,7 +21,7 @@ def MCQ(
21
21
  ]
22
22
 
23
23
  radio_buttons = [
24
- pn.widgets.RadioButtonGroup(
24
+ pn.widgets.RadioBoxGroup(
25
25
  options=option,
26
26
  value=value,
27
27
  width=300,
@@ -0,0 +1,5 @@
1
+ # Auto-generated __init__.py
2
+
3
+ from . import hash_seed
4
+
5
+ __all__ = ['hash_seed']
@@ -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
@@ -49,7 +49,7 @@ class SelectQuestion:
49
49
 
50
50
  self.layout = pn.Column(
51
51
  f"# Question {self.question_number}: {title}",
52
- *(pn.Row(desc_widget, dropdown) for desc_widget, dropdown in widget_pairs),
52
+ *(pn.Column(desc_widget, pn.Row(dropdown)) for desc_widget, dropdown in widget_pairs),
53
53
  self.submit_button,
54
54
  )
55
55