scripts/get_stargazers.py
def get_stats(self, username='', password='', organization='llnl', force=True):
        """
        Retrieves the traffic for the users of the given organization.
        Requires organization admin credentials token to access the data.
        """
        date = str(datetime.date.today())
        stargazers_file_path =  ('../github_stats_output/stargazers.csv')
        if force or not os.path.isfile(file_path):
            my_github.login(username, password)
            calls_beginning = self.logged_in_gh.ratelimit_remaining + 1
            print 'Rate Limit: ' + str(calls_beginning)
            my_github.get_org(organization)
            my_github.get_repos()
            my_github.write_to_file(file_path=stargazers_file_path)
            #my_github.write_to_file(file_path=stargazers_file_path)
            calls_remaining = self.logged_in_gh.ratelimit_remaining
            calls_used = calls_beginning - calls_remaining
            print ('Rate Limit Remaining: ' + str(calls_remaining) + '\nUsed '
                + str(calls_used) + ' API calls.')
def get_stats(self, username='', password='', organization='llnl', force=True):
        """
        Retrieves the traffic for the users of the given organization.
        Requires organization admin credentials token to access the data.
        """
        date = str(datetime.date.today())
        stargazers_file_path =  ('../github_stats_output/stargazers.csv')
        if force or not os.path.isfile(file_path):
            my_github.login(username, password)
            calls_beginning = self.logged_in_gh.ratelimit_remaining + 1
            print 'Rate Limit: ' + str(calls_beginning)
            my_github.get_org(organization)
            my_github.get_repos()
            my_github.write_to_file(file_path=stargazers_file_path)
            #my_github.write_to_file(file_path=stargazers_file_path)
            calls_remaining = self.logged_in_gh.ratelimit_remaining
            calls_used = calls_beginning - calls_remaining
            print ('Rate Limit Remaining: ' + str(calls_remaining) + '\nUsed '
                + str(calls_used) + ' API calls.')
def get_stats ( self , username = '' , password = '' , organization = 'llnl' , force = True ) : date = str ( datetime . date . today ( ) ) stargazers_file_path = ( '../github_stats_output/stargazers.csv' ) if force or not os . path . isfile ( file_path ) : my_github . login ( username , password ) calls_beginning = self . logged_in_gh . ratelimit_remaining + 1 print 'Rate Limit: ' + str ( calls_beginning ) my_github . get_org ( organization ) my_github . get_repos ( ) my_github . write_to_file ( file_path = stargazers_file_path ) #my_github.write_to_file(file_path=stargazers_file_path) calls_remaining = self . logged_in_gh . ratelimit_remaining calls_used = calls_beginning - calls_remaining print ( 'Rate Limit Remaining: ' + str ( calls_remaining ) + '\nUsed ' + str ( calls_used ) + ' API calls.' )
Retrieves the traffic for the users of the given organization.
        Requires organization admin credentials token to access the data.
Retrieves the traffic for the users of the given organization . Requires organization admin credentials token to access the data .