partition
stringclasses
3 values
func_name
stringlengths
1
134
docstring
stringlengths
1
46.9k
path
stringlengths
4
223
original_string
stringlengths
75
104k
code
stringlengths
75
104k
docstring_tokens
listlengths
1
1.97k
repo
stringlengths
7
55
language
stringclasses
1 value
url
stringlengths
87
315
code_tokens
listlengths
19
28.4k
sha
stringlengths
40
40
train
Client.chain
Returns a list of block hashes in the account chain starting at **block** up to **count** :param block: Block hash to start at :type block: str :param count: Number of blocks to return up to :type count: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.cha...
src/nano/rpc.py
def chain(self, block, count): """ Returns a list of block hashes in the account chain starting at **block** up to **count** :param block: Block hash to start at :type block: str :param count: Number of blocks to return up to :type count: int :raises: :...
def chain(self, block, count): """ Returns a list of block hashes in the account chain starting at **block** up to **count** :param block: Block hash to start at :type block: str :param count: Number of blocks to return up to :type count: int :raises: :...
[ "Returns", "a", "list", "of", "block", "hashes", "in", "the", "account", "chain", "starting", "at", "**", "block", "**", "up", "to", "**", "count", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1161-L1191
[ "def", "chain", "(", "self", ",", "block", ",", "count", ")", ":", "block", "=", "self", ".", "_process_value", "(", "block", ",", "'block'", ")", "count", "=", "self", ".", "_process_value", "(", "count", ",", "'int'", ")", "payload", "=", "{", "\"b...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.delegators
Returns a list of pairs of delegator names given **account** a representative and its balance .. version 8.0 required :param account: Account to return delegators for :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.delegators( ... accou...
src/nano/rpc.py
def delegators(self, account): """ Returns a list of pairs of delegator names given **account** a representative and its balance .. version 8.0 required :param account: Account to return delegators for :type account: str :raises: :py:exc:`nano.rpc.RPCException`...
def delegators(self, account): """ Returns a list of pairs of delegator names given **account** a representative and its balance .. version 8.0 required :param account: Account to return delegators for :type account: str :raises: :py:exc:`nano.rpc.RPCException`...
[ "Returns", "a", "list", "of", "pairs", "of", "delegator", "names", "given", "**", "account", "**", "a", "representative", "and", "its", "balance" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1194-L1228
[ "def", "delegators", "(", "self", ",", "account", ")", ":", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "payload", "=", "{", "\"account\"", ":", "account", "}", "resp", "=", "self", ".", "call", "(", "'delegators...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.delegators_count
Get number of delegators for a specific representative **account** .. version 8.0 required :param account: Account to get number of delegators for :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.delegators_count( ... account="xrb_11111111111111...
src/nano/rpc.py
def delegators_count(self, account): """ Get number of delegators for a specific representative **account** .. version 8.0 required :param account: Account to get number of delegators for :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.dele...
def delegators_count(self, account): """ Get number of delegators for a specific representative **account** .. version 8.0 required :param account: Account to get number of delegators for :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.dele...
[ "Get", "number", "of", "delegators", "for", "a", "specific", "representative", "**", "account", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1231-L1255
[ "def", "delegators_count", "(", "self", ",", "account", ")", ":", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "payload", "=", "{", "\"account\"", ":", "account", "}", "resp", "=", "self", ".", "call", "(", "'dele...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.deterministic_key
Derive deterministic keypair from **seed** based on **index** :param seed: Seed used to get keypair :type seed: str :param index: Index of the generated keypair :type index: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.deterministic_key( ... seed="...
src/nano/rpc.py
def deterministic_key(self, seed, index): """ Derive deterministic keypair from **seed** based on **index** :param seed: Seed used to get keypair :type seed: str :param index: Index of the generated keypair :type index: int :raises: :py:exc:`nano.rpc.RPCExcepti...
def deterministic_key(self, seed, index): """ Derive deterministic keypair from **seed** based on **index** :param seed: Seed used to get keypair :type seed: str :param index: Index of the generated keypair :type index: int :raises: :py:exc:`nano.rpc.RPCExcepti...
[ "Derive", "deterministic", "keypair", "from", "**", "seed", "**", "based", "on", "**", "index", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1258-L1289
[ "def", "deterministic_key", "(", "self", ",", "seed", ",", "index", ")", ":", "seed", "=", "self", ".", "_process_value", "(", "seed", ",", "'seed'", ")", "index", "=", "self", ".", "_process_value", "(", "index", ",", "'int'", ")", "payload", "=", "{"...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.frontiers
Returns a list of pairs of account and block hash representing the head block starting at **account** up to **count** :param account: Account to get frontier blocks for :type account: str :param count: Max amount to return :type count: int :raises: :py:exc:`nano.rpc.RP...
src/nano/rpc.py
def frontiers(self, account, count): """ Returns a list of pairs of account and block hash representing the head block starting at **account** up to **count** :param account: Account to get frontier blocks for :type account: str :param count: Max amount to return ...
def frontiers(self, account, count): """ Returns a list of pairs of account and block hash representing the head block starting at **account** up to **count** :param account: Account to get frontier blocks for :type account: str :param count: Max amount to return ...
[ "Returns", "a", "list", "of", "pairs", "of", "account", "and", "block", "hash", "representing", "the", "head", "block", "starting", "at", "**", "account", "**", "up", "to", "**", "count", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1292-L1323
[ "def", "frontiers", "(", "self", ",", "account", ",", "count", ")", ":", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "count", "=", "self", ".", "_process_value", "(", "count", ",", "'int'", ")", "payload", "=", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.history
Reports send/receive information for a chain of blocks :param hash: Hash of block to receive history for :type hash: str :param count: Max number of blocks to return :type count: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.history( ... hash="000D1...
src/nano/rpc.py
def history(self, hash, count): """ Reports send/receive information for a chain of blocks :param hash: Hash of block to receive history for :type hash: str :param count: Max number of blocks to return :type count: int :raises: :py:exc:`nano.rpc.RPCException` ...
def history(self, hash, count): """ Reports send/receive information for a chain of blocks :param hash: Hash of block to receive history for :type hash: str :param count: Max number of blocks to return :type count: int :raises: :py:exc:`nano.rpc.RPCException` ...
[ "Reports", "send", "/", "receive", "information", "for", "a", "chain", "of", "blocks" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1342-L1381
[ "def", "history", "(", "self", ",", "hash", ",", "count", ")", ":", "hash", "=", "self", ".", "_process_value", "(", "hash", ",", "'block'", ")", "count", "=", "self", ".", "_process_value", "(", "count", ",", "'int'", ")", "payload", "=", "{", "\"ha...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.mrai_from_raw
Divide a raw amount down by the Mrai ratio. :param amount: Amount in raw to convert to Mrai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.mrai_from_raw(amount=1000000000000000000000000000000) 1
src/nano/rpc.py
def mrai_from_raw(self, amount): """ Divide a raw amount down by the Mrai ratio. :param amount: Amount in raw to convert to Mrai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.mrai_from_raw(amount=1000000000000000000000000000000) 1 ...
def mrai_from_raw(self, amount): """ Divide a raw amount down by the Mrai ratio. :param amount: Amount in raw to convert to Mrai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.mrai_from_raw(amount=1000000000000000000000000000000) 1 ...
[ "Divide", "a", "raw", "amount", "down", "by", "the", "Mrai", "ratio", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1384-L1404
[ "def", "mrai_from_raw", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'mrai_from_raw'",...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.mrai_to_raw
Multiply an Mrai amount by the Mrai ratio. :param amount: Amount in Mrai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.mrai_to_raw(amount=1) 1000000000000000000000000000000
src/nano/rpc.py
def mrai_to_raw(self, amount): """ Multiply an Mrai amount by the Mrai ratio. :param amount: Amount in Mrai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.mrai_to_raw(amount=1) 1000000000000000000000000000000 """ ...
def mrai_to_raw(self, amount): """ Multiply an Mrai amount by the Mrai ratio. :param amount: Amount in Mrai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.mrai_to_raw(amount=1) 1000000000000000000000000000000 """ ...
[ "Multiply", "an", "Mrai", "amount", "by", "the", "Mrai", "ratio", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1407-L1427
[ "def", "mrai_to_raw", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'mrai_to_raw'", "...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.krai_from_raw
Divide a raw amount down by the krai ratio. :param amount: Amount in raw to convert to krai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.krai_from_raw(amount=1000000000000000000000000000) 1
src/nano/rpc.py
def krai_from_raw(self, amount): """ Divide a raw amount down by the krai ratio. :param amount: Amount in raw to convert to krai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.krai_from_raw(amount=1000000000000000000000000000) 1 """ ...
def krai_from_raw(self, amount): """ Divide a raw amount down by the krai ratio. :param amount: Amount in raw to convert to krai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.krai_from_raw(amount=1000000000000000000000000000) 1 """ ...
[ "Divide", "a", "raw", "amount", "down", "by", "the", "krai", "ratio", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1430-L1449
[ "def", "krai_from_raw", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'krai_from_raw'",...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.krai_to_raw
Multiply an krai amount by the krai ratio. :param amount: Amount in krai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.krai_to_raw(amount=1) 1000000000000000000000000000
src/nano/rpc.py
def krai_to_raw(self, amount): """ Multiply an krai amount by the krai ratio. :param amount: Amount in krai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.krai_to_raw(amount=1) 1000000000000000000000000000 """ ...
def krai_to_raw(self, amount): """ Multiply an krai amount by the krai ratio. :param amount: Amount in krai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.krai_to_raw(amount=1) 1000000000000000000000000000 """ ...
[ "Multiply", "an", "krai", "amount", "by", "the", "krai", "ratio", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1452-L1472
[ "def", "krai_to_raw", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'krai_to_raw'", "...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.rai_from_raw
Divide a raw amount down by the rai ratio. :param amount: Amount in raw to convert to rai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.rai_from_raw(amount=1000000000000000000000000) 1
src/nano/rpc.py
def rai_from_raw(self, amount): """ Divide a raw amount down by the rai ratio. :param amount: Amount in raw to convert to rai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.rai_from_raw(amount=1000000000000000000000000) 1 """ ...
def rai_from_raw(self, amount): """ Divide a raw amount down by the rai ratio. :param amount: Amount in raw to convert to rai :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.rai_from_raw(amount=1000000000000000000000000) 1 """ ...
[ "Divide", "a", "raw", "amount", "down", "by", "the", "rai", "ratio", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1475-L1495
[ "def", "rai_from_raw", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'rai_from_raw'", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.rai_to_raw
Multiply an rai amount by the rai ratio. :param amount: Amount in rai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.rai_to_raw(amount=1) 1000000000000000000000000
src/nano/rpc.py
def rai_to_raw(self, amount): """ Multiply an rai amount by the rai ratio. :param amount: Amount in rai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.rai_to_raw(amount=1) 1000000000000000000000000 """ amo...
def rai_to_raw(self, amount): """ Multiply an rai amount by the rai ratio. :param amount: Amount in rai to convert to raw :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.rai_to_raw(amount=1) 1000000000000000000000000 """ amo...
[ "Multiply", "an", "rai", "amount", "by", "the", "rai", "ratio", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1498-L1518
[ "def", "rai_to_raw", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'rai_to_raw'", ","...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.key_expand
Derive public key and account number from **private key** :param key: Private key to generate account and public key of :type key: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.key_expand( key="781186FB9EF17DB6E3D1056550D9FAE5D5BBADA6A6BC370E4CBB938B1DC71DA3" ...
src/nano/rpc.py
def key_expand(self, key): """ Derive public key and account number from **private key** :param key: Private key to generate account and public key of :type key: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.key_expand( key="781186FB9EF17DB6E3D105655...
def key_expand(self, key): """ Derive public key and account number from **private key** :param key: Private key to generate account and public key of :type key: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.key_expand( key="781186FB9EF17DB6E3D105655...
[ "Derive", "public", "key", "and", "account", "number", "from", "**", "private", "key", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1541-L1567
[ "def", "key_expand", "(", "self", ",", "key", ")", ":", "key", "=", "self", ".", "_process_value", "(", "key", ",", "'privatekey'", ")", "payload", "=", "{", "\"key\"", ":", "key", "}", "resp", "=", "self", ".", "call", "(", "'key_expand'", ",", "pay...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.keepalive
Tells the node to send a keepalive packet to **address**:**port** .. enable_control required :param address: IP address of node to send keepalive packet to :type address: str :param port: Port of node to send keepalive packet to :type port: int :raises: :py:exc:`nano....
src/nano/rpc.py
def keepalive(self, address, port): """ Tells the node to send a keepalive packet to **address**:**port** .. enable_control required :param address: IP address of node to send keepalive packet to :type address: str :param port: Port of node to send keepalive packet to ...
def keepalive(self, address, port): """ Tells the node to send a keepalive packet to **address**:**port** .. enable_control required :param address: IP address of node to send keepalive packet to :type address: str :param port: Port of node to send keepalive packet to ...
[ "Tells", "the", "node", "to", "send", "a", "keepalive", "packet", "to", "**", "address", "**", ":", "**", "port", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1570-L1595
[ "def", "keepalive", "(", "self", ",", "address", ",", "port", ")", ":", "address", "=", "self", ".", "_process_value", "(", "address", ",", "'ipaddr'", ")", "port", "=", "self", ".", "_process_value", "(", "port", ",", "'int'", ")", "payload", "=", "{"...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.ledger
Returns frontier, open block, change representative block, balance, last modified timestamp from local database & block count starting at **account** up to **count** .. enable_control required .. version 8.0 required :param account: Account to return blocks for :type ac...
src/nano/rpc.py
def ledger( self, account, count=None, representative=False, weight=False, pending=False, sorting=False, ): """ Returns frontier, open block, change representative block, balance, last modified timestamp from local database & block coun...
def ledger( self, account, count=None, representative=False, weight=False, pending=False, sorting=False, ): """ Returns frontier, open block, change representative block, balance, last modified timestamp from local database & block coun...
[ "Returns", "frontier", "open", "block", "change", "representative", "block", "balance", "last", "modified", "timestamp", "from", "local", "database", "&", "block", "count", "starting", "at", "**", "account", "**", "up", "to", "**", "count", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1598-L1680
[ "def", "ledger", "(", "self", ",", "account", ",", "count", "=", "None", ",", "representative", "=", "False", ",", "weight", "=", "False", ",", "pending", "=", "False", ",", "sorting", "=", "False", ",", ")", ":", "account", "=", "self", ".", "_proce...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.payment_begin
Begin a new payment session. Searches wallet for an account that's marked as available and has a 0 balance. If one is found, the account number is returned and is marked as unavailable. If no account is found, a new account is created, placed in the wallet, and returned. :param wallet: ...
src/nano/rpc.py
def payment_begin(self, wallet): """ Begin a new payment session. Searches wallet for an account that's marked as available and has a 0 balance. If one is found, the account number is returned and is marked as unavailable. If no account is found, a new account is created, placed ...
def payment_begin(self, wallet): """ Begin a new payment session. Searches wallet for an account that's marked as available and has a 0 balance. If one is found, the account number is returned and is marked as unavailable. If no account is found, a new account is created, placed ...
[ "Begin", "a", "new", "payment", "session", ".", "Searches", "wallet", "for", "an", "account", "that", "s", "marked", "as", "available", "and", "has", "a", "0", "balance", ".", "If", "one", "is", "found", "the", "account", "number", "is", "returned", "and...
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1683-L1708
[ "def", "payment_begin", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'payment_begin...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.payment_init
Marks all accounts in wallet as available for being used as a payment session. :param wallet: Wallet to init payment in :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.payment_init( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A...
src/nano/rpc.py
def payment_init(self, wallet): """ Marks all accounts in wallet as available for being used as a payment session. :param wallet: Wallet to init payment in :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.payment_init( ... wallet="...
def payment_init(self, wallet): """ Marks all accounts in wallet as available for being used as a payment session. :param wallet: Wallet to init payment in :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.payment_init( ... wallet="...
[ "Marks", "all", "accounts", "in", "wallet", "as", "available", "for", "being", "used", "as", "a", "payment", "session", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1714-L1736
[ "def", "payment_init", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'payment_init'"...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.payment_end
End a payment session. Marks the account as available for use in a payment session. :param account: Account to mark available :type account: str :param wallet: Wallet to end payment session for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rp...
src/nano/rpc.py
def payment_end(self, account, wallet): """ End a payment session. Marks the account as available for use in a payment session. :param account: Account to mark available :type account: str :param wallet: Wallet to end payment session for :type wallet: str ...
def payment_end(self, account, wallet): """ End a payment session. Marks the account as available for use in a payment session. :param account: Account to mark available :type account: str :param wallet: Wallet to end payment session for :type wallet: str ...
[ "End", "a", "payment", "session", ".", "Marks", "the", "account", "as", "available", "for", "use", "in", "a", "payment", "session", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1739-L1766
[ "def", "payment_end", "(", "self", ",", "account", ",", "wallet", ")", ":", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.payment_wait
Wait for payment of **amount** to arrive in **account** or until **timeout** milliseconds have elapsed. :param account: Account to wait for payment :type account: str :param amount: Amount in raw of funds to wait for payment to arrive :type amount: int :param timeout: ...
src/nano/rpc.py
def payment_wait(self, account, amount, timeout): """ Wait for payment of **amount** to arrive in **account** or until **timeout** milliseconds have elapsed. :param account: Account to wait for payment :type account: str :param amount: Amount in raw of funds to wait for...
def payment_wait(self, account, amount, timeout): """ Wait for payment of **amount** to arrive in **account** or until **timeout** milliseconds have elapsed. :param account: Account to wait for payment :type account: str :param amount: Amount in raw of funds to wait for...
[ "Wait", "for", "payment", "of", "**", "amount", "**", "to", "arrive", "in", "**", "account", "**", "or", "until", "**", "timeout", "**", "milliseconds", "have", "elapsed", "." ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1769-L1802
[ "def", "payment_wait", "(", "self", ",", "account", ",", "amount", ",", "timeout", ")", ":", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.process
Publish **block** to the network :param block: Block to publish :type block: dict or json :raises: :py:exc:`nano.rpc.RPCException` >>> block = { "account": "xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000", "work": "0000000000000000", ...
src/nano/rpc.py
def process(self, block): """ Publish **block** to the network :param block: Block to publish :type block: dict or json :raises: :py:exc:`nano.rpc.RPCException` >>> block = { "account": "xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000", ...
def process(self, block): """ Publish **block** to the network :param block: Block to publish :type block: dict or json :raises: :py:exc:`nano.rpc.RPCException` >>> block = { "account": "xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000", ...
[ "Publish", "**", "block", "**", "to", "the", "network" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1805-L1838
[ "def", "process", "(", "self", ",", "block", ")", ":", "if", "isinstance", "(", "block", ",", "dict", ")", ":", "block", "=", "json", ".", "dumps", "(", "block", ",", "sort_keys", "=", "True", ")", "payload", "=", "{", "\"block\"", ":", "block", "}...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.receive
Receive pending **block** for **account** in **wallet** .. enable_control required :param wallet: Wallet of account to receive block for :type wallet: str :param account: Account to receive block for :type account: str :param block: Block hash to receive :type...
src/nano/rpc.py
def receive(self, wallet, account, block, work=None): """ Receive pending **block** for **account** in **wallet** .. enable_control required :param wallet: Wallet of account to receive block for :type wallet: str :param account: Account to receive block for :ty...
def receive(self, wallet, account, block, work=None): """ Receive pending **block** for **account** in **wallet** .. enable_control required :param wallet: Wallet of account to receive block for :type wallet: str :param account: Account to receive block for :ty...
[ "Receive", "pending", "**", "block", "**", "for", "**", "account", "**", "in", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1841-L1882
[ "def", "receive", "(", "self", ",", "wallet", ",", "account", ",", "block", ",", "work", "=", "None", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "account", "=", "self", ".", "_process_value", "(", "acco...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.receive_minimum_set
Set **amount** as new receive minimum for node until restart .. enable_control required .. version 8.0 required :param amount: Amount in raw to set as minimum to receive :type amount: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.receive_minimum_set(amount=1000...
src/nano/rpc.py
def receive_minimum_set(self, amount): """ Set **amount** as new receive minimum for node until restart .. enable_control required .. version 8.0 required :param amount: Amount in raw to set as minimum to receive :type amount: int :raises: :py:exc:`nano.rpc.RPC...
def receive_minimum_set(self, amount): """ Set **amount** as new receive minimum for node until restart .. enable_control required .. version 8.0 required :param amount: Amount in raw to set as minimum to receive :type amount: int :raises: :py:exc:`nano.rpc.RPC...
[ "Set", "**", "amount", "**", "as", "new", "receive", "minimum", "for", "node", "until", "restart" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1904-L1926
[ "def", "receive_minimum_set", "(", "self", ",", "amount", ")", ":", "amount", "=", "self", ".", "_process_value", "(", "amount", ",", "'int'", ")", "payload", "=", "{", "\"amount\"", ":", "amount", "}", "resp", "=", "self", ".", "call", "(", "'receive_mi...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.representatives
Returns a list of pairs of representative and its voting weight :param count: Max amount of representatives to return :type count: int :param sorting: If true, sorts by weight :type sorting: bool :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.representatives() ...
src/nano/rpc.py
def representatives(self, count=None, sorting=False): """ Returns a list of pairs of representative and its voting weight :param count: Max amount of representatives to return :type count: int :param sorting: If true, sorts by weight :type sorting: bool :raises...
def representatives(self, count=None, sorting=False): """ Returns a list of pairs of representative and its voting weight :param count: Max amount of representatives to return :type count: int :param sorting: If true, sorts by weight :type sorting: bool :raises...
[ "Returns", "a", "list", "of", "pairs", "of", "representative", "and", "its", "voting", "weight" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1929-L1968
[ "def", "representatives", "(", "self", ",", "count", "=", "None", ",", "sorting", "=", "False", ")", ":", "payload", "=", "{", "}", "if", "count", "is", "not", "None", ":", "payload", "[", "'count'", "]", "=", "self", ".", "_process_value", "(", "cou...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.unchecked
Returns a list of pairs of unchecked synchronizing block hash and its json representation up to **count** .. version 8.0 required :param count: Max amount of unchecked blocks to return :type count: int :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.unchecked(count=1...
src/nano/rpc.py
def unchecked(self, count=None): """ Returns a list of pairs of unchecked synchronizing block hash and its json representation up to **count** .. version 8.0 required :param count: Max amount of unchecked blocks to return :type count: int :raises: :py:exc:`nano...
def unchecked(self, count=None): """ Returns a list of pairs of unchecked synchronizing block hash and its json representation up to **count** .. version 8.0 required :param count: Max amount of unchecked blocks to return :type count: int :raises: :py:exc:`nano...
[ "Returns", "a", "list", "of", "pairs", "of", "unchecked", "synchronizing", "block", "hash", "and", "its", "json", "representation", "up", "to", "**", "count", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L1971-L2008
[ "def", "unchecked", "(", "self", ",", "count", "=", "None", ")", ":", "payload", "=", "{", "}", "if", "count", "is", "not", "None", ":", "payload", "[", "\"count\"", "]", "=", "self", ".", "_process_value", "(", "count", ",", "'int'", ")", "resp", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.unchecked_keys
Retrieves unchecked database keys, blocks hashes & a json representations of unchecked pending blocks starting from **key** up to **count** .. version 8.0 required :param key: Starting key to return unchecked keys for :type key: str :param count: Max number of keys/blo...
src/nano/rpc.py
def unchecked_keys(self, key=None, count=None): """ Retrieves unchecked database keys, blocks hashes & a json representations of unchecked pending blocks starting from **key** up to **count** .. version 8.0 required :param key: Starting key to return unchecked keys for ...
def unchecked_keys(self, key=None, count=None): """ Retrieves unchecked database keys, blocks hashes & a json representations of unchecked pending blocks starting from **key** up to **count** .. version 8.0 required :param key: Starting key to return unchecked keys for ...
[ "Retrieves", "unchecked", "database", "keys", "blocks", "hashes", "&", "a", "json", "representations", "of", "unchecked", "pending", "blocks", "starting", "from", "**", "key", "**", "up", "to", "**", "count", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2065-L2116
[ "def", "unchecked_keys", "(", "self", ",", "key", "=", "None", ",", "count", "=", "None", ")", ":", "payload", "=", "{", "}", "if", "key", ":", "payload", "[", "'key'", "]", "=", "self", ".", "_process_value", "(", "key", ",", "'publickey'", ")", "...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.validate_account_number
Check whether **account** is a valid account number :param account: Account number to check :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.validate_account_number( ... account="xrb_3e3j5tkog48pnny9dmfzj1r16pg8t1e76dz5tmac6iq689wyjfpi00000000" ....
src/nano/rpc.py
def validate_account_number(self, account): """ Check whether **account** is a valid account number :param account: Account number to check :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.validate_account_number( ... account="xrb_3e3j5tk...
def validate_account_number(self, account): """ Check whether **account** is a valid account number :param account: Account number to check :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.validate_account_number( ... account="xrb_3e3j5tk...
[ "Check", "whether", "**", "account", "**", "is", "a", "valid", "account", "number" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2119-L2140
[ "def", "validate_account_number", "(", "self", ",", "account", ")", ":", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "payload", "=", "{", "\"account\"", ":", "account", "}", "resp", "=", "self", ".", "call", "(", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_representative
Returns the default representative for **wallet** :param wallet: Wallet to get default representative account for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_representative( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D8...
src/nano/rpc.py
def wallet_representative(self, wallet): """ Returns the default representative for **wallet** :param wallet: Wallet to get default representative account for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_representative( ... wall...
def wallet_representative(self, wallet): """ Returns the default representative for **wallet** :param wallet: Wallet to get default representative account for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_representative( ... wall...
[ "Returns", "the", "default", "representative", "for", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2143-L2165
[ "def", "wallet_representative", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'walle...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_representative_set
Sets the default **representative** for **wallet** .. enable_control required :param wallet: Wallet to set default representative account for :type wallet: str :param representative: Representative account to set for **wallet** :type representative: str :raises: :py:e...
src/nano/rpc.py
def wallet_representative_set(self, wallet, representative): """ Sets the default **representative** for **wallet** .. enable_control required :param wallet: Wallet to set default representative account for :type wallet: str :param representative: Representative accoun...
def wallet_representative_set(self, wallet, representative): """ Sets the default **representative** for **wallet** .. enable_control required :param wallet: Wallet to set default representative account for :type wallet: str :param representative: Representative accoun...
[ "Sets", "the", "default", "**", "representative", "**", "for", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2168-L2197
[ "def", "wallet_representative_set", "(", "self", ",", "wallet", ",", "representative", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "representative", "=", "self", ".", "_process_value", "(", "representative", ",", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_add
Add an adhoc private key **key** to **wallet** .. enable_control required :param wallet: Wallet to add private key to :type wallet: str :param key: Private key to add :type key: str :param work: If false, disables work generation :type work: bool :rai...
src/nano/rpc.py
def wallet_add(self, wallet, key, work=True): """ Add an adhoc private key **key** to **wallet** .. enable_control required :param wallet: Wallet to add private key to :type wallet: str :param key: Private key to add :type key: str :param work: If fals...
def wallet_add(self, wallet, key, work=True): """ Add an adhoc private key **key** to **wallet** .. enable_control required :param wallet: Wallet to add private key to :type wallet: str :param key: Private key to add :type key: str :param work: If fals...
[ "Add", "an", "adhoc", "private", "key", "**", "key", "**", "to", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2200-L2235
[ "def", "wallet_add", "(", "self", ",", "wallet", ",", "key", ",", "work", "=", "True", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "key", "=", "self", ".", "_process_value", "(", "key", ",", "'privatekey...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_balance_total
Returns the sum of all accounts balances in **wallet** :param wallet: Wallet to return sum of balances for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_balance_total( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F"...
src/nano/rpc.py
def wallet_balance_total(self, wallet): """ Returns the sum of all accounts balances in **wallet** :param wallet: Wallet to return sum of balances for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_balance_total( ... wallet="000D1...
def wallet_balance_total(self, wallet): """ Returns the sum of all accounts balances in **wallet** :param wallet: Wallet to return sum of balances for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_balance_total( ... wallet="000D1...
[ "Returns", "the", "sum", "of", "all", "accounts", "balances", "in", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2238-L2266
[ "def", "wallet_balance_total", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_balances
Returns how many rai is owned and how many have not yet been received by all accounts in **wallet** :param wallet: Wallet to return balances for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_balances( ... wallet="000D1BAEC8EC208142C99059...
src/nano/rpc.py
def wallet_balances(self, wallet): """ Returns how many rai is owned and how many have not yet been received by all accounts in **wallet** :param wallet: Wallet to return balances for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_bal...
def wallet_balances(self, wallet): """ Returns how many rai is owned and how many have not yet been received by all accounts in **wallet** :param wallet: Wallet to return balances for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_bal...
[ "Returns", "how", "many", "rai", "is", "owned", "and", "how", "many", "have", "not", "yet", "been", "received", "by", "all", "accounts", "in", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2269-L2301
[ "def", "wallet_balances", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_bala...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_change_seed
Changes seed for **wallet** to **seed** .. enable_control required :param wallet: Wallet to change seed for :type wallet: str :param seed: Seed to change wallet to :type seed: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_change_seed( .....
src/nano/rpc.py
def wallet_change_seed(self, wallet, seed): """ Changes seed for **wallet** to **seed** .. enable_control required :param wallet: Wallet to change seed for :type wallet: str :param seed: Seed to change wallet to :type seed: str :raises: :py:exc:`nano.r...
def wallet_change_seed(self, wallet, seed): """ Changes seed for **wallet** to **seed** .. enable_control required :param wallet: Wallet to change seed for :type wallet: str :param seed: Seed to change wallet to :type seed: str :raises: :py:exc:`nano.r...
[ "Changes", "seed", "for", "**", "wallet", "**", "to", "**", "seed", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2304-L2332
[ "def", "wallet_change_seed", "(", "self", ",", "wallet", ",", "seed", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "seed", "=", "self", ".", "_process_value", "(", "seed", ",", "'seed'", ")", "payload", "="...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_contains
Check whether **wallet** contains **account** :param wallet: Wallet to check contains **account** :type wallet: str :param account: Account to check exists in **wallet** :type account: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_contains( ... ...
src/nano/rpc.py
def wallet_contains(self, wallet, account): """ Check whether **wallet** contains **account** :param wallet: Wallet to check contains **account** :type wallet: str :param account: Account to check exists in **wallet** :type account: str :raises: :py:exc:`nano.r...
def wallet_contains(self, wallet, account): """ Check whether **wallet** contains **account** :param wallet: Wallet to check contains **account** :type wallet: str :param account: Account to check exists in **wallet** :type account: str :raises: :py:exc:`nano.r...
[ "Check", "whether", "**", "wallet", "**", "contains", "**", "account", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2335-L2361
[ "def", "wallet_contains", "(", "self", ",", "wallet", ",", "account", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "payloa...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_destroy
Destroys **wallet** and all contained accounts .. enable_control required :param wallet: Wallet to destroy :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_destroy( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F...
src/nano/rpc.py
def wallet_destroy(self, wallet): """ Destroys **wallet** and all contained accounts .. enable_control required :param wallet: Wallet to destroy :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_destroy( ... wallet="000D1BAE...
def wallet_destroy(self, wallet): """ Destroys **wallet** and all contained accounts .. enable_control required :param wallet: Wallet to destroy :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_destroy( ... wallet="000D1BAE...
[ "Destroys", "**", "wallet", "**", "and", "all", "contained", "accounts" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2382-L2405
[ "def", "wallet_destroy", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_destr...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_export
Return a json representation of **wallet** :param wallet: Wallet to export :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_export(wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F") { "0000000000000000000000000000000...
src/nano/rpc.py
def wallet_export(self, wallet): """ Return a json representation of **wallet** :param wallet: Wallet to export :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_export(wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F") ...
def wallet_export(self, wallet): """ Return a json representation of **wallet** :param wallet: Wallet to export :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_export(wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F") ...
[ "Return", "a", "json", "representation", "of", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2408-L2429
[ "def", "wallet_export", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_export...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_frontiers
Returns a list of pairs of account and block hash representing the head block starting for accounts from **wallet** :param wallet: Wallet to return frontiers for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_frontiers( ... wallet="000D1B...
src/nano/rpc.py
def wallet_frontiers(self, wallet): """ Returns a list of pairs of account and block hash representing the head block starting for accounts from **wallet** :param wallet: Wallet to return frontiers for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` ...
def wallet_frontiers(self, wallet): """ Returns a list of pairs of account and block hash representing the head block starting for accounts from **wallet** :param wallet: Wallet to return frontiers for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` ...
[ "Returns", "a", "list", "of", "pairs", "of", "account", "and", "block", "hash", "representing", "the", "head", "block", "starting", "for", "accounts", "from", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2432-L2457
[ "def", "wallet_frontiers", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_fro...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_key_valid
Returns if a **wallet** key is valid :param wallet: Wallet to check key is valid :type wallet: str >>> rpc.wallet_key_valid( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) True
src/nano/rpc.py
def wallet_key_valid(self, wallet): """ Returns if a **wallet** key is valid :param wallet: Wallet to check key is valid :type wallet: str >>> rpc.wallet_key_valid( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) T...
def wallet_key_valid(self, wallet): """ Returns if a **wallet** key is valid :param wallet: Wallet to check key is valid :type wallet: str >>> rpc.wallet_key_valid( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) T...
[ "Returns", "if", "a", "**", "wallet", "**", "key", "is", "valid" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2460-L2479
[ "def", "wallet_key_valid", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_key...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_lock
Locks a **wallet** :param wallet: Wallet to lock :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_lock( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) True
src/nano/rpc.py
def wallet_lock(self, wallet): """ Locks a **wallet** :param wallet: Wallet to lock :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_lock( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) ...
def wallet_lock(self, wallet): """ Locks a **wallet** :param wallet: Wallet to lock :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_lock( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) ...
[ "Locks", "a", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2482-L2503
[ "def", "wallet_lock", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_lock'", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_locked
Checks whether **wallet** is locked :param wallet: Wallet to check if locked :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_locked( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ... ) False
src/nano/rpc.py
def wallet_locked(self, wallet): """ Checks whether **wallet** is locked :param wallet: Wallet to check if locked :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_locked( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B24...
def wallet_locked(self, wallet): """ Checks whether **wallet** is locked :param wallet: Wallet to check if locked :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_locked( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B24...
[ "Checks", "whether", "**", "wallet", "**", "is", "locked" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2506-L2527
[ "def", "wallet_locked", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_locked...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_unlock
Unlocks **wallet** using **password** :param wallet: Wallet to unlock :type wallet: str :param password: Password to enter :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_unlock( ... wallet="000D1BAEC8EC208142C99059B393051BAC838...
src/nano/rpc.py
def wallet_unlock(self, wallet, password): """ Unlocks **wallet** using **password** :param wallet: Wallet to unlock :type wallet: str :param password: Password to enter :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_unlock...
def wallet_unlock(self, wallet, password): """ Unlocks **wallet** using **password** :param wallet: Wallet to unlock :type wallet: str :param password: Password to enter :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_unlock...
[ "Unlocks", "**", "wallet", "**", "using", "**", "password", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2530-L2556
[ "def", "wallet_unlock", "(", "self", ",", "wallet", ",", "password", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", ",", "\"password\"", ":", "password", "}", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_republish
Rebroadcast blocks for accounts from **wallet** starting at frontier down to **count** to the network .. enable_control required .. version 8.0 required :param wallet: Wallet to rebroadcast blocks for :type wallet: str :param count: Max amount of blocks to rebroadcast ...
src/nano/rpc.py
def wallet_republish(self, wallet, count): """ Rebroadcast blocks for accounts from **wallet** starting at frontier down to **count** to the network .. enable_control required .. version 8.0 required :param wallet: Wallet to rebroadcast blocks for :type wallet: ...
def wallet_republish(self, wallet, count): """ Rebroadcast blocks for accounts from **wallet** starting at frontier down to **count** to the network .. enable_control required .. version 8.0 required :param wallet: Wallet to rebroadcast blocks for :type wallet: ...
[ "Rebroadcast", "blocks", "for", "accounts", "from", "**", "wallet", "**", "starting", "at", "frontier", "down", "to", "**", "count", "**", "to", "the", "network" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2629-L2664
[ "def", "wallet_republish", "(", "self", ",", "wallet", ",", "count", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "count", "=", "self", ".", "_process_value", "(", "count", ",", "'int'", ")", "payload", "="...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.wallet_work_get
Returns a list of pairs of account and work from **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to return work for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.wallet_work_get( ... wallet="000D1BAE...
src/nano/rpc.py
def wallet_work_get(self, wallet): """ Returns a list of pairs of account and work from **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to return work for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>...
def wallet_work_get(self, wallet): """ Returns a list of pairs of account and work from **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to return work for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>...
[ "Returns", "a", "list", "of", "pairs", "of", "account", "and", "work", "from", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2667-L2695
[ "def", "wallet_work_get", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'wallet_work...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.password_change
Changes the password for **wallet** to **password** .. enable_control required :param wallet: Wallet to change password for :type wallet: str :param password: Password to set :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.password_change...
src/nano/rpc.py
def password_change(self, wallet, password): """ Changes the password for **wallet** to **password** .. enable_control required :param wallet: Wallet to change password for :type wallet: str :param password: Password to set :type password: str :raises:...
def password_change(self, wallet, password): """ Changes the password for **wallet** to **password** .. enable_control required :param wallet: Wallet to change password for :type wallet: str :param password: Password to set :type password: str :raises:...
[ "Changes", "the", "password", "for", "**", "wallet", "**", "to", "**", "password", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2698-L2725
[ "def", "password_change", "(", "self", ",", "wallet", ",", "password", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", ",", "\"password\"", ":", "password", "}",...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.password_enter
Enters the **password** in to **wallet** :param wallet: Wallet to enter password for :type wallet: str :param password: Password to enter :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.password_enter( ... wallet="000D1BAEC8EC208142C99...
src/nano/rpc.py
def password_enter(self, wallet, password): """ Enters the **password** in to **wallet** :param wallet: Wallet to enter password for :type wallet: str :param password: Password to enter :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> r...
def password_enter(self, wallet, password): """ Enters the **password** in to **wallet** :param wallet: Wallet to enter password for :type wallet: str :param password: Password to enter :type password: str :raises: :py:exc:`nano.rpc.RPCException` >>> r...
[ "Enters", "the", "**", "password", "**", "in", "to", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2728-L2754
[ "def", "password_enter", "(", "self", ",", "wallet", ",", "password", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", ",", "\"password\"", ":", "password", "}", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.password_valid
Checks whether the password entered for **wallet** is valid :param wallet: Wallet to check password for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.password_valid( ... wallet="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3F" ...
src/nano/rpc.py
def password_valid(self, wallet): """ Checks whether the password entered for **wallet** is valid :param wallet: Wallet to check password for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.password_valid( ... wallet="000D1BAEC8EC208142C9...
def password_valid(self, wallet): """ Checks whether the password entered for **wallet** is valid :param wallet: Wallet to check password for :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.password_valid( ... wallet="000D1BAEC8EC208142C9...
[ "Checks", "whether", "the", "password", "entered", "for", "**", "wallet", "**", "is", "valid" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2757-L2779
[ "def", "password_valid", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'password_val...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.peers
Returns a list of pairs of peer IPv6:port and its node network version :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.peers() { "[::ffff:172.17.0.1]:32841": 3 }
src/nano/rpc.py
def peers(self): """ Returns a list of pairs of peer IPv6:port and its node network version :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.peers() { "[::ffff:172.17.0.1]:32841": 3 } """ resp = self.call('peers') result = {} ...
def peers(self): """ Returns a list of pairs of peer IPv6:port and its node network version :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.peers() { "[::ffff:172.17.0.1]:32841": 3 } """ resp = self.call('peers') result = {} ...
[ "Returns", "a", "list", "of", "pairs", "of", "peer", "IPv6", ":", "port", "and", "its", "node", "network", "version" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2782-L2802
[ "def", "peers", "(", "self", ")", ":", "resp", "=", "self", ".", "call", "(", "'peers'", ")", "result", "=", "{", "}", "peers", "=", "resp", ".", "get", "(", "'peers'", ")", "or", "{", "}", "for", "host", ",", "version", "in", "peers", ".", "it...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.pending_exists
Check whether block is pending by **hash** .. version 8.0 required :param hash: Hash of block to check if pending :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.pending_exists( hash="000D1BAEC8EC208142C99059B393051BAC8380F9B5A2E6B2489A277D81789F3...
src/nano/rpc.py
def pending_exists(self, hash): """ Check whether block is pending by **hash** .. version 8.0 required :param hash: Hash of block to check if pending :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.pending_exists( hash="000D1BAEC8E...
def pending_exists(self, hash): """ Check whether block is pending by **hash** .. version 8.0 required :param hash: Hash of block to check if pending :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.pending_exists( hash="000D1BAEC8E...
[ "Check", "whether", "block", "is", "pending", "by", "**", "hash", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2875-L2898
[ "def", "pending_exists", "(", "self", ",", "hash", ")", ":", "hash", "=", "self", ".", "_process_value", "(", "hash", ",", "'block'", ")", "payload", "=", "{", "\"hash\"", ":", "hash", "}", "resp", "=", "self", ".", "call", "(", "'pending_exists'", ","...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.work_cancel
Stop generating **work** for block .. enable_control required :param hash: Hash to stop generating work for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_cancel( ... hash="718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2" ...
src/nano/rpc.py
def work_cancel(self, hash): """ Stop generating **work** for block .. enable_control required :param hash: Hash to stop generating work for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_cancel( ... hash="718CC2121C3E641059B...
def work_cancel(self, hash): """ Stop generating **work** for block .. enable_control required :param hash: Hash to stop generating work for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_cancel( ... hash="718CC2121C3E641059B...
[ "Stop", "generating", "**", "work", "**", "for", "block" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2901-L2924
[ "def", "work_cancel", "(", "self", ",", "hash", ")", ":", "hash", "=", "self", ".", "_process_value", "(", "hash", ",", "'block'", ")", "payload", "=", "{", "\"hash\"", ":", "hash", "}", "resp", "=", "self", ".", "call", "(", "'work_cancel'", ",", "p...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.work_generate
Generates **work** for block .. enable_control required :param hash: Hash to start generating **work** for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_generate( ... hash="718CC2121C3E641059BC1C2CFC45666C99E8AE922F7A807B7D07B62C995D79E2" ...
src/nano/rpc.py
def work_generate(self, hash): """ Generates **work** for block .. enable_control required :param hash: Hash to start generating **work** for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_generate( ... hash="718CC2121C3E6410...
def work_generate(self, hash): """ Generates **work** for block .. enable_control required :param hash: Hash to start generating **work** for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_generate( ... hash="718CC2121C3E6410...
[ "Generates", "**", "work", "**", "for", "block" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2927-L2951
[ "def", "work_generate", "(", "self", ",", "hash", ")", ":", "hash", "=", "self", ".", "_process_value", "(", "hash", ",", "'block'", ")", "payload", "=", "{", "\"hash\"", ":", "hash", "}", "resp", "=", "self", ".", "call", "(", "'work_generate'", ",", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.work_get
Retrieves work for **account** in **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to get account work for :type wallet: str :param account: Account to get work for :type account: str :raises: :py:exc:`nano.rpc.RPCException` ...
src/nano/rpc.py
def work_get(self, wallet, account): """ Retrieves work for **account** in **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to get account work for :type wallet: str :param account: Account to get work for :type accoun...
def work_get(self, wallet, account): """ Retrieves work for **account** in **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to get account work for :type wallet: str :param account: Account to get work for :type accoun...
[ "Retrieves", "work", "for", "**", "account", "**", "in", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2954-L2984
[ "def", "work_get", "(", "self", ",", "wallet", ",", "account", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")", "payload", "...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.work_set
Set **work** for **account** in **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to set work for account for :type wallet: str :param account: Account to set work for :type account: str :param work: Work to set for account in...
src/nano/rpc.py
def work_set(self, wallet, account, work): """ Set **work** for **account** in **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to set work for account for :type wallet: str :param account: Account to set work for :typ...
def work_set(self, wallet, account, work): """ Set **work** for **account** in **wallet** .. enable_control required .. version 8.0 required :param wallet: Wallet to set work for account for :type wallet: str :param account: Account to set work for :typ...
[ "Set", "**", "work", "**", "for", "**", "account", "**", "in", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L2987-L3021
[ "def", "work_set", "(", "self", ",", "wallet", ",", "account", ",", "work", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "account", "=", "self", ".", "_process_value", "(", "account", ",", "'account'", ")",...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.work_peer_add
Add specific **IP address** and **port** as work peer for node until restart .. enable_control required .. version 8.0 required :param address: IP address of work peer to add :type address: str :param port: Port work peer to add :type port: int :raises...
src/nano/rpc.py
def work_peer_add(self, address, port): """ Add specific **IP address** and **port** as work peer for node until restart .. enable_control required .. version 8.0 required :param address: IP address of work peer to add :type address: str :param port: Po...
def work_peer_add(self, address, port): """ Add specific **IP address** and **port** as work peer for node until restart .. enable_control required .. version 8.0 required :param address: IP address of work peer to add :type address: str :param port: Po...
[ "Add", "specific", "**", "IP", "address", "**", "and", "**", "port", "**", "as", "work", "peer", "for", "node", "until", "restart" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L3024-L3052
[ "def", "work_peer_add", "(", "self", ",", "address", ",", "port", ")", ":", "address", "=", "self", ".", "_process_value", "(", "address", ",", "'ipaddr'", ")", "port", "=", "self", ".", "_process_value", "(", "port", ",", "'int'", ")", "payload", "=", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.work_validate
Check whether **work** is valid for block :param work: Work to validate :type work: str :param hash: Hash of block to validate work for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_validate( ... work="2bf29ef00786a6bc", ......
src/nano/rpc.py
def work_validate(self, work, hash): """ Check whether **work** is valid for block :param work: Work to validate :type work: str :param hash: Hash of block to validate work for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_valid...
def work_validate(self, work, hash): """ Check whether **work** is valid for block :param work: Work to validate :type work: str :param hash: Hash of block to validate work for :type hash: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.work_valid...
[ "Check", "whether", "**", "work", "**", "is", "valid", "for", "block" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L3094-L3121
[ "def", "work_validate", "(", "self", ",", "work", ",", "hash", ")", ":", "work", "=", "self", ".", "_process_value", "(", "work", ",", "'work'", ")", "hash", "=", "self", ".", "_process_value", "(", "hash", ",", "'block'", ")", "payload", "=", "{", "...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.republish
Rebroadcast blocks starting at **hash** to the network :param hash: Hash of block to start rebroadcasting from :type hash: str :param count: Max number of blocks to rebroadcast :type count: int :param sources: If set, additionally rebroadcasts source chain blocks ...
src/nano/rpc.py
def republish(self, hash, count=None, sources=None, destinations=None): """ Rebroadcast blocks starting at **hash** to the network :param hash: Hash of block to start rebroadcasting from :type hash: str :param count: Max number of blocks to rebroadcast :type count: int ...
def republish(self, hash, count=None, sources=None, destinations=None): """ Rebroadcast blocks starting at **hash** to the network :param hash: Hash of block to start rebroadcasting from :type hash: str :param count: Max number of blocks to rebroadcast :type count: int ...
[ "Rebroadcast", "blocks", "starting", "at", "**", "hash", "**", "to", "the", "network" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L3124-L3169
[ "def", "republish", "(", "self", ",", "hash", ",", "count", "=", "None", ",", "sources", "=", "None", ",", "destinations", "=", "None", ")", ":", "hash", "=", "self", ".", "_process_value", "(", "hash", ",", "'block'", ")", "payload", "=", "{", "\"ha...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.search_pending
Tells the node to look for pending blocks for any account in **wallet** .. enable_control required :param wallet: Wallet to search for pending blocks :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.search_pending( ... wallet="000D1BAEC8E...
src/nano/rpc.py
def search_pending(self, wallet): """ Tells the node to look for pending blocks for any account in **wallet** .. enable_control required :param wallet: Wallet to search for pending blocks :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> r...
def search_pending(self, wallet): """ Tells the node to look for pending blocks for any account in **wallet** .. enable_control required :param wallet: Wallet to search for pending blocks :type wallet: str :raises: :py:exc:`nano.rpc.RPCException` >>> r...
[ "Tells", "the", "node", "to", "look", "for", "pending", "blocks", "for", "any", "account", "in", "**", "wallet", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L3172-L3197
[ "def", "search_pending", "(", "self", ",", "wallet", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "payload", "=", "{", "\"wallet\"", ":", "wallet", "}", "resp", "=", "self", ".", "call", "(", "'search_pendi...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.send
Send **amount** from **source** in **wallet** to **destination** .. enable_control required :param wallet: Wallet of account used to send funds :type wallet: str :param source: Account to send funds from :type source: str :param destination: Account to send funds to ...
src/nano/rpc.py
def send(self, wallet, source, destination, amount, work=None, id=None): """ Send **amount** from **source** in **wallet** to **destination** .. enable_control required :param wallet: Wallet of account used to send funds :type wallet: str :param source: Account to send...
def send(self, wallet, source, destination, amount, work=None, id=None): """ Send **amount** from **source** in **wallet** to **destination** .. enable_control required :param wallet: Wallet of account used to send funds :type wallet: str :param source: Account to send...
[ "Send", "**", "amount", "**", "from", "**", "source", "**", "in", "**", "wallet", "**", "to", "**", "destination", "**" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L3220-L3296
[ "def", "send", "(", "self", ",", "wallet", ",", "source", ",", "destination", ",", "amount", ",", "work", "=", "None", ",", "id", "=", "None", ")", ":", "wallet", "=", "self", ".", "_process_value", "(", "wallet", ",", "'wallet'", ")", "source", "=",...
f26b8bc895b997067780f925049a70e82c0c2479
train
Client.version
Returns the node's RPC version :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.version() { "rpc_version": 1, "store_version": 10, "node_vendor": "RaiBlocks 9.0" }
src/nano/rpc.py
def version(self): """ Returns the node's RPC version :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.version() { "rpc_version": 1, "store_version": 10, "node_vendor": "RaiBlocks 9.0" } """ resp = self.call('version...
def version(self): """ Returns the node's RPC version :raises: :py:exc:`nano.rpc.RPCException` >>> rpc.version() { "rpc_version": 1, "store_version": 10, "node_vendor": "RaiBlocks 9.0" } """ resp = self.call('version...
[ "Returns", "the", "node", "s", "RPC", "version" ]
dourvaris/nano-python
python
https://github.com/dourvaris/nano-python/blob/f26b8bc895b997067780f925049a70e82c0c2479/src/nano/rpc.py#L3350-L3370
[ "def", "version", "(", "self", ")", ":", "resp", "=", "self", ".", "call", "(", "'version'", ")", "for", "key", "in", "(", "'rpc_version'", ",", "'store_version'", ")", ":", "resp", "[", "key", "]", "=", "int", "(", "resp", "[", "key", "]", ")", ...
f26b8bc895b997067780f925049a70e82c0c2479
train
CDRouter.authenticate
Set API token by authenticating via username/password. :param retries: Number of authentication attempts to make before giving up as an int. :return: Learned API token :rtype: string
cdrouter/cdrouter.py
def authenticate(self, retries=3): """Set API token by authenticating via username/password. :param retries: Number of authentication attempts to make before giving up as an int. :return: Learned API token :rtype: string """ username = self.username or self._getuser(sel...
def authenticate(self, retries=3): """Set API token by authenticating via username/password. :param retries: Number of authentication attempts to make before giving up as an int. :return: Learned API token :rtype: string """ username = self.username or self._getuser(sel...
[ "Set", "API", "token", "by", "authenticating", "via", "username", "/", "password", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/cdrouter.py#L419-L451
[ "def", "authenticate", "(", "self", ",", "retries", "=", "3", ")", ":", "username", "=", "self", ".", "username", "or", "self", ".", "_getuser", "(", "self", ".", "base", ")", "password", "=", "self", ".", "password", "while", "retries", ">", "0", ":...
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
_extract_email
Get user email from github.
invenio_oauthclient/contrib/github.py
def _extract_email(gh): """Get user email from github.""" return next( (x.email for x in gh.emails() if x.verified and x.primary), None)
def _extract_email(gh): """Get user email from github.""" return next( (x.email for x in gh.emails() if x.verified and x.primary), None)
[ "Get", "user", "email", "from", "github", "." ]
inveniosoftware/invenio-oauthclient
python
https://github.com/inveniosoftware/invenio-oauthclient/blob/2500dc6935738107617aeade79e050d7608004bb/invenio_oauthclient/contrib/github.py#L110-L113
[ "def", "_extract_email", "(", "gh", ")", ":", "return", "next", "(", "(", "x", ".", "email", "for", "x", "in", "gh", ".", "emails", "(", ")", "if", "x", ".", "verified", "and", "x", ".", "primary", ")", ",", "None", ")" ]
2500dc6935738107617aeade79e050d7608004bb
train
account_info
Retrieve remote account information used to find local user. It returns a dictionary with the following structure: .. code-block:: python { 'user': { 'email': '...', 'profile': { 'username': '...', 'full_name': '...',...
invenio_oauthclient/contrib/github.py
def account_info(remote, resp): """Retrieve remote account information used to find local user. It returns a dictionary with the following structure: .. code-block:: python { 'user': { 'email': '...', 'profile': { 'username': '...', ...
def account_info(remote, resp): """Retrieve remote account information used to find local user. It returns a dictionary with the following structure: .. code-block:: python { 'user': { 'email': '...', 'profile': { 'username': '...', ...
[ "Retrieve", "remote", "account", "information", "used", "to", "find", "local", "user", "." ]
inveniosoftware/invenio-oauthclient
python
https://github.com/inveniosoftware/invenio-oauthclient/blob/2500dc6935738107617aeade79e050d7608004bb/invenio_oauthclient/contrib/github.py#L116-L155
[ "def", "account_info", "(", "remote", ",", "resp", ")", ":", "gh", "=", "github3", ".", "login", "(", "token", "=", "resp", "[", "'access_token'", "]", ")", "me", "=", "gh", ".", "me", "(", ")", "return", "dict", "(", "user", "=", "dict", "(", "e...
2500dc6935738107617aeade79e050d7608004bb
train
account_setup
Perform additional setup after user have been logged in. :param remote: The remote application. :param token: The token value. :param resp: The response.
invenio_oauthclient/contrib/github.py
def account_setup(remote, token, resp): """Perform additional setup after user have been logged in. :param remote: The remote application. :param token: The token value. :param resp: The response. """ gh = github3.login(token=resp['access_token']) with db.session.begin_nested(): me ...
def account_setup(remote, token, resp): """Perform additional setup after user have been logged in. :param remote: The remote application. :param token: The token value. :param resp: The response. """ gh = github3.login(token=resp['access_token']) with db.session.begin_nested(): me ...
[ "Perform", "additional", "setup", "after", "user", "have", "been", "logged", "in", "." ]
inveniosoftware/invenio-oauthclient
python
https://github.com/inveniosoftware/invenio-oauthclient/blob/2500dc6935738107617aeade79e050d7608004bb/invenio_oauthclient/contrib/github.py#L158-L176
[ "def", "account_setup", "(", "remote", ",", "token", ",", "resp", ")", ":", "gh", "=", "github3", ".", "login", "(", "token", "=", "resp", "[", "'access_token'", "]", ")", "with", "db", ".", "session", ".", "begin_nested", "(", ")", ":", "me", "=", ...
2500dc6935738107617aeade79e050d7608004bb
train
authorized
Authorized callback handler for GitHub. :param resp: The response. :param remote: The remote application.
invenio_oauthclient/contrib/github.py
def authorized(resp, remote): """Authorized callback handler for GitHub. :param resp: The response. :param remote: The remote application. """ if resp and 'error' in resp: if resp['error'] == 'bad_verification_code': # See https://developer.github.com/v3/oauth/#bad-verification-...
def authorized(resp, remote): """Authorized callback handler for GitHub. :param resp: The response. :param remote: The remote application. """ if resp and 'error' in resp: if resp['error'] == 'bad_verification_code': # See https://developer.github.com/v3/oauth/#bad-verification-...
[ "Authorized", "callback", "handler", "for", "GitHub", "." ]
inveniosoftware/invenio-oauthclient
python
https://github.com/inveniosoftware/invenio-oauthclient/blob/2500dc6935738107617aeade79e050d7608004bb/invenio_oauthclient/contrib/github.py#L180-L198
[ "def", "authorized", "(", "resp", ",", "remote", ")", ":", "if", "resp", "and", "'error'", "in", "resp", ":", "if", "resp", "[", "'error'", "]", "==", "'bad_verification_code'", ":", "# See https://developer.github.com/v3/oauth/#bad-verification-code", "# which recomm...
2500dc6935738107617aeade79e050d7608004bb
train
Field.eq
Construct an equal to (``=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def eq(self, value): """Construct an equal to (``=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '=' self.negate_op = '!=' self.value = self._value(value) return se...
def eq(self, value): """Construct an equal to (``=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '=' self.negate_op = '!=' self.value = self._value(value) return se...
[ "Construct", "an", "equal", "to", "(", "=", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L101-L111
[ "def", "eq", "(", "self", ",", "value", ")", ":", "self", ".", "op", "=", "'='", "self", ".", "negate_op", "=", "'!='", "self", ".", "value", "=", "self", ".", "_value", "(", "value", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.ne
Construct a not equal to (``!=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def ne(self, value): """Construct a not equal to (``!=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '!=' self.negate_op = '=' self.value = self._value(value) retur...
def ne(self, value): """Construct a not equal to (``!=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '!=' self.negate_op = '=' self.value = self._value(value) retur...
[ "Construct", "a", "not", "equal", "to", "(", "!", "=", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L113-L123
[ "def", "ne", "(", "self", ",", "value", ")", ":", "self", ".", "op", "=", "'!='", "self", ".", "negate_op", "=", "'='", "self", ".", "value", "=", "self", ".", "_value", "(", "value", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.gt
Construct a greater than (``>``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def gt(self, value): """Construct a greater than (``>``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '>' self.negate_op = '<=' self.value = self._value(value) return...
def gt(self, value): """Construct a greater than (``>``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '>' self.negate_op = '<=' self.value = self._value(value) return...
[ "Construct", "a", "greater", "than", "(", ">", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L125-L135
[ "def", "gt", "(", "self", ",", "value", ")", ":", "self", ".", "op", "=", "'>'", "self", ".", "negate_op", "=", "'<='", "self", ".", "value", "=", "self", ".", "_value", "(", "value", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.ge
Construct a greater than or equal to (``>=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def ge(self, value): """Construct a greater than or equal to (``>=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '>=' self.negate_op = '<' self.value = self._value(value) ...
def ge(self, value): """Construct a greater than or equal to (``>=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '>=' self.negate_op = '<' self.value = self._value(value) ...
[ "Construct", "a", "greater", "than", "or", "equal", "to", "(", ">", "=", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L137-L147
[ "def", "ge", "(", "self", ",", "value", ")", ":", "self", ".", "op", "=", "'>='", "self", ".", "negate_op", "=", "'<'", "self", ".", "value", "=", "self", ".", "_value", "(", "value", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.lt
Construct a less than (``<``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def lt(self, value): """Construct a less than (``<``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '<' self.negate_op = '>=' self.value = self._value(value) return se...
def lt(self, value): """Construct a less than (``<``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '<' self.negate_op = '>=' self.value = self._value(value) return se...
[ "Construct", "a", "less", "than", "(", "<", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L149-L159
[ "def", "lt", "(", "self", ",", "value", ")", ":", "self", ".", "op", "=", "'<'", "self", ".", "negate_op", "=", "'>='", "self", ".", "value", "=", "self", ".", "_value", "(", "value", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.le
Construct a less than or equal to (``<=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def le(self, value): """Construct a less than or equal to (``<=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '<=' self.negate_op = '>' self.value = self._value(value) ...
def le(self, value): """Construct a less than or equal to (``<=``) filter. :param value: Filter value :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '<=' self.negate_op = '>' self.value = self._value(value) ...
[ "Construct", "a", "less", "than", "or", "equal", "to", "(", "<", "=", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L161-L171
[ "def", "le", "(", "self", ",", "value", ")", ":", "self", ".", "op", "=", "'<='", "self", ".", "negate_op", "=", "'>'", "self", ".", "value", "=", "self", ".", "_value", "(", "value", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.match
Construct a regexp match (``~``) filter. Combine with ``not_`` method to construct a negative regexp match (``!~``) filter. :param value: Filter value :param ignorecase: If bool `True`, make match case insensitive (``~*``, ``!~*``) :return: :class:`filters.Field <filters.Field>` object ...
cdrouter/filters.py
def match(self, value, ignorecase=False): """Construct a regexp match (``~``) filter. Combine with ``not_`` method to construct a negative regexp match (``!~``) filter. :param value: Filter value :param ignorecase: If bool `True`, make match case insensitive (``~*``, ``!~*``) :return: ...
def match(self, value, ignorecase=False): """Construct a regexp match (``~``) filter. Combine with ``not_`` method to construct a negative regexp match (``!~``) filter. :param value: Filter value :param ignorecase: If bool `True`, make match case insensitive (``~*``, ``!~*``) :return: ...
[ "Construct", "a", "regexp", "match", "(", "~", ")", "filter", ".", "Combine", "with", "not_", "method", "to", "construct", "a", "negative", "regexp", "match", "(", "!~", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L173-L188
[ "def", "match", "(", "self", ",", "value", ",", "ignorecase", "=", "False", ")", ":", "if", "not", "ignorecase", ":", "self", ".", "op", "=", "'~'", "self", ".", "negate_op", "=", "'!~'", "else", ":", "self", ".", "op", "=", "'~*'", "self", ".", ...
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.contains
Construct an array contains (``@>``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def contains(self, *args): """Construct an array contains (``@>``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '@>' self.negate_op = None self.value = self._array_value(args...
def contains(self, *args): """Construct an array contains (``@>``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '@>' self.negate_op = None self.value = self._array_value(args...
[ "Construct", "an", "array", "contains", "(", "@", ">", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L190-L200
[ "def", "contains", "(", "self", ",", "*", "args", ")", ":", "self", ".", "op", "=", "'@>'", "self", ".", "negate_op", "=", "None", "self", ".", "value", "=", "self", ".", "_array_value", "(", "args", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.contained_by
Construct an array contained by (``<@``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def contained_by(self, *args): """Construct an array contained by (``<@``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '<@' self.negate_op = None self.value = self._array_va...
def contained_by(self, *args): """Construct an array contained by (``<@``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '<@' self.negate_op = None self.value = self._array_va...
[ "Construct", "an", "array", "contained", "by", "(", "<@", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L202-L212
[ "def", "contained_by", "(", "self", ",", "*", "args", ")", ":", "self", ".", "op", "=", "'<@'", "self", ".", "negate_op", "=", "None", "self", ".", "value", "=", "self", ".", "_array_value", "(", "args", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
Field.overlaps
Construct an array overlaps (``&&``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field
cdrouter/filters.py
def overlaps(self, *args): """Construct an array overlaps (``&&``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '&&' self.negate_op = None self.value = self._array_value(args...
def overlaps(self, *args): """Construct an array overlaps (``&&``) filter. :param args: Filter values :return: :class:`filters.Field <filters.Field>` object :rtype: filters.Field """ self.op = '&&' self.negate_op = None self.value = self._array_value(args...
[ "Construct", "an", "array", "overlaps", "(", "&&", ")", "filter", "." ]
qacafe/cdrouter.py
python
https://github.com/qacafe/cdrouter.py/blob/aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5/cdrouter/filters.py#L214-L224
[ "def", "overlaps", "(", "self", ",", "*", "args", ")", ":", "self", ".", "op", "=", "'&&'", "self", ".", "negate_op", "=", "None", "self", ".", "value", "=", "self", ".", "_array_value", "(", "args", ")", "return", "self" ]
aacf2c6ab0b987250f7b1892f4bba14bb2b7dbe5
train
initial_variant_sequences_from_reads
Get all unique sequences from reads spanning a variant locus. This will include partial sequences due to reads starting in the middle of the sequence around around a variant.
isovar/variant_sequences.py
def initial_variant_sequences_from_reads( variant_reads, max_nucleotides_before_variant=None, max_nucleotides_after_variant=None): """ Get all unique sequences from reads spanning a variant locus. This will include partial sequences due to reads starting in the middle of the sequ...
def initial_variant_sequences_from_reads( variant_reads, max_nucleotides_before_variant=None, max_nucleotides_after_variant=None): """ Get all unique sequences from reads spanning a variant locus. This will include partial sequences due to reads starting in the middle of the sequ...
[ "Get", "all", "unique", "sequences", "from", "reads", "spanning", "a", "variant", "locus", ".", "This", "will", "include", "partial", "sequences", "due", "to", "reads", "starting", "in", "the", "middle", "of", "the", "sequence", "around", "around", "a", "var...
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L245-L267
[ "def", "initial_variant_sequences_from_reads", "(", "variant_reads", ",", "max_nucleotides_before_variant", "=", "None", ",", "max_nucleotides_after_variant", "=", "None", ")", ":", "unique_sequence_groups", "=", "group_unique_sequences", "(", "variant_reads", ",", "max_prefi...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
trim_variant_sequences
Trim VariantSequences to desired coverage and then combine any subsequences which get generated.
isovar/variant_sequences.py
def trim_variant_sequences(variant_sequences, min_variant_sequence_coverage): """ Trim VariantSequences to desired coverage and then combine any subsequences which get generated. """ n_total = len(variant_sequences) trimmed_variant_sequences = [ variant_sequence.trim_by_coverage(min_vari...
def trim_variant_sequences(variant_sequences, min_variant_sequence_coverage): """ Trim VariantSequences to desired coverage and then combine any subsequences which get generated. """ n_total = len(variant_sequences) trimmed_variant_sequences = [ variant_sequence.trim_by_coverage(min_vari...
[ "Trim", "VariantSequences", "to", "desired", "coverage", "and", "then", "combine", "any", "subsequences", "which", "get", "generated", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L319-L336
[ "def", "trim_variant_sequences", "(", "variant_sequences", ",", "min_variant_sequence_coverage", ")", ":", "n_total", "=", "len", "(", "variant_sequences", ")", "trimmed_variant_sequences", "=", "[", "variant_sequence", ".", "trim_by_coverage", "(", "min_variant_sequence_co...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
filter_variant_sequences
Drop variant sequences which are shorter than request or don't have enough supporting reads.
isovar/variant_sequences.py
def filter_variant_sequences( variant_sequences, preferred_sequence_length, min_variant_sequence_coverage=MIN_VARIANT_SEQUENCE_COVERAGE,): """ Drop variant sequences which are shorter than request or don't have enough supporting reads. """ variant_sequences = trim_variant_seq...
def filter_variant_sequences( variant_sequences, preferred_sequence_length, min_variant_sequence_coverage=MIN_VARIANT_SEQUENCE_COVERAGE,): """ Drop variant sequences which are shorter than request or don't have enough supporting reads. """ variant_sequences = trim_variant_seq...
[ "Drop", "variant", "sequences", "which", "are", "shorter", "than", "request", "or", "don", "t", "have", "enough", "supporting", "reads", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L339-L352
[ "def", "filter_variant_sequences", "(", "variant_sequences", ",", "preferred_sequence_length", ",", "min_variant_sequence_coverage", "=", "MIN_VARIANT_SEQUENCE_COVERAGE", ",", ")", ":", "variant_sequences", "=", "trim_variant_sequences", "(", "variant_sequences", ",", "min_vari...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
reads_to_variant_sequences
Collapse variant-supporting RNA reads into consensus sequences of approximately the preferred length (may differ at the ends of transcripts), filter consensus sequences by length and number of supporting RNA reads. Parameters ---------- variant : varcode.Variant reads : list of AlleleRead obje...
isovar/variant_sequences.py
def reads_to_variant_sequences( variant, reads, preferred_sequence_length, min_alt_rna_reads=MIN_ALT_RNA_READS, min_variant_sequence_coverage=MIN_VARIANT_SEQUENCE_COVERAGE, variant_sequence_assembly=VARIANT_SEQUENCE_ASSEMBLY): """ Collapse variant-supporting RNA r...
def reads_to_variant_sequences( variant, reads, preferred_sequence_length, min_alt_rna_reads=MIN_ALT_RNA_READS, min_variant_sequence_coverage=MIN_VARIANT_SEQUENCE_COVERAGE, variant_sequence_assembly=VARIANT_SEQUENCE_ASSEMBLY): """ Collapse variant-supporting RNA r...
[ "Collapse", "variant", "-", "supporting", "RNA", "reads", "into", "consensus", "sequences", "of", "approximately", "the", "preferred", "length", "(", "may", "differ", "at", "the", "ends", "of", "transcripts", ")", "filter", "consensus", "sequences", "by", "lengt...
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L355-L471
[ "def", "reads_to_variant_sequences", "(", "variant", ",", "reads", ",", "preferred_sequence_length", ",", "min_alt_rna_reads", "=", "MIN_ALT_RNA_READS", ",", "min_variant_sequence_coverage", "=", "MIN_VARIANT_SEQUENCE_COVERAGE", ",", "variant_sequence_assembly", "=", "VARIANT_S...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
reads_generator_to_sequences_generator
For each variant, collect all possible sequence contexts around the variant which are spanned by at least min_reads. Parameters ---------- variant_and_reads_generator : generator Sequence of Variant objects paired with a list of reads which overlap that variant. min_alt_rna_reads :...
isovar/variant_sequences.py
def reads_generator_to_sequences_generator( variant_and_reads_generator, min_alt_rna_reads=MIN_ALT_RNA_READS, min_variant_sequence_coverage=MIN_VARIANT_SEQUENCE_COVERAGE, preferred_sequence_length=VARIANT_SEQUENCE_LENGTH, variant_sequence_assembly=VARIANT_SEQUENCE_ASSEMBLY): ...
def reads_generator_to_sequences_generator( variant_and_reads_generator, min_alt_rna_reads=MIN_ALT_RNA_READS, min_variant_sequence_coverage=MIN_VARIANT_SEQUENCE_COVERAGE, preferred_sequence_length=VARIANT_SEQUENCE_LENGTH, variant_sequence_assembly=VARIANT_SEQUENCE_ASSEMBLY): ...
[ "For", "each", "variant", "collect", "all", "possible", "sequence", "contexts", "around", "the", "variant", "which", "are", "spanned", "by", "at", "least", "min_reads", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L474-L516
[ "def", "reads_generator_to_sequences_generator", "(", "variant_and_reads_generator", ",", "min_alt_rna_reads", "=", "MIN_ALT_RNA_READS", ",", "min_variant_sequence_coverage", "=", "MIN_VARIANT_SEQUENCE_COVERAGE", ",", "preferred_sequence_length", "=", "VARIANT_SEQUENCE_LENGTH", ",", ...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
variant_sequences_generator_to_dataframe
Creates a dataframe from a generator which yields (Variant, [VariantSequence]) pairs. Returns pandas.DataFrame
isovar/variant_sequences.py
def variant_sequences_generator_to_dataframe(variant_sequences_generator): """ Creates a dataframe from a generator which yields (Variant, [VariantSequence]) pairs. Returns pandas.DataFrame """ # TODO: Change VariantSequence.alt to VariantSequence.alt_nucleotides # or something else that do...
def variant_sequences_generator_to_dataframe(variant_sequences_generator): """ Creates a dataframe from a generator which yields (Variant, [VariantSequence]) pairs. Returns pandas.DataFrame """ # TODO: Change VariantSequence.alt to VariantSequence.alt_nucleotides # or something else that do...
[ "Creates", "a", "dataframe", "from", "a", "generator", "which", "yields", "(", "Variant", "[", "VariantSequence", "]", ")", "pairs", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L519-L534
[ "def", "variant_sequences_generator_to_dataframe", "(", "variant_sequences_generator", ")", ":", "# TODO: Change VariantSequence.alt to VariantSequence.alt_nucleotides", "# or something else that doesn't clash with a variant's `alt` field", "return", "dataframe_from_generator", "(", "VariantSe...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.contains
Is the other VariantSequence a subsequence of this one? The two sequences must agree on the alt nucleotides, the prefix of the longer must contain the prefix of the shorter, and the suffix of the longer must contain the suffix of the shorter.
isovar/variant_sequences.py
def contains(self, other): """ Is the other VariantSequence a subsequence of this one? The two sequences must agree on the alt nucleotides, the prefix of the longer must contain the prefix of the shorter, and the suffix of the longer must contain the suffix of the shorter. ...
def contains(self, other): """ Is the other VariantSequence a subsequence of this one? The two sequences must agree on the alt nucleotides, the prefix of the longer must contain the prefix of the shorter, and the suffix of the longer must contain the suffix of the shorter. ...
[ "Is", "the", "other", "VariantSequence", "a", "subsequence", "of", "this", "one?" ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L67-L77
[ "def", "contains", "(", "self", ",", "other", ")", ":", "return", "(", "self", ".", "alt", "==", "other", ".", "alt", "and", "self", ".", "prefix", ".", "endswith", "(", "other", ".", "prefix", ")", "and", "self", ".", "suffix", ".", "startswith", ...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.left_overlaps
Does this VariantSequence overlap another on the left side?
isovar/variant_sequences.py
def left_overlaps(self, other, min_overlap_size=1): """ Does this VariantSequence overlap another on the left side? """ if self.alt != other.alt: # allele must match! return False if len(other.prefix) > len(self.prefix): # only consider strin...
def left_overlaps(self, other, min_overlap_size=1): """ Does this VariantSequence overlap another on the left side? """ if self.alt != other.alt: # allele must match! return False if len(other.prefix) > len(self.prefix): # only consider strin...
[ "Does", "this", "VariantSequence", "overlap", "another", "on", "the", "left", "side?" ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L79-L115
[ "def", "left_overlaps", "(", "self", ",", "other", ",", "min_overlap_size", "=", "1", ")", ":", "if", "self", ".", "alt", "!=", "other", ".", "alt", ":", "# allele must match!", "return", "False", "if", "len", "(", "other", ".", "prefix", ")", ">", "le...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.add_reads
Create another VariantSequence with more supporting reads.
isovar/variant_sequences.py
def add_reads(self, reads): """ Create another VariantSequence with more supporting reads. """ if len(reads) == 0: return self new_reads = self.reads.union(reads) if len(new_reads) > len(self.reads): return VariantSequence( prefix=s...
def add_reads(self, reads): """ Create another VariantSequence with more supporting reads. """ if len(reads) == 0: return self new_reads = self.reads.union(reads) if len(new_reads) > len(self.reads): return VariantSequence( prefix=s...
[ "Create", "another", "VariantSequence", "with", "more", "supporting", "reads", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L117-L131
[ "def", "add_reads", "(", "self", ",", "reads", ")", ":", "if", "len", "(", "reads", ")", "==", "0", ":", "return", "self", "new_reads", "=", "self", ".", "reads", ".", "union", "(", "reads", ")", "if", "len", "(", "new_reads", ")", ">", "len", "(...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.combine
If this sequence is the prefix of another sequence, combine them into a single VariantSequence object. If the other sequence is contained in this one, then add its reads to this VariantSequence. Also tries to flip the order (e.g. this sequence is a suffix or this sequence is a subsequenc...
isovar/variant_sequences.py
def combine(self, other_sequence): """ If this sequence is the prefix of another sequence, combine them into a single VariantSequence object. If the other sequence is contained in this one, then add its reads to this VariantSequence. Also tries to flip the order (e.g. this sequen...
def combine(self, other_sequence): """ If this sequence is the prefix of another sequence, combine them into a single VariantSequence object. If the other sequence is contained in this one, then add its reads to this VariantSequence. Also tries to flip the order (e.g. this sequen...
[ "If", "this", "sequence", "is", "the", "prefix", "of", "another", "sequence", "combine", "them", "into", "a", "single", "VariantSequence", "object", ".", "If", "the", "other", "sequence", "is", "contained", "in", "this", "one", "then", "add", "its", "reads",...
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L133-L167
[ "def", "combine", "(", "self", ",", "other_sequence", ")", ":", "if", "other_sequence", ".", "alt", "!=", "self", ".", "alt", ":", "logger", ".", "warn", "(", "\"Cannot combine %s and %s with mismatching alt sequences\"", ",", "self", ",", "other_sequence", ")", ...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.variant_indices
When we combine prefix + alt + suffix into a single string, what are is base-0 index interval which gets us back the alt sequence? First returned index is inclusive, the second is exclusive.
isovar/variant_sequences.py
def variant_indices(self): """ When we combine prefix + alt + suffix into a single string, what are is base-0 index interval which gets us back the alt sequence? First returned index is inclusive, the second is exclusive. """ variant_start_index = len(self.prefix) ...
def variant_indices(self): """ When we combine prefix + alt + suffix into a single string, what are is base-0 index interval which gets us back the alt sequence? First returned index is inclusive, the second is exclusive. """ variant_start_index = len(self.prefix) ...
[ "When", "we", "combine", "prefix", "+", "alt", "+", "suffix", "into", "a", "single", "string", "what", "are", "is", "base", "-", "0", "index", "interval", "which", "gets", "us", "back", "the", "alt", "sequence?", "First", "returned", "index", "is", "incl...
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L169-L178
[ "def", "variant_indices", "(", "self", ")", ":", "variant_start_index", "=", "len", "(", "self", ".", "prefix", ")", "variant_len", "=", "len", "(", "self", ".", "alt", ")", "variant_end_index", "=", "variant_start_index", "+", "variant_len", "return", "varian...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.coverage
Returns NumPy array indicating number of reads covering each nucleotides of this sequence.
isovar/variant_sequences.py
def coverage(self): """ Returns NumPy array indicating number of reads covering each nucleotides of this sequence. """ variant_start_index, variant_end_index = self.variant_indices() n_nucleotides = len(self) coverage_array = np.zeros(n_nucleotides, dtype="int32")...
def coverage(self): """ Returns NumPy array indicating number of reads covering each nucleotides of this sequence. """ variant_start_index, variant_end_index = self.variant_indices() n_nucleotides = len(self) coverage_array = np.zeros(n_nucleotides, dtype="int32")...
[ "Returns", "NumPy", "array", "indicating", "number", "of", "reads", "covering", "each", "nucleotides", "of", "this", "sequence", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L180-L192
[ "def", "coverage", "(", "self", ")", ":", "variant_start_index", ",", "variant_end_index", "=", "self", ".", "variant_indices", "(", ")", "n_nucleotides", "=", "len", "(", "self", ")", "coverage_array", "=", "np", ".", "zeros", "(", "n_nucleotides", ",", "dt...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
VariantSequence.trim_by_coverage
Given the min number of reads overlapping each nucleotide of a variant sequence, trim this sequence by getting rid of positions which are overlapped by fewer reads than specified.
isovar/variant_sequences.py
def trim_by_coverage(self, min_reads): """ Given the min number of reads overlapping each nucleotide of a variant sequence, trim this sequence by getting rid of positions which are overlapped by fewer reads than specified. """ read_count_array = self.coverage() lo...
def trim_by_coverage(self, min_reads): """ Given the min number of reads overlapping each nucleotide of a variant sequence, trim this sequence by getting rid of positions which are overlapped by fewer reads than specified. """ read_count_array = self.coverage() lo...
[ "Given", "the", "min", "number", "of", "reads", "overlapping", "each", "nucleotide", "of", "a", "variant", "sequence", "trim", "this", "sequence", "by", "getting", "rid", "of", "positions", "which", "are", "overlapped", "by", "fewer", "reads", "than", "specifi...
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_sequences.py#L200-L242
[ "def", "trim_by_coverage", "(", "self", ",", "min_reads", ")", ":", "read_count_array", "=", "self", ".", "coverage", "(", ")", "logger", ".", "info", "(", "\"Coverage: %s (len=%d)\"", "%", "(", "read_count_array", ",", "len", "(", "read_count_array", ")", ")"...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
records
Load test data fixture.
examples/app.py
def records(): """Load test data fixture.""" with db.session.begin_nested(): for idx in range(20): # create the record id_ = uuid.uuid4() Record.create({ 'title': 'LHC experiment {}'.format(idx), 'description': 'Data from experiment {}....
def records(): """Load test data fixture.""" with db.session.begin_nested(): for idx in range(20): # create the record id_ = uuid.uuid4() Record.create({ 'title': 'LHC experiment {}'.format(idx), 'description': 'Data from experiment {}....
[ "Load", "test", "data", "fixture", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/examples/app.py#L84-L104
[ "def", "records", "(", ")", ":", "with", "db", ".", "session", ".", "begin_nested", "(", ")", ":", "for", "idx", "in", "range", "(", "20", ")", ":", "# create the record", "id_", "=", "uuid", ".", "uuid4", "(", ")", "Record", ".", "create", "(", "{...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
trim_N_nucleotides
Drop all occurrences of 'N' from prefix and suffix nucleotide strings by trimming.
isovar/string_helpers.py
def trim_N_nucleotides(prefix, suffix): """ Drop all occurrences of 'N' from prefix and suffix nucleotide strings by trimming. """ if 'N' in prefix: # trim prefix to exclude all occurrences of N rightmost_index = prefix.rfind('N') logger.debug( "Trimming %d nucleo...
def trim_N_nucleotides(prefix, suffix): """ Drop all occurrences of 'N' from prefix and suffix nucleotide strings by trimming. """ if 'N' in prefix: # trim prefix to exclude all occurrences of N rightmost_index = prefix.rfind('N') logger.debug( "Trimming %d nucleo...
[ "Drop", "all", "occurrences", "of", "N", "from", "prefix", "and", "suffix", "nucleotide", "strings", "by", "trimming", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/string_helpers.py#L23-L44
[ "def", "trim_N_nucleotides", "(", "prefix", ",", "suffix", ")", ":", "if", "'N'", "in", "prefix", ":", "# trim prefix to exclude all occurrences of N", "rightmost_index", "=", "prefix", ".", "rfind", "(", "'N'", ")", "logger", ".", "debug", "(", "\"Trimming %d nuc...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
convert_from_bytes_if_necessary
Depending on how we extract data from pysam we may end up with either a string or a byte array of nucleotides. For consistency and simplicity, we want to only use strings in the rest of our code.
isovar/string_helpers.py
def convert_from_bytes_if_necessary(prefix, suffix): """ Depending on how we extract data from pysam we may end up with either a string or a byte array of nucleotides. For consistency and simplicity, we want to only use strings in the rest of our code. """ if isinstance(prefix, bytes): p...
def convert_from_bytes_if_necessary(prefix, suffix): """ Depending on how we extract data from pysam we may end up with either a string or a byte array of nucleotides. For consistency and simplicity, we want to only use strings in the rest of our code. """ if isinstance(prefix, bytes): p...
[ "Depending", "on", "how", "we", "extract", "data", "from", "pysam", "we", "may", "end", "up", "with", "either", "a", "string", "or", "a", "byte", "array", "of", "nucleotides", ".", "For", "consistency", "and", "simplicity", "we", "want", "to", "only", "u...
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/string_helpers.py#L46-L58
[ "def", "convert_from_bytes_if_necessary", "(", "prefix", ",", "suffix", ")", ":", "if", "isinstance", "(", "prefix", ",", "bytes", ")", ":", "prefix", "=", "prefix", ".", "decode", "(", "'ascii'", ")", "if", "isinstance", "(", "suffix", ",", "bytes", ")", ...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
reads_supporting_variants
Given a SAM/BAM file and a collection of variants, generates a sequence of variants paired with reads which support each variant.
isovar/variant_reads.py
def reads_supporting_variants(variants, samfile, **kwargs): """ Given a SAM/BAM file and a collection of variants, generates a sequence of variants paired with reads which support each variant. """ for variant, allele_reads in reads_overlapping_variants( variants=variants, sa...
def reads_supporting_variants(variants, samfile, **kwargs): """ Given a SAM/BAM file and a collection of variants, generates a sequence of variants paired with reads which support each variant. """ for variant, allele_reads in reads_overlapping_variants( variants=variants, sa...
[ "Given", "a", "SAM", "/", "BAM", "file", "and", "a", "collection", "of", "variants", "generates", "a", "sequence", "of", "variants", "paired", "with", "reads", "which", "support", "each", "variant", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/variant_reads.py#L48-L57
[ "def", "reads_supporting_variants", "(", "variants", ",", "samfile", ",", "*", "*", "kwargs", ")", ":", "for", "variant", ",", "allele_reads", "in", "reads_overlapping_variants", "(", "variants", "=", "variants", ",", "samfile", "=", "samfile", ",", "*", "*", ...
b39b684920e3f6b344851d6598a1a1c67bce913b
train
Producer.publish
Validate operation type.
invenio_indexer/api.py
def publish(self, data, **kwargs): """Validate operation type.""" assert data.get('op') in {'index', 'create', 'delete', 'update'} return super(Producer, self).publish(data, **kwargs)
def publish(self, data, **kwargs): """Validate operation type.""" assert data.get('op') in {'index', 'create', 'delete', 'update'} return super(Producer, self).publish(data, **kwargs)
[ "Validate", "operation", "type", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L36-L39
[ "def", "publish", "(", "self", ",", "data", ",", "*", "*", "kwargs", ")", ":", "assert", "data", ".", "get", "(", "'op'", ")", "in", "{", "'index'", ",", "'create'", ",", "'delete'", ",", "'update'", "}", "return", "super", "(", "Producer", ",", "s...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer.index
Index a record. The caller is responsible for ensuring that the record has already been committed to the database. If a newer version of a record has already been indexed then the provided record will not be indexed. This behavior can be controlled by providing a different ``version_typ...
invenio_indexer/api.py
def index(self, record): """Index a record. The caller is responsible for ensuring that the record has already been committed to the database. If a newer version of a record has already been indexed then the provided record will not be indexed. This behavior can be controlled by...
def index(self, record): """Index a record. The caller is responsible for ensuring that the record has already been committed to the database. If a newer version of a record has already been indexed then the provided record will not be indexed. This behavior can be controlled by...
[ "Index", "a", "record", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L106-L126
[ "def", "index", "(", "self", ",", "record", ")", ":", "index", ",", "doc_type", "=", "self", ".", "record_to_index", "(", "record", ")", "return", "self", ".", "client", ".", "index", "(", "id", "=", "str", "(", "record", ".", "id", ")", ",", "vers...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer.delete
Delete a record. :param record: Record instance.
invenio_indexer/api.py
def delete(self, record): """Delete a record. :param record: Record instance. """ index, doc_type = self.record_to_index(record) return self.client.delete( id=str(record.id), index=index, doc_type=doc_type, )
def delete(self, record): """Delete a record. :param record: Record instance. """ index, doc_type = self.record_to_index(record) return self.client.delete( id=str(record.id), index=index, doc_type=doc_type, )
[ "Delete", "a", "record", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L135-L146
[ "def", "delete", "(", "self", ",", "record", ")", ":", "index", ",", "doc_type", "=", "self", ".", "record_to_index", "(", "record", ")", "return", "self", ".", "client", ".", "delete", "(", "id", "=", "str", "(", "record", ".", "id", ")", ",", "in...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer.process_bulk_queue
Process bulk indexing queue. :param dict es_bulk_kwargs: Passed to :func:`elasticsearch:elasticsearch.helpers.bulk`.
invenio_indexer/api.py
def process_bulk_queue(self, es_bulk_kwargs=None): """Process bulk indexing queue. :param dict es_bulk_kwargs: Passed to :func:`elasticsearch:elasticsearch.helpers.bulk`. """ with current_celery_app.pool.acquire(block=True) as conn: consumer = Consumer( ...
def process_bulk_queue(self, es_bulk_kwargs=None): """Process bulk indexing queue. :param dict es_bulk_kwargs: Passed to :func:`elasticsearch:elasticsearch.helpers.bulk`. """ with current_celery_app.pool.acquire(block=True) as conn: consumer = Consumer( ...
[ "Process", "bulk", "indexing", "queue", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L166-L193
[ "def", "process_bulk_queue", "(", "self", ",", "es_bulk_kwargs", "=", "None", ")", ":", "with", "current_celery_app", ".", "pool", ".", "acquire", "(", "block", "=", "True", ")", "as", "conn", ":", "consumer", "=", "Consumer", "(", "connection", "=", "conn...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer.create_producer
Context manager that yields an instance of ``Producer``.
invenio_indexer/api.py
def create_producer(self): """Context manager that yields an instance of ``Producer``.""" with current_celery_app.pool.acquire(block=True) as conn: yield Producer( conn, exchange=self.mq_exchange, routing_key=self.mq_routing_key, ...
def create_producer(self): """Context manager that yields an instance of ``Producer``.""" with current_celery_app.pool.acquire(block=True) as conn: yield Producer( conn, exchange=self.mq_exchange, routing_key=self.mq_routing_key, ...
[ "Context", "manager", "that", "yields", "an", "instance", "of", "Producer", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L196-L204
[ "def", "create_producer", "(", "self", ")", ":", "with", "current_celery_app", ".", "pool", ".", "acquire", "(", "block", "=", "True", ")", "as", "conn", ":", "yield", "Producer", "(", "conn", ",", "exchange", "=", "self", ".", "mq_exchange", ",", "routi...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer._bulk_op
Index record in Elasticsearch asynchronously. :param record_id_iterator: Iterator that yields record UUIDs. :param op_type: Indexing operation (one of ``index``, ``create``, ``delete`` or ``update``). :param index: The Elasticsearch index. (Default: ``None``) :param doc_type...
invenio_indexer/api.py
def _bulk_op(self, record_id_iterator, op_type, index=None, doc_type=None): """Index record in Elasticsearch asynchronously. :param record_id_iterator: Iterator that yields record UUIDs. :param op_type: Indexing operation (one of ``index``, ``create``, ``delete`` or ``update``). ...
def _bulk_op(self, record_id_iterator, op_type, index=None, doc_type=None): """Index record in Elasticsearch asynchronously. :param record_id_iterator: Iterator that yields record UUIDs. :param op_type: Indexing operation (one of ``index``, ``create``, ``delete`` or ``update``). ...
[ "Index", "record", "in", "Elasticsearch", "asynchronously", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L209-L225
[ "def", "_bulk_op", "(", "self", ",", "record_id_iterator", ",", "op_type", ",", "index", "=", "None", ",", "doc_type", "=", "None", ")", ":", "with", "self", ".", "create_producer", "(", ")", "as", "producer", ":", "for", "rec", "in", "record_id_iterator",...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer._actionsiter
Iterate bulk actions. :param message_iterator: Iterator yielding messages from a queue.
invenio_indexer/api.py
def _actionsiter(self, message_iterator): """Iterate bulk actions. :param message_iterator: Iterator yielding messages from a queue. """ for message in message_iterator: payload = message.decode() try: if payload['op'] == 'delete': ...
def _actionsiter(self, message_iterator): """Iterate bulk actions. :param message_iterator: Iterator yielding messages from a queue. """ for message in message_iterator: payload = message.decode() try: if payload['op'] == 'delete': ...
[ "Iterate", "bulk", "actions", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L227-L246
[ "def", "_actionsiter", "(", "self", ",", "message_iterator", ")", ":", "for", "message", "in", "message_iterator", ":", "payload", "=", "message", ".", "decode", "(", ")", "try", ":", "if", "payload", "[", "'op'", "]", "==", "'delete'", ":", "yield", "se...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer._delete_action
Bulk delete action. :param payload: Decoded message body. :returns: Dictionary defining an Elasticsearch bulk 'delete' action.
invenio_indexer/api.py
def _delete_action(self, payload): """Bulk delete action. :param payload: Decoded message body. :returns: Dictionary defining an Elasticsearch bulk 'delete' action. """ index, doc_type = payload.get('index'), payload.get('doc_type') if not (index and doc_type): ...
def _delete_action(self, payload): """Bulk delete action. :param payload: Decoded message body. :returns: Dictionary defining an Elasticsearch bulk 'delete' action. """ index, doc_type = payload.get('index'), payload.get('doc_type') if not (index and doc_type): ...
[ "Bulk", "delete", "action", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L248-L264
[ "def", "_delete_action", "(", "self", ",", "payload", ")", ":", "index", ",", "doc_type", "=", "payload", ".", "get", "(", "'index'", ")", ",", "payload", ".", "get", "(", "'doc_type'", ")", "if", "not", "(", "index", "and", "doc_type", ")", ":", "re...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer._index_action
Bulk index action. :param payload: Decoded message body. :returns: Dictionary defining an Elasticsearch bulk 'index' action.
invenio_indexer/api.py
def _index_action(self, payload): """Bulk index action. :param payload: Decoded message body. :returns: Dictionary defining an Elasticsearch bulk 'index' action. """ record = Record.get_record(payload['id']) index, doc_type = self.record_to_index(record) return ...
def _index_action(self, payload): """Bulk index action. :param payload: Decoded message body. :returns: Dictionary defining an Elasticsearch bulk 'index' action. """ record = Record.get_record(payload['id']) index, doc_type = self.record_to_index(record) return ...
[ "Bulk", "index", "action", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L266-L283
[ "def", "_index_action", "(", "self", ",", "payload", ")", ":", "record", "=", "Record", ".", "get_record", "(", "payload", "[", "'id'", "]", ")", "index", ",", "doc_type", "=", "self", ".", "record_to_index", "(", "record", ")", "return", "{", "'_op_type...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
RecordIndexer._prepare_record
Prepare record data for indexing. :param record: The record to prepare. :param index: The Elasticsearch index. :param doc_type: The Elasticsearch document type. :returns: The record metadata.
invenio_indexer/api.py
def _prepare_record(record, index, doc_type): """Prepare record data for indexing. :param record: The record to prepare. :param index: The Elasticsearch index. :param doc_type: The Elasticsearch document type. :returns: The record metadata. """ if current_app.con...
def _prepare_record(record, index, doc_type): """Prepare record data for indexing. :param record: The record to prepare. :param index: The Elasticsearch index. :param doc_type: The Elasticsearch document type. :returns: The record metadata. """ if current_app.con...
[ "Prepare", "record", "data", "for", "indexing", "." ]
inveniosoftware/invenio-indexer
python
https://github.com/inveniosoftware/invenio-indexer/blob/1460aa8976b449d9a3a99d356322b158e9be6f80/invenio_indexer/api.py#L286-L313
[ "def", "_prepare_record", "(", "record", ",", "index", ",", "doc_type", ")", ":", "if", "current_app", ".", "config", "[", "'INDEXER_REPLACE_REFS'", "]", ":", "data", "=", "copy", ".", "deepcopy", "(", "record", ".", "replace_refs", "(", ")", ")", "else", ...
1460aa8976b449d9a3a99d356322b158e9be6f80
train
greedy_merge_helper
Returns a list of merged VariantSequence objects, and True if any were successfully merged.
isovar/assembly.py
def greedy_merge_helper( variant_sequences, min_overlap_size=MIN_VARIANT_SEQUENCE_ASSEMBLY_OVERLAP_SIZE): """ Returns a list of merged VariantSequence objects, and True if any were successfully merged. """ merged_variant_sequences = {} merged_any = False # here we'll keep tr...
def greedy_merge_helper( variant_sequences, min_overlap_size=MIN_VARIANT_SEQUENCE_ASSEMBLY_OVERLAP_SIZE): """ Returns a list of merged VariantSequence objects, and True if any were successfully merged. """ merged_variant_sequences = {} merged_any = False # here we'll keep tr...
[ "Returns", "a", "list", "of", "merged", "VariantSequence", "objects", "and", "True", "if", "any", "were", "successfully", "merged", "." ]
openvax/isovar
python
https://github.com/openvax/isovar/blob/b39b684920e3f6b344851d6598a1a1c67bce913b/isovar/assembly.py#L27-L58
[ "def", "greedy_merge_helper", "(", "variant_sequences", ",", "min_overlap_size", "=", "MIN_VARIANT_SEQUENCE_ASSEMBLY_OVERLAP_SIZE", ")", ":", "merged_variant_sequences", "=", "{", "}", "merged_any", "=", "False", "# here we'll keep track of sequences that haven't been merged yet, a...
b39b684920e3f6b344851d6598a1a1c67bce913b