<commit_before>/**
 ******************************************************************************
 * Xenia : Xbox 360 Emulator Research Project                                 *
 ******************************************************************************
 * Copyright 2013 <NAME>. All rights reserved.                             *
 * Released under the BSD license - see LICENSE in the root for more details. *
 ******************************************************************************
 */

#include <gflags/gflags.h>
#include "poly/main.h"
#include "xenia/emulator.h"
#include "xenia/kernel/kernel.h"
#include "xenia/ui/main_window.h"

DEFINE_string(target, "", "Specifies the target .xex or .iso to execute.");

namespace xe {

int xenia_main(std::vector<std::wstring>& args) {
  Profiler::Initialize();
  Profiler::ThreadEnter("main");

  // Create the emulator.
  auto emulator = std::make_unique<Emulator>(L"");
  X_STATUS result = emulator->Setup();
  if (XFAILED(result)) {
    XELOGE("Failed to setup emulator: %.8X", result);
    return 1;
  }

  // Grab path from the flag or unnamed argument.
  if (FLAGS_target.size() && args.size() >= 2) {
    std::wstring path;
    if (FLAGS_target.size()) {
      // Passed as a named argument.
      // TODO(benvanik): find something better than gflags that supports
      // unicode.
      path = poly::to_wstring(FLAGS_target);
    } else {
      // Passed as an unnamed argument.
      path = args[1];
    }
    // Normalize the path and make absolute.
    std::wstring abs_path = poly::to_absolute_path(path);
<commit_msg>Minor usage fix<commit_after>/**
 ******************************************************************************
 * Xenia : Xbox 360 Emulator Research Project                                 *
 ******************************************************************************
 * Copyright 2013 <NAME>. All rights reserved.                             *
 * Released under the BSD license - see LICENSE in the root for more details. *
 ******************************************************************************
 */

#include <gflags/gflags.h>
#include "poly/main.h"
#include "xenia/emulator.h"
#include "xenia/kernel/kernel.h"
#include "xenia/ui/main_window.h"

DEFINE_string(target, "", "Specifies the target .xex or .iso to execute.");

namespace xe {

int xenia_main(std::vector<std::wstring>& args) {
  Profiler::Initialize();
  Profiler::ThreadEnter("main");

  // Create the emulator.
  auto emulator = std::make_unique<Emulator>(L"");
  X_STATUS result = emulator->Setup();
  if (XFAILED(result)) {
    XELOGE("Failed to setup emulator: %.8X", result);
    return 1;
  }

  // Grab path from the flag or unnamed argument.
  if (FLAGS_target.size() || args.size() >= 2) {
    std::wstring path;
    if (FLAGS_target.size()) {
      // Passed as a named argument.
      // TODO(benvanik): find something better than gflags that supports
      // unicode.
      path = poly::to_wstring(FLAGS_target);
    } else {
      // Passed as an unnamed argument.
      path = args[1];
    }
    // Normalize the path and make absolute.
    std::wstring abs_path = poly::to_absolute_path(path);

{'fraction_non_alphanumeric': 0.26149968494013864, 'fraction_numerical': 0.006931316950220542, 'mean_word_length': 3.3793103448275863, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 15, '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': '3708177', 'n_tokens_mistral': 920, 'n_tokens_neox': 867, 'n_words': 242}