{"action":"created","comment":{"url":"https://api.github.com/repos/google/compare-codecs/pulls/comments/24323766","id":24323766,"diff_hunk":"@@ -30,31 +30,49 @@ import score_tools\n \n def main():\n   parser = argparse.ArgumentParser()\n-  parser.add_argument('videofile')\n+  parser.add_argument('videofile', nargs='?')\n   parser.add_argument('--codec')\n   parser.add_argument('--component')\n+  parser.add_argument('--single_config', action='store_true')\n   parser.add_argument('--criterion', default='psnr')\n \n   args = parser.parse_args()\n \n-  videofile = encoder.Videofile(args.videofile)\n   codec = pick_codec.PickCodec(args.codec)\n   my_optimizer = optimizer.Optimizer(codec,\n-      score_function=score_tools.PickScorer(args.criterion))\n-\n-  for bitrate in mpeg_settings.MpegFiles().AllRatesForFile(args.videofile):\n-    encoding = my_optimizer.BestEncoding(bitrate, videofile)\n-    if not encoding.Result():\n-      continue\n-    if args.component:\n-      component = encoding.result[args.component]\n-    else:\n-      component = ''\n-    print '%s %d %f %s %s' % (encoding.encoder.Hashname(),\n-                              bitrate,\n-                              my_optimizer.Score(encoding),\n-                              component,\n-                              encoding.encoder.parameters.ToString())\n+      score_function=score_tools.PickScorer(args.criterion),\n+      file_set=mpeg_settings.MpegFiles())\n+  if args.videofile:\n+    videofiles = [args.videofile]\n+  else:\n+    videofiles=my_optimizer.file_set.AllFileNames()\n+\n+  if args.single_config:\n+    my_encoder = my_optimizer.BestOverallEncoder()","path":"bin/list_best_results","position":39,"original_position":39,"commit_id":"0a728c528a8376c98975b2c3d88b9d56e78e0abc","original_commit_id":"0a728c528a8376c98975b2c3d88b9d56e78e0abc","user":{"login":"alvestrand","id":480893,"avatar_url":"https://avatars.githubusercontent.com/u/480893?v=3","gravatar_id":"","url":"https://api.github.com/users/alvestrand","html_url":"https://github.com/alvestrand","followers_url":"https://api.github.com/users/alvestrand/followers","following_url":"https://api.github.com/users/alvestrand/following{/other_user}","gists_url":"https://api.github.com/users/alvestrand/gists{/gist_id}","starred_url":"https://api.github.com/users/alvestrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvestrand/subscriptions","organizations_url":"https://api.github.com/users/alvestrand/orgs","repos_url":"https://api.github.com/users/alvestrand/repos","events_url":"https://api.github.com/users/alvestrand/events{/privacy}","received_events_url":"https://api.github.com/users/alvestrand/received_events","type":"User","site_admin":false},"body":"Reads nicer. Done.","created_at":"2015-02-09T12:05:49Z","updated_at":"2015-02-09T12:05:49Z","html_url":"https://github.com/google/compare-codecs/pull/26#discussion_r24323766","pull_request_url":"https://api.github.com/repos/google/compare-codecs/pulls/26","_links":{"self":{"href":"https://api.github.com/repos/google/compare-codecs/pulls/comments/24323766"},"html":{"href":"https://github.com/google/compare-codecs/pull/26#discussion_r24323766"},"pull_request":{"href":"https://api.github.com/repos/google/compare-codecs/pulls/26"}}},"pull_request":{"url":"https://api.github.com/repos/google/compare-codecs/pulls/26","id":28817940,"html_url":"https://github.com/google/compare-codecs/pull/26","diff_url":"https://github.com/google/compare-codecs/pull/26.diff","patch_url":"https://github.com/google/compare-codecs/pull/26.patch","issue_url":"https://api.github.com/repos/google/compare-codecs/issues/26","number":26,"state":"open","locked":false,"title":"One config on top","user":{"login":"alvestrand","id":480893,"avatar_url":"https://avatars.githubusercontent.com/u/480893?v=3","gravatar_id":"","url":"https://api.github.com/users/alvestrand","html_url":"https://github.com/alvestrand","followers_url":"https://api.github.com/users/alvestrand/followers","following_url":"https://api.github.com/users/alvestrand/following{/other_user}","gists_url":"https://api.github.com/users/alvestrand/gists{/gist_id}","starred_url":"https://api.github.com/users/alvestrand/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alvestrand/subscriptions","organizations_url":"https://api.github.com/users/alvestrand/orgs","repos_url":"https://api.github.com/users/alvestrand/repos","events_url":"https://api.github.com/users/alvestrand/events{/privacy}","received_events_url":"https://api.github.com/users/alvestrand/received_events","type":"User","site_admin":false},"body":"These 3 commits add a new table on top of the results listing that contains the result of running a single\r\nconfiguration across all the files and speeds in the test set.\r\n","created_at":"2015-02-06T15:46:06Z","updated_at":"2015-02-09T12:05:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ef24464811543ca7e6163f7c1bd76aed6b29f86f","assignee":{"login":"phoglund","id":7911315,"avatar_url":"https://avatars.githubusercontent.com/u/7911315?v=3","gravatar_id":"","url":"https://api.github.com/users/phoglund","html_url":"https://github.com/phoglund","followers_url":"https://api.github.com/users/phoglund/followers","following_url":"https://api.github.com/users/phoglund/following{/other_user}","gists_url":"https://api.github.com/users/phoglund/gists{/gist_id}","starred_url":"https://api.github.com/users/phoglund/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/phoglund/subscriptions","organizations_url":"https://api.github.com/users/phoglund/orgs","repos_url":"https://api.github.com/users/phoglund/repos","events_url":"https://api.github.com/users/phoglund/events{/privacy}","received_events_url":"https://api.github.com/users/phoglund/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/google/compare-codecs/pulls/26/commits","review_comments_url":"https://api.github.com/repos/google/compare-codecs/pulls/26/comments","review_comment_url":"https://api.github.com/repos/google/compare-codecs/pulls/comments/{number}","comments_url":"https://api.github.com/repos/google/compare-codecs/issues/26/comments","statuses_url":"https://api.github.com/repos/google/compare-codecs/statuses/0a728c528a8376c98975b2c3d88b9d56e78e0abc","head":{"label":"google:one-config-on-top","ref":"one-config-on-top","sha":"0a728c528a8376c98975b2c3d88b9d56e78e0abc","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":27724471,"name":"compare-codecs","full_name":"google/compare-codecs","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/compare-codecs","description":null,"fork":false,"url":"https://api.github.com/repos/google/compare-codecs","forks_url":"https://api.github.com/repos/google/compare-codecs/forks","keys_url":"https://api.github.com/repos/google/compare-codecs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/compare-codecs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/compare-codecs/teams","hooks_url":"https://api.github.com/repos/google/compare-codecs/hooks","issue_events_url":"https://api.github.com/repos/google/compare-codecs/issues/events{/number}","events_url":"https://api.github.com/repos/google/compare-codecs/events","assignees_url":"https://api.github.com/repos/google/compare-codecs/assignees{/user}","branches_url":"https://api.github.com/repos/google/compare-codecs/branches{/branch}","tags_url":"https://api.github.com/repos/google/compare-codecs/tags","blobs_url":"https://api.github.com/repos/google/compare-codecs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/compare-codecs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/compare-codecs/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/compare-codecs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/compare-codecs/statuses/{sha}","languages_url":"https://api.github.com/repos/google/compare-codecs/languages","stargazers_url":"https://api.github.com/repos/google/compare-codecs/stargazers","contributors_url":"https://api.github.com/repos/google/compare-codecs/contributors","subscribers_url":"https://api.github.com/repos/google/compare-codecs/subscribers","subscription_url":"https://api.github.com/repos/google/compare-codecs/subscription","commits_url":"https://api.github.com/repos/google/compare-codecs/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/compare-codecs/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/compare-codecs/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/compare-codecs/issues/comments/{number}","contents_url":"https://api.github.com/repos/google/compare-codecs/contents/{+path}","compare_url":"https://api.github.com/repos/google/compare-codecs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/compare-codecs/merges","archive_url":"https://api.github.com/repos/google/compare-codecs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/compare-codecs/downloads","issues_url":"https://api.github.com/repos/google/compare-codecs/issues{/number}","pulls_url":"https://api.github.com/repos/google/compare-codecs/pulls{/number}","milestones_url":"https://api.github.com/repos/google/compare-codecs/milestones{/number}","notifications_url":"https://api.github.com/repos/google/compare-codecs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/compare-codecs/labels{/name}","releases_url":"https://api.github.com/repos/google/compare-codecs/releases{/id}","created_at":"2014-12-08T16:42:21Z","updated_at":"2015-02-09T06:13:03Z","pushed_at":"2015-02-06T15:41:34Z","git_url":"git://github.com/google/compare-codecs.git","ssh_url":"git@github.com:google/compare-codecs.git","clone_url":"https://github.com/google/compare-codecs.git","svn_url":"https://github.com/google/compare-codecs","homepage":null,"size":847,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":10,"forks":2,"open_issues":10,"watchers":11,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"df0500c6fc45d0427e91fe13ea58098b54899bc9","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":27724471,"name":"compare-codecs","full_name":"google/compare-codecs","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/compare-codecs","description":null,"fork":false,"url":"https://api.github.com/repos/google/compare-codecs","forks_url":"https://api.github.com/repos/google/compare-codecs/forks","keys_url":"https://api.github.com/repos/google/compare-codecs/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/compare-codecs/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/compare-codecs/teams","hooks_url":"https://api.github.com/repos/google/compare-codecs/hooks","issue_events_url":"https://api.github.com/repos/google/compare-codecs/issues/events{/number}","events_url":"https://api.github.com/repos/google/compare-codecs/events","assignees_url":"https://api.github.com/repos/google/compare-codecs/assignees{/user}","branches_url":"https://api.github.com/repos/google/compare-codecs/branches{/branch}","tags_url":"https://api.github.com/repos/google/compare-codecs/tags","blobs_url":"https://api.github.com/repos/google/compare-codecs/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/compare-codecs/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/compare-codecs/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/compare-codecs/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/compare-codecs/statuses/{sha}","languages_url":"https://api.github.com/repos/google/compare-codecs/languages","stargazers_url":"https://api.github.com/repos/google/compare-codecs/stargazers","contributors_url":"https://api.github.com/repos/google/compare-codecs/contributors","subscribers_url":"https://api.github.com/repos/google/compare-codecs/subscribers","subscription_url":"https://api.github.com/repos/google/compare-codecs/subscription","commits_url":"https://api.github.com/repos/google/compare-codecs/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/compare-codecs/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/compare-codecs/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/compare-codecs/issues/comments/{number}","contents_url":"https://api.github.com/repos/google/compare-codecs/contents/{+path}","compare_url":"https://api.github.com/repos/google/compare-codecs/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/compare-codecs/merges","archive_url":"https://api.github.com/repos/google/compare-codecs/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/compare-codecs/downloads","issues_url":"https://api.github.com/repos/google/compare-codecs/issues{/number}","pulls_url":"https://api.github.com/repos/google/compare-codecs/pulls{/number}","milestones_url":"https://api.github.com/repos/google/compare-codecs/milestones{/number}","notifications_url":"https://api.github.com/repos/google/compare-codecs/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/compare-codecs/labels{/name}","releases_url":"https://api.github.com/repos/google/compare-codecs/releases{/id}","created_at":"2014-12-08T16:42:21Z","updated_at":"2015-02-09T06:13:03Z","pushed_at":"2015-02-06T15:41:34Z","git_url":"git://github.com/google/compare-codecs.git","ssh_url":"git@github.com:google/compare-codecs.git","clone_url":"https://github.com/google/compare-codecs.git","svn_url":"https://github.com/google/compare-codecs","homepage":null,"size":847,"stargazers_count":11,"watchers_count":11,"language":"Python","has_issues":true,"has_downloads":false,"has_wiki":false,"has_pages":false,"forks_count":2,"mirror_url":null,"open_issues_count":10,"forks":2,"open_issues":10,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/compare-codecs/pulls/26"},"html":{"href":"https://github.com/google/compare-codecs/pull/26"},"issue":{"href":"https://api.github.com/repos/google/compare-codecs/issues/26"},"comments":{"href":"https://api.github.com/repos/google/compare-codecs/issues/26/comments"},"review_comments":{"href":"https://api.github.com/repos/google/compare-codecs/pulls/26/comments"},"review_comment":{"href":"https://api.github.com/repos/google/compare-codecs/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/google/compare-codecs/pulls/26/commits"},"statuses":{"href":"https://api.github.com/repos/google/compare-codecs/statuses/0a728c528a8376c98975b2c3d88b9d56e78e0abc"}}}}