Skip to content

Instantly share code, notes, and snippets.

@d0rc
d0rc / quantum-2d-square-potential.py
Created January 22, 2025 19:36
quantum-2d-square-potential.py
import numpy as np
import matplotlib.pyplot as plt
from matplotlib.animation import FuncAnimation
if __name__ == '__main__':
# Constants and parameters
hbar = 1.0 # Reduced Planck's constant
m = 1.0 # Particle mass
V0 = 1.0 # Barrier height
@d0rc
d0rc / mcts-llm.go
Created October 25, 2024 01:36
searching text space
package main
import (
"math"
"github.com/d0rc/mcts"
"time"
)
// Sequence and other types remain as provided
type Sequence struct {
@d0rc
d0rc / crop-tolerance.go
Created October 11, 2024 19:34
removeBordersWithTolerance...!
func removeBordersWithTolerance(inputPath, outputPath string, tolerance, minBorderWidth int) error {
// Open the input file
file, err := os.Open(inputPath)
if err != nil {
return err
}
defer file.Close()
// Decode the image
img, format, err := image.Decode(file)
@d0rc
d0rc / sampler-batcher-4.py
Created October 1, 2024 03:15
build all tree of possible sequences
import torch
from transformers import AutoTokenizer, AutoModelForCausalLM
import numpy as np
from scipy.special import softmax
from scipy.stats import entropy
from collections import deque
import os
# ANSI color codes
BLUE = "\033[94m"
@d0rc
d0rc / php.go
Created September 25, 2024 02:08
php subset parser / lexer in go
package main
import (
"fmt"
"strconv"
)
// TokenType represents the type of a token
type TokenType int

The Role of GTO Strategies in Poker:

Balancing Strategic Play with Biological Risk-Seeking

Introduction

In the world of poker, players often find themselves navigating a fine line between strategic play based on mathematical models and decisions influenced by biological and emotional factors. While it is tempting to focus on interpersonal dynamics and risk-seeking behavior, research has shown that Game Theory Optimal (GTO) strategies are not dependent on opponent modeling. This essay explores the importance of maintaining a clear distinction between playing poker as a strategic game and engaging in a social learning process driven by biological and emotional factors.

Poker as a Strategic Game

from flask import Flask, request, send_file
import torch
from diffusers import FluxPipeline
from io import BytesIO
import ssl
import os
app = Flask(__name__)
# Initialize the pipeline
package main
import (
"bytes"
"fmt"
"html/template"
"io/ioutil"
"log"
"os"
"path/filepath"
@d0rc
d0rc / sos-id.go
Created September 12, 2024 10:00
package main
import (
"crypto/md5"
"encoding/hex"
"flag"
"fmt"
"io/ioutil"
"path/filepath"
"sort"
**Disclaimer**: This is an incredibly simplified description of the process; some statements may exaggerate or distort certain aspects for illustrative purposes. The mentioned mathematical guarantees might vary in strength, from absolute impossibility to computational complexity, but these simplifications aim to convey the core idea clearly.
Asymmetric Encryption: A clever cryptographic method where you have two keys with distinct roles - one locks (encrypts) data, and the other unlocks (decrypts) it. Think of these keys as numbers linked by special mathematical rules, generated together yet serving different purposes. One key, known as the private key, remains your closely guarded secret; it's used to decrypt your confidential data. On the other hand, the public key is like a lock that many people can use to insert messages but only unlocks with your private key. You safely share this public key far and wide because it doesn't reveal anything about your private key. Anyone wanting to send you a secure messa