当前位置: 首页 > news >正文

Great_Data

import csv
import os
import random
from datetime import datetime
import logging
import time

# 配置日志记录
logging.basicConfig(filename='D:/Tim_Study/Case/Great_Data/log.txt',
                    level=logging.INFO,
                    format='%(asctime)s - %(levelname)s - %(message)s')

def 记录日志(消息):
    logging.info(消息)
    print(消息)

def 生成随机记录():
    # 生成随机数据
    aX_ICM_1 = random.uniform(-0.29969177, 0.29969177)
    aY_ICM_1 = random.uniform(0.6930143, 2.29969177)
    aZ_ICM_1 = random.uniform(-0.6866665, 0.69969177)
    timestamp = datetime.now().strftime("%Y/%m/%d %H:%M:%S:%f")[:-3]  # 格式化时间戳

    aX_MPU_1 = random.uniform(-0.38232422, 0.69969177)
    aY_MPU_1 = random.uniform(0.5595703, 0.79969177)
    aZ_MPU_1 = random.uniform(0.7294922, 2.7294922)

    # 数据记录列表
   


http://www.mrgr.cn/news/28589.html

相关文章:

  • Redis 主从复制
  • MaintenanceController
  • 鱼类计数与识别系统源码分享
  • 英语学习之fruit
  • a√跳房子
  • 英语学习之vegetable
  • 设计模式之原型模式
  • 深度揭秘:日志打印的艺术与实战技巧,让你的代码会说话!
  • Vscode 中新手小白使用 Open With Live Server 的坑
  • Java之线程篇四
  • 基于python+django+vue的外卖管理系统
  • 进程之信号
  • MySQL如何某种类统计数据,没有记录种类的自动补充0
  • 近期值得关注的扩散模型Diffusion与时间序列结合的文章
  • 常见经典递归过程解析
  • 嵌入式系统中的u-boot、kernel、rootfs的区别与关系
  • 【20.5 python中的FastAPI】
  • bootstrapping in the main distro: listing WSL distros: running WSL xxxx
  • Python酷库之旅-第三方库Pandas(120)
  • Java基础-反射