Python 實(shí)現(xiàn)購(gòu)物商城,含有用戶入口和商家入口的示例
這是模擬淘寶的一個(gè)簡(jiǎn)易的購(gòu)物商城程序。
用戶入口具有以下功能:
登錄認(rèn)證
可以鎖定用戶
密碼輸入次數(shù)大于3次,鎖定用戶名
連續(xù)三次輸錯(cuò)用戶名退出程序
可以選擇直接購(gòu)買(mǎi),也可以選擇加入購(gòu)物車(chē)
用戶使用支付密碼完成支付,支付密碼連續(xù)輸入錯(cuò)誤達(dá)3次,鎖定用戶名
商家入口具有以下功能:
登錄認(rèn)證
可以鎖定用戶
密碼輸入次數(shù)大于3次,鎖定用戶名
連續(xù)三次輸錯(cuò)用戶名退出程序
商家可以編輯商品
上架新品
下架商品
修改商品信息:商品名、單價(jià)、庫(kù)存
每個(gè)用戶的用戶名、密碼、余額、支付密碼,以行記錄定義在 user_list.txt 文件中,以逗號(hào)分隔;
每件商品的商品名、單價(jià)、庫(kù)存,以行記錄定義在 product_list.txt 文件中,以逗號(hào)加一個(gè)空格分隔;
被鎖定用戶名記錄在 lock_list.txt 文件中,以行分隔;
商家的用戶名、密碼定義在 seller_list.txt 文件中,以逗號(hào)分隔;
# Joe Young
import getpass
import os
# 調(diào)用os模塊的system方法傳入'cls'參數(shù),清屏
os.system('cls')
while True:
entrance = input('請(qǐng)選擇:\n\t1. 用戶登陸\n\t2. 商家登陸\n>>>')
if entrance != '1' and entrance != '2':
print('\n輸入有誤,請(qǐng)重試...\n')
else:
break
# 打印商品列表
def print_product_list():
index = 1
with open('product_list.txt', 'r') as product_file:
for product_line in product_file:
L = [commodity, price, stock] = product_line.strip('\n').split(', ')
commodity_list.append(L)
print((str(index) + '. ' + commodity).ljust(20) + ('單價(jià):' + price + '元').ljust(15) + '庫(kù)存:' + stock)
index += 1
return
# 用戶入口
if entrance == '1':
info = [] # 存放用戶的信息,初始為空
if_payed = True # if_payed 表示訂單是否已支付
username = ''
# 登錄接口
count = 0
while count < 3:
username = input('\n用戶名: ')
# 打開(kāi)鎖定列表文件
with open('lock_list.txt', 'r+') as lock_file:
for lock_line in lock_file:
# 用戶名在鎖定名單里面,則退出程序
if username == lock_line.strip('\n'):
exit('\n用戶名 %s 已被鎖定,請(qǐng)聯(lián)系管理員...' % username)
login = False # 登錄標(biāo)志,初始為False
# 打開(kāi)用戶名列表文件,讀權(quán)限
user_file = open('user_list.txt', 'r')
for user_line in user_file:
# 獲取每行的用戶信息,用戶名、密碼、余額、支付密碼,存入info列表
info = [user, passwd, balance, pay_passwd] = user_line.strip('\n').split(',')
# 用戶名匹配,則進(jìn)入密碼輸入環(huán)節(jié)
if user == username:
n = 0
# 3次輸入機(jī)會(huì)
while n < 3:
password = getpass.getpass('密碼: ')
# 密碼匹配,顯示登錄成功
if passwd == password:
print('\n歡迎 %s 登錄商城,祝您購(gòu)物愉快!\n' % username)
login = True # 登錄標(biāo)志賦值為T(mén)rue
break
# 密碼不匹配
else:
# n = 2 時(shí)是最后一次機(jī)會(huì),不必提示還剩下0次機(jī)會(huì)
if n != 2:
print('\n密碼錯(cuò)誤,請(qǐng)重新輸入,您還有 %d 次機(jī)會(huì)\n' % (2-n))
n += 1
# 密碼錯(cuò)誤次數(shù)達(dá)到3次,鎖定用戶名,退出程序
else:
open('lock_list.txt', 'w').write(username + '\n')
exit('\n錯(cuò)誤次數(shù)過(guò)多,賬戶已被鎖定...')
# 登錄成功,跳出for循環(huán)
if login:
break
else:
if count != 2:
print('\n用戶名不存在,請(qǐng)重試,您還有 %d 次機(jī)會(huì)' % (2-count))
user_file.close()
count += 1
# 登錄成功,跳出while循環(huán)
if login:
break
else:
exit('\n錯(cuò)誤次數(shù)過(guò)多,程序已退出...')
# 購(gòu)買(mǎi)程序
shopping_cart = [] # 購(gòu)物車(chē)初始為空
commodity_list = []
print_product_list()
while True:
i = input('\n請(qǐng)選擇商品(輸入序號(hào)),或輸入 c 取消購(gòu)買(mǎi):')
if i == 'c':
while True:
a = input('\n是否繼續(xù)購(gòu)買(mǎi)?(Y/N):')
if a == 'n' or a == 'N':
exit('\n交易結(jié)束...')
elif a == 'y' or a == 'Y':
break
else:
print('\n輸入格式有誤,請(qǐng)重試...')
continue
if not i.isdigit():
print('\n輸入格式有誤,請(qǐng)重試...')
continue
i = int(i)
if i <= 0 or i > len(commodity_list):
print('\n此商品不存在,請(qǐng)重試...')
continue
item_name = commodity_list[i-1][0] # 商品名稱(chēng)
item_price = commodity_list[i-1][1] # 商品價(jià)格
item_stock = commodity_list[i-1][2] # 商品庫(kù)存
print('\n您已選擇了 %s ,請(qǐng)輸入購(gòu)買(mǎi)的數(shù)量,或輸入 b 重新選擇:' % item_name)
back = False
while True:
num = input('>>>')
if num == 'b':
back = True
break
if not num.isdigit():
print('輸入格式有誤,請(qǐng)重試...')
continue
if int(num) > int(item_stock):
print('數(shù)量大于庫(kù)存,請(qǐng)重試...')
continue
if int(num) == 0:
print('數(shù)量應(yīng)大于0,請(qǐng)重試...')
break
if back:
continue
item = [item_name, item_price, num]
print('\n您已選擇了 %s,單價(jià):%s 元,數(shù)量:%s,您想立即購(gòu)買(mǎi)還是加入購(gòu)物車(chē)?\n' % (item_name, item_price, num))
print('\t1. 立即購(gòu)買(mǎi)\n\t2. 加入購(gòu)物車(chē)\n')
while True:
choice = input('>>>')
if not (choice == '1' or choice == '2'):
print('輸入有誤,請(qǐng)重試...')
continue
break
user_balance = int(info[2])
# 立即購(gòu)買(mǎi)
if choice == '1':
amount = int(item_price) * int(num)
count = 0
cancel = False
while count < 3:
user_pay_passwd = getpass.getpass('\n請(qǐng)輸入支付密碼,或輸入 c 放棄支付:')
if user_pay_passwd == 'c':
print('\n取消支付成功...')
cancel = True
break
elif user_pay_passwd != info[3]:
if count != 2:
print('\n密碼錯(cuò)誤,請(qǐng)重試,您還有 %d 次機(jī)會(huì)...' % (2-count))
count += 1
else:
break
if count == 3:
with open('lock_list.txt', 'w') as lock_file:
lock_file.write(username + '\n')
exit('密碼錯(cuò)誤,賬戶已被鎖定...')
if cancel:
while True:
choice = input('\n是否繼續(xù)購(gòu)買(mǎi)?(Y/N):')
if not (choice == 'Y' or choice == 'y' or choice == 'N' or choice == 'n'):
print('\n輸入格式有誤,請(qǐng)重試...')
continue
break
if choice == 'Y' or choice == 'y':
continue
else:
break
# 如果用戶的賬戶余額大于總金額
if user_balance >= amount:
user_balance -= amount
print('\n支付成功!您已成功購(gòu)買(mǎi) %s ,單價(jià):%s 元,數(shù)量:%s,總金額:%s 元,賬戶余額:%s 元'
% (item_name, item_price, num, amount, user_balance))
lines = open('product_list.txt', 'r').readlines()
# 定位到用戶所購(gòu)買(mǎi)的商品所在行,分割成列表賦值給select
select = lines[i-1].strip('\n').split(', ')
# 修改商品的庫(kù)存
select[-1] = (str(int(select[-1]) - int(num)) + '\n')
# 拼接成字符串
lines[i-1] = ', '.join(select)
# 將修改寫(xiě)回文件
open('product_list.txt', 'w').writelines(lines)
lines = open('user_list.txt', 'r').readlines()
# 修改用戶余額
for line in lines:
if username in line.split(','): # 定位到用戶名所在行
j = lines.index(line) # 獲取用戶名所在行的行號(hào)索引
select = line.split(',') # 分割用戶名所在行賦值給列表select
select[-2] = str(user_balance) # 修改用戶余額
lines[j] = ','.join(select) # 修改后的列表拼接成字符串,覆蓋用戶名所在行
open('user_list.txt', 'w').writelines(lines) # 將修改寫(xiě)回文件
else:
print('\n對(duì)不起,您的余額不足...')
else: # 加入購(gòu)物車(chē)
j = 0
for j in range(len(shopping_cart)):
# 如果商品在購(gòu)物車(chē)?yán)锩?,更新商品?shù)量
if item_name in shopping_cart[j]:
shopping_cart[j][2] = str(int(shopping_cart[j][2]) + int(num))
break
# 商品若不在購(gòu)物車(chē),則添加到購(gòu)物車(chē)
else:
shopping_cart.append(item)
print('\n成功加入購(gòu)物車(chē)!')
while True:
choice = input('\n是否繼續(xù)購(gòu)買(mǎi)?(Y/N):')
if not (choice == 'Y' or choice == 'y' or choice == 'N' or choice == 'n'):
print('\n輸入格式有誤,請(qǐng)重試...')
continue
break
if choice == 'Y' or choice == 'y':
continue
else:
break
# 如果購(gòu)物車(chē)不為空
if shopping_cart:
print('\n您的購(gòu)物車(chē)?yán)镉幸韵聦氊悾篭n')
i = 1
total_sum = 0
for item in shopping_cart:
(commodity, price, number) = (item[0], item[1], item[2])
print((str(i) + '. ' + commodity).ljust(20) + ('單價(jià):' + price + ' 元').ljust(15) + '數(shù)量:' + number)
total_sum += int(price) * int(number)
i += 1
print('\n合計(jì):%d 元' % total_sum)
while True:
if_buy = input('\n是否結(jié)算?(Y/N):')
if not (if_buy == 'Y' or if_buy == 'y' or if_buy == 'N' or if_buy == 'n'):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
while True:
# 結(jié)算
if if_buy == 'Y' or if_buy == 'y':
count = 0
cancel = False
while count < 3:
user_pay_passwd = getpass.getpass('\n請(qǐng)輸入支付密碼,或輸入 c 放棄支付:')
if user_pay_passwd == 'c':
print('\n取消支付成功...')
cancel = True
break
elif user_pay_passwd != info[3]:
if count != 2:
print('\n密碼錯(cuò)誤,請(qǐng)重試,您還有 %d 次機(jī)會(huì)...' % (2-count))
count += 1
else:
break
if cancel:
if_payed = False
elif count == 3:
with open('lock_list.txt', 'w') as lock_file:
lock_file.write(username + '\n')
exit('\n密碼錯(cuò)誤,賬戶已被鎖定...')
else:
if total_sum <= user_balance:
user_balance -= total_sum
print('\n支付成功!您已成功購(gòu)買(mǎi)以下商品:\n')
i = 1
for item in shopping_cart:
(commodity, price, number) = (item[0], item[1], item[2])
print((str(i) + '. ' + commodity).ljust(20) +
('單價(jià):' + price + ' 元').ljust(15) + '數(shù)量:' + number)
lines = open('product_list.txt', 'r').readlines()
for line in lines: # 修改商品庫(kù)存
if commodity in line.split(', '): # 定位到商品所在行
j = lines.index(line) # 獲取商品所在行的行號(hào)索引
select = line.split(', ') # 商品所在行分割為字符串列表
select[-1] = (str(int(select[-1]) - int(number)) + '\n') # 修改商品庫(kù)存
lines[j] = ', '.join(select) # 將修改后的字符串列表組成字符串
open('product_list.txt', 'w').writelines(lines) # 把修改寫(xiě)回文件
i += 1
lines = open('user_list.txt', 'r').readlines()
for line in lines: # 用戶余額寫(xiě)入文件
if username in line.split(','):
j = lines.index(line)
select = line.split(',')
select[-2] = str(user_balance)
lines[j] = ','.join(select)
open('user_list.txt', 'w').writelines(lines)
exit('\n合計(jì):%d 元, 賬戶余額:%d 元' % (total_sum, user_balance))
# 不結(jié)算
else:
print('\n您有一筆未支付訂單...')
while True:
choice = input('\n是否進(jìn)行支付?(Y/N):')
if not (choice == 'Y' or choice == 'y' or choice == 'N' or choice == 'n'):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
if choice == 'n' or choice == 'N':
exit('\n訂單已取消,感謝光臨購(gòu)物商城,再見(jiàn)...')
else:
if_buy = 'Y'
continue
if not if_payed:
print('\n您有一筆未支付訂單...')
while True:
choice = input('\n是否進(jìn)行支付?(Y/N):')
if not (choice == 'Y' or choice == 'y' or choice == 'N' or choice == 'n'):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
if choice == 'n' or choice == 'N':
exit('\n訂單已取消,感謝光臨購(gòu)物商城,再見(jiàn)...')
else:
if_buy = 'Y'
continue
# 商家入口
if entrance == '2':
seller_name = ''
# 登錄接口
count = 0
while count < 3:
seller_name = input('\n用戶名:')
with open('lock_list.txt', 'r') as lock_file:
for lock_line in lock_file:
if seller_name == lock_line.strip('\n'):
exit('\n用戶名 %s 已被鎖定,請(qǐng)聯(lián)系管理員...' % seller_name)
seller_file = open('seller_list.txt', 'r')
login = False
for seller_line in seller_file:
(seller, passwd) = seller_line.strip('\n').split(',')
if seller_name == seller:
n = 0
while n < 3:
password = getpass.getpass('密碼:')
# 登錄成功,跳出while循環(huán)
if password == passwd:
print('\n歡迎 %s 登錄商城' % seller_name)
login = True
break
else:
if n != 2:
print('\n密碼錯(cuò)誤,請(qǐng)重試,您還有 %d 次機(jī)會(huì)' % (2-n))
n += 1
# n = 3,鎖定用戶名
else:
open('lock_list.txt', 'w').write(seller_name + '\n')
exit('\n錯(cuò)誤次數(shù)過(guò)多,賬戶已被鎖定...')
# 登錄成功,跳出for循環(huán)
if login:
break
# 用戶名不存在
else:
if count != 2:
print('\n用戶名不存在,請(qǐng)重試,您還有 %d 次機(jī)會(huì)' % (2-count))
# 登錄成功,跳出while循環(huán)
if login:
break
count += 1
else:
exit('\n錯(cuò)誤次數(shù)過(guò)多,程序已退出...')
# 商品列表編輯程序
L = []
# 存放商品列表,初始為空
commodity_list = []
index = 1
print('\n您的貨架上有以下商品:\n')
print_product_list()
while True:
choice = input('\n是否編輯您的商品列表?(Y/N):')
if not (choice == 'Y' or choice == 'y' or choice == 'N' or choice == 'n'):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
if choice == 'Y' or choice == 'y':
while True:
print('\n請(qǐng)選擇(輸入 q 退出):\n')
print('1. 上架新品\n\n2. 下架商品\n\n3. 修改商品信息')
choice = input('\n>>>')
if not (choice == '1' or choice == '2' or choice == '3' or choice == 'q'):
print('輸入有誤,請(qǐng)重試...')
continue
# 上架新品
if choice == '1':
while True:
if_add = False # 是否添加商品的標(biāo)志,初始為False
new_commodity = input('\n輸入商品名:')
product_file = open('product_list.txt', 'r')
for product_line in product_file:
commodity = product_line.strip('\n').split(', ')[0] # 獲取商品列表中的商品名
if new_commodity == commodity:
print('\n此商品已在貨架上...')
continue
else:
while True:
if_sure = input('\n確定上架新品 %s 嗎?(Y/N):' % new_commodity)
if not (if_sure == 'Y' or if_sure == 'y' or if_sure == 'N' or if_sure == 'n'):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
# 確定上架新品
if if_sure == 'Y' or if_sure == 'y':
while True: # 輸入單價(jià)
price = input('\n請(qǐng)輸入單價(jià):')
if not price.isdigit():
print('\n輸入有誤,請(qǐng)重試...')
continue
break
while True: # 輸入庫(kù)存
stock = input('\n請(qǐng)輸入庫(kù)存:')
if not stock.isdigit():
print('\n輸入有誤,請(qǐng)重試...')
continue
break
new_line = '\n' + new_commodity + ', ' + price + ', ' + stock
open('product_list.txt', 'a').writelines(new_line)
print('\n成功上架新品 %s ,單價(jià) %s 元,庫(kù)存 %s 件' % (new_commodity, price, stock))
while True:
option = input('\n是否繼續(xù)添加?(Y/N):')
if not (option == 'Y' or option or option == 'N' or option == 'n'):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
if option == 'Y' or option == 'y':
if_add = True
break # 跳出for循環(huán)
else:
break
# 取消上架新品
else:
if_add = False
break # 跳出for循環(huán)
product_file.close()
if if_add is True:
continue
else:
break # 跳出while循環(huán)
# 下架商品
elif choice == '2':
while True:
del_num = input('\n請(qǐng)輸入您想下架商品的序號(hào):')
if not (del_num.isdigit() or int(del_num) > 0 and int(del_num) <= len(commodity_list)):
print('\n輸入有誤,請(qǐng)重試...')
continue
break
del_num = int(del_num)
del_commodity = commodity_list[del_num - 1][0]
with open('product_list.txt', 'r') as old_file:
with open('product_list.txt', 'r+') as new_file:
current_line = 0
# 定位到需要?jiǎng)h除的行
while current_line < (del_num - 1):
old_file.readline()
current_line += 1
# 當(dāng)前光標(biāo)在被刪除行的行首,記錄該位置
seek_point = old_file.tell()
# 設(shè)置光標(biāo)位置
new_file.seek(seek_point, 0)
# 讀需要?jiǎng)h除的行,光標(biāo)移到下一行行首
old_file.readline()
# 被刪除行的下一行讀給 next_line
next_line = old_file.readline()
# 連續(xù)覆蓋剩余行,后面所有行上移一行
while next_line:
new_file.write(next_line)
next_line = old_file.readline()
# 寫(xiě)完最后一行后截?cái)辔募?,因?yàn)閯h除操作,文件整體少了一行,原文件最后一行需要去掉
new_file.truncate()
print('\n您已成功下架 %s !' % del_commodity)
# 修改商品信息
elif choice == '3':
# 修改商品信息
def mod_commodity_info(i, j):
i = int(i)
j = int(j)
with open('product_list.txt', 'r+') as f:
current_line = 0
while current_line < i - 1:
f.readline()
current_line += 1
seek_point = f.tell()
f.seek(seek_point, 0)
# 修改商品名
if j == 1:
update_line = mod_name() + ', ' + commodity_list[i-1][1] + ', ' + commodity_list[i-1][2] + '\n'
# 修改商品價(jià)格
elif j == 2:
update_line = commodity_list[i-1][0] + ', ' + mod_price() + ', ' + commodity_list[i-1][2] + '\n'
# 修改商品庫(kù)存
else:
update_line = commodity_list[i-1][0] + ', ' + commodity_list[i-1][1] + ', ' + mod_stock() + '\n'
f.write(update_line)
return
def mod_name():
new_name = input("\n請(qǐng)輸入新的商品名:")
return new_name
def mod_price():
new_price = input("\n請(qǐng)輸入新的商品單價(jià):")
return new_price
def mod_stock():
new_stock = input("\n請(qǐng)輸入新的商品庫(kù)存:")
return new_stock
# 修改商品單價(jià)
def mod_commodity_price(i):
i = int(i)
with open('product_list.txt', 'r+') as f:
current_line = 0
while current_line < i -1:
f.readline()
current_line += 1
seek_point = f.tell()
f.seek(seek_point, 0)
new_price = input()
while True:
i = input("\n請(qǐng)輸入需要編輯的商品序號(hào)(輸入 c 取消):")
if not (i.isdigit or i == 'c' or int(i) > 0 and int(i) <= len(commodity_list)):
print("\n輸入有誤,請(qǐng)重試...")
continue
elif i == 'c':
break
else:
while True:
j = input("\n請(qǐng)選擇需要編輯的選項(xiàng)(輸入 c 取消):\n\n1. 商品名\n\n2. 單價(jià)\n\n3. 庫(kù)存\n\n>>>")
if not (j == 'c' or j == '1' or j == '2' or j == '3'):
print("\n輸入有誤,請(qǐng)重試...")
continue
break
if j == 'c':
break
else:
mod_commodity_info(i, j)
else:
exit('\n您已退出商城...')
else:
exit('\n您已退出商城...')
以上這篇Python 實(shí)現(xiàn)購(gòu)物商城,含有用戶入口和商家入口的示例就是小編分享給大家的全部?jī)?nèi)容了,希望能給大家一個(gè)參考,也希望大家多多支持腳本之家。
- python+selenium小米商城紅米K40手機(jī)自動(dòng)搶購(gòu)的示例代碼
- python框架Django實(shí)戰(zhàn)商城項(xiàng)目之工程搭建過(guò)程圖文詳解
- python簡(jiǎn)單商城購(gòu)物車(chē)實(shí)例代碼
- python爬蟲(chóng)框架scrapy實(shí)戰(zhàn)之爬取京東商城進(jìn)階篇
- python爬蟲(chóng)實(shí)戰(zhàn)之爬取京東商城實(shí)例教程
- python 實(shí)現(xiàn)網(wǎng)上商城,轉(zhuǎn)賬,存取款等功能的信用卡系統(tǒng)
- python實(shí)現(xiàn)簡(jiǎn)單購(gòu)物商城
- python抓取京東商城手機(jī)列表url實(shí)例代碼
- python實(shí)現(xiàn)淘寶購(gòu)物系統(tǒng)
- Python實(shí)現(xiàn)購(gòu)物系統(tǒng)(示例講解)
- Python實(shí)現(xiàn)信用卡系統(tǒng)(支持購(gòu)物、轉(zhuǎn)賬、存取錢(qián))
- 基于Python實(shí)現(xiàn)的購(gòu)物商城管理系統(tǒng)
相關(guān)文章
python文檔字符串(函數(shù)使用說(shuō)明)使用詳解
這篇文章主要介紹了python文檔字符串(函數(shù)使用說(shuō)明)使用詳解,文中通過(guò)示例代碼介紹的非常詳細(xì),對(duì)大家的學(xué)習(xí)或者工作具有一定的參考學(xué)習(xí)價(jià)值,需要的朋友可以參考下2019-07-07
python實(shí)現(xiàn)單機(jī)五子棋對(duì)戰(zhàn)游戲
這篇文章主要為大家詳細(xì)介紹了python實(shí)現(xiàn)單機(jī)五子棋對(duì)戰(zhàn)游戲,文中示例代碼介紹的非常詳細(xì),具有一定的參考價(jià)值,感興趣的小伙伴們可以參考一下2022-04-04
Python2.x中str與unicode相關(guān)問(wèn)題的解決方法
這篇文章主要介紹了Python2.x中str與Unicode相關(guān)問(wèn)題的解決方法,Python2.x版本中由于沒(méi)有默認(rèn)使用Unicode而會(huì)在實(shí)際使用中碰到一些字符問(wèn)題,針對(duì)這些問(wèn)題本文討論了一些解決方法,需要的朋友可以參考下2015-03-03
requests庫(kù)post方法如何傳params類(lèi)型的參數(shù)(最新推薦)
在使用requests庫(kù)的post方法時(shí),params類(lèi)型的參數(shù)用于在URL中作為查詢字符串傳遞,與data或json參數(shù)不同,后者是放在請(qǐng)求體中的,params參數(shù)接受一個(gè)字典或包含鍵值對(duì)的序列,本文給大家介紹requests庫(kù)post方法怎么傳params類(lèi)型的參數(shù),感興趣的朋友一起看看吧2025-03-03
如何使用yolov5輸出檢測(cè)到的目標(biāo)坐標(biāo)信息
YOLOv5是一系列在 COCO 數(shù)據(jù)集上預(yù)訓(xùn)練的對(duì)象檢測(cè)架構(gòu)和模型,下面這篇文章主要給大家介紹了關(guān)于如何使用yolov5輸出檢測(cè)到的目標(biāo)坐標(biāo)信息的相關(guān)資料,需要的朋友可以參考下2022-03-03
Python代碼實(shí)現(xiàn)http/https代理服務(wù)器的腳本
這篇文章主要介紹了Python代碼做出http/https代理服務(wù)器,啟動(dòng)即可做http https透明代理使用,通過(guò)幾百行代碼做出http/https代理服務(wù)器代碼片段,需要的朋友可以參考下2019-08-08
python實(shí)現(xiàn)簡(jiǎn)單的井字棋游戲(gui界面)
這篇文章主要介紹了python如何實(shí)現(xiàn)簡(jiǎn)單的井字棋游戲,幫助大家更好的理解和使用python,感興趣的朋友可以了解下2021-01-01
python入門(mén)教程之識(shí)別驗(yàn)證碼
這篇文章主要介紹了python中識(shí)別驗(yàn)證碼的相關(guān)資料,這屬于學(xué)習(xí)python的基本入門(mén)教程,文中介紹的非常詳細(xì),文末也給出了完整的示例代碼,需要的朋友們可以參考學(xué)習(xí),下面來(lái)一起看看吧。2017-03-03

