e1f347d15e8d70ed2ac6b27ca613f02a1797a57f,etc/zapier.py,,millify,#Any#,12

Before Change


        )
    )

    return "{:.0f}{}".format(n / 10 ** (3 * millidx), millnames[millidx])


// Open a session to save time (only allowed 1 second on Zapier)
session = requests.Session()

After Change


    //  - 967123  -> 967k
    //  - 1000123 -> 1M
    //  - 1100123 -> 1.1M
    final_string = one_decimal if n > 1e6 and not one_decimal.is_integer() else int(final_num)

    return f"{final_string}{millnames[millidx]}"

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tgsmith61591/pmdarima
Commit Name: e1f347d15e8d70ed2ac6b27ca613f02a1797a57f
Time: 2019-08-26
Author: aaronreidsmith@gmail.com
File Name: etc/zapier.py
Class Name:
Method Name: millify


Project Name: sentinel-hub/eo-learn
Commit Name: 0a8228d4f90f9e494aa142d1576691fcbf0c6df9
Time: 2019-11-26
Author: jovan.visnjic@sinergise.com
File Name: io/eolearn/io/processing_api.py
Class Name: SentinelHubProcessingInput
Method Name: size_from_resolution


Project Name: mil-tokyo/webdnn
Commit Name: 008198ff0348140f248af1d415587c8313c1ea90
Time: 2017-08-24
Author: y.kikura@gmail.com
File Name: src/graph_transpiler/webdnn/backend/webgl/uniform_injector.py
Class Name: UniformInjector
Method Name: inject_tag