def post_gist(content, description='', filename='file', auth=False):
    post_data = json.dumps({
      "description": description,
      "public": True,
      "files": {
        filename: {
          "content": content
        }
      }
    }).encode('utf-8')

    headers = make_auth_header() if auth else {}
    response = requests.post("https://api.github.com/gists", data=post_data, headers=headers)
    response.raise_for_status()
    response_data = json.loads(response.text)
    return response_data['html_url']
Post some text to a Gist, and return the URL.
dataset/ETHPy150Open arokem/python-matlab-bridge/tools/gh_api.py/post_gist