title: How to Replace \n, b and single quotes from Raw File from GitHub?
body: <p>I am trying to download file from GitHub(raw file) and then run this file as .sql file. </p>
  
  <pre><code>import snowflake.connector
  from codecs import open
  import logging
  import requests
  from os import getcwd
  import os
  import sys
  
  #logging
  logging.basicConfig(
      filename='C:/Users/abc/Documents/Test.log',
      level=logging.INFO
  )
  
  url = "https://github.com/raw/abc/master/file_name?token=Anvn3lJXDks5ciVaPwA%3D%3D"
  directory = getcwd()
  filename = os.path.join(getcwd(),'VIEWS.SQL')
  r = requests.get(url)
  filename.decode("utf-8")
  
  f = open(filename,'w')
  f.write(str(r.content))
  
  with open(filename,'r') as theFile, open(filename,'w') as outFile:
      data = theFile.read().split('\n')
      data = theFile.read().replace('\n','')
      data = theFile.read().replace("b'","")
      data = theFile.read()
      outFile.write(data)
  </code></pre>
  
  <p>However I get this error </p>
  
  <blockquote>
    <p>syntax error line 1 at position 0 unexpected 'b'</p>
  </blockquote>
  
  <p>My converted sql file has b at the beginning and bunch of newline \n characters in the file. Also the entire output file is in single quotes 'text'. Can anyone help me get rid of these? Looks like replace isn't working.</p>
  
  <p>OS: Windows
  Python Version: 3.7.0</p>