Skip to content

Instantly share code, notes, and snippets.

View st-tran's full-sized avatar
🤯

Steven Tran st-tran

🤯
View GitHub Profile
@st-tran
st-tran / clock.py
Created August 28, 2020 23:26
Clock page replacement algorithm simulator that mimics an exercise in CSC369 (UofT)
import sys
if __name__ == "__main__":
iterations = 0
CLOCK_HAND = 0
FRAMES = int(input("Enter the number of frames in memory/TLB: "))
MEM = [["empty", 0] for i in range(FRAMES)]
print("Now, enter the reference trace (page references). "
"Exit with EOF or empty line (CRLF or LF)")
@st-tran
st-tran / tex.snippets
Last active August 28, 2020 23:18
UltiSnips snippets
###############################################################################
# UltiSnips snippets for me to type LaTeX quickly
# Borrows a handful of snippets from https://castel.dev/post/lecture-notes-1/
#
# Mainly tailored to my own typing style and workflow.
# In particular:
# - I often work in temporary scratchpad windows using i3wm and have
# bindsym commands to quickly open vim+zathura with vimtex. 'tbmath' and
# its variants use my steven.sty file with various QoL improvements and
# wrappers for nice typesetting.