Address – confusion about addresses

I have a little confusion about Segwit addresses and not Segwit.

I can see it P2WPKH and P2WSH from this link https://en.bitcoin.it/wiki/BIP_0173 and they are segwit and start with bc (mainnet) or tb (Test network).

But I can even see P2SH, starting with 3 nested P2WPKH or P2WSH, and this address starts with 3.

Then when we talk about it P2WPKH and P2WSH We mean native and start with bc, or can we even start P2WPKH with 1 and P2WSH with 3?

when i create

bitcoin-cli getnewaddress "segwit" "p2sh-segwit" 

What type of script do I have? P2PK?

scikit learn – How do I convert a confusion matrix into a data frame in Python?

I would like to know how to transform a confusion matrix from Scikit Learn into a data frame. How can I do that ?

I do not know if it is possible to mix all the mc of the different models. Why I ask is because of legibility. I always have to print in the terminal and copy the mc to an Excel file and it is really demanding since I run the script several times depending on the parameters chosen.


models = {'Model_SVC': model1, 'Model_G_NB': model2, 'Model_LR': model3, 'Model_RF': model4,      'Model_KN': model5, 'Model_MLP': model6}


    cv_splitter = KFold(n_splits=10, shuffle=False, random_state=None)

    for model_name, model in models.items():
        y_pred = cross_val_predict(model, features, ylabels, cv=cv_splitter)

        print("Model: {}".format(model_name))
        print("Accuracy: {}".format(accuracy_score(ylabels, y_pred)))

        cm = confusion_matrix(ylabels, y_pred)

        output = pd.DataFrame()


        print("matrice confusion: {}".format(cm), file=f)

The matrix looks like this:

Model: Model_SVC
Accuracy: 0.5692307692307692
matrice confusion: (( 34   4  46)
 ( 10   2  33)
 ( 16   3 112))
Model: Model_G_NB
Accuracy: 0.43846153846153846
matrice confusion: ((31 22 31)
 (10 13 22)
 (27 34 70))
Model: Model_LR
Accuracy: 0.5461538461538461
matrice confusion: (( 30   4  50)
 ( 11   0  34)
 ( 16   3 112))
Model: Model_RF
Accuracy: 0.5846153846153846
matrice confusion: (( 40   5  39)
 ( 17   1  27)
 ( 20   0 111))
Model: Model_KN
Accuracy: 0.4846153846153846
matrice confusion: ((33 10 41)
 (14 12 19)
 (41  9 81))
Model: Model_MLP
Accuracy: 0.5153846153846153
matrice confusion: (( 17   0  67)
 ( 12   0  33)
 ( 13   1 117))

Confusion with the property "Every path from a particular node to one of the leaves passes through the same number of black nodes" of the property of RB trees

One of the characteristics of red-black trees is: "Every path from a certain node / vertex to one of the leaves leads to the same number of black nodes."

Two related questions about this property:

1] Is the vertex at which we start counted in this black vertex count?

2] Is the hand we end up counting in the black vertex?

I have a secret theory on these two questions, but I hope for confirmation and therefore I will not reveal them yet.

magento2 – Confusion – Need help overwriting the HTML file and passing data

Hopefully I'm not the only one who feels so lost on the Magento 2 study trip. I am trying to overwrite a third party module's onestepcheckout dispipping.html file. I did it successfully using the requirejs-config.js method, but none of the data is forwarded. Are there any other steps I need to do to transfer data (third parties have the js file that I thought would transfer to my overwritten HTML file)? I only see the template elements available, but it seems that no functionality or data has been passed. I know that my request is more basic, and I'm still trying to deal with this complete change to Magento 1, which is now a breeze compared to this completely new method for me. Thanks a lot!

var config = {
map: {
    '*': {
        'Mageplaza_Osc/template/container/shipping.html': 'MyModule_Shipping/template/container/shipping.html'
    }
}

};

Interaction design – Up to 5 color tags create confusion when the user assigns a specific color to a specific keyword

I discuss with my boss whether tags should be colored or not. I think coloring tags is just fun for the user. A user cannot remember what color he has assigned to a certain group of keywords. For example, the user used red for the keyword "offers" and later, at some point during a campaign, assigned the red color as a Diwali festival. The application of color labels therefore does not satisfy the need. However, the boss says, let them assign whatever color he wants. It is not necessary to group keywords of the same color.

Please help me with this!

Can anyone remove my (hopefully) confusion about the security of USB devices in Windows once and for all?

