funny-codesGenerate randoms strings of a given pattern | |
Download |
funny-codes Ranking & Summary
Advertisement
- License:
- MIT/X Consortium Lic...
- Price:
- FREE
- Publisher Name:
- Mikhail Korobov
- Publisher web site:
- http://bitbucket.org/kmike/
funny-codes Tags
funny-codes Description
funny-codes is a small Python module for generating randoms strings of a given pattern. It is also capable of estimating various metrics for this pattern (probability of collision, estimated collision count and total variants count).Installation pip install funny-codesUsage>>> from funny_codes import FunnyCodes>>> my_codes = FunnyCodes('TATAN-76')>>> my_codes.next() # the following is a random code matching the patternHIPAS-12>>> my_codes.next()MOVER-87>>> my_codes.variants_count()20000844>>> my_codes.collision_prob(1000)0.024664677603280283>>> my_codes.expected_collisions(10000)2.499235797673464Product's homepage
funny-codes Related Software