{"action":"created","comment":{"url":"https://api.github.com/repos/nengo/nengo_gui/pulls/comments/38609769","id":38609769,"diff_hunk":"@@ -0,0 +1,102 @@\n+from .pointer import Pointer\n+from nengo_gui.components.component import Component\n+\n+import numpy as np\n+import nengo\n+\n+import struct\n+import copy\n+\n+class SpaSimilarity(Pointer):\n+\n+    config_defaults = dict(max_value=1,\n+                           min_value=-1,\n+                           show_pairs=False,\n+                           **Component.config_defaults)\n+\n+    def __init__(self, obj, **kwargs):\n+        super(SpaSimilarity, self).__init__(obj, **kwargs)\n+        try:\n+            target_key = kwargs['target']\n+        except KeyError:\n+            target_key = kwargs['args']\n+\n+        self.old_vocab_length = len(self.vocab_out.keys)\n+        self.old_pairs_length = 0\n+        self.labels = self.vocab_out.keys\n+        self.previous_pairs = False\n+\n+    def gather_data(self, t, x):\n+        vocab = self.vocab_out\n+\n+        # if there's been a change in the show_pairs\n+        # Don't know how I feel about the timing of this\n+        # maybe trigger on_message?","path":"nengo_gui/components/spa_similarity.py","position":34,"original_position":34,"commit_id":"8b5039b5636d0d25b0f49639038af30607ff9a4a","original_commit_id":"8b5039b5636d0d25b0f49639038af30607ff9a4a","user":{"login":"jgosmann","id":850157,"avatar_url":"https://avatars.githubusercontent.com/u/850157?v=3","gravatar_id":"","url":"https://api.github.com/users/jgosmann","html_url":"https://github.com/jgosmann","followers_url":"https://api.github.com/users/jgosmann/followers","following_url":"https://api.github.com/users/jgosmann/following{/other_user}","gists_url":"https://api.github.com/users/jgosmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jgosmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgosmann/subscriptions","organizations_url":"https://api.github.com/users/jgosmann/orgs","repos_url":"https://api.github.com/users/jgosmann/repos","events_url":"https://api.github.com/users/jgosmann/events{/privacy}","received_events_url":"https://api.github.com/users/jgosmann/received_events","type":"User","site_admin":false},"body":"Not sure about this comment. If it stays it should probably explain what the issue with the timing is.\r\n\r\nAlso the line above: Do we care about capitalization and punctuation?","created_at":"2015-09-03T03:11:09Z","updated_at":"2015-09-03T03:11:09Z","html_url":"https://github.com/nengo/nengo_gui/pull/542#discussion_r38609769","pull_request_url":"https://api.github.com/repos/nengo/nengo_gui/pulls/542","_links":{"self":{"href":"https://api.github.com/repos/nengo/nengo_gui/pulls/comments/38609769"},"html":{"href":"https://github.com/nengo/nengo_gui/pull/542#discussion_r38609769"},"pull_request":{"href":"https://api.github.com/repos/nengo/nengo_gui/pulls/542"}}},"pull_request":{"url":"https://api.github.com/repos/nengo/nengo_gui/pulls/542","id":43404877,"html_url":"https://github.com/nengo/nengo_gui/pull/542","diff_url":"https://github.com/nengo/nengo_gui/pull/542.diff","patch_url":"https://github.com/nengo/nengo_gui/pull/542.patch","issue_url":"https://api.github.com/repos/nengo/nengo_gui/issues/542","number":542,"state":"open","locked":false,"title":"Basic SPA similarity plot","user":{"login":"Seanny123","id":1918825,"avatar_url":"https://avatars.githubusercontent.com/u/1918825?v=3","gravatar_id":"","url":"https://api.github.com/users/Seanny123","html_url":"https://github.com/Seanny123","followers_url":"https://api.github.com/users/Seanny123/followers","following_url":"https://api.github.com/users/Seanny123/following{/other_user}","gists_url":"https://api.github.com/users/Seanny123/gists{/gist_id}","starred_url":"https://api.github.com/users/Seanny123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Seanny123/subscriptions","organizations_url":"https://api.github.com/users/Seanny123/orgs","repos_url":"https://api.github.com/users/Seanny123/repos","events_url":"https://api.github.com/users/Seanny123/events{/privacy}","received_events_url":"https://api.github.com/users/Seanny123/received_events","type":"User","site_admin":false},"body":"Since feature creep started to happen with #528, this new pull request will focus on the most basic implementation of the SPA similarity plot. This pull request would address #387 ","created_at":"2015-08-26T13:59:57Z","updated_at":"2015-09-03T03:11:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"78206bfbe48d23c0cb77770faa8e035ea995f484","assignee":{"login":"jgosmann","id":850157,"avatar_url":"https://avatars.githubusercontent.com/u/850157?v=3","gravatar_id":"","url":"https://api.github.com/users/jgosmann","html_url":"https://github.com/jgosmann","followers_url":"https://api.github.com/users/jgosmann/followers","following_url":"https://api.github.com/users/jgosmann/following{/other_user}","gists_url":"https://api.github.com/users/jgosmann/gists{/gist_id}","starred_url":"https://api.github.com/users/jgosmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jgosmann/subscriptions","organizations_url":"https://api.github.com/users/jgosmann/orgs","repos_url":"https://api.github.com/users/jgosmann/repos","events_url":"https://api.github.com/users/jgosmann/events{/privacy}","received_events_url":"https://api.github.com/users/jgosmann/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/nengo/nengo_gui/pulls/542/commits","review_comments_url":"https://api.github.com/repos/nengo/nengo_gui/pulls/542/comments","review_comment_url":"https://api.github.com/repos/nengo/nengo_gui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/nengo/nengo_gui/issues/542/comments","statuses_url":"https://api.github.com/repos/nengo/nengo_gui/statuses/8b5039b5636d0d25b0f49639038af30607ff9a4a","head":{"label":"nengo:spa-simi-basic","ref":"spa-simi-basic","sha":"8b5039b5636d0d25b0f49639038af30607ff9a4a","user":{"login":"nengo","id":9197486,"avatar_url":"https://avatars.githubusercontent.com/u/9197486?v=3","gravatar_id":"","url":"https://api.github.com/users/nengo","html_url":"https://github.com/nengo","followers_url":"https://api.github.com/users/nengo/followers","following_url":"https://api.github.com/users/nengo/following{/other_user}","gists_url":"https://api.github.com/users/nengo/gists{/gist_id}","starred_url":"https://api.github.com/users/nengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nengo/subscriptions","organizations_url":"https://api.github.com/users/nengo/orgs","repos_url":"https://api.github.com/users/nengo/repos","events_url":"https://api.github.com/users/nengo/events{/privacy}","received_events_url":"https://api.github.com/users/nengo/received_events","type":"Organization","site_admin":false},"repo":{"id":28949681,"name":"nengo_gui","full_name":"nengo/nengo_gui","owner":{"login":"nengo","id":9197486,"avatar_url":"https://avatars.githubusercontent.com/u/9197486?v=3","gravatar_id":"","url":"https://api.github.com/users/nengo","html_url":"https://github.com/nengo","followers_url":"https://api.github.com/users/nengo/followers","following_url":"https://api.github.com/users/nengo/following{/other_user}","gists_url":"https://api.github.com/users/nengo/gists{/gist_id}","starred_url":"https://api.github.com/users/nengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nengo/subscriptions","organizations_url":"https://api.github.com/users/nengo/orgs","repos_url":"https://api.github.com/users/nengo/repos","events_url":"https://api.github.com/users/nengo/events{/privacy}","received_events_url":"https://api.github.com/users/nengo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nengo/nengo_gui","description":"Nengo interactive visualizer","fork":false,"url":"https://api.github.com/repos/nengo/nengo_gui","forks_url":"https://api.github.com/repos/nengo/nengo_gui/forks","keys_url":"https://api.github.com/repos/nengo/nengo_gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nengo/nengo_gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nengo/nengo_gui/teams","hooks_url":"https://api.github.com/repos/nengo/nengo_gui/hooks","issue_events_url":"https://api.github.com/repos/nengo/nengo_gui/issues/events{/number}","events_url":"https://api.github.com/repos/nengo/nengo_gui/events","assignees_url":"https://api.github.com/repos/nengo/nengo_gui/assignees{/user}","branches_url":"https://api.github.com/repos/nengo/nengo_gui/branches{/branch}","tags_url":"https://api.github.com/repos/nengo/nengo_gui/tags","blobs_url":"https://api.github.com/repos/nengo/nengo_gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nengo/nengo_gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nengo/nengo_gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/nengo/nengo_gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nengo/nengo_gui/statuses/{sha}","languages_url":"https://api.github.com/repos/nengo/nengo_gui/languages","stargazers_url":"https://api.github.com/repos/nengo/nengo_gui/stargazers","contributors_url":"https://api.github.com/repos/nengo/nengo_gui/contributors","subscribers_url":"https://api.github.com/repos/nengo/nengo_gui/subscribers","subscription_url":"https://api.github.com/repos/nengo/nengo_gui/subscription","commits_url":"https://api.github.com/repos/nengo/nengo_gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/nengo/nengo_gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/nengo/nengo_gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/nengo/nengo_gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/nengo/nengo_gui/contents/{+path}","compare_url":"https://api.github.com/repos/nengo/nengo_gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nengo/nengo_gui/merges","archive_url":"https://api.github.com/repos/nengo/nengo_gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nengo/nengo_gui/downloads","issues_url":"https://api.github.com/repos/nengo/nengo_gui/issues{/number}","pulls_url":"https://api.github.com/repos/nengo/nengo_gui/pulls{/number}","milestones_url":"https://api.github.com/repos/nengo/nengo_gui/milestones{/number}","notifications_url":"https://api.github.com/repos/nengo/nengo_gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nengo/nengo_gui/labels{/name}","releases_url":"https://api.github.com/repos/nengo/nengo_gui/releases{/id}","created_at":"2015-01-08T05:00:06Z","updated_at":"2015-06-09T16:18:58Z","pushed_at":"2015-09-03T02:34:12Z","git_url":"git://github.com/nengo/nengo_gui.git","ssh_url":"git@github.com:nengo/nengo_gui.git","clone_url":"https://github.com/nengo/nengo_gui.git","svn_url":"https://github.com/nengo/nengo_gui","homepage":"","size":9205,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":152,"forks":4,"open_issues":152,"watchers":8,"default_branch":"master"}},"base":{"label":"nengo:master","ref":"master","sha":"7727d9ba87d4797b1154fce86eebc8ca71794b1b","user":{"login":"nengo","id":9197486,"avatar_url":"https://avatars.githubusercontent.com/u/9197486?v=3","gravatar_id":"","url":"https://api.github.com/users/nengo","html_url":"https://github.com/nengo","followers_url":"https://api.github.com/users/nengo/followers","following_url":"https://api.github.com/users/nengo/following{/other_user}","gists_url":"https://api.github.com/users/nengo/gists{/gist_id}","starred_url":"https://api.github.com/users/nengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nengo/subscriptions","organizations_url":"https://api.github.com/users/nengo/orgs","repos_url":"https://api.github.com/users/nengo/repos","events_url":"https://api.github.com/users/nengo/events{/privacy}","received_events_url":"https://api.github.com/users/nengo/received_events","type":"Organization","site_admin":false},"repo":{"id":28949681,"name":"nengo_gui","full_name":"nengo/nengo_gui","owner":{"login":"nengo","id":9197486,"avatar_url":"https://avatars.githubusercontent.com/u/9197486?v=3","gravatar_id":"","url":"https://api.github.com/users/nengo","html_url":"https://github.com/nengo","followers_url":"https://api.github.com/users/nengo/followers","following_url":"https://api.github.com/users/nengo/following{/other_user}","gists_url":"https://api.github.com/users/nengo/gists{/gist_id}","starred_url":"https://api.github.com/users/nengo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nengo/subscriptions","organizations_url":"https://api.github.com/users/nengo/orgs","repos_url":"https://api.github.com/users/nengo/repos","events_url":"https://api.github.com/users/nengo/events{/privacy}","received_events_url":"https://api.github.com/users/nengo/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/nengo/nengo_gui","description":"Nengo interactive visualizer","fork":false,"url":"https://api.github.com/repos/nengo/nengo_gui","forks_url":"https://api.github.com/repos/nengo/nengo_gui/forks","keys_url":"https://api.github.com/repos/nengo/nengo_gui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/nengo/nengo_gui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/nengo/nengo_gui/teams","hooks_url":"https://api.github.com/repos/nengo/nengo_gui/hooks","issue_events_url":"https://api.github.com/repos/nengo/nengo_gui/issues/events{/number}","events_url":"https://api.github.com/repos/nengo/nengo_gui/events","assignees_url":"https://api.github.com/repos/nengo/nengo_gui/assignees{/user}","branches_url":"https://api.github.com/repos/nengo/nengo_gui/branches{/branch}","tags_url":"https://api.github.com/repos/nengo/nengo_gui/tags","blobs_url":"https://api.github.com/repos/nengo/nengo_gui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/nengo/nengo_gui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/nengo/nengo_gui/git/refs{/sha}","trees_url":"https://api.github.com/repos/nengo/nengo_gui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/nengo/nengo_gui/statuses/{sha}","languages_url":"https://api.github.com/repos/nengo/nengo_gui/languages","stargazers_url":"https://api.github.com/repos/nengo/nengo_gui/stargazers","contributors_url":"https://api.github.com/repos/nengo/nengo_gui/contributors","subscribers_url":"https://api.github.com/repos/nengo/nengo_gui/subscribers","subscription_url":"https://api.github.com/repos/nengo/nengo_gui/subscription","commits_url":"https://api.github.com/repos/nengo/nengo_gui/commits{/sha}","git_commits_url":"https://api.github.com/repos/nengo/nengo_gui/git/commits{/sha}","comments_url":"https://api.github.com/repos/nengo/nengo_gui/comments{/number}","issue_comment_url":"https://api.github.com/repos/nengo/nengo_gui/issues/comments{/number}","contents_url":"https://api.github.com/repos/nengo/nengo_gui/contents/{+path}","compare_url":"https://api.github.com/repos/nengo/nengo_gui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/nengo/nengo_gui/merges","archive_url":"https://api.github.com/repos/nengo/nengo_gui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/nengo/nengo_gui/downloads","issues_url":"https://api.github.com/repos/nengo/nengo_gui/issues{/number}","pulls_url":"https://api.github.com/repos/nengo/nengo_gui/pulls{/number}","milestones_url":"https://api.github.com/repos/nengo/nengo_gui/milestones{/number}","notifications_url":"https://api.github.com/repos/nengo/nengo_gui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/nengo/nengo_gui/labels{/name}","releases_url":"https://api.github.com/repos/nengo/nengo_gui/releases{/id}","created_at":"2015-01-08T05:00:06Z","updated_at":"2015-06-09T16:18:58Z","pushed_at":"2015-09-03T02:34:12Z","git_url":"git://github.com/nengo/nengo_gui.git","ssh_url":"git@github.com:nengo/nengo_gui.git","clone_url":"https://github.com/nengo/nengo_gui.git","svn_url":"https://github.com/nengo/nengo_gui","homepage":"","size":9205,"stargazers_count":8,"watchers_count":8,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":152,"forks":4,"open_issues":152,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/nengo/nengo_gui/pulls/542"},"html":{"href":"https://github.com/nengo/nengo_gui/pull/542"},"issue":{"href":"https://api.github.com/repos/nengo/nengo_gui/issues/542"},"comments":{"href":"https://api.github.com/repos/nengo/nengo_gui/issues/542/comments"},"review_comments":{"href":"https://api.github.com/repos/nengo/nengo_gui/pulls/542/comments"},"review_comment":{"href":"https://api.github.com/repos/nengo/nengo_gui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/nengo/nengo_gui/pulls/542/commits"},"statuses":{"href":"https://api.github.com/repos/nengo/nengo_gui/statuses/8b5039b5636d0d25b0f49639038af30607ff9a4a"}}}}