摘要: 1 #include <stdio.h> 2 #include <time.h> 3 4 //日期格式转时间戳 5 time_t get_timestamp(char* time_str) 6 { 7 struct tm tm;//时间结构体 8 time_t timestamp;//时间类型,表示 阅读全文
posted @ 2021-10-11 19:41 forest_128 阅读(882) 评论(0) 推荐(0) 编辑
摘要: 封装.a静态库:打开cmdcd到.c文件所在的文件目录gcc -c xxx.c(注意:如果gcc版本过低,可能需要改成gcc -c xxx.c -std=c99)ar -rc libxxx.a xxx.o(此时已封装好)gcc main.c libxxx.a -o exename(连接主函数进行测试 阅读全文
posted @ 2021-08-25 19:32 forest_128 阅读(211) 评论(0) 推荐(0) 编辑
摘要: 用低版本GCC4.9.2编译静态库时报错 >gcc -c activityIntensity.c 更改为: >gcc -c activityIntensity.c -std=c99 成功编译 阅读全文
posted @ 2021-08-25 19:06 forest_128 阅读(156) 评论(0) 推荐(0) 编辑
摘要: df0=pd.read_csv('./xlsx/住院费用1401-03.csv', index_col=0) 问题:读取csv文件时编码错误 报错:UnicodeDecodeError: 'utf-8' codec can't decode byte 0xba in position 4: inva 阅读全文
posted @ 2021-03-03 11:10 forest_128 阅读(338) 评论(0) 推荐(0) 编辑
摘要: 安装keras :~/PycharmProjects$ pip install -i https://pypi.tuna.tsinghua.edu.cn/simple kerasLooking in indexes: https://pypi.tuna.tsinghua.edu.cn/simpleC 阅读全文
posted @ 2020-12-10 21:58 forest_128 阅读(155) 评论(0) 推荐(0) 编辑
摘要: 查看版本号 :~$ python -VPython 3.7.5 :~$ pip3 -Vpip 18.1 from /usr/lib/python3/dist-packages/pip (python 3.7) :~$ pip -Vpip 18.1 from /usr/lib/python3/dist 阅读全文
posted @ 2020-12-10 21:24 forest_128 阅读(222) 评论(0) 推荐(0) 编辑
摘要: import random import numpy as np In [2]: nd=np.arange(10) str=list('astrcdefghij') print("nd:",nd) print("str:",str) Out[2]: nd: [0 1 2 3 4 5 6 7 8 9] 阅读全文
posted @ 2020-12-06 03:17 forest_128 阅读(101) 评论(0) 推荐(0) 编辑
摘要: In [1]: import os from pathlib import Path import glob 方法1 In [3]: dirpath="D:\\test\\1" #判断是否是目录 if os.path.isdir(dirpath): img_names=[] # 获取所有文件名 di 阅读全文
posted @ 2020-12-05 23:27 forest_128 阅读(392) 评论(0) 推荐(0) 编辑
摘要: seed( ) 用于指定随机数生成时所用算法开始的整数值。1.括号内数字为标识符,如果使用相同的标识,则每次生成的随即数都相同;我理解的是每一个标识对应一组固定的随机数,使用seed()后,random从这组随机数中按顺序取数;2.如果不设置这个值,则系统根据时间来自己选择这个值,此时每次生成的随机 阅读全文
posted @ 2020-11-12 17:40 forest_128 阅读(171) 评论(0) 推荐(0) 编辑
摘要: tensorflow 识别图像特征 解决:确定一张图是否是鞋子 1 import matplotlib.pyplot as plt 2 import tensorflow as tf 3 #加载数据 4 mnist=tf.keras.datasets.fashion_mnist 5 (trainin 阅读全文
posted @ 2020-10-21 01:01 forest_128 阅读(460) 评论(0) 推荐(0) 编辑