1 Star 0 Fork 0

邓世琦/AutoLab

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
test.py 3.93 KB
一键复制 编辑 原始数据 按行查看 历史
# import yaml
# from core.caculat import analysis
#
#
# """
# with open('config/config.yml', 'r', encoding = "utf8") as file:
# config = yaml.safe_load(file)
# config["comboBoxList"]["5400"]
# """
#
# """
# path = r"C:\Users\shiqideng\Desktop\test\5400"
# partialFileName = r"Quality Table.csv"
# a = analysis.findFilePath(path = path, partialFileName = partialFileName)
# print(a[0])
# """
#
#
# # 生成密钥
# def generate_key():
# return Fernet.generate_key()
#
#
# # 加密密码
# def encrypt_password(password, key):
# cipher_suite = Fernet(key)
# return cipher_suite.encrypt(password.encode('utf-8'))
#
#
# # 验证密码
# def validate_password(password, encrypted_password, key):
# cipher_suite = Fernet(key)
# try:
# decrypted_password = cipher_suite.decrypt(encrypted_password.encode('utf-8'))
# return password == decrypted_password.decode('utf-8')
# except InvalidToken:
# return False
#
#
# # coding:utf-8
#
# import sqlite3
#
#
# # 数据库增加数据
#
# def add_data():
# sql = sqlite3.connect("user_data.data(test)")
#
# sql.execute("insert into user(name,passworld) values('python','147258369')")
#
# sql.commit()
#
# print
# "添加成功"
#
# sql.close() # 关闭数据库
#
#
# # sqlite3.connect("user_data.data(test)")要增加一条用户资料,首先要打开数据库文件
#
# # "insert into user(name,passworld) values('python','147258369')"是sqlite3指令
#
# # 它表示在表'user'的name对应的列写入一行python,就是用户名,在passworld对应的列写入一行147258369,就是用户密码
#
# # 做完这一步之后,对数据库的操作已经完成,但user_data.db这个文件是还没有发生变化的
#
# # sql.commit()提交任务,只有使用了commit()方法后,才会把之前对数据库的操作写入文件中,
#
# # sql.close()是关闭数据库,每次对数据库进行操作后,都要记得进行关闭操作
#
# add_data()
#
# # coding:utf-8
#
# import sqlite3
#
#
# # 数据库增加数据
#
# def add_data():
# input_name = str(raw_input("请输入您的用户名:"))
#
# input_passworld = str(raw_input("请输入您的密码:"))
#
# sql = sqlite3.connect("user_data.data(test)")
#
# sql.execute("insert into user(name,passworld) values(?,?)",
#
# (input_name, input_passworld))
#
# sql.commit()
#
# print
# "添加成功"
#
# sql.close()
#
#
# # 这里增加了读取两个参数values(?,?)字段里的两个?号,对应了参数input_name,input_passworld
#
#
# def showalldata():
# sql = sqlite3.connect("user_data.data(test)")
#
# data = sql.execute("select * from user").fetchall()
#
# sql.close()
#
# return data
#
#
# # "select * from user"为查询user对应的表的所有资料的指令
#
#
# while 1:
#
# option = """
#
# 1:增加数据
#
# 2:查询数据
#
# q:退出
#
# 选择您想要的进行的操作:"""
#
# cho = raw_input(option)
#
# if cho == '1':
#
# add_data()
#
# elif cho == '2':
#
# showalldata()
#
# elif cho == 'q':
#
# break
#
# else:
#
# "输入错误"
# from package import database, password
#
#
# def validate_password(passwd, encrypted_password):
# try:
# encrypted = password.des_encrypt(passwd)
# return encrypted == encrypted_password
# except Exception as e:
# print(e)
# return False
#
#
# pwd = bytes(eval(database.findUser("邓世琦")["passwd"]))
# valid_password = validate_password("1234567890", pwd)
# print(valid_password)
import pandas
# filename = r"C:/Users/shiqideng/Desktop/test/5400/Library\2022 09 07 14H 43M Peak Table.csv"
# delimiter参数的作用是指定分隔符,dtype参数的作用是指定数据类型
# data = pandas.read_csv(filename)
# rows, columns = data.shape
# header = list(data.columns)
#
# [print(i) for i in header]
# for row in range(1, rows):
# for col in range(columns):
# print(row, col, data.iloc[row][col])
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/deng_shiqi/AutoLab.git
git@gitee.com:deng_shiqi/AutoLab.git
deng_shiqi
AutoLab
AutoLab
master

搜索帮助