Compare commits

...

10 Commits

Author SHA1 Message Date
TheOldestBrother 32b3a80b24
Merge 7c0a72d710 into 9c9adb1c88 2024-09-06 10:08:53 +01:00
oumaimafisaoui 9c9adb1c88 Fix(Pipeline): Fix irradiat attribute values 2024-09-05 14:49:00 +01:00
oumaimafisaoui 00813d29e9 Fix(Pipeline): fix formatting 2024-09-05 14:49:00 +01:00
oumaimafisaoui fe5f82edcf Fix(Pipeline): fix datafile data info and example do not match 2024-09-05 14:49:00 +01:00
Harry f26da6368e
feat(template): question / potential-issue 2024-09-04 19:53:01 +01:00
Harry 4a8287754d
chore(template): change bug emoji 2024-09-04 19:36:24 +01:00
theoldestbrother 7c0a72d710 fixing a formating issue 2024-08-02 16:47:29 +02:00
theoldestbrother be2160ac3b Changing the explanation of the nb_games variable so it is more understandable as a few student struggle to understand what the intended use was for it 2024-07-25 16:20:29 +02:00
theoldestbrother 2e0b2d0a29 Specifying the function input type to avoid a simple mistake 2024-07-25 15:48:46 +02:00
theoldestbrother 92456ced19 Adding a reminder of what a prime is 2024-07-25 15:17:38 +02:00
9 changed files with 75 additions and 30 deletions

View File

@ -1,8 +1,8 @@
---
name: 🐛 Bug report
name: 🐞 Bug report
about: Create a report to help us improve
title: "[BUG] "
labels: "🐛 bug"
labels: "🐞 bug"
assignees: ""
---

View File

@ -0,0 +1,26 @@
---
name: 🙋 Question / Potential Issue
about: Ask a question or report a potential issue that isn't clearly a bug or a feature request
title: "[QUESTION] "
labels: "🙋 question"
assignees: ""
---
**Describe your question or potential issue**
A clear and concise description of your question or the potential issue you have encountered.
**Context & Use Case**
Provide the context or the scenario in which this question or issue arises. Explain why this is important to understand or address.
**Steps taken**
List any steps you have taken to try and resolve the issue or answer the question:
1. Checked the documentation/readme...
2. Tried to reproduce the issue...
3. Searched for similar questions...
**Attachments**
If applicable, add any screenshots, logs, or additional information that could help explain your question or potential issue.
**Additional context**
Add any other details or context that might be relevant, including links to related issues or documentation.

View File

