<commit_before># Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Download files over HTTPS.

> Resource Requirements

  * resources/ca_certs.crt
      A certificate file containing permitted root certs for SSL validation.

"""

from __future__ import absolute_import
from __future__ import print_function

import hashlib
import logging
import os
import re
import socket
import ssl
import subprocess
import sys
import tempfile
import time

from six.moves import urllib

CHUNK_BYTE_SIZE = 65536


def Transform(string, build_info):
  """Transforms abbreviated file names to absolute file paths.

  Short name support:
    #: A reference to the active release branch location.
    @: A reference to the binary storage root.

  Args:
    string: The configuration string to be transformed.
    build_info: the current build information

  Returns:
    The adjusted file name string to be used in the manifest.
  """
  if '#' in string:
    string = string.replace('#', '%s/' % PathCompile(build_info))<commit_msg>Fixing flags import in download library.<commit_after># Copyright 2016 Google Inc. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#    http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Download files over HTTPS.

> Resource Requirements

  * resources/ca_certs.crt
      A certificate file containing permitted root certs for SSL validation.

"""

from __future__ import absolute_import
from __future__ import print_function

import hashlib
import logging
import os
import re
import socket
import ssl
import subprocess
import sys
import tempfile
import time

from absl import flags
from six.moves import urllib

CHUNK_BYTE_SIZE = 65536

FLAGS = flags.FLAGS


def Transform(string, build_info):
  """Transforms abbreviated file names to absolute file paths.

  Short name support:
    #: A reference to the active release branch location.
    @: A reference to the binary storage root.

  Args:
    string: The configuration string to be transformed.
    build_info: the current build information

  Returns:
    The adjusted file name string to be used in the manifest.
  """
  if '#' in string:
    string = string.replace('#', '%s/' % PathCompile(build_info))
{'fraction_non_alphanumeric': 0.06306871666143708, 'fraction_numerical': 0.00815814245371823, 'mean_word_length': 4.092651757188499, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 3, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6238480', 'n_tokens_mistral': 856, 'n_tokens_neox': 815, 'n_words': 406}