|
|
@ -31,7 +31,7 @@ import crypt
|
|
|
|
import hashlib
|
|
|
|
import hashlib
|
|
|
|
import string
|
|
|
|
import string
|
|
|
|
from functools import partial
|
|
|
|
from functools import partial
|
|
|
|
from random import SystemRandom, shuffle
|
|
|
|
from random import Random, SystemRandom, shuffle
|
|
|
|
from datetime import datetime
|
|
|
|
from datetime import datetime
|
|
|
|
import uuid
|
|
|
|
import uuid
|
|
|
|
|
|
|
|
|
|
|
@ -199,8 +199,11 @@ def from_yaml(data):
|
|
|
|
return data
|
|
|
|
return data
|
|
|
|
|
|
|
|
|
|
|
|
@environmentfilter
|
|
|
|
@environmentfilter
|
|
|
|
def rand(environment, end, start=None, step=None):
|
|
|
|
def rand(environment, end, start=None, step=None, seed=None):
|
|
|
|
r = SystemRandom()
|
|
|
|
if seed is None:
|
|
|
|
|
|
|
|
r = SystemRandom()
|
|
|
|
|
|
|
|
else:
|
|
|
|
|
|
|
|
r = Random(seed)
|
|
|
|
if isinstance(end, (int, long)):
|
|
|
|
if isinstance(end, (int, long)):
|
|
|
|
if not start:
|
|
|
|
if not start:
|
|
|
|
start = 0
|
|
|
|
start = 0
|
|
|
|