This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import copy | |
| import onnx | |
| import onnxruntime as ort | |
| import numpy as np | |
| from onnx import helper, TensorProto, numpy_helper | |
| # ── Model ────────────────────────────────────────────────────────────────── | |
| # Input: float32 [1, 4] → Cast → Exp → Softmax → Sigmoid → Gelu → LayerNorm → Gather → Resize → Tile → Output [1, 8] | |
| X = helper.make_tensor_value_info("X", TensorProto.FLOAT, [1, 4]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # ============================================================================ | |
| # Local Bittensor Wallet Setup Script | |
| # ============================================================================ | |
| # Creates owner, miner, validator, tester wallets with 50000 TAO each | |
| # Creates a subnet, registers miner/validator, and outputs wallet info | |
| # Start the local chain with Docker before running this script: | |
| # docker run --rm --name local_chain -p 9944:9944 -p 9945:9945 ghcr.io/opentensor/subtensor-localnet:devnet-ready | |
| # # or `...localnet:latest` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| An angular directive for showing server validation messages in the form. | |
| Example form: | |
| <form name="form" role="form" novalidate | |
| server-responsive-submit="users.update(item)" // an expression must return promise object which sent data to the server | |
| close-on-success="true" // if form is inside a bootstrap modal - close it after success submit | |
| reset-on-success="true"> // reset form data (via `$setPristine()`) after success submit | |
| <input ng-model="item.username" id="id_username" name="userneme" class="form-control" type="text" placeholder="Username"> | |
| // server validation error message related to username gonna be here |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Small js object for managing django formsets | |
| new djangoFormset({ | |
| 'prefix': 'form', | |
| 'empty_form': $('.empty-form'), | |
| 'form_container_class': 'form_container', | |
| 'del_form_link_class': 'remove_form', | |
| 'add_form_link': $('#add_form'), | |
| 'empty_form_class': 'empty_form', |