Fetches repos in "Trending Daily" Github section

        :param lang: Coding language
        :return: List of GithubUserRepository
501418
def get_trending_daily(lang=""):
        
        url = "https://github.com/trending/"
        url += str(lang).lower().replace(" ", "") + "?since=daily"
        api_content_request = urllib.request.Request(url)
        api_content_response = urllib.request.urlopen(
            api_content_request).read().decode("utf-8")  # parse response
        soup = BeautifulSoup(api_content_response, "lxml")  # html parser
        raw_repo_list = soup.find(
            "ol", {"class": "repo-list"}
        ).find_all("li")

        repos_list = []
        for repo in raw_repo_list:
            details = repo.find_all("div")[0].a.text.split("/")
            repo_owner = details[0].strip()
            repo_name = details[1].strip()
            repos_list.append(GithubUserRepository(repo_owner, repo_name))
        return repos_list
588898
def branches(self):
		
		if self.github.get_rate_limit().rate.limit == 0:
			raise GithubException

		branches = self.repo.get_branches()
		return [x.name for x in branches]
1164508
function getLanguages(options) {
  options.hash = _private.getDevHash(options.secret);
  return _private.makeRequest(_getLink(options), 'Unable to fetch project languages');
}
757924
def get_users_indexed_by_lang():
        
        result = {}
        users = TransUser.objects.filter(active=True).select_related('user')
        for user in users:
            for lang in user.languages.all():
                if lang.code not in result:
                    result[lang.code] = set()
                result[lang.code].add(user)
        return result
18138
function parseGitHubTrendingRepos(err, body) {
    if (err) { return tubesio.finish(err); }

    // Load the raw HTML into a cheerio object so we can traverse
    // the data using CSS selectors ala jQuery.
    var $ = cheerio.load(body),
        result = {
            title: $('title').text(),
            trending: []
        };

    // Iterate over the trending repositories extracting the names
    // and hyperlinks.
    $('#trending-repositories > ol > li').each(function (i, e) {
        result.trending.push({
            name: us.trim($(e).find('h3').text()),
            href: 'https://github.com' + $(e).find('a').last().attr('href')
        });
    });

    // Return our results object
    tubesio.finish(result); 
}
1205235
def github_repos(organization, github_url, github_token):
    """"""
    # Get github repos
    headers = {"Authorization": "token {}".format(github_token)}
    next_cursor = None

    while next_cursor is not False:
        params = {'query': query, 'variables': {
            'organization': organization, 'cursor': next_cursor}}
        response = requests.post(github_url, headers=headers, json=params)
        result = response.json()
        if response.status_code != 200 or 'errors' in result:
            raise ValueError("Github api error %s" % (
                response.content.decode('utf8'),))

        repos = jmespath.search(
            'data.organization.repositories.edges[].node', result)
        for r in repos:
            yield r
        page_info = jmespath.search(
            'data.organization.repositories.pageInfo', result)
        if page_info:
            next_cursor = (page_info['hasNextPage'] and
                           page_info['endCursor'] or False)
        else:
            next_cursor = False
467173
def guess_github_repo():
    
    p = subprocess.run(['git', 'ls-remote', '--get-url', 'origin'],
        stdout=subprocess.PIPE, stderr=subprocess.PIPE, check=False)
    if p.stderr or p.returncode:
        return False

    url = p.stdout.decode('utf-8').strip()
    m = GIT_URL.fullmatch(url)
    if not m:
        return False
    return m.group(1)
826003
public function repos($language = null, $private = null, $organization = null, $type = null, $imported = null)
    {
        return $this->request(sprintf('github?lang=%s&private=%b&org_name=%s&org_type=%s&page=%d&only_imported=%b',
            $language, $private, $organization, $type, 1, $imported
        ));
    }
155430
def get_lang_array(self):
        """"""

        r = self.yandex_translate_request("getLangs", "")
        self.handle_errors(r)

        return r.json()["dirs"]
