Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(6)  |  Call(5)  |  Derive(0)  |  Import(1)

src/p/y/pyskein-1.0/test/test_compare_pure.py   pyskein(Download)
                kwdict = {kw:b"foo"+bytes([i]) for i, kw in enumerate(kws)}
                gold = skein512.skein512(**kwdict)
                c = skein.skein512(**kwdict)
                self.assertEqual(c.digest(), gold)
 
            gold = skein512.skein512(msg, key=key, pers=pers, nonce=nonce,
                                     tree=tree)
            c = skein.skein512(msg, key=key, pers=pers, nonce=nonce, tree=tree)
            self.assertEqual(c.digest(), gold)
 

src/p/y/pyskein-1.0/test/benchmark_parallel.py   pyskein(Download)
from time import time, sleep
from random import randrange
from threading import Thread
from skein import skein512
 
data = bytes(10**8)
 
res = []
for THREAD in range(2):
    h1 = skein512()
for THREAD in range(2):
    h1 = skein512()
    h2 = skein512()
    t1 = Thread(target=h1.update, args=(data,))
    t2 = Thread(target=h2.update, args=(data,))