/images/avatar.png

Yu-Kai "Steven" Wang

ML E|

THM Lazy Admin Writeup

Today we are going to be doing this CTF challenge on THM: Lazy Admin.

I thought since I haven’t update the blog in a while, might as well make a blog post documenting the steps I did.

Disclaimer
I am no hacker, but my good friend Sean who’s a cybersecurity master did dragged me into his security club during college so here we go :P

For this challenge I’ll be using my Kali linux VM on my macbook running VMWare Fusion, since I don’t want to trash my laptop with useless files. It is actually a pain installing VMWare Fusion with Kali on a Mac, maybe I’ll make a post in the future.

Is The Monty Hall Problem True?

You are presented with three doors, and there is a prize hidden behind only one of the doors. You chose door A, but before you can open the door, the host opens door B to show you that there is nothing behind it. Now you are given to chance to choose between sticking with your original plan (door A) or switching to door C.

What should you do?

It’s been a while since I last heard of The Monty Hall Problem until I came across Zack D. Film’s video while scrolling through YouTube Shorts a few days ago, and I thought it would be fun to prove this empirically with some good old Monte Carlo simulation.

Train an AI Agent to play Mountain Car with Reinforcement Learning

A few weeks ago I was chatting with a friend who is just getting into reinforcement learning. He asked me for some resources to help him learn better, so naturally I pointed him to the classic RL playground Gymnasium (formerly known as OpenAI Gym), which I had a lot of fun solving when I first started learning.

This also reminded me of how rusty I am with the Reinforcement Learning techniques, so I thought about challenging myself to complete these puzzles once again.

Connect with Home Server Remotely via Tailscale

For the past few months, I’ve been building a home NAS for my family, mainly to store the terabytes of photos we have lying around in different hard drives all over the place. I’ve always wanted a place to store/backup all my university and work-related files too, and setting up this home server solved all my needs.

However, while everything works fine when I’m under the same local network, it would be nice if I have access to my network drives when I’m outside at work, and even better when I can backup my photos while I’m on vacation somewhere else.

Get Structured Output with Function Calling from Google's Gemini

The other day I was working on generating a synthetic dataset using an LLM to evaluate another model that my company is currently developing. The workflow involves asking the LLM to read an article and extract some useful keywords from what it reads. I was using Google’s Gemini 1.0 Pro for the task and it understood the question fairly well, the only problem left is to find a way to format the model’s response in a structured way (like a JSON) for the response to be used later.

Smart Directory Navigation with PowerShell Script

Sometimes I find myself having to navigate between multiple projects. And since my main working laptop is on Windows, naturally I tried to customize my command line tool (I use PowerShell because WSL is just way too slow) to jump between directories faster. My folder organization looks something like this:

home
├───Desktop
│   │   file011.txt
│   │   file012.txt
│   │
│   └───projects
│       ├───project1
│       │   │   file011.txt
│       │   │   ...
│       │
│       ├───project2
│       │   │   file011.txt
│       │   │   ...
│       │
│       ├───project3
│       │   │   file011.txt
│       │   │   ...
│       │
│       │   ...
│   ...  

My goal is to be able to easily switch between project folders (in the terminal), no matter where my current directory points to. For example, I could be under /Downloads, and want to switch to /Desktop/projects/project3. Instead of scratching my head trying to type out the entire absolute or relative path, I thought I could use the help of some custom PowerShell script.