GitHub PullRequestReviewCommentEvent at 2014-11-12 15:00:38
Repository: level_up_exercises
Actor: houndci
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/20223649","id":20223649,"diff_hunk":"@@ -0,0 +1,53 @@\n+require_relative '../lib/loader.rb'\n+require 'abanalyzer'\n+\n+class DataCalculator\n+\n+  def initialize(data_hash)    \t\n+    @data_hash = data_hash\n+  end\n+\n+  def count(cohort)\n+    result = 0 \n+    @data_hash.each do |x|\n+      result += 1 if x[\"cohort\"] == cohort\n+    end\n+    result\n+  end\n+\n+  def conversion_rate(cohort)\n+    number_of_coversions = 0\t\n+    @data_hash.each do |x|\n+      if x[\"result\"] == 1 && x[\"cohort\"] == cohort\n+        number_of_coversions += 1\n+      end\n+    end\n+    number_of_conversions/count(cohort).to_f\n+  end     \n+\n+  def bounce_rate(cohort)\n+    return 1 - conversion_rate(cohort)\n+  end\n+\n+  def standard_error(cohort)\n+    p = conversion_rate(cohort)\n+    n = count(cohort)\n+    Math.sqrt(p * (1-p)/n)","path":"data_science/lib/data_calculator.rb","position":35,"original_position":35,"commit_id":"3bc4dc601fcfa509d0560af0cedad00f2c7428e2","original_commit_id":"3bc4dc601fcfa509d0560af0cedad00f2c7428e2","user":{"login":"houndci","id":6697940,"avatar_url":"https://avatars.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci","html_url":"https://github.com/houndci","followers_url":"https://api.github.com/users/houndci/followers","following_url":"https://api.github.com/users/houndci/following{/other_user}","gists_url":"https://api.github.com/users/houndci/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci/subscriptions","organizations_url":"https://api.github.com/users/houndci/orgs","repos_url":"https://api.github.com/users/houndci/repos","events_url":"https://api.github.com/users/houndci/events{/privacy}","received_events_url":"https://api.github.com/users/houndci/received_events","type":"User","site_admin":false},"body":"Surrounding space missing for operator '/'.<br>Surrounding space missing for operator '-'.","created_at":"2014-11-12T15:00:38Z","updated_at":"2014-11-12T15:00:38Z","html_url":"https://github.com/jmmastey/level_up_exercises/pull/261#discussion_r20223649","pull_request_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261","_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/20223649"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/261#discussion_r20223649"},"pull_request":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261"}}},"pull_request":{"url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261","id":24297776,"html_url":"https://github.com/jmmastey/level_up_exercises/pull/261","diff_url":"https://github.com/jmmastey/level_up_exercises/pull/261.diff","patch_url":"https://github.com/jmmastey/level_up_exercises/pull/261.patch","issue_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/261","number":261,"state":"open","locked":false,"title":"Overlord","user":{"login":"codecalypso","id":1045774,"avatar_url":"https://avatars.githubusercontent.com/u/1045774?v=3","gravatar_id":"","url":"https://api.github.com/users/codecalypso","html_url":"https://github.com/codecalypso","followers_url":"https://api.github.com/users/codecalypso/followers","following_url":"https://api.github.com/users/codecalypso/following{/other_user}","gists_url":"https://api.github.com/users/codecalypso/gists{/gist_id}","starred_url":"https://api.github.com/users/codecalypso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecalypso/subscriptions","organizations_url":"https://api.github.com/users/codecalypso/orgs","repos_url":"https://api.github.com/users/codecalypso/repos","events_url":"https://api.github.com/users/codecalypso/events{/privacy}","received_events_url":"https://api.github.com/users/codecalypso/received_events","type":"User","site_admin":false},"body":"","created_at":"2014-11-12T15:00:22Z","updated_at":"2014-11-12T15:00:38Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261/commits","review_comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261/comments","review_comment_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/{number}","comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/261/comments","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/3bc4dc601fcfa509d0560af0cedad00f2c7428e2","head":{"label":"codecalypso:overlord","ref":"overlord","sha":"3bc4dc601fcfa509d0560af0cedad00f2c7428e2","user":{"login":"codecalypso","id":1045774,"avatar_url":"https://avatars.githubusercontent.com/u/1045774?v=3","gravatar_id":"","url":"https://api.github.com/users/codecalypso","html_url":"https://github.com/codecalypso","followers_url":"https://api.github.com/users/codecalypso/followers","following_url":"https://api.github.com/users/codecalypso/following{/other_user}","gists_url":"https://api.github.com/users/codecalypso/gists{/gist_id}","starred_url":"https://api.github.com/users/codecalypso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecalypso/subscriptions","organizations_url":"https://api.github.com/users/codecalypso/orgs","repos_url":"https://api.github.com/users/codecalypso/repos","events_url":"https://api.github.com/users/codecalypso/events{/privacy}","received_events_url":"https://api.github.com/users/codecalypso/received_events","type":"User","site_admin":false},"repo":{"id":23334853,"name":"level_up_exercises","full_name":"codecalypso/level_up_exercises","owner":{"login":"codecalypso","id":1045774,"avatar_url":"https://avatars.githubusercontent.com/u/1045774?v=3","gravatar_id":"","url":"https://api.github.com/users/codecalypso","html_url":"https://github.com/codecalypso","followers_url":"https://api.github.com/users/codecalypso/followers","following_url":"https://api.github.com/users/codecalypso/following{/other_user}","gists_url":"https://api.github.com/users/codecalypso/gists{/gist_id}","starred_url":"https://api.github.com/users/codecalypso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/codecalypso/subscriptions","organizations_url":"https://api.github.com/users/codecalypso/orgs","repos_url":"https://api.github.com/users/codecalypso/repos","events_url":"https://api.github.com/users/codecalypso/events{/privacy}","received_events_url":"https://api.github.com/users/codecalypso/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/codecalypso/level_up_exercises","description":"A long series of code-related assignments to challenge starting engineers","fork":true,"url":"https://api.github.com/repos/codecalypso/level_up_exercises","forks_url":"https://api.github.com/repos/codecalypso/level_up_exercises/forks","keys_url":"https://api.github.com/repos/codecalypso/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/codecalypso/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/codecalypso/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/codecalypso/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/codecalypso/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/codecalypso/level_up_exercises/events","assignees_url":"https://api.github.com/repos/codecalypso/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/codecalypso/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/codecalypso/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/codecalypso/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/codecalypso/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/codecalypso/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/codecalypso/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/codecalypso/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/codecalypso/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/codecalypso/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/codecalypso/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/codecalypso/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/codecalypso/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/codecalypso/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/codecalypso/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/codecalypso/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/codecalypso/level_up_exercises/issues/comments/{number}","contents_url":"https://api.github.com/repos/codecalypso/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/codecalypso/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/codecalypso/level_up_exercises/merges","archive_url":"https://api.github.com/repos/codecalypso/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/codecalypso/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/codecalypso/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/codecalypso/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/codecalypso/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/codecalypso/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/codecalypso/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/codecalypso/level_up_exercises/releases{/id}","created_at":"2014-08-26T01:42:37Z","updated_at":"2014-08-27T14:04:24Z","pushed_at":"2014-11-12T00:01:04Z","git_url":"git://github.com/codecalypso/level_up_exercises.git","ssh_url":"git@github.com:codecalypso/level_up_exercises.git","clone_url":"https://github.com/codecalypso/level_up_exercises.git","svn_url":"https://github.com/codecalypso/level_up_exercises","homepage":null,"size":861,"stargazers_count":0,"watchers_count":0,"language":"Ruby","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":"jmmastey:master","ref":"master","sha":"d6fb3782079429bc5629858bbd6c76ee3d4906b0","user":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmastey","html_url":"https://github.com/jmmastey","followers_url":"https://api.github.com/users/jmmastey/followers","following_url":"https://api.github.com/users/jmmastey/following{/other_user}","gists_url":"https://api.github.com/users/jmmastey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmastey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmastey/subscriptions","organizations_url":"https://api.github.com/users/jmmastey/orgs","repos_url":"https://api.github.com/users/jmmastey/repos","events_url":"https://api.github.com/users/jmmastey/events{/privacy}","received_events_url":"https://api.github.com/users/jmmastey/received_events","type":"User","site_admin":false},"repo":{"id":20705648,"name":"level_up_exercises","full_name":"jmmastey/level_up_exercises","owner":{"login":"jmmastey","id":302011,"avatar_url":"https://avatars.githubusercontent.com/u/302011?v=3","gravatar_id":"","url":"https://api.github.com/users/jmmastey","html_url":"https://github.com/jmmastey","followers_url":"https://api.github.com/users/jmmastey/followers","following_url":"https://api.github.com/users/jmmastey/following{/other_user}","gists_url":"https://api.github.com/users/jmmastey/gists{/gist_id}","starred_url":"https://api.github.com/users/jmmastey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jmmastey/subscriptions","organizations_url":"https://api.github.com/users/jmmastey/orgs","repos_url":"https://api.github.com/users/jmmastey/repos","events_url":"https://api.github.com/users/jmmastey/events{/privacy}","received_events_url":"https://api.github.com/users/jmmastey/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jmmastey/level_up_exercises","description":"A series of code-related assignments to challenge starting engineers","fork":false,"url":"https://api.github.com/repos/jmmastey/level_up_exercises","forks_url":"https://api.github.com/repos/jmmastey/level_up_exercises/forks","keys_url":"https://api.github.com/repos/jmmastey/level_up_exercises/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jmmastey/level_up_exercises/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jmmastey/level_up_exercises/teams","hooks_url":"https://api.github.com/repos/jmmastey/level_up_exercises/hooks","issue_events_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/events{/number}","events_url":"https://api.github.com/repos/jmmastey/level_up_exercises/events","assignees_url":"https://api.github.com/repos/jmmastey/level_up_exercises/assignees{/user}","branches_url":"https://api.github.com/repos/jmmastey/level_up_exercises/branches{/branch}","tags_url":"https://api.github.com/repos/jmmastey/level_up_exercises/tags","blobs_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/refs{/sha}","trees_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/{sha}","languages_url":"https://api.github.com/repos/jmmastey/level_up_exercises/languages","stargazers_url":"https://api.github.com/repos/jmmastey/level_up_exercises/stargazers","contributors_url":"https://api.github.com/repos/jmmastey/level_up_exercises/contributors","subscribers_url":"https://api.github.com/repos/jmmastey/level_up_exercises/subscribers","subscription_url":"https://api.github.com/repos/jmmastey/level_up_exercises/subscription","commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/commits{/sha}","git_commits_url":"https://api.github.com/repos/jmmastey/level_up_exercises/git/commits{/sha}","comments_url":"https://api.github.com/repos/jmmastey/level_up_exercises/comments{/number}","issue_comment_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/comments/{number}","contents_url":"https://api.github.com/repos/jmmastey/level_up_exercises/contents/{+path}","compare_url":"https://api.github.com/repos/jmmastey/level_up_exercises/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jmmastey/level_up_exercises/merges","archive_url":"https://api.github.com/repos/jmmastey/level_up_exercises/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jmmastey/level_up_exercises/downloads","issues_url":"https://api.github.com/repos/jmmastey/level_up_exercises/issues{/number}","pulls_url":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls{/number}","milestones_url":"https://api.github.com/repos/jmmastey/level_up_exercises/milestones{/number}","notifications_url":"https://api.github.com/repos/jmmastey/level_up_exercises/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jmmastey/level_up_exercises/labels{/name}","releases_url":"https://api.github.com/repos/jmmastey/level_up_exercises/releases{/id}","created_at":"2014-06-10T23:42:24Z","updated_at":"2014-10-30T16:04:17Z","pushed_at":"2014-11-05T12:49:26Z","git_url":"git://github.com/jmmastey/level_up_exercises.git","ssh_url":"git@github.com:jmmastey/level_up_exercises.git","clone_url":"https://github.com/jmmastey/level_up_exercises.git","svn_url":"https://github.com/jmmastey/level_up_exercises","homepage":"http://leveluprails.herokuapp.com","size":39009,"stargazers_count":11,"watchers_count":11,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":46,"mirror_url":null,"open_issues_count":4,"forks":46,"open_issues":4,"watchers":11,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261"},"html":{"href":"https://github.com/jmmastey/level_up_exercises/pull/261"},"issue":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/261"},"comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/issues/261/comments"},"review_comments":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261/comments"},"review_comment":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/pulls/261/commits"},"statuses":{"href":"https://api.github.com/repos/jmmastey/level_up_exercises/statuses/3bc4dc601fcfa509d0560af0cedad00f2c7428e2"}}}}