{"action":"created","comment":{"url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/comments/76883766","id":76883766,"diff_hunk":"@@ -19,4 +40,7 @@ def main():\n \n     client = docker.Client(base_url='unix://var/run/docker.sock')\n     ids = args.all and map(itemgetter('Id'), client.containers(quiet=True)) or args.containers\n-    print json.dumps({c: client.stats(c, stream=0) for c in ids})\n+\n+    stats = {c: client.stats(c, stream=0) for c in ids}\n+    stats = args.normalize and normalize(stats) or stats","path":"docker_stats.py","position":39,"original_position":39,"commit_id":"8453ed1cfb0360b6641077b843e52e087814d157","original_commit_id":"8453ed1cfb0360b6641077b843e52e087814d157","user":{"login":"pupssman","id":2619359,"avatar_url":"https://avatars.githubusercontent.com/u/2619359?v=3","gravatar_id":"","url":"https://api.github.com/users/pupssman","html_url":"https://github.com/pupssman","followers_url":"https://api.github.com/users/pupssman/followers","following_url":"https://api.github.com/users/pupssman/following{/other_user}","gists_url":"https://api.github.com/users/pupssman/gists{/gist_id}","starred_url":"https://api.github.com/users/pupssman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pupssman/subscriptions","organizations_url":"https://api.github.com/users/pupssman/orgs","repos_url":"https://api.github.com/users/pupssman/repos","events_url":"https://api.github.com/users/pupssman/events{/privacy}","received_events_url":"https://api.github.com/users/pupssman/received_events","type":"User","site_admin":false},"body":"Why not \r\n```python\r\nif args.normalize:\r\n    stats = normalize(stats)\r\n``` \r\nfor extra readability?","created_at":"2016-08-30T21:35:00Z","updated_at":"2016-08-30T21:35:00Z","html_url":"https://github.com/mavlyutov/docker-stats/pull/1#discussion_r76883766","pull_request_url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/comments/76883766"},"html":{"href":"https://github.com/mavlyutov/docker-stats/pull/1#discussion_r76883766"},"pull_request":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1","id":83340317,"html_url":"https://github.com/mavlyutov/docker-stats/pull/1","diff_url":"https://github.com/mavlyutov/docker-stats/pull/1.diff","patch_url":"https://github.com/mavlyutov/docker-stats/pull/1.patch","issue_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues/1","number":1,"state":"open","locked":false,"title":"jsonify some lists","user":{"login":"mavlyutov","id":1905393,"avatar_url":"https://avatars.githubusercontent.com/u/1905393?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlyutov","html_url":"https://github.com/mavlyutov","followers_url":"https://api.github.com/users/mavlyutov/followers","following_url":"https://api.github.com/users/mavlyutov/following{/other_user}","gists_url":"https://api.github.com/users/mavlyutov/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlyutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlyutov/subscriptions","organizations_url":"https://api.github.com/users/mavlyutov/orgs","repos_url":"https://api.github.com/users/mavlyutov/repos","events_url":"https://api.github.com/users/mavlyutov/events{/privacy}","received_events_url":"https://api.github.com/users/mavlyutov/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-08-30T20:23:00Z","updated_at":"2016-08-30T21:35:00Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8b911b494ee08e137f2a86778cba86fadc8c624e","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1/commits","review_comments_url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1/comments","review_comment_url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/comments{/number}","comments_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues/1/comments","statuses_url":"https://api.github.com/repos/mavlyutov/docker-stats/statuses/8453ed1cfb0360b6641077b843e52e087814d157","head":{"label":"mavlyutov:normalization","ref":"normalization","sha":"8453ed1cfb0360b6641077b843e52e087814d157","user":{"login":"mavlyutov","id":1905393,"avatar_url":"https://avatars.githubusercontent.com/u/1905393?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlyutov","html_url":"https://github.com/mavlyutov","followers_url":"https://api.github.com/users/mavlyutov/followers","following_url":"https://api.github.com/users/mavlyutov/following{/other_user}","gists_url":"https://api.github.com/users/mavlyutov/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlyutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlyutov/subscriptions","organizations_url":"https://api.github.com/users/mavlyutov/orgs","repos_url":"https://api.github.com/users/mavlyutov/repos","events_url":"https://api.github.com/users/mavlyutov/events{/privacy}","received_events_url":"https://api.github.com/users/mavlyutov/received_events","type":"User","site_admin":false},"repo":{"id":66839654,"name":"docker-stats","full_name":"mavlyutov/docker-stats","owner":{"login":"mavlyutov","id":1905393,"avatar_url":"https://avatars.githubusercontent.com/u/1905393?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlyutov","html_url":"https://github.com/mavlyutov","followers_url":"https://api.github.com/users/mavlyutov/followers","following_url":"https://api.github.com/users/mavlyutov/following{/other_user}","gists_url":"https://api.github.com/users/mavlyutov/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlyutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlyutov/subscriptions","organizations_url":"https://api.github.com/users/mavlyutov/orgs","repos_url":"https://api.github.com/users/mavlyutov/repos","events_url":"https://api.github.com/users/mavlyutov/events{/privacy}","received_events_url":"https://api.github.com/users/mavlyutov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mavlyutov/docker-stats","description":null,"fork":false,"url":"https://api.github.com/repos/mavlyutov/docker-stats","forks_url":"https://api.github.com/repos/mavlyutov/docker-stats/forks","keys_url":"https://api.github.com/repos/mavlyutov/docker-stats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavlyutov/docker-stats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavlyutov/docker-stats/teams","hooks_url":"https://api.github.com/repos/mavlyutov/docker-stats/hooks","issue_events_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues/events{/number}","events_url":"https://api.github.com/repos/mavlyutov/docker-stats/events","assignees_url":"https://api.github.com/repos/mavlyutov/docker-stats/assignees{/user}","branches_url":"https://api.github.com/repos/mavlyutov/docker-stats/branches{/branch}","tags_url":"https://api.github.com/repos/mavlyutov/docker-stats/tags","blobs_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavlyutov/docker-stats/statuses/{sha}","languages_url":"https://api.github.com/repos/mavlyutov/docker-stats/languages","stargazers_url":"https://api.github.com/repos/mavlyutov/docker-stats/stargazers","contributors_url":"https://api.github.com/repos/mavlyutov/docker-stats/contributors","subscribers_url":"https://api.github.com/repos/mavlyutov/docker-stats/subscribers","subscription_url":"https://api.github.com/repos/mavlyutov/docker-stats/subscription","commits_url":"https://api.github.com/repos/mavlyutov/docker-stats/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavlyutov/docker-stats/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavlyutov/docker-stats/contents/{+path}","compare_url":"https://api.github.com/repos/mavlyutov/docker-stats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavlyutov/docker-stats/merges","archive_url":"https://api.github.com/repos/mavlyutov/docker-stats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavlyutov/docker-stats/downloads","issues_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues{/number}","pulls_url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls{/number}","milestones_url":"https://api.github.com/repos/mavlyutov/docker-stats/milestones{/number}","notifications_url":"https://api.github.com/repos/mavlyutov/docker-stats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavlyutov/docker-stats/labels{/name}","releases_url":"https://api.github.com/repos/mavlyutov/docker-stats/releases{/id}","deployments_url":"https://api.github.com/repos/mavlyutov/docker-stats/deployments","created_at":"2016-08-29T11:56:39Z","updated_at":"2016-08-29T12:21:38Z","pushed_at":"2016-08-30T21:09:09Z","git_url":"git://github.com/mavlyutov/docker-stats.git","ssh_url":"git@github.com:mavlyutov/docker-stats.git","clone_url":"https://github.com/mavlyutov/docker-stats.git","svn_url":"https://github.com/mavlyutov/docker-stats","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"mavlyutov:master","ref":"master","sha":"fbf2beb58aa61fcd7e3b546f0891cbb15a76e316","user":{"login":"mavlyutov","id":1905393,"avatar_url":"https://avatars.githubusercontent.com/u/1905393?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlyutov","html_url":"https://github.com/mavlyutov","followers_url":"https://api.github.com/users/mavlyutov/followers","following_url":"https://api.github.com/users/mavlyutov/following{/other_user}","gists_url":"https://api.github.com/users/mavlyutov/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlyutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlyutov/subscriptions","organizations_url":"https://api.github.com/users/mavlyutov/orgs","repos_url":"https://api.github.com/users/mavlyutov/repos","events_url":"https://api.github.com/users/mavlyutov/events{/privacy}","received_events_url":"https://api.github.com/users/mavlyutov/received_events","type":"User","site_admin":false},"repo":{"id":66839654,"name":"docker-stats","full_name":"mavlyutov/docker-stats","owner":{"login":"mavlyutov","id":1905393,"avatar_url":"https://avatars.githubusercontent.com/u/1905393?v=3","gravatar_id":"","url":"https://api.github.com/users/mavlyutov","html_url":"https://github.com/mavlyutov","followers_url":"https://api.github.com/users/mavlyutov/followers","following_url":"https://api.github.com/users/mavlyutov/following{/other_user}","gists_url":"https://api.github.com/users/mavlyutov/gists{/gist_id}","starred_url":"https://api.github.com/users/mavlyutov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mavlyutov/subscriptions","organizations_url":"https://api.github.com/users/mavlyutov/orgs","repos_url":"https://api.github.com/users/mavlyutov/repos","events_url":"https://api.github.com/users/mavlyutov/events{/privacy}","received_events_url":"https://api.github.com/users/mavlyutov/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mavlyutov/docker-stats","description":null,"fork":false,"url":"https://api.github.com/repos/mavlyutov/docker-stats","forks_url":"https://api.github.com/repos/mavlyutov/docker-stats/forks","keys_url":"https://api.github.com/repos/mavlyutov/docker-stats/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mavlyutov/docker-stats/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mavlyutov/docker-stats/teams","hooks_url":"https://api.github.com/repos/mavlyutov/docker-stats/hooks","issue_events_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues/events{/number}","events_url":"https://api.github.com/repos/mavlyutov/docker-stats/events","assignees_url":"https://api.github.com/repos/mavlyutov/docker-stats/assignees{/user}","branches_url":"https://api.github.com/repos/mavlyutov/docker-stats/branches{/branch}","tags_url":"https://api.github.com/repos/mavlyutov/docker-stats/tags","blobs_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/refs{/sha}","trees_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mavlyutov/docker-stats/statuses/{sha}","languages_url":"https://api.github.com/repos/mavlyutov/docker-stats/languages","stargazers_url":"https://api.github.com/repos/mavlyutov/docker-stats/stargazers","contributors_url":"https://api.github.com/repos/mavlyutov/docker-stats/contributors","subscribers_url":"https://api.github.com/repos/mavlyutov/docker-stats/subscribers","subscription_url":"https://api.github.com/repos/mavlyutov/docker-stats/subscription","commits_url":"https://api.github.com/repos/mavlyutov/docker-stats/commits{/sha}","git_commits_url":"https://api.github.com/repos/mavlyutov/docker-stats/git/commits{/sha}","comments_url":"https://api.github.com/repos/mavlyutov/docker-stats/comments{/number}","issue_comment_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues/comments{/number}","contents_url":"https://api.github.com/repos/mavlyutov/docker-stats/contents/{+path}","compare_url":"https://api.github.com/repos/mavlyutov/docker-stats/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mavlyutov/docker-stats/merges","archive_url":"https://api.github.com/repos/mavlyutov/docker-stats/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mavlyutov/docker-stats/downloads","issues_url":"https://api.github.com/repos/mavlyutov/docker-stats/issues{/number}","pulls_url":"https://api.github.com/repos/mavlyutov/docker-stats/pulls{/number}","milestones_url":"https://api.github.com/repos/mavlyutov/docker-stats/milestones{/number}","notifications_url":"https://api.github.com/repos/mavlyutov/docker-stats/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mavlyutov/docker-stats/labels{/name}","releases_url":"https://api.github.com/repos/mavlyutov/docker-stats/releases{/id}","deployments_url":"https://api.github.com/repos/mavlyutov/docker-stats/deployments","created_at":"2016-08-29T11:56:39Z","updated_at":"2016-08-29T12:21:38Z","pushed_at":"2016-08-30T21:09:09Z","git_url":"git://github.com/mavlyutov/docker-stats.git","ssh_url":"git@github.com:mavlyutov/docker-stats.git","clone_url":"https://github.com/mavlyutov/docker-stats.git","svn_url":"https://github.com/mavlyutov/docker-stats","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1"},"html":{"href":"https://github.com/mavlyutov/docker-stats/pull/1"},"issue":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/issues/1"},"comments":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/mavlyutov/docker-stats/statuses/8453ed1cfb0360b6641077b843e52e087814d157"}}}}
{"actor":{"display_login":"pupssman"}}