Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def b1(self, seed):
return Business(seed=seed)
def _business(self):
return Business()
def b2(self, seed):
return Business(seed=seed)
def business(locale):
"""
:param locale:
:return:
"""
return Business(locale)
def _company():
return mimesis.Business().company()
from mimesis import Datetime, Numbers, Text, Business
from random import random
from numpy import random as npr
from math import ceil
from uuid import uuid4
from .Node import Node
class Transaction(Node):
_datetime = Datetime()
_numbers = Numbers()
_text = Text()
_business = Business()
def __init__(self, sourceId, targetId):
self.__type = 'Transaction'
self.id = uuid4()
self.source = sourceId
self.target = targetId
self.date = self._datetime.date(start=2015, end=2019)
self.time = self._datetime.time()
if random() < 0.05:
self.amount = self._numbers.between(100000, 1000000)
else:
self.amount = npr.exponential(10)
if random() < 0.15:
self.currency = self._business.currency_iso_code()
def _companytype():
return mimesis.Business().company_type()