From a23a1609de4c063a823671fb7079b7d2deb0675e Mon Sep 17 00:00:00 2001 From: Raghuram Subramani Date: Sat, 2 Aug 2025 10:35:20 +0530 Subject: projects: hydrate pages with README and add page structure --- projects/autograd.md | 30 +++++++++++++++- projects/bubbl.md | 20 +++++++++-- projects/chip8emu.md | 22 +++++++++++- projects/msg.md | 95 ++++++++++++++++++++++++++++++++++++++++++++++++- projects/zuk-msm8996.md | 2 ++ 5 files changed, 163 insertions(+), 6 deletions(-) (limited to 'projects') diff --git a/projects/autograd.md b/projects/autograd.md index e382112..e3259d2 100644 --- a/projects/autograd.md +++ b/projects/autograd.md @@ -3,6 +3,34 @@ description = An implementation of autograd / backpropagation. languages = Python url = /projects/autograd template = project.html +link = https://github.com/compromyse/autograd +linklabel = SOURCE --- -# Autograd +All you need to run a simple neural network using autograd is the following code: + +The code defines a data set `X`, expected output (or ground truth) `y`. It then trains the neural network by performing backward propagation (`.backward()`), then applies the calculated gradients through `.optimise()` along with a learning rate of `0.01`. + +```py +from src.nn import MLP +from src.loss import mse + +X = [ + [ 0.0, 1.0, 2.0 ], + [ 2.0, 1.0, 0.0 ], + [ 2.0, 2.0, 2.0 ], + [ 3.0, 3.0, 3.0 ] +] + +y = [ 1.0, -1.0, 1.0, -1.0 ] +n = MLP(3, [ 4, 4, 1 ]) + +for i in range(400): + pred = [ n(x) for x in X ] + loss = mse(y, pred) + loss.zero_grad() + loss.backward() + n.optimise(0.01) + +print(pred) +``` diff --git a/projects/bubbl.md b/projects/bubbl.md index 26b794c..d9d9947 100644 --- a/projects/bubbl.md +++ b/projects/bubbl.md @@ -3,10 +3,24 @@ description = An Operating System for The x86 Architecture. languages = C / C++ / ASM url = /projects/bubbl template = project.html +link = https://github.com/compromyse/bubbl +linklabel = SOURCE --- -# BUBBL +## Building -```py -import time +#### Dependencies: Nix with flakes enabled and (optionally) direnv + +After entering the devshell (with direnv or `nix develop`), + +```sh +mkdir build && cd build +cmake -G Ninja .. +ninja +``` + +## Running + +```sh +ninja run # or run-headless or run-gdb ``` diff --git a/projects/chip8emu.md b/projects/chip8emu.md index df2aaa5..ffe32f4 100644 --- a/projects/chip8emu.md +++ b/projects/chip8emu.md @@ -3,6 +3,26 @@ description = An Emulator/Interpreter for CHIP-8. languages = C++ url = /projects/chip8emu template = project.html +link = https://github.com/compromyse/autograd +linklabel = SOURCE --- -# CHIP8Emu +![image](https://github.com/compromyse/CHIP8Emu/assets/71056504/f87e9e73-f880-4d60-a61b-cdb40791211b) + +## About The Project + +CHIP8Emu is an emulator for the 1977 interpreter CHIP-8 written in C++. It aims to make games designed for the same playable on modern hardware. + +## Compilation & Usage + +For compilation, you need Clang, CMake, GNUMake, and SDL2. With them installed, run the following. +```sh +mkdir build; cd build +cmake .. +make +``` + +Replace `[scale]` with your preferred display scaling, `[delay]` with the your preferred delay, and `[ROM]` with the path to the game you intend to play. +```sh +./chip8emu [scale] [delay] [ROM] +``` diff --git a/projects/msg.md b/projects/msg.md index 0eaeddf..2a8851e 100644 --- a/projects/msg.md +++ b/projects/msg.md @@ -3,6 +3,99 @@ description = An incredibly opinionated, hackable, minimal Static Site Generator languages = C url = /projects/msg template = project.html +link = https://github.com/compromyse/msg +linklabel = SOURCE --- -# MSG +> See https://github.com/compromyse/compromyse.xyz for an example site. + +### Compilation & Usage +```sh +# REQUIREMENTS: CMake, Git, GCC/Clang, GNUMake/Ninja +$ git clone https://github.com/compromyse/msg +$ mkdir build && cd build +$ cmake .. +$ make # or ninja +$ ./msg -h +msg: The Minimal Static Site Generator + +Usage: ./msg [-h] [-w] [-v] [-o ] + -h : Help + -w : Watch working directory for changes + -v : Verbose + -o : Output directory + : Working directory +``` + +### Site Structure +```sh +. +├── assets +│   └── me.webp +├── config.cfg +├── index.html +├── partials +│   ├── footer.html +│   ├── navbar.html +├── projects.html +└── templates + └── base.html +``` + +### Features + +#### Includes - include files from `/partials` + +```html + + + + {{ include "navbar.html" }} + ... + + +``` + +#### Contentfor - define content for templates + +```html + + + + {{ content "head" }} + + + {{ body }} + + + + +{{ contentfor "head" }} +HOME +{{ endcontent }} + +

...

+``` + +#### Eachdo - iterate over resources +```html + +title = XYZ +--- + +

XYZ!

+ + +{{ eachdo projects }} +

{{ put title }}

+{{ endeachdo }} +``` + +#### Template - specify template for page +```html + +template = base_tailwind.html +--- + +

XYZ!

+``` diff --git a/projects/zuk-msm8996.md b/projects/zuk-msm8996.md index 090d304..73fc4c7 100644 --- a/projects/zuk-msm8996.md +++ b/projects/zuk-msm8996.md @@ -3,6 +3,8 @@ description = A port of Android 13 & 14 to the Zuk Z2 PLUS. languages = AOSP / LineageOS url = /projects/zuk-msm8996 template = project.html +link = https://github.com/compromyse/bubbl +linklabel = XDA POST --- # Zuk MSM8996 -- cgit v1.2.3