import base64
import zlib


def main():
  with open('find_cuda_config.py.oss', 'rb') as f:
    data = f.read()

  compressed = zlib.compress(data)
  b64encoded = base64.b64encode(compressed)

  with open('find_cuda_config.py.gz.base64.oss', 'wb') as f:
    f.write(b64encoded)


if __name__ == '__main__':
  main()


import base64
import zlib


def main():
  with open('find_cuda.py', 'rb') as f:
    data = f.read()

  compressed = zlib.compress(data)
  b64encoded = base64.b64encode(compressed)

  with open('find_cuda.py.gz.base64', 'wb') as f:
    f.write(b64encoded)


if __name__ == '__main__':
  main()


Remove .oss from find_cuda_config in compression script.
Remove .oss from find_cuda_config in compression script.

See https://github.com/tensorflow/tensorflow/pull/40759

PiperOrigin-RevId: 318452377
Change-Id: I04f3ad1c8cf9cac5446d0a1196ebbf66660bf312

  import base64
  import zlib
  
  
  def main():
-   with open('find_cuda_config.py.oss', 'rb') as f:
+   with open('find_cuda.py', 'rb') as f:
      data = f.read()
  
    compressed = zlib.compress(data)
    b64encoded = base64.b64encode(compressed)
  
-   with open('find_cuda_config.py.gz.base64.oss', 'wb') as f:
+   with open('find_cuda.py.gz.base64', 'wb') as f:
      f.write(b64encoded)
  
  
  if __name__ == '__main__':
    main()
  
  
Remove .oss from find_cuda_config in compression script.
## Code Before:
import base64
import zlib


def main():
  with open('find_cuda_config.py.oss', 'rb') as f:
    data = f.read()

  compressed = zlib.compress(data)
  b64encoded = base64.b64encode(compressed)

  with open('find_cuda_config.py.gz.base64.oss', 'wb') as f:
    f.write(b64encoded)


if __name__ == '__main__':
  main()


## Instruction:
Remove .oss from find_cuda_config in compression script.
## Code After:
import base64
import zlib


def main():
  with open('find_cuda.py', 'rb') as f:
    data = f.read()

  compressed = zlib.compress(data)
  b64encoded = base64.b64encode(compressed)

  with open('find_cuda.py.gz.base64', 'wb') as f:
    f.write(b64encoded)


if __name__ == '__main__':
  main()

