Commit 7ac9bfa0 by jijins

First changes

1 parent aaf1d7f1
Showing with 27 additions and 0 deletions
#!/usr/local/bin/python
import urllib2
import json
search_q = 'playframework'
url = 'https://api.github.com/search/repositories?q=%s&sort=stars&order=desc' % search_q
response = urllib2.urlopen(url)
result = json.loads(response.read())
items = result['items']
languages = []
count = 0
stargazers_count = 0
print "URL DESCIPTION"
print "-----------------------------------------------------------------------------"
for item in items:
count += 1
stargazers_count += item['stargazers_count']
if item['language'] not in languages:
languages.append(item['language'])
print item["html_url"]," ",item["description"]
print "-----------------------------------------------------------------------------"
print "Unique list of programming languages:-", ",".join(languages )
print "Average star rating:-",stargazers_count/count
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!