<commit_before><div class="container">
    <ol class="breadcrumb">
        <li><a href="/">首页</a></li>
        {{#foreach category.breadcrumb}}
            <li><a href="{{path}}">{{name}}</a></li>
        {{/foreach}}
        <li class="active">{{text category.name words="15"}}</li>
    </ol>
    <div class="page-header text-center">
        <h1>{{category.name}}</h1>
    </div>

    <!--
    <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
      <input type="text" class="form-control" placeholder="Search for...">
    </div>
</div>
<div class="col-lg-6">
    <div class="input-group">
        <input type="text" class="form-control" placeholder="Search for...">
        <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
    </div>
</div>
 -->
    <div >
        <form class="form" >
            <div class="row">
                <div class="alert alert-info">
                    价格，汇率都会实时变动，请每次以最新查询结果为准
                </div>
            </div>
            <br/>
            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">选择币种</button>
                        </span>
                        <select class="form-control" id="coinType">
                        </select>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">一次搬个数</button>
                        </span>
                        <input type="number" class="form-control" placeholder="数量越多搬价越高" id="count">
                    </div>
                </div>
            </div>
            <br/>

            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <button type="button" class="btn-success form-control" id="calculate">
                            预估
                        </button>
                    </div>
                </div>
            </div>
            <br/>
            <!--
            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">最终搬回价格</button>
                        </span>
                        <input type="text" class="form-control" id="final">
                    </div>
                </div>
            </div>
            <br/>
            -->
            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">全程搬砖价</button>
                        </span>
                        <input type="text" class="form-control" id="bz_price">
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">直接收币价</button>
                        </span>
                        <input type="text" class="form-control" id="coin_price">
                    </div>
                </div>
            </div>
            <br/>
            <div class="row">
                <div id="success" class="alert alert-success">
                </div>
            </div>
        </form>
    </div>
    <script type="application/javascript">
        $.get("/price/coinbase", function (data) {
            if(typeof data == "string") {
                data = JSON.parse(data)
            }

            var coins = ["BTC", "ETH", "LTC"];
            if(Array.isArray(data)){
                data.forEach(function (price, i) {
                    $('#coinType').append($('<option>', {value:price, text:coins[i]}));
                })
            } else {
                $("#final").val("coinbase价格获取失败");
            }
        });

        $("#calculate").click(function () {
            var price = $("#coinType").val();
            var count = $("#count").val();
            if(price <= 0 || count <= 0 ){
                $("#final").val("输入错误");
                $("#success").html("coinbase现价:$"+ price);
                return
            }
            var finalDollar = price * count * 0.98 - 35;
            var rate = 6.55;
            var finalRMB = finalDollar * rate;
            var finalPrice = finalRMB/count;
            $("#bz_price").val(finalPrice * 0.93);
            $("#coin_price").val(finalPrice * 0.90);
            $("#final").val(finalPrice);
            $("#success").html("coinbase现价:$"+ price + ", 交易手续费2%,电汇手续费花旗$35，结汇汇率 " + rate)
        });<commit_msg>auto<commit_after><div class="container">
    <ol class="breadcrumb">
        <li><a href="/">首页</a></li>
        {{#foreach category.breadcrumb}}
            <li><a href="{{path}}">{{name}}</a></li>
        {{/foreach}}
        <li class="active">{{text category.name words="15"}}</li>
    </ol>
    <div class="page-header text-center">
        <h1>{{category.name}}</h1>
    </div>

    <!--
    <div class="col-lg-6">
    <div class="input-group">
      <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
      <input type="text" class="form-control" placeholder="Search for...">
    </div>
</div>
<div class="col-lg-6">
    <div class="input-group">
        <input type="text" class="form-control" placeholder="Search for...">
        <span class="input-group-btn">
        <button class="btn btn-default" type="button">Go!</button>
      </span>
    </div>
</div>
 -->
    <div >
        <form class="form" >
            <div class="row">
                <div class="alert alert-info">
                    价格，汇率都会实时变动，请每次以最新查询结果为准
                </div>
            </div>
            <br/>
            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">选择币种</button>
                        </span>
                        <select class="form-control" id="coinType">
                        </select>
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">一次搬个数</button>
                        </span>
                        <input type="number" class="form-control" placeholder="数量越多搬价越高" id="count">
                    </div>
                </div>
            </div>
            <br/>

            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <button type="button" class="btn-success form-control" id="calculate">
                            预估
                        </button>
                    </div>
                </div>
            </div>
            <br/>
            <!--
            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">最终搬回价格</button>
                        </span>
                        <input type="text" class="form-control" id="final">
                    </div>
                </div>
            </div>
            <br/>
            -->
            <div class="row">
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">全程搬砖价</button>
                        </span>
                        <input type="text" class="form-control" id="bz_price">
                    </div>
                </div>
                <div class="col-lg-6">
                    <div class="input-group">
                        <span class="input-group-btn">
                            <button class="btn btn-default" type="button">直接收币价</button>
                        </span>
                        <input type="text" class="form-control" id="coin_price">
                    </div>
                </div>
            </div>
            <br/>
            <div class="row">
                <div id="success" class="alert alert-success">
                </div>
            </div>
        </form>
    </div>
    <script type="application/javascript">
        $.get("/price/coinbase", function (data) {
            if(typeof data == "string") {
                data = JSON.parse(data)
            }

            var coins = ["BTC", "ETH", "LTC"];
            if(Array.isArray(data)){
                data.forEach(function (price, i) {
                    $('#coinType').append($('<option>', {value:price, text:coins[i]}));
                })
            } else {
                $("#final").val("coinbase价格获取失败");
            }
        });

        $("#calculate").click(function () {
            var price = $("#coinType").val();
            var count = $("#count").val();
            if(price <= 0 || count <= 0 ){
                $("#final").val("输入错误");
                $("#success").html("coinbase现价:$"+ price);
                return
            }
            var finalDollar = price * count * 0.997 - 35;
            var rate = 6.58;
            var finalRMB = finalDollar * rate;
            var finalPrice = finalRMB/count;
            $("#bz_price").val(finalPrice * 0.93);
            $("#coin_price").val(finalPrice * 0.90);
            $("#final").val(finalPrice);
            $("#success").html("coinbase现价:$"+ price + ", 交易手续费0.3%,电汇手续费花旗$35，结汇汇率 " + rate)
        });
{'fraction_non_alphanumeric': 0.16798380878951427, 'fraction_numerical': 0.006168080185042405, 'mean_word_length': 1.1975857687420584, 'pattern_counts': {'":': 0, '<': 239, '<?xml version=': 0, '>': 235, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6939406', 'n_tokens_mistral': 2984, 'n_tokens_neox': 2922, 'n_words': 516}