{"action":"created","comment":{"url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/comments/28698166","id":28698166,"diff_hunk":"@@ -5,24 +5,89 @@\n import sys, os\n import tempfile\n import shutil\n+import argparse\n+\n+\n+# Parsing arguments\n+parser = argparse.ArgumentParser()\n+parser.add_argument(\"-i\", \"--input\", dest=\"input_path\", required=True, help=\"Path to the input text file.\")\n+parser.add_argument(\"-n\", \"--ngram-size\", dest=\"ngram_size\", required=True, type=int, help=\"Ngram Size.\")\n+parser.add_argument(\"-o\", \"--output\", dest=\"output_path\", help=\"Path to memory mapped output file.\")\n+parser.add_argument(\"-t\", \"--output-text\", dest=\"output_text_path\", help=\"Path to text output file.\")\n+\n+# Mutually exculsive group of pruning arguments\n+prune_args = parser.add_mutually_exclusive_group()","path":"memmap_dataset.py","position":15,"original_position":15,"commit_id":"aaf530f49722f8036a4e98a47df72f9d45e1ce8f","original_commit_id":"aaf530f49722f8036a4e98a47df72f9d45e1ce8f","user":{"login":"kavehtaghipour","id":3540346,"avatar_url":"https://avatars.githubusercontent.com/u/3540346?v=3","gravatar_id":"","url":"https://api.github.com/users/kavehtaghipour","html_url":"https://github.com/kavehtaghipour","followers_url":"https://api.github.com/users/kavehtaghipour/followers","following_url":"https://api.github.com/users/kavehtaghipour/following{/other_user}","gists_url":"https://api.github.com/users/kavehtaghipour/gists{/gist_id}","starred_url":"https://api.github.com/users/kavehtaghipour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kavehtaghipour/subscriptions","organizations_url":"https://api.github.com/users/kavehtaghipour/orgs","repos_url":"https://api.github.com/users/kavehtaghipour/repos","events_url":"https://api.github.com/users/kavehtaghipour/events{/privacy}","received_events_url":"https://api.github.com/users/kavehtaghipour/received_events","type":"User","site_admin":false},"body":"Add required=true here. Explicitly using these arguments is better than falling back to default values. It reduces the chance of making a mistake.","created_at":"2015-04-20T15:23:24Z","updated_at":"2015-04-20T15:23:24Z","html_url":"https://github.com/kavehtaghipour/PrimeLM/pull/5#discussion_r28698166","pull_request_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/comments/28698166"},"html":{"href":"https://github.com/kavehtaghipour/PrimeLM/pull/5#discussion_r28698166"},"pull_request":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5","id":33670339,"html_url":"https://github.com/kavehtaghipour/PrimeLM/pull/5","diff_url":"https://github.com/kavehtaghipour/PrimeLM/pull/5.diff","patch_url":"https://github.com/kavehtaghipour/PrimeLM/pull/5.patch","issue_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues/5","number":5,"state":"open","locked":false,"title":"Resolved the issues. Tested once all cases.","user":{"login":"shamilcm","id":642864,"avatar_url":"https://avatars.githubusercontent.com/u/642864?v=3","gravatar_id":"","url":"https://api.github.com/users/shamilcm","html_url":"https://github.com/shamilcm","followers_url":"https://api.github.com/users/shamilcm/followers","following_url":"https://api.github.com/users/shamilcm/following{/other_user}","gists_url":"https://api.github.com/users/shamilcm/gists{/gist_id}","starred_url":"https://api.github.com/users/shamilcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamilcm/subscriptions","organizations_url":"https://api.github.com/users/shamilcm/orgs","repos_url":"https://api.github.com/users/shamilcm/repos","events_url":"https://api.github.com/users/shamilcm/events{/privacy}","received_events_url":"https://api.github.com/users/shamilcm/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-04-20T14:26:53Z","updated_at":"2015-04-20T15:23:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8ee5733fd32f6274eb0bc81d7041ca057f6922a3","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5/commits","review_comments_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5/comments","review_comment_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues/5/comments","statuses_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/statuses/aaf530f49722f8036a4e98a47df72f9d45e1ce8f","head":{"label":"shamilcm:draft","ref":"draft","sha":"aaf530f49722f8036a4e98a47df72f9d45e1ce8f","user":{"login":"shamilcm","id":642864,"avatar_url":"https://avatars.githubusercontent.com/u/642864?v=3","gravatar_id":"","url":"https://api.github.com/users/shamilcm","html_url":"https://github.com/shamilcm","followers_url":"https://api.github.com/users/shamilcm/followers","following_url":"https://api.github.com/users/shamilcm/following{/other_user}","gists_url":"https://api.github.com/users/shamilcm/gists{/gist_id}","starred_url":"https://api.github.com/users/shamilcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamilcm/subscriptions","organizations_url":"https://api.github.com/users/shamilcm/orgs","repos_url":"https://api.github.com/users/shamilcm/repos","events_url":"https://api.github.com/users/shamilcm/events{/privacy}","received_events_url":"https://api.github.com/users/shamilcm/received_events","type":"User","site_admin":false},"repo":{"id":34119930,"name":"PrimeLM","full_name":"shamilcm/PrimeLM","owner":{"login":"shamilcm","id":642864,"avatar_url":"https://avatars.githubusercontent.com/u/642864?v=3","gravatar_id":"","url":"https://api.github.com/users/shamilcm","html_url":"https://github.com/shamilcm","followers_url":"https://api.github.com/users/shamilcm/followers","following_url":"https://api.github.com/users/shamilcm/following{/other_user}","gists_url":"https://api.github.com/users/shamilcm/gists{/gist_id}","starred_url":"https://api.github.com/users/shamilcm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shamilcm/subscriptions","organizations_url":"https://api.github.com/users/shamilcm/orgs","repos_url":"https://api.github.com/users/shamilcm/repos","events_url":"https://api.github.com/users/shamilcm/events{/privacy}","received_events_url":"https://api.github.com/users/shamilcm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shamilcm/PrimeLM","description":"","fork":true,"url":"https://api.github.com/repos/shamilcm/PrimeLM","forks_url":"https://api.github.com/repos/shamilcm/PrimeLM/forks","keys_url":"https://api.github.com/repos/shamilcm/PrimeLM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shamilcm/PrimeLM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shamilcm/PrimeLM/teams","hooks_url":"https://api.github.com/repos/shamilcm/PrimeLM/hooks","issue_events_url":"https://api.github.com/repos/shamilcm/PrimeLM/issues/events{/number}","events_url":"https://api.github.com/repos/shamilcm/PrimeLM/events","assignees_url":"https://api.github.com/repos/shamilcm/PrimeLM/assignees{/user}","branches_url":"https://api.github.com/repos/shamilcm/PrimeLM/branches{/branch}","tags_url":"https://api.github.com/repos/shamilcm/PrimeLM/tags","blobs_url":"https://api.github.com/repos/shamilcm/PrimeLM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shamilcm/PrimeLM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shamilcm/PrimeLM/git/refs{/sha}","trees_url":"https://api.github.com/repos/shamilcm/PrimeLM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shamilcm/PrimeLM/statuses/{sha}","languages_url":"https://api.github.com/repos/shamilcm/PrimeLM/languages","stargazers_url":"https://api.github.com/repos/shamilcm/PrimeLM/stargazers","contributors_url":"https://api.github.com/repos/shamilcm/PrimeLM/contributors","subscribers_url":"https://api.github.com/repos/shamilcm/PrimeLM/subscribers","subscription_url":"https://api.github.com/repos/shamilcm/PrimeLM/subscription","commits_url":"https://api.github.com/repos/shamilcm/PrimeLM/commits{/sha}","git_commits_url":"https://api.github.com/repos/shamilcm/PrimeLM/git/commits{/sha}","comments_url":"https://api.github.com/repos/shamilcm/PrimeLM/comments{/number}","issue_comment_url":"https://api.github.com/repos/shamilcm/PrimeLM/issues/comments{/number}","contents_url":"https://api.github.com/repos/shamilcm/PrimeLM/contents/{+path}","compare_url":"https://api.github.com/repos/shamilcm/PrimeLM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shamilcm/PrimeLM/merges","archive_url":"https://api.github.com/repos/shamilcm/PrimeLM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shamilcm/PrimeLM/downloads","issues_url":"https://api.github.com/repos/shamilcm/PrimeLM/issues{/number}","pulls_url":"https://api.github.com/repos/shamilcm/PrimeLM/pulls{/number}","milestones_url":"https://api.github.com/repos/shamilcm/PrimeLM/milestones{/number}","notifications_url":"https://api.github.com/repos/shamilcm/PrimeLM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shamilcm/PrimeLM/labels{/name}","releases_url":"https://api.github.com/repos/shamilcm/PrimeLM/releases{/id}","created_at":"2015-04-17T14:02:39Z","updated_at":"2015-04-17T18:22:01Z","pushed_at":"2015-04-20T14:23:35Z","git_url":"git://github.com/shamilcm/PrimeLM.git","ssh_url":"git@github.com:shamilcm/PrimeLM.git","clone_url":"https://github.com/shamilcm/PrimeLM.git","svn_url":"https://github.com/shamilcm/PrimeLM","homepage":null,"size":0,"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":"kavehtaghipour:master","ref":"master","sha":"2ce60cf7958d44baccc7479ae1925b3803030499","user":{"login":"kavehtaghipour","id":3540346,"avatar_url":"https://avatars.githubusercontent.com/u/3540346?v=3","gravatar_id":"","url":"https://api.github.com/users/kavehtaghipour","html_url":"https://github.com/kavehtaghipour","followers_url":"https://api.github.com/users/kavehtaghipour/followers","following_url":"https://api.github.com/users/kavehtaghipour/following{/other_user}","gists_url":"https://api.github.com/users/kavehtaghipour/gists{/gist_id}","starred_url":"https://api.github.com/users/kavehtaghipour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kavehtaghipour/subscriptions","organizations_url":"https://api.github.com/users/kavehtaghipour/orgs","repos_url":"https://api.github.com/users/kavehtaghipour/repos","events_url":"https://api.github.com/users/kavehtaghipour/events{/privacy}","received_events_url":"https://api.github.com/users/kavehtaghipour/received_events","type":"User","site_admin":false},"repo":{"id":34102252,"name":"PrimeLM","full_name":"kavehtaghipour/PrimeLM","owner":{"login":"kavehtaghipour","id":3540346,"avatar_url":"https://avatars.githubusercontent.com/u/3540346?v=3","gravatar_id":"","url":"https://api.github.com/users/kavehtaghipour","html_url":"https://github.com/kavehtaghipour","followers_url":"https://api.github.com/users/kavehtaghipour/followers","following_url":"https://api.github.com/users/kavehtaghipour/following{/other_user}","gists_url":"https://api.github.com/users/kavehtaghipour/gists{/gist_id}","starred_url":"https://api.github.com/users/kavehtaghipour/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kavehtaghipour/subscriptions","organizations_url":"https://api.github.com/users/kavehtaghipour/orgs","repos_url":"https://api.github.com/users/kavehtaghipour/repos","events_url":"https://api.github.com/users/kavehtaghipour/events{/privacy}","received_events_url":"https://api.github.com/users/kavehtaghipour/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kavehtaghipour/PrimeLM","description":"","fork":false,"url":"https://api.github.com/repos/kavehtaghipour/PrimeLM","forks_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/forks","keys_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/teams","hooks_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/hooks","issue_events_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues/events{/number}","events_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/events","assignees_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/assignees{/user}","branches_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/branches{/branch}","tags_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/tags","blobs_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/git/refs{/sha}","trees_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/statuses/{sha}","languages_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/languages","stargazers_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/stargazers","contributors_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/contributors","subscribers_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/subscribers","subscription_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/subscription","commits_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/commits{/sha}","git_commits_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/git/commits{/sha}","comments_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/comments{/number}","issue_comment_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues/comments{/number}","contents_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/contents/{+path}","compare_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/merges","archive_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/downloads","issues_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues{/number}","pulls_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls{/number}","milestones_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/milestones{/number}","notifications_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/labels{/name}","releases_url":"https://api.github.com/repos/kavehtaghipour/PrimeLM/releases{/id}","created_at":"2015-04-17T07:17:06Z","updated_at":"2015-04-20T06:58:43Z","pushed_at":"2015-04-20T14:26:53Z","git_url":"git://github.com/kavehtaghipour/PrimeLM.git","ssh_url":"git@github.com:kavehtaghipour/PrimeLM.git","clone_url":"https://github.com/kavehtaghipour/PrimeLM.git","svn_url":"https://github.com/kavehtaghipour/PrimeLM","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":3,"forks":1,"open_issues":3,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5"},"html":{"href":"https://github.com/kavehtaghipour/PrimeLM/pull/5"},"issue":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues/5"},"comments":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/kavehtaghipour/PrimeLM/statuses/aaf530f49722f8036a4e98a47df72f9d45e1ce8f"}}}}