<commit_before>#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

import asyncio
from enum import Enum
from io import StringIO
from abc import ABCMeta

from typing import List, NamedTuple, Optional, Set, Union, Dict, Tuple, AsyncIterator

LoggingMetadata = Dict[str, Optional[Union[str, List[str], int, float]]]


class Address(NamedTuple):
    host: str
    grpc_port: int
    port: Optional[int] = None


class AppProcessState(Enum):
    UNKNOWN = 0
    NOT_RUNNING = 1
    RUNNING = 2


class InstalledAppInfo(NamedTuple):
    bundle_id: str
    name: str
    architectures: Set[str]
    install_type: str
    process_state: AppProcessState
    debuggable: bool


class HIDButtonType(Enum):
    APPLE_PAY = 1
    HOME = 2
    LOCK = 3
    SIDE_BUTTON = 4
    SIRI = 5


ConnectionDestination = Union[str, Address]


class CompanionInfo(NamedTuple):
    udid: str
    host: str
    port: int
    is_local: bool
    grpc_port: Optional[int]


class ScreenDimensions(NamedTuple):
    width: int
    height: int
    density: Optional[float]
    width_points: Optional[int]
    height_points: Optional[int]<commit_msg>Make grpc port non-optional<commit_after>#!/usr/bin/env python3
# Copyright (c) Facebook, Inc. and its affiliates. All Rights Reserved.

import asyncio
from enum import Enum
from io import StringIO
from abc import ABCMeta

from typing import List, NamedTuple, Optional, Set, Union, Dict, Tuple, AsyncIterator

LoggingMetadata = Dict[str, Optional[Union[str, List[str], int, float]]]


class Address(NamedTuple):
    host: str
    grpc_port: int
    port: Optional[int] = None


class AppProcessState(Enum):
    UNKNOWN = 0
    NOT_RUNNING = 1
    RUNNING = 2


class InstalledAppInfo(NamedTuple):
    bundle_id: str
    name: str
    architectures: Set[str]
    install_type: str
    process_state: AppProcessState
    debuggable: bool


class HIDButtonType(Enum):
    APPLE_PAY = 1
    HOME = 2
    LOCK = 3
    SIDE_BUTTON = 4
    SIRI = 5


ConnectionDestination = Union[str, Address]


class CompanionInfo(NamedTuple):
    udid: str
    host: str
    port: int
    is_local: bool
    grpc_port: int


class ScreenDimensions(NamedTuple):
    width: int
    height: int
    density: Optional[float]
    width_points: Optional[int]
    height_points: Optional[int]
{'fraction_non_alphanumeric': 0.08297506448839209, 'fraction_numerical': 0.007738607050730868, 'mean_word_length': 3.5184466019417475, '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': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1159173', 'n_tokens_mistral': 785, 'n_tokens_neox': 754, 'n_words': 228}