原创 Dataframe的數據print輸出 顯示爲...省略號

原文鏈接:http://30daydo.com/article/165 例如: def get_achievement(self): fc=ts.forecast_data(2016,4) pr

原创 putty 下 sqlite3 輸出的中文亂碼解決辦法

putty 下 sqlite3 輸出的中文亂碼解決辦法。 最近使用sqlite3在ubuntu下導入了一些股票信息到數據庫。 然後把db文件拷貝到另外一臺linux上(樹莓派,僞linux吧)。 樹莓派只能putty遠程登錄連接。登錄後

原创 Ubuntu使用VNC連接windows錯誤: connection: no matahcing security types

最近遇到  Ubuntu使用VNC連接windows錯誤: connection: no matahcing security types

原创 quantdigger 安裝教程 & 安裝出現的問題解決

http://30daydo.com/publish/article/195  win7可以下載https://github.com/Rockyzsu/quantdigger 然後解壓, 運行以下python命令: python set

原创 布林曲線函數中的MA_Type

import talib from talib import MA_Type MA_Type: 0=SMA, 1=EMA, 2=WMA, 3=DEMA, 4=TEMA, 5=TRIMA, 6=KAMA, 7=MAMA, 8=T3 (De

原创 python多線程中join的用法

python中多線程join是用來阻塞主線程的。  看下面的例子: def fast(): print "in fast" sleep(10) print "done in fast" def slow()

原创 python連接mongodb集羣 cluster

網上資料比較少,自己測試了下。 連接方法如下: import pymongo db = pymongo.MongoClient('mongodb://10.18.6.46,10.18.6.26,10.18.6.102') 上面默認的端口

原创 itchat 微信接口不能直接發消息給指定用戶

很久沒有用itchat,最近有需求需要用到,所以把以前用的代碼進行復用。 itchat.auto_login(hotReload=True) itchat.send(content,toUserName='fil

原创 pyhton獲取 中國各個省份/直轄市擁有的上市公司數目

原文地址:http://30daydo.com/article/169 一個省份地區的上市公司的數目,可以很直接地反應這個地區的發達程度。下面通過代碼來統計這個數據, 其實很簡單,用python只需幾行代碼就能夠實現  def c

原创 mac os x python安裝matplotlib 庫 出錯: Operation not permitted

原文鏈接: http://30daydo.com/article/167 使用pip安裝: sudo pip install matplotlib Password: The directory '/Users/rocky/Library

原创 python 多線程監測股票漲停板打開 並通知用戶

原文鏈接:http://30daydo.com/article/184 實測,很有用。 具體用法可以到原文鏈接去查看。 # -*-coding=utf-8-*- __author__ = 'Rocky' ''' http://30da

原创 tushare 源碼分析 之 fundamental.py

原文鏈接:http://www.30daydo.com/article/74 python的tushare用來做數據分析是一個不錯的工具。  下面來具體看看裏面的一些具體的函數是怎麼實現的。 fundamental.py  這個文件是獲

原创 量化交易 獲取獲取上市公司年報

tushare有一個函數, ts.get_report_data(年份,季度), 可以獲取每一年的季度的業績。 如果想要獲取上市公司的年報,只要吧季度參數改爲4即可  例如 要獲取 中國銀行的2016年的年報 df=ts.get_r

原创 python 出現InsecurePlatformWarning: A true SSLContext object is not available錯誤

這個如果代碼沒有問題的話,問題一般是因爲你的requests的版本原因。 解決方法: pip install pyOpenSSL ndg-httpsclient pyasn1 安裝以上的庫就可以了。

原创 使用pycharm,快速補充缺少的第三方庫

用過ecplise的的都知道,遇到沒有導入的包的時候,可以使用快捷鍵ctrl+1 就可以實現 那麼在使用pycharm中,對於需要經常通過import導入第三方庫的操作,可以使用以下的快捷鍵進行快速導入。 win: Alt + Ente