<commit_before># PwnedCheck

Ruby gem to check to see if an email address is on http://haveibeenpwned.com

<table>
    <tr>
        <th>Version</th>
        <td>1.0.14</td>
    </tr>
    <tr>
       <th>Author</th>
       <td><a href="http://www.chs.us"><NAME></a> (<a href="http://twitter.com/chs">@chs</a>)</td>
    </tr>
    <tr>
        <th>Page</th>
        <td><a href="http://www.chs.us/PwnedCheck">http://www.chs.us/PwnedCheck</a></td>
    </tr>
    <tr>
        <th>Github</th>
        <td><a href="http://github.com/sampsonc/PwnedCheck">http://github.com/sampsonc/PwnedCheck</a></td>
    </tr>
</table>

# Installation
gem install PwnedCheck

# Usage

`````ruby
require 'pwnedcheck'

# The 3 cases.
# <EMAIL> is a valid address on the site
# <EMAIL> is a valid address, but not on the site
# foo.bar.com is an invalid format
addresses = ['<EMAIL>', '<EMAIL>', 'foo.<EMAIL>.<EMAIL>']

addresses.each do |address|
  begin
    sites = PwnedCheck::check(address)
    if sites.length == 0
      puts "#{address} --> Not found on http://haveibeenpwned.com"
    else
      sites.each do |site|
        puts "#{address} --> #{site}"
      end
    end
  rescue PwnedCheck::InvalidEmail => e
    puts "#{address} --> #{e.message}"
  end
end
`````
<commit_msg>Cleanup<commit_after># PwnedCheck

Ruby gem to check to see if an email address is on http://haveibeenpwned.com

<table>
    <tr>
        <th>Version</th>
        <td>1.0.14</td>
    </tr>
    <tr>
       <th>Author</th>
       <td><a href="http://www.chs.us"><NAME></a> (<a href="http://twitter.com/chs">@chs</a>)</td>
    </tr>
    <tr>
        <th>Page</th>
        <td><a href="http://www.chs.us/PwnedCheck">http://www.chs.us/PwnedCheck</a></td>
    </tr>
    <tr>
        <th>Github</th>
        <td><a href="http://github.com/sampsonc/PwnedCheck">http://github.com/sampsonc/PwnedCheck</a></td>
    </tr>
</table>

# Installation
`````ruby
gem install PwnedCheck
`````

# Usage

`````ruby
require 'pwnedcheck'

# The 3 cases.
# <EMAIL> is a valid address on the site
# <EMAIL> is a valid address, but not on the site
# foo.bar.com is an invalid format
addresses = ['<EMAIL>', '<EMAIL>', '<EMAIL>']

addresses.each do |address|
  begin
    sites = PwnedCheck::check(address)
    if sites.length == 0
      puts "#{address} --> Not found on http://haveibeenpwned.com"
    else
      sites.each do |site|
        puts "#{address} --> #{site}"
      end
    end
  rescue PwnedCheck::InvalidEmail => e
    puts "#{address} --> #{e.message}"
  end
end
`````

{'fraction_non_alphanumeric': 0.19793322734499205, 'fraction_numerical': 0.0047694753577106515, 'mean_word_length': 2.663755458515284, 'pattern_counts': {'":': 0, '<': 84, '<?xml version=': 0, '>': 92, 'https://': 0, 'lorem ipsum': 0, 'www.': 6, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1282560', 'n_tokens_mistral': 980, 'n_tokens_neox': 964, 'n_words': 217}