<commit_before>
data pos
data buf[]

data tmpScriptLen
data tmpScriptArr[]  # 'id' is 2


# copy 'arr' to global array with given 'id'
def copyToArr(myarr:arr, size, id):
    i = 0
    while i < size:
        if id == 2:
            self.tmpScriptArr[i] = myarr[i]
        i += 1

# returns array
def initFromArr(size, id):
    myarr = array(size)
    i = 0
    # log(size)
    # log(self.pos)
    while i < size:
        if id == 2:
            myarr[i] = self.tmpScriptArr[i]
        # log(myarr[i])
        i += 1
    return(myarr:arr)

# copy 'arr' to global self.buf[]
def copyToBuf(myarr:arr, size):
    i = 0
    while i < size:
        self.buf[i] = myarr[i]
        i += 1

# return an array with the contents of self.buf[] starting for index self.pos
def initFromBuf(size):
    myarr = array(size)
    offset = self.pos * 2
    i = 0
    # log(size)
    # log(self.pos)
    while i < size:
        myarr[i] = self.buf[offset + i]
        # log(myarr[i])
        i += 1
    return(myarr:arr)



def txinFromBuf():
    prevTxId = self.readReverse(32, outsz=64)
    outputIndex = self.readUInt32LE()
    # log(outputIndex)

    scriptSize = self.readVarintNum()
    # log(scriptSize)

    if scriptSize > 0:
        dblSize = scriptSize*2
        scriptArr = self.readSimple(scriptSize, outsz=dblSize)

    seqNum = self.readUInt32LE()
    # log(seqNum)


# returns satoshis and sets self.tmpScriptLen and self.tmpScriptArr
def txoutFromBuf():
    satoshis = self.readUInt64LE()
    log(satoshis)

    scriptSize = self.readVarintNum()<commit_msg>remove remaining call to readReverse()<commit_after>
data pos
data buf[]

data tmpScriptLen
data tmpScriptArr[]  # 'id' is 2


# copy 'arr' to global array with given 'id'
def copyToArr(myarr:arr, size, id):
    i = 0
    while i < size:
        if id == 2:
            self.tmpScriptArr[i] = myarr[i]
        i += 1

# returns array
def initFromArr(size, id):
    myarr = array(size)
    i = 0
    # log(size)
    # log(self.pos)
    while i < size:
        if id == 2:
            myarr[i] = self.tmpScriptArr[i]
        # log(myarr[i])
        i += 1
    return(myarr:arr)

# copy 'arr' to global self.buf[]
def copyToBuf(myarr:arr, size):
    i = 0
    while i < size:
        self.buf[i] = myarr[i]
        i += 1

# return an array with the contents of self.buf[] starting for index self.pos
def initFromBuf(size):
    myarr = array(size)
    offset = self.pos * 2
    i = 0
    # log(size)
    # log(self.pos)
    while i < size:
        myarr[i] = self.buf[offset + i]
        # log(myarr[i])
        i += 1
    return(myarr:arr)



def txinFromBuf():
    prevTxId = self.readUnsignedBitsLE(256)
    outputIndex = self.readUInt32LE()
    # log(outputIndex)

    scriptSize = self.readVarintNum()
    # log(scriptSize)

    if scriptSize > 0:
        dblSize = scriptSize*2
        scriptArr = self.readSimple(scriptSize, outsz=dblSize)

    seqNum = self.readUInt32LE()
    # log(seqNum)


# returns satoshis and sets self.tmpScriptLen and self.tmpScriptArr
def txoutFromBuf():
    satoshis = self.readUInt64LE()
    log(satoshis)

    scriptSize = self.readVarintNum()
{'fraction_non_alphanumeric': 0.12200574896199297, 'fraction_numerical': 0.015011178537208559, 'mean_word_length': 2.4043478260869566, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 5, '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': '63081', 'n_tokens_mistral': 1177, 'n_tokens_neox': 1122, 'n_words': 292}