123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- import random
- import string
- lorem =("Lorem ipsum dolor sit amet consectetur adipiscing elit Vestibulum neque augue cursus id fermentum quis porttitor at lacus Cras quis rutrum mi at varius justo Nulla eros odio egestas sit amet risus nec faucibus elementum erat Fusce finibus mattis ante in consequat lectus tincidunt id Interdum et malesuada fames ac ante ipsum primis in faucibus Sed pretium vestibulum leo ac volutpat nunc viverra at Integer erat leo imperdiet et erat ut aliquam tempor erat Vivamus consequat ligula consectetur mi varius in efficitur odio molestie Cras mollis est at porta ultrices Quisque at purus sed velit tincidunt varius Nulla facilisi Nam venenatis tellus ante nec gravida elit scelerisque eget Aenean feugiat quis nunc pulvinar vestibulum Vestibulum ullamcorper at dolor vitae egesta Ut id dignissim lectus non vestibulum metus Ut egestas imperdiet nibh consectetur feugiat urna blandit at Sed suscipit sem elit eu pretium risus varius non Nam gravida justo id consequat congue Morbi eleifend sapien leo et dictum libero mollis nec Duis sed magna suscipit pretium ligula eget ullamcorper lacus Ut rhoncus libero nisi quis pulvinar metus consequat id Fusce eu tincidunt ante Vivamus vel diam rutrum aliquet nunc eget scelerisque lacus Orci varius natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Quisque euismod nulla sit amet libero lacinia faucibus Cras tortor neque molestie non nisi vel auctor placerat eros Vivamus diam dui ultricies sit amet mattis tempor pretium eu felis Pellentesque a varius tortor ut auctor lorem Vestibulum nec vehicula lorem bibendum imperdiet nunc Donec lectus nunc pretium et faucibus sit amet bibendum nec leo Vestibulum luctus justo aliquam erat sollicitudin ut ultrices mauris cursus Interdum et malesuada fames ac ante ipsum primis in faucibus Etiam cursus metus non scelerisque finibus Maecenas ut mattis purus a volutpat sem Sed eget ullamcorper magna Sed est ante volutpat eu consectetur at fermentum quis odio Mauris a mauris ex Aenean velit ex vehicula at auctor non luctus et justo Cras ut sapien aliquet finibus ipsum vel volutpat nisi Curabitur tincidunt est non lacus maximus eu venenatis velit accumsan Vivamus vestibulum ac ligula at luctus Donec ipsum ipsum mattis sed ullamcorper sit amet pretium id leo Duis eu dolor vitae ipsum auctor consequa Duis mattis metus nec venenatis porttitor Duis vehicula nunc eget maximus condimentum nisl dolor dapibus ante in interdum orci felis a lorem Suspendisse suscipit at ligula eget iaculis Sed ornare tincidunt enim id iaculis diam rutrum ut Proin euismod sollicitudin consequat Curabitur accumsan mollis diam ac tincidun Aliquam molestie vitae nunc in hendrerit In hac habitasse platea dictumst Vestibulum ante ipsum primis in faucibus orci luctus et ultrices posuere cubilia Curae Donec at tincidunt purus Aliquam nec ligula nec ligula tempor hendrerit eget at odio Nullam gravida eu ligula eget finibus Nam eget sem ut nisl consectetur auctor eget ac lectus Aliquam viverra eget tellus in maximus Cras dignissim massa justo vitae elementum metus hendrerit condimentum Orci varius natoque penatibus et magnis dis parturient montes nascetur ridiculus mus Morbi ligula ligula tempor vitae felis eu aliquet mattis lectus Donec").split(' ')
- sids="S-1-5-21-1026401985-3175303605-4127516147-"
- titles = ('','Dr.','Dr. rer. nat.','Prof. Dr.','Dr.-Ing.', 'Dipl.-Math.', 'Dipl. Phys.')
- emails = '@fraunhofer.de'
- institutes = ('CSP','IMWS')
- departments = ('Institutsleitung','Polymerbasiertes Materialdesign','Modultechnologie','Anwendungszentrum fur Anorganische Leuchtstoffe','Center fur Materialokonomie','Buro Institutsleitung','Technologien fur biofunktionale Oberflachen','Diagnostik Halbleitertechnologien','Siliziumwafer', 'Naturstoffkomposite', 'Center fur Materialokonomie', 'Naturstoffkomposite')
- groupsArr = ('Transponder','halle','linux','Firmenlauf','Professoren','kam','ChipInject','XRayUser','Onboarding','Walter-Huelse-Strasse','Heideallee')
- phoneCode = '+49'
- positions = ('','Gruppenleiter','Marketingassistent','Geschaftsfeldleiter','Assistent','')
- dates = ('2018-01-01 23:59:59','2017-04-06 07:28:46','2017-09-01 23:59:59','2002-03-18 12:16:50','2017-04-05 10:24:05','2006-11-28 09:55:21','2008-05-15 09:44:05','2018-01-01 23:59:59','2015-08-28 10:41:09','2015-06-25 00:31:16')
- def GUID():
- x = ''
- for j in range(0,10):
- x = x + random.choice(string.letters)
- return x
- path = 'dummyusers.csv'
- file = open(path, 'wx')
- columnNames = ('sid', 'username', 'fhgusername', 'email', 'displayname', 'description', 'title', 'forename', 'surname', 'room', 'institute', 'department', 'businessunit', 'telephone', 'mobilephone','fax', 'manager', 'employeeid', 'employeetype', 'transponder', 'position_de', 'position_en', 'proxy', 'proxy1', 'secretary', 'access', 'groupsids', 'groups', 'present', 'accountexpires', 'lastlogin', 'whencreated', 'objectGUID')
- file.write((','.join(columnNames) + '\n'))
- for i in range(0, 100):
- sid = sids + str(i)
- forename = lorem[random.randint(0,len(lorem)-1)].capitalize()
- surname = lorem[random.randint(0,len(lorem)-1)].capitalize()
- username = (surname[:4]).lower()
- fhgusername = username + str(i)
- displayname = surname + ', ' + forename
- email = username + emails
- description = 'description'
- title = titles[random.randint(0, len(titles)-1)]
- room = random.choice(string.letters) + str(i)
- institute = institutes[random.randint(0, len(institutes)-1)]
- department = departments[random.randint(0,len(departments)-1)]
- businessunit = ''
- departmentnumber = str(departments.index(department))
- employeetype = 'intern'
- transponder = 'transponder'
- present = 'Y'
- access = 'MITARBEITER'
- telephone = phoneCode + str(random.randint(10000,99999))
- mobilephone = telephone
- fax = telephone
- position_de = positions[random.randint(0,len(positions)-1)]
- position_en = position_de
- proxy = 'proxy'
- proxy2 = 'proxy2'
- secretary = 'secretary'
- employeeid = sid
- manager = (lorem[random.randint(0,len(lorem)-1)]).capitalize() + ' ' + (lorem[random.randint(0, len(lorem)-1)]).capitalize()
- accountexpires = 'never'
- lastlogin = dates[random.randint(0,len(dates)-1)]
- whencreated = dates[random.randint(0,len(dates)-1)]
- objectGUID = GUID()
- group1 = groupsArr[random.randint(0, len(groupsArr)-1)]
- group2 = groupsArr[random.randint(0, len(groupsArr)-1)]
- group3 = groupsArr[random.randint(0, len(groupsArr)-1)]
- groupsids = str(groupsArr.index(group1)) + ', ' + str(groupsArr.index(group2)) + ', ' + str(groupsArr.index(group3))
- groups = group1 + ', ' + group2 + ', ' + group3
-
- row ='"' + sid+'","'+username+'","'+fhgusername+'","'+email+'","'+displayname+'","'+description+'","'+title+'","'+forename+'","'+surname+'","'+room+'","'+institute+'","'+department+'","'+businessunit+'","'+departmentnumber+'","'+telephone+'","'+mobilephone+'","'+fax+'","'+manager+'","'+employeeid+'","'+employeetype+'","'+transponder+'","'+position_de+'","'+position_en+'","'+proxy+'","'+proxy2+'","'+secretary+'","'+access+'","'+groupsids+'","'+groups+'","'+present+'","'+accountexpires+'","'+lastlogin+'","'+whencreated+'","'+objectGUID + '"\n'
- file.write(row)
- file.close()
-
- #sid
- #username
- #fhgusername
- #email
- #displayname
- #description
- #title
- #surname
- #forename
- #room
- #institute
- #department
- #businessunit
- #departmentnumber
- #telephone
- #mobilephone
- #fax
- #manager
- #employeeid
- #employeetype
- #transponder
- #position_de
- #position_en
- #proxy
- #proxy2
- #secretary
- #access
- #groupsids
- #groups
- #present
- #accountexpires
- #lastlogin
- #whencreated
- #objectGUID
|