segregated witness – How do I convert a private key in hex to a Segwit private key expected by Electrum?

I’ve been following this code to generate SegWit addresses with python. However, I’m confused because this script doesn’t output the private key in a usable way for Electrum.

I found this site which told me how to convert the key to a compressed WIF.

Here’s one example, I ran the script and got this output:

Private key: ce534f3d1f481f8736c30d866a6b2c5defe5edc36afaafc0e923586791a2462b
Verifiction key: e5ee63efe153ebf1ec537831f2fba227f4b5f80275e750a9d0a8284c9fb4f91fb5427e034ffec25bacc346263f0f6281f951926f924f7c53f771f632ca9e3cbb
Compressed public key: 03e5ee63efe153ebf1ec537831f2fba227f4b5f80275e750a9d0a8284c9fb4f91f
keyhash: 17f022e2c24238760a0a1b070eaa456df4e8b915
Native address: bc1qzlcz9ckzggu8vzs2rvrsa2j9dh6w3wg4atezy6
P2WPKH_V0: 001417f022e2c24238760a0a1b070eaa456df4e8b915
Hashed P2WPKH_VO: b9502db522524782980563a09355fa7052ee7ff1
P2SH_P2WPKH_V0: a9b9502db522524782980563a09355fa7052ee7ff187
Checksum: 7fcb7c1d
Binary address: 05b9502db522524782980563a09355fa7052ee7ff17fcb7c1d
Nested address: 3JarywCp1dbFiykdGNWyo5pdZyvSLEGZ96

I then added my own additional code to convert to WIF.

WIF: 5KP9tSHuzYd1WTCTwr5ewace9eNM8Kv8xjsWYyELHdEkKcQkiUZ
Compressed WIF: L48nE2detzZwEzdbw5dYTuNJy9wDqLVY92DwS7Br8NwgD6S8NiyT

I imported the compressed WIF key into Electrum, but I get 13BaDNdBXkfrGkvJT41HNosBBbbLZRWyZJ as a public key. Everything online confirms that only legacy addresses begin with a ‘1’, but surely it is a SegWit address, no?.

When I view ‘details’, Electrum gives me the correct compressed public key (03e5ee63efe153ebf1ec537831f2fba227f4b5f80275e750a9d0a8284c9fb4f91f).

Why doesn’t Electrum give me a bech32 address or a nested address? Have I done the correct conversion of the private key?

Here’s my code just in case there’s an obvious mistake somehow.

fullkey = '80' + (private_key.hex())
sha256a = hashlib.sha256(binascii.unhexlify(fullkey)).hexdigest()
sha256b = hashlib.sha256(binascii.unhexlify(sha256a)).hexdigest()
WIF = base58.b58encode(binascii.unhexlify(fullkey+sha256b(:8)))

compressedPubKey = private_key.hex()+'01'
compressed_fullkey = '80' + (compressedPubKey)
compressed_sha256a = hashlib.sha256(binascii.unhexlify(compressed_fullkey)).hexdigest()
compressed_sha256b = hashlib.sha256(binascii.unhexlify(compressed_sha256a)).hexdigest()
compressed_WIF = base58.b58encode(binascii.unhexlify(compressed_fullkey+compressed_sha256b(:8)))

giving error "Too many arguments, expected arguments "command"." while installing magento 2.4

gatting error "Too many arguments, expected arguments "command"." while installing magento2.4 through command line.

enter image description here

What is the expected hit chance?

(inspired by this answer)

A cursory look thru the Bestiary has shown values ranging from 12 to 19 (plus level).

Did anyone collect the data, or has seen any guidelines from the creators?

Expected value of occurrences of a variable under a Poisson distribution

I asked a question on this forum recently, to which I got a very thorough answer that I didn’t properly understand. Link to the original question here.

The answer stated:

“If we have N buckets and place M entries in them, the number of elements in each buckets, for large $N, m$, approximately follows (“Poissonization”) a Poisson distribution $P_k= e^{-lambda} frac{lambda^k}{k!}$ with $λ=M/N$.

If we denote $X_i=1$ if the bucket i is empty, 0 otherwise, we have $E(X_i)≈e^{frac{−M}{N}}$

