Skip to content

Instantly share code, notes, and snippets.

View Ant-28's full-sized avatar

Ananth ("Ant") Srikanth Ant-28

View GitHub Profile
@Ant-28
Ant-28 / deBruijn.hs
Created May 17, 2026 22:43
Really terrible de bruijn index based ULC eval
{- HLINT ignore "Eta reduce" -}
import Prelude
import Data.Set
( Set, singleton, union, difference, insert, empty )
data Lambda =
VarL String |
AbstrL String Lambda |
AppL Lambda Lambda
@Ant-28
Ant-28 / README.md
Last active May 17, 2026 22:48
Grind restoration/illusion in TESIV

Why do this

I had a spell in my inventory but couldn't use it until I was an Apprentice of Restoration. Fortunately, I had Heal Minor Wounds so if you have that equipped, use this script. I recommend the following mod while doing so:

Faster Sleep Wait. I would not want to wait one second just to wait an hour. This does require OBSE.

@Ant-28
Ant-28 / raven.md
Last active April 13, 2025 15:22
Review raven demo

image

image

@Ant-28
Ant-28 / qlsa.diff
Created February 16, 2025 00:30
ORNL Diffs to get Hele-Shaw running
diff --git a/qlsa/func_matrix_vector.py b/qlsa/func_matrix_vector.py
index 56c5b1b..fe14b01 100644
--- a/qlsa/func_matrix_vector.py
+++ b/qlsa/func_matrix_vector.py
@@ -97,15 +97,16 @@ def Hele_Shaw(doc_id, args):
file = open(f'{filename_pressure}', 'rb')
data = pickle.load(file)
file.close()
- filename_pressure = f"{filename_pressure[:-13]}_circ-fullresults_nq{data['NUM_QUBITS']}_backend-{data['args'].backend_method}_shots{data['args'].SHOTS}.pkl"
+ filename_pressure = f"{filename_pressure[:-13]}_circ-fullresults_nq{data['n_qubits_matrix']}_backend-{data['args'].backend_method}_shots{data['args'].SHOTS}.pkl"
@Ant-28
Ant-28 / dummy.md
Last active February 17, 2025 09:48
upload images with jupyter notebooks

image

this is just to wget in an assignment

@Ant-28
Ant-28 / ode.asm
Created December 30, 2024 18:29
ode to joy in RV32 (made this 2 years ago)
.macro play_note(%n, %l, %v, %i)
li a0, %n
li a1, %l
li a2, %i
li a3, %v
li a7 ,33
ecall
.end_macro
@Ant-28
Ant-28 / Makefile
Last active December 30, 2024 17:53
Baby's first x86 program, but in windows
# the windows version of this is absolute hell
# assuming you have NASM and ALINK on PATH (and you should at this point)
ASSEMBLER = nasm
LINKER = alink
KERNEL32 = "C:\Program Files (x86)\Windows Kits\10\lib\10.0.26100.0\um\x86\kernel32.lib"
# these two variables are needed for X64?
# LEGACY_STDIO = "D:\VS2022\IDE\VC\Tools\MSVC\14.42.34433\lib\x86\legacy_stdio_definitions.lib"
# MSVCRT = "D:\VS2022\IDE\VC\Tools\MSVC\14.42.34433\lib\x86\msvcrt.lib"
@Ant-28
Ant-28 / pty.py
Last active December 30, 2024 17:41
A terminal emulator prototype for windows (because enough people have done it on linux)
# A demo of what a rudimentary Windows PTY/terminal emulator might look like in python
# Requires: Windows / WinPTY
# thanks to https://github.com/s5bug for reminding me that inputs need to have newlines
# Low level usage using the raw `PTY` object
from winpty import PTY
import os
import signal
import sys
# Start a new winpty-agent process of size (cols, rows)
cols, rows = os.get_terminal_size()