Skip to content

Instantly share code, notes, and snippets.

View sdan's full-sized avatar

Surya Dantuluri sdan

View GitHub Profile
@sdan
sdan / waves.jsx
Last active December 6, 2025 06:10
Gerstner Waves
import React, { useState, useEffect } from 'react';
export default function Tsunami() {
const [t, setT] = useState(0);
useEffect(() => {
const interval = setInterval(() => {
setT(prev => prev + 0.045);
}, 45);
return () => clearInterval(interval);
import React, { useState, useEffect, useRef } from 'react';
export default function BrailleTsunami() {
const [frame, setFrame] = useState('');
const timeRef = useRef(0);
// Braille character encoding - each char is 2x4 dots
// Dot positions: 1 4
// 2 5
// 3 6
================================================================================
GAME SESSION: 2025-11-25T22:16:05.463Z
PROMPT: 3v3 summoners rift training gym. utilize the hotkeys and the minimap. your goal is to aid and help your two teammates, zoom in and use minimap and your hotkeys as much as possible. go
================================================================================
[2025-11-25T22:16:24.945Z] Step 1 | ACTION | Click at (510, 690)
[2025-11-25T22:16:33.653Z] Step 2 | ACTION | Taking screenshot
[2025-11-25T22:16:40.508Z] Step 3 | ACTION | Press ctrl+q
[2025-11-25T22:16:48.835Z] Step 4 | ACTION | Taking screenshot
[2025-11-25T22:16:53.591Z] Step 5 | ACTION | Right-click at (1100, 650)
"""
Minimal DPO (Direct Preference Optimization) Implementation for Ranking
Across a distribution of candidates, when a user picks one, we learn to rank that one more often
Key components:
1. PolicyState: Input features for each candidate item
2. PolicyHead: Neural network that scores candidates
3. PreferenceSample: Records user preference (A preferred over B)
4. DPOTrainer: Implements the DPO loss to update the policy
From: Elon Musk <[MASK]>
To: Greg Brockman <[MASK]>
CC: Sam Altman <[MASK]>
Date: Sun, Nov 22, 2015 at 7:48 PM
Subject: follow up from call
Blog sounds good, assuming adjustments for neutrality vs being YC-centric.
I'd favor positioning the blog to appeal a bit more to the general public -- there is a lot of value to having the public root for us to succeed -- and then having a longer, more detailed and inside-baseball version for recruiting, with a link to it at the end of the general public version.
@sdan
sdan / gist:9fd34bf561e98a798ec3ee55231bfb36
Created April 29, 2023 03:47
Running Chroma on Railway (no permanence)
1. Fork https://github.com/chroma-core/chroma ; for some reason you can't deploy images on Railway
Ensure you add PORT=8000 env var in Railway
2. Client side:
Railway doesn't allow HTTP connections so you'll need to open up SSL connections on the client side like so(for some reason this isn't properly documented):
# Set up ChromaDB client
client = chromadb.Client(Settings(

Keybase proof

I hereby claim:

  • I am sdan on github.
  • I am sdan (https://keybase.io/sdan) on keybase.
  • I have a public key ASCNnyRpRtiqmD03S9pjbggODAOBS4dFZGzajZri0yLWPgo

To claim this, I am signing this object:

#!/bin/sh
set -x
# == Swarm training (alpha release) ==
# Setup:
#
# git clone https://github.com/shawwn/gpt-2
# cd gpt-2
# git checkout dev-shard
@sdan
sdan / Creating a static copy of a dynamic website.md
Created December 30, 2019 10:43 — forked from azizur/Creating a static copy of a dynamic website.md
Creating a static copy of a dynamic website

The command line, in short…

wget -k -K -E -r -l 10 -p -N -F --restrict-file-names=windows -nH http://website.com/

…and the options explained

  • -k : convert links to relative
  • -K : keep an original versions of files without the conversions made by wget
  • -E : rename html files to .html (if they don’t already have an htm(l) extension)
  • -r : recursive… of course we want to make a recursive copy
  • -l 10 : the maximum level of recursion. if you have a really big website you may need to put a higher number, but 10 levels should be enough.

Keybase proof

I hereby claim:

  • I am dantuluri on github.
  • I am dantuluri (https://keybase.io/dantuluri) on keybase.
  • I have a public key ASDDijB9xXBvzuQL_JlDDZ-ERVHZM0dmOYh2cXqgEd8_Awo

To claim this, I am signing this object: