d262a0d3c567cf0543760bd238f67411acb697c2,QUANTAXIS/QAFetch/QAhuobi.py,,QA_fetch_huobi_kline,#Any#Any#Any#Any#Any#,130

Before Change


                break
            // 转换成DICT,mongodb不接受专有类型
            for kline in klines:
                time.strftime("%Y-%m-%d %H:%M:%S", time.localtime(kline.id))
                datas.append(kline.__dict__)
            // 狗日huobi.pro的REST API kline时间戳排序居然是倒序向前获取,必须从后向前获取,而且有数量限制,Request
            // < 2000,

After Change


    if (retries == 0):
        // 成功获取才处理数据,否则继续尝试连接
        msg_dict = json.loads(req.content)
        if (("status" in msg_dict) and (msg_dict["status"] == "ok") and ("data" in msg_dict)):
            if len(msg_dict["data"]) == 0:
                return None
            for kline in msg_dict["data"]:
                datas.append(kline)
        // 狗日huobi.pro的REST API kline时间戳排序居然是倒序向前获取,必须从后向前获取,而且有数量限制,Request
        // < 2000,

    if len(datas) == 0:
        return None

    // 归一化数据字段,转换填充必须字段,删除多余字段
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: d262a0d3c567cf0543760bd238f67411acb697c2
Time: 2020-02-26
Author: 11652964@qq.com
File Name: QUANTAXIS/QAFetch/QAhuobi.py
Class Name:
Method Name: QA_fetch_huobi_kline


Project Name: hyperspy/hyperspy
Commit Name: f3480af5ca1682ec0ccf30d62d1640742324d87d
Time: 2016-08-09
Author: eric.prestat@gmail.com
File Name: hyperspy/io_plugins/semper_unf.py
Class Name: SemperFormat
Method Name: from_signal


Project Name: PyThaiNLP/pythainlp
Commit Name: 0eac18946993add8149e4460d7ca27ec47ec0ed3
Time: 2019-04-12
Author: arthit@gmail.com
File Name: pythainlp/util/date.py
Class Name:
Method Name: thai_strftime