自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(26)
  • 资源 (2)
  • 收藏
  • 关注

原创 Python拾遗

print 打印显示颜色显示颜色的格式\ 033 [显示方式;字体色;背景色m … [\ 033 [0m]显示方式0 终端默认设置1 高亮显示4 使用下划线5 闪烁7 反白显示8 不可见字体颜色40 黑色 41 红色 42 绿色 44 黄色 44 蓝色 45 紫红色 46 青蓝色 47 白色40 黑色 41 红色 42 绿色 44 黄色 44 蓝色 45 紫红色 ...

2018-12-24 15:27:13 191

转载 Python 技术博客收藏

python mock基本使用Python中的单例模式的几种实现方式的及优化python 获取脚本所在目录的正确方法

2018-12-21 19:13:45 170

原创 2018-12-13

替换字符 replace_string = 'hello world' new_string = _string.replace('hello', 'world')print(new_string)

2018-12-28 23:38:00 159

原创 Python中的os以及sys模块

修改当前工作目录到pathos.chdir(path)获取当前工作目录os.getcwd()获取脚本所在的目录os.path.split(os.path.realpath(file))[0]__file__有时会返回绝对路径,有时会返回相对路径,所以需要加上 os.path.realpath(), os.path.split是用于分割文件路径和文件名获取函数名及行号 ...

2018-12-24 14:16:50 158

原创 量化交易

什么是量化交易?用数学模型而不是人脑,决定交易的品种,方向,时机,数量数学模型可以复杂,也可以简单定投,人工智能,无高下,围棋,80年代,图书馆人工智能不一定很好,围棋是一个复杂的简单游戏,量化交易是简单的复杂交易可以自动交易,可以不自动交易手工交易可以是量化,比如定投有的自动交易却不是量化,比如大额订单的拆分交易有价格曲线的品种,都能量化交易房地产交易玩法众多量化交易流程...

2018-12-22 23:17:30 626

原创 Python 中的内置函数

next(iterator[, default])返回可迭代对象的下一个值iterator -- 可迭代对象default -- 可选,用于设置在没有下一个元素时返回该默认值,如果不设置,又没有下一个元素则会触发 StopIteration 异常。 ...

2018-12-12 17:47:00 113

转载 事件驱动的Python实现

https://www.jianshu.com/p/a605fab0ab11

2018-12-12 11:04:47 431

原创 Python 中的内置函数

next(iterator[, default])返回可迭代对象的下一个值iterator – 可迭代对象default – 可选,用于设置在没有下一个元素时返回该默认值,如果不设置,又没有下一个元素则会触发 StopIteration 异常。...

2018-12-10 20:21:46 189

原创 Git 命令行操作

下载地址Msysgit https://git-scm.com/download.win配置代理//配置git config --global https.proxy http://127.0.0.1:1080git config --global https.proxy https://127.0.0.1:1080git config --global http.proxy ‘soc...

2018-12-10 11:03:28 1054

原创 Ubuntu 命令行操作

切换用户su //切换到rootsu imooc_manager //切换到普通用户编译安装./configure --prefix=/install pathmakesudo make install查看系统资源free //查看总体内存占用,默认以kb为单位显示-m //用Mb为单位来显示ps auxw | head -1;ps auxw|sort -rn -k4|head...

2018-12-09 20:31:40 833

原创 会作曲的人工智能

开发环境配置Tensor Flow:sudo pip install tensorflowKeras: sudo pip install kerasMusic21: sudo pip install music21H5Py: sudo pip install h5pyFfmpeg: sudo apt install ffmpegTimidity: sudo apt install ti...

2018-12-09 20:29:09 566

原创 Windows 命令行操作

//查看网络状态netstat -ano//查看进程tasklist//关闭进程taskkill -f -im processname//服务里找不到apache服务httpd.exe -k install -n Apache2.2 在命令行进入安装apache的bin目录下,回车就可以注册成功了,Apache2.2服务就会出现在服务列表里。...

2018-12-08 18:55:42 287

原创 Python 面向对象拾遗

Python中的私有属性并非真正的自由属性,外部访问是更改一下名称仍然可以访问class A: def __lal(self): print(123) a = A()print(a.A__lal())运行结果123None...

2018-12-08 18:15:49 173

原创 Python pip 操作

升级python -m pip install --upgrade pip

2018-12-08 17:36:32 343

转载 Python 中的比较:is 与 ==

https://www.cnblogs.com/kiko0o0/p/8135184.html

2018-12-07 15:17:36 107

原创 Python yield 浅析

yield 需要使用for循环才能读取def a(): a = 1 yield a b = 2 yield bres = [ i for i in a() ]其中 res 中读取结果的是倒序

2018-12-06 21:36:57 181

原创 Python string 字符串操作

替换字符 replace_string = 'hello world'new_string = _string.replace('hello', 'world')print(new_string)

2018-12-06 21:08:21 228

原创 Python ta-lib 用法

import pandas as pdimport matplotlib.pyplot as pltimport numpy as npimport talibreal0 = np.random.normal(10,10,10)[:2]real1 = np.random.rand(10)[:2]print(real0)print(real1)print(talib.ADD(re...

2018-12-06 20:45:21 3302

原创 Python logging模块常用format格式说明

logging模块常用format格式说明%(levelno)s: 打印日志级别的数值%(levelname)s: 打印日志级别名称%(pathname)s: 打印当前执行程序的路径,其实就是sys.argv[0]%(filename)s: 打印当前执行程序名%(funcName)s: 打印日志的当前函数%(lineno)d: 打印日志的当前行号%(asctime)s: 打印日志的时...

2018-12-06 20:39:17 12675

原创 Python datetime模块

import datetimenow = datetime.datetime.utcnow()time2 = now + datetime.timedelta(days=1)print(time2-now)

2018-12-06 19:26:07 131

转载 Python遍历列表删除多个列表元素

https://www.cnblogs.com/34fj/p/6351458.html

2018-12-05 14:38:07 1433

转载 Python中的绝对路径和相对路径

https://www.cnblogs.com/wangyanyan/p/7440685.html

2018-12-05 14:36:01 214 1

原创 Ubuntu服务器部署

增加新用户,配置密钥登录//增加用户adduser imooc_manager//把imooc_manager添加到sudo组gpasswd -a imooc_manager sudo//把imooc_manager设置成root相同的权限sudo visudo//用imooc_manager抄写root规则//生成密钥对ssh-keygen -t rsa -b 4096 -C ...

2018-12-05 11:41:23 241

转载 Ubuntu显卡驱动安装(解决无限循环登陆和显示卡顿问题)

https://blog.csdn.net/zhaozhichenghpu/article/details/80931076

2018-12-05 11:22:48 966

原创 编程开发学习笔记

Git命令行参考文献:https://blog.csdn.net/chenxueshanBlog/article/details/78915338  git init 初始化文件夹,在文件夹中添加.git文件,以进行版本控制 git add index.html 将index.html添加到版本库中 ...

2018-12-05 11:20:32 227

转载 [转]真正把Ubuntu装到移动硬盘里

https://blog.csdn.net/ablo_zhou/article/details/4682275###

2018-12-05 11:16:57 1017

活动演出演唱会票务网页模板

活动演出演唱会票务网页模板,活动演出演唱会票务网页模板

2018-12-07

bootstrap4管理框架material组件模板ui包spicehotel

bootstrap4管理框架material组件模板ui包spicehotel,bootstrap4管理框架material组件模板ui包spicehotel

2018-12-07

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除