{"action":"created","comment":{"url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/comments/305553325","pull_request_review_id":264467018,"id":305553325,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMwNTU1MzMyNQ==","diff_hunk":"@@ -0,0 +1,70 @@\n+<html>\n+<head>\n+  <script src='https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js'></script>\n+  <script type='text/javascript'>\n+    var FIELDS = [\n+      {\n+        label: 'Expression:',\n+        type: 'text',\n+        name: 'Expression',\n+        value: '\\'@DaRealSunisaKim Thanks for the Twitter add, Sunisa! I got to meet you once at a HIN show here in the DC area and you were a sweetheart.\\'',\n+      },\n+    ];\n+\n+    $(document).ready(function () {\n+      function makeField(field) {\n+        return `\n+          ${field.label} <br />\n+          <input type=${field.type} name=${field.name} value=${field.value} />\n+          <br />`;\n+      }\n+\n+      FIELDS.forEach(field => $('#myform').append(makeField(field)));\n+      $('body').append(`<p id=\"prediction\">Prediction: <p>`);\n+      $('body').append(`<input type=\"button\" value=\"Predict\" id=\"PredictButton\">`);\n+\n+      function updatePrediction(result) {\n+        result = JSON.parse(result['body']);\n+        var innerHTML = $('#prediction').filter('p').text();\n+        var label = innerHTML.substring(innerHTML.indexOf('Prediction:') + 'Prediction:'.length);\n+        $('#prediction').html($('#prediction').html().replace(label, result['predicted_label']));\n+      };\n+\n+      $.fn.serializeObject = function () {\n+        var object = {};\n+        $.each(this.serializeArray(), function () {\n+          if (object[this.name] !== undefined) {\n+            [object[this.name]].push(this.value || '');\n+          } else {\n+            object[this.name] = this.value || '';\n+          }\n+        });\n+        return object;\n+      };\n+\n+      function predict(data) {\n+        var ENDPOINT = $('[name=url]').val();\n+        return fetch(ENDPOINT, {\n+          method: 'POST',\n+          body: data,\n+        })\n+          .then((res) => res.json())\n+          .catch(err => console.log('err', err));\n+      };\n+\n+      $('#PredictButton').click(function (data = DATA) {\n+        DATA = JSON.stringify($('form').serializeObject());\n+        predict(DATA).then(body => updatePrediction(body));\n+      });\n+    });\n+  </script>\n+</head>\n+<body>\n+  <p>Diabetes Prediction Service</p>","path":"Twitter_Sentiment/projects/twittersentiment_project_1.html","position":63,"original_position":63,"commit_id":"7d7b9a3b5fea3102fd373b4dd65dc4ccd7cbadbd","original_commit_id":"7d7b9a3b5fea3102fd373b4dd65dc4ccd7cbadbd","user":{"login":"davidanp","id":48690797,"node_id":"MDQ6VXNlcjQ4NjkwNzk3","avatar_url":"https://avatars0.githubusercontent.com/u/48690797?v=4","gravatar_id":"","url":"https://api.github.com/users/davidanp","html_url":"https://github.com/davidanp","followers_url":"https://api.github.com/users/davidanp/followers","following_url":"https://api.github.com/users/davidanp/following{/other_user}","gists_url":"https://api.github.com/users/davidanp/gists{/gist_id}","starred_url":"https://api.github.com/users/davidanp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidanp/subscriptions","organizations_url":"https://api.github.com/users/davidanp/orgs","repos_url":"https://api.github.com/users/davidanp/repos","events_url":"https://api.github.com/users/davidanp/events{/privacy}","received_events_url":"https://api.github.com/users/davidanp/received_events","type":"User","site_admin":false},"body":"twitter","created_at":"2019-07-19T23:33:41Z","updated_at":"2019-07-19T23:33:48Z","html_url":"https://github.com/pyxeda/ML-Lessons/pull/192#discussion_r305553325","pull_request_url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/comments/305553325"},"html":{"href":"https://github.com/pyxeda/ML-Lessons/pull/192#discussion_r305553325"},"pull_request":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192"}}},"pull_request":{"url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192","id":299503327,"node_id":"MDExOlB1bGxSZXF1ZXN0Mjk5NTAzMzI3","html_url":"https://github.com/pyxeda/ML-Lessons/pull/192","diff_url":"https://github.com/pyxeda/ML-Lessons/pull/192.diff","patch_url":"https://github.com/pyxeda/ML-Lessons/pull/192.patch","issue_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/192","number":192,"state":"open","locked":false,"title":"Aaru/javascript twitter","user":{"login":"AB3000","id":31480939,"node_id":"MDQ6VXNlcjMxNDgwOTM5","avatar_url":"https://avatars2.githubusercontent.com/u/31480939?v=4","gravatar_id":"","url":"https://api.github.com/users/AB3000","html_url":"https://github.com/AB3000","followers_url":"https://api.github.com/users/AB3000/followers","following_url":"https://api.github.com/users/AB3000/following{/other_user}","gists_url":"https://api.github.com/users/AB3000/gists{/gist_id}","starred_url":"https://api.github.com/users/AB3000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AB3000/subscriptions","organizations_url":"https://api.github.com/users/AB3000/orgs","repos_url":"https://api.github.com/users/AB3000/repos","events_url":"https://api.github.com/users/AB3000/events{/privacy}","received_events_url":"https://api.github.com/users/AB3000/received_events","type":"User","site_admin":false},"body":"","created_at":"2019-07-19T22:18:36Z","updated_at":"2019-07-19T23:33:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"4582b40737955347edc97b7b39302f6a2d8efa25","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192/commits","review_comments_url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192/comments","review_comment_url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/192/comments","statuses_url":"https://api.github.com/repos/pyxeda/ML-Lessons/statuses/7d7b9a3b5fea3102fd373b4dd65dc4ccd7cbadbd","head":{"label":"pyxeda:aaru/javascript-twitter","ref":"aaru/javascript-twitter","sha":"7d7b9a3b5fea3102fd373b4dd65dc4ccd7cbadbd","user":{"login":"pyxeda","id":48690633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NjkwNjMz","avatar_url":"https://avatars2.githubusercontent.com/u/48690633?v=4","gravatar_id":"","url":"https://api.github.com/users/pyxeda","html_url":"https://github.com/pyxeda","followers_url":"https://api.github.com/users/pyxeda/followers","following_url":"https://api.github.com/users/pyxeda/following{/other_user}","gists_url":"https://api.github.com/users/pyxeda/gists{/gist_id}","starred_url":"https://api.github.com/users/pyxeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyxeda/subscriptions","organizations_url":"https://api.github.com/users/pyxeda/orgs","repos_url":"https://api.github.com/users/pyxeda/repos","events_url":"https://api.github.com/users/pyxeda/events{/privacy}","received_events_url":"https://api.github.com/users/pyxeda/received_events","type":"Organization","site_admin":false},"repo":{"id":186902034,"node_id":"MDEwOlJlcG9zaXRvcnkxODY5MDIwMzQ=","name":"ML-Lessons","full_name":"pyxeda/ML-Lessons","private":false,"owner":{"login":"pyxeda","id":48690633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NjkwNjMz","avatar_url":"https://avatars2.githubusercontent.com/u/48690633?v=4","gravatar_id":"","url":"https://api.github.com/users/pyxeda","html_url":"https://github.com/pyxeda","followers_url":"https://api.github.com/users/pyxeda/followers","following_url":"https://api.github.com/users/pyxeda/following{/other_user}","gists_url":"https://api.github.com/users/pyxeda/gists{/gist_id}","starred_url":"https://api.github.com/users/pyxeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyxeda/subscriptions","organizations_url":"https://api.github.com/users/pyxeda/orgs","repos_url":"https://api.github.com/users/pyxeda/repos","events_url":"https://api.github.com/users/pyxeda/events{/privacy}","received_events_url":"https://api.github.com/users/pyxeda/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pyxeda/ML-Lessons","description":"Collection of Our Python and Scratch Lessons ","fork":false,"url":"https://api.github.com/repos/pyxeda/ML-Lessons","forks_url":"https://api.github.com/repos/pyxeda/ML-Lessons/forks","keys_url":"https://api.github.com/repos/pyxeda/ML-Lessons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyxeda/ML-Lessons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyxeda/ML-Lessons/teams","hooks_url":"https://api.github.com/repos/pyxeda/ML-Lessons/hooks","issue_events_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/events{/number}","events_url":"https://api.github.com/repos/pyxeda/ML-Lessons/events","assignees_url":"https://api.github.com/repos/pyxeda/ML-Lessons/assignees{/user}","branches_url":"https://api.github.com/repos/pyxeda/ML-Lessons/branches{/branch}","tags_url":"https://api.github.com/repos/pyxeda/ML-Lessons/tags","blobs_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyxeda/ML-Lessons/statuses/{sha}","languages_url":"https://api.github.com/repos/pyxeda/ML-Lessons/languages","stargazers_url":"https://api.github.com/repos/pyxeda/ML-Lessons/stargazers","contributors_url":"https://api.github.com/repos/pyxeda/ML-Lessons/contributors","subscribers_url":"https://api.github.com/repos/pyxeda/ML-Lessons/subscribers","subscription_url":"https://api.github.com/repos/pyxeda/ML-Lessons/subscription","commits_url":"https://api.github.com/repos/pyxeda/ML-Lessons/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyxeda/ML-Lessons/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyxeda/ML-Lessons/contents/{+path}","compare_url":"https://api.github.com/repos/pyxeda/ML-Lessons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyxeda/ML-Lessons/merges","archive_url":"https://api.github.com/repos/pyxeda/ML-Lessons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyxeda/ML-Lessons/downloads","issues_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues{/number}","pulls_url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls{/number}","milestones_url":"https://api.github.com/repos/pyxeda/ML-Lessons/milestones{/number}","notifications_url":"https://api.github.com/repos/pyxeda/ML-Lessons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyxeda/ML-Lessons/labels{/name}","releases_url":"https://api.github.com/repos/pyxeda/ML-Lessons/releases{/id}","deployments_url":"https://api.github.com/repos/pyxeda/ML-Lessons/deployments","created_at":"2019-05-15T21:00:15Z","updated_at":"2019-07-19T19:57:01Z","pushed_at":"2019-07-19T22:45:13Z","git_url":"git://github.com/pyxeda/ML-Lessons.git","ssh_url":"git@github.com:pyxeda/ML-Lessons.git","clone_url":"https://github.com/pyxeda/ML-Lessons.git","svn_url":"https://github.com/pyxeda/ML-Lessons","homepage":null,"size":11214,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":null,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"base":{"label":"pyxeda:master","ref":"master","sha":"ab74fdd2a62ac9e9118ec59ce0ebf8507ed6a06f","user":{"login":"pyxeda","id":48690633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NjkwNjMz","avatar_url":"https://avatars2.githubusercontent.com/u/48690633?v=4","gravatar_id":"","url":"https://api.github.com/users/pyxeda","html_url":"https://github.com/pyxeda","followers_url":"https://api.github.com/users/pyxeda/followers","following_url":"https://api.github.com/users/pyxeda/following{/other_user}","gists_url":"https://api.github.com/users/pyxeda/gists{/gist_id}","starred_url":"https://api.github.com/users/pyxeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyxeda/subscriptions","organizations_url":"https://api.github.com/users/pyxeda/orgs","repos_url":"https://api.github.com/users/pyxeda/repos","events_url":"https://api.github.com/users/pyxeda/events{/privacy}","received_events_url":"https://api.github.com/users/pyxeda/received_events","type":"Organization","site_admin":false},"repo":{"id":186902034,"node_id":"MDEwOlJlcG9zaXRvcnkxODY5MDIwMzQ=","name":"ML-Lessons","full_name":"pyxeda/ML-Lessons","private":false,"owner":{"login":"pyxeda","id":48690633,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NjkwNjMz","avatar_url":"https://avatars2.githubusercontent.com/u/48690633?v=4","gravatar_id":"","url":"https://api.github.com/users/pyxeda","html_url":"https://github.com/pyxeda","followers_url":"https://api.github.com/users/pyxeda/followers","following_url":"https://api.github.com/users/pyxeda/following{/other_user}","gists_url":"https://api.github.com/users/pyxeda/gists{/gist_id}","starred_url":"https://api.github.com/users/pyxeda/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pyxeda/subscriptions","organizations_url":"https://api.github.com/users/pyxeda/orgs","repos_url":"https://api.github.com/users/pyxeda/repos","events_url":"https://api.github.com/users/pyxeda/events{/privacy}","received_events_url":"https://api.github.com/users/pyxeda/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pyxeda/ML-Lessons","description":"Collection of Our Python and Scratch Lessons ","fork":false,"url":"https://api.github.com/repos/pyxeda/ML-Lessons","forks_url":"https://api.github.com/repos/pyxeda/ML-Lessons/forks","keys_url":"https://api.github.com/repos/pyxeda/ML-Lessons/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pyxeda/ML-Lessons/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pyxeda/ML-Lessons/teams","hooks_url":"https://api.github.com/repos/pyxeda/ML-Lessons/hooks","issue_events_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/events{/number}","events_url":"https://api.github.com/repos/pyxeda/ML-Lessons/events","assignees_url":"https://api.github.com/repos/pyxeda/ML-Lessons/assignees{/user}","branches_url":"https://api.github.com/repos/pyxeda/ML-Lessons/branches{/branch}","tags_url":"https://api.github.com/repos/pyxeda/ML-Lessons/tags","blobs_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/refs{/sha}","trees_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pyxeda/ML-Lessons/statuses/{sha}","languages_url":"https://api.github.com/repos/pyxeda/ML-Lessons/languages","stargazers_url":"https://api.github.com/repos/pyxeda/ML-Lessons/stargazers","contributors_url":"https://api.github.com/repos/pyxeda/ML-Lessons/contributors","subscribers_url":"https://api.github.com/repos/pyxeda/ML-Lessons/subscribers","subscription_url":"https://api.github.com/repos/pyxeda/ML-Lessons/subscription","commits_url":"https://api.github.com/repos/pyxeda/ML-Lessons/commits{/sha}","git_commits_url":"https://api.github.com/repos/pyxeda/ML-Lessons/git/commits{/sha}","comments_url":"https://api.github.com/repos/pyxeda/ML-Lessons/comments{/number}","issue_comment_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/comments{/number}","contents_url":"https://api.github.com/repos/pyxeda/ML-Lessons/contents/{+path}","compare_url":"https://api.github.com/repos/pyxeda/ML-Lessons/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pyxeda/ML-Lessons/merges","archive_url":"https://api.github.com/repos/pyxeda/ML-Lessons/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pyxeda/ML-Lessons/downloads","issues_url":"https://api.github.com/repos/pyxeda/ML-Lessons/issues{/number}","pulls_url":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls{/number}","milestones_url":"https://api.github.com/repos/pyxeda/ML-Lessons/milestones{/number}","notifications_url":"https://api.github.com/repos/pyxeda/ML-Lessons/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pyxeda/ML-Lessons/labels{/name}","releases_url":"https://api.github.com/repos/pyxeda/ML-Lessons/releases{/id}","deployments_url":"https://api.github.com/repos/pyxeda/ML-Lessons/deployments","created_at":"2019-05-15T21:00:15Z","updated_at":"2019-07-19T19:57:01Z","pushed_at":"2019-07-19T22:45:13Z","git_url":"git://github.com/pyxeda/ML-Lessons.git","ssh_url":"git@github.com:pyxeda/ML-Lessons.git","clone_url":"https://github.com/pyxeda/ML-Lessons.git","svn_url":"https://github.com/pyxeda/ML-Lessons","homepage":null,"size":11214,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":23,"license":null,"forks":0,"open_issues":23,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192"},"html":{"href":"https://github.com/pyxeda/ML-Lessons/pull/192"},"issue":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/192"},"comments":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/issues/192/comments"},"review_comments":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192/comments"},"review_comment":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/pulls/192/commits"},"statuses":{"href":"https://api.github.com/repos/pyxeda/ML-Lessons/statuses/7d7b9a3b5fea3102fd373b4dd65dc4ccd7cbadbd"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"davidanp"}}