<commit_before>/**
 *
 * wechaty: Wechat for Bot. and for human who talk to bot/robot
 *
 * Licenst: ISC
 * https://github.com/zixia/wechaty
 *
 */
import { createServer, Socket } from 'net'

import {
  log,
}                   from './config'

export class Doctor {
  constructor() {
    log.verbose('Doctor', 'constructor()')
  }

  /**
   * https://gist.github.com/tedmiston/5935757
   */
  public testTcp(): Promise<boolean> {
    log.verbose('Doctor', 'testTcp()')

    return new Promise<boolean>(async (resolve, reject) => {
      /**<commit_msg>code clean<commit_after>/**
 *
 * wechaty: Wechat for Bot. and for human who talk to bot/robot
 *
 * Licenst: ISC
 * https://github.com/zixia/wechaty
 *
 */
import {
  createServer,
  Socket,
}                   from 'net'

import {
  log,
}                   from './config'

export class Doctor {
  constructor() {
    log.verbose('Doctor', 'constructor()')
  }

  /**
   * https://gist.github.com/tedmiston/5935757
   */
  public testTcp(): Promise<boolean> {
    log.verbose('Doctor', 'testTcp()')

    return new Promise<boolean>(async (resolve, reject) => {
      /**
{'fraction_non_alphanumeric': 0.16429840142095914, 'fraction_numerical': 0.012433392539964476, 'mean_word_length': 2.5664556962025316, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 4, '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': '5724466', 'n_tokens_mistral': 400, 'n_tokens_neox': 377, 'n_words': 83}