View audio_gen.py
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 wave | |
import numpy as np | |
import pyaudio | |
p = pyaudio.PyAudio() | |
volume = 0.5 # range [0.0, 1.0] | |
fs = 44100 # sampling rate, Hz, must be integer | |
duration = 2.0 # in seconds, may be float | |
f = 440.0 # sine frequency, Hz, may be float |
View bezier_interpolator.cs
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
using System.Collections.Generic; | |
using UnityEngine; | |
using Vuforia; | |
[ExecuteInEditMode] | |
public class CurveTrackGenerator : MonoBehaviour | |
{ | |
[SerializeField] private Color _color; | |
[SerializeField, Range(1f, 10f)] private float _momentum = 3; |
View parallel_test.py
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
from threading import Thread, Lock | |
from multiprocessing import cpu_count | |
from queue import Queue | |
import math | |
import random | |
lock = Lock() | |
def do_work(name, t): |
View backtest_compare.py
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 requests | |
def generate_ppo(symbol="NEO", short=16, long=18, signal=9, persistence=2): | |
return { | |
"gekkoConfig": { | |
"watch": { | |
"exchange": "binance", | |
"currency": "BTC", | |
"asset": symbol |
View quaternion_functions.shader
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
float4 qmul(float4 q1, float4 q2) | |
{ | |
return float4( | |
q2.xyz * q1.w + q1.xyz * q2.w + cross(q1.xyz, q2.xyz), | |
q1.w * q2.w - dot(q1.xyz, q2.xyz) | |
); | |
} | |
float3 rotate_vector(float4 r, float3 v) { |
View Cloud.shader
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
Shader "ShaderMan/Clouds" | |
{ | |
Properties{ | |
_Color("Sky Color", Color) = (0.6, 0.7, 0.8, 1) | |
_CamPosition("Camera Position", Vector) = (0,0,0,0) | |
_CamRotation("Camera Rotation", Vector) = (0,0,0,0) | |
_Rotation("Camera Rotation", float) = 0 | |
_Iterations("Cloud Iterations", Range(100,750)) = 170 |
View imgconvimg.py
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
from PIL import ImageFilter, Image | |
from math import floor, sqrt, tanh | |
from threading import Thread, Lock | |
from multiprocessing import cpu_count | |
from queue import Queue | |
import time | |
import pygame | |
lock = Lock() | |
q = Queue() |
View threading.cs
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
using System; | |
using System.Collections.Generic; | |
using System.Threading; | |
using UnityEngine; | |
public class TerrainChunk : MonoBehaviour | |
{ | |
private MeshFilter _meshFilter; | |
private MeshCollider _meshColllider; | |
View pixel_sort.py
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 random | |
from PIL import ImageFilter, Image | |
import os | |
def randomize(data, width, height, chunk_count): | |
new_data = [] | |
for i in range(height): | |
chunk = int(width / chunk_count) | |
for j in range(chunk_count): |
View sprite_sheet.py
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
from math import floor | |
from PIL import Image | |
def make_sprite_sheet(folder): | |
files = ["%s/bkfire%04d.png" % (folder, a) for a in range(1, 65)] | |
images = [Image.open(a) for a in files] | |
width, height = images[0].size |
OlderNewer