{"action":"created","comment":{"url":"https://api.github.com/repos/ice109/sublinear/pulls/comments/59988331","id":59988331,"diff_hunk":"@@ -0,0 +1,71 @@\n+from itertools import product\n+import random\n+from collections import deque\n+\n+class Vertex():\n+    def __init__(self,name:str,value=None,children:list=None):\n+        if name is not None:\n+            self.name = name\n+        if value is not None:\n+            self.value = value\n+        else:\n+            self.value = None\n+\n+        if children is not None:\n+            self.children = children\n+        else:\n+            self.children = []\n+            # maybe cache misses will be bad?\n+            # Q is long long 8 bytes\n+            # self.children = array('Q')\n+\n+        self.visited = 0\n+        self.distance = 0\n+        self.parent = None\n+\n+    def __setattr__(self, item, value):\n+        self.__dict__[item] = value\n+        return self\n+\n+    def __str__(self):\n+        if self.value is not None:\n+            return str(self.value)\n+        else:\n+            return self.name","path":"graph.py","position":34,"original_position":34,"commit_id":"3880183e1ced8c3d0ad2230d844a6a7484973e65","original_commit_id":"3880183e1ced8c3d0ad2230d844a6a7484973e65","user":{"login":"ice109","id":5657668,"avatar_url":"https://avatars.githubusercontent.com/u/5657668?v=3","gravatar_id":"","url":"https://api.github.com/users/ice109","html_url":"https://github.com/ice109","followers_url":"https://api.github.com/users/ice109/followers","following_url":"https://api.github.com/users/ice109/following{/other_user}","gists_url":"https://api.github.com/users/ice109/gists{/gist_id}","starred_url":"https://api.github.com/users/ice109/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice109/subscriptions","organizations_url":"https://api.github.com/users/ice109/orgs","repos_url":"https://api.github.com/users/ice109/repos","events_url":"https://api.github.com/users/ice109/events{/privacy}","received_events_url":"https://api.github.com/users/ice109/received_events","type":"User","site_admin":false},"body":"You mean with the loose type induced by letting `name == None` sometimes?","created_at":"2016-04-17T17:05:37Z","updated_at":"2016-04-17T17:05:37Z","html_url":"https://github.com/ice109/sublinear/pull/1#discussion_r59988331","pull_request_url":"https://api.github.com/repos/ice109/sublinear/pulls/1","_links":{"self":{"href":"https://api.github.com/repos/ice109/sublinear/pulls/comments/59988331"},"html":{"href":"https://github.com/ice109/sublinear/pull/1#discussion_r59988331"},"pull_request":{"href":"https://api.github.com/repos/ice109/sublinear/pulls/1"}}},"pull_request":{"url":"https://api.github.com/repos/ice109/sublinear/pulls/1","id":66768518,"html_url":"https://github.com/ice109/sublinear/pull/1","diff_url":"https://github.com/ice109/sublinear/pull/1.diff","patch_url":"https://github.com/ice109/sublinear/pull/1.patch","issue_url":"https://api.github.com/repos/ice109/sublinear/issues/1","number":1,"state":"open","locked":false,"title":"Added oo representation of a graph","user":{"login":"akellehe","id":227095,"avatar_url":"https://avatars.githubusercontent.com/u/227095?v=3","gravatar_id":"","url":"https://api.github.com/users/akellehe","html_url":"https://github.com/akellehe","followers_url":"https://api.github.com/users/akellehe/followers","following_url":"https://api.github.com/users/akellehe/following{/other_user}","gists_url":"https://api.github.com/users/akellehe/gists{/gist_id}","starred_url":"https://api.github.com/users/akellehe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akellehe/subscriptions","organizations_url":"https://api.github.com/users/akellehe/orgs","repos_url":"https://api.github.com/users/akellehe/repos","events_url":"https://api.github.com/users/akellehe/events{/privacy}","received_events_url":"https://api.github.com/users/akellehe/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-17T13:39:08Z","updated_at":"2016-04-17T17:05:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"f1db932553077326e04070e8d606d6123ff4c1e6","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ice109/sublinear/pulls/1/commits","review_comments_url":"https://api.github.com/repos/ice109/sublinear/pulls/1/comments","review_comment_url":"https://api.github.com/repos/ice109/sublinear/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ice109/sublinear/issues/1/comments","statuses_url":"https://api.github.com/repos/ice109/sublinear/statuses/3880183e1ced8c3d0ad2230d844a6a7484973e65","head":{"label":"ice109:oo-graph-implementation","ref":"oo-graph-implementation","sha":"3880183e1ced8c3d0ad2230d844a6a7484973e65","user":{"login":"ice109","id":5657668,"avatar_url":"https://avatars.githubusercontent.com/u/5657668?v=3","gravatar_id":"","url":"https://api.github.com/users/ice109","html_url":"https://github.com/ice109","followers_url":"https://api.github.com/users/ice109/followers","following_url":"https://api.github.com/users/ice109/following{/other_user}","gists_url":"https://api.github.com/users/ice109/gists{/gist_id}","starred_url":"https://api.github.com/users/ice109/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice109/subscriptions","organizations_url":"https://api.github.com/users/ice109/orgs","repos_url":"https://api.github.com/users/ice109/repos","events_url":"https://api.github.com/users/ice109/events{/privacy}","received_events_url":"https://api.github.com/users/ice109/received_events","type":"User","site_admin":false},"repo":{"id":56346410,"name":"sublinear","full_name":"ice109/sublinear","owner":{"login":"ice109","id":5657668,"avatar_url":"https://avatars.githubusercontent.com/u/5657668?v=3","gravatar_id":"","url":"https://api.github.com/users/ice109","html_url":"https://github.com/ice109","followers_url":"https://api.github.com/users/ice109/followers","following_url":"https://api.github.com/users/ice109/following{/other_user}","gists_url":"https://api.github.com/users/ice109/gists{/gist_id}","starred_url":"https://api.github.com/users/ice109/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice109/subscriptions","organizations_url":"https://api.github.com/users/ice109/orgs","repos_url":"https://api.github.com/users/ice109/repos","events_url":"https://api.github.com/users/ice109/events{/privacy}","received_events_url":"https://api.github.com/users/ice109/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ice109/sublinear","description":"Sublinear algorithms for graph parameters","fork":false,"url":"https://api.github.com/repos/ice109/sublinear","forks_url":"https://api.github.com/repos/ice109/sublinear/forks","keys_url":"https://api.github.com/repos/ice109/sublinear/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ice109/sublinear/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ice109/sublinear/teams","hooks_url":"https://api.github.com/repos/ice109/sublinear/hooks","issue_events_url":"https://api.github.com/repos/ice109/sublinear/issues/events{/number}","events_url":"https://api.github.com/repos/ice109/sublinear/events","assignees_url":"https://api.github.com/repos/ice109/sublinear/assignees{/user}","branches_url":"https://api.github.com/repos/ice109/sublinear/branches{/branch}","tags_url":"https://api.github.com/repos/ice109/sublinear/tags","blobs_url":"https://api.github.com/repos/ice109/sublinear/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ice109/sublinear/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ice109/sublinear/git/refs{/sha}","trees_url":"https://api.github.com/repos/ice109/sublinear/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ice109/sublinear/statuses/{sha}","languages_url":"https://api.github.com/repos/ice109/sublinear/languages","stargazers_url":"https://api.github.com/repos/ice109/sublinear/stargazers","contributors_url":"https://api.github.com/repos/ice109/sublinear/contributors","subscribers_url":"https://api.github.com/repos/ice109/sublinear/subscribers","subscription_url":"https://api.github.com/repos/ice109/sublinear/subscription","commits_url":"https://api.github.com/repos/ice109/sublinear/commits{/sha}","git_commits_url":"https://api.github.com/repos/ice109/sublinear/git/commits{/sha}","comments_url":"https://api.github.com/repos/ice109/sublinear/comments{/number}","issue_comment_url":"https://api.github.com/repos/ice109/sublinear/issues/comments{/number}","contents_url":"https://api.github.com/repos/ice109/sublinear/contents/{+path}","compare_url":"https://api.github.com/repos/ice109/sublinear/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ice109/sublinear/merges","archive_url":"https://api.github.com/repos/ice109/sublinear/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ice109/sublinear/downloads","issues_url":"https://api.github.com/repos/ice109/sublinear/issues{/number}","pulls_url":"https://api.github.com/repos/ice109/sublinear/pulls{/number}","milestones_url":"https://api.github.com/repos/ice109/sublinear/milestones{/number}","notifications_url":"https://api.github.com/repos/ice109/sublinear/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ice109/sublinear/labels{/name}","releases_url":"https://api.github.com/repos/ice109/sublinear/releases{/id}","deployments_url":"https://api.github.com/repos/ice109/sublinear/deployments","created_at":"2016-04-15T19:59:09Z","updated_at":"2016-04-17T13:37:24Z","pushed_at":"2016-04-17T13:39:08Z","git_url":"git://github.com/ice109/sublinear.git","ssh_url":"git@github.com:ice109/sublinear.git","clone_url":"https://github.com/ice109/sublinear.git","svn_url":"https://github.com/ice109/sublinear","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":null,"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":"ice109:master","ref":"master","sha":"6f13f2bbea836792f7c93e23703959117a613d89","user":{"login":"ice109","id":5657668,"avatar_url":"https://avatars.githubusercontent.com/u/5657668?v=3","gravatar_id":"","url":"https://api.github.com/users/ice109","html_url":"https://github.com/ice109","followers_url":"https://api.github.com/users/ice109/followers","following_url":"https://api.github.com/users/ice109/following{/other_user}","gists_url":"https://api.github.com/users/ice109/gists{/gist_id}","starred_url":"https://api.github.com/users/ice109/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice109/subscriptions","organizations_url":"https://api.github.com/users/ice109/orgs","repos_url":"https://api.github.com/users/ice109/repos","events_url":"https://api.github.com/users/ice109/events{/privacy}","received_events_url":"https://api.github.com/users/ice109/received_events","type":"User","site_admin":false},"repo":{"id":56346410,"name":"sublinear","full_name":"ice109/sublinear","owner":{"login":"ice109","id":5657668,"avatar_url":"https://avatars.githubusercontent.com/u/5657668?v=3","gravatar_id":"","url":"https://api.github.com/users/ice109","html_url":"https://github.com/ice109","followers_url":"https://api.github.com/users/ice109/followers","following_url":"https://api.github.com/users/ice109/following{/other_user}","gists_url":"https://api.github.com/users/ice109/gists{/gist_id}","starred_url":"https://api.github.com/users/ice109/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ice109/subscriptions","organizations_url":"https://api.github.com/users/ice109/orgs","repos_url":"https://api.github.com/users/ice109/repos","events_url":"https://api.github.com/users/ice109/events{/privacy}","received_events_url":"https://api.github.com/users/ice109/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/ice109/sublinear","description":"Sublinear algorithms for graph parameters","fork":false,"url":"https://api.github.com/repos/ice109/sublinear","forks_url":"https://api.github.com/repos/ice109/sublinear/forks","keys_url":"https://api.github.com/repos/ice109/sublinear/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ice109/sublinear/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ice109/sublinear/teams","hooks_url":"https://api.github.com/repos/ice109/sublinear/hooks","issue_events_url":"https://api.github.com/repos/ice109/sublinear/issues/events{/number}","events_url":"https://api.github.com/repos/ice109/sublinear/events","assignees_url":"https://api.github.com/repos/ice109/sublinear/assignees{/user}","branches_url":"https://api.github.com/repos/ice109/sublinear/branches{/branch}","tags_url":"https://api.github.com/repos/ice109/sublinear/tags","blobs_url":"https://api.github.com/repos/ice109/sublinear/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ice109/sublinear/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ice109/sublinear/git/refs{/sha}","trees_url":"https://api.github.com/repos/ice109/sublinear/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ice109/sublinear/statuses/{sha}","languages_url":"https://api.github.com/repos/ice109/sublinear/languages","stargazers_url":"https://api.github.com/repos/ice109/sublinear/stargazers","contributors_url":"https://api.github.com/repos/ice109/sublinear/contributors","subscribers_url":"https://api.github.com/repos/ice109/sublinear/subscribers","subscription_url":"https://api.github.com/repos/ice109/sublinear/subscription","commits_url":"https://api.github.com/repos/ice109/sublinear/commits{/sha}","git_commits_url":"https://api.github.com/repos/ice109/sublinear/git/commits{/sha}","comments_url":"https://api.github.com/repos/ice109/sublinear/comments{/number}","issue_comment_url":"https://api.github.com/repos/ice109/sublinear/issues/comments{/number}","contents_url":"https://api.github.com/repos/ice109/sublinear/contents/{+path}","compare_url":"https://api.github.com/repos/ice109/sublinear/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ice109/sublinear/merges","archive_url":"https://api.github.com/repos/ice109/sublinear/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ice109/sublinear/downloads","issues_url":"https://api.github.com/repos/ice109/sublinear/issues{/number}","pulls_url":"https://api.github.com/repos/ice109/sublinear/pulls{/number}","milestones_url":"https://api.github.com/repos/ice109/sublinear/milestones{/number}","notifications_url":"https://api.github.com/repos/ice109/sublinear/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ice109/sublinear/labels{/name}","releases_url":"https://api.github.com/repos/ice109/sublinear/releases{/id}","deployments_url":"https://api.github.com/repos/ice109/sublinear/deployments","created_at":"2016-04-15T19:59:09Z","updated_at":"2016-04-17T13:37:24Z","pushed_at":"2016-04-17T13:39:08Z","git_url":"git://github.com/ice109/sublinear.git","ssh_url":"git@github.com:ice109/sublinear.git","clone_url":"https://github.com/ice109/sublinear.git","svn_url":"https://github.com/ice109/sublinear","homepage":null,"size":3,"stargazers_count":0,"watchers_count":0,"language":null,"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/ice109/sublinear/pulls/1"},"html":{"href":"https://github.com/ice109/sublinear/pull/1"},"issue":{"href":"https://api.github.com/repos/ice109/sublinear/issues/1"},"comments":{"href":"https://api.github.com/repos/ice109/sublinear/issues/1/comments"},"review_comments":{"href":"https://api.github.com/repos/ice109/sublinear/pulls/1/comments"},"review_comment":{"href":"https://api.github.com/repos/ice109/sublinear/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ice109/sublinear/pulls/1/commits"},"statuses":{"href":"https://api.github.com/repos/ice109/sublinear/statuses/3880183e1ced8c3d0ad2230d844a6a7484973e65"}}}}