예제 #1
0
def parseCOMM(raw):
    # TODO
    enc = raw[0:1]
    lang = raw[1:4]
    desc = decode(enc, raw[4:])
    i = raw[4:].index(terminator(enc)) + len(terminator(enc))
    cont = decode(enc, raw[i:])
    return {"raw": raw, "language": lang, "description": desc, "content": cont}
예제 #2
0
 def codes_to_str(self, codes):
     return decode(codes)
예제 #3
0
 def code_to_char(self, code):
     return decode([code])
                dl.test_label_data[i] == np.amax(dl.test_label_data[i]))
            max_index_prediction = np.where(
                predictions[i] == np.amax(predictions[i]))

            counter = 0
            if (max_index_label[0][0] == max_index_prediction[0][0]):
                if (accuracy_counter == 0):
                    counter = counter + 1
                color = green_color

            else:
                color = red_color

            cell = sheet.cell(column=1,
                              row=row_num,
                              value=const.decode(max_index_label[0][0]))
            cell.fill = color
            cell.border = thin_border
            cell = sheet.cell(column=2,
                              row=row_num,
                              value=const.decode(max_index_prediction[0][0]))
            cell.fill = color
            cell.border = thin_border
            for j in range(len(layer_model_prediction[i])):
                cell = sheet.cell(column=3 + j,
                                  row=row_num,
                                  value=layer_model_prediction[i][j])
                if (layer_model_prediction[i][j] > const.ACCTIVATION_BOUNDARY):
                    if (max_index_label[0][0] == max_index_prediction[0][0]):
                        color = green_color_strong
                    else:
예제 #5
0
def parseT000(raw):
    # Text encoding	$xx
    # Information	<text string according to encoding>
    enc = raw[0]
    dec = decode(enc, raw[1:])
    return {"content": dec}