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
BEGIN { FS = "," } | |
NR == 1 { | |
for (i = 0; i < NF; ++i) | |
hdr[i] = $i | |
} | |
NR > 1 { | |
for (i = 0; i < NF; ++i) | |
print "[" i - 1 "]: " hdr[i] " = " $i |
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
#Requires AutoHotkey v2.0 | |
^+F12:: | |
{ | |
run "rundll32.exe shell32.dll Control_RunDLL mmsys.cpl" | |
WinWait "ahk_class #32770" | |
Send "{Down 2}" | |
Send "{Tab 2}{Enter}" | |
WinWait "ahk_class #32770" | |
Sleep 50 | |
Send "^{Tab}^{Tab}" |
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
# Copyright (c) 2023 Derrick W. Turk / terminus, LLC | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in 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
use std::{ | |
io::{self, Read, Seek, SeekFrom, Write}, | |
fs::File, | |
}; | |
use pyo3::{ | |
prelude::{Python, PyObject}, | |
}; | |
pub enum Filey { |
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 std::{ | |
env, | |
error::Error, | |
fs::File, | |
process::ExitCode, | |
}; | |
use plotters::prelude::*; | |
use petra_grid::{Grid, GridData}; |
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
load petra_grid; | |
%% | |
%entry | |
%name header | |
%type Header | |
%offset 0x0#B | |
%entry |
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
# Copyright (c) 2023 Derrick W. Turk / terminus, LLC | |
# Permission is hereby granted, free of charge, to any person obtaining a copy | |
# of this software and associated documentation files (the "Software"), to deal | |
# in the Software without restriction, including without limitation the rights | |
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
# copies of the Software, and to permit persons to whom the Software is | |
# furnished to do so, subject to the following conditions: | |
# The above copyright notice and this permission notice shall be included in 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
#[inline] | |
fn pop_char(s: &str) -> Option<(char, &str)> { | |
let mut chars = s.chars(); | |
chars.next().map(|c| (c, chars.as_str())) | |
} |
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
# Language path: Haskell->Ocaml->Python, mypy typesystem [semantic loss ~31%] | |
# Subject: Zippers as the key insight | |
# what great fun! since mypy ~0.991 (?) we can finally, finally work with | |
# recursive types. this opens up Python to some traditional functional | |
# programming practices with a minimum of bullshit. | |
from typing import NamedTuple, TypeAlias | |
# let's walk amongst the trees for a bit. |
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
function push(q, val) { | |
if (empty(q)) { | |
q["head"] = 0 | |
q["tail"] = 0 | |
q[0] = val | |
} else { | |
q[q["tail"] + 1] = val | |
q["tail"] = q["tail"] + 1 | |
} | |
} |