Skip to content

Instantly share code, notes, and snippets.

@ViezeVingertjes
ViezeVingertjes / BruhCipher
Last active September 10, 2019 17:12
BruhCipher Implementation (C#)
public static class BruhCipher {
private static readonly Dictionary<char, string> Map = new Dictionary<char, string> {
{'a', "b"}, {'b', "r"}, {'c', "u"}, {'d', "h"}, {'e', "bb"},
{'f', "rr"}, {'g', "uu"}, {'h', "hh"}, {'i', "bbb"}, {'j', "rrr"},
{'k', "uuu"}, {'l', "hhh"}, {'m', "bbbb"}, {'n', "rrrr"}, {'o', "uuuu"},
{'p', "hhhh"}, {'q', "bbbbb"}, {'r', "rrrrr"}, {'s', "uuuuu"}, {'t', "hhhhh"},
{'u', "bbbbbb"}, {'v', "rrrrrr"}, {'w', "uuuuuu"}, {'x', "hhhhhh"}, {'y', "bbbbbbb"},
{'z', "rrrrrrr"}, {'1', "0"}, {'2', "9"}, {'3', "8"}, {'4', "7"},
{'5', "6"}, {'0', "1"}, {'9', "2"}, {'8', "3"}, {'7', "4"},
{'6', "5"}, {',', ";"}, {';', ","}, {'.', "}"}, {'}', "."},

Keybase proof

I hereby claim:

  • I am viezevingertjes on github.
  • I am viezevingertjes (https://keybase.io/viezevingertjes) on keybase.
  • I have a public key ASCJrUmMPxXpxI6etOpnfirpDzdwvhKz5ejJOVhEUva9oQo

To claim this, I am signing this object:

@ViezeVingertjes
ViezeVingertjes / main.rs
Created June 18, 2019 08:49
Genetic Algoritm in Rust
extern crate rand;
use rand::Rng;
static TARGET_STRING: &str = "It appears Intel is fixing their braindamage.";
const POPULATION_SIZE: usize = 100;
const MUTATION_RATE: f64 = 0.01;
fn main() {
let target: Vec<char> = TARGET_STRING.chars().collect();