Skip to content

Instantly share code, notes, and snippets.

A
AAL
AAP
AAPL
ABBV
ABC
ABT
ACN
ADBE
ADI
import sys
import numpy as np
from PIL import Image
import argparse
import os
def create_autostereogram(pattern_path, depth_map_path, output_path, repeat_width=128):
"""
Generate an autostereogram from a pattern image and a depth map.
@VeryFatBoy
VeryFatBoy / StackOverflow Stats.md
Created February 8, 2025 01:19 — forked from hopeseekr/StackOverflow Stats.md
StackOverflow Dec 2024 stats

Disclaimer: I'm in the Top 1% of StackOverflow contributors with 23,315 rep points.

I asked 1 high-quality question in 2024, and it was closed almost immediately, and I haven't engaged with the site since.

If someone with 20,000+ karma has their nicely-formatted questions closed so quickly, what must the newbies and rank-in-file encounter? This is probably a big reason why it's declining.


@VeryFatBoy
VeryFatBoy / grpo_demo.py
Created January 31, 2025 14:52 — forked from willccbb/grpo_demo.py
GRPO Llama-1B
# train_grpo.py
import re
import torch
from datasets import load_dataset, Dataset
from transformers import AutoTokenizer, AutoModelForCausalLM
from peft import LoraConfig
from trl import GRPOConfig, GRPOTrainer
# Load and prep dataset
CREATE DATABASE IF NOT EXISTS iris_db;
USE iris_db;
CREATE TABLE IF NOT EXISTS iris (
vector VECTOR(4),
species VARCHAR(20)
);
INSERT INTO iris VALUES
@VeryFatBoy
VeryFatBoy / DEFRA AUR Data Downloader.ipynb
Created March 28, 2023 10:50 — forked from psychemedia/DEFRA AUR Data Downloader.ipynb
DEFRA AUR Data Downloader - quick hack for downloading UK air quality data
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
CREATE DATABASE IF NOT EXISTS rcte_demo;
USE rcte_demo;
CREATE TABLE IF NOT EXISTS stations_route (
station_from VARCHAR(22),
station_to VARCHAR(22),
distance NUMERIC(4,2)
);
DROP DATABASE IF EXISTS e_store;
CREATE DATABASE IF NOT EXISTS e_store
DEFAULT CHARACTER SET utf8
DEFAULT COLLATE utf8_general_ci;
USE e_store;
CREATE TABLE brands (
id INT UNSIGNED NOT NULL AUTO_INCREMENT,
CREATE DATABASE iris_db;
USE iris_db;
CREATE TABLE iris (
sepal_length FLOAT,
sepal_width FLOAT,
petal_length FLOAT,
petal_width FLOAT,
species VARCHAR(20)
sepal_length sepal_width petal_length petal_width species
5.1 3.5 1.4 0.2 Iris-setosa
4.9 3 1.4 0.2 Iris-setosa
4.7 3.2 1.3 0.2 Iris-setosa
4.6 3.1 1.5 0.2 Iris-setosa
5 3.6 1.4 0.2 Iris-setosa
5.4 3.9 1.7 0.4 Iris-setosa
4.6 3.4 1.4 0.3 Iris-setosa
5 3.4 1.5 0.2 Iris-setosa
4.4 2.9 1.4 0.2 Iris-setosa