<commit_before>package extras.urlparsers;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

import javax.imageio.ImageIO;

public class FileParser {
	public static String find(URLConnection urlc){
		double bytes = (double)urlc.getContentLengthLong();
		double kilobytes = (bytes / 1024);
		double megabytes = (kilobytes / 1024);
		double gigabytes = (megabytes / 1024);
		double terabytes = (gigabytes / 1024);
		double petabytes = (terabytes / 1024);
		double exabytes = (petabytes / 1024);
		double zettabytes = (exabytes / 1024);
		double yottabytes = (zettabytes / 1024);
		
		String filesize = "";
		if(bytes < 1000){
			filesize = String.format("%db ", Math.round(bytes));
		}
		else if(kilobytes < 1000){
			filesize = String.format("%dKb ", Math.round(kilobytes));
		}
		else if(megabytes < 1000){
			filesize = String.format("%dMb ", Math.round(megabytes));
		}
		else if(gigabytes < 1000){
			filesize = String.format("%dGb ", Math.round(gigabytes));
		}
		else if(terabytes < 1000){
			filesize = String.format("%dTb ", Math.round(terabytes));
		}
		else if(petabytes < 1000){
			filesize = String.format("%dPb ", Math.round(petabytes));
		}
		else if(exabytes < 1000){
			filesize = String.format("%dEb ", Math.round(exabytes));
		}
		else if(zettabytes < 1000){
			filesize = String.format("%dZb ", Math.round(zettabytes));
		}
		else if(yottabytes < 1000){
			filesize = String.format("%dYb ", Math.round(yottabytes));
		}
		String type = "" + urlc.getContentType() + "";
		if(urlc.getContentType().startsWith("image")){
			try{
				BufferedImage image = ImageIO.read(urlc.getURL());
				type += " (" + image.getWidth() + " x " + image.getHeight() + ")";
			} catch(IOException e){}
		}
		if(urlc.getContentType().startsWith("application")){
			type = "application";
		}
		String title = String.format("File Type: %s size: %s", type, filesize);
		return title;
	}
}<commit_msg>fix spelling<commit_after>package extras.urlparsers;

import java.awt.image.BufferedImage;
import java.io.IOException;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;

import javax.imageio.ImageIO;

public class FileParser {
	public static String find(URLConnection urlc){
		double bytes = (double)urlc.getContentLengthLong();
		double kilobytes = (bytes / 1024);
		double megabytes = (kilobytes / 1024);
		double gigabytes = (megabytes / 1024);
		double terabytes = (gigabytes / 1024);
		double petabytes = (terabytes / 1024);
		double exabytes = (petabytes / 1024);
		double zettabytes = (exabytes / 1024);
		double yottabytes = (zettabytes / 1024);
		
		String filesize = "";
		if(bytes < 1000){
			filesize = String.format("%dB ", Math.round(bytes));
		}
		else if(kilobytes < 1000){
			filesize = String.format("%dKB ", Math.round(kilobytes));
		}
		else if(megabytes < 1000){
			filesize = String.format("%dMB ", Math.round(megabytes));
		}
		else if(gigabytes < 1000){
			filesize = String.format("%dGB ", Math.round(gigabytes));
		}
		else if(terabytes < 1000){
			filesize = String.format("%dTB ", Math.round(terabytes));
		}
		else if(petabytes < 1000){
			filesize = String.format("%dPB ", Math.round(petabytes));
		}
		else if(exabytes < 1000){
			filesize = String.format("%dEB ", Math.round(exabytes));
		}
		else if(zettabytes < 1000){
			filesize = String.format("%dZB ", Math.round(zettabytes));
		}
		else if(yottabytes < 1000){
			filesize = String.format("%dYB ", Math.round(yottabytes));
		}
		String type = "" + urlc.getContentType() + "";
		if(urlc.getContentType().startsWith("image")){
			try{
				BufferedImage image = ImageIO.read(urlc.getURL());
				type += " (" + image.getWidth() + " x " + image.getHeight() + ")";
			} catch(IOException e){}
		}
		if(urlc.getContentType().startsWith("application")){
			type = "application";
		}
		String title = String.format("File Type: %s size: %s", type, filesize);
		return title;
	}
}
{'fraction_non_alphanumeric': 0.1644654871667082, 'fraction_numerical': 0.03388985796162472, 'mean_word_length': 4.119897959183674, 'pattern_counts': {'":': 0, '<': 21, '<?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': '1862604', 'n_tokens_mistral': 1702, 'n_tokens_neox': 1418, 'n_words': 281}