Synthetic Data

sw:= TStopWatch.Create(); 
sw.Start;
eg.execStr('from faker import Faker');
eg.execStr('import simplejson as json'); //# instead import json eg.execStr('import dumper');
eg.execStr('fake = Faker()');
fprofile:= eg.evalStr('(fake.profile())')
fprofile:= StringReplace(fprofile,'\n',CRLF,[rfReplaceAll]);
fake person profile:
APO AA 42693', 'current_location': (Decimal('-51.8228245'), Decimal('-61.889364')), 'blood_group': 'A+', 'website': ['http://www.jones-clark.net/', 'https://www.fowler.com/'], 'username': 'garciatina', 'name': 'Roger Nichols', 'sex': 'M', 'address': '51574 Combs Alley Apt. 142, Ryanhaven, AL 82796', 'mail': 'andrea31@hotmail.com', 'birthdate': datetime.date(1914, 4, 15)} creditcard#: 213140049750943
fake = Faker(['de_DE'])
for i in range(10):
print(fake.name())
eg.execStr('fake = Faker(["es_MX"])') //for i in range(10):
for it:= 1 to 10 do
println(UTF8toAnsi(eg.evalStr('fake.name()')));
>>> Alma María José Montañez Dávila ...
println('creditcard#: '+eg.evalStr('fake.credit_card_number()')); //} sw.Stop;
from faker import Faker
faker = Faker()
print(f'md5: {faker.md5()}')
print(f'sha1: {faker.sha1()}')
print(f'sha256: {faker.sha256()}')
print(f'uuid4: {faker.uuid4()}')
except 
eg.raiseError;
writeln(ExceptionToString(ExceptionType, ExceptionParam));
finally
eg.Free;
sw.Free;
sw:= Nil;
apd.position:= 100;
end;
with TPythonEngine.Create(Nil) do begin
pythonhome:= PYHOME;
try
loadDLL;
Println('Faker Platform: '+
EvalStr('__import__("faker").Faker()'));
except
raiseError;
finally
free;
end;
end;

Conclusion

SynDat Concept Flow

SynDat topics and script:

****************************************

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Max Kleiner

Max Kleiner

Max Kleiner's professional environment is in the areas of OOP, UML and coding - among other things as a trainer, developer and consultant.