Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/KOSASIH/nPinA-pi-network
/ functions
Functions
45 in github.com/KOSASIH/nPinA-pi-network
⨍
Functions
45
◇
Types & classes
5
↳
Endpoints
3
↓ 2 callers
Method
calculate_hash
(self, block)
src/distributed_ledger.py:47
↓ 1 callers
Method
add_transaction
(self, sender, receiver, amount)
src/distributed_ledger.py:22
↓ 1 callers
Method
create_genesis_block
(self)
src/distributed_ledger.py:13
↓ 1 callers
Function
generate_keys
()
src/cryptography.py:9
↓ 1 callers
Method
get_previous_hash
(self)
src/distributed_ledger.py:44
↓ 1 callers
Method
is_chain_valid
(self, chain)
src/distributed_ledger.py:57
↓ 1 callers
Function
main
()
tests/__init__.py:7
↓ 1 callers
Method
mine_block
(self)
src/distributed_ledger.py:31
↓ 1 callers
Method
predict
(self, transactions)
src/ai_consensus.py:8
↓ 1 callers
Method
propagate_block
(self, block)
src/distributed_ledger.py:52
↓ 1 callers
Method
receive_block
(self, block)
src/distributed_ledger.py:74
↓ 1 callers
Method
validate_transactions
(self, transactions)
src/distributed_ledger.py:67
Method
__init__
(self, node_id, nodes)
src/distributed_ledger.py:7
Method
__init__
(self, model_path)
src/ai_consensus.py:5
Function
add_transaction
()
src/app.py:11
Function
decrypt_message
(encrypted_message, private_key)
src/cryptography.py:18
Function
encrypt_message
(message, public_key)
src/cryptography.py:13
Function
hash_transaction
(transaction)
src/cryptography.py:4
Function
mine_block
()
src/app.py:17
Function
preprocess_data
(data)
utils/data_processing.py:4
Function
receive_block
()
src/app.py:22
Method
setUp
(self)
tests/test_ai_consensus.py:7
Method
setUp
(self)
tests/test_distributed_ledger.py:4
Method
setUp
(self)
tests/test_cryptography.py:4
Function
split_data
(data, test_size)
utils/data_processing.py:9
Method
tearDown
(self)
tests/test_ai_consensus.py:19
Method
tearDown
(self)
tests/test_distributed_ledger.py:46
Method
tearDown
(self)
tests/test_cryptography.py:25
Method
test_add_transaction
(self)
tests/test_distributed_ledger.py:14
Method
test_calculate_hash
(self)
tests/test_distributed_ledger.py:26
Method
test_create_genesis_block
(self)
tests/test_distributed_ledger.py:10
Method
test_decrypt_message
(self)
tests/test_cryptography.py:21
Method
test_encrypt_message
(self)
tests/test_cryptography.py:17
Method
test_generate_keys
(self)
tests/test_cryptography.py:13
Method
test_get_previous_hash
(self)
tests/test_distributed_ledger.py:22
Method
test_hash_transaction
(self)
tests/test_cryptography.py:9
Method
test_is_chain_valid
(self)
tests/test_distributed_ledger.py:34
Method
test_mine_block
(self)
tests/test_distributed_ledger.py:18
Method
test_predict
(self)
tests/test_ai_consensus.py:11
Method
test_propagate_block
(self)
tests/test_distributed_ledger.py:30
Method
test_receive_block
(self)
tests/test_distributed_ledger.py:42
Method
test_train
(self)
tests/test_ai_consensus.py:15
Method
test_validate_transactions
(self)
tests/test_distributed_ledger.py:38
Method
train
(self, transactions, labels)
src/ai_consensus.py:13
Function
train_model
(X_train, y_train, X_test, y_test, epochs, batch_size)
utils/model_training.py:6