{"action":"created","comment":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/77027719","id":77027719,"diff_hunk":"@@ -339,89 +340,91 @@ text file from [Google Cloud Storage](https://cloud.google.com/storage/).\n \n ```python\n import re\n-import google.cloud.dataflow as df\n-p = df.Pipeline('DirectPipelineRunner')\n+import apache_beam as beam\n+p = beam.Pipeline('DirectPipelineRunner')\n (p\n- | df.Read('read',\n-           df.io.TextFileSource(\n-           'gs://dataflow-samples/shakespeare/kinglear.txt'))\n- | df.FlatMap('split', lambda x: re.findall(r'\\w+', x))\n- | df.combiners.Count.PerElement('count words')\n- | df.Write('write', df.io.TextFileSink('./results')))\n+ | 'read' >> beam.Read(\n+        beam.io.TextFileSource('gs://dataflow-samples/shakespeare/kinglear.txt')\n+    )\n+ | 'split' >> beam.FlatMap(lambda x: re.findall(r'\\w+', x))\n+ | 'count words' >> beam.combiners.Count.PerElement()\n+ | 'save' >> beam.Write(beam.io.TextFileSink('./word_count')))\n p.run()\n ```\n \n ### Counting words with GroupByKey\n \n-Here we use `GroupByKey` to count the words.\n-This is a somewhat forced example of `GroupByKey`; normally one would use\n-the transform `df.combiners.Count.PerElement`, as in the previous example.\n-The example also shows the use of a wild-card in specifying the text file\n-source.\n-\n+This is a somewhat forced example of `GroupByKey` to count the words.\n+Normally, one would use the transform `beam.combiners.Count.PerElement`,\n+as in the previous example. A wildcard is used to specify the text","path":"sdks/python/README.md","position":175,"original_position":175,"commit_id":"f192f879bdb5b7f5416f3801c15273ec7ab1b1b1","original_commit_id":"f192f879bdb5b7f5416f3801c15273ec7ab1b1b1","user":{"login":"aaltay","id":696638,"avatar_url":"https://avatars.githubusercontent.com/u/696638?v=3","gravatar_id":"","url":"https://api.github.com/users/aaltay","html_url":"https://github.com/aaltay","followers_url":"https://api.github.com/users/aaltay/followers","following_url":"https://api.github.com/users/aaltay/following{/other_user}","gists_url":"https://api.github.com/users/aaltay/gists{/gist_id}","starred_url":"https://api.github.com/users/aaltay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aaltay/subscriptions","organizations_url":"https://api.github.com/users/aaltay/orgs","repos_url":"https://api.github.com/users/aaltay/repos","events_url":"https://api.github.com/users/aaltay/events{/privacy}","received_events_url":"https://api.github.com/users/aaltay/received_events","type":"User","site_admin":false},"body":"\"The example also shows the use of a wildcard\" part adds meaning here I think.","created_at":"2016-08-31T17:00:11Z","updated_at":"2016-08-31T17:00:11Z","html_url":"https://github.com/apache/incubator-beam/pull/903#discussion_r77027719","pull_request_url":"https://api.github.com/repos/apache/incubator-beam/pulls/903","_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments/77027719"},"html":{"href":"https://github.com/apache/incubator-beam/pull/903#discussion_r77027719"},"pull_request":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/903"}}},"pull_request":{"url":"https://api.github.com/repos/apache/incubator-beam/pulls/903","id":83058841,"html_url":"https://github.com/apache/incubator-beam/pull/903","diff_url":"https://github.com/apache/incubator-beam/pull/903.diff","patch_url":"https://github.com/apache/incubator-beam/pull/903.patch","issue_url":"https://api.github.com/repos/apache/incubator-beam/issues/903","number":903,"state":"open","locked":false,"title":"[BEAM-603] Update Beam examples to reflect new apply style (>>)","user":{"login":"mariapython","id":7925361,"avatar_url":"https://avatars.githubusercontent.com/u/7925361?v=3","gravatar_id":"","url":"https://api.github.com/users/mariapython","html_url":"https://github.com/mariapython","followers_url":"https://api.github.com/users/mariapython/followers","following_url":"https://api.github.com/users/mariapython/following{/other_user}","gists_url":"https://api.github.com/users/mariapython/gists{/gist_id}","starred_url":"https://api.github.com/users/mariapython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariapython/subscriptions","organizations_url":"https://api.github.com/users/mariapython/orgs","repos_url":"https://api.github.com/users/mariapython/repos","events_url":"https://api.github.com/users/mariapython/events{/privacy}","received_events_url":"https://api.github.com/users/mariapython/received_events","type":"User","site_admin":false},"body":"I updated the first half of the examples\r\n","created_at":"2016-08-29T07:58:32Z","updated_at":"2016-08-31T17:00:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"859e26944f819f624d7965024578c0736a57e604","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/apache/incubator-beam/pulls/903/commits","review_comments_url":"https://api.github.com/repos/apache/incubator-beam/pulls/903/comments","review_comment_url":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/incubator-beam/issues/903/comments","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/f192f879bdb5b7f5416f3801c15273ec7ab1b1b1","head":{"label":"mariapython:python-sdk","ref":"python-sdk","sha":"f192f879bdb5b7f5416f3801c15273ec7ab1b1b1","user":{"login":"mariapython","id":7925361,"avatar_url":"https://avatars.githubusercontent.com/u/7925361?v=3","gravatar_id":"","url":"https://api.github.com/users/mariapython","html_url":"https://github.com/mariapython","followers_url":"https://api.github.com/users/mariapython/followers","following_url":"https://api.github.com/users/mariapython/following{/other_user}","gists_url":"https://api.github.com/users/mariapython/gists{/gist_id}","starred_url":"https://api.github.com/users/mariapython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariapython/subscriptions","organizations_url":"https://api.github.com/users/mariapython/orgs","repos_url":"https://api.github.com/users/mariapython/repos","events_url":"https://api.github.com/users/mariapython/events{/privacy}","received_events_url":"https://api.github.com/users/mariapython/received_events","type":"User","site_admin":false},"repo":{"id":66086060,"name":"incubator-beam","full_name":"mariapython/incubator-beam","owner":{"login":"mariapython","id":7925361,"avatar_url":"https://avatars.githubusercontent.com/u/7925361?v=3","gravatar_id":"","url":"https://api.github.com/users/mariapython","html_url":"https://github.com/mariapython","followers_url":"https://api.github.com/users/mariapython/followers","following_url":"https://api.github.com/users/mariapython/following{/other_user}","gists_url":"https://api.github.com/users/mariapython/gists{/gist_id}","starred_url":"https://api.github.com/users/mariapython/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mariapython/subscriptions","organizations_url":"https://api.github.com/users/mariapython/orgs","repos_url":"https://api.github.com/users/mariapython/repos","events_url":"https://api.github.com/users/mariapython/events{/privacy}","received_events_url":"https://api.github.com/users/mariapython/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mariapython/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":true,"url":"https://api.github.com/repos/mariapython/incubator-beam","forks_url":"https://api.github.com/repos/mariapython/incubator-beam/forks","keys_url":"https://api.github.com/repos/mariapython/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mariapython/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mariapython/incubator-beam/teams","hooks_url":"https://api.github.com/repos/mariapython/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/mariapython/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/mariapython/incubator-beam/events","assignees_url":"https://api.github.com/repos/mariapython/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/mariapython/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/mariapython/incubator-beam/tags","blobs_url":"https://api.github.com/repos/mariapython/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mariapython/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mariapython/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/mariapython/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mariapython/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/mariapython/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/mariapython/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/mariapython/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/mariapython/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/mariapython/incubator-beam/subscription","commits_url":"https://api.github.com/repos/mariapython/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/mariapython/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/mariapython/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/mariapython/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/mariapython/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/mariapython/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mariapython/incubator-beam/merges","archive_url":"https://api.github.com/repos/mariapython/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mariapython/incubator-beam/downloads","issues_url":"https://api.github.com/repos/mariapython/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/mariapython/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/mariapython/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/mariapython/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mariapython/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/mariapython/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/mariapython/incubator-beam/deployments","created_at":"2016-08-19T13:55:45Z","updated_at":"2016-08-19T13:55:50Z","pushed_at":"2016-08-31T09:00:26Z","git_url":"git://github.com/mariapython/incubator-beam.git","ssh_url":"git@github.com:mariapython/incubator-beam.git","clone_url":"https://github.com/mariapython/incubator-beam.git","svn_url":"https://github.com/mariapython/incubator-beam","homepage":null,"size":18278,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"apache:python-sdk","ref":"python-sdk","sha":"0af0150170724bcf62b69a54a9b927f1ceea6fc7","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":50904245,"name":"incubator-beam","full_name":"apache/incubator-beam","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/incubator-beam","description":"Mirror of Apache Beam (Incubating)","fork":false,"url":"https://api.github.com/repos/apache/incubator-beam","forks_url":"https://api.github.com/repos/apache/incubator-beam/forks","keys_url":"https://api.github.com/repos/apache/incubator-beam/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/incubator-beam/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/incubator-beam/teams","hooks_url":"https://api.github.com/repos/apache/incubator-beam/hooks","issue_events_url":"https://api.github.com/repos/apache/incubator-beam/issues/events{/number}","events_url":"https://api.github.com/repos/apache/incubator-beam/events","assignees_url":"https://api.github.com/repos/apache/incubator-beam/assignees{/user}","branches_url":"https://api.github.com/repos/apache/incubator-beam/branches{/branch}","tags_url":"https://api.github.com/repos/apache/incubator-beam/tags","blobs_url":"https://api.github.com/repos/apache/incubator-beam/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/incubator-beam/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/incubator-beam/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/incubator-beam/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/incubator-beam/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/incubator-beam/languages","stargazers_url":"https://api.github.com/repos/apache/incubator-beam/stargazers","contributors_url":"https://api.github.com/repos/apache/incubator-beam/contributors","subscribers_url":"https://api.github.com/repos/apache/incubator-beam/subscribers","subscription_url":"https://api.github.com/repos/apache/incubator-beam/subscription","commits_url":"https://api.github.com/repos/apache/incubator-beam/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/incubator-beam/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/incubator-beam/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/incubator-beam/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/incubator-beam/contents/{+path}","compare_url":"https://api.github.com/repos/apache/incubator-beam/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/incubator-beam/merges","archive_url":"https://api.github.com/repos/apache/incubator-beam/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/incubator-beam/downloads","issues_url":"https://api.github.com/repos/apache/incubator-beam/issues{/number}","pulls_url":"https://api.github.com/repos/apache/incubator-beam/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/incubator-beam/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/incubator-beam/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/incubator-beam/labels{/name}","releases_url":"https://api.github.com/repos/apache/incubator-beam/releases{/id}","deployments_url":"https://api.github.com/repos/apache/incubator-beam/deployments","created_at":"2016-02-02T08:00:06Z","updated_at":"2016-08-31T12:44:39Z","pushed_at":"2016-08-31T16:36:46Z","git_url":"git://github.com/apache/incubator-beam.git","ssh_url":"git@github.com:apache/incubator-beam.git","clone_url":"https://github.com/apache/incubator-beam.git","svn_url":"https://github.com/apache/incubator-beam","homepage":null,"size":27443,"stargazers_count":329,"watchers_count":329,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":202,"mirror_url":"git://git.apache.org/incubator-beam.git","open_issues_count":50,"forks":202,"open_issues":50,"watchers":329,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/903"},"html":{"href":"https://github.com/apache/incubator-beam/pull/903"},"issue":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/903"},"comments":{"href":"https://api.github.com/repos/apache/incubator-beam/issues/903/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/903/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/incubator-beam/pulls/903/commits"},"statuses":{"href":"https://api.github.com/repos/apache/incubator-beam/statuses/f192f879bdb5b7f5416f3801c15273ec7ab1b1b1"}}}}
{"actor":{"display_login":"aaltay"}}