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
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;
[{"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);
@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;
#genshin puzzle solver
def solve(state):
chain = []
for lim in range(15):
for i in range(len(state)):
#print(i)
res = solve_(state.copy(), i+1, chain.copy(), lim)
if res != None:
return res
@Nekodigi
Nekodigi / index.html
Last active February 17, 2022 05:12
Simple websie for school assignment
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<title>Document</title>
</head>
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.