Skip to content

Instantly share code, notes, and snippets.

View cosmojg's full-sized avatar
:electron:
Overthinking

Cosmo cosmojg

:electron:
Overthinking
View GitHub Profile
big dump inc, sorry. this is so i can link to people asking about rwkv. know that this is not intended to be comprehensive, just simply a breakdown on how i use RWKV. first is a bit about what it is and why i like it, plus things to look out for. then how to install + setup, including my personal setup for reference, as well as how to view your stats for it.
What RWKV is and why use it
Note that this whole thing pertains to RWKV-Instant. I don't use, nor can I speak on, anything regarding using Curve only. I highly recommend Instant, which is why I'm writing this. For the rest of this, if I say RWKV I'm talking about RWKV-Instant.
RWKV is a neural network that vastly outperforms FSRS at predicting Retrievability for basically any person. Because its a neural network it is functionally a black box and for the most part is a waste of time trying to make sense what is doing. I will emphasize again here, it knows things you don't (and can't), so seriously try not to mind every little thing it does with your dues
@karpathy
karpathy / microgpt.py
Last active November 22, 2026 18:52
microgpt
"""
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
@jwakely
jwakely / README.md
Created February 7, 2026 18:10
Apache configuration for Poison Fountain

To enable Poison Fountain for Apache on RHEL/CentOS, copy the poison_fountain.conf file in this gist to /etc/httpd/conf.d/poison_fountain.conf (if you've already configured mod_proxy then omit the two LoadModule lines).

Then tell SELinux that apache is allowed to make outbound http requests by running:

setsebool -P httpd_can_network_connect on

Then restart apache:

@dlford
dlford / README.md
Last active March 30, 2026 00:55
Poison Fountain setup

Ref: https://rnsaffn.com/poison3/

Functions are set up for Netlify, but should work with some refactoring on other platforms.

  1. pf function, this function serves up poisoned data to anyone that visits (/.netlify/functions/pf)
    import type { Handler } from '@netlify/functions';
    
    const URL = 'https://RNSAFFN.com/poison2/';
@VictorTaelin
VictorTaelin / interaction_calculus.prompt
Last active March 7, 2025 02:49
Interaction Calculus .prompt
# The Interaction Calculus
The Interaction Calculus (IC) is term rewritting system inspired by the Lambda
Calculus (λC), but with some major differences:
1. Vars are affine: they can only occur up to one time.
2. Vars are global: they can occur anywhere in the program.
3. There is a new core primitive: the superposition.
An IC term is defined by the following grammar:
@netixc
netixc / main.py
Last active July 19, 2025 16:48
chatbot ollama/tts kokoro/stt speaches
import pyaudio
import wave
import time
import warnings
from openai import OpenAI
import json
import sys
import io
import numpy
import requests
@willccbb
willccbb / grpo_demo.py
Last active October 5, 2026 19:58
GRPO Llama-1B
# train_grpo.py
#
# See https://github.com/willccbb/verifiers for ongoing developments
#
"""
citation:
@misc{brown2025grpodemo,
title={Granular Format Rewards for Eliciting Mathematical Reasoning Capabilities in Small Language Models},
author={Brown, William},
@hackermondev
hackermondev / research.md
Last active November 15, 2026 13:48
Unique 0-click deanonymization attack targeting Signal, Discord and hundreds of platform

hi, i'm daniel. i'm a 15-year-old high school junior. in my free time, i hack billion dollar companies and build cool stuff.

3 months ago, I discovered a unique 0-click deanonymization attack that allows an attacker to grab the location of any target within a 250 mile radius. With a vulnerable app installed on a target's phone (or as a background application on their laptop), an attacker can send a malicious payload and deanonymize you within seconds--and you wouldn't even know.

I'm publishing this writeup and research as a warning, especially for journalists, activists, and hackers, about this type of undetectable attack. Hundreds of applications are vulnerable, including some of the most popular apps in the world: Signal, Discord, Twitter/X, and others. Here's how it works:

Cloudflare

By the numbers, Cloudflare is easily the most popular CDN on the market. It beats out competitors such as Sucuri, Amazon CloudFront, Akamai, and Fastly. In 2019, a major Cloudflare outage k

@deepfates
deepfates / convert_oai_to_sharegpt.py
Created November 17, 2024 20:26
Convert a fine-tuning dataset from OpenAI format to ShareGPT format
import json
import argparse
def convert_oai_to_sharegpt(input_file: str, output_file: str):
with open(input_file, 'r') as infile, open(output_file, 'w') as outfile:
for line in infile:
conversation = json.loads(line)
# Skip system messages
for message in conversation["messages"]:
if message.get("role") == "system":
@deepfates
deepfates / convert_archive.py
Created November 17, 2024 19:33
Convert your twitter archive into a training dataset and markdown files
import argparse
import json
import logging
import os
import re
import shutil
from concurrent.futures import ProcessPoolExecutor, as_completed
from dataclasses import dataclass
from datetime import datetime
from typing import Any, Callable, Dict, List, Literal, Optional, Tuple