๐ค ๋๋ฏธ ๋ฐ์ดํฐ๊ฐ ์ ํ์ํด?
์ํ ๋ฐ์ดํฐ๋ ์ฟ ํก์์ ํฌ๋กค๋งํด ์์ง๋ง ์ค์๋น์ค๋ฅผ ๋ชฉ์ ์ผ๋ก ํ์ง ์๋ ์ฐ๋ฆฌ ํ๋ก์ ํธ์ ์ ์ ๊ฒฝ์ฐ์๋ ๋๋ฏธ ๋ฐ์ดํฐ๋ก ์งํํ๊ธฐ๋ก ํ๋ค.
๋๋ค์ผ๋ก ๋ฐ์ดํฐ๋ฅผ ์์ฑํด์ฃผ๋ ์๋น์ค๋ฅผ ์ด์ฉํ์ฌ ์ง์ด ๋ฃ์ ์์ ์ด์๋๋ฐ, ์ธ์ด๊ฐ ํ๊ธ์ธ ๊ฒ ์์ด์ ์ง์ ์ฝ๋ฉํ๊ธฐ๋ก!
๊ฐ๋จํ ํ์ด์ฌ์ผ๋ก ์ฝ๋ฉ
๐ ๋๋ฏธ ๋ฐ์ดํฐ ์์ฑ ์ฝ๋
๐ชช ๋๋ค ์ด๋ฆ
# ์ด๋ฆ ์์ฑ ํจ์๋ค
def firstName():
first = ["๊น", "์ด", "๋ฐ", "์ต", "์ ", "๊ฐ", "์กฐ", "์ค", "์ฅ", "์", "ํ", "์ค", "์", "์ ", "๊ถ", "ํฉ", "์",
"์ก", "๋ฅ", "์ ", "ํ", "๊ณ ", "๋ฌธ", "์", "์", "๋ฐฐ", "์กฐ", "๋ฐฑ", "ํ", "์ ", "๋จ", "์ฌ", "๋
ธ", "์ ",
"ํ", "๊ณฝ", "์ฑ", "์ฐจ", "์ฃผ", "์ฐ", "๊ตฌ", "์ ", "์", "๋", "์ ", "๋ฏผ", "์ ", "์ง", "์ง", "์", "์ฑ",
"์", "์ฒ", "๋ฐฉ", "๊ณต", "๊ฐ", "ํ", "ํจ", "๋ณ", "์ผ", "์", "๋ณ", "์ฌ", "์ถ", "๋
ธ", "๋", "์", "์ ",
"์", "์ ", "์ค", "๋ง", "๊ธธ", "์ฃผ", "์ฐ", "๋ฐฉ", "์", "ํ", "๋ช
", "๊ธฐ", "๋ฐ", "์", "๊ธ", "์ฅ", "์ก",
"์ธ", "๋งน", "์ ", "๋ชจ", "์ฅ", "๋จ", "ํ", "๊ตญ", "์ฌ", "์ง", "์ด", "์", "ํธ", "๊ตฌ", "์ฉ"]
return random.choice(first)
def LastName():
last = ["๊ฐ", "๊ฐ", "๊ฑด", "๊ฒฝ", "๊ณ ", "๊ด", "๊ด", "๊ตฌ", "๊ท", "๊ทผ", "๊ธฐ", "๊ธธ", "๋", "๋จ", "๋
ธ", "๋", "๋ค",
"๋จ", "๋ฌ", "๋ด", "๋", "๋", "๋", "๋", "๋", "๋ผ", "๋", "๋ก", "๋ฃจ", "๋ฆฌ", "๋ง", "๋ง", "๋ช
", "๋ฌด", "๋ฌธ", "๋ฏธ", "๋ฏผ", "๋ฐ", "๋ฐ",
"๋ฐฑ", "๋ฒ", "๋ณ", "๋ณ", "๋ณด", "๋น", "์ฌ", "์ฐ", "์", "์", "์", "์", "์ ", "์ค", "์ญ", "์ฑ", "์ธ", "์", "์", "์", "์", "์",
"์ญ", "์ฌ", "์น", "์", "์ ", "์", "์", "์ ", "์", "์ฌ", "์ฐ", "์", "์", "์ค", "์ฅ", "์", "์", "์ฉ", "์ฐ", "์", "์", "์",
"์ ", "์ค", "์จ", "์ผ", "์", "์", "์ด", "์ต", "์ธ", "์ผ", "์", "์", "์", "์ฅ", "์ฌ", "์ ", "์ ", "์ ", "์กฐ", "์ข
", "์ฃผ", "์ค",
"์ค", "์ง", "์ง", "์ฐฌ", "์ฐฝ", "์ฑ", "์ฒ", "์ฒ ", "์ด", "์ถ", "์ถฉ", "์น", "ํ", "ํ", "ํ", "ํ", "ํ", "ํ", "ํด", "ํ", "ํ", "ํ",
"ํ", "ํธ", "ํ", "ํ", "ํ", "ํ", "ํจ", "ํ", "ํ", "ํฌ", "์ด", "๋ชจ", "๋ฐฐ", "๋ถ", "๋ฆผ", "๋ด", "ํผ", "ํฉ", "๋", "๋ฆฐ", "์", "๋น",
"์", "๊ณต", "๋ฉด", "ํ", "์จ", "๋", "ํญ", "ํ", "๋ ค", "๊ท ", "๋ฌต", "์ก", "์ฑ", "ํด", "์ธ", "๋ น", "์ฌ", "๋ค", "๊ฒฌ", "์ถ", "๊ฑธ", "์ผ",
"์ด", "์
", "๋ถ", "๋ณ", "์", "์ถ", "ํ", "ํฅ", "๊ฒธ", "๊ณค", "๋ฒ", "์", "๋", "๋", "์", "์ ", "ํ", "๋ฐ", "๋น", "์ค", "์ง", "ํ ",
"ํ", "์
", "๋", "๋ธ", "๊ถ", "๋ณต", "์ฌ", "ํ", "์ฝ", "ํ", "๊ฐ", "๋กฑ", "ํ", "๋", "๋ฌ", "๋", "์", "ํฅ", "์ธ", "๋ จ"]
return random.choice(last)
# ์ฌ์ฉ์
name = firstName() + LastName() + LastName()
๐จ ๋๋ค ์ฃผ์
์ด๋ฒ ๋๋ฏธ๋ฐ์ดํฐ ์์ฑ์ ํต์ฌ!
์ฃผ์ ๊ฐ์ ๊ฒฝ์ฐ์๋ ์ด๋ป๊ฒ ์์ฑํด์ผํ๋ ๊ณ ๋ฏผํ๋ ๋ฐ ๊ตฌ๊ธ๋ง ํ๋ค๊ฐ ์ ๊ตญ ๊ฑด๋ฌผ ์ฃผ์๋ฅผ ์ ๊ณตํ๋ ์๋น์ค๊ฐ ์์๋ค.
์ด๋ฅผ ๋ค์ด ๋ฐ๊ณ ๋๋ค ์ค์ ๋ฐ์์ ํ์ดํ๊ธฐ์ค์ผ๋ก listํํ๋ฅผ ๋ง๋ค์ด ๊ฐ๊ณตํด ํ์ํ ์ ๋ณด๋ง ๊ฐ์ ธ์ค๋ ์์ผ๋ก ์ ์ ํ๋ ๋ฐฉ๋ฒ์ ์ฑํํ๋ค.
-์ ์ ๋ณด ํํ (์๋ ์ฌ์ดํธ์์ ์ ๊ตญ ์๋ ๊ธฐ์ค์ผ๋ก txt ํ์ผ์ ์ ๊ณตํ๊ณ ์๋ค. ์ฐธ๊ณ ๋ก 2018๋ ๋์ ์ฃผ์!!! ์ฃผ์!!!)
- ์ ํ์ผ์ ์ฌ์ฉํ์ฌ ์ฃผ์ ์ถ์ถ
def address():
f_Ad = open('build_seoul.txt', 'r')
random_line = random.choice(list(f_Ad.readlines())).splitlines()[0]
f_Ad.close()
return random_line
# ์ฌ์ฉ์
address_full = address()
address_list = address_full.split('|')
sido = address_list[1]
sigungu = address_list[2]
eupmyeondong = address_list[3]
street = address_list[9]
zipcode = address_list[19]
๐ชช ๋๋ค ์์ด๋์ ์ด๋ฉ์ผ
def loginId():
n = random.randrange(5,10)
loginId = ""
for x in range(n):
loginId += str(random.choice(string.ascii_lowercase))
return loginId
# ์ฌ์ฉ์
login_Id = loginId()
email = login_Id + "@google.com"
๐ ๋๋ค ํจ์ค์๋
password_make = string.ascii_letters + string.digits
def password():
lenNum = 64
password = "";
for y in range(64) :
password += random.choice(password_make)
return password
# ์ฌ์ฉ์
password()
๐ CSVํ์ผ๋ก ๋ณํ
password_make = string.ascii_letters + string.digits
create_cnt = 1000
f_Save = open('random_member.csv', 'w', encoding='utf-8', newline='')
wr = csv.writer(f_Save)
for i in range(create_cnt) :
name = firstName() + LastName() + LastName()
address_full = address()
address_list = address_full.split('|')
login_Id = loginId()
email = login_Id + "@google.com"
sido = address_list[1]
sigungu = address_list[2]
eupmyeondong = address_list[3]
street = address_list[9]
zipcode = address_list[19]
wr.writerow([sido, sigungu, eupmyeondong, street, zipcode, email, login_Id, name, password()])
print([sido, sigungu, eupmyeondong, street, zipcode, email, login_Id, name, password()])
f_Save.close()
๐ ๊ฒฐ๊ณผ๋ฌผ
'Programming > Python' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
Python] flask ๋์ URL ๊ตฌํ ์ฝ๋ (1) | 2022.10.31 |
---|---|
Python] ์ ํ๋ธ ํฌ๋กค๋ง ๊ตฌํ (Selenium / ์ ๋ ๋) (0) | 2022.10.25 |
Python] JWT(JSON Web Token) ํ ํฐ ๊ตฌํ (0) | 2022.10.25 |
Python] ๊ธฐ๋ณธ ํ๊ฒฝ ์ค์ - Django ์ค์น (0) | 2022.08.31 |
Python pip install ๋๋ uninstall ๋ฐฉ๋ฒ (0) | 2022.08.31 |