This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from typing import Optional, Tuple | |
import torch | |
from torch.utils.data import Dataset, random_split | |
def train_test_split( | |
dataset: Dataset, | |
test_ratio: float, | |
seed: Optional[int] = None, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Pascal's triangle | |
https://en.wikipedia.org/wiki/Pascal%27s_triangle | |
Quentin Deschamps, 2020 | |
*/ | |
#include <iostream> | |
using namespace std; | |
long facto(long n) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Heap's algorithm | |
https://en.wikipedia.org/wiki/Heap%27s_algorithm | |
Quentin Deschamps, 2020 | |
*/ | |
#include <iostream> | |
using namespace std; | |
void print(int array[], int size) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 21 Game - an example in Ruby for Rosetta Code. | |
GOAL = 21 | |
MIN_MOVE = 1 | |
MAX_MOVE = 3 | |
DESCRIPTION = " | |
*** Welcome to the 21 Game! *** | |
21 is a two player game. | |
Each player chooses to add 1, 2 or 3 to a running total. |