{"action":"created","comment":{"url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments/44865235","id":44865235,"diff_hunk":"@@ -61,22 +72,45 @@ def randcolor():\n     # preallocate locks for objects\n     locks_ptr = preallocate_locks(num_balls)\n \n+    #frame_list = []\n     while True:\n         with Timer() as t:\n             update(positions, velocities, grid,\n-                   radius, grid_size, locks_ptr,\n+                   radius, grid_spacing, locks_ptr,\n                    physics_step)\n \n         # udpate our estimate of how fast the simulator runs\n         physics_step = 0.9 * physics_step + 0.1 * t.interval\n         total_time += t.interval\n-\n         frame_count += 1\n         if total_time > anim_step:\n             animator.update(positions)\n             print(\"{} simulation frames per second\".format(frame_count / total_time))\n+            #frame_list.append(frame_count/total_time)\n             frame_count = 0\n             total_time = 0\n             # SUBPROBLEM 3: sort objects by location.  Be sure to update the\n             # grid if objects' indices change!  Also be sure to sort the\n-            # velocities with their object positions!\n+            # velocities with their object positions!  \n+\n+        \n+            # get postion of each ball\n+            ball_indices = ((positions / grid_spacing).astype(int)).tolist()\n+            # shift all position by one within the list","path":"HW2/P5/driver.py","position":64,"original_position":64,"commit_id":"61d55ac76d9bb09c48cb6914e1e6d565ec2f4669","original_commit_id":"61d55ac76d9bb09c48cb6914e1e6d565ec2f4669","user":{"login":"btweinstein","id":5347518,"avatar_url":"https://avatars.githubusercontent.com/u/5347518?v=3","gravatar_id":"","url":"https://api.github.com/users/btweinstein","html_url":"https://github.com/btweinstein","followers_url":"https://api.github.com/users/btweinstein/followers","following_url":"https://api.github.com/users/btweinstein/following{/other_user}","gists_url":"https://api.github.com/users/btweinstein/gists{/gist_id}","starred_url":"https://api.github.com/users/btweinstein/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/btweinstein/subscriptions","organizations_url":"https://api.github.com/users/btweinstein/orgs","repos_url":"https://api.github.com/users/btweinstein/repos","events_url":"https://api.github.com/users/btweinstein/events{/privacy}","received_events_url":"https://api.github.com/users/btweinstein/received_events","type":"User","site_admin":false},"body":"Why do you do this, i.e. the shifting in the array?","created_at":"2015-11-14T23:18:23Z","updated_at":"2015-11-14T23:18:23Z","html_url":"https://github.com/harvard-cs205/cs205-homework/pull/343#discussion_r44865235","pull_request_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343","_links":{"self":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments/44865235"},"html":{"href":"https://github.com/harvard-cs205/cs205-homework/pull/343#discussion_r44865235"},"pull_request":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343"}}},"pull_request":{"url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343","id":49773982,"html_url":"https://github.com/harvard-cs205/cs205-homework/pull/343","diff_url":"https://github.com/harvard-cs205/cs205-homework/pull/343.diff","patch_url":"https://github.com/harvard-cs205/cs205-homework/pull/343.patch","issue_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/343","number":343,"state":"open","locked":false,"title":"final","user":{"login":"newtestsubject","id":14150088,"avatar_url":"https://avatars.githubusercontent.com/u/14150088?v=3","gravatar_id":"","url":"https://api.github.com/users/newtestsubject","html_url":"https://github.com/newtestsubject","followers_url":"https://api.github.com/users/newtestsubject/followers","following_url":"https://api.github.com/users/newtestsubject/following{/other_user}","gists_url":"https://api.github.com/users/newtestsubject/gists{/gist_id}","starred_url":"https://api.github.com/users/newtestsubject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newtestsubject/subscriptions","organizations_url":"https://api.github.com/users/newtestsubject/orgs","repos_url":"https://api.github.com/users/newtestsubject/repos","events_url":"https://api.github.com/users/newtestsubject/events{/privacy}","received_events_url":"https://api.github.com/users/newtestsubject/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-11-05T02:10:54Z","updated_at":"2015-11-14T23:18:23Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4c3288142d19e88407ea3aa21154ed569652206b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343/commits","review_comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343/comments","review_comment_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/343/comments","statuses_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/61d55ac76d9bb09c48cb6914e1e6d565ec2f4669","head":{"label":"newtestsubject:HW2_new","ref":"HW2_new","sha":"61d55ac76d9bb09c48cb6914e1e6d565ec2f4669","user":{"login":"newtestsubject","id":14150088,"avatar_url":"https://avatars.githubusercontent.com/u/14150088?v=3","gravatar_id":"","url":"https://api.github.com/users/newtestsubject","html_url":"https://github.com/newtestsubject","followers_url":"https://api.github.com/users/newtestsubject/followers","following_url":"https://api.github.com/users/newtestsubject/following{/other_user}","gists_url":"https://api.github.com/users/newtestsubject/gists{/gist_id}","starred_url":"https://api.github.com/users/newtestsubject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newtestsubject/subscriptions","organizations_url":"https://api.github.com/users/newtestsubject/orgs","repos_url":"https://api.github.com/users/newtestsubject/repos","events_url":"https://api.github.com/users/newtestsubject/events{/privacy}","received_events_url":"https://api.github.com/users/newtestsubject/received_events","type":"User","site_admin":false},"repo":{"id":42014075,"name":"cs205-homework","full_name":"newtestsubject/cs205-homework","owner":{"login":"newtestsubject","id":14150088,"avatar_url":"https://avatars.githubusercontent.com/u/14150088?v=3","gravatar_id":"","url":"https://api.github.com/users/newtestsubject","html_url":"https://github.com/newtestsubject","followers_url":"https://api.github.com/users/newtestsubject/followers","following_url":"https://api.github.com/users/newtestsubject/following{/other_user}","gists_url":"https://api.github.com/users/newtestsubject/gists{/gist_id}","starred_url":"https://api.github.com/users/newtestsubject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/newtestsubject/subscriptions","organizations_url":"https://api.github.com/users/newtestsubject/orgs","repos_url":"https://api.github.com/users/newtestsubject/repos","events_url":"https://api.github.com/users/newtestsubject/events{/privacy}","received_events_url":"https://api.github.com/users/newtestsubject/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/newtestsubject/cs205-homework","description":"","fork":true,"url":"https://api.github.com/repos/newtestsubject/cs205-homework","forks_url":"https://api.github.com/repos/newtestsubject/cs205-homework/forks","keys_url":"https://api.github.com/repos/newtestsubject/cs205-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/newtestsubject/cs205-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/newtestsubject/cs205-homework/teams","hooks_url":"https://api.github.com/repos/newtestsubject/cs205-homework/hooks","issue_events_url":"https://api.github.com/repos/newtestsubject/cs205-homework/issues/events{/number}","events_url":"https://api.github.com/repos/newtestsubject/cs205-homework/events","assignees_url":"https://api.github.com/repos/newtestsubject/cs205-homework/assignees{/user}","branches_url":"https://api.github.com/repos/newtestsubject/cs205-homework/branches{/branch}","tags_url":"https://api.github.com/repos/newtestsubject/cs205-homework/tags","blobs_url":"https://api.github.com/repos/newtestsubject/cs205-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/newtestsubject/cs205-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/newtestsubject/cs205-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/newtestsubject/cs205-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/newtestsubject/cs205-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/newtestsubject/cs205-homework/languages","stargazers_url":"https://api.github.com/repos/newtestsubject/cs205-homework/stargazers","contributors_url":"https://api.github.com/repos/newtestsubject/cs205-homework/contributors","subscribers_url":"https://api.github.com/repos/newtestsubject/cs205-homework/subscribers","subscription_url":"https://api.github.com/repos/newtestsubject/cs205-homework/subscription","commits_url":"https://api.github.com/repos/newtestsubject/cs205-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/newtestsubject/cs205-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/newtestsubject/cs205-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/newtestsubject/cs205-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/newtestsubject/cs205-homework/contents/{+path}","compare_url":"https://api.github.com/repos/newtestsubject/cs205-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/newtestsubject/cs205-homework/merges","archive_url":"https://api.github.com/repos/newtestsubject/cs205-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/newtestsubject/cs205-homework/downloads","issues_url":"https://api.github.com/repos/newtestsubject/cs205-homework/issues{/number}","pulls_url":"https://api.github.com/repos/newtestsubject/cs205-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/newtestsubject/cs205-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/newtestsubject/cs205-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/newtestsubject/cs205-homework/labels{/name}","releases_url":"https://api.github.com/repos/newtestsubject/cs205-homework/releases{/id}","created_at":"2015-09-06T18:44:58Z","updated_at":"2015-09-06T18:44:58Z","pushed_at":"2015-11-05T02:09:59Z","git_url":"git://github.com/newtestsubject/cs205-homework.git","ssh_url":"git@github.com:newtestsubject/cs205-homework.git","clone_url":"https://github.com/newtestsubject/cs205-homework.git","svn_url":"https://github.com/newtestsubject/cs205-homework","homepage":null,"size":3177,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"harvard-cs205:master","ref":"master","sha":"ed6f0167fd1f6097ce9e454c2950c5db00a0c513","user":{"login":"harvard-cs205","id":13456002,"avatar_url":"https://avatars.githubusercontent.com/u/13456002?v=3","gravatar_id":"","url":"https://api.github.com/users/harvard-cs205","html_url":"https://github.com/harvard-cs205","followers_url":"https://api.github.com/users/harvard-cs205/followers","following_url":"https://api.github.com/users/harvard-cs205/following{/other_user}","gists_url":"https://api.github.com/users/harvard-cs205/gists{/gist_id}","starred_url":"https://api.github.com/users/harvard-cs205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harvard-cs205/subscriptions","organizations_url":"https://api.github.com/users/harvard-cs205/orgs","repos_url":"https://api.github.com/users/harvard-cs205/repos","events_url":"https://api.github.com/users/harvard-cs205/events{/privacy}","received_events_url":"https://api.github.com/users/harvard-cs205/received_events","type":"Organization","site_admin":false},"repo":{"id":40614104,"name":"cs205-homework","full_name":"harvard-cs205/cs205-homework","owner":{"login":"harvard-cs205","id":13456002,"avatar_url":"https://avatars.githubusercontent.com/u/13456002?v=3","gravatar_id":"","url":"https://api.github.com/users/harvard-cs205","html_url":"https://github.com/harvard-cs205","followers_url":"https://api.github.com/users/harvard-cs205/followers","following_url":"https://api.github.com/users/harvard-cs205/following{/other_user}","gists_url":"https://api.github.com/users/harvard-cs205/gists{/gist_id}","starred_url":"https://api.github.com/users/harvard-cs205/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/harvard-cs205/subscriptions","organizations_url":"https://api.github.com/users/harvard-cs205/orgs","repos_url":"https://api.github.com/users/harvard-cs205/repos","events_url":"https://api.github.com/users/harvard-cs205/events{/privacy}","received_events_url":"https://api.github.com/users/harvard-cs205/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/harvard-cs205/cs205-homework","description":"","fork":false,"url":"https://api.github.com/repos/harvard-cs205/cs205-homework","forks_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/forks","keys_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/teams","hooks_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/hooks","issue_events_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/events{/number}","events_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/events","assignees_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/assignees{/user}","branches_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/branches{/branch}","tags_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/tags","blobs_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/languages","stargazers_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/stargazers","contributors_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/contributors","subscribers_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/subscribers","subscription_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/subscription","commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/contents/{+path}","compare_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/merges","archive_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/downloads","issues_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues{/number}","pulls_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/labels{/name}","releases_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/releases{/id}","created_at":"2015-08-12T17:18:15Z","updated_at":"2015-10-21T19:21:28Z","pushed_at":"2015-11-14T23:08:59Z","git_url":"git://github.com/harvard-cs205/cs205-homework.git","ssh_url":"git@github.com:harvard-cs205/cs205-homework.git","clone_url":"https://github.com/harvard-cs205/cs205-homework.git","svn_url":"https://github.com/harvard-cs205/cs205-homework","homepage":null,"size":162893,"stargazers_count":5,"watchers_count":5,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":99,"mirror_url":null,"open_issues_count":349,"forks":99,"open_issues":349,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343"},"html":{"href":"https://github.com/harvard-cs205/cs205-homework/pull/343"},"issue":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/343"},"comments":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/343/comments"},"review_comments":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343/comments"},"review_comment":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/343/commits"},"statuses":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/61d55ac76d9bb09c48cb6914e1e6d565ec2f4669"}}}}