Returns a data frame of all branches in origin.  The DataFrame will have the columns:

         * repository
         * local
         * branch

        :returns: DataFrame
186038
def branches(self):
        

        df = pd.DataFrame(columns=['repository', 'local', 'branch'])

        if _has_joblib:
            ds = Parallel(n_jobs=-1, backend='threading', verbose=0)(
                delayed(_branches_func)
                (x) for x in self.repos
            )
            for d in ds:
                df = df.append(d)
        else:
            for repo in self.repos:
                try:
                    df = df.append(_branches_func(repo))
                except GitCommandError:
                    print('Warning! Repo: %s couldn\'t be inspected' % (repo, ))

        df.reset_index()

        return df
944048
def get_branch(self, branch):
        
        assert isinstance(branch, (str, unicode)), branch
        headers, data = self._requester.requestJsonAndCheck(
            "GET",
            self.url + "/branches/" + branch
        )
        return github.Branch.Branch(self._requester, headers, data, completed=True)
1350807
def find_branches(self):
        
        listing = self.context.capture('hg', 'branches')
        for line in listing.splitlines():
            tokens = line.split()
            if len(tokens) >= 2 and ':' in tokens[1]:
                revision_number, revision_id = tokens[1].split(':')
                yield Revision(
                    branch=tokens[0],
                    repository=self,
                    revision_id=revision_id,
                    revision_number=int(revision_number),
                )
1252537
def repositories(self):
        
        return RepositoriesDataFrame(self.__engine.getRepositories(),
                                     self.session, self.__implicits)
76257
def get_default_branch(repo):
    """"""
    url = "{}/repos/{}".format(GITHUB_API_BASE, repo)
    response = requests.get(url)
    if response.status_code == 200:
        api_response = json.loads(response.text)
        return api_response['default_branch']
    else:
        return 'master'
815144
def _get_data(self) -> BaseFrameManager:
        

        def iloc(partition, row_internal_indices, col_internal_indices):
            return partition.iloc[row_internal_indices, col_internal_indices]

        masked_data = self.parent_data.apply_func_to_indices_both_axis(
            func=iloc,
            row_indices=self.index_map.values,
            col_indices=self.columns_map.values,
            lazy=False,
            keep_remaining=False,
        )
        return masked_data
471335
def dataframe(self):
        
        frames = []
        for game in self.__iter__():
            df = game.dataframe
            if df is not None:
                frames.append(df)
        if frames == []:
            return None
        return pd.concat(frames)
961662
def dataframes(self):
        
        frames = []
        for team in self.__iter__():
            frames.append(team.dataframe)
        return pd.concat(frames)
1208617
def get_branches(self):
        """"""
        if self.else_branch:
            return [self.then_branch, self.else_branch]
        return [self.then_branch]
98543
def branches(self):
        
        branches = []

        if self._taken_branch:
            branches += [(self._taken_branch, 'taken')]

        if self._not_taken_branch:
            branches += [(self._not_taken_branch, 'not-taken')]

        if self._direct_branch:
            branches += [(self._direct_branch, 'direct')]

        return branches
1213535
def local
      local = []

      @branches.each do |branch|
        local << branch unless branch.remote?
      end

      BranchCollection.new(@repo, local)
    end
816591
def outlays(self):
        
        return pd.DataFrame({x.name: x.outlays for x in self.securities})
498067
def repo_values(self):
        
        branches = []
        commits = {}
        m_helper = Tools()
        status = m_helper.repo_branches(self.parentApp.repo_value['repo'])
        # branches and commits must both be retrieved successfully
        if status[0]:
            branches = status[1]
            status = m_helper.repo_commits(self.parentApp.repo_value['repo'])
            if status[0]:
                r_commits = status[1]
                for commit in r_commits:
                    commits[commit[0]] = commit[1]
            else:
                # if commits failed, return commit errors
                return status
        else:
            # if branch failed, return branch errors
            return status
        # if everything is good, return branches with commits
        return branches, commits
9469
def restore(self):
        
        if self.backup_df is None:
            self.warning("No dataframe is backed up: nothing restore")
            return
        self.df = self.backup_df
        self.ok("Dataframe is restored")
1041676
def branches(self):
		
		req_message = 'https://api.bitbucket.org/1.0/repositories/' + self.reponame + '/branches'
		response_data = self._bitbucketAPIRequest(req_message)
		return response_data.keys()
838944
def branch(self, name, desc=None):
        
        return Local.new(path=os.path.join(self.path, name), desc=desc, bare=True)
1253201
def repo_branches(self, repo):
        
        branches = []
        try:
            # switch to directory where repo will be cloned to
            status = self.path_dirs.apply_path(repo)
            if status[0]:
                cwd = status[1]
            else:
                self.logger.error('apply_path failed. Exiting repo_branches'
                                  ' with status ' + str(status))
                return status

            branch_output = check_output(shlex.split('git branch -a'),
                                         stderr=STDOUT,
                                         close_fds=True)
            branch_output = branch_output.split(b'\n')
            for branch in branch_output:
                br = branch.strip()
                if br.startswith(b'*'):
                    br = br[2:]
                if b'/' in br:
                    branches.append(br.rsplit(b'/', 1)[1].decode('utf-8'))
                elif br:
                    branches.append(br.decode('utf-8'))

            branches = list(set(branches))
            for branch in branches:
                try:
                    check_output(shlex.split('git checkout ' + branch),
                                 stderr=STDOUT,
                                 close_fds=True)
                except Exception as e:  # pragma: no cover
                    self.logger.error('repo_branches failed with error: ' +
                                      str(e) + ' on branch: ' + str(branch))
                    status = (False, e)
                    return status

            chdir(cwd)
            status = (True, branches)
        except Exception as e:  # pragma: no cover
            self.logger.error('repo_branches failed with error: ' + str(e))
            status = (False, e)

        return status