<commit_before>package org.peddie.peer_tutoring;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executors;

import net.sourceforge.argparse4j.ArgumentParsers;
import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace;

import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import org.peddie.peer_tutoring.model.Dorm;
import org.peddie.peer_tutoring.model.DutyDay;
import org.peddie.peer_tutoring.model.Query;
import org.peddie.peer_tutoring.model.Result;
import org.peddie.peer_tutoring.model.ScoredTutor;
import org.peddie.peer_tutoring.model.Subject;
import org.peddie.peer_tutoring.model.Tutor;
import org.peddie.peer_tutoring.util.CheatingDatabase;
import org.peddie.peer_tutoring.util.Database;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;

/**
 * @author jiehan
 *
 */
public class PeerTutoringServer {

	private static Database database;
	private static TutorMatcher tutorMatcher;

	public static void main(String[] args) throws IOException {
		// parse cmdline options
		ArgumentParser parser = ArgumentParsers.newArgumentParser("PeerTutoringServer")
				.defaultHelp(true)
				.description("A backend TCP socket server for the Peddie peer tutoring website.");

		parser.addArgument("dbpath").help("directory for datafiles");
		parser.addArgument("-p", "--port").help("TCP port to bind to").setDefault(12130);

		Namespace ns = null;
		try {
			ns = parser.parseArgs(args);
		} catch (ArgumentParserException e) {
			parser.handleError(e);
			System.exit(1);
		}<commit_msg>no we are way more advanced than TCP socket server now<commit_after>package org.peddie.peer_tutoring;

import java.io.IOException;
import java.io.OutputStream;
import java.net.InetSocketAddress;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Collections;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.Executors;

import net.sourceforge.argparse4j.ArgumentParsers;
import net.sourceforge.argparse4j.inf.ArgumentParser;
import net.sourceforge.argparse4j.inf.ArgumentParserException;
import net.sourceforge.argparse4j.inf.Namespace;

import org.apache.http.HttpStatus;
import org.apache.http.NameValuePair;
import org.apache.http.client.utils.URLEncodedUtils;
import org.peddie.peer_tutoring.model.Dorm;
import org.peddie.peer_tutoring.model.DutyDay;
import org.peddie.peer_tutoring.model.Query;
import org.peddie.peer_tutoring.model.Result;
import org.peddie.peer_tutoring.model.ScoredTutor;
import org.peddie.peer_tutoring.model.Subject;
import org.peddie.peer_tutoring.model.Tutor;
import org.peddie.peer_tutoring.util.CheatingDatabase;
import org.peddie.peer_tutoring.util.Database;

import com.google.gson.Gson;
import com.google.gson.JsonArray;
import com.google.gson.JsonObject;
import com.sun.net.httpserver.Headers;
import com.sun.net.httpserver.HttpExchange;
import com.sun.net.httpserver.HttpHandler;
import com.sun.net.httpserver.HttpServer;

/**
 * @author jiehan
 *
 */
public class PeerTutoringServer {

	private static Database database;
	private static TutorMatcher tutorMatcher;

	public static void main(String[] args) throws IOException {
		// parse cmdline options
		ArgumentParser parser = ArgumentParsers.newArgumentParser("PeerTutoringServer")
				.defaultHelp(true)
				.description("A backend HTTP server for the Peddie peer tutoring website.");

		parser.addArgument("dbpath").help("directory for datafiles");
		parser.addArgument("-p", "--port").help("TCP port to bind to").setDefault(12130);

		Namespace ns = null;
		try {
			ns = parser.parseArgs(args);
		} catch (ArgumentParserException e) {
			parser.handleError(e);
			System.exit(1);
		}
{'fraction_non_alphanumeric': 0.1109837193304288, 'fraction_numerical': 0.004586104104563174, 'mean_word_length': 5.569277108433735, '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': '6015882', 'n_tokens_mistral': 1476, 'n_tokens_neox': 1406, 'n_words': 269}