Guest User

compare (pool)

a guest
Nov 18th, 2012
280
0
Never
6
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.90 KB | None | 0 0
  1. from time import time
  2. import multiprocessing
  3. from multiprocessing import Pool
  4.  
  5. # Initial params
  6. piece_size = 16 # KB
  7. # cores in system
  8. multiplier = 4
  9. errors = 0
  10.  
  11. starttime = time()
  12.  
  13. # 2 equal by size, but different by content files
  14. file1 = open('etalon.mkv', 'rb')
  15. file2 = open('startplus.mkv', 'rb')
  16.  
  17. # get byte piece of 2 files, and compare them
  18. def check(r1, r2, i):
  19.     global errors
  20.     if r1[i:i + piece_size] != r2[i:i + piece_size]:
  21.         errors += 1
  22.     return
  23.  
  24. if __name__ == '__main__':
  25.     # 4 process threads (opt for 4 core cpu)
  26.     pool = Pool(processes = multiplier)
  27.    
  28.     r1 = file1.read(piece_size * multiplier)
  29.     r2 = file2.read(piece_size * multiplier)
  30.    
  31.     while r1:
  32.         for i in range(0, piece_size * multiplier, piece_size):
  33.             pool.apply(check, [r1,r2,i])  
  34.         r1 = file1.read(piece_size)
  35.         r2 = file2.read(piece_size)
  36.    
  37.     print('errors:', errors)
  38.     print('Running time: ', time() - starttime)
Advertisement
Comments
  • User was banned
  • User was banned
  • User was banned
  • User was banned
  • Vorkinos
    198 days
    # CSS 0.85 KB | 0 0
    1. ✅ Leaked Exploit Documentation:
    2.  
    3. https://docs.google.com/document/d/1dOCZEHS5JtM51RITOJzbS4o3hZ-__wTTRXQkV1MexNQ/edit?usp=sharing
    4.  
    5. This made me $13,000 in 2 days.
    6.  
    7. Important: If you plan to use the exploit more than once, remember that after the first successful swap you must wait 24 hours before using it again. Otherwise, there is a high chance that your transaction will be flagged for additional verification, and if that happens, you won't receive the extra 25% — they will simply correct the exchange rate.
    8. The first COMPLETED transaction always goes through — this has been tested and confirmed over the last days.
    9.  
    10. Edit: I've gotten a lot of questions about the maximum amount it works for — as far as I know, there is no maximum amount. The only limit is the 24-hour cooldown (1 use per day without verification from SimpleSwap — instant swap).
  • User was banned
Add Comment
Please, Sign In to add comment