I really understand things correctly when I say that:

  1. If a USB stick / USB device is inserted into a Windows PC that is currently in lock mode (that is, someone has pressed WinKey + L), it is automatically activated behind the scenes.
  2. If a USB stick / USB device is inserted into a Windows PC that is currently NOT in lock mode, it is automatically activated by default.
  3. In both of the above cases, will it ever run an executable that is there by default? (I believe it used to be the case with setup.exe on CD-ROMs.)
  4. Regardless of the conditions mentioned above, Windows will ever be installed automatically DRIVER Found on the device itself when plugged into the PC (with or without a lock screen)? Or is only the "device ID" retrieved from the stick / device and then the corresponding drivers are downloaded based on the device ID from the secure, curated Microsoft servers?
  5. Why exactly are "drivers" needed at all? Doesn't it use the USB standard? And also the "mass storage" standard? I don't understand why it would ever need special "drivers" for a standard device …?
  6. Is the idea of ‚Äč‚Äčinserting a USB stick / USB device into a PC nonsense in itself? Isn't the truth that the user is actively "Yes, please install the drivers from this random unknown device" or "Yes, please run this untrusted EXE file that you found on this stick just inserted and which I did but automatically mounted for you would never run anything without your active approval "? I have the same feeling as when people claim to be "hacked" all the time, but then it turned out that they played a binary email attachment or clicked a big red box that said, "WARNING! Want You really run this EXE from sketchy? " -hack-toolz-4-u.ru? "… but honestly nothing would surprise me at this point.

I wonder this for both the current Windows 10 as well as all previous versions of Windows.

Calculus confusion about reading $ mathrm {d} x ^ 2 $

I have already tried to ask this question (is writing $ dx ^ 2 $ the same as writing $ d (x ^ 2) $ in the calculus) but people seem to misunderstand what I was trying to express , so I decided to put it again.

My question is whether you write $ mathrm {d} x ^ 2 $ (that's a kind of differential expression), it should be read as $$ ( mathrm {d} x) ^ 2 $$ (Difference of x, but quadratic) or $$ mathrm {d} (x ^ 2) $$ (Differential of $ x ^ 2 $)?

The question can also be asked differently: whether I want to express something $ ( mathrm {d} x) ^ 2 $Do I have to write the parentheses explicitly or just write them $ mathrm {d} x ^ 2 $?

Remember that I am not asking for the meaning of the differential, but for the corresponding notation.

dnd 5e – surprise confusion

I've read information about the surprise mechanics and I'm still confused which one to use. There are 3 surprise methods that I see all over the internet.

First: group surprise check

To do a group surprise check, half or a majority of the PCs must reach the highest passive perception of the monsters to survive the surprise.

Second, fail a stealth, not everything is surprised.

If one of the PCs rolls less than the passive perception of the monsters (stealth), the surprise is botched.

Third, some are surprised, some are not.

PC 1 rolls 14
PC 2 rolls 14
PC 3 rolls 12
PC 4 rolls 11

Monster 1 with PP of 15
Monster 2 with PP of 15
Monster 3 with PP of 13
Monster 4 with PP of 10

PC 1 and 2 surprise monsters 3 and 4, but not monsters 1 and 2


I know that the group test can be an optional test. But what about the second and third exams? Which are true? Which one should be used?

c – What is the confusion that they are not giving me the right sample?

Are we really?

#include   
#include 


void pegaVetor(int* vetor, int qtd){
int i;
//__fpurge(stdin);
printf("n");
for (i = 0; i < qtd; ++i)
{
    scanf("%d", &vetor(i));
}
}

int main()
{
int* vetor;
int i,j,aux,n;

do
{
    __fpurge(stdin);
     //Se informar zero na frente sai.
    printf("nInforme a amostra:n ");
    scanf("%d", &n);
    if (n)
    {
        vetor = (int*)malloc(n * sizeof(int));
        pegaVetor(vetor, n);
        for (int k=0; k<=n; k++) {
                for (i=0; i<=n; i++){
                        if (vetor(i)>vetor(i+1)){
                                aux=vetor(i);
                                vetor(i)=vetor(i+1);
                                vetor (i+1)=aux;
                        }
                }
        }
        //Mostrando o vetor ordenado
        printf("Amostra ordenada: n");
        for (i=0; i

Blockchain – confusion about hashing and disk space

I'm having a problem understanding the concept of hashing related to disk space.

Each block is assigned to a hash. Blocks are linked together using hashes, creating a double-linked list type. We store blocks that contain the hash of the next block in the blockchain (i.e., a hard drive). This would make the hard drive full. Now we would use a different hard drive. The hash saved in the last block points to the block saved on the new hard disk. How we use the hash of the last block of the old hard drive to point to the next block stored on a brand new hard drive.

Zulfi.