def create_file(repo, path, message, content):
    """Create a file in a github repository using Github's content create API:
      https://developer.github.com/v3/repos/contents/#create-a-file
    Will create the file at the specified path under a given repo and use the
    provided commit message.  Content should be base64 encoded content for the
    file.  The master/default branch will be used to own the file.

    Note that this is just working around a deficiency in PyGithub as it hasn't
    yet implemented this API.
    """
    # Note that this implementation does some horrible stuff and assumes intimate
    # details of the PyGithub implementation.  This is ok as the function only
    # exists to quickly fill the gap until PyGithub implements a file create 
    # function.  Also very little error checking is done--caller beware!
    params = { 'message': message, 'content': content }
    headers, data = repo._requester.requestJsonAndCheck(
        "PUT",
        repo.url + "/contents" + path,
        input=params
    )
    return headers, data