This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repo = namedtuple('Repo', 'name stars forks') | |
from collections import namedtuple | |
def get_repo_stats(user, n=5): | |
repos = [] | |
for repo in user.get_repos(): | |
if repo.fork: | |
continue | |
repos.append(Repo(repo.name, repo.stargazers_count, repo.forks_count)) | |
return sorted(repos, key=lambda x: x.stars, reverse=True)[:n] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repo = namedtuple('Repo', 'name stars forks') | |
from collections import namedtuple | |
def get_repo_stats(user, n=5): | |
repos = [] | |
for repo in user.get_repos(): | |
if repo.fork: | |
continue | |
repos.append(Repo(repo.name, repo.stargazers_count, repo.forks_count)) | |
return sorted(repos, key=lambda x: x.stars, reverse=True)[:n] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repo = namedtuple('Repo', 'name stars forks') | |
from collections import namedtuple | |
def get_repo_stats(user, n=5): | |
repos = [] | |
for repo in user.get_repos(): | |
if repo.fork: | |
continue | |
repos.append(Repo(repo.name, repo.stargazers_count, repo.forks_count)) | |
return sorted(repos, key=lambda x: x.stars, reverse=True)[:n] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Repo = namedtuple('Repo', 'name stars forks') | |
from collections import namedtuple | |
def get_repo_stats(user, n=5): | |
repos = [] | |
for repo in user.get_repos(): | |
if repo.fork: | |
continue | |
repos.append(Repo(repo.name, repo.stargazers_count, repo.forks_count)) | |
return sorted(repos, key=lambda x: x.stars, reverse=True)[:n] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# open-or-bring-to-front | |
# | |
# open-or-bring-to-front is a command line script to be run with | |
# some custom keybinding attached to it. It launches the application | |
# passed as <launch-command> (see Usage below) if the application hasn't | |
# already a window open, which matches with <search-string>. | |
# If it does, it brings all the windows of said application to front. | |
# |