In [ ]:
import github3
In [ ]:
gh = github3.login('willingc', '')
In [ ]:
# Get all Jupyter repos
repos = [r.refresh() for r in gh.repositories_by('jupyter')]
In [ ]:
type(repos)
print(repos)
In [ ]:
import json
In [ ]:
for repo in repos:
text = ('%s: %d' % (repo.name, repo.open_issues_count))
print(text)
In [ ]:
for repo in repos:
print(repo.name, repo.url)
print(' ', repo.description)
print(' ', repo.homepage)
print(' Open ', repo.open_issues_count)
In [ ]:
for repo in repos:
repo.code_frequency
In [ ]:
repo.code_frequency
In [ ]:
repo.code_frequency()
In [ ]:
weeks = repo.code_frequency()
In [ ]:
print(weeks)
In [ ]:
type(weeks)
In [ ]:
mydict = repo.as_dict()
In [ ]:
print(mydict)
In [ ]:
tryj = repo.as_json()
In [ ]:
import json
In [ ]:
with open('data.json', 'w') as f:
json.dump(tryj, f)
In [ ]:
json.dumps(tryj, indent=4)
In [ ]:
print(json.dumps(mydict, indent=4))
In [ ]:
import pandas
In [ ]:
datanew = pandas.read_json(tryj, typ='series')
print("Series\n", datanew)
In [ ]:
datanew.head()
In [ ]:
%matplotlib inline
In [ ]:
import numpy as np
import matplotlib.pyplot as plt
x = np.linspace(0, 2 * np.pi, 100)
y1 = np.sin(x)
y2 = np.sin(3 * x)
plt.fill(x, y1, 'b', x, y2, 'r', alpha=0.3)
plt.show()
In [ ]:
cb.Colorbar()
In [ ]:
cb.print_function
In [ ]: