Skip to content

Instantly share code, notes, and snippets.

View luabida's full-sized avatar
🌙
路安

Luã B. Vacaro luabida

🌙
路安
  • FGV Rio
  • Brazil
  • 19:43 (UTC -03:00)
View GitHub Profile
@luabida
luabida / generic_retangle.rs
Created February 18, 2024 09:48
[rs] Generic Types // Retangle
use std::marker::Copy;
fn main() {
let r1 = Retangle {
width: 50,
height: 30.5,
};
println!("{:?}", r1.get_area())
}
@luabida
luabida / rust_frameworks.md
Created February 19, 2024 01:09
Rust Frameworks

Debugging

  • color_eyre
@luabida
luabida / age.py
Last active May 21, 2024 19:50
Calculate age
from datetime import datetime as dt
calculate_age = (
lambda bd: (
(td := dt.today()) and (td.year - bd.year - ((td.month, td.day) < (bd.month, bd.day)))
))
print(f"{calculate_age(dt(1990, 5, 21))}yo")