mirror of https://github.com/sgoudham/uwuifyy.git
So many faces
parent
9043e2d9a9
commit
27a95fdcc7
@ -0,0 +1 @@
|
||||
According to all known laws of aviation, there is no way a bee should be able to fly.
|
@ -0,0 +1 @@
|
||||
Accowding to aww uWu knyown waws of aviation, thewe i-is nyo way *moans* a bee shouwd be abwe to fwy.
|
@ -1,34 +0,0 @@
|
||||
use std::hash::Hasher;
|
||||
|
||||
use ahash::AHasher;
|
||||
use rand::distributions::uniform::{SampleRange, SampleUniform};
|
||||
use rand::{Rng, RngCore, SeedableRng};
|
||||
use rand_xoshiro::Xoshiro256Plus;
|
||||
|
||||
pub struct UwUSeeder {
|
||||
rng: Xoshiro256Plus,
|
||||
}
|
||||
|
||||
impl UwUSeeder {
|
||||
pub fn new(word: &[u8], random: bool) -> UwUSeeder {
|
||||
let rand_u64 = if !random {
|
||||
let mut hasher = AHasher::new_with_keys(0, 0);
|
||||
hasher.write(word);
|
||||
hasher.finish()
|
||||
} else {
|
||||
rand::rngs::OsRng::default().next_u64()
|
||||
};
|
||||
|
||||
UwUSeeder {
|
||||
rng: Xoshiro256Plus::seed_from_u64(rand_u64),
|
||||
}
|
||||
}
|
||||
|
||||
pub fn random_float(&mut self) -> f64 {
|
||||
self.rng.gen_range(0.0..1.0)
|
||||
}
|
||||
|
||||
pub fn random_int<T: SampleUniform, R: SampleRange<T>>(&mut self, range: R) -> T {
|
||||
self.rng.gen_range(range)
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
From fairest creatures we desire increase,
|
||||
That thereby beauty's rose might never die,
|
||||
But as the riper should by time decease,
|
||||
His tender heir might bear his memory:
|
||||
But thou contracted to thine own bright eyes,
|
||||
Feed'st thy light's flame with self-substantial fuel,
|
||||
Making a famine where abundance lies,
|
||||
Thy self thy foe, to thy sweet self too cruel:
|
||||
Thou that art now the world's fresh ornament,
|
||||
And only herald to the gaudy spring,
|
||||
Within thine own bud buriest thy content,
|
||||
And tender churl mak'st waste in niggarding:
|
||||
Pity the world, or else this glutton be,
|
||||
To eat the world's due, by the grave and thee.
|
Loading…
Reference in New Issue