mirror of https://github.com/01-edu/public.git
Compare commits
10 Commits
dfd3d7eee9
...
32b3a80b24
Author | SHA1 | Date |
---|---|---|
TheOldestBrother | 32b3a80b24 | |
oumaimafisaoui | 9c9adb1c88 | |
oumaimafisaoui | 00813d29e9 | |
oumaimafisaoui | fe5f82edcf | |
Harry | f26da6368e | |
Harry | 4a8287754d | |
theoldestbrother | 7c0a72d710 | |
theoldestbrother | be2160ac3b | |
theoldestbrother | 2e0b2d0a29 | |
theoldestbrother | 92456ced19 |
|
@ -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: ""
|
||||
---
|
||||
|
||||
|
|
|
@ -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.
|
|
@ -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',
|
||||
|
|
|
@ -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.]])
|
||||
```
|
||||
|
||||
---
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue