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
""" | |
This is a simple script to calculate the maximum possible time that | |
a github.com/btc-raspberrypiclub/jeopardy game should take, using the | |
given variables. | |
""" | |
def input_default(prompt: str, default: int) -> int: | |
""" | |
Get input from the user, appending | |
f" ({default}): " to the given prompt. |
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
# Make sure that the `/etc/netplan` folder is not accessable by users other than root | |
# e.g. `chmod 660 -R /etc/netplan` | |
network: | |
version: 2 | |
renderer: NetworkManager # You can also use `networkd` | |
ethernets: | |
enp0s3: # It is possible that you will need to change this. Run `ip address show` to list your network interfaces | |
dhcp4: no | |
addresses: [192.168.0.100/24] # Set your own static IP(s) here (using CIDR notation) |
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
use std::io; | |
use ndarray::{self, arr2, Array2, Array1}; | |
fn main() { | |
let cell_empty: char = '-'; | |
let stdin = io::stdin(); | |
let mut grid = arr2(&[ | |
[cell_empty, cell_empty, cell_empty], | |
[cell_empty, cell_empty, cell_empty], |