<commit_before>import 'package:hetimatorrent/hetimatorrent.dart';
import 'package:args/args.dart';
import 'dart:io';
import 'dart:async';
import 'dart:convert';

Completer c;
main(List<String> args) async {
  String exec = Platform.executable;
  List<String> flags = Platform.executableArguments;
  print("hello ${exec} ${flags} ${args}");

  ArgParser parser = new ArgParser()
    ..addFlag("a", negatable: true, abbr: 'a')
    ..addFlag("b", negatable: false, abbr: 'b')
    ..addOption("c", abbr: 'c');
  ArgResults result = parser.parse(args);
  print("${result.rest} ${result['a']} ${result['b']} ${result['c']}");

  StreamSubscription s = null;
  s = stdin.asBroadcastStream().listen((List<int> v) {
    String line = UTF8.decode(v);
    List<String> lineparts = line.split(new RegExp("[ ]+|\t|\r\n|\r|\n"));
    if (lineparts.length == 0) {
      return;
    }

    String action = lineparts[0];
    List<String> args = [];
    if (lineparts.length > 1) {
      args.addAll(lineparts.sublist(1));
    }
    print(">> action:${action} args:${args}");
    switch(action) {
      case "exit":
        print("..\ngoodbye!!\n..\n");
        exit(0);
        break;
      case "hello":
        print("hello");
        break;
    }
  });
}<commit_msg>start creating hetimaa torrent client server side version<commit_after>import 'package:hetimatorrent/hetimatorrent.dart';
import 'package:hetimanet/hetimanet.dart';
import 'package:hetimanet/hetimanet_dartio.dart';
import 'package:args/args.dart';
import 'dart:io';
import 'dart:async';
import 'dart:convert';

Completer c;
main(List<String> args) async {
  String exec = Platform.executable;
  List<String> flags = Platform.executableArguments;
  print("hello ${exec} ${flags} ${args}");

  ArgParser parser = new ArgParser()
    ..addFlag("a", negatable: true, abbr: 'a')
    ..addFlag("b", negatable: false, abbr: 'b')
    ..addOption("c", abbr: 'c');
  ArgResults result = parser.parse(args);
  print("${result.rest} ${result['a']} ${result['b']} ${result['c']}");

  StreamSubscription s = null;
  TorrentEngine engine = new TorrentEngine(new HetimaSocketBuilderDartIO());
  s = stdin.asBroadcastStream().listen((List<int> v) {
    String line = UTF8.decode(v);
    List<String> lineparts = line.split(new RegExp("[ ]+|\t|\r\n|\r|\n"));
    if (lineparts.length == 0) {
      return;
    }

    String action = lineparts[0];
    List<String> args = [];
    if (lineparts.length > 1) {
      args.addAll(lineparts.sublist(1));
    }
    print(">> action:${action} args:${args}");
    switch (action) {
      case "exit":
        print("..\ngoodbye!!\n..\n");
        exit(0);
        break;
      case "hello":
        print("hello");
        break;
    }
  });
}
{'fraction_non_alphanumeric': 0.19271791099668997, 'fraction_numerical': 0.004413387274733358, 'mean_word_length': 3.5409015025041737, 'pattern_counts': {'":': 4, '<': 13, '<?xml version=': 0, '>': 19, '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': '962945', 'n_tokens_mistral': 956, 'n_tokens_neox': 945, 'n_words': 195}