{"action":"created","comment":{"url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/comments/61365436","id":61365436,"diff_hunk":"@@ -73,65 +73,89 @@ module.exports = {\n \n     console.log(fbUrls)\n     console.log(gPlusUrls)\n-    tmp.file(function _tempFileCreated(err, path, fd, cleanupCallback) {\n-      if (err) return responseHandler.view(res, 'output', 'error', {\n-        image  : req.body.image,\n-        message: err\n-      });\n-      fs.writeFile(path, base64Data, 'base64', function(err) {\n+    urlFeatures = []\n+    async.eachSeries(fbUrls, function(url,callback) {\n+      var options = {\n+        mode: 'text',\n+        args: [url]\n+      };\n+      shell.run('../Feature_Extract/api_extract_features.py', options, function (err, out) {\n+        if (err) {\n+          return responseHandler.view(res, 'output', 'error', {\n+            image  : req.body.image,\n+            message: err\n+          });\n+        } else {\n+          out = JSON.parse(out)\n+          urlFeatures.push(out.faces.features);","path":"web/api/controllers/ClassificationController.js","position":24,"original_position":24,"commit_id":"5e84acc05c75f27a68027786d341f4a242f438c1","original_commit_id":"5e84acc05c75f27a68027786d341f4a242f438c1","user":{"login":"sujanadiga-practo","id":16635045,"avatar_url":"https://avatars.githubusercontent.com/u/16635045?v=3","gravatar_id":"","url":"https://api.github.com/users/sujanadiga-practo","html_url":"https://github.com/sujanadiga-practo","followers_url":"https://api.github.com/users/sujanadiga-practo/followers","following_url":"https://api.github.com/users/sujanadiga-practo/following{/other_user}","gists_url":"https://api.github.com/users/sujanadiga-practo/gists{/gist_id}","starred_url":"https://api.github.com/users/sujanadiga-practo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujanadiga-practo/subscriptions","organizations_url":"https://api.github.com/users/sujanadiga-practo/orgs","repos_url":"https://api.github.com/users/sujanadiga-practo/repos","events_url":"https://api.github.com/users/sujanadiga-practo/events{/privacy}","received_events_url":"https://api.github.com/users/sujanadiga-practo/received_events","type":"User","site_admin":false},"body":"out.faces is an array, you must index that before getting features","created_at":"2016-04-28T02:10:29Z","updated_at":"2016-04-28T02:10:29Z","html_url":"https://github.com/sujanadiga-practo/Project-CDFIFM/pull/9#discussion_r61365436","pull_request_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/comments/61365436"},"html":{"href":"https://github.com/sujanadiga-practo/Project-CDFIFM/pull/9#discussion_r61365436"},"pull_request":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9","id":67994342,"html_url":"https://github.com/sujanadiga-practo/Project-CDFIFM/pull/9","diff_url":"https://github.com/sujanadiga-practo/Project-CDFIFM/pull/9.diff","patch_url":"https://github.com/sujanadiga-practo/Project-CDFIFM/pull/9.patch","issue_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/9","number":9,"state":"open","locked":false,"title":"processing urls got from sns","user":{"login":"sujanadiga-practo","id":16635045,"avatar_url":"https://avatars.githubusercontent.com/u/16635045?v=3","gravatar_id":"","url":"https://api.github.com/users/sujanadiga-practo","html_url":"https://github.com/sujanadiga-practo","followers_url":"https://api.github.com/users/sujanadiga-practo/followers","following_url":"https://api.github.com/users/sujanadiga-practo/following{/other_user}","gists_url":"https://api.github.com/users/sujanadiga-practo/gists{/gist_id}","starred_url":"https://api.github.com/users/sujanadiga-practo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujanadiga-practo/subscriptions","organizations_url":"https://api.github.com/users/sujanadiga-practo/orgs","repos_url":"https://api.github.com/users/sujanadiga-practo/repos","events_url":"https://api.github.com/users/sujanadiga-practo/events{/privacy}","received_events_url":"https://api.github.com/users/sujanadiga-practo/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-04-27T04:13:17Z","updated_at":"2016-04-28T02:10:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b72d19aa2326dca1aa05f0e6dc689f30df06a6cc","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9/commits","review_comments_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9/comments","review_comment_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/comments{/number}","comments_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/9/comments","statuses_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/statuses/5e84acc05c75f27a68027786d341f4a242f438c1","head":{"label":"sujanadiga-practo:snIntegrationAndClassification","ref":"snIntegrationAndClassification","sha":"5e84acc05c75f27a68027786d341f4a242f438c1","user":{"login":"sujanadiga-practo","id":16635045,"avatar_url":"https://avatars.githubusercontent.com/u/16635045?v=3","gravatar_id":"","url":"https://api.github.com/users/sujanadiga-practo","html_url":"https://github.com/sujanadiga-practo","followers_url":"https://api.github.com/users/sujanadiga-practo/followers","following_url":"https://api.github.com/users/sujanadiga-practo/following{/other_user}","gists_url":"https://api.github.com/users/sujanadiga-practo/gists{/gist_id}","starred_url":"https://api.github.com/users/sujanadiga-practo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujanadiga-practo/subscriptions","organizations_url":"https://api.github.com/users/sujanadiga-practo/orgs","repos_url":"https://api.github.com/users/sujanadiga-practo/repos","events_url":"https://api.github.com/users/sujanadiga-practo/events{/privacy}","received_events_url":"https://api.github.com/users/sujanadiga-practo/received_events","type":"User","site_admin":false},"repo":{"id":51694782,"name":"Project-CDFIFM","full_name":"sujanadiga-practo/Project-CDFIFM","owner":{"login":"sujanadiga-practo","id":16635045,"avatar_url":"https://avatars.githubusercontent.com/u/16635045?v=3","gravatar_id":"","url":"https://api.github.com/users/sujanadiga-practo","html_url":"https://github.com/sujanadiga-practo","followers_url":"https://api.github.com/users/sujanadiga-practo/followers","following_url":"https://api.github.com/users/sujanadiga-practo/following{/other_user}","gists_url":"https://api.github.com/users/sujanadiga-practo/gists{/gist_id}","starred_url":"https://api.github.com/users/sujanadiga-practo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujanadiga-practo/subscriptions","organizations_url":"https://api.github.com/users/sujanadiga-practo/orgs","repos_url":"https://api.github.com/users/sujanadiga-practo/repos","events_url":"https://api.github.com/users/sujanadiga-practo/events{/privacy}","received_events_url":"https://api.github.com/users/sujanadiga-practo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sujanadiga-practo/Project-CDFIFM","description":"Classification of Distributed Facial Images using Feature Based Matching","fork":false,"url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM","forks_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/forks","keys_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/teams","hooks_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/hooks","issue_events_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/events{/number}","events_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/events","assignees_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/assignees{/user}","branches_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/branches{/branch}","tags_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/tags","blobs_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/refs{/sha}","trees_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/statuses/{sha}","languages_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/languages","stargazers_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/stargazers","contributors_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/contributors","subscribers_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/subscribers","subscription_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/subscription","commits_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/commits{/sha}","git_commits_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/commits{/sha}","comments_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/comments{/number}","issue_comment_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/comments{/number}","contents_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/contents/{+path}","compare_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/merges","archive_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/downloads","issues_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues{/number}","pulls_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls{/number}","milestones_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/milestones{/number}","notifications_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/labels{/name}","releases_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/releases{/id}","deployments_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/deployments","created_at":"2016-02-14T13:02:14Z","updated_at":"2016-04-13T10:40:27Z","pushed_at":"2016-04-28T01:06:37Z","git_url":"git://github.com/sujanadiga-practo/Project-CDFIFM.git","ssh_url":"git@github.com:sujanadiga-practo/Project-CDFIFM.git","clone_url":"https://github.com/sujanadiga-practo/Project-CDFIFM.git","svn_url":"https://github.com/sujanadiga-practo/Project-CDFIFM","homepage":null,"size":3325,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"base":{"label":"sujanadiga-practo:master","ref":"master","sha":"68fc452da3aa1a083076b62011d8f20db4f9552e","user":{"login":"sujanadiga-practo","id":16635045,"avatar_url":"https://avatars.githubusercontent.com/u/16635045?v=3","gravatar_id":"","url":"https://api.github.com/users/sujanadiga-practo","html_url":"https://github.com/sujanadiga-practo","followers_url":"https://api.github.com/users/sujanadiga-practo/followers","following_url":"https://api.github.com/users/sujanadiga-practo/following{/other_user}","gists_url":"https://api.github.com/users/sujanadiga-practo/gists{/gist_id}","starred_url":"https://api.github.com/users/sujanadiga-practo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujanadiga-practo/subscriptions","organizations_url":"https://api.github.com/users/sujanadiga-practo/orgs","repos_url":"https://api.github.com/users/sujanadiga-practo/repos","events_url":"https://api.github.com/users/sujanadiga-practo/events{/privacy}","received_events_url":"https://api.github.com/users/sujanadiga-practo/received_events","type":"User","site_admin":false},"repo":{"id":51694782,"name":"Project-CDFIFM","full_name":"sujanadiga-practo/Project-CDFIFM","owner":{"login":"sujanadiga-practo","id":16635045,"avatar_url":"https://avatars.githubusercontent.com/u/16635045?v=3","gravatar_id":"","url":"https://api.github.com/users/sujanadiga-practo","html_url":"https://github.com/sujanadiga-practo","followers_url":"https://api.github.com/users/sujanadiga-practo/followers","following_url":"https://api.github.com/users/sujanadiga-practo/following{/other_user}","gists_url":"https://api.github.com/users/sujanadiga-practo/gists{/gist_id}","starred_url":"https://api.github.com/users/sujanadiga-practo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sujanadiga-practo/subscriptions","organizations_url":"https://api.github.com/users/sujanadiga-practo/orgs","repos_url":"https://api.github.com/users/sujanadiga-practo/repos","events_url":"https://api.github.com/users/sujanadiga-practo/events{/privacy}","received_events_url":"https://api.github.com/users/sujanadiga-practo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/sujanadiga-practo/Project-CDFIFM","description":"Classification of Distributed Facial Images using Feature Based Matching","fork":false,"url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM","forks_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/forks","keys_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/keys{/key_id}","collaborators_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/teams","hooks_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/hooks","issue_events_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/events{/number}","events_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/events","assignees_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/assignees{/user}","branches_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/branches{/branch}","tags_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/tags","blobs_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/refs{/sha}","trees_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/trees{/sha}","statuses_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/statuses/{sha}","languages_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/languages","stargazers_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/stargazers","contributors_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/contributors","subscribers_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/subscribers","subscription_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/subscription","commits_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/commits{/sha}","git_commits_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/git/commits{/sha}","comments_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/comments{/number}","issue_comment_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/comments{/number}","contents_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/contents/{+path}","compare_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/compare/{base}...{head}","merges_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/merges","archive_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/downloads","issues_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues{/number}","pulls_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls{/number}","milestones_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/milestones{/number}","notifications_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/labels{/name}","releases_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/releases{/id}","deployments_url":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/deployments","created_at":"2016-02-14T13:02:14Z","updated_at":"2016-04-13T10:40:27Z","pushed_at":"2016-04-28T01:06:37Z","git_url":"git://github.com/sujanadiga-practo/Project-CDFIFM.git","ssh_url":"git@github.com:sujanadiga-practo/Project-CDFIFM.git","clone_url":"https://github.com/sujanadiga-practo/Project-CDFIFM.git","svn_url":"https://github.com/sujanadiga-practo/Project-CDFIFM","homepage":null,"size":3325,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":4,"forks":0,"open_issues":4,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9"},"html":{"href":"https://github.com/sujanadiga-practo/Project-CDFIFM/pull/9"},"issue":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/9"},"comments":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/sujanadiga-practo/Project-CDFIFM/statuses/5e84acc05c75f27a68027786d341f4a242f438c1"}}}}