Categories
Mastering Development

Terraform dynamically loop over elements in a list and expand based on values

This is a bit hard to describe. So I have a map that looks like this after I’ve simplified it for clarity: server_ip_configs = { mgmt = { ct = “1” } applicationgateway = { ct = “1” } monitor = { ct = “1” } app = { ct = “3” } } What […]

Categories
Mastering Development

3D bar plot with dates, strings and numbers in 3 axes with matplotlib in python

I have three lists as mentioned below. xx = [‘TT’, ‘AN’, ‘AP’, ‘AR’, ‘AS’, ‘BR’, ‘CH’, ‘CT’, ‘DN’, ‘DD’, ‘DL’, ‘GA’, ‘GJ’, ‘HR’, ‘HP’, ‘JK’, ‘JH’, ‘KA’, ‘KL’, ‘LA’, ‘LD’, ‘MP’, ‘MH’, ‘MN’, ‘ML’, ‘MZ’, ‘NL’, ‘OR’, ‘PY’, ‘PB’, ‘RJ’, ‘SK’, ‘TN’, ‘TG’, ‘TR’, ‘UP’, ‘UT’, ‘WB’] yy = [datetime.date(2020, 5, 27), datetime.date(2020, 5, 28), […]

Categories
Artificial Intelligence (AI) Mastering Development

How can I save DDPG model?

I try to save the model using the saver method (I use the save function in the DDPG class to save), but when restoring the model, the result is far from the one I saved (I save the model when the episodic award is zero, the restor method in the code is commented out ) […]

Categories
Artificial Intelligence (AI) Mastering Development

Why does the result when restoring a saved DDPG model differ significantly from the result when saving it?

I save the trained model after a certain number of episodes with the special save() function of the DDPG class (the network is saved when the reward reaches zero), but when I restore the model again using saver.restore(), the network gives out a reward equal to approximately -1800. Why is this happening, maybe I’m doing […]

Categories
Mastering Development

Why some LPeg substitutions don’t show up when there are many levels of captures in an LPeg script?

I am new to StackOverflow and I ended up asking this question after reading everything I could find on the Internet about captures in LPeg. I am learning LPeg and I have successfully built a few programs using captures and text substitutions using C and Cs. However I realize that there is still something escaping […]

Categories
Ask Mathematics

On the works of Hillel Furstenberg and Gregory Margulis

The Norwegian Academy of Science and Letters has decided to award the Abel Prize for 2020 to Hillel Furstenberg (Hebrew University of Jerusalem, Israel), and Gregory Margulis (Yale University, New Haven, CT, USA) for pioneering the use of methods from probability and dynamics in group theory, number theory and combinatorics. Can some one give a […]

Categories
Ask Mathematics

Whether to prove Plane, and Line are Perpendicular, or Parallel or Neither

I have the equation a given plane in the format: $$ax+by+cz+d=0$$ And I have a line in the following format: $$<a,b,c>+t<d,e,f>$$ I have the normal vector that identifies the plane: $$\vec{n}=<a,b,c>$$ I have the vector parallel to the line: $$\vec{v}=<d,e,f>$$ I then take the dot product of the two vectors and get the a non-zero […]

Categories
Mastering Development

how to encrypt and decrypt string with openssl?

Trying to encrypt and decrypt strings with evp functions of openssl. I tried the following source code but I got unexpected results (garbege output). What I am missing? #include <stdio.h> #include <unistd.h> #if 1 #include <openssl/evp.h> char *se_evp_encrypt(char *ssid, char *data, int inl, char *ret, int *rb) { int i, tmp, ol; EVP_CIPHER_CTX evpctx; char […]

Categories
Ask Mathematics

Circumcircle of a square and an arbitrary point inside it; prove: $|A_1B_1|\cdot|C_1D_1|=|A_1D_1|\cdot|B_1C_1|$

Point $T$ is inside the square $ABCD$. Let $A_1,B_1,C_1,D_1$ the other intersection point of the lines $AT,BT,CT,DT$ respectively and the circumcircle of the square $ABCD$. Prove: $$|A_1B_1|\cdot|C_1D_1|=|A_1D_1|\cdot|B_1C_1|$$ My attempt: I was looking for the inscribed angles of the same measure: $$\measuredangle ABB_1=\measuredangle AA_1B_1\;\&\;\measuredangle BTA=\measuredangle B_1TA_1\implies\;\Delta ABT\;{\sim}\;\Delta A_1B_1T$$ Analogously: $$\Delta TAD_1{\sim}\Delta TA_1D$$$$\;\Delta C_1D_1T\;{\sim}\Delta CDT$$$$\Delta D_1A_1T{\sim}\Delta DAT$$$$\Delta […]

Categories
Ask Mathematics

Circumcircle of a square and an arbitrary point inside it

Point $T$ is inside the square $ABCD$. Let $A_1,B_1,C_1,D_1$ the other intersection point of the lines $AT,BT,CT,DT$ respectively and the circumcircle of the square $ABCD$. Prove: $$|A_1B_1|\cdot|C_1D_1|=|A_1D_1|\cdot|B_1C_1|$$ My attempt: I was looking for the inscribed angles of the same measure: $$\measuredangle ABB_1=\measuredangle AA_1B_1\;\&\;\measuredangle BTA=\measuredangle B_1TA_1\implies\;\Delta ABT\;{\sim}\;\Delta A_1B_1T$$ Analogously: $$\Delta TAD_1{\sim}\Delta TA_1D$$$$\;\Delta C_1D_1T\;{\sim}\Delta CDT$$$$\Delta D_1A_1T{\sim}\Delta DAT$$$$\Delta […]