{"action":"created","comment":{"url":"https://api.github.com/repos/IntelPNI/brainiak/pulls/comments/70495569","id":70495569,"diff_hunk":"@@ -11,24 +11,33 @@\n #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n #  See the License for the specific language governing permissions and\n #  limitations under the License.\n+import os\n+import sys\n+import logging\n import scipy.io\n-from scipy.stats import stats\n import numpy as np\n import nibabel as nib\n+from subprocess import call\n+from scipy.stats import stats\n from nilearn.input_data import NiftiMasker\n-import os\n-import logging\n-import sys\n+\n logging.basicConfig(stream=sys.stdout, level=logging.INFO)\n \n #download data\n-data_dir = os.getcwd() + '/data'\n+data_dir = os.path.join(os.getcwd(), 'data')\n file_name = os.path.join(data_dir, 's0.mat')\n url = ' https://www.dropbox.com/s/r5s9tg4ekxzbrco/s0.mat?dl=0'\n cmd = 'curl --location --create-dirs -o ' + file_name + url\n-os.system(cmd)\n+try:\n+    retcode = call(cmd, shell=True)\n+    if retcode < 0:\n+        print(\"File download was terminated by signal\", -retcode, file=sys.stderr)\n+    else:\n+        print(\"Fiile download returned\", retcode, file=sys.stderr)\n+except OSError as e:\n+    print(\"File download failed:\", e, file=sys.stderr)\n \n-#get fMRI data and scanner RAS coordinates\n+#get fMRI deta and scanner RAS coordinates","path":"examples/factor_analysis/latent_factor_from_tfa.py","position":null,"original_position":37,"commit_id":"0d3d1ff1c2649cc8930379a8e0fe8e4af9222e33","original_commit_id":"0d3d1ff1c2649cc8930379a8e0fe8e4af9222e33","user":{"login":"mihaic","id":165546,"avatar_url":"https://avatars.githubusercontent.com/u/165546?v=3","gravatar_id":"","url":"https://api.github.com/users/mihaic","html_url":"https://github.com/mihaic","followers_url":"https://api.github.com/users/mihaic/followers","following_url":"https://api.github.com/users/mihaic/following{/other_user}","gists_url":"https://api.github.com/users/mihaic/gists{/gist_id}","starred_url":"https://api.github.com/users/mihaic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mihaic/subscriptions","organizations_url":"https://api.github.com/users/mihaic/orgs","repos_url":"https://api.github.com/users/mihaic/repos","events_url":"https://api.github.com/users/mihaic/events{/privacy}","received_events_url":"https://api.github.com/users/mihaic/received_events","type":"User","site_admin":false},"body":"Typo in \"deta\".","created_at":"2016-07-12T18:33:46Z","updated_at":"2016-07-12T18:33:46Z","html_url":"https://github.com/IntelPNI/brainiak/pull/57#discussion_r70495569","pull_request_url":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57","_links":{"self":{"href":"https://api.github.com/repos/IntelPNI/brainiak/pulls/comments/70495569"},"html":{"href":"https://github.com/IntelPNI/brainiak/pull/57#discussion_r70495569"},"pull_request":{"href":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57"}}},"pull_request":{"url":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57","id":77071353,"html_url":"https://github.com/IntelPNI/brainiak/pull/57","diff_url":"https://github.com/IntelPNI/brainiak/pull/57.diff","patch_url":"https://github.com/IntelPNI/brainiak/pull/57.patch","issue_url":"https://api.github.com/repos/IntelPNI/brainiak/issues/57","number":57,"state":"open","locked":false,"title":"add examples for TFA and HTFA","user":{"login":"xiazhu","id":8976821,"avatar_url":"https://avatars.githubusercontent.com/u/8976821?v=3","gravatar_id":"","url":"https://api.github.com/users/xiazhu","html_url":"https://github.com/xiazhu","followers_url":"https://api.github.com/users/xiazhu/followers","following_url":"https://api.github.com/users/xiazhu/following{/other_user}","gists_url":"https://api.github.com/users/xiazhu/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazhu/subscriptions","organizations_url":"https://api.github.com/users/xiazhu/orgs","repos_url":"https://api.github.com/users/xiazhu/repos","events_url":"https://api.github.com/users/xiazhu/events{/privacy}","received_events_url":"https://api.github.com/users/xiazhu/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-07-12T07:11:21Z","updated_at":"2016-07-12T18:33:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4fb0aeccc9cb7e4880490bdd2309f6a98aced4f1","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57/commits","review_comments_url":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57/comments","review_comment_url":"https://api.github.com/repos/IntelPNI/brainiak/pulls/comments{/number}","comments_url":"https://api.github.com/repos/IntelPNI/brainiak/issues/57/comments","statuses_url":"https://api.github.com/repos/IntelPNI/brainiak/statuses/0d3d1ff1c2649cc8930379a8e0fe8e4af9222e33","head":{"label":"xiazhu:master","ref":"master","sha":"0d3d1ff1c2649cc8930379a8e0fe8e4af9222e33","user":{"login":"xiazhu","id":8976821,"avatar_url":"https://avatars.githubusercontent.com/u/8976821?v=3","gravatar_id":"","url":"https://api.github.com/users/xiazhu","html_url":"https://github.com/xiazhu","followers_url":"https://api.github.com/users/xiazhu/followers","following_url":"https://api.github.com/users/xiazhu/following{/other_user}","gists_url":"https://api.github.com/users/xiazhu/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazhu/subscriptions","organizations_url":"https://api.github.com/users/xiazhu/orgs","repos_url":"https://api.github.com/users/xiazhu/repos","events_url":"https://api.github.com/users/xiazhu/events{/privacy}","received_events_url":"https://api.github.com/users/xiazhu/received_events","type":"User","site_admin":false},"repo":{"id":63134948,"name":"brainiak","full_name":"xiazhu/brainiak","owner":{"login":"xiazhu","id":8976821,"avatar_url":"https://avatars.githubusercontent.com/u/8976821?v=3","gravatar_id":"","url":"https://api.github.com/users/xiazhu","html_url":"https://github.com/xiazhu","followers_url":"https://api.github.com/users/xiazhu/followers","following_url":"https://api.github.com/users/xiazhu/following{/other_user}","gists_url":"https://api.github.com/users/xiazhu/gists{/gist_id}","starred_url":"https://api.github.com/users/xiazhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xiazhu/subscriptions","organizations_url":"https://api.github.com/users/xiazhu/orgs","repos_url":"https://api.github.com/users/xiazhu/repos","events_url":"https://api.github.com/users/xiazhu/events{/privacy}","received_events_url":"https://api.github.com/users/xiazhu/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/xiazhu/brainiak","description":"Brain Imaging Analysis Kit","fork":true,"url":"https://api.github.com/repos/xiazhu/brainiak","forks_url":"https://api.github.com/repos/xiazhu/brainiak/forks","keys_url":"https://api.github.com/repos/xiazhu/brainiak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/xiazhu/brainiak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/xiazhu/brainiak/teams","hooks_url":"https://api.github.com/repos/xiazhu/brainiak/hooks","issue_events_url":"https://api.github.com/repos/xiazhu/brainiak/issues/events{/number}","events_url":"https://api.github.com/repos/xiazhu/brainiak/events","assignees_url":"https://api.github.com/repos/xiazhu/brainiak/assignees{/user}","branches_url":"https://api.github.com/repos/xiazhu/brainiak/branches{/branch}","tags_url":"https://api.github.com/repos/xiazhu/brainiak/tags","blobs_url":"https://api.github.com/repos/xiazhu/brainiak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/xiazhu/brainiak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/xiazhu/brainiak/git/refs{/sha}","trees_url":"https://api.github.com/repos/xiazhu/brainiak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/xiazhu/brainiak/statuses/{sha}","languages_url":"https://api.github.com/repos/xiazhu/brainiak/languages","stargazers_url":"https://api.github.com/repos/xiazhu/brainiak/stargazers","contributors_url":"https://api.github.com/repos/xiazhu/brainiak/contributors","subscribers_url":"https://api.github.com/repos/xiazhu/brainiak/subscribers","subscription_url":"https://api.github.com/repos/xiazhu/brainiak/subscription","commits_url":"https://api.github.com/repos/xiazhu/brainiak/commits{/sha}","git_commits_url":"https://api.github.com/repos/xiazhu/brainiak/git/commits{/sha}","comments_url":"https://api.github.com/repos/xiazhu/brainiak/comments{/number}","issue_comment_url":"https://api.github.com/repos/xiazhu/brainiak/issues/comments{/number}","contents_url":"https://api.github.com/repos/xiazhu/brainiak/contents/{+path}","compare_url":"https://api.github.com/repos/xiazhu/brainiak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/xiazhu/brainiak/merges","archive_url":"https://api.github.com/repos/xiazhu/brainiak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/xiazhu/brainiak/downloads","issues_url":"https://api.github.com/repos/xiazhu/brainiak/issues{/number}","pulls_url":"https://api.github.com/repos/xiazhu/brainiak/pulls{/number}","milestones_url":"https://api.github.com/repos/xiazhu/brainiak/milestones{/number}","notifications_url":"https://api.github.com/repos/xiazhu/brainiak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/xiazhu/brainiak/labels{/name}","releases_url":"https://api.github.com/repos/xiazhu/brainiak/releases{/id}","deployments_url":"https://api.github.com/repos/xiazhu/brainiak/deployments","created_at":"2016-07-12T07:07:14Z","updated_at":"2016-07-12T07:07:15Z","pushed_at":"2016-07-12T18:10:49Z","git_url":"git://github.com/xiazhu/brainiak.git","ssh_url":"git@github.com:xiazhu/brainiak.git","clone_url":"https://github.com/xiazhu/brainiak.git","svn_url":"https://github.com/xiazhu/brainiak","homepage":"","size":151,"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":"IntelPNI:master","ref":"master","sha":"3c16f800d9c89551380219e1cc1ecd47f5324922","user":{"login":"IntelPNI","id":10767488,"avatar_url":"https://avatars.githubusercontent.com/u/10767488?v=3","gravatar_id":"","url":"https://api.github.com/users/IntelPNI","html_url":"https://github.com/IntelPNI","followers_url":"https://api.github.com/users/IntelPNI/followers","following_url":"https://api.github.com/users/IntelPNI/following{/other_user}","gists_url":"https://api.github.com/users/IntelPNI/gists{/gist_id}","starred_url":"https://api.github.com/users/IntelPNI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IntelPNI/subscriptions","organizations_url":"https://api.github.com/users/IntelPNI/orgs","repos_url":"https://api.github.com/users/IntelPNI/repos","events_url":"https://api.github.com/users/IntelPNI/events{/privacy}","received_events_url":"https://api.github.com/users/IntelPNI/received_events","type":"Organization","site_admin":false},"repo":{"id":51334498,"name":"brainiak","full_name":"IntelPNI/brainiak","owner":{"login":"IntelPNI","id":10767488,"avatar_url":"https://avatars.githubusercontent.com/u/10767488?v=3","gravatar_id":"","url":"https://api.github.com/users/IntelPNI","html_url":"https://github.com/IntelPNI","followers_url":"https://api.github.com/users/IntelPNI/followers","following_url":"https://api.github.com/users/IntelPNI/following{/other_user}","gists_url":"https://api.github.com/users/IntelPNI/gists{/gist_id}","starred_url":"https://api.github.com/users/IntelPNI/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IntelPNI/subscriptions","organizations_url":"https://api.github.com/users/IntelPNI/orgs","repos_url":"https://api.github.com/users/IntelPNI/repos","events_url":"https://api.github.com/users/IntelPNI/events{/privacy}","received_events_url":"https://api.github.com/users/IntelPNI/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/IntelPNI/brainiak","description":"Brain Imaging Analysis Kit","fork":false,"url":"https://api.github.com/repos/IntelPNI/brainiak","forks_url":"https://api.github.com/repos/IntelPNI/brainiak/forks","keys_url":"https://api.github.com/repos/IntelPNI/brainiak/keys{/key_id}","collaborators_url":"https://api.github.com/repos/IntelPNI/brainiak/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/IntelPNI/brainiak/teams","hooks_url":"https://api.github.com/repos/IntelPNI/brainiak/hooks","issue_events_url":"https://api.github.com/repos/IntelPNI/brainiak/issues/events{/number}","events_url":"https://api.github.com/repos/IntelPNI/brainiak/events","assignees_url":"https://api.github.com/repos/IntelPNI/brainiak/assignees{/user}","branches_url":"https://api.github.com/repos/IntelPNI/brainiak/branches{/branch}","tags_url":"https://api.github.com/repos/IntelPNI/brainiak/tags","blobs_url":"https://api.github.com/repos/IntelPNI/brainiak/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/IntelPNI/brainiak/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/IntelPNI/brainiak/git/refs{/sha}","trees_url":"https://api.github.com/repos/IntelPNI/brainiak/git/trees{/sha}","statuses_url":"https://api.github.com/repos/IntelPNI/brainiak/statuses/{sha}","languages_url":"https://api.github.com/repos/IntelPNI/brainiak/languages","stargazers_url":"https://api.github.com/repos/IntelPNI/brainiak/stargazers","contributors_url":"https://api.github.com/repos/IntelPNI/brainiak/contributors","subscribers_url":"https://api.github.com/repos/IntelPNI/brainiak/subscribers","subscription_url":"https://api.github.com/repos/IntelPNI/brainiak/subscription","commits_url":"https://api.github.com/repos/IntelPNI/brainiak/commits{/sha}","git_commits_url":"https://api.github.com/repos/IntelPNI/brainiak/git/commits{/sha}","comments_url":"https://api.github.com/repos/IntelPNI/brainiak/comments{/number}","issue_comment_url":"https://api.github.com/repos/IntelPNI/brainiak/issues/comments{/number}","contents_url":"https://api.github.com/repos/IntelPNI/brainiak/contents/{+path}","compare_url":"https://api.github.com/repos/IntelPNI/brainiak/compare/{base}...{head}","merges_url":"https://api.github.com/repos/IntelPNI/brainiak/merges","archive_url":"https://api.github.com/repos/IntelPNI/brainiak/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/IntelPNI/brainiak/downloads","issues_url":"https://api.github.com/repos/IntelPNI/brainiak/issues{/number}","pulls_url":"https://api.github.com/repos/IntelPNI/brainiak/pulls{/number}","milestones_url":"https://api.github.com/repos/IntelPNI/brainiak/milestones{/number}","notifications_url":"https://api.github.com/repos/IntelPNI/brainiak/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/IntelPNI/brainiak/labels{/name}","releases_url":"https://api.github.com/repos/IntelPNI/brainiak/releases{/id}","deployments_url":"https://api.github.com/repos/IntelPNI/brainiak/deployments","created_at":"2016-02-08T23:19:27Z","updated_at":"2016-07-10T09:17:02Z","pushed_at":"2016-07-12T18:10:50Z","git_url":"git://github.com/IntelPNI/brainiak.git","ssh_url":"git@github.com:IntelPNI/brainiak.git","clone_url":"https://github.com/IntelPNI/brainiak.git","svn_url":"https://github.com/IntelPNI/brainiak","homepage":"","size":219,"stargazers_count":1,"watchers_count":1,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":10,"forks":6,"open_issues":10,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57"},"html":{"href":"https://github.com/IntelPNI/brainiak/pull/57"},"issue":{"href":"https://api.github.com/repos/IntelPNI/brainiak/issues/57"},"comments":{"href":"https://api.github.com/repos/IntelPNI/brainiak/issues/57/comments"},"review_comments":{"href":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57/comments"},"review_comment":{"href":"https://api.github.com/repos/IntelPNI/brainiak/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/IntelPNI/brainiak/pulls/57/commits"},"statuses":{"href":"https://api.github.com/repos/IntelPNI/brainiak/statuses/0d3d1ff1c2649cc8930379a8e0fe8e4af9222e33"}}}}
{"actor":{"display_login":"mihaic"}}