old_contents: import pybloomfilter
  import urllib2
  
  """
  class ingests MD5 data from NSRLFile and updates bloomfilter
  
  
  >>>hash_bloom = MD5BloomFilter(size, error, bloom_filename)
  >>>hashed = hash_bloom.stream_lines()
  >>>hash_bloom.update(hash_bloom.hash_list)
  >>>hash_bloom.process_infile(hashed)
  >>>print "583401402C3F77A8C94FA782EB437C0F" in hash_bloom # True
  >>>print "testTesttest" in hash_bloom # False
  
  """
  
  size = 1000000
  error = 0.001
  bloom_filename = 'NSRLgood.bloomfilter'
  filename = '~/Downloads/unique/NSRLFile.txt'
  nsrl_destination_url = 'http://www.nsrl.nist.gov/RDS/rds_2.43/rds_243u.zip'
  
  class MD5BloomFilter(pybloomfilter.BloomFilter):
  
      def __init__(self, size, error, bloom_filename):
          self.size = size
          self.error = error
          self. bloom_filename = bloom_filename
          self.filename = '~/Downloads/unique/NSRLFile.txt'
          self.hash_list = []
  
      def stream_lines(self):
          infile = open(self.filename)
          while True:
              line = infile.readline()
              if not line:
                  infile.close()
                  break
              yield line.split(",")[1].strip('"')
  
      def process_infile(self, hashes):
          for item in hashes:
              print item
              self.hash_list.append(item)
  
  
new_contents: import pybloomfilter
  import urllib2
  
  """
  class ingests MD5 data from NSRLFile and updates bloomfilter
  for fast in-memory queries
  
  Example:
  
      >>> from NSRLmd5BloomFilter import MD5BloomFilter
      >>> filename = '~/Downloads/unique/NSRLFile.txt'
      >>> size = 1000000
      >>> error = 0.001
      >>> bloom_filename = 'NSRLgood.bloomfilter'
      >>> hash_bloom = MD5BloomFilter(size, error, bloom_filename)
      >>> hash_bloom.process()
  
      >>> print "F16FF81271ADA49847E6EB6BB9CB8A90" in NSRL_good # positive
      >>> print 'testTESTtest' in NSRL_good # false
  """
  
  size = 1000000
  error = 0.001
  bloom_filename = 'NSRLgood.bloomfilter'
  filename = '/Users/antigen/Downloads/unique/NSRLFile.txt'
  nsrl_destination_url = 'http://www.nsrl.nist.gov/RDS/rds_2.43/rds_243u.zip'
  
  class MD5BloomFilter(pybloomfilter.BloomFilter):
  
      def __init__(self, size, error, bloom_filename):
          super(pybloomfilter.BloomFilter, self).__init__(size, error, bloom_filename, filename=filename)
          self.filename = filename
          self.hash_list = []
          self.split_value = ","
          self.strip_value = '"'
          self.column = 1
  
      def _readfile(self):
          with open(filename, 'r') as infile: 
              for line in infile:
                  yield line.split(self.split_value)[self.column].strip(self.strip_value)
      
      def _process_infile(self, hashes):
          for item in hashes:
              print item
              self.hash_list.append(item)
  
      def process(self):
          hashes = self._readfile()
          self._process_infile(hashes)
          self.update(self.hash_list)
  
  
subject: refactor with better super() and init methods. redone generator