81367c60491717618de2f4bcf17c63b5c6aebcc7,QUANTAXIS/QASU/save_tushare.py,,QA_save_stock_day_all,#,13

Before Change


    df= ts.get_stock_basics()
    for i in df.index:  
        print("Now Saving %s" %(i) )    
        try:
            data=ts.get_hist_data(str(i))
            
            data_json=json.loads(data.to_json(orient="records"))
            
            
            for i in range(0,len(data_json),1):
                data_json[i]["date_stamp"]=QA_util_date_stamp(list(data.index)[i])
                data_json[i]["date"]=list(data.index)[i]
           
            
            coll=pymongo.MongoClient().quantaxis.stock_day
            coll.insert_many(data_json)
        except:
            print("error in saving"+str(i))

def QA_SU_save_stock_list(client):
    data=QATushare.QA_fetch_get_stock_list()
    date=str(datetime.date.today())
    date_stamp=QA_util_date_stamp(date)

After Change


        except:
            print("error in saving"+str(i))

    pool=ThreadPool(4)
    pool.map(saving_work,df.index)
    pool.close()
    pool.join()


def QA_SU_save_stock_list(client):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 81367c60491717618de2f4bcf17c63b5c6aebcc7
Time: 2017-05-30
Author: yutiansut@qq.com
File Name: QUANTAXIS/QASU/save_tushare.py
Class Name:
Method Name: QA_save_stock_day_all


Project Name: estnltk/estnltk
Commit Name: cf5f38373ec0a08518dae7051e53e44c316c166c
Time: 2015-07-28
Author: karl.valliste@gmail.com
File Name: estnltk/prettyprinter/prettyprinter.py
Class Name: PrettyPrinter
Method Name: render


Project Name: home-assistant/home-assistant
Commit Name: 6500cb791588e115a62712199c0cbed626af8f31
Time: 2018-02-13
Author: frederik.bolding@gmail.com
File Name: homeassistant/components/camera/rpi_camera.py
Class Name:
Method Name: setup_platform