<commit_before>import processing.serial.*;
import java.util.*;

Serial myPort;

float[] yValues = new float[10];
int yValuesPointer = 0;
float[] xValues = new float[10];
int xValuesPointer = 0;

float angleX = 0;
float angleY = 0;
float angleZ = 0;

float accelX;
float accelY;
float accelZ;

boolean index = false;

float volume = 100;
float bass = 100;

float yRotationStart = 0;
float xRotationStart = 0;
boolean isRotating = false;

float multiplier = 0.5;
int x = 0;
int middle = 400;

float lastX = middle;
float lastY = middle;
float lastZ = middle;
int lastMiddleFlex = middle;
int middleFlex = middle;

void setup() {
  size(1000, middle*2);
  
  println(Serial.list());
  myPort = new Serial(this, Serial.list()[0], 19200);
  myPort.bufferUntil('\n');
  
  //noFill();
  background(0);
}

void draw() {
  if ( index || x == 0 ) {
    x = 0;
    background(0);
    
    stroke(100);
    for (int i = -20; i < 20; i++) {
      fill(255);
      text(i*100, 5, middle+i*100*multiplier-3);
      strokeWeight(i==0 ? 3 : 1);
      line(0, middle+i*100*multiplier, displayWidth, middle+i*100*multiplier);
      text((i+4)*100, 970, (i+4)*100*multiplier-3);
    }
  }
  
  float xValue = median(xValues);
  float yValue = median(yValues);
  
  fill(40);
  rect(45, 0, 100, 150);
  fill(255,255,255);
  
  text(angleX, 50, 20);
  text(angleY, 50, 40);
  
  fill(255,0,0);
  text(accelX, 50, 60);
  fill(0,255,0);
  text(accelY, 50, 80);
  fill(50,50,255);
  text(accelZ, 50, 100);
  fill(255,255,0);
  text(middleFlex, 50, 120);
  
  stroke(255, 0, 0);
  line(x-1, middle+lastX*multiplier, x, middle+accelX*multiplier);
  stroke(0, 255, 0);
  line(x-1, middle+lastY*multiplier, x, middle+accelY*multiplier);
  stroke(50, 50, 255);
  line(x-1, middle+lastZ*multiplier, x, middle+accelZ*multiplier);
  stroke(255, 255, 0);<commit_msg>Labeled the value of each axis in SensorGraph.<commit_after>import processing.serial.*;
import java.util.*;

Serial myPort;

float[] yValues = new float[10];
int yValuesPointer = 0;
float[] xValues = new float[10];
int xValuesPointer = 0;

float angleX = 0;
float angleY = 0;
float angleZ = 0;

float accelX;
float accelY;
float accelZ;

boolean index = false;

float volume = 100;
float bass = 100;

float yRotationStart = 0;
float xRotationStart = 0;
boolean isRotating = false;

float multiplier = 0.5;
int x = 0;
int middle = 400;

float lastX = middle;
float lastY = middle;
float lastZ = middle;
int lastMiddleFlex = middle;
int middleFlex = middle;

void setup() {
  size(1000, middle*2);
  
  println(Serial.list());
  myPort = new Serial(this, Serial.list()[0], 19200);
  myPort.bufferUntil('\n');
  
  //noFill();
  background(0);
}

void draw() {
  if ( index || x == 0 ) {
    x = 0;
    background(0);
    
    stroke(100);
    for (int i = -20; i < 20; i++) {
      fill(255);
      text(i*100, 5, middle+i*100*multiplier-3);
      strokeWeight(i==0 ? 3 : 1);
      line(0, middle+i*100*multiplier, displayWidth, middle+i*100*multiplier);
      text((i+4)*100, 970, (i+4)*100*multiplier-3);
    }
  }
  
  float xValue = median(xValues);
  float yValue = median(yValues);
  
  fill(40);
  rect(45, 0, 100, 150);
  fill(255,255,255);
  
  text(angleX, 50, 20);
  text(angleY, 50, 40);
  
  fill(255,0,0);
  text("X:"+accelX, 50, 60);
  fill(0,255,0);
  text("Y"+accelY, 50, 80);
  fill(50,50,255);
  text("Z"+accelZ, 50, 100);
  fill(255,255,0);
  text(middleFlex, 50, 120);
  
  stroke(255, 0, 0);
  line(x-1, middle+lastX*multiplier, x, middle+accelX*multiplier);
  stroke(0, 255, 0);
  line(x-1, middle+lastY*multiplier, x, middle+accelY*multiplier);
  stroke(50, 50, 255);
  line(x-1, middle+lastZ*multiplier, x, middle+accelZ*multiplier);
  stroke(255, 255, 0);
{'fraction_non_alphanumeric': 0.16945043103448276, 'fraction_numerical': 0.09428879310344827, 'mean_word_length': 3.8033635187580854, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7045447', 'n_tokens_mistral': 1724, 'n_tokens_neox': 1475, 'n_words': 364}