This file contains hidden or 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
conda create -n textgen python=3.10.9 | |
conda activate textgen | |
install pytorch: pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu117 | |
git clone https://github.com/oobabooga/text-generation-webui | |
cd text-generation-webui | |
pip install -r requirements.txt | |
python server.py | |
# download model | |
# refresh model list | |
# load model |
This file contains hidden or 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
// what is the position on a circumference? | |
// given a radius of 'radius' | |
// need to make relative to the object when touched | |
// eg: (x, y) = (12 * sin(115.toRadian), 12 * cos(115.toRadian)) | |
float xPosOnradius = radius * Mathf.Sin(degree * Mathf.Deg2Rad) + transform.position.x; | |
float zPosOnradius = radius * Mathf.Cos(degree * Mathf.Deg2Rad) + transform.position.z; | |
float yPos = this.transform.position.y; |
This file contains hidden or 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
int rot = 0; | |
void setup(){ | |
size(500,500); | |
} | |
void draw(){ | |
background(255); | |
pushMatrix(); | |
rot = rot + 5; | |
translate(100,100); |
This file contains hidden or 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
int xPos = 0; | |
int speed = 4; | |
void setup(){ | |
size(300,300); | |
} | |
void draw(){ | |
background(150,150,150); |
This file contains hidden or 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
//tests if mouse button is pressed and where the mouse is on the screen | |
//changes background color accordingly | |
void setup(){ | |
size(500,500); | |
background(255,0,0); | |
} | |
void draw(){ | |
//top left quater of screen && mouse pressed |
This file contains hidden or 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 ddf.minim.*; | |
Minim minim; | |
AudioSample skid; | |
void setup() | |
{ | |
size(512, 200); | |
minim = new Minim(this); |
This file contains hidden or 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
void setup() { | |
size(500, 500); | |
background(255, 0, 0); | |
} | |
void draw() { | |
background(255, 0, 0); | |
fill(0, 0, 255); | |
ellipse(250, 250, 50, 50); | |
color myColor = get(mouseX, mouseY); |
This file contains hidden or 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
void setup(){ | |
size(500,500); | |
} | |
void draw(){ | |
//draw a drop at 120, 120 size 8 | |
drawRaindrop(120,120,8); | |
} | |
//draw raindrop x = x position, y = y positiom, size = size |
This file contains hidden or 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
// attach this script to the OVRCameraController prefabs parent object | |
// add a rigid body to the OVRCameraController prefabs parent object | |
// turn gavity off on the rigidbody | |
// !! requires purchase of Uniduino from the asset store; | |
using UnityEngine; | |
using System.Collections; | |
using Uniduino; |
This file contains hidden or 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
int x = 100; | |
int y = 100; | |
color circleColour = color(0,0,0); | |
void setup(){ | |
size(200,200); | |
noStroke(); | |
} |
NewerOlder