@ -241,8 +241,10 @@ breast: One Hot
breast-quad: One Hot
['right_low' 'left_low' 'left_up' 'central' 'right_up']
irradiat: One Hot
['yes' 'no']
Class: Target (One Hot)
['recurrence-events' 'no-recurrence-events']
```
@ -259,16 +261,16 @@ input: ohe.transform(X_test[ohe_cols])[:10]
output:
array([[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0.],
[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0.],
[0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1.],
[0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1.],
[1., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0.],
[1., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0.],
[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.],
[0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 1.]])
[1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1.],
[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0.]])
input: ohe.get_feature_names(ohe_cols)
input: ohe.get_feature_names_out(ohe_cols)
output:
array(['node-caps_no', 'node-caps_yes', 'breast_left', 'breast_right',
'breast-quad_central', 'breast-quad_left_low',

View File

@ -146,14 +146,14 @@ dtype: int64
array([[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0.],
[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0.],
[0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1.],
[0., 1., 1., 0., 0., 1., 0., 0., 0., 0., 1.],
[1., 0., 1., 0., 0., 0., 1., 0., 0., 1., 0.],
[1., 0., 1., 0., 0., 0., 0., 1., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 0., 0., 1., 1., 0.],
[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0.],
[1., 0., 0., 1., 0., 0., 1., 0., 0., 1., 0.],
[0., 1., 1., 0., 0., 0., 1., 0., 0., 0., 1.]])
[1., 0., 1., 0., 0., 0., 0., 1., 0., 0., 1.],
[1., 0., 0., 1., 0., 1., 0., 0., 0., 1., 0.]])
```
@ -162,16 +162,16 @@ array([[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0.],
```console
#First 10 rows:
array([[1., 2., 5., 0., 1.],
[1., 3., 4., 0., 1.],
[1., 2., 4., 0., 1.],
[1., 3., 2., 0., 1.],
[1., 4., 3., 0., 1.],
[1., 4., 5., 0., 0.],
[2., 5., 4., 0., 1.],
[2., 5., 8., 0., 1.],
[0., 2., 3., 0., 2.],
[1., 3., 6., 4., 2.]])
array([[2., 5., 2., 0., 1.],
[2., 5., 2., 0., 0.],
[2., 5., 4., 5., 2.],
[1., 4., 5., 1., 1.],
[2., 5., 5., 0., 2.],
[1., 2., 1., 0., 1.],
[1., 2., 8., 0., 1.],
[2., 5., 2., 0., 0.],
[2., 5., 5., 0., 2.],
[1., 2., 3., 0., 0.]])
```
@ -180,8 +180,8 @@ array([[1., 2., 5., 0., 1.],
```console
# First 2 rows:
array([[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 2., 5., 0., 1.],
[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 1., 3., 4., 0., 1.]])
array([[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 2., 5., 2., 0., 1.],
[1., 0., 1., 0., 0., 1., 0., 0., 0., 1., 0., 2., 5., 2., 0., 0.]])
```
---

View File

@ -14,7 +14,10 @@ You will implement some **CRUD** functionality for a game session. You will need
- `delete`: which takes ownership of the boxed game session and returns a string: `"game deleted: id -> 0"`, where `0` is the id of the `GameSession`.
> If `nb_games` is 5, then it is "best out of 5", and no more than 5 games can be played. If some player has a score of 3, then the game session is also finished. This is because there is an insufficient number of remaining games for the trailing player to catch up.
> Examples for `nb_games`:
>
> `nb_games` = **5** --> the maximum of games will be **5** and if some player has a score of 3, the game is finished (not enough games for the other player to win).\
> `nb_games` = **11** --> the maximum of games will be **11** and if some player has a score of 6, the game is finished (not enough games for the other player to win).
### Expected Functions

View File

@ -6,6 +6,9 @@ Create a **function** which returns the first prime number which is greater than
The function must be optimized, so as to avoid time-outs.
> [!TIP]
> As a reminder, a `prime number` is a whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1.
> We consider that only positive numbers can be prime numbers.
### Expected function

View File

@ -6,6 +6,11 @@ Create a **function** which returns the first prime number which is less than or
If there are no smaller primes, the function should return `0`.
> [!TIP]
> As a reminder, a `prime number` is a whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1.
> We consider that only positive numbers can be prime numbers.
### Expected function
```rust

View File

@ -8,6 +8,11 @@ The result will be `None` if the argument is less or equal one, otherwise it wil
If the `u32` is prime, the function will return an`Ok(u32)`. For any other case it will return an `enum` `PrimeErr`.
The `enum` `PrimeErr` will be `Even` if the number is a multiple of two or `Divider(u32)` where the `u32` is the smallest divider of the number.
> [!TIP]
> As a reminder, a `prime number` is a whole number greater than 1 that cannot be exactly divided by any whole number other than itself and 1.
> We consider that only positive numbers can be prime numbers.
> Your solution should be optimized to a certain degree.
### Expected Function and structure

View File

@ -4,7 +4,7 @@
Lets play a little.
Create a function named `score` that given a string, computes the score for that given string as a `u64`.
Create a function named `score` that given a `&str`, computes the score for that given string as a `u64`.
Each letter has a value, you just have to sum the values of the letters in the given string.
@ -21,6 +21,7 @@ You will need these:
| Q, Z | 10 |
### Expected functions
> You'll need to work out the function signature for yourself.
### Usage