<commit_before>import java.io.IOException;

import com.leapmotion.leap.*;
import com.leapmotion.leap.Gesture.State;

class LeapListener extends Listener {
	
	//Controller initialized
	public void onInit(Controller controller) {
		System.out.println("Initialized");
	}
	
	//Controller connected
	public void onConnect(Controller controller) {
		System.out.println("Connected to motion Sensor");
		
		//Declare Gestures
		controller.enableGesture(Gesture.Type.TYPE_SWIPE);
		controller.enableGesture(Gesture.Type.TYPE_CIRCLE);
		controller.enableGesture(Gesture.Type.TYPE_SCREEN_TAP);
		controller.enableGesture(Gesture.Type.TYPE_KEY_TAP);
	}
	
	//Controller disconnect
	public void onDisconnect(Controller controller) {
		System.out.println("Motion sensor disconnected");
	}
	
	//Controller exit
	public void onExit(Controller controller) {
		System.out.println("Exited");
	}
	
	//Frame method
	public void onFrame(Controller controller) {
		
		Frame frame = controller.frame();
		
		//Frame Data
		/*System.out.println("Frame id: " + frame.id()
							+ ", Timestamp: " + frame.timestamp()
							+ ", Hands: " + frame.hands().count()
							+ ", Fingers: " + frame.fingers().count()
							+ ", Tools: " + frame.tools().count()
							+ ", Gestures: " + frame.gestures().count());
		
		for (Hand hand : frame.hands()) {
			String handType = hand.isLeft() ? "Left Hand" : "Right Hand";
			System.out.println(handType + " " + ", id: " + hand.id()
								+ ", Palm Position: " + hand.palmPosition());
			
			Vector normal = hand.palmNormal();
			Vector direction = hand.direction();
			
			System.out.println("Pitch: " + Math.toDegrees(direction.pitch())
								+ "Roll: " + Math.toDegrees(normal.roll())
								+ " Yaw: " + Math.toDegrees(direction.yaw()));
				
		}*/
		
		for (Finger finger : frame.fingers()) {
			System.out.println("Finger Type: " + finger.type()
								+ "ID: " + finger.id()
								+ "Finger length (mm): " + finger.length()
								+ "Finger width (mm): " + finger.width());
		}
		
	}
}

public class LeapController {

	public static void main(String[] args) {
		LeapListener listener = new LeapListener();
		Controller controller = new Controller();
		
		controller.addListener(listener);
		
		System.out.println("Press enter to quit");
		
		
		try {
			System.in.read();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		controller.removeListener(listener);
		<commit_msg>Add bone type detection<commit_after>import java.io.IOException;

import com.leapmotion.leap.*;
import com.leapmotion.leap.Gesture.State;

class LeapListener extends Listener {
	
	//Controller initialized
	public void onInit(Controller controller) {
		System.out.println("Initialized");
	}
	
	//Controller connected
	public void onConnect(Controller controller) {
		System.out.println("Connected to motion Sensor");
		
		//Declare Gestures
		controller.enableGesture(Gesture.Type.TYPE_SWIPE);
		controller.enableGesture(Gesture.Type.TYPE_CIRCLE);
		controller.enableGesture(Gesture.Type.TYPE_SCREEN_TAP);
		controller.enableGesture(Gesture.Type.TYPE_KEY_TAP);
	}
	
	//Controller disconnect
	public void onDisconnect(Controller controller) {
		System.out.println("Motion sensor disconnected");
	}
	
	//Controller exit
	public void onExit(Controller controller) {
		System.out.println("Exited");
	}
	
	//Frame method
	public void onFrame(Controller controller) {
		
		Frame frame = controller.frame();
		
		//Frame Data
		/*System.out.println("Frame id: " + frame.id()
							+ ", Timestamp: " + frame.timestamp()
							+ ", Hands: " + frame.hands().count()
							+ ", Fingers: " + frame.fingers().count()
							+ ", Tools: " + frame.tools().count()
							+ ", Gestures: " + frame.gestures().count());
		
		for (Hand hand : frame.hands()) {
			String handType = hand.isLeft() ? "Left Hand" : "Right Hand";
			System.out.println(handType + " " + ", id: " + hand.id()
								+ ", Palm Position: " + hand.palmPosition());
			
			Vector normal = hand.palmNormal();
			Vector direction = hand.direction();
			
			System.out.println("Pitch: " + Math.toDegrees(direction.pitch())
								+ "Roll: " + Math.toDegrees(normal.roll())
								+ " Yaw: " + Math.toDegrees(direction.yaw()));
				
		}*/
		
		for (Finger finger : frame.fingers()) {
			System.out.println("//Finger Type: " + finger.type()
								+ "  ID: " + finger.id()
								+ "  Finger length (mm): " + finger.length()
								+ "  Finger width (mm): " + finger.width());
		
		
			for (Bone.Type boneType : Bone.Type.values()) {
				Bone bone = finger.bone(boneType);
				System.out.println("Bone Type: " + bone.type()
									+ " Start: " + bone.prevJoint()
									+ " End: " + bone.nextJoint()
									+ " Direction: " + bone.direction());
				
			}
			
		}
	}
}

public class LeapController {

	public static void main(String[] args) {
		LeapListener listener = new LeapListener();
		Controller controller = new Controller();
		
		controller.addListener(listener);
		
		System.out.println("Press enter to quit");
		
		
		try {
			System.in.read();
		} catch (IOException e) {
			e.printStackTrace();
		}
		
		controller.removeListener(listener);
		
{'fraction_non_alphanumeric': 0.15305127705205693, 'fraction_numerical': 0.0, 'mean_word_length': 3.2222222222222223, 'pattern_counts': {'":': 0, '<': 3, '<?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': '4704079', 'n_tokens_mistral': 1992, 'n_tokens_neox': 1570, 'n_words': 313}