{"action":"opened","issue":{"url":"https://api.github.com/repos/ze-phyr-us/pearhash/issues/1","repository_url":"https://api.github.com/repos/ze-phyr-us/pearhash","labels_url":"https://api.github.com/repos/ze-phyr-us/pearhash/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/ze-phyr-us/pearhash/issues/1/comments","events_url":"https://api.github.com/repos/ze-phyr-us/pearhash/issues/1/events","html_url":"https://github.com/ze-phyr-us/pearhash/issues/1","id":158204046,"number":1,"title":"Pearson hash using wrong table","user":{"login":"st-r","id":6668631,"avatar_url":"https://avatars.githubusercontent.com/u/6668631?v=3","gravatar_id":"","url":"https://api.github.com/users/st-r","html_url":"https://github.com/st-r","followers_url":"https://api.github.com/users/st-r/followers","following_url":"https://api.github.com/users/st-r/following{/other_user}","gists_url":"https://api.github.com/users/st-r/gists{/gist_id}","starred_url":"https://api.github.com/users/st-r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/st-r/subscriptions","organizations_url":"https://api.github.com/users/st-r/orgs","repos_url":"https://api.github.com/users/st-r/repos","events_url":"https://api.github.com/users/st-r/events{/privacy}","received_events_url":"https://api.github.com/users/st-r/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-06-02T18:07:34Z","updated_at":"2016-06-02T18:07:34Z","closed_at":null,"body":"Hi Vita,\r\nyour implementation of pearson hash uses a wrong table.\r\nThe table must contain **ALL** numbers from 0-255 in any random order without duplicates.\r\nTherefore using `randint` to get the values is wrong. \r\n`[ generator.randint(0, 255) for i in range(256) ]` generates a table with duplicates!\r\n\r\nYou might want to use something like this\r\n```\r\ntable = range(256)\r\ngenerator = random.Random()\r\ngenerator.seed(seed)\r\ngenerator.shuffle(table)\r\nassert(sum(table) == (255*(255 +1))/2)\r\nself.table = table\r\n```\r\n"}}
{"actor":{"display_login":"st-r"}}