How did they derive $E(X_i)≈e^{frac{−M}{N}}$? I have tried and failed to deduce it myself or find online resources.

Given a random variable whose density is given by a uniform distribution, can we use the expected value to calculate another expected value?

If given a random variable X whose density is given by the following uniform distribution, p(x)=

( begin{cases}
1 & if 0 <x < 40 \
0 & elsewise


the price of x is x^2. Say we wanted to find the expected cost would we integrate like this

$int_{0}^{40} x^2 * p(x) ,dx$

and take our final answer as the result of this or like this?

$int_{0}^{40} x * p(x) ,dx$

and then we would square the latter to get the cost?

They seem very similar yet they yield different results. Can anyone explain what the procedure is here and why?

image – How can people be expected to know about security/privacy issues that are actively silenced or never talked about?

I grew up with computers. I had no life as a kid, and none today. In many ways, I’m a stereotype. I’m now eerily rapidly approaching 40.

Yet it was only in the last 5-7 years or so that I started to understand that all kinds of image and video files, which any sane (or naive?) person would never suspect contains any additional data besides what you can see and hear, actually contain a wealth of personal information.

I’m not “just” talking about the GPS coordinates stuff (which is still so insane to me that I barely believe it), or the tons of unnecessary information that the digicams bake into the file about the camera and its settings, which are not in any way required to display the image file (and could be used to “fingerprint” and thus identify your other photos uploaded anywhere on the Internet, with nothing else connecting them).

There’s also additional layers of madness. I’ve seen Photoshop and other Adobe and non-Adobe applications bake in my PROJECT FILE OBJECT NAMES, LAYER LABELS, FULL LOCAL FILE PATHS, OS USERNAME, etc.

Once I realized this, which was a sheer coincidence, I literally fell back in my chair, thinking about all the times I have uploaded some “quick screenshot” or “doodle” to link people to in public, on IRC and elsewhere. And all those MP4 videos “exported” by Premiere Pro. Yeah… Whoever opened those and studied them could just read my full real name and inspect what I named my layers and objects and tracks and files, and where they were located on my machine. For example, I found this string in the metadata for an MP4 video which I had distributed:

J:video editingMy Full Real NameInternal Project NameFurther Personally Revealing Stringsoriginal file name which was not the same as the one I wanted to distribute.mp4

It’s not an exaggeration to say that I feel violated. No matter how “stupid” I was for not knowing about this, the fact remains that I did not. And I was supposed to be some kind of “computer nerd”. “Normal” people definitely have no idea about this. And I find it exhausting to even try to educate them about it; they just call me “tinfoil hat” or “proper mental” or similar.

And then I read some smug commentator saying things like:

Can you believe it? They didn’t even scrub their user-uploaded images from metadata! What amateurs! Hahahaha!

Of course, if I were making a service now where people could upload images, I would naturally be using some kind of command-line tool to automate the “scrubbing” of their files to protect them, most likely ExifTool (which is still far from perfect). But that’s only because I know about this. My past self, and most people, just do not. How would they?

I seriously ask you: How would they know? I’m suffocated by “noise” constantly, with 99.99% of it being utter nonsense. Finding that 0.01% of actual “real info” is a massive challenge, and you will never hear this being casually brought up. Not even among geeks. They seem to be in denial, or not want to hear about it, except for a very small number of “hackers” (lacking a better term).

probability or statistics – Taylor expansion of expected value of a function with multiple random variables

The expected value of a function of multiple random variables can be approximated by a Taylor expansion. How this can be done in MMA is described in other posts (Link1, Link2).

Let’s assume we have a function of 3 iid normal variables

$f=sqrt{(x_1-x_2)^3+x_3^3}$ with
and are looking for the expectation $mathbb{E}(f)$.

The MMA code for a Taylor expansion of order 2 applying the cited descriptions would look like this:

f = Sqrt((x(1) - x(2))^3 + x(3)^3); (*our function*)
f = f /. x(i_) -> (z(i) - (Mu)(i)) t + (Mu)(i); (*introduce dummy variable t*)
taylor = (Series(f, {t, 0, 2}) // Normal) /. t -> 1 // Expand;
mean = taylor //. z(i_)^2 -> (Sigma)^2 + (Mu)(i)^2;
mean = FullSimplify(mean //. z(i_) -> (Mu)(i))  (*output of 2nd order Taylor approximation*)

What is the reason to make the replacement in the form $z_i^2tosigma^2+mu_i^2$ in the second last line, why is there an addition?

color – Unity – plain material colour darker than expected

I want to add to scene object without textures, only plain material, here is my import flow:

I create object in Sketch and export to SVG:

enter image description here

Then I import SVG to blender (Material do not use nodes, has plain color #96DFE4) and export it to FBX.

Then I import FBX to unity, as you can see material colour is much darker than SVG created:

enter image description here

The only Lighting source I use is Ambient with colour white and Intensity 0.

How to render object with exactly same material colour as SVG? I don’t want any shadows etc, just plain color.

networking – Kuberenetes Node to Node Communication Not working as expected

Hello to All

I do Have problem on My Kubernete Cluster



k8s-w02-prod   Ready    <none>   40d   v1.19.2   <none>        Ubuntu 20.04.1 LTS   5.4.0-54-generic   docker://19.3.8
k8s-m01-prod   Ready    master   40d   v1.19.2    <none>        Ubuntu 20.04.1 LTS   5.4.0-58-generic   docker://19.3.8
k8s-m02-prod   Ready    master   40d   v1.19.2    <none>        Ubuntu 20.04.1 LTS   5.4.0-54-generic   docker://19.3.8
k8s-m03-prod   Ready    master   40d   v1.19.2    <none>        Ubuntu 20.04.1 LTS   5.4.0-54-generic   docker://19.3.8
k8s-w01-prod   Ready    <none>   40d   v1.19.2    <none>        Ubuntu 20.04.1 LTS   5.4.0-54-generic   docker://19.3.8

Cluster Network Plugin
Using Calico

Pod :

Calico process is running.

IPv4 BGP status
| PEER ADDRESS  |     PEER TYPE     | STATE |   SINCE    |    INFO     |
| | node-to-node mesh | up    | 23:37:55   | Established |
|  | node-to-node mesh | up    | 2021-01-04 | Established |
|  | node-to-node mesh | up    | 2021-01-04 | Established |
| | node-to-node mesh | up    | 2021-01-04 | Established |

IPv6 BGP status
No IPv6 peers found.

It Uses Node to Node Mesh


When i run the Simple application for example: ArgoCD

argo-cd-argocd-application-controller-74dd8b79f5-vldhb   1/1     Running   0          14h   k8s-w02-prod   <none>           <none>
argo-cd-argocd-dex-server-5c656d6c6c-shb69               1/1     Running   0          14h   k8s-w02-prod   <none>           <none>
argo-cd-argocd-redis-9757589c5-6w2p6                     1/1     Running   0          14h   k8s-w02-prod   <none>           <none>
argo-cd-argocd-repo-server-774c6856f9-vgmq8              1/1     Running   0          14h    k8s-w02-prod   <none>           <none>
argo-cd-argocd-server-669fc6db5c-x5w4k                   1/1     Running   0          13h   k8s-w01-prod   <none>           <none>

Q) I can not Access the ArgoCD Web UI Bcoz as i see Pods are running on

  • Worker01:k8s-w01-prod
ip route | grep tun via dev tunl0 proto bird onlink via dev tunl0 proto bird onlink via dev tunl0 proto bird onlink via dev tunl0 proto bird onlink 

worker02:k8s-w02-prod via dev tunl0 proto bird onlink via dev tunl0 proto bird onlink via dev tunl0 proto bird onlink via dev tunl0 proto bird onlink 

Runs on Different Subnet

Ping Works Completely OK on both Side

When i Use the Node Selector labels to run pods on selected Node i.e worker01 or worker02 then the issue is solved.

Q) How can i route the Traffic so that the Application ArgoCD WebUI works without any node-node communication problem(Pod can run on any Node and it can communicate each other)

Q) Is it good Idea to use BGP on calico? with out Node-to-Node mesh

Please Advice me how can i fix this issue

Too many arguments, expected arguments "command"

enter image description here

Hi, can anyone help to identify how to fix this? I am installing from a Magento 2.4 Script onto ubuntu 20.04.