|
73 | 73 | " u'collaborators': 0,\n",
|
74 | 74 | " u'company': u'Cvent',\n",
|
75 | 75 | " u'created_at': u'2015-09-16T16:14:22Z',\n",
|
76 |
| - " u'disk_usage': 155405,\n", |
| 76 | + " u'disk_usage': 155435,\n", |
77 | 77 | " u'email': u'[email protected]',\n",
|
78 | 78 | " u'events_url': u'https://api.github.com/users/kb22/events{/privacy}',\n",
|
79 | 79 | " u'followers': 35,\n",
|
|
735 | 735 | "(9, {u'Jupyter Notebook': 295254})\n",
|
736 | 736 | "(10, {u'Jupyter Notebook': 85404})\n",
|
737 | 737 | "(11, {u'Python': 3034})\n",
|
738 |
| - "(12, {u'Jupyter Notebook': 71643})\n", |
| 738 | + "(12, {u'Jupyter Notebook': 73804})\n", |
739 | 739 | "(13, {u'Jupyter Notebook': 261173})\n",
|
740 | 740 | "(14, {u'Jupyter Notebook': 39932})\n",
|
741 | 741 | "(15, {u'PHP': 6386, u'Java': 67597})\n",
|
|
1244 | 1244 | "cell_type": "code",
|
1245 | 1245 | "execution_count": 12,
|
1246 | 1246 | "metadata": {},
|
1247 |
| - "outputs": [], |
| 1247 | + "outputs": [ |
| 1248 | + { |
| 1249 | + "name": "stdout", |
| 1250 | + "output_type": "stream", |
| 1251 | + "text": [ |
| 1252 | + "URL: https://api.github.com/repos/kb22/Activity-Recognition-using-Machine-Learning/commits, commits: 7\n", |
| 1253 | + "URL: https://api.github.com/repos/kb22/Animation-in-C/commits, commits: 2\n", |
| 1254 | + "URL: https://api.github.com/repos/kb22/Article-Recommender/commits, commits: 18\n", |
| 1255 | + "URL: https://api.github.com/repos/kb22/Attendance-Marker/commits, commits: 4\n", |
| 1256 | + "URL: https://api.github.com/repos/kb22/Color-Identification-using-Machine-Learning/commits, commits: 5\n", |
| 1257 | + "URL: https://api.github.com/repos/kb22/Computer-Simulation-using-Proteus/commits, commits: 2\n", |
| 1258 | + "URL: https://api.github.com/repos/kb22/Coursera_Capstone/commits, commits: 30\n", |
| 1259 | + "URL: https://api.github.com/repos/kb22/Coursera_Capstone/commits?page=2, commits: 4\n", |
| 1260 | + "URL: https://api.github.com/repos/kb22/Create-dataset-using-API/commits, commits: 8\n", |
| 1261 | + "URL: https://api.github.com/repos/kb22/Create-Face-Data-from-Images/commits, commits: 6\n", |
| 1262 | + "URL: https://api.github.com/repos/kb22/Deep-Learning-A-Z-Coursework/commits, commits: 17\n", |
| 1263 | + "URL: https://api.github.com/repos/kb22/Digit-Recognition-with-Parameter-Tuning/commits, commits: 12\n", |
| 1264 | + "URL: https://api.github.com/repos/kb22/Face-Detection-using-OpenCV/commits, commits: 8\n", |
| 1265 | + "URL: https://api.github.com/repos/kb22/GitHub-User-Insights-using-API/commits, commits: 8\n", |
| 1266 | + "URL: https://api.github.com/repos/kb22/Heart-Disease-Prediction/commits, commits: 4\n", |
| 1267 | + "URL: https://api.github.com/repos/kb22/House-Price-Predictions/commits, commits: 4\n", |
| 1268 | + "URL: https://api.github.com/repos/kb22/IEEE-MyEvent-App/commits, commits: 30\n", |
| 1269 | + "URL: https://api.github.com/repos/kb22/IEEE-MyEvent-App/commits?page=2, commits: 6\n", |
| 1270 | + "URL: https://api.github.com/repos/kb22/Income-Predictor/commits, commits: 10\n", |
| 1271 | + "URL: https://api.github.com/repos/kb22/kb22.github.io/commits, commits: 11\n", |
| 1272 | + "URL: https://api.github.com/repos/kb22/Machine-Learning-A-Z-CourseWork/commits, commits: 20\n", |
| 1273 | + "URL: https://api.github.com/repos/kb22/Malaria-Cell-Identifier-using-CNN/commits, commits: 5\n", |
| 1274 | + "URL: https://api.github.com/repos/kb22/ML-Performance-Evaluation/commits, commits: 4\n", |
| 1275 | + "URL: https://api.github.com/repos/kb22/ML-React-App-Template/commits, commits: 25\n", |
| 1276 | + "URL: https://api.github.com/repos/kb22/PFWebsite/commits, commits: 30\n", |
| 1277 | + "URL: https://api.github.com/repos/kb22/PFWebsite/commits?page=2, commits: 1\n", |
| 1278 | + "URL: https://api.github.com/repos/kb22/Plot-Maps-in-Python/commits, commits: 15\n", |
| 1279 | + "URL: https://api.github.com/repos/kb22/Purchasing-Intention-Prediction/commits, commits: 11\n", |
| 1280 | + "URL: https://api.github.com/repos/kb22/Quiz-using-Files/commits, commits: 6\n", |
| 1281 | + "URL: https://api.github.com/repos/kb22/Silence-It/commits, commits: 25\n", |
| 1282 | + "URL: https://api.github.com/repos/kb22/TextEditor/commits, commits: 19\n", |
| 1283 | + "URL: https://api.github.com/repos/kb22/Twitter-Sentiment-Analysis/commits, commits: 15\n", |
| 1284 | + "URL: https://api.github.com/repos/kb22/Understanding-Flask-and-Flask-RESTPlus/commits, commits: 4\n", |
| 1285 | + "URL: https://api.github.com/repos/kb22/Understanding-Numpy/commits, commits: 11\n", |
| 1286 | + "URL: https://api.github.com/repos/kb22/Virtual-trainer/commits, commits: 1\n", |
| 1287 | + "URL: https://api.github.com/repos/kb22/Virtual-trainer-data-collector/commits, commits: 1\n", |
| 1288 | + "URL: https://api.github.com/repos/kb22/Visualization-using-Matplotlib/commits, commits: 7\n", |
| 1289 | + "URL: https://api.github.com/repos/kb22/Web-Scraping-using-Python/commits, commits: 10\n", |
| 1290 | + "URL: https://api.github.com/repos/kb22/Word-Cloud/commits, commits: 2\n" |
| 1291 | + ] |
| 1292 | + } |
| 1293 | + ], |
1248 | 1294 | "source": [
|
1249 | 1295 | "commits_information = []\n",
|
1250 | 1296 | "for i in range(repos_df.shape[0]):\n",
|
1251 |
| - " response = requests.get(repos_df.loc[i, 'Commits URL'], auth = authentication)\n", |
1252 |
| - " response = response.json()\n", |
1253 |
| - " for commit in response:\n", |
1254 |
| - " commit_data = []\n", |
1255 |
| - " commit_data.append(repos_df.loc[i, 'Id'])\n", |
1256 |
| - " commit_data.append(commit['sha'])\n", |
1257 |
| - " commit_data.append(commit['commit']['committer']['date'])\n", |
1258 |
| - " commit_data.append(commit['commit']['message'])\n", |
1259 |
| - " commits_information.append(commit_data)" |
| 1297 | + " url = repos_df.loc[i, 'Commits URL']\n", |
| 1298 | + " page_no = 1\n", |
| 1299 | + " while (True):\n", |
| 1300 | + " response = requests.get(url, auth = authentication)\n", |
| 1301 | + " response = response.json()\n", |
| 1302 | + " print(\"URL: {}, commits: {}\".format(url, len(response)))\n", |
| 1303 | + " for commit in response:\n", |
| 1304 | + " commit_data = []\n", |
| 1305 | + " commit_data.append(repos_df.loc[i, 'Id'])\n", |
| 1306 | + " commit_data.append(commit['sha'])\n", |
| 1307 | + " commit_data.append(commit['commit']['committer']['date'])\n", |
| 1308 | + " commit_data.append(commit['commit']['message'])\n", |
| 1309 | + " commits_information.append(commit_data)\n", |
| 1310 | + " if (len(response) == 30):\n", |
| 1311 | + " page_no = page_no + 1\n", |
| 1312 | + " url = repos_df.loc[i, 'Commits URL'] + '?page=' + str(page_no)\n", |
| 1313 | + " else:\n", |
| 1314 | + " break" |
1260 | 1315 | ]
|
1261 | 1316 | },
|
1262 | 1317 | {
|
|
0 commit comments