Create a file in this repository.

        :calls: `PUT /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents#create-a-file>`_
        :param path: string, (required), path of the file in the repository
        :param message: string, (required), commit message
        :param content: string, (required), the actual data in the file
        :param branch: string, (optional), branch to create the commit on. Defaults to the default branch of the repository
        :param committer: InputGitAuthor, (optional), if no information is given the authenticated user's information will be used. You must specify both a name and email.
        :param author: InputGitAuthor, (optional), if omitted this will be filled in with committer information. If passed, you must specify both a name and email.
        :rtype: {
            'content': :class:`ContentFile <github.ContentFile.ContentFile>`:,
            'commit': :class:`Commit <github.Commit.Commit>`}

def create_file(self, path, message, content,
                    branch=github.GithubObject.NotSet,
                    committer=github.GithubObject.NotSet,
                    author=github.GithubObject.NotSet):
        """Create a file in this repository.

        :calls: `PUT /repos/:owner/:repo/contents/:path <http://developer.github.com/v3/repos/contents#create-a-file>`_
        :param path: string, (required), path of the file in the repository
        :param message: string, (required), commit message
        :param content: string, (required), the actual data in the file
        :param branch: string, (optional), branch to create the commit on. Defaults to the default branch of the repository
        :param committer: InputGitAuthor, (optional), if no information is given the authenticated user's information will be used. You must specify both a name and email.
        :param author: InputGitAuthor, (optional), if omitted this will be filled in with committer information. If passed, you must specify both a name and email.
        :rtype: {
            'content': :class:`ContentFile <github.ContentFile.ContentFile>`:,
            'commit': :class:`Commit <github.Commit.Commit>`}
        """
        assert isinstance(path, (str, unicode)),                   \
            'path must be str/unicode object'
        assert isinstance(message, (str, unicode)),                \
            'message must be str/unicode object'
        assert isinstance(content, (str, unicode, bytes)),         \
            'content must be a str/unicode object'
        assert branch is github.GithubObject.NotSet                \
            or isinstance(branch, (str, unicode)),                 \
            'branch must be a str/unicode object'
        assert author is github.GithubObject.NotSet                \
            or isinstance(author, github.InputGitAuthor),          \
            'author must be a github.InputGitAuthor object'
        assert committer is github.GithubObject.NotSet             \
            or isinstance(committer, github.InputGitAuthor),       \
            'committer must be a github.InputGitAuthor object'

        if atLeastPython3:
            if isinstance(content, str):
                content = content.encode('utf-8')
            content = b64encode(content).decode('utf-8')
        else:
            if isinstance(content, unicode):
                content = content.encode('utf-8')
            content = b64encode(content)
        put_parameters = {'message': message, 'content': content}

        if branch is not github.GithubObject.NotSet:
            put_parameters['branch'] = branch
        if author is not github.GithubObject.NotSet:
            put_parameters["author"] = author._identity
        if committer is not github.GithubObject.NotSet:
            put_parameters["committer"] = committer._identity

        headers, data = self._requester.requestJsonAndCheck(
            "PUT",
            self.url + "/contents/" + urllib.quote(path),
            input=put_parameters
        )

        return {'content': github.ContentFile.ContentFile(self._requester, headers, data["content"], completed=False),
                'commit': github.Commit.Commit(self._requester, headers, data["commit"], completed=True)}