<commit_before>require "securerandom"
require_relative '../client'
require_relative '../du/du_client'
require_relative '../du/upload_file'
require_relative 'app_version_common'
require_relative 'app_version_ref'
require_relative 'availability'
require_relative 'errors'
require_relative 'iap_subscription_pricing_tier'
require_relative 'pricing_tier'
require_relative 'territory'
require_relative 'user_detail'
module Spaceship
  # rubocop:disable Metrics/ClassLength
  class TunesClient < Spaceship::Client
    # Legacy support
    ITunesConnectError = Tunes::Error
    ITunesConnectTemporaryError = Tunes::TemporaryError
    ITunesConnectPotentialServerError = Tunes::PotentialServerError

    attr_reader :du_client

    def initialize
      super

      @du_client = DUClient.new
    end

    class << self
      # trailer preview screenshots are required to have a specific size
      def video_preview_resolution_for(device, is_portrait)
        resolutions = {
            'iphone4' => [1136, 640],
            'iphone6' => [1334, 750],
            'iphone6Plus' => [2208, 1242],
            'iphone58' => [2436, 1125],
            'iphone65' => [2688, 1242],
            'ipad' => [1024, 768],
            'ipad105' => [2224, 1668],
            'ipadPro' => [2732, 2048],
            'iPadPro11' => [2388, 1668],
            'iPadPro129' => [2732, 2048]
        }

        r = resolutions[device]
        r = [r[1], r[0]] if is_portrait<commit_msg>[spaceship] Fix video preview resolution device names (#14817)<commit_after>require "securerandom"
require_relative '../client'
require_relative '../du/du_client'
require_relative '../du/upload_file'
require_relative 'app_version_common'
require_relative 'app_version_ref'
require_relative 'availability'
require_relative 'errors'
require_relative 'iap_subscription_pricing_tier'
require_relative 'pricing_tier'
require_relative 'territory'
require_relative 'user_detail'
module Spaceship
  # rubocop:disable Metrics/ClassLength
  class TunesClient < Spaceship::Client
    # Legacy support
    ITunesConnectError = Tunes::Error
    ITunesConnectTemporaryError = Tunes::TemporaryError
    ITunesConnectPotentialServerError = Tunes::PotentialServerError

    attr_reader :du_client

    def initialize
      super

      @du_client = DUClient.new
    end

    class << self
      # trailer preview screenshots are required to have a specific size
      def video_preview_resolution_for(device, is_portrait)
        resolutions = {
            'iphone4' => [1136, 640],
            'iphone6' => [1334, 750],
            'iphone6Plus' => [2208, 1242],
            'iphone58' => [2436, 1125],
            'iphone65' => [2688, 1242],
            'ipad' => [1024, 768],
            'ipad105' => [2224, 1668],
            'ipadPro' => [2732, 2048],
            'ipadPro11' => [2388, 1668],
            'ipadPro129' => [2732, 2048]
        }

        r = resolutions[device]
        r = [r[1], r[0]] if is_portrait
{'fraction_non_alphanumeric': 0.1077338736913205, 'fraction_numerical': 0.0651806822019588, 'mean_word_length': 3.1484593837535013, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 23, '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': '6879466', 'n_tokens_mistral': 1067, 'n_tokens_neox': 909, 'n_words': 206}