Skip to content

Instantly share code, notes, and snippets.

View duelafn's full-sized avatar

Dean Serenevy duelafn

View GitHub Profile
@duelafn
duelafn / time.rs
Created December 11, 2020 18:32
Improved time benchmarking command - average multiple runs
use std::process::Command;
use libc;
use clap::{App,Arg,ArgMatches};
fn commify(mut val: i64) -> String {
if val.abs() < 1_000 { return format!("{}", val); }
if val.abs() < 1_000_000 { return format!("{},{:03}", val/1000, val.abs() % 1000); }
let mut vec = Vec::new();
while val > 1000 { vec.push(val % 1000); val /= 1000; }
@duelafn
duelafn / courses-with-progress.png
Last active September 18, 2018 12:40
Tau Station Course Tree
courses-with-progress.png
#!/usr/bin/perl
use strict; use warnings; use 5.010;
use IHeartFortran;# Allow "$foo .EQV. $bar" constructs
say 1 .EQV. 1;
say 1 .EQV. 2;
say 1 .NEQV. 1;
say 1 .NEQV. 2;