Skip to content

Instantly share code, notes, and snippets.

View sbtk44's full-sized avatar

Taka sbtk44

View GitHub Profile
"""
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
@DMontgomery40
DMontgomery40 / CODEX.md
Last active March 16, 2026 13:17
Ralph audit loop: Codex CLI read-only code audit runner

Ralph Audit Agent Instructions (OpenAI Codex)


Safety Notice (Customize)

If this codebase is production, handles money, or touches sensitive data: treat this audit loop as a high-risk operation. Run with least privilege, avoid exporting long-lived credentials in your shell, and keep the agent in read-only mode.


@comoc
comoc / AckermannSteering.cs
Last active September 29, 2024 13:27
Ackermann Steering Geometory for Unity in C#
using UnityEngine;
public class AckermannSteering : MonoBehaviour
{
[SerializeField] private float steeringAngle; // ステアリングの切れ角
[SerializeField] private float tread; // 左右の車輪間の距離 (トレッド)
[SerializeField] private float wheelBase; // 前後の車輪間の距離 (ホイールベース)
public float leftWheelAngle { get; private set; } // 左車輪の角度
public float rightWheelAngle { get; private set; } // 右車輪の角度
//
// Created by Sean Heber on 8/11/22.
//
import Foundation
enum ExponentialBackoffError : Error {
case retryLimitExceeded
}
@yasirkula
yasirkula / IAPManager.cs
Created November 4, 2021 14:35
A wrapper script for Unity IAP (In-App Purchases) that can be used for common IAP tasks
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Purchasing;
using UnityEngine.Purchasing.Security;
public class IAPManager : IStoreListener
{
public enum State { PendingInitialize, Initializing, SuccessfullyInitialized, FailedToInitialize };
@r0mdau
r0mdau / README.md
Last active January 19, 2025 22:05
Rust Actix vs Rust Hyper vs Go fasthttp vs Go net/http httprouter

Load tests

Injector

wrk is the binary used as injector, always used with these options:

./wrk -t12 -c1000 -d15s http://127.0.0.1:8080/

Results

@herohiralal
herohiralal / EdgeDetection.shader
Created June 29, 2021 02:20
URP Sobel Edge Detection
Shader "Universal Render Pipeline/Post-Processing/EdgeDetection"
{
Properties
{
[Toggle(ENABLED)] __enabled("Enabled", Float) = 1
[MainTex] [HideInInspector] _MainTex ("Base Map", 2D) = "white" { }
[MainColor] _Color ("Color", Color) = (1, 1, 1, 1)
_Thickness ("Thickness", Float) = 0
@awunnenb
awunnenb / ContentView.swift
Last active October 14, 2024 23:19
SwiftUI WKWebView and Back- Forward Buttons
// Youtube Video: https://youtu.be/SBvrvJ93gh4
import SwiftUI
import WebKit
struct ContentView: View {
let webView = WebView(request: URLRequest(url: URL(string: "https://www.google.com")!))
var body: some View {
VStack {
@georgealan
georgealan / react-native-android-studio-no-wsl2.md
Last active March 6, 2026 21:43
React Native no Emulador Android Studio com WSL2

REACT-NATIVE PROJECTS RUN IN WSL2 UBUNTU 22.04 WITH BACKEND API

📆 Article written day: 9/03/2020 📆 Article updated day: 6/18/2022

My System Specs:

  • Microsoft Windows 10 Enterprise Version 21H2 (OS Build 19044.1766)
  • WSL2 - Ubuntu 22.04 LTS
  • Android Studio Version: Chipmunk 2021.2.1 Patch 1
@esnya
esnya / WorldNormal.shader
Created July 2, 2020 02:30
Unity用法線可視化シェーダー
// MIT License (c) https://github.com/esnya
Shader "Unlit/WorldNormal"
{
Properties
{
_MainTex ("Texture", 2D) = "white" {}
_BumpMap ("Texture", 2D) = "bump" {}
_BumpScale ("Normal Scale", Range(0, 1)) = 1.0
_MixFactor ("Mix Factor", Range(0, 1)) = 1