From 64dcb8fed4366faa084780f4191917b3989a1a7a Mon Sep 17 00:00:00 2001 From: Anthony Wang Date: Sun, 24 Mar 2024 15:00:55 -0500 Subject: Initial commit --- .gitignore | 1 + Cargo.lock | 75 +++ Cargo.toml | 13 + index.html | 1760 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ main.rs | 214 ++++++++ 5 files changed, 2063 insertions(+) create mode 100644 .gitignore create mode 100644 Cargo.lock create mode 100644 Cargo.toml create mode 100644 index.html create mode 100644 main.rs diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..ea8c4bf --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/target diff --git a/Cargo.lock b/Cargo.lock new file mode 100644 index 0000000..1fdb232 --- /dev/null +++ b/Cargo.lock @@ -0,0 +1,75 @@ +# This file is automatically @generated by Cargo. +# It is not intended for manual editing. +version = 3 + +[[package]] +name = "blank" +version = "0.1.0" +dependencies = [ + "rand", +] + +[[package]] +name = "cfg-if" +version = "1.0.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" + +[[package]] +name = "getrandom" +version = "0.2.12" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" +dependencies = [ + "cfg-if", + "libc", + "wasi", +] + +[[package]] +name = "libc" +version = "0.2.153" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" + +[[package]] +name = "ppv-lite86" +version = "0.2.17" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" + +[[package]] +name = "rand" +version = "0.8.5" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" +dependencies = [ + "libc", + "rand_chacha", + "rand_core", +] + +[[package]] +name = "rand_chacha" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" +dependencies = [ + "ppv-lite86", + "rand_core", +] + +[[package]] +name = "rand_core" +version = "0.6.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" +dependencies = [ + "getrandom", +] + +[[package]] +name = "wasi" +version = "0.11.0+wasi-snapshot-preview1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" diff --git a/Cargo.toml b/Cargo.toml new file mode 100644 index 0000000..fb8b584 --- /dev/null +++ b/Cargo.toml @@ -0,0 +1,13 @@ +[package] +name = "blank" +version = "0.1.0" +edition = "2021" + +# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html + +[dependencies] +rand = "0.8.5" + +[[bin]] +name = "blank" +path = "main.rs" diff --git a/index.html b/index.html new file mode 100644 index 0000000..bb1f1c1 --- /dev/null +++ b/index.html @@ -0,0 +1,1760 @@ +
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
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0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
+
0
diff --git a/main.rs b/main.rs new file mode 100644 index 0000000..9d9b5b2 --- /dev/null +++ b/main.rs @@ -0,0 +1,214 @@ +use rand::seq::SliceRandom; +use rand::thread_rng; +use rand::Rng; +use std::collections::HashMap; +use std::fs::File; +use std::io::Write; + +fn main() -> std::io::Result<()> { + let letters = HashMap::from([ + ( + 'A', + "0000000000 +0000110000 +0001001000 +0001001000 +0010000100 +0011111100 +0010000100 +0100000010 +0100000010 +0000000000", + ), + ( + 'D', + "0000000000 +0011110000 +0010001000 +0010000100 +0010000100 +0010000100 +0010000100 +0010001000 +0011110000 +0000000000", + ), + ( + 'F', + "0000000000 +0011111110 +0010000000 +0010000000 +0010000000 +0011111110 +0010000000 +0010000000 +0010000000 +0000000000", + ), + ( + 'H', + "0000000000 +0010000100 +0010000100 +0010000100 +0010000100 +0011111100 +0010000100 +0010000100 +0010000100 +0000000000", + ), + ( + 'I', + "0000000000 +0111111100 +0000100000 +0000100000 +0000100000 +0000100000 +0000100000 +0000100000 +0111111100 +0000000000", + ), + ( + 'L', + "0000000000 +0010000000 +0010000000 +0010000000 +0010000000 +0010000000 +0010000000 +0011111110 +0011111110 +0000000000", + ), + ( + 'O', + "0000000000 +0001111000 +0010000100 +0100000010 +0100000010 +0100000010 +0100000010 +0010000100 +0001111000 +0000000000", + ), + ( + 'P', + "0000000000 +0011111000 +0010000100 +0010000100 +0010000100 +0011111100 +0010000000 +0010000000 +0010000000 +0000000000", + ), + ( + 'R', + "0000000000 +0011110000 +0010001000 +0010000100 +0010001000 +0011110000 +0010100000 +0010010000 +0010001000 +0000000000", + ), + ( + 'S', + "0000000000 +0001111000 +0010000100 +0100000000 +0111000000 +0000111000 +0000000100 +0010000100 +0001111000 +0000000000", + ), + ( + 'Y', + "0000000000 +0110000110 +0110000110 +0010000100 +0001001000 +0000110000 +0000110000 +0000110000 +0000110000 +0000000000", + ), + ( + '0', + "0000000000 +0001111000 +0010000100 +0100000010 +0100000010 +0100000010 +0100000010 +0010000100 +0001111000 +0000000000", + ), + ( + '2', + "0000000000 +0001111000 +0010000100 +0010000010 +0000000100 +0000001000 +0000010000 +0001100000 +0011111110 +0000000000", + ), + ( + '4', + "0000000000 +0000011000 +0000101000 +0001001000 +0010001000 +0100001000 +0111111110 +0000001000 +0000001000 +0000000000", + ), + ]); + let ans = "HAPPYAPRILFOOLSDAY2024"; + let mut file = File::create("index.html")?; + let mut rng = thread_rng(); + for c in ans.chars() { + let letter = letters[&c].chars(); + let mut zeros = letter + .enumerate() + .filter(|(_, c)| matches!(c, '0')) + .map(|(i, _)| i) + .collect::>(); + zeros.shuffle(&mut rng); + for i in zeros { + writeln!( + file, + "
0
", + ((i / 11) as f32 + rng.gen_range(0.1..0.9)) * 50.0, + ((i % 11) as f32 + rng.gen_range(0.1..0.9)) * 50.0 + )?; + } + } + Ok(()) +} -- cgit v1.2.3-70-g09d2