<commit_before>
'''transaction assembly/dissasembly'''

from time import time
from btcpy.structs.address import Address
from btcpy.structs.sig import P2pkhSolver
from btcpy.structs.transaction import TxOut, TxIn, Sequence, Locktime, MutableTransaction
from btcpy.structs.script import StackData, ScriptSig, NulldataScript, ScriptSig, ScriptPubKey
from btcpy.structs.script import P2pkhScript, MultisigScript, P2shScript
from .networks import query


def nulldata_output(data: bytes, seq: int, value=0):
    '''create nulldata (OP_return) output'''

    stack = StackData.from_bytes(data)
    return TxOut(value, seq, ScriptPubKey(stack.serialize()))


def monosig_p2pkh(address: str):
    '''create pay-to-key-hash (P2PKH) script'''

    addr = Address.from_string(address)

    return P2pkhScript(addr)


def tx_output(value: float, seq: int, script: ScriptSig):
    '''create TxOut object'''

    return TxOut(int(value * 1000000), seq, script)


def make_raw_transaction(inputs: list, outputs: list, locktime=Locktime(0),
                         timestamp: int=int(time()), version=1):
    '''create raw transaction'''
<commit_msg>like this?<commit_after>
'''transaction assembly/dissasembly'''

from time import time
from btcpy.structs.address import Address
from btcpy.structs.sig import P2pkhSolver
from btcpy.structs.transaction import TxOut, TxIn, Sequence, Locktime, MutableTransaction
from btcpy.structs.script import StackData, ScriptSig, NulldataScript, ScriptSig, ScriptPubKey
from btcpy.structs.script import P2pkhScript, MultisigScript, P2shScript
from .networks import query


def nulldata_output(data: bytes, seq: int, value=0):
    '''create nulldata (OP_return) output'''

    stack = StackData.from_bytes(data)
    return TxOut(value, seq, stack.to_push_op())


def monosig_p2pkh(address: str):
    '''create pay-to-key-hash (P2PKH) script'''

    addr = Address.from_string(address)

    return P2pkhScript(addr)


def tx_output(value: float, seq: int, script: ScriptSig):
    '''create TxOut object'''

    return TxOut(int(value * 1000000), seq, script)


def make_raw_transaction(inputs: list, outputs: list, locktime=Locktime(0),
                         timestamp: int=int(time()), version=1):
    '''create raw transaction'''

{'fraction_non_alphanumeric': 0.11224489795918367, 'fraction_numerical': 0.01419698314108252, 'mean_word_length': 4.903141361256544, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '898192', 'n_tokens_mistral': 763, 'n_tokens_neox': 726, 'n_words': 191}