{"action":"created","comment":{"url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments/42830677","id":42830677,"diff_hunk":"@@ -0,0 +1,35 @@\n+import findspark\n+findspark.init()\n+import pyspark\n+sc = pyspark.SparkContext(appName=\"\")\n+import re\n+import random\n+\n+## Note that to I have excluded the licensen information from the downloaded for text for better accuracy\n+## Pre-process the text to create a list of words without all caps, all caps with an ending period, and all nums\n+llist = sc.textFile('source.txt')\n+wlist = llist.flatMap(lambda x: x.split())\n+wlist_filtered = wlist.filter(lambda x: (not x[:-1].isupper()) if x[-1] == '.' else ((not x.isupper()) and (not x.isdigit())))","path":"HW1/P6/P6.py","position":12,"original_position":12,"commit_id":"15bdac5479a9244cde8eb3a49ac16abc47c2a625","original_commit_id":"15bdac5479a9244cde8eb3a49ac16abc47c2a625","user":{"login":"georgeqi94","id":6043012,"avatar_url":"https://avatars.githubusercontent.com/u/6043012?v=3","gravatar_id":"","url":"https://api.github.com/users/georgeqi94","html_url":"https://github.com/georgeqi94","followers_url":"https://api.github.com/users/georgeqi94/followers","following_url":"https://api.github.com/users/georgeqi94/following{/other_user}","gists_url":"https://api.github.com/users/georgeqi94/gists{/gist_id}","starred_url":"https://api.github.com/users/georgeqi94/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/georgeqi94/subscriptions","organizations_url":"https://api.github.com/users/georgeqi94/orgs","repos_url":"https://api.github.com/users/georgeqi94/repos","events_url":"https://api.github.com/users/georgeqi94/events{/privacy}","received_events_url":"https://api.github.com/users/georgeqi94/received_events","type":"User","site_admin":false},"body":"I believe you can just check if x.isupper() or x.isdigit()\r\n\r\n\"HELLO.\".isupper() returns True, so the additional check for the period seems repetitive","created_at":"2015-10-23T03:35:49Z","updated_at":"2015-10-23T03:35:49Z","html_url":"https://github.com/harvard-cs205/cs205-homework/pull/254#discussion_r42830677","pull_request_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254","_links":{"self":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/comments/42830677"},"html":{"href":"https://github.com/harvard-cs205/cs205-homework/pull/254#discussion_r42830677"},"pull_request":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254"}}},"pull_request":{"url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254","id":46859925,"html_url":"https://github.com/harvard-cs205/cs205-homework/pull/254","diff_url":"https://github.com/harvard-cs205/cs205-homework/pull/254.diff","patch_url":"https://github.com/harvard-cs205/cs205-homework/pull/254.patch","issue_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/254","number":254,"state":"open","locked":false,"title":"Hw1","user":{"login":"jack91an","id":14024918,"avatar_url":"https://avatars.githubusercontent.com/u/14024918?v=3","gravatar_id":"","url":"https://api.github.com/users/jack91an","html_url":"https://github.com/jack91an","followers_url":"https://api.github.com/users/jack91an/followers","following_url":"https://api.github.com/users/jack91an/following{/other_user}","gists_url":"https://api.github.com/users/jack91an/gists{/gist_id}","starred_url":"https://api.github.com/users/jack91an/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack91an/subscriptions","organizations_url":"https://api.github.com/users/jack91an/orgs","repos_url":"https://api.github.com/users/jack91an/repos","events_url":"https://api.github.com/users/jack91an/events{/privacy}","received_events_url":"https://api.github.com/users/jack91an/received_events","type":"User","site_admin":false},"body":"Learned Spark the hard way! Problem 5 part 2 is currently not started.\r\n\r\n- P2\r\n- P3\r\n- P4\r\n- P5 (bfs only)\r\n- P6","created_at":"2015-10-06T03:46:43Z","updated_at":"2015-10-23T03:35:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"6ff5afce99a18c9c57b0033b121ada2d789c319a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254/commits","review_comments_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254/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/254/comments","statuses_url":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/15bdac5479a9244cde8eb3a49ac16abc47c2a625","head":{"label":"jack91an:HW1","ref":"HW1","sha":"15bdac5479a9244cde8eb3a49ac16abc47c2a625","user":{"login":"jack91an","id":14024918,"avatar_url":"https://avatars.githubusercontent.com/u/14024918?v=3","gravatar_id":"","url":"https://api.github.com/users/jack91an","html_url":"https://github.com/jack91an","followers_url":"https://api.github.com/users/jack91an/followers","following_url":"https://api.github.com/users/jack91an/following{/other_user}","gists_url":"https://api.github.com/users/jack91an/gists{/gist_id}","starred_url":"https://api.github.com/users/jack91an/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack91an/subscriptions","organizations_url":"https://api.github.com/users/jack91an/orgs","repos_url":"https://api.github.com/users/jack91an/repos","events_url":"https://api.github.com/users/jack91an/events{/privacy}","received_events_url":"https://api.github.com/users/jack91an/received_events","type":"User","site_admin":false},"repo":{"id":42131628,"name":"cs205-homework","full_name":"jack91an/cs205-homework","owner":{"login":"jack91an","id":14024918,"avatar_url":"https://avatars.githubusercontent.com/u/14024918?v=3","gravatar_id":"","url":"https://api.github.com/users/jack91an","html_url":"https://github.com/jack91an","followers_url":"https://api.github.com/users/jack91an/followers","following_url":"https://api.github.com/users/jack91an/following{/other_user}","gists_url":"https://api.github.com/users/jack91an/gists{/gist_id}","starred_url":"https://api.github.com/users/jack91an/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jack91an/subscriptions","organizations_url":"https://api.github.com/users/jack91an/orgs","repos_url":"https://api.github.com/users/jack91an/repos","events_url":"https://api.github.com/users/jack91an/events{/privacy}","received_events_url":"https://api.github.com/users/jack91an/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jack91an/cs205-homework","description":"","fork":true,"url":"https://api.github.com/repos/jack91an/cs205-homework","forks_url":"https://api.github.com/repos/jack91an/cs205-homework/forks","keys_url":"https://api.github.com/repos/jack91an/cs205-homework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jack91an/cs205-homework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jack91an/cs205-homework/teams","hooks_url":"https://api.github.com/repos/jack91an/cs205-homework/hooks","issue_events_url":"https://api.github.com/repos/jack91an/cs205-homework/issues/events{/number}","events_url":"https://api.github.com/repos/jack91an/cs205-homework/events","assignees_url":"https://api.github.com/repos/jack91an/cs205-homework/assignees{/user}","branches_url":"https://api.github.com/repos/jack91an/cs205-homework/branches{/branch}","tags_url":"https://api.github.com/repos/jack91an/cs205-homework/tags","blobs_url":"https://api.github.com/repos/jack91an/cs205-homework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jack91an/cs205-homework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jack91an/cs205-homework/git/refs{/sha}","trees_url":"https://api.github.com/repos/jack91an/cs205-homework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jack91an/cs205-homework/statuses/{sha}","languages_url":"https://api.github.com/repos/jack91an/cs205-homework/languages","stargazers_url":"https://api.github.com/repos/jack91an/cs205-homework/stargazers","contributors_url":"https://api.github.com/repos/jack91an/cs205-homework/contributors","subscribers_url":"https://api.github.com/repos/jack91an/cs205-homework/subscribers","subscription_url":"https://api.github.com/repos/jack91an/cs205-homework/subscription","commits_url":"https://api.github.com/repos/jack91an/cs205-homework/commits{/sha}","git_commits_url":"https://api.github.com/repos/jack91an/cs205-homework/git/commits{/sha}","comments_url":"https://api.github.com/repos/jack91an/cs205-homework/comments{/number}","issue_comment_url":"https://api.github.com/repos/jack91an/cs205-homework/issues/comments{/number}","contents_url":"https://api.github.com/repos/jack91an/cs205-homework/contents/{+path}","compare_url":"https://api.github.com/repos/jack91an/cs205-homework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jack91an/cs205-homework/merges","archive_url":"https://api.github.com/repos/jack91an/cs205-homework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jack91an/cs205-homework/downloads","issues_url":"https://api.github.com/repos/jack91an/cs205-homework/issues{/number}","pulls_url":"https://api.github.com/repos/jack91an/cs205-homework/pulls{/number}","milestones_url":"https://api.github.com/repos/jack91an/cs205-homework/milestones{/number}","notifications_url":"https://api.github.com/repos/jack91an/cs205-homework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jack91an/cs205-homework/labels{/name}","releases_url":"https://api.github.com/repos/jack91an/cs205-homework/releases{/id}","created_at":"2015-09-08T18:36:40Z","updated_at":"2015-09-08T18:36:40Z","pushed_at":"2015-10-06T03:42:15Z","git_url":"git://github.com/jack91an/cs205-homework.git","ssh_url":"git@github.com:jack91an/cs205-homework.git","clone_url":"https://github.com/jack91an/cs205-homework.git","svn_url":"https://github.com/jack91an/cs205-homework","homepage":null,"size":3106,"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":"406f864b38a6c8a3d89cba66cb5228e98907bab7","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-10-21T20:18:24Z","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":80825,"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":267,"forks":99,"open_issues":267,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254"},"html":{"href":"https://github.com/harvard-cs205/cs205-homework/pull/254"},"issue":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/254"},"comments":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/issues/254/comments"},"review_comments":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/pulls/254/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/254/commits"},"statuses":{"href":"https://api.github.com/repos/harvard-cs205/cs205-homework/statuses/15bdac5479a9244cde8eb3a49ac16abc47c2a625"}}}}