Skip to content

Instantly share code, notes, and snippets.

@emacsway
emacsway / microgpt.py
Created February 13, 2026 16:08 — forked from karpathy/microgpt.py
microgpt
"""
The most atomic way to train and inference 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
@emacsway
emacsway / .env
Created March 27, 2024 23:15 — forked from degitgitagitya/.env
Next JS + Next Auth + Keycloak + AutoRefreshToken
# KEYCLOAK BASE URL
KEYCLOAK_BASE_URL=
# KEYCLOAK CLIENT SECRET
KEYCLOAK_CLIENT_SECRET=
# KEYCLOAK CLIENT ID
KEYCLOAK_CLIENT_ID=
# BASE URL FOR NEXT AUTH
@emacsway
emacsway / readme.md
Created March 18, 2024 17:54 — forked from thomasdarimont/readme.md
kcadm example snippets
/*
* Change Concept Type
*
* Requires jArchi - https://www.archimatetool.com/blog/2018/07/02/jarchi/
*
* Updated from original to prompt for types
*
* Version 1: First release
* Version 2: Error handling
*
@emacsway
emacsway / store.js
Created June 26, 2023 13:09 — forked from idoshamun/store.js
Optimistic Offline-First Apps With Vuex
import Vue from 'vue';
import Vuex from 'vuex';
import cache from './plugins/cache';
import sync from './plugins/sync';
Vue.use(Vuex);
export default new Vuex.Store({
state: {
@emacsway
emacsway / maybe.go
Created May 28, 2020 23:36 — forked from Rubentxu/maybe.go
Implementing the Maybe monad in Golang
package main
import (
"fmt"
"errors"
)
type Maybe interface {
Return(value interface{}) Maybe
Bind(func(interface{}) Maybe) Maybe
@emacsway
emacsway / pqprobe_main.go
Created May 3, 2020 00:51 — forked from lebenasa/pqprobe_main.go
Exploring automatic table fields discovery in Go
// pqprobe probes Postgresql database for given table name and tries to obtain the table's fields.
package main
import (
"fmt"
"log"
"strings"
"github.com/jmoiron/sqlx"
_ "github.com/lib/pq"
@emacsway
emacsway / main.go
Created May 3, 2020 00:18 — forked from cryptix/main.go
using go/ast to find specific function calls and the values of a parameter
package main
import (
"fmt"
"go/ast"
"go/parser"
"go/token"
"log"
)
namespace Sagas
{
using System;
using System.Collections.Generic;
class Program
{
static ActivityHost[] processes;