def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: str				,  __UpperCamelCase					: int			)							->      str:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__    							=   [[] for _ in range(__UpperCamelCase			)]
  SCREAMING_SNAKE_CASE__    							=   key - 1

  if key <= 0:
    raise ValueError("""Height of grid can't be 0 or negative"""			)
  if key == 1 or len(__UpperCamelCase			) <= key:
    return input_string

  for position, character in enumerate(__UpperCamelCase			):
    SCREAMING_SNAKE_CASE__    							=   position % (lowest * 2)  # puts it in bounds
    SCREAMING_SNAKE_CASE__    							=   min(__UpperCamelCase				,  lowest * 2 - num			)  # creates zigzag pattern
    temp_grid[num].append(__UpperCamelCase			)
  SCREAMING_SNAKE_CASE__    							=   ["""""".join(__UpperCamelCase			) for row in temp_grid]
  SCREAMING_SNAKE_CASE__    							=   """""".join(__UpperCamelCase			)

  return output_string



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: str				,  __UpperCamelCase					: int			)							->      str:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__    							=   []
  SCREAMING_SNAKE_CASE__    							=   key - 1

  if key <= 0:
    raise ValueError("""Height of grid can't be 0 or negative"""			)
  if key == 1:
    return input_string

  SCREAMING_SNAKE_CASE__    							=   [[] for _ in range(__UpperCamelCase			)]  # generates template
  for position in range(len(__UpperCamelCase			)			):
    SCREAMING_SNAKE_CASE__    							=   position % (lowest * 2)  # puts it in bounds
    SCREAMING_SNAKE_CASE__    							=   min(__UpperCamelCase				,  lowest * 2 - num			)  # creates zigzag pattern
    temp_grid[num].append("""*"""			)

  SCREAMING_SNAKE_CASE__    							=   0
  for row in temp_grid:  # fills in the characters
    SCREAMING_SNAKE_CASE__    							=   input_string[counter : counter + len(__UpperCamelCase			)]
    grid.append(list(__UpperCamelCase			)			)
    counter += len(__UpperCamelCase			)

  SCREAMING_SNAKE_CASE__    							=   """"""  # reads as zigzag
  for position in range(len(__UpperCamelCase			)			):
    SCREAMING_SNAKE_CASE__    							=   position % (lowest * 2)  # puts it in bounds
    SCREAMING_SNAKE_CASE__    							=   min(__UpperCamelCase				,  lowest * 2 - num			)  # creates zigzag pattern
    output_string += grid[num][0]
    grid[num].pop(0			)
  return output_string



def 			__SCREAMING_SNAKE_CASE						(      __UpperCamelCase					: str			)							->      dict[int, str]:







  """simple docstring"""





  SCREAMING_SNAKE_CASE__    							=   {}
  for key_guess in range(1				,  len(__UpperCamelCase			)			):  # tries every key
    SCREAMING_SNAKE_CASE__    							=   decrypt(__UpperCamelCase				,  __UpperCamelCase			)
  return results


if __name__ == "__main__":
   import doctest

   doctest.testmod()

# coding=utf-8
# Copyright 2020 The HuggingFace Inc. team.
#
# 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.

# this script dumps information about the environment

import os
import sys

import transformers


__lowerCamelCase    :				Tuple							     =	'''3'''

print('''Python version:''', sys.version)
print('''transformers version:''', transformers.__version__)

try:
   import torch

   print('''Torch version:''', torch.__version__)
   print('''Cuda available:''', torch.cuda.is_available())
   print('''Cuda version:''', torch.version.cuda)
   print('''CuDNN version:''', torch.backends.cudnn.version())
   print('''Number of GPUs available:''', torch.cuda.device_count())
   print('''NCCL version:''', torch.cuda.nccl.version())
except ImportError:
   print('''Torch version:''', None)

try:
   import deepspeed

   print('''DeepSpeed version:''', deepspeed.__version__)
except ImportError:
   print('''DeepSpeed version:''', None)

try:
   import tensorflow as tf

   print('''TensorFlow version:''', tf.__version__)
   print('''TF GPUs available:''', bool(tf.config.list_physical_devices('''GPU''')))
   print('''Number of TF GPUs available:''', len(tf.config.list_physical_devices('''GPU''')))
except ImportError:
   print('''TensorFlow version:''', None)
