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 math import comb | |
import sys | |
import random | |
s1, s2, s3, s4 = 10, 11, 12, 13 | |
h = 7 | |
N = s1 + s2 + s3 + s4 | |
def generate_deck(): | |
deck = s1*[1] + s2*[2] + s3*[3] + s4*[4] |
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
let range = 1..5 | |
let rec = {a: 1, b: 2} | |
let table = [[a b]; [1 2] [3 4]] | |
let durations = [1sec 1min] | |
let filesizes = [100b 1kb] | |
print "\n ### avg ###" | |
print ($range | math avg) | |
print ($rec | math avg) | |
print ($table | math avg) |
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
#!/usr/bin/env rust-script | |
//! ```cargo | |
//! [dependencies] | |
//! indicatif="0.17.3" | |
//! ``` | |
use std::env; | |
use std::fs::File; | |
use std::io::{self, BufRead}; // BufRead provides .lines() trait for BufReader | |
use std::path::Path; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file has been truncated, but you can view the full file.
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
. | |
.. | |
........ | |
0 | |
0-0 | |
00 | |
0-0-0 | |
000 | |
0000 |