Skip to content

Instantly share code, notes, and snippets.

View james-world's full-sized avatar

James World james-world

View GitHub Profile
@tomhawkin
tomhawkin / Program.cs
Created February 13, 2026 18:08
C# port of MicroGPT
// This is a C# port of @karpathy microgpt python script (https://gist.github.com/karpathy/8627fe009c40f57531cb18360106ce95)
// It's the closest I could get using C#.
// Use with caution as it could be wrong, but it does seem to get similar outputs
namespace MicroGpt;
public class Value(double data, Value[]? children = null)
{
private readonly Value[] _children = children ?? [];
private Action _backward = () => { };
"""
The most atomic way to train and run inference for a GPT in pure, dependency-free Python.
This file is the complete algorithm.
Everything else is just efficiency.
@karpathy
"""
import os # os.path.exists
import math # math.log, math.exp
@gaspardpetit
gaspardpetit / plantuml-doc-202503.md
Last active February 13, 2026 09:22
PlantUML (2025.3) Documentation

PlantUML usage guide

Applicable version: this documentation is based on PlantUML 1.2025.3 (June 2025), which introduces new syntaxes (notably CSS-style styling) and removes some legacy commands.

PlantUML is a text‑based language for creating both UML and non‑UML diagrams. Every diagram starts with @start… and ends with @end…. The type of diagram is defined in the start tag (uml, mindmap, nwdiag, etc.). Comments are written with // or /'…'/. The title, header, footer, legend and caption directives are common to all diagrams and add contextual information.

1 General principles

1.1 Start and end tags

@noamtamim
noamtamim / README.md
Last active March 18, 2026 15:44
Markdown with PlantUML

How to use PlantUML with Markdown

PlantUML is a really awesome way to create diagrams by writing code instead of drawing and dragging visual elements. Markdown is a really nice documentation tool.

Here's how I combine the two, to create docs with embedded diagrams.

Step 0: Setup

Get the command-line PlantUML from the download page or your relevant package manager.

@tsaarni
tsaarni / README.md
Last active May 8, 2024 11:42
How to connect to Azure AKS Kubernetes node VM by SSH

How to connect to Azure AKS Kubernetes worker node by SSH

Nodes are not assigned public IP. If you have accessible VM in the same VNET as worker nodes, then you can use that VM as jump host and connect the worker via private IP.

Alternatively public IP can be assigned to a worker node. This readme shows how to do that.

Steps how to attach public IP to a worker node

find out the resource group that AKS created for the node VMs

@sergeyklay
sergeyklay / sed-cheatsheet.md
Last active September 14, 2025 21:03
Sed Cheatsheet

Sed Cheat Sheet

Sed command line options

sed [options] sed-command [input-file]
Option Description Example
@isaacabraham
isaacabraham / idiomaticjsonserialiser.fs
Created September 7, 2014 21:17
This JSON.Net converter handles F# discriminated unions with more "idiomatic" JSON than what is generated by the current version of JSON .NET. Option types and single case DUs are transparently handled, and tuple-style properties are used rather than array notation.
namespace Newtonsoft.Json.Converters
open Microsoft.FSharp.Reflection
open Newtonsoft.Json
open System
type IdiomaticDuConverter() =
inherit JsonConverter()
[<Literal>]
@sergejmueller
sergejmueller / ttf2woff2.md
Last active November 15, 2025 22:07
WOFF 2.0 – Learn more about the next generation Web Font Format and convert TTF to WOFF2