<commit_before>#
# Incremental request parser.
#
# Author: <NAME> <<EMAIL>>
#

import urllib
from beng_proxy.translation.protocol import *
import beng_proxy.translation.uri

def _parse_port(address):
    if address[0] == '[':
        i = address.find(']', 1)
        if i < 0 or len(address) <= i + 2 or address[i + 1] != ':':
            return None
        port = address[i + 2:]
    else:
        i = address.find(':')<commit_msg>python: added missing "struct" import<commit_after>#
# Incremental request parser.
#
# Author: <NAME> <<EMAIL>>
#

import struct
import urllib
from beng_proxy.translation.protocol import *
import beng_proxy.translation.uri

def _parse_port(address):
    if address[0] == '[':
        i = address.find(']', 1)
        if i < 0 or len(address) <= i + 2 or address[i + 1] != ':':
            return None
        port = address[i + 2:]
    else:
        i = address.find(':')
{'fraction_non_alphanumeric': 0.15376106194690264, 'fraction_numerical': 0.01327433628318584, 'mean_word_length': 2.786610878661088, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 9, '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': '3506859', 'n_tokens_mistral': 317, 'n_tokens_neox': 300, 'n_words': 83}