首页
新闻
博问
会员
闪存
班级
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
玩转机器学习
博客园
首页
新随笔
联系
订阅
管理
2021年10月7日
python定时任务BlockingScheduler模块
摘要: python有一个定时任务模块BlockingScheduler可以很好的解决定时任务需求, from apscheduler.schedulers.blocking import BlockingScheduler my_scheduler = BlockingScheduler() #每天15:
阅读全文
posted @ 2021-10-07 16:18 玩转机器学习
阅读(2713)
评论(0)
推荐(0)
编辑
2021年7月22日
额外补充别的定时执行任务程序
摘要: 额外补充别的定时执行任务程序 介绍轻量级第三方模块schedule,需要使用 pip install schedule导入才能使用 使用时功能相对于crontab import schedule import time def job(): print("I'm working...") sched
阅读全文
posted @ 2021-07-22 11:19 玩转机器学习
阅读(25)
评论(0)
推荐(0)
编辑
2021年7月13日
Python 时间戳和日期相互转换
摘要: import time tl = time.localtime() format_time = time.strftime("%Y-%m-%d %H", tl) ts = time.strptime(format_time, "%Y-%m-%d %H") timestamp_end = int(ti
阅读全文
posted @ 2021-07-13 11:17 玩转机器学习
阅读(299)
评论(0)
推荐(0)
编辑
2021年2月5日
扩大已有MBR分区
摘要: 前言:以“Ubantu 64bit”操作系统为例,系统盘“/dev/vda”原有容量40GB,只有一个分区“/dev/vda1”。将系统盘容量扩大至60GB,本示例将新增的20GB划分至已有的MBR分区内“/dev/vda1”内。 (可选)执行以下命令,安装growpart扩容工具。 sudo ap
阅读全文
posted @ 2021-02-05 22:09 玩转机器学习
阅读(244)
评论(0)
推荐(0)
编辑
2021年2月1日
kwargs与args的用法区别
摘要: kwargs就是当你传入key=value是存储的字典,args是元组 def foo(*args, **kwargs): print('args = ', args) print('kwargs = ', kwargs) print(' ') if __name__ == '__main__':
阅读全文
posted @ 2021-02-01 14:36 玩转机器学习
阅读(365)
评论(0)
推荐(0)
编辑
2021年1月30日
简述python中的@staticmethod和@property的作用及用法
摘要: 一.@property的作用及用法 我们可以使用@property装饰器来创建只读属性,@property装饰器会将方法转换为相同名称的只读属性,可以与所定义的属性配合使用,这样可以防止属性被修改 class DataSet(object): def __init__(self): self._im
阅读全文
posted @ 2021-01-30 16:55 玩转机器学习
阅读(421)
评论(0)
推荐(0)
编辑
2021年1月28日
dataframe 常用总结
摘要: import pandas as pd import matplotlib.pyplot as plt # 创建dataframe df_tmp = pd.DataFrame({'时间':list(df6['时间']), '6F-X向水平振动':list(df6['X向水平振动']), '5F-X向
阅读全文
posted @ 2021-01-28 14:27 玩转机器学习
阅读(199)
评论(0)
推荐(0)
编辑
2021年1月22日
python获取文件的绝对路径
摘要: python获取文件的绝对路径 import os def load_file(): # 获取当前文件路径 current_path = os.path.abspath(__file__) # 获取当前文件的父目录 father_path = os.path.abspath(os.path.dirn
阅读全文
posted @ 2021-01-22 09:37 玩转机器学习
阅读(3458)
评论(0)
推荐(0)
编辑
2021年1月18日
机器学习-Python中训练模型的保存和再使用
摘要: 机器学习-Python中训练模型的保存和再使用 模型保存 BP:model.save(save_dir) SVM: from sklearn.externals import joblib joblib.dump(clf, save_dir) 模型调用: BP: from keras.models
阅读全文
posted @ 2021-01-18 11:03 玩转机器学习
阅读(1445)
评论(0)
推荐(0)
编辑
2020年11月28日
python 项目打包成exe可执行程序
摘要: 前言: py2exe和pyinstaller大致比较:1). pyinstaller生成的exe执行文件,集成了所需要的所有资源,所以exe文件相对较大,可以直接拷贝到其他电脑使用;2). py2exe限制较多,需要自己编写简单的打包脚本(setup.py),可以按需求进行定制化,最后会把所有依赖的
阅读全文
posted @ 2020-11-28 19:18 玩转机器学习
阅读(371)
评论(0)
推荐(0)
编辑
下一页