Skip to content

Instantly share code, notes, and snippets.

@paniq
paniq / perfect_spatial_hashing.txt
Last active June 21, 2024 14:56
Perfect Spatial Hashing
# forays into
Perfect Spatial Hashing (Lefebvre & Hoppe)
http://hhoppe.com/perfecthash.pdf
how it works:
There are two parts: a slow encoding step, and a fast decoding step.
Encoding
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Polar Coordinate Montage for Equirectangulars</title>
<script type="text/javascript" src="dat.gui.min.js"></script>
<script id="shader-vs" type="x-shader/x-vertex">
attribute vec3 aPos;
attribute vec2 aTexCoord;
varying vec2 uv;
void main(void) {
@AFAgarap
AFAgarap / autoencoder-pytorch.ipynb
Last active April 28, 2024 12:30
PyTorch implementation of an autoencoder.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@volfegan
volfegan / Basic_metaballs.pde
Created April 19, 2021 22:38
Basic implementations of colour metaballs and meta-diamonds
//Reference
//Coding Train: https://youtu.be/ccYLb7cLB1I
//https://github.com/CodingTrain/website/tree/main/CodingChallenges/CC_028_MetaBalls/Processing/CC_028_MetaBalls
//https://www.gamedev.net/articles/programming/graphics/exploring-metaballs-and-isosurfaces-in-2d-r2556/
Blob[] blobs = new Blob[20];
float min=1;
void setup() {
size(720, 360);
@utamadonny
utamadonny / processinginstall.md
Last active February 8, 2023 10:15
Install Processing in Linux (Ubuntu 20.04 LTS)

1. Download and Extract

go to https://processing.org/ to download linux version

Move the extarct file to /opt

/opt/processing

2. Create symbolic link

sudo su -c “ln -s /opt/processing-3.0.2/processing /usr/local/bin/processing”a
import os
import argparse
from PIL import Image
from diffusers import AutoPipelineForText2Image
import torch
args = None
# Define the models
SDXL_MODEL = "/models/stable-diffusion/sdxl/photoStableXL.safetensors"