def hash_shooter(video_path):
 filesize = os.path.getsize(video_path)
 readsize = 4096
 if (os.path.getsize(video_path) < (readsize * 2)):
  return None
 offsets = (readsize, ((filesize // 3) * 2), (filesize // 3), (filesize - (readsize * 2)))
 filehash = []
 with open(video_path, 'rb') as f:
  for offset in offsets:
   f.seek(offset)
   filehash.append(hashlib.md5(f.read(readsize)).hexdigest())
 return ';'.join(filehash)

def hash_shooter ( video_path ) : filesize = os . path . getsize ( video_path ) readsize = 4096 if ( os . path . getsize ( video_path ) < ( readsize * 2 ) ) : return None offsets = ( readsize , ( ( filesize // 3 ) * 2 ) , ( filesize // 3 ) , ( filesize - ( readsize * 2 ) ) ) filehash = [ ] with open ( video_path , 'rb' ) as f : for offset in offsets : f . seek ( offset ) filehash . append ( hashlib . md5 ( f . read ( readsize ) ) . hexdigest ( ) ) return ';' . join ( filehash )
compute a hash using shooters algorithm .