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
const GROWTH_RATE: f64 = 3.9666; | |
const GENERATIONS: usize = 2000; | |
const STARTING_POPULATION: f64 = 0.975; | |
fn main() { | |
let mut data: Vec<(usize, f64)> = Vec::with_capacity(GENERATIONS); | |
println!("Initial Population: {STARTING_POPULATION}"); | |
data.push((0, STARTING_POPULATION as f64)); | |
for i in 1..=GENERATIONS { |
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
const device_pins = [ | |
AnalogPin.P0, | |
AnalogPin.P1, | |
AnalogPin.P2, | |
AnalogPin.P3, | |
AnalogPin.P4, | |
AnalogPin.P5, | |
AnalogPin.P6, | |
AnalogPin.P7, | |
AnalogPin.P8, |
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
module FireworkPrelude where | |
import Data.Int | |
import Data.Int (Int64) | |
import Data.String | |
type I32 = Int | |
type I64 = Int64 | |
data FireworkEnv = FireworkEnv |
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
Compiling llvm-test v0.1.0 (C:\Users\jimos\llvm-test) | |
warning: unused imports: `InitializationConfig`, `Target` | |
--> src\main.rs:5:24 | |
| | |
5 | use inkwell::targets::{InitializationConfig, Target}; | |
| ^^^^^^^^^^^^^^^^^^^^ ^^^^^^ | |
| | |
= note: `#[warn(unused_imports)]` on by default | |
error: linking with `link.exe` failed: exit code: 1120 |
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
const E2 = 82.41; | |
const A2 = 110.00; | |
const D3 = 146.83; | |
const G3 = 196.00; | |
const B3 = 246.94; | |
const E4 = 329.63; | |
input.onButtonPressed(Button.A, () => { | |
midi.playTone(E2, music.beat(BeatFraction.Whole)) | |
}) |
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
pavlos in ~ λ apt list | grep -i zsh | |
WARNING: apt does not have a stable CLI interface. Use with caution in scripts. | |
fizsh/focal 1.0.9-1 all | |
zsh-antigen/focal 2.2.3-2 all | |
zsh-autosuggestions/focal 0.6.4-1 all | |
zsh-common/focal,now 5.8-3ubuntu1 all [installed,automatic] | |
zsh-dev/focal 5.8-3ubuntu1 amd64 | |
zsh-doc/focal 5.8-3ubuntu1 all |
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
DISM /Online /Cleanup-Image /RestoreHealth | |
sfc /scannow | |
DISM /Online /Cleanup-Image /ScanHealth | |
DISM /Online /Cleanup-Image /CheckHealth | |
DISM /Online /Cleanup-Image /RestoreHealth | |
sfc /scannow |
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 rand; | |
use rand::distributions::{Distribution, Uniform}; | |
fn rand_string(amount: u32) -> String { | |
let mut rng = rand::thread_rng(); | |
let random = Uniform::from(30..=800); | |
(1..=amount).map(|_| char::from_u32(random.sample(&mut rng)).unwrap()).collect::<String>() | |
} | |
fn main() { | |
for _ in 1..=100 { |
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
fn main() { | |
println!("{}", rgb_to_hex(171, 205, 239)); | |
} | |
fn rgb_to_hex(r: u8, g: u8, b: u8) -> String { | |
let mut hex: String = "".into(); | |
let rgb_colors: [u8; 3] = [r, g, b]; | |
for color in rgb_colors.iter() { |
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
@import url(https://fonts.googleapis.com/css2?family=Fira+Code:wght@600); | |
body { | |
background: url(https://csshint.com/wp-content/uploads/2020/01/CSS-Animated-Backgrounds-2.gif); | |
font-family: "Fira Code", monospace !important; /* Fira Code didn't work because it had single quotes 'Fira Code' and my Browser made it this "'Fira Code'" */ | |
color: #f9f9f9; | |
cursor: auto; | |
cursor: url(https://i.ibb.co/CMswZdQ/cursor.png), auto; /*https://i.ibb.co/30FCBDJ/3058-256x256x32.png*/ | |
zoom: 1.04; | |
-moz-transform: scale(1.04); |
NewerOlder