{"action":"created","comment":{"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/comments/84833869","pull_request_review_id":5584882,"id":84833869,"diff_hunk":"@@ -0,0 +1,80 @@\n+#!/usr/bin/env/python3\n+\"\"\"\n+LAB: Files\n+October 20, 2016\n+\"\"\"\n+\n+import os\n+\n+# Paths and File Processing\n+def list_files():\n+\n+    cwd = os.getcwd()\n+\n+    for file in os.listdir(cwd):\n+        print(os.path.abspath(file))\n+ \n+list_files()\n+print()\n+\n+\n+def copy_file(f_name):\n+\n+    f_size = os.stat(f_name)\n+    f_size = f_size.st_size\n+\n+    f = open(f_name,'rb')\n+\n+    counter = 0\n+    output = open('copy_' + f_name,'wb')\n+\n+    while counter <= f_size:\n+        f_section = f.read(counter)\n+        counter += 1\n+        output.write(f_section)\n+\n+    output.close()\n+    f.close()\n+    print(f_name + \" copied as copy_\" + f_name)\n+\n+copy_file('students.txt')\n+print()\n+\n+# File reading and parsing\n+\n+def process_file():\n+    \n+    lines = open('students.txt','r').readlines()\n+\n+    del lines[0]\n+\n+    dict_lang = {}\n+\n+    for i in range(0,len(lines)):\n+        languages = lines[i].split(':')[-1]\n+        languages = languages.strip('\" \"\\n\\t')\n+        languages = languages.lower()\n+        languages = languages.split(',')\n+\n+        for j in range(0,len(languages)):\n+            if languages[j] not in dict_lang.keys():\n+                dict_lang[languages[j]] = 1\n+            else:\n+                current = dict_lang[languages[j]]\n+                dict_lang[languages[j]] = current + 1\n+\n+    print(dict_lang)\n+\n+process_file()\n+","path":"students/jbearer/session04/file_lab.py","position":69,"original_position":69,"commit_id":"b6d000022aa0b529db3d910721c29486a3669b15","original_commit_id":"b6d000022aa0b529db3d910721c29486a3669b15","user":{"login":"PythonCHB","id":1840917,"avatar_url":"https://avatars.githubusercontent.com/u/1840917?v=3","gravatar_id":"","url":"https://api.github.com/users/PythonCHB","html_url":"https://github.com/PythonCHB","followers_url":"https://api.github.com/users/PythonCHB/followers","following_url":"https://api.github.com/users/PythonCHB/following{/other_user}","gists_url":"https://api.github.com/users/PythonCHB/gists{/gist_id}","starred_url":"https://api.github.com/users/PythonCHB/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PythonCHB/subscriptions","organizations_url":"https://api.github.com/users/PythonCHB/orgs","repos_url":"https://api.github.com/users/PythonCHB/repos","events_url":"https://api.github.com/users/PythonCHB/events{/privacy}","received_events_url":"https://api.github.com/users/PythonCHB/received_events","type":"User","site_admin":false},"body":"nice work -- you're getting it.","created_at":"2016-10-25T05:40:53Z","updated_at":"2016-10-25T05:45:40Z","html_url":"https://github.com/UWPCE-PythonCert/IntroPython2016/pull/72#discussion_r84833869","pull_request_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72","_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/comments/84833869"},"html":{"href":"https://github.com/UWPCE-PythonCert/IntroPython2016/pull/72#discussion_r84833869"},"pull_request":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72"}}},"pull_request":{"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72","id":90312289,"html_url":"https://github.com/UWPCE-PythonCert/IntroPython2016/pull/72","diff_url":"https://github.com/UWPCE-PythonCert/IntroPython2016/pull/72.diff","patch_url":"https://github.com/UWPCE-PythonCert/IntroPython2016/pull/72.patch","issue_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues/72","number":72,"state":"open","locked":false,"title":"Dictionary and Sets Lab Completed","user":{"login":"jerbear4","id":22487889,"avatar_url":"https://avatars.githubusercontent.com/u/22487889?v=3","gravatar_id":"","url":"https://api.github.com/users/jerbear4","html_url":"https://github.com/jerbear4","followers_url":"https://api.github.com/users/jerbear4/followers","following_url":"https://api.github.com/users/jerbear4/following{/other_user}","gists_url":"https://api.github.com/users/jerbear4/gists{/gist_id}","starred_url":"https://api.github.com/users/jerbear4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerbear4/subscriptions","organizations_url":"https://api.github.com/users/jerbear4/orgs","repos_url":"https://api.github.com/users/jerbear4/repos","events_url":"https://api.github.com/users/jerbear4/events{/privacy}","received_events_url":"https://api.github.com/users/jerbear4/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-21T02:10:12Z","updated_at":"2016-10-25T05:45:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3563d04f3dcdb35e1120247f2de95eb251ed841d","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72/commits","review_comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72/comments","review_comment_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues/72/comments","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/statuses/b6d000022aa0b529db3d910721c29486a3669b15","head":{"label":"jerbear4:master","ref":"master","sha":"b6d000022aa0b529db3d910721c29486a3669b15","user":{"login":"jerbear4","id":22487889,"avatar_url":"https://avatars.githubusercontent.com/u/22487889?v=3","gravatar_id":"","url":"https://api.github.com/users/jerbear4","html_url":"https://github.com/jerbear4","followers_url":"https://api.github.com/users/jerbear4/followers","following_url":"https://api.github.com/users/jerbear4/following{/other_user}","gists_url":"https://api.github.com/users/jerbear4/gists{/gist_id}","starred_url":"https://api.github.com/users/jerbear4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerbear4/subscriptions","organizations_url":"https://api.github.com/users/jerbear4/orgs","repos_url":"https://api.github.com/users/jerbear4/repos","events_url":"https://api.github.com/users/jerbear4/events{/privacy}","received_events_url":"https://api.github.com/users/jerbear4/received_events","type":"User","site_admin":false},"repo":{"id":70020887,"name":"IntroPython2016","full_name":"jerbear4/IntroPython2016","owner":{"login":"jerbear4","id":22487889,"avatar_url":"https://avatars.githubusercontent.com/u/22487889?v=3","gravatar_id":"","url":"https://api.github.com/users/jerbear4","html_url":"https://github.com/jerbear4","followers_url":"https://api.github.com/users/jerbear4/followers","following_url":"https://api.github.com/users/jerbear4/following{/other_user}","gists_url":"https://api.github.com/users/jerbear4/gists{/gist_id}","starred_url":"https://api.github.com/users/jerbear4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerbear4/subscriptions","organizations_url":"https://api.github.com/users/jerbear4/orgs","repos_url":"https://api.github.com/users/jerbear4/repos","events_url":"https://api.github.com/users/jerbear4/events{/privacy}","received_events_url":"https://api.github.com/users/jerbear4/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jerbear4/IntroPython2016","description":"Student class repository","fork":true,"url":"https://api.github.com/repos/jerbear4/IntroPython2016","forks_url":"https://api.github.com/repos/jerbear4/IntroPython2016/forks","keys_url":"https://api.github.com/repos/jerbear4/IntroPython2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jerbear4/IntroPython2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jerbear4/IntroPython2016/teams","hooks_url":"https://api.github.com/repos/jerbear4/IntroPython2016/hooks","issue_events_url":"https://api.github.com/repos/jerbear4/IntroPython2016/issues/events{/number}","events_url":"https://api.github.com/repos/jerbear4/IntroPython2016/events","assignees_url":"https://api.github.com/repos/jerbear4/IntroPython2016/assignees{/user}","branches_url":"https://api.github.com/repos/jerbear4/IntroPython2016/branches{/branch}","tags_url":"https://api.github.com/repos/jerbear4/IntroPython2016/tags","blobs_url":"https://api.github.com/repos/jerbear4/IntroPython2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jerbear4/IntroPython2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jerbear4/IntroPython2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/jerbear4/IntroPython2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jerbear4/IntroPython2016/statuses/{sha}","languages_url":"https://api.github.com/repos/jerbear4/IntroPython2016/languages","stargazers_url":"https://api.github.com/repos/jerbear4/IntroPython2016/stargazers","contributors_url":"https://api.github.com/repos/jerbear4/IntroPython2016/contributors","subscribers_url":"https://api.github.com/repos/jerbear4/IntroPython2016/subscribers","subscription_url":"https://api.github.com/repos/jerbear4/IntroPython2016/subscription","commits_url":"https://api.github.com/repos/jerbear4/IntroPython2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/jerbear4/IntroPython2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/jerbear4/IntroPython2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/jerbear4/IntroPython2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/jerbear4/IntroPython2016/contents/{+path}","compare_url":"https://api.github.com/repos/jerbear4/IntroPython2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jerbear4/IntroPython2016/merges","archive_url":"https://api.github.com/repos/jerbear4/IntroPython2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jerbear4/IntroPython2016/downloads","issues_url":"https://api.github.com/repos/jerbear4/IntroPython2016/issues{/number}","pulls_url":"https://api.github.com/repos/jerbear4/IntroPython2016/pulls{/number}","milestones_url":"https://api.github.com/repos/jerbear4/IntroPython2016/milestones{/number}","notifications_url":"https://api.github.com/repos/jerbear4/IntroPython2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jerbear4/IntroPython2016/labels{/name}","releases_url":"https://api.github.com/repos/jerbear4/IntroPython2016/releases{/id}","deployments_url":"https://api.github.com/repos/jerbear4/IntroPython2016/deployments","created_at":"2016-10-05T01:28:22Z","updated_at":"2016-10-23T21:10:27Z","pushed_at":"2016-10-24T01:53:37Z","git_url":"git://github.com/jerbear4/IntroPython2016.git","ssh_url":"git@github.com:jerbear4/IntroPython2016.git","clone_url":"https://github.com/jerbear4/IntroPython2016.git","svn_url":"https://github.com/jerbear4/IntroPython2016","homepage":null,"size":529,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"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":"UWPCE-PythonCert:master","ref":"master","sha":"70549fba82c610d14683cd9217834cee52d462b9","user":{"login":"UWPCE-PythonCert","id":5218825,"avatar_url":"https://avatars.githubusercontent.com/u/5218825?v=3","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert","html_url":"https://github.com/UWPCE-PythonCert","followers_url":"https://api.github.com/users/UWPCE-PythonCert/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert/received_events","type":"Organization","site_admin":false},"repo":{"id":70018001,"name":"IntroPython2016","full_name":"UWPCE-PythonCert/IntroPython2016","owner":{"login":"UWPCE-PythonCert","id":5218825,"avatar_url":"https://avatars.githubusercontent.com/u/5218825?v=3","gravatar_id":"","url":"https://api.github.com/users/UWPCE-PythonCert","html_url":"https://github.com/UWPCE-PythonCert","followers_url":"https://api.github.com/users/UWPCE-PythonCert/followers","following_url":"https://api.github.com/users/UWPCE-PythonCert/following{/other_user}","gists_url":"https://api.github.com/users/UWPCE-PythonCert/gists{/gist_id}","starred_url":"https://api.github.com/users/UWPCE-PythonCert/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UWPCE-PythonCert/subscriptions","organizations_url":"https://api.github.com/users/UWPCE-PythonCert/orgs","repos_url":"https://api.github.com/users/UWPCE-PythonCert/repos","events_url":"https://api.github.com/users/UWPCE-PythonCert/events{/privacy}","received_events_url":"https://api.github.com/users/UWPCE-PythonCert/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UWPCE-PythonCert/IntroPython2016","description":"Student class repository","fork":false,"url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016","forks_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/forks","keys_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/teams","hooks_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/hooks","issue_events_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues/events{/number}","events_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/events","assignees_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/assignees{/user}","branches_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/branches{/branch}","tags_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/tags","blobs_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/git/refs{/sha}","trees_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/statuses/{sha}","languages_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/languages","stargazers_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/stargazers","contributors_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/contributors","subscribers_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/subscribers","subscription_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/subscription","commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/commits{/sha}","git_commits_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/git/commits{/sha}","comments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/comments{/number}","issue_comment_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues/comments{/number}","contents_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/contents/{+path}","compare_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/merges","archive_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/downloads","issues_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues{/number}","pulls_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls{/number}","milestones_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/milestones{/number}","notifications_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/labels{/name}","releases_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/releases{/id}","deployments_url":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/deployments","created_at":"2016-10-05T00:28:33Z","updated_at":"2016-10-22T02:35:43Z","pushed_at":"2016-10-25T04:48:38Z","git_url":"git://github.com/UWPCE-PythonCert/IntroPython2016.git","ssh_url":"git@github.com:UWPCE-PythonCert/IntroPython2016.git","clone_url":"https://github.com/UWPCE-PythonCert/IntroPython2016.git","svn_url":"https://github.com/UWPCE-PythonCert/IntroPython2016","homepage":null,"size":5136,"stargazers_count":3,"watchers_count":3,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":6,"forks":31,"open_issues":6,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72"},"html":{"href":"https://github.com/UWPCE-PythonCert/IntroPython2016/pull/72"},"issue":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues/72"},"comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/issues/72/comments"},"review_comments":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72/comments"},"review_comment":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/pulls/72/commits"},"statuses":{"href":"https://api.github.com/repos/UWPCE-PythonCert/IntroPython2016/statuses/b6d000022aa0b529db3d910721c29486a3669b15"}}}}
{"actor":{"display_login":"PythonCHB"}}