312474
def fetch():
    
    mir, r, slackpkg_last_date = mirror(), "", ""
    count, upgraded = 0, []
    if mir:
        tar = urlopen(mir)
        try:
            r = tar.read()
        except AttributeError:
            print("sun: error: can't read mirror")
    if os.path.isfile(var_lib_slackpkg + changelog_txt):
        slackpkg_last_date = read_file("{0}{1}".format(
            var_lib_slackpkg, changelog_txt)).split("\n", 1)[0].strip()
    else:
        return [count, upgraded]
    for line in r.splitlines():
        if slackpkg_last_date == line.strip():
            break
        if (line.endswith("z:  Upgraded.") or line.endswith("z:  Rebuilt.") or
                line.endswith("z:  Added.") or line.endswith("z:  Removed.")):
            upgraded.append(line.split("/")[-1])
            count += 1
        if (line.endswith("*:  Upgraded.") or line.endswith("*:  Rebuilt.") or
                line.endswith("*:  Added.") or line.endswith("*:  Removed.")):
            upgraded.append(line)
            count += 1
    return [count, upgraded]
743284
def get_projects(self, state=github.GithubObject.NotSet):
        
        
        url_parameters = dict()
        if state is not github.GithubObject.NotSet:
            url_parameters["state"] = state
            
        return github.PaginatedList.PaginatedList(
            github.Project.Project,
            self._requester,
            self.url + "/projects",
            url_parameters,
            {"Accept": Consts.mediaTypeProjectsPreview}
        )
832897
def corpora(project_id, opts = {})
      data, _status_code, _headers = corpora_with_http_info(project_id, opts)
      return data
    end
1229289
def get_repos(self):
        
        url_parameters = dict()

        return github.PaginatedList.PaginatedList(
            contentClass=github.Repository.Repository,
            requester=self._requester,
            firstUrl="/installation/repositories",
            firstParams=url_parameters,
            headers=INTEGRATION_PREVIEW_HEADERS,
            list_item='repositories'
        )
135848
def get_all_repos(self):
        
        url = "https://api.github.com/user/repos"
        params = {
            "access_token": GITHUB_TOKEN
        }  # add auth params
        url = add_params_to_url(url, params)
        return self._get_repos(url)
99329
def _get_api_content(self):
        """"""

        if GITHUB_TOKEN is not None:
            self.add_params_to_url({
                "access_token": GITHUB_TOKEN
            })

        api_content_response = requests.get(self.api_url)
        self.api_content = json.loads(
            api_content_response.text
        )
318716
def fetch_github_activity(gen, metadata):
    

    if 'GITHUB_ACTIVITY_FEED' in gen.settings.keys():
        gen.context['github_activity'] = gen.plugin_instance.fetch()
1236662
def get_suggested_repositories(self):
        
        if self.suggested_repositories is None:
            # Procure repositories to suggest to user.
            repository_set = list()
            for term_count in range(5, 2, -1):
                query = self.__get_query_for_repos(term_count=term_count)
                repository_set.extend(self.__get_repos_for_query(query))

            # Remove repositories authenticated user is already interested in.
            catchy_repos = GitSuggest.minus(
                repository_set, self.user_starred_repositories
            )

            # Filter out repositories with too long descriptions. This is a
            # measure to weed out spammy repositories.
            filtered_repos = []

            if len(catchy_repos) > 0:
                for repo in catchy_repos:
                    if (
                        repo is not None
                        and repo.description is not None
                        and len(repo.description) <= GitSuggest.MAX_DESC_LEN
                    ):
                        filtered_repos.append(repo)

            # Present the repositories, highly starred to not starred.
            filtered_repos = sorted(
                filtered_repos,
                key=attrgetter("stargazers_count"),
                reverse=True,
            )

            self.suggested_repositories = GitSuggest.get_unique_repositories(
                filtered_repos
            )

        # Return an iterator to help user fetch the repository listing.
        for repository in self.suggested_repositories:
            yield repository