4f51a511dd924f89fe9ec9ee3da944779cc0876f,QUANTAXIS/QAWeb/fetch_block.py,,get_block,#Any#,10

Before Change



def get_block(block):
    block_tdx = QA.DATABASE.stock_block
    block_ths = QA.DATABASE.stock_block_ths
    codelist = QA.QA_fetch_stock_list_adv()
    block = [block] if isinstance(block, str) else block

    code_tdx = pd.DataFrame(
        [item for item in block_tdx.find({"blockname": {"$in": block}})])
    code_ths = pd.DataFrame(
        [item for item in block_ths.find({"blockname": {"$in": block}})])

    return pd.concat([code_tdx, code_ths], axis=0).code.drop_duplicates().tolist()


def get_name(code):
    codelist = QA.QA_fetch_stock_list_adv()

After Change


    block = [block] if isinstance(block, str) else block
    block_df = pd.DataFrame(
        [item for item in block_db.find({"blockname": {"$in": block}})])
    return block_df.code.drop_duplicates().tolist()


def get_name(code):
    codelist = QA.QA_fetch_stock_list_adv()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 4f51a511dd924f89fe9ec9ee3da944779cc0876f
Time: 2018-09-13
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAWeb/fetch_block.py
Class Name:
Method Name: get_block


Project Name: catalyst-cooperative/pudl
Commit Name: d9187309769bd34e34294003cef5290e512c6fbc
Time: 2020-07-31
Author: zane.selvans@catalyst.coop
File Name: src/pudl/transform/eia861.py
Class Name:
Method Name: _harvest_associations


Project Name: Featuretools/featuretools
Commit Name: 81718c3bf6b741bfc3fc0fbd03e6d1db9861b561
Time: 2018-08-27
Author: kmax12@gmail.com
File Name: featuretools/entityset/entity.py
Class Name: Entity
Method Name: _vals_to_series


Project Name: JasonKessler/scattertext
Commit Name: 40dda4d884d44557eeed607b0fe2135158cd5d61
Time: 2018-05-15
Author: Jason.Kessler@cdk.com
File Name: scattertext/TermDocMatrix.py
Class Name: TermDocMatrix
Method Name: _get_background_unigram_frequencies