04 2020 档案

摘要:python -m pip install mysql-connector 创建数据库连接 import mysql.connector mydb = mysql.connector.connect( host="localhost", # 数据库主机地址 user="yourusername", 阅读全文
posted @ 2020-04-29 16:07 程式交易 阅读(160) 评论(0) 推荐(0)
摘要:python pip安装模块提示错误failed to create process 原因: 报这个错误的原因,是因为python的目录名称或位置发生改动。 解决办法: 1.找到修改python所在的目录,打开scripts目录,如下图找到修改python所在的目录,打开scripts目录,找到pi 阅读全文
posted @ 2020-04-29 15:57 程式交易 阅读(545) 评论(0) 推荐(0)
摘要:Python中有split()和os.path.split()两个函数,具体作用如下:split():拆分字符串。通过指定分隔符对字符串进行切片,并返回分割后的字符串列表(list)os.path.split():按照路径将文件名和路径分割开 一、函数说明 1、split()函数语法:str.spl 阅读全文
posted @ 2020-04-29 14:52 程式交易 阅读(37497) 评论(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 程式交易 阅读(214) 评论(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 程式交易 阅读(4632) 评论(0) 推荐(0)
摘要:参考: https://www.cnblogs.com/zhaof/p/10182903.html 阅读全文
posted @ 2020-04-28 21:42 程式交易 阅读(145) 评论(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 程式交易 阅读(165) 评论(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 程式交易 阅读(200) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/tomorrow13210073213/article/details/72809762 阅读全文
posted @ 2020-04-25 23:59 程式交易 阅读(160) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/ITBigGod/article/details/103134635 阅读全文
posted @ 2020-04-25 23:57 程式交易 阅读(465) 评论(0) 推荐(0)
摘要:dataset对于操作JSON文件、NoSQL非常好用。 官方文档:http://dataset.readthedocs.io/en/latest/ 补充: 连接mysql数据库: db = dataset.connect('mysql://username:password@10.10.10.10 阅读全文
posted @ 2020-04-25 23:54 程式交易 阅读(1313) 评论(0) 推荐(0)
摘要:# encoding:utf8 #部分股票数据历史价格有误,尤其是2011年以前的数据,等一些历史数据 #无论是yahoo还是新浪的 __author__ = 'nooper' import cStringIO import csv from bs4 import BeautifulSoup fro 阅读全文
posted @ 2020-04-25 23:16 程式交易 阅读(292) 评论(0) 推荐(0)
摘要:# encoding: utf8 #部分网站api数据有bug,这个bug问题不是自身程序的问题,而是第三方公司股票的问题 __author__ = 'nooper' import re from math import ceil import datetime from httpGet impor 阅读全文
posted @ 2020-04-25 23:14 程式交易 阅读(6329) 评论(1) 推荐(0)
摘要:https://www.cnblogs.com/mryaohu/p/12242038.html 破解机下载 https://zhile.io/2018/08/17/jetbrains-license-server-crack.html 将下载的破包zip包,直接拖到pycharm,即可。 https 阅读全文
posted @ 2020-04-25 23:07 程式交易 阅读(152) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/wst0717/article/details/90446238 阅读全文
posted @ 2020-04-25 23:06 程式交易 阅读(217) 评论(0) 推荐(0)
摘要:KLine #!/usr/bin/python # -*- coding: UTF-8 -*- import pandas as pd import matplotlib.pyplot as plt import matplotlib.mlab as mlab import mpl_finance 阅读全文
posted @ 2020-04-25 07:39 程式交易 阅读(619) 评论(0) 推荐(0)
摘要:参考 https://www.runoob.com/python/python-mysql.html https://blog.csdn.net/nixonwuying/article/details/87184128 安装插件 https://blog.csdn.net/peach_orange/ 阅读全文
posted @ 2020-04-25 07:33 程式交易 阅读(217) 评论(0) 推荐(0)
摘要:USE information_schema; SELECT table_name,table_rows FROM TABLES WHERE TABLE_SCHEMA = 'education' ORDER BY table_rows DESC; education 为要统计的数据库名 阅读全文
posted @ 2020-04-24 11:15 程式交易 阅读(1419) 评论(0) 推荐(0)
摘要:参考: https://blog.csdn.net/menghuanzhiming/article/details/77574135 https://blog.csdn.net/menghuanzhiming/article/details/77574135 阅读全文
posted @ 2020-04-22 10:33 程式交易 阅读(309) 评论(0) 推荐(0)
摘要:参考: https://blog.csdn.net/sqy941013/article/details/80536181 阅读全文
posted @ 2020-04-22 10:29 程式交易 阅读(994) 评论(0) 推荐(0)
摘要:.vscode 2019-09-05 8 months ago 0001.两数之和 2020-01-25 3 months ago 0002.两数相加 2019-09-08 8 months ago 0003.无重复字符的最长子串 2019-09-08 8 months ago 0004.寻找两个有 阅读全文
posted @ 2020-04-22 10:27 程式交易 阅读(796) 评论(0) 推荐(0)
摘要:# -*- coding: utf-8 -*- import requests import traceback import re import os from bs4 import BeautifulSoup # 獲取網頁內容 def get_html_text(url): try: r = r 阅读全文
posted @ 2020-04-22 10:09 程式交易 阅读(399) 评论(0) 推荐(0)
摘要:1.准备工作 服务器一,操作系统Debian 8,IP地址192.168.15.10,主机名master,mysql版本5.5。 服务器二,操作系统Debian 8,IP地址192.168.15.11,主机名slave,mysql版本5.5。 2.配置 a)配置Master root@master: 阅读全文
posted @ 2020-04-22 10:01 程式交易 阅读(146) 评论(0) 推荐(0)
摘要:shell命令 root@debian:~# mysqlimport -uroot -p123456 --fields-terminated-by=',' --fields-enclosed-by='"' --fields-escaped-by='"' database_name /var/lib/ 阅读全文
posted @ 2020-04-22 09:57 程式交易 阅读(831) 评论(0) 推荐(0)
摘要:1.能够获得股票部分金融数据 2.能够获得日线,周线,60分钟数据线,月线,30分钟数据。### 3.能够获得历史数据,但是部分各大网站的股票的历史数据有很大的误差,情谨慎鉴别 源码地址:https://github.com/nooperpudd/chinastock/blob/master/sto 阅读全文
posted @ 2020-04-22 09:47 程式交易 阅读(402) 评论(0) 推荐(0)
摘要:1.接口 http://qt.gtimg.cn/q=sz000001 v_sz000001="51~平安银行~000001~9.52~9.48~9.50~671452~320552~350900~9.51~2107~9.50~4457~9.49~2416~9.48~1292~9.47~864~9.5 阅读全文
posted @ 2020-04-22 09:41 程式交易 阅读(4860) 评论(0) 推荐(0)
摘要:import requests # txt文件,存储股票代码,一行一个代码,小写字母 f = open(r"G:\pycharm_code\stock.txt") symbols = [line.strip() for line in f.readlines()] f.close() def get 阅读全文
posted @ 2020-04-21 21:30 程式交易 阅读(275) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/yunerlalala/p/6341050.html 阅读全文
posted @ 2020-04-19 00:31 程式交易 阅读(290) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/txw1958/archive/2012/07/28/python3-stock.html 阅读全文
posted @ 2020-04-19 00:30 程式交易 阅读(1063) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/yunerlalala/p/6295500.html 阅读全文
posted @ 2020-04-19 00:27 程式交易 阅读(347) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/diaosir/p/6289571.html 阅读全文
posted @ 2020-04-19 00:26 程式交易 阅读(693) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/dennis-liucd/p/7669161.html https://www.cnblogs.com/kingwolfofsky/archive/2011/08/14/2138081.html 阅读全文
posted @ 2020-04-18 23:53 程式交易 阅读(2178) 评论(0) 推荐(0)
摘要:https://blog.csdn.net/qq_27384769/article/details/79490255 阅读全文
posted @ 2020-04-17 14:15 程式交易 阅读(130) 评论(0) 推荐(0)
摘要:import numpy as np def tanh(x): #双曲函数 return np.tanh(x) def tanh_deriv(x):#更新权重时,需要用到双曲函数的倒数 return 1.0 - np.tanh(x)*np.tanh(x) def logistic(x):#构建逻辑函 阅读全文
posted @ 2020-04-16 20:26 程式交易 阅读(230) 评论(0) 推荐(0)
摘要:https://www.cnblogs.com/songzhixue/p/11296720.html 清华:https://pypi.tuna.tsinghua.edu.cn/simple 阿里云:http://mirrors.aliyun.com/pypi/simple/ 中国科技大学 https 阅读全文
posted @ 2020-04-05 09:47 程式交易 阅读(157) 评论(0) 推荐(0)
摘要:https://www.runoob.com/numpy/numpy-install.html python -m pip install --user numpy scipy matplotlib ipython jupyter pandas sympy nose 阅读全文
posted @ 2020-04-05 09:33 程式交易 阅读(100) 评论(0) 推荐(0)
摘要:import matplotlib.pyplot as plt import numpy as np import sklearn import sklearn.datasets import sklearn.linear_model import matplotlib 阅读全文
posted @ 2020-04-05 09:24 程式交易 阅读(144) 评论(0) 推荐(0)
摘要:https://zhuanlan.zhihu.com/p/58964140 阅读全文
posted @ 2020-04-05 09:05 程式交易 阅读(159) 评论(0) 推荐(0)