Skip to content

Instantly share code, notes, and snippets.

View Nekodigi's full-sized avatar

Nekodigi

View GitHub Profile
import time
import numpy as np
import sounddevice as sd
import speech_recognition as sr
print(sd.query_devices()) # Displays all audio devices
patience = 0.1
sample_rate = 44100 # CD-quality sample rate
//based on this site https://github.com/smacke/pressure-softbody
float r = 10;
float grav = 1100;//gravity
float resolution = 30;
float dt = 0.01;
float mouseR = 200;
Softbody softbody;
void setup(){
float boff;
void setup(){
//size(1920, 1080, P3D);
fullScreen(P3D);
perspective(1, float(width)/float(height), 1.0, 60000.0);
}
void draw(){
boff += 0.01;
// Coding Rainbow
// Daniel Shiffman
// http://patreon.com/codingtrain
// Code for: https://youtu.be/JcopTKXt8L8
int leavesCount = 10000;
float pointSize = 10;
float lineWeight = 4;
float max_dist = 100;
float min_dist = 10;
[{"name":"Liyue Battle Theme","type":"composed","bpm":400,"pitch":"C","version":3,"folderId":null,"data":{"isComposed":true,"isComposedVersion":true,"appName":"Genshin"},"breakpoints":[0],"instruments":[{"name":"Lyre","volume":90,"pitch":"","visible":true,"icon":"border","alias":"","muted":false},{"name":"Lyre","volume":90,"pitch":"","visible":true,"icon":"circle","alias":"","muted":false},{"name":"Lyre","volume":90,"pitch":"","visible":true,"icon":"line","alias":"","muted":false}],"columns":[[0,[[9,"1"],[19,"1"]]],[0,[]],[0,[]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[[8,"1"]]],[0,[[9,"1"]]],[0,[[11,"1"]]],[0,[[19,"1"]]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[[8,"1"]]],[0,[[9,"1"]]],[0,[[11,"1"]]],[0,[[19,"1"]]],[0,[[8,"1"]]],[0,[[19,"1"],[9,"1"]]],[0,[]],[0,[]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[[9,"1"]]],[0,[]],[0,[[8,"1"]]],[0,[[9,"1"]]],[0,[[11,"1"]]],[0,[[19,"1"]]
float obstacleD = 250;
float obstacleW = 50;
float obstacleSpeed = 2;
float framePpipe = 200;
float forbiddenArea = 100;
float pulseVelocity = -10;
float g = 0.5;
//snake game
//make with queue
int cellSize = 25;
int wN, hN;//horizontal number of cell, vertical number of cell
ArrayList<PVector> history = new ArrayList<PVector>();//history of snake position
ArrayList<PVector> apples = new ArrayList<PVector>();
PVector dir = new PVector(1, 0);
int speed = 10;
int score = 0;
int diskN = 6;//number of disk
ArrayList<Step> steps = new ArrayList<Step>();
int[][] disks = new int[3][diskN];
int diskW, diskH;
int index = 0;
void setup(){
size(1000, 500);
PImage img;
float r;//kaleidoscope radius
float angle = radians(45);//" angle
float imgAngleOff = 0;//offset angle when uv mapping
void setup(){
size(500, 500, P3D);
r = height/2;
img = loadImage("FujiPD.jpg");
noStroke();textureMode(NORMAL);
@Nekodigi
Nekodigi / Cell.pde
Created May 12, 2022 05:47
MatchThree
class Cell{
int i, j;
float x, y;
int type;
boolean dead;
Cell(int i, int j){
this.type = (int)random(4);
this.i = i;
this.j = j;