This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import time | |
import spatial as sp | |
import sounddevice as sd | |
def play(sound, sample_rate=sp.SAMPLE_RATE): | |
"""Helper to play serially""" | |
sd.play(sound) | |
time.sleep(len(sound) / sample_rate) | |
space = sp.space(3) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ==UserScript== | |
// @name Poggers | |
// @desc Replace references to "NFTs" with references to "POGs" | |
// @grant none | |
// @match *://*/* | |
// @version 1.0 | |
// ==/UserScript== | |
var replaceArry = [ | |
[/\bNFT(s)?\b/gi, function(match, plural) { | |
return plural ? "POGs" : "POG" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
This uses the chaos-game algorithm to generate a sierpinski-gasket type pattern, but applies that pattern to wordspace. | |
Each word is a vector (in `-f`ull mode, that's 300 dimensions). Starting with a random position in that space, | |
this randomly moves the tracepoint towards one of your targets, based on the `-l`erp distance. Rinse, repeat. | |
The result is strangely structured, but also grammarless output. | |
You'll need to pip install gensim and numpy | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
A markov-chain based glyph generator. Given sequences of points as a corpus, this will create a markov chain based on those points. | |
Then, by sampling the chain, we can generate entirely new glyphs that weren't in our original dataset. | |
Press "r" to generate a new frame. Press "s" to save the frame to a file (with a random UUID as its name). | |
Requires the PostFx library: https://github.com/cansik/processing-postfx/ | |
*/ | |
import java.util.*; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
boolean save = true //set to false while prototyping | |
int palettes[][] = { | |
{#000000, #00AA00, #AA0000, #AA5500}, | |
{#000000, #55FF55, #FF5555, #FFFF55}, | |
{#000000, #00AAAA, #AA00AA, #AAAAAA}, | |
{#000000, #55FFFF, #FF55FF, #FFFFFF}, | |
{#000000, #00AAAA, #AA0000, #AAAAAA}, | |
{#000000, #55FFFF, #FF5555, #FFFFFF} | |
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Save your Finger.Farm token in ~/.fingerfarm/token | |
# Update your .plan/.project files as you like, then run this | |
# requires `requests` installed, no I'm not bothing with a requriements file | |
import json | |
import requests | |
from pathlib import Path | |
with open(Path.home() / Path(".plan"), "r") as p: | |
plan = p.read() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
float FR = 60; | |
float SPEED = 2; | |
float STEP = 20; | |
float R = 40; | |
float DOT_SIZE = 4; | |
boolean RECORD = false; | |
boolean DRAW_CIRCLES = true; | |
float phase(float x, float y) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sim = builder(15, 3.3, 1) | |
.rule(new RuleStep() { | |
public float f(float x, float y, PhaseField field) { | |
return (x * 1.6 - y * 0.9) * sin(field.dc(x, y)/(width+height)*8*PI) * 0.01 + PI; | |
} | |
}, 1) | |
.rule(new RuleStep() { | |
public float f(float x, float y, PhaseField field) { | |
return pow(x*x+y*y, 0.5); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import ch.bildspur.postfx.builder.*; | |
import ch.bildspur.postfx.pass.*; | |
import ch.bildspur.postfx.*; | |
class Pathicle { | |
public Pathicle(PVector o, float r, float s, float p) { | |
origin = o; | |
phase = p; | |
radius = r; | |
speed = s; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://imgur.com/a/kdwZa38 | |
import ch.bildspur.postfx.builder.*; | |
import ch.bildspur.postfx.pass.*; | |
import ch.bildspur.postfx.*; | |
PostFX fx; | |
final int EMPTY = 0; | |
final int CELL = 1; |
NewerOlder