摘要: set global read_only=0; set global optimizer_switch='derived_merge=off'; create user 'my_user'@'%' identified by 'my_password'; create database my_db 阅读全文
posted @ 2020-05-07 12:40 程式交易 阅读(213) 评论(0) 推荐(0) 编辑
摘要: python -m pip install mysql-connector 创建数据库连接 import mysql.connector mydb = mysql.connector.connect( host="localhost", # 数据库主机地址 user="yourusername", 阅读全文
posted @ 2020-04-29 16:07 程式交易 阅读(154) 评论(0) 推荐(0) 编辑
摘要: python pip安装模块提示错误failed to create process 原因: 报这个错误的原因,是因为python的目录名称或位置发生改动。 解决办法: 1.找到修改python所在的目录,打开scripts目录,如下图找到修改python所在的目录,打开scripts目录,找到pi 阅读全文
posted @ 2020-04-29 15:57 程式交易 阅读(463) 评论(0) 推荐(0) 编辑
摘要: Python中有split()和os.path.split()两个函数,具体作用如下:split():拆分字符串。通过指定分隔符对字符串进行切片,并返回分割后的字符串列表(list)os.path.split():按照路径将文件名和路径分割开 一、函数说明 1、split()函数语法:str.spl 阅读全文
posted @ 2020-04-29 14:52 程式交易 阅读(37425) 评论(0) 推荐(0) 编辑
摘要: 无需参数直接请求单个页面 import urllib from urllib.request import request from urllib.urlopen import urlopen # import urllib2 import requests # 使用 urllib 方式获取 res 阅读全文
posted @ 2020-04-28 22:21 程式交易 阅读(199) 评论(0) 推荐(0) 编辑
摘要: # encoding: utf8 #部分网站api数据有bug,这个bug问题不是自身程序的问题,而是第三方公司股票的问题 __author__ = 'nooper' import re from math import ceil import datetime from httpGet impor 阅读全文
posted @ 2020-04-28 22:16 程式交易 阅读(4424) 评论(0) 推荐(0) 编辑
摘要: 参考: https://www.cnblogs.com/zhaof/p/10182903.html 阅读全文
posted @ 2020-04-28 21:42 程式交易 阅读(143) 评论(0) 推荐(0) 编辑
摘要: 参考: https://www.cnblogs.com/zhaof/p/7299025.html https://blog.csdn.net/qq_22022063/article/details/78979367 阅读全文
posted @ 2020-04-28 21:35 程式交易 阅读(160) 评论(0) 推荐(0) 编辑
摘要: #方式一 直接连接 #!/usr/bin/python3 # a sample to use mysql-connector for python3 # see details from http://dev.mysql.com/doc/connector-python/en/index.html 阅读全文
posted @ 2020-04-26 00:08 程式交易 阅读(181) 评论(0) 推荐(0) 编辑
摘要: https://blog.csdn.net/tomorrow13210073213/article/details/72809762 阅读全文
posted @ 2020-04-25 23:59 程式交易 阅读(150) 评论(0) 推荐(0) 编辑