text
stringlengths
1
1.11k
source
dict
b) This one I'm more confident in. Number of possible out comes is still $6^5$, with us having one less option with each roll. $(6*5*4*3*2)/6^5$ • For (a), you are assuming that the first three dice are the same. This is not usually what is meant by "getting" three dice of one face and two of a second. For example, we want to include cases like 12121 and 11221, not just 11122. Do you see how to count those cases? – Matthew Conroy Feb 8 '18 at 4:46 • Three answers with three different results...lol its obvious probability is not a science not a clear one at least lol – Isham Feb 8 '18 at 5:41 • Yeah, counting problems always kick my ass because the you can get 3 different answers that are all absolutely correct. – Skulloking Feb 8 '18 at 5:58
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9833429624315189, "lm_q1q2_score": 0.8257464953132188, "lm_q2_score": 0.8397339756938818, "openwebmath_perplexity": 246.7835006370776, "openwebmath_score": 0.5996065735816956, "tags": null, "url": "https://math.stackexchange.com/questions/2641283/we-roll-five-six-sided-dice-what-is-the-probability-that-we-get-a-three-dice-of" }
of the equivalent nodes, any choice leads to representants from the same isomrphism classes. Discrete math. For$n$at most 6, I believe that after having chosen the number of vertices and the number of edges, and ordered the vertex labels non-decreasingly by degree as you suggest, then there will be very few possible isomorphism classes. 1 0 obj << https://www.gatevidyalay.com/tag/non-isomorphic-graphs-with-6-vertices /Length 1292 289-294 But perhaps I am mistaken to conflate the OPs question with these three papers ? Where does the law of conservation of momentum apply? 3 0 obj << If the sum of degrees is odd, they will never form a graph. /Filter /FlateDecode We know that a tree (connected by definition) with 5 vertices has to have 4 edges. /Filter /FlateDecode Answer. endstream Some ideas: "On the succinct representation of graphs", Two graphs with different degree sequences cannot be isomorphic. If you could enumerate those canonical representatives, then it seems that would solve
{ "domain": "helicehelas.com", "id": null, "lm_label": "1. Yes\n2. Yes\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9693242009478238, "lm_q1q2_score": 0.8160019747828126, "lm_q2_score": 0.8418256492357358, "openwebmath_perplexity": 710.2381753349516, "openwebmath_score": 0.6111965775489807, "tags": null, "url": "http://www.helicehelas.com/rqn4h5e/non-isomorphic-graphs-with-5-vertices-86d375" }
$E(X|Y)$ is expected value of values of $X$ given values of $Y$ $E(X|Y=y)$ is expected value of $X$ given the value of $Y$ is $y$ Generally $P(X|Y)$ is probability of values $X$ given values $Y$, but you can get more precise and say $P(X=x|Y=y)$, i.e. probability of value $x$ from all $X$'s given the $y$'th value of $Y$'s. The difference is that in the first case it is about "values of" and in the second you consider a certain value. You could find the diagram below helpful. • This answer discusses probability, while the question asks about expectation. What is the connection? – whuber Oct 13 '14 at 17:35
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9843363503693294, "lm_q1q2_score": 0.8070508204631498, "lm_q2_score": 0.8198933425148214, "openwebmath_perplexity": 124.2927184405033, "openwebmath_score": 0.9056355953216553, "tags": null, "url": "https://stats.stackexchange.com/questions/118578/what-is-the-difference-between-exy-and-exy-y/118617" }
python, python-3.x, gui, raspberry-pi v=(0.82+(33.32*giri_1s))/100 return v elif mulinello=='50': if giri_1s<1.74: v=(1.23+(24.73*giri_1s))/100 return v else: v=(-0.42+(25.68*giri_1s))/100 return v elif mulinello=='30': if giri_1s<1.16: v=(1.90+(10.57*giri_1s))/100 return v else: v=(2.26+(10.26*giri_1s))/100 return v def conta_giri(self,temp_mis): """print(temp_mis) giri=input('Inserire numero di giri') # use this if from computer so you don't have to use raspberry function t_fine = time.time()+temp_mis print(t_fine) return giri""" GPIO.setmode(GPIO.BOARD) #input from raspberry of the rotations GPIO.setup(32,GPIO.IN)
{ "domain": "codereview.stackexchange", "id": 30086, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, gui, raspberry-pi", "url": null }
qiskit, circuit-construction, transpile Title: Questions on multi-controlled Toffolis and their implementation in Qiskit Is it possible to decompose an $n$-controlled Toffoli into $O(n)$ CNOTs without extra working qubits? If so, is such an decomposition currently available in Qiskit or any other (preferably Python and QASM-friendly) packages? If not: Has such an impossibility been proven? Is any decomposition into $O(n)$ CNOTs available in Qiskit or any other (preferably Python and QASM-friendly) packages? In 2022, neither 2 nor 4 haven't apparently been implemented yet in Qiskit, see "Implemented by Qiskit:" here. UPDATE Using the following tket code (suggested in the answer below) import qiskit from pytket.extensions.qiskit import qiskit_to_tk, tk_to_qiskit import matplotlib.pyplot as plt import numpy as np import pytket.transform as tkt
{ "domain": "quantumcomputing.stackexchange", "id": 5328, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "qiskit, circuit-construction, transpile", "url": null }
theoretical-chemistry, density-functional-theory, td-dft Derivation of individual CIS densities Here is the derivation of the transition density for doubly-occupied spin-restricted MOs, with quoted blocks and equations directly taken from the original CIS paper. The CIS approximation is identical to the TDA approximation in TD-DFT. Full TD-HF or TD-DFT follows the RPA equations, which include deexcitation terms in addition to excitation terms. The equations would be different for RPA, but conclusion would be identical. The standard indexing convention is followed: $\mu, \nu, \lambda, \sigma$ for AOs, $i,j,k,l$ for occupied MOs, $a,b,c,d$ for virtual MOs, and $p,q,r,s$ for any MO. Define the Hartree-Fock (or SCF-type, valid for DFT as well) density as a sum over occupied MOs: $$ P_{\mu\nu}^{\mathrm{HF}} = \sum_{i=1}^{n} c_{\mu i} c_{\nu i} $$
{ "domain": "chemistry.stackexchange", "id": 8334, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "theoretical-chemistry, density-functional-theory, td-dft", "url": null }
Suppose that the recursive routine requires $c_n$ calls of $F_1$ to evaluate $F_n$. Clearly $c_0=0$ and $c_1=1$. For $n>1$ we have $F_n=F_{n-1}+F_{n-2}$, where evaluating $F_{n-1}$ requirse $c_{n-1}$ calls of $F_1$, and evaluating $F_{n-2}$ requirse $c_{n-2}$ calls of $F_1$. Thus, evaluation of $F_n$ will require $c_{n-1}+c_{n-2}$ calls of $F_1$, and we must have $c_n=c_{n-1}+c_{n-2}$ for all $n\ge2$. But all of this just says that the sequence $\langle c_n:n\ge 0\rangle$ satisfies the same recurrence and has the same initial values as the Fibonacci sequence $\langle F_n:n\ge 0\rangle$, so it must be the same sequence: $c_n=F_n$ for all $n\ge 0$. Unwrap it: $$F[4]$$ $$= F[3] + F[2]$$ $$= F[2] + F[1] + F[1] + F[0]$$ $$= F[1]+F[0]+ F[1] + F[1] + F[0]$$ $$= 3F[1]+2F[0]$$ So, it gets called three times.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631663220389, "lm_q1q2_score": 0.8132188825942233, "lm_q2_score": 0.824461932846258, "openwebmath_perplexity": 140.97722586218057, "openwebmath_score": 0.8619639277458191, "tags": null, "url": "https://math.stackexchange.com/questions/442450/suppose-that-a-recursive-routine-were-invoked-to-calculate-f4-how-many-times" }
c++, object-oriented, numerical-methods, factory-method using namespace std; double func(double x) { return sqrt(x) * exp(-x); } int main() { cout << "Choose method:\n" << "Midpoint numeric quadrature -----> (1)\n" << "Trapezoidal numeric quadrature --> (2)\n" << "Simpson's numeric quadrature ----> (3)\n" << endl; // //user input code: // int choice; // cin >> choice; // while (choice < 1 || choice > 3) { // cout << "Pick again a number from 1 to 3\n"; // cin >> choice; // } NewtonCotesFactory creator; // alternative to user input, print all results at once: for (int choice : {1,2,3}) { NewtonCotesFormulas* rule = creator.createQuadrature(choice, 1, 3, 0.000001); double result = rule->printConvergenceValues(4, &func); cout << "Final result within tolerance: " << result << endl << endl; delete rule; } return 0; } NewtonCotesFormulas.h: #ifndef NEWTONCOTESFORMULAS_H_INCLUDED #define NEWTONCOTESFORMULAS_H_INCLUDED #include <string>
{ "domain": "codereview.stackexchange", "id": 42460, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, object-oriented, numerical-methods, factory-method", "url": null }
electromagnetism, forces, electrostatics, coulombs-law Note that since two of the charges have a positive charge and one has a negative charge, the point where the forces cancel out is on the line of symmetry, and outside of the triangle. By symmetry, the horizontal components of force cancel. The vertical components sum to zero; this means that $$0 = \frac{Q}{\left(d\sqrt{3}/2+h\right)^2} - 2\cdot \frac{Q}{\left(\frac{h}{\sin\alpha}\right)^2}\sin\alpha$$ A bit of rearranging turns this into an expression in $h$ and $\sin^3\alpha$: $$\sin^3\alpha = \frac{h^2}{2(d\sqrt{3}/2+h)^2}$$ Noting that $\sin\alpha = \frac{h}{\sqrt{h^2 + d^2/4}}$ this reduces to an (ugly) expression in h, which can be solved numerically. Does this help? Note that if you make $h$ go negative, the two green forces start pointing up, and you would find another solution above the negative charge (where the red force points down). Since the way I formulated the force only involves $h^2$, you need to do a bit of work to find the other solution. I leave that up to you.
{ "domain": "physics.stackexchange", "id": 40753, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, forces, electrostatics, coulombs-law", "url": null }
From this, we can conclude, for instance, that the probability of a sum of $10$ when rolling $3$ times (or rolling once with three identical copies of this die) is $\frac{36}{343}.$ (Using Bruce's example, we get $P^3=\frac{1}{64} x^{18} + \frac{3}{64} x^{17} + \frac{3}{32} x^{16} + \frac{1}{8} x^{15} + \frac{9}{64} x^{14} + \frac{9}{64} x^{13} + \frac{25}{192} x^{12} + \frac{7}{64} x^{11} + \frac{5}{64} x^{10} + \frac{91}{1728} x^9 + \frac{19}{576} x^8 + \frac{11}{576} x^7 + \frac{1}{108} x^6 + \frac{1}{288} x^5 + \frac{1}{576} x^4 + \frac{1}{1728} x^3$, and so the probability of $10$ is $\frac{5}{64}=0.078125$ (exactly).)
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9755769149165089, "lm_q1q2_score": 0.83866810783422, "lm_q2_score": 0.8596637487122112, "openwebmath_perplexity": 409.9559143489513, "openwebmath_score": 0.6409322619438171, "tags": null, "url": "https://math.stackexchange.com/questions/1646101/distribution-of-the-sum-of-n-loaded-dice-rolls?noredirect=1" }
• Like you say, it fixes the upper and lower half-planes (as sets, not pointwise). Also, we can think of Mobius transformations as continuous maps from the Riemann sphere, $\Bbb C \cup \{\infty\}$ to itself, so there's no issue with continuity here. Jul 1 '15 at 3:37 • Sure, for any region $A$ we can ask what the region $f(A)$ is, and it happens that our particular map $f$ maps deveral familiar regions to other familiar regions. Note that this lets us conclude, e.g., that the first quadrant is mapped the the upper half of the unit disk. Jul 1 '15 at 3:55 • You're welcome, I'm glad you found it useful, and you too. Jul 1 '15 at 4:57
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9863631619124993, "lm_q1q2_score": 0.8516176749153154, "lm_q2_score": 0.8633916064586998, "openwebmath_perplexity": 220.90075111509103, "openwebmath_score": 0.9141293168067932, "tags": null, "url": "https://math.stackexchange.com/questions/1345331/where-do-these-mobius-transformations-map-the-coordinate-half-planes" }
ros, vslam, g2o Comment by Eric Perko on 2012-07-19: No idea. You may want to email one of people working on that Github for more info. Comment by aamir on 2015-01-08: Hi jcm76, Did you ever get an answer regarding this? Thanks! This seems to have been removed from the current development versions of g2o here: https://github.com/RainerKuemmerle/g2o so perhaps there are bugs with the version of g2o ROS is using?
{ "domain": "robotics.stackexchange", "id": 10258, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, vslam, g2o", "url": null }
redox, biochemistry Oxygen Depletion The fire isn't the only source of oxygen depletion, also the humans inhabiting the small space will use oxygen. Using this data, an average adult human being will consume $22.5~\mathrm{mol}$ $\ce{O2}$ per day. So we'll round this to $70~\mathrm{mol\, d^{-1}}$ for the whole family (2 adults, 2 kids). This is already corrected for oxygen exhalation, so the system generates an equal amount of $\ce{CO2}$. Total Oxygen Balance and Required Heat The only source of oxygen is the pail above the fire, in which the solid oxygen gets heated up to the boiling point (which, at 20 kPa is 77.1 K, see figure below; data source: NIST) and then further to ambient temperature.
{ "domain": "chemistry.stackexchange", "id": 878, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "redox, biochemistry", "url": null }
Question: Is there a system for the Galois Group and the Intermediat Fields? Whereas all of this makes sense to me, I still feel that I have no method for determining the structure of the subgroups of the Galois Group, and also that I have no particular system for finding the generators $\sqrt 6,\sqrt 3$ and $\sqrt 2$ for the intermediate fields. It took me some minutes to figure out $\sqrt 6$ in particular. Is there any nice and systematic way to deal with this. In particular for slightly more complex examples such as $\Q(\sqrt[4] 3,i)\supset\Q$ for instance.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9884918529698321, "lm_q1q2_score": 0.817197875303099, "lm_q2_score": 0.8267117962054049, "openwebmath_perplexity": 190.22740751905314, "openwebmath_score": 0.7341055274009705, "tags": null, "url": "https://math.stackexchange.com/questions/644131/systematically-describing-the-galois-group-and-intermediate-fields" }
human-biology, evolution Humans are off the charts in the amount of resources we invest in our children - our lives are 1/4 to 1/3 over before we sometimes leave our parents household (in some societies of course they never leave the house, but step into an extended family). This may be one of the reasons we are so successful as a species - we live in practically every place we possibly could and have no danger of competition from any other living thing excepting ourselves. The grandmother effect is essentially the idea that if women, who are more attached to the offspring in more cases than fathers, continue to live and help support the grandchildren and make them more successful, then this will allow post menopausal women to have a longer lifespan (which they do).
{ "domain": "biology.stackexchange", "id": 1057, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, evolution", "url": null }
The figure shows a histogram of $10,000$ simulated values of $X$ where $F$ is an Exponential$(1)$ distribution. On it is superimposed in red the graph of $g$. It fits beautifully. The R code that produced this simulation follows. set.seed(17) n.sim <- 1e4 n <- 9 x <- matrix(rexp(n.sim*n), n) X <- pmax(pmin(x[1,], x[2,], x[3,]), pmin(x[1,], x[4,], x[5,]), pmin(x[5,], x[6,], x[7,]), pmin(x[3,], x[6,], x[8,])) f <- function(x, p) { n <- length(p) y <- outer(1:n, x, function(k, x) { pexp(x)^(k-1) * pexp(x, lower.tail=FALSE)^(n-k) * dexp(x) * p[k] / (factorial(k-1) * factorial(n-k)) }) colSums(y) } hist(X, freq=FALSE) curve(f(x, p), add=TRUE, lwd=2, col="Red")
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9702399060540358, "lm_q1q2_score": 0.8265986065442061, "lm_q2_score": 0.8519528019683106, "openwebmath_perplexity": 999.159082927815, "openwebmath_score": 0.9990919828414917, "tags": null, "url": "https://stats.stackexchange.com/questions/225867/pdf-cdf-of-max-min-type-random-variable" }
We can be certain of this interpretation on grounds of mathematical culture: Thanks to the double-angle formulas for the circular functions and the chain rule, the substitution $u = \tan(x/2)$, or $x = 2\arctan u$, gives $$\cos x = \frac{1 - u^{2}}{1 + u^{2}},\qquad \sin x = \frac{2u}{1 + u^{2}},\qquad dx = \frac{2\, du}{1 + u^{2}}.$$ Consequently, $$\int R(\cos x, \sin x)\, dx = \int R\left(\frac{1 - u^{2}}{1 + u^{2}}, \frac{2u}{1 + u^{2}}\right) \frac{2\, du}{1 + u^{2}},$$ a rational function in $u$. The significance is, every rational function in one variable has an elementary primitive (antiderivative). • This is exactly what I expected the answer to be like – Navaro May 4 '16 at 14:06
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9688561685659695, "lm_q1q2_score": 0.8009648171751158, "lm_q2_score": 0.8267117898012104, "openwebmath_perplexity": 199.0198342965936, "openwebmath_score": 0.8785197138786316, "tags": null, "url": "https://math.stackexchange.com/questions/1771125/what-does-it-mean-the-notation-intr-left-cosx-sinx-right-mathrmdx" }
python, beginner, parsing, bioinformatics def main(): filename = sys.argv[1] data = list(SeqIO.parse(filename, "fasta")) header_keys = numpy.array([parse_id(datum.id) for datum in data]) maxit, maxpop, maxind = header_keys.max(axis=0) + 1 maxsite = len(data[0].seq) sequences = numpy.full((maxit, maxpop, maxind, maxsite), '\0', dtype="S") for header_key, sequence in zip(header_keys, data): sequences[tuple(header_key)] = sequence # Calculate frequencies pA = (sequences == "A").mean(axis=-2) pT = (sequences == "T").mean(axis=-2) pC = (sequences == "C").mean(axis=-2) pG = (sequences == "G").mean(axis=-2) print(pA) print(pC) print(pG) print(pT) main()
{ "domain": "codereview.stackexchange", "id": 14402, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, parsing, bioinformatics", "url": null }
c++, sudoku Title: Simple Sudoku Solver i have made a simple sudoku solver which is a puzzle game where the player has to figure out the empty cell and checks which numbers are absent from the corresponding row, column. how can I improve it further? #include <iostream> int isAvailable(int puzzle[][9], int row, int col, int num) { for (int i = 0; i<9; ++i) { if (puzzle[row][i] == num) return 0; if (puzzle[i][col] == num) return 0; } return 1; }
{ "domain": "codereview.stackexchange", "id": 30540, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, sudoku", "url": null }
electromagnetism, electrostatics, gauss-law, maxwell-equations, coulombs-law Title: Why is the divergence of electric field equal to $\rho \over \epsilon_0$ in electrodynamics? These two equations are true in electrostatics/magnetostatics: $$\nabla \cdot \vec{E}= {\rho \over \epsilon_0},$$ $$\nabla \cdot \vec{B}=0.$$ I have learned that they are also true in electrodynamics. But I did not manage to find a convincing proof to why they are also true in electrodynamics. Intuitively, I thought that the divergence of $\vec{E}$ and $\vec{B}$ in electrodynamics should not be the same as that in electrostatics. In electrodynamics, beside the static charge producing a $\vec{E}$ field, the changing magnetic field also produces an additional contribution to the $\vec{E}$ field. Why then should the $\nabla \cdot \vec{E}$ still be zero, when it is initially derived for only the $\vec{E}$ field of the static charge?
{ "domain": "physics.stackexchange", "id": 52752, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "electromagnetism, electrostatics, gauss-law, maxwell-equations, coulombs-law", "url": null }
gazebo, ros-kinetic Title: Adding Moving obstacle How do I integrate the animated box from gazebo with ROS? It is bit unclear on how to launch it along with my Robot. Thanks ! Originally posted by pmuthu2s on ROS Answers with karma: 224 on 2019-01-22 Post score: 0 Hey guys, The best bet for adding moving obstacles will be to use the message gazebo/set_model_state Incase, if you need a much more elaborate code for moving obstacles, Checkout this turtlebot_3_machine_learning_moving_obstacles Thanks ! Originally posted by pmuthu2s with karma: 224 on 2019-01-24 This answer was ACCEPTED on the original site Post score: 0
{ "domain": "robotics.stackexchange", "id": 32307, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, ros-kinetic", "url": null }
genetics, evolution, natural-selection, gene, molecular-evolution Title: What are the implications/predictions of the selfish gene theory? Are there any testable predictions or implications of the selfish gene theory? Or it is just interesting interpretation of the observations/experimental data? If this theory is not falsifiable and doesn't generate any predictions, how can it be helpful anyway? The Selfish Gene theory "can be defined as the idea that the gene is the ultimate beneficiary of selection". Argren, in Selfish genetic elements and the gene’s-eye view of evolution lays out the history of the theory and the arguments for and against it.
{ "domain": "biology.stackexchange", "id": 10218, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "genetics, evolution, natural-selection, gene, molecular-evolution", "url": null }
mechanical-engineering, applied-mechanics, dynamics for rope wrapped around pulley 1 $$L_1 = x_1 + P_2$$ for rope wrapped around pulley 2 $$L_2 = (x_1 - P_2) + (P_3-P_2)$$ for rope wrapped around pulley 3 $$ L_3 = (x_1 - P_3) + (X_2 - P_3)$$ From those relationships you get: $$\begin{cases} P_2 = L_1 - x_1\\ P_3 = L_2 - x_1 +2 P_2 \\ L_3 = x_1 + x_2 - 2 P_3 \end{cases} \rightarrow \begin{cases} P_2 = L_1 - x_1\\ P_3 = L_2 - x_1 +2 (L_1 - x_1) \\ L_3 = x_1 + x_2 - 2 P_3 \end{cases} \Rightarrow \begin{cases} P_2 = L_1 - x_1\\ P_3 = L_2 +2 L_1 - 3 x_1 \\ L_3 = x_1 + x_2 - 2 (L_2 +2 L_1 - 3 x_1) \end{cases} $$ The final equation is what you want: $$L_3 = x_1 + x_2 - 2 (L_2 +2 L_1 - 3 x_1)$$ $$L_3 = x_1 + x_2 - 2 L_2 -4 L_1 + 6 x_1$$ $$L_3 + 2 L_2 + 4 L_1 = 7x_1 + x_2 $$ By differentiating with respect to time twice you get $$0 = 7\ddot{x}_1 + \ddot{x}_2 $$ $$0 = 7a_1 + a_2 $$ Additionally there should be a way to obtain this by the energies. Probably by obtaining the equations of motion through langrange's method.
{ "domain": "engineering.stackexchange", "id": 4036, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, applied-mechanics, dynamics", "url": null }
java, algorithm, programming-challenge Title: Dijkstra's Algorithm in Project Euler# 83: Path sum: four ways The problem is from here: The page at Wikipedia said:
{ "domain": "codereview.stackexchange", "id": 14064, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, algorithm, programming-challenge", "url": null }
gazebo, pcl, cmake -- Found ROS package roscpp_traits path: /home/TheLegace/ros/ros_comm/clients/cpp/roscpp_traits -- Found ROS package roscpp path: /home/TheLegace/ros/ros_comm/clients/cpp/roscpp -- Found ROS package rosconsole path: /home/TheLegace/ros/ros_comm/tools/rosconsole -- Found ROS package std_msgs path: /home/TheLegace/ros/ros_comm/messages/std_msgs -- Found ROS package rosbag path: /home/TheLegace/ros/ros_comm/tools/rosbag -- Found ROS package topic_tools path: /home/TheLegace/ros/ros_comm/tools/topic_tools -- Found ROS package pcl path: /home/TheLegace/ros/perception_pcl/pcl
{ "domain": "robotics.stackexchange", "id": 8187, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "gazebo, pcl, cmake", "url": null }
classification, tensorflow, keras, objective-functions, regression Title: TF Keras: How to turn this probability-based classifier into single-output-neuron label-based classifier Here's a simple image classifier implemented in TensorFlow Keras (right click to open in new tab): https://colab.research.google.com/github/tensorflow/docs/blob/master/site/en/tutorials/quickstart/advanced.ipynb I altered it a bit to fit with my 2-class dataset. And the output layer is: Dense(2, activation=tf.nn.softmax); The loss function and optimiser are still the same as in the example in the link above. loss_fn = tf.losses.SparseCategoricalCrossentropy(); optimizer = tf.optimizers.Adam(); I wish to turn it into a classifier with single output neuron as I have only 2 classes in dataset, and sigmoid does the 2 classes good. Tried some combinations of output activation functions + loss functions + optimisers, but the network doesn't work any more (ie. it doesn't converge). For example, this doesn't work: //output layer Dense(1, activation=tf.sigmoid);
{ "domain": "ai.stackexchange", "id": 1414, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "classification, tensorflow, keras, objective-functions, regression", "url": null }
navier-stokes Title: Fluid dynamics equations, number of variables and number of equations Continuity and Navier-Stokes equation for fluid are, \begin{eqnarray} \frac{\partial \rho}{\partial t} + \nabla\cdot (\rho \mathbf{u}) &=& 0 \\ \rho\left(\frac{\partial \mathbf{u}}{\partial t} + \mathbf{u}\cdot \nabla u \right) &=& -\nabla p + \nabla \cdot\sigma + \mathbf{{F}_{ext}}, \end{eqnarray} where letters have the usual meaning. In total we have 4 equations (one continuity equation and 3 momentum balance components of Navier-Stokes) available and number of unknowns are 5 (pressure+ density, 3 velocity components). How can we then determine all the 5 variables in general? The missing equation is energy conservation $$ \frac{\partial}{\partial t} {\cal E} + \vec\nabla \cdot\vec\jmath^{\,\cal E}=0 $$ where ${\cal E}$ is the energy density and $\vec\jmath^{\,\cal E}$ is the energy current $$ \vec\jmath^{\,\cal E} = \vec{u}\left[ {\cal E}+P \right] -\eta u\cdot\sigma-\kappa\vec\nabla T\, . $$
{ "domain": "physics.stackexchange", "id": 63295, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navier-stokes", "url": null }
clojure but since conj nil :x returns a list rather than a set, this leads to duplicate reservations which I want to prevent. What is the most idiomatic fix to my problem? PS: if anyone can come up with a more expressive question title, I'll thankfully accept the edit! edit: here's a simple usage example for experimentation: (defrecord Resource [name]) (defrecord Reservation [^Resource resource user]) (def car (->Resource "car")) (def my-res (->Reservation car "me")) (def your-res (->Reservation car "you")) (place-reservation my-res) (place-reservation your-res) (place-reservation my-res) ;; duplicate reservation must not change anything
{ "domain": "codereview.stackexchange", "id": 20496, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "clojure", "url": null }
thermodynamics, heat $$\begin{array}{lr} \hline \text{Species} & ΔH_\mathrm f^\circ/\pu{kJ mol-1} \\ \hline \ce{OH-} & -229.99 \\ \ce{H+} & 0.00 \\ \ce{H2O} & -288.83 \\ \hline \end{array}$$ Thus, the change in enthalpy for the reaction is: $$\Delta H^\circ = -288.83\ \mathrm{kJ/mol} - (-229.99\ \mathrm{kJ/mol}+0\ \mathrm{kJ/mol}) = -58.84\ \mathrm{kJ/mol}$$ Therefore, for $1\ \mathrm{mol}$ of $\ce{NaOH}$ + $1\ \mathrm{mol}$ of $\ce{HCl}$, you get $58.84\ \mathrm{kJ}$ of heat. Say you want to release enough heat to get the net solution up to $100\ \mathrm{^\circ C}$. Water has a heat capacity of $4.18\ \mathrm{J/(g\ ^\circ C)}$. Say you have $1\ \mathrm L$ of $\ce{NaOH}$ + $1\ \mathrm L$ of $\ce{HCl}$, you'll need enough heat to raise the temperature of $2\ \mathrm L$ of water to $100\ \mathrm{^\circ C}$. I'll assume the water starts off at $25\ \mathrm{^\circ C}$, so you have $2\,000\ \mathrm g$ and $75\ \mathrm{^\circ C}$ to go.
{ "domain": "chemistry.stackexchange", "id": 7043, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, heat", "url": null }
java, multithreading, networking, socket } and the Test Class: /* User: koray@tugay.biz Date: 21/02/15 Time: 21:18 */ import java.io.IOException; public class MyTestClass { public static void main(String[] args) throws IOException { MyConnectionAccepter myConnectionAccepter = new MyConnectionAccepter(); myConnectionAccepter.start(); } } My goal was to allow 2 connection at any time. So I can connect from Terminal like this: Korays-MacBook-Pro:~ koraytugay$ telnet localhost 8888 Trying ::1... Connected to localhost. Escape character is '^]'. But a new Thread will not be created, an available Thread will popped from the Stack and that will be used. If no Threads are available in the pool, the new connection will simply need to wait until some other connection closes. Closing a connection does not stop a Thread, it only makes it free. Any review is welcome from any aspect. Generic code review This is know as a busy loop: while(socket == null) { }
{ "domain": "codereview.stackexchange", "id": 12260, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, multithreading, networking, socket", "url": null }
dh-parameters, frame My question is: From Frame $\{1\}$ to Frame $\{2\}$, what are joint distances $a$ and $d$? The best answer I could get was 0. But obviously it should be zero for one axis and $a_1$ for the other. What's wrong? I have read a similar question here. But the answer points me to another method which is impossible for me. Edit: No matter I put $a_1$ in $a$ $$(\alpha,a,d,\theta)=(-90^\circ,a_1,0,\theta_2-90^\circ)$$ or in $d$ $$(\alpha,a,d,\theta)=(-90^\circ,0,a_1,\theta_2-90^\circ)$$ The joint distance $a_1$ does not appear in $z$. What it gave out is $$\left( \begin{array}{cccc} \sin{\theta_2} & \cos{\theta_2} & 0 & a_1 \\ 0 & 0 & 1 & 0 \\ \cos{\theta_2} & -\sin{\theta_2} & 0 & 0 \\ 0 & 0 & 0 & 1 \end{array}\right) \text{ or } \left( \begin{array}{cccc} \sin{\theta_2} & \cos{\theta_2} & 0 & 0 \\ 0 & 0 & 1 & a_1\\ \cos{\theta_2} & -\sin{\theta_2} & 0 & 0 \\ 0 & 0 & 0 & 1 \end{array}\right)$$
{ "domain": "robotics.stackexchange", "id": 1193, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "dh-parameters, frame", "url": null }
statistical-mechanics, probability, non-linear-systems Mathematically, this means writing down or storing their positions to increasing degrees of numerical accuracy, manifesting as more digits to be stored in "memory" of any such system making such a prediction. To be able to use the laws of physics to predict the future in its entirety (as in Laplace's Demon), you require infinite precision, and therefore infinite amount of "memory" (in some abstract sense), which is not possible, given the universe is finite and the smallest thing that can serve as a quantum of information is a fundamental particle. "Therefore," there is structurally no way physics can be used to predict the future entirely correctly, and thus no way for any model of the universe to be deterministically correct. This was the thrust of his argument, and then he mentioned off-hand this suggests we have free will (I do not think that implication holds), which I found interesting.
{ "domain": "physics.stackexchange", "id": 80284, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "statistical-mechanics, probability, non-linear-systems", "url": null }
lagrangian-formalism, differential-geometry, gauge-theory, notation, yang-mills $$ (\star A)_{\mu_1 \cdots \mu_{d-p}} \equiv \frac{1}{p!} \epsilon_{\mu_1 \cdots \mu_{d-p} \nu_1 \cdots \nu_p} A^{\nu_1 \cdots \nu_p} . $$ The normalization $1/p!$ is a user-dependent convention so different books use different choices. $\epsilon$ is the volume $d$-form. It is a completely antisymmetric $(0,d)$ tensor with $$ \epsilon_{01\cdots(d-1)} = \sqrt{|g|} . $$ This along with complete antisymmetry uniquely specifies $\epsilon$. The wedge product $\wedge$ is a exterior product on forms. The wedge product of a $p$-form and a $q$-form is a $p+q$ form whose components are given by $$ ( A \wedge B )_{\mu_1 \cdots \mu_{p+q} } \equiv \frac{(p+q)!}{p!q!} A_{[\mu_1 \cdots \mu_p} B_{\mu_{p+1} \cdots \mu_{p+q} ] } . $$ where the square brackets $[\cdots]$ denotes the weighted antisymmetrization. Finally, we note that up to a normalization, there is a unique $d$-form, namely the volume form. So any $d$ form $X$ can be written as $$
{ "domain": "physics.stackexchange", "id": 93671, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lagrangian-formalism, differential-geometry, gauge-theory, notation, yang-mills", "url": null }
climate-change, geography, rivers, rainfall, agriculture Title: Would the Climate change in Southern Africa by Filling Lake Makgadikgadi Evaporation Pans with water from the Zambezi and Chobe Rivers? I have Macro question, and have enquired and discussed this topic with numerous people. My background is more in Economics and Finance, and read a very interesting article if I am not mistaken 10-15 years ago in the Farmers weekly of a WITS (Witwatersrand University Johannesburg) Geography professor who did a study in +-1905. Much of the article had to do with energy and the amount of energy used for cloud formation and movement from the Coast into the central parts of Southern Africa. Energy at the time I assume was a "buzz topic" as Electricity was in its early stage. The Professor had, among others, identified a location on the Zambezi River where the Zambezi and Chobe rivers meet +-40km upriver from the Victoria Falls, I assume close to the newly built Kazungula Bridge?
{ "domain": "earthscience.stackexchange", "id": 2475, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "climate-change, geography, rivers, rainfall, agriculture", "url": null }
power-engineering, wind-power Title: Advantages/Disadvantages of two-bladed windmill? The vast majority of wind turbines I have ever seen feature 3 blades, as shown here: Recently while driving through western new York state, however, I passed by several turbines featuring only two blades, as shown here:
{ "domain": "engineering.stackexchange", "id": 960, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "power-engineering, wind-power", "url": null }
If the quadrilateral is ABCD--that is, if AC and BD are its diagonals--then the quadrilateral has perpendicular diagonals, so its area is half the product of the lengths of the diagonals (which you can find from the coordinates of A, B, C, and D). - Making Weltschmerz's answer explicit, and very much related to Isaac's answer: note that the quadrilateral can be split into two triangles. The area of one triangle is half the product of the length of $\overline{BD}$ (the base) and half the length of $\overline{AC}$ (the height). Doubling that gives an area expression that is exactly what Isaac stated. As for computing the coordinates of $B$ and $D$, here's a twofer method: once you can compute the equation of the line from the point-slope form, transform the equation you have into the "two-intercept" form $\frac{x}{a}+\frac{y}{b}=1$ whence your x- and y-intercepts are (a,0) and (0,b). -
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9763105314577313, "lm_q1q2_score": 0.8156913821326103, "lm_q2_score": 0.8354835432479661, "openwebmath_perplexity": 852.3308340196612, "openwebmath_score": 0.7587332725524902, "tags": null, "url": "http://math.stackexchange.com/questions/4942/area-of-a-quadrilateral/4981" }
mobile-robot, torque, gearing Title: What is the torque transmission efficiency using a bycicle chain/setup for robot? For this robot the gear attached to the motor is linked to the gear attached to the wheels by a bicycle chain (I am using a bicycle wheel and transmission set as the parts for the robots movements). How does using a bicycle chain affect the power transmission efficiency, how does this impact the torque? I agree with @Andy 's answer, that chain efficiency is over 90%. I'll point out that your terminology is not quite right - using bicycle chain (or any other transmission) affects power transmission efficiency. It's a subtle but significant difference between what you said (torque transmission efficiency). First, efficiency is defined as the ratio of output to input. With gearing, you could use a very inefficient transmission and still have a larger output torque than input torque. This would imply that your "torque transmission efficiency" is greater than one.
{ "domain": "robotics.stackexchange", "id": 1160, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mobile-robot, torque, gearing", "url": null }
algorithms, complexity-theory, terminology, data-structures, discrete-mathematics The great thing about this is that not only will you learn algorithms, you'll also get better at coding, and get more familiar with your chosen programming language, by being forced to solve unfamiliar problems. If there's some feature of your language that you've always wanted to use and never been able to, these kinds of exercises are a great way to do that too; I first really dug into Java generics while working on a problem about binary trees.
{ "domain": "cs.stackexchange", "id": 4683, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "algorithms, complexity-theory, terminology, data-structures, discrete-mathematics", "url": null }
formal-languages, automata, regular-languages, finite-automata, nondeterminism So how can a non deterministic automata evaluate from right to left in order to compare with the left to right evaluation? The first trick here is to think of the multiplication table as the transition table of an automaton $A$ with each state representing a letter in your multiplication table, but not worrying about acceptance yet. So the letters on the left and in the body of the table are actually states -- it would be more accurate to write them as $q_a, q_b, q_c$, but I won't. The letters across the top are inputs. Then construct the automaton $A_T$ ("$T$" for transpose) for reverse multiplication by transposing $A$: $\qquad \displaystyle\begin{array}{c|ccc} A_T & a & b & c \\ \hline a & a & c & b \\ b & a & a & c \\ c & c & b & a \end{array}$ So $A(abc)$ takes you to state $c$, and likewise $A_T(cba)$ moves into state $a$ of $A_T$, as you note.
{ "domain": "cs.stackexchange", "id": 169, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "formal-languages, automata, regular-languages, finite-automata, nondeterminism", "url": null }
navigation, robot-localization, robot-pose-ekf Frames: Frame: /base_frame published by /tf_base_footprint_TO_base_frame Average Delay: -0.012254 Max Delay: 0 Frame: /imu published by /tf_base_frame_TO_imu Average Delay: -0.0121784 Max Delay: 0 Frame: /laser_scanner published by /base_laser_tilt_TO_laser_scanner Average Delay: -0.0123668 Max Delay: 0 Frame: /laser_scanner_2 published by /tf_base_laser_2_TO_laser_scanner_2 Average Delay: -0.0121929 Max Delay: 0 Frame: base_footprint published by /robot_localization Average Delay: 0.00781267 Max Delay: 0.00946112 Frame: base_laser published by /robot_state_publisher Average Delay: -0.486066 Max Delay: 0 Frame: base_laser_2 published by /robot_state_publisher Average Delay: -0.486063 Max Delay: 0 Frame: base_laser_support published by /robot_state_publisher Average Delay: -0.48609 Max Delay: 0 Frame: base_laser_tilt published by /tilt_laser Average Delay: 0.0485597 Max Delay: 0.0646518 Frame: base_turret published by /robot_state_publisher Average Delay: -0.486084 Max Delay: 0
{ "domain": "robotics.stackexchange", "id": 17968, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, robot-localization, robot-pose-ekf", "url": null }
python, python-3.x, playing-cards class FileFunctions: # Reads the current deck's name def load_current_deck_name(): with open('current_deck_name.txt', 'r') as cd_file: return cd_file.read() def change_current_deck_name(new_name): with open('current_deck_name.txt', 'w') as cd_file: cd_file.write(new_name) # Writes deck to a file def write_deck(name, deck_array): deck_string = '' for card in deck_array: deck_string += card[0] deck_string += ',' deck_string += str(card[1]) deck_string += '\n' with open(name + '.txt', 'w') as deck_file: deck_file.write(deck_string) with open('deck_names.txt', 'a') as deck_names_file: deck_names_file.write(name + '\n') # Reads deck from a file and returns it as an array def load_deck(): with open('current_deck_name.txt', 'r') as current_deck_name_file: name = current_deck_name_file.read()
{ "domain": "codereview.stackexchange", "id": 32314, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, playing-cards", "url": null }
spectroscopy Title: Bleaching groundstate I'm reading an article about two-dimensional infrared spectroscopy and I don't understand the following sentence. Bleach or stimulated emission contributions yield negative signals.
{ "domain": "physics.stackexchange", "id": 7717, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "spectroscopy", "url": null }
quantum-mechanics, homework-and-exercises, schroedinger-equation, dirac-delta-distributions, s-matrix-theory $$ 4\epsilon = -\frac{\pi^2}{U_0^2}(1-\frac{1}{U_0})^2 + O(\epsilon^2) + O(\epsilon/U_0)\;, $$ but since we see that $\epsilon$ is of order $1/U_0^2$ we can just write: $$ \epsilon = -\frac{\pi^2}{4U_0^2} + O(1/U_0^3)\;, $$ which agrees with your expected expression for $-\gamma$, up to order $1/U_0^2$.
{ "domain": "physics.stackexchange", "id": 92644, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, homework-and-exercises, schroedinger-equation, dirac-delta-distributions, s-matrix-theory", "url": null }
computer-architecture, arithmetic, multiplication The Result's are different Please Help ! When you use normal multiplication, multiplicand and multiplier are represented using (Sign + Magnitude) representation. So effectively 1101 is +(13) in Decimal and (1110) is +14 in decimal as they represent the magnitude. Sign bit would be separate. So the result is (+13)*(+14) = +182 which is 1011 0110 in binary. When you use booth multiplication, operand are in 2's complement representation. So 1101 is -3 and 1110 is -2 in decimal. So the answer will be 0000 0110 that is +6 in decimal. The problem is with your representation of multiplicand and multiplier.
{ "domain": "cs.stackexchange", "id": 16829, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-architecture, arithmetic, multiplication", "url": null }
## 6.3 AIC Another way of comparing models is with Akaike information criterion, AIC. The general idea of AIC is that you can compare different models by comparing their likelihood. This is the same likelihood that we used to find the parameters that best fit the data for a specific model with maximum likelihood estimation. We can also use likelihood to compare entirely different models (e.g. different independent variables). In general, when we add more parameters to the model, it will fit the data better, and thus the likelihood will increase as we add more terms. Thus in AIC there is a penalty that we add based on the number of parameters in the model. AIC = - 2 LL + 2 p where LL is the log-likelihood and p is the number of parameters in the model. If you remember from chapter 2, the likelihood is the joint probability density of the data given the parameters. To calculate the log-likelihood, we first need to calculate the predicted value of y for each observation, and the residual
{ "domain": "bookdown.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9780517450056274, "lm_q1q2_score": 0.8018981122129847, "lm_q2_score": 0.8198933403143929, "openwebmath_perplexity": 431.8432274751122, "openwebmath_score": 0.5763149261474609, "tags": null, "url": "https://bookdown.org/btmarti25/FD2E/comparing-models.html" }
acoustics, boundary-conditions Think of a combat front between two armies that never leave a gap or penetrate each other. The velocity of the front equals the velocity at which one army's front line is advancing and also equals the velocity at which the other army's front line is retreating. EDIT: "Flow" means motion of fluid particles. In the army analogy, the soldiers are fluid particles. If they march left and right along the front, the front does not move. The front moves due to forward or backward motions (which are normal to the front). If one army's soldiers march backward, they are retreating; then if the other army does not advance, this would leave a gap between their front lines (a vacuum). Or if one army marches forward (advances) but the other army does not retreat, this is only possible if the armies can occupy the same space at the same time (overlap). The rule is just saying "advancing velocity equals retreating velocity".
{ "domain": "physics.stackexchange", "id": 56398, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "acoustics, boundary-conditions", "url": null }
data-structures, binary-trees Title: What are the main ideas used in a Fenwick tree? While I was solving a programming competition question, I came across a technique advertised as suitable for the solution. A so called Fenwick tree (a.k.a binary indexed tree) was at the heart of this technique. So in an effort to understand Fenwick trees, I researched all online sources in vain because reading them in details is a pain! No one seems to be able to explain the main concepts behind this data structure in a concise and clear way. Can anyone please give a high level exposition of the main ideas related to Fenwick trees without going into unnecessary details? A Fenwick tree is a binary tree used to efficiently handle cumulative frequencies or sums in an array. Without loss of generality we shall examine a 16-element array. Imagine a binary tree imposed on top of the array. Furthermore, label all the left edges in this tree with a "0" and all the right edges with a "1". We get something like this:
{ "domain": "cs.stackexchange", "id": 4706, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "data-structures, binary-trees", "url": null }
c, game, memory-management, console, hangman printHangMan() is really long and should be simplified if you still want such an output. Prefer to call srand() at the top of main(). This will make it easy to maintain and will ensure that it's called only once. If called multiple times, it reset the seed each time, resulting in the "same" random values when calling rand(). I don't think your space-printing functions are necessary, or at least printOneSpace() (you could just output this inline). You shouldn't output a lot of spaces if it'll clutter up your code and output. For printing an unformatted line that should also end with a newline, use puts() instead of printf(). For similar lines without a newline, use fputs(). More info about that here.
{ "domain": "codereview.stackexchange", "id": 6939, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c, game, memory-management, console, hangman", "url": null }
c++, c++11, multithreading … correct? Okay, before I start the review, I have to ask… C++11? Really? This is 2023! I would expect, at least, a bare minimum of C++17. That’s the version all major compilers default to. Concurrency support is barely functional in C++11. (It’s still not perfect as of C++20—executors is really holding everything up—but it’s much better than it was in C++11.) Alright, so, I am not a fan of this interface. It’s extremely convoluted, and very hard to use… and very easy to misuse. Suppose I just want to do a scan and literally nothing else. Could I do this? auto main() -> int { auto scanner = type_derived_from_thread_manager{}; scanner.startScan(); std::cout << "scan done (successfully?)"; }
{ "domain": "codereview.stackexchange", "id": 45077, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, c++11, multithreading", "url": null }
javascript, jquery, css I'm not sure exactly what is causing the problem in point 1. but if you were hoping to hide the email address from bots you will need to remove the href and use JS to add it when the page loads. Point 3 almost is certainly due to my screen size only fitting exactly one picture at at time, something you may not be aware of if you have a larger screen.
{ "domain": "codereview.stackexchange", "id": 13856, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, jquery, css", "url": null }
ros as far as I can see, all the ROS sources are there. Originally posted by Claudio on ROS Answers with karma: 859 on 2012-09-06 Post score: 1 Original comments Comment by Claudio on 2012-09-06: Somehow I can't see my own answer. Anyway: solution is to get rid of libboost 1.48. ROS requires 1.46 and it can't be installed onto 1.48. Problem solved: I was using libboost 1.48. ROS requires (hardwired dependencies) libboost 1.46. So as apt-get was unable to resolve the conflict, it said it had unmet dependencies. Solution: remove all 1.48 libboost packages, install ROS. Originally posted by Claudio with karma: 859 on 2012-09-06 This answer was ACCEPTED on the original site Post score: 3 Original comments Comment by Daniel Pinyol on 2013-05-15: Why are groovy and hydro debians for Ubuntu 12.4 not compiled against boost 1.48? Ubuntu 12.4 comes both with boost 1.46 & 1.48, but 1.46 has some problems with c++11
{ "domain": "robotics.stackexchange", "id": 10919, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
computer-vision The first horizontal line represents the camera sensor and the bottom one represents the flat surface. They are parallel and the camera optical axis (vertical line) is perpendicular to the two because of the hypotheses. The variable $c$ is a constant representing the width of a pixel, and $y$ is the projected length. The variable $x$ represents the position of the pixel on the sensor. The question is now formulated as: does $y$ depends on $x$? I applied two Thales theorems and found that $y = \frac{b c}{a}$, so $y$ seem to be independent of $x$: Since $\frac{x}{d} = \frac{a}{b} = \frac{a_1}{b_1}$ and $\frac{c}{y} = \frac{a_1}{b_1}$, then $\frac{c}{y} = \frac{x}{d}$ and $\frac{x}{d} = \frac{a}{b}$ so $y = \frac{c d}{x}$ and $d = \frac{b x}{a}$ finally $y = \frac{b c x}{a x}$ = $\frac{b c}{a}$
{ "domain": "dsp.stackexchange", "id": 10725, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "computer-vision", "url": null }
feature-selection, correlation, xgboost, gbm From what I understand, the model is learning more than one tree and the final prediction is based on something like a "weighted sum" of the individual predictions. So if this is correct, then Boosted Decision Trees should be able to handle co-dependence between variables. Also, on a related note - how does the variable importance object in XGBoost work? Decision trees are by nature immune to multi-collinearity. For example, if you have 2 features which are 99% correlated, when deciding upon a split the tree will choose only one of them. Other models such as Logistic regression would use both the features.
{ "domain": "datascience.stackexchange", "id": 9649, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "feature-selection, correlation, xgboost, gbm", "url": null }
ros if (joint_traj_point_msg.init(in)) { ..... } .... } Originally posted by ManMan88 with karma: 44 on 2017-11-30 This answer was ACCEPTED on the original site Post score: 0 Original comments Comment by gvdhoorn on 2017-11-30:\ so it was my mistake, sorry well, this isn't too well documented, so don't feel bad. I've done this a few times (implementing a driver), so perhaps I can assist you. If you'd like, contact me off-list and I can perhaps point you to a few resources. Comment by ManMan88 on 2017-11-30: Thanks a lot for your help! I would happily contact you if I knew how..? I also encountered the same question as here which you have previously answered. how can I contact you? Comment by gvdhoorn on 2017-12-01: you can find my email address in any commit on my github account.
{ "domain": "robotics.stackexchange", "id": 29473, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros", "url": null }
java, optimization, algorithm, recursion, mergesort int lIndex = 0, rIndex = 0, resIndex = 0; while (lIndex < left.size() || rIndex < right.size()){ if (lIndex < left.size() && rIndex < right.size()){ if (left.get(lIndex) <= right.get(rIndex)){ result.add(resIndex, left.get(lIndex)); resIndex++; lIndex++; }else { result.add(resIndex, right.get(rIndex)); resIndex++; rIndex++; } }else if (lIndex < left.size()){ result.add(resIndex, left.get(lIndex)); resIndex++; lIndex++; }else if (rIndex < right.size()){ result.add(resIndex, right.get(rIndex)); resIndex++; rIndex++; } } // update original ArrayList using result ArrayList int count = 0; for (int i = loInd; i < hiInd; i ++){ ar.set(i, result.get(count)); count++; } }
{ "domain": "codereview.stackexchange", "id": 5920, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, optimization, algorithm, recursion, mergesort", "url": null }
quantum-algorithms, complexity-theory, speedup, applications Constructing elliptic curve isogenies in quantum subexponential time by Childs, Jao, and Soukharev. A streamlined quantum algorithm for topological data analysis with exponentially fewer qubits by McArdle, Gilyén, and Berta (almost quintic speedup over state-of-the-art classical algorithms) Classical and Quantum Algorithms for Tensor Principal Component Analysis by Hastings (achieves a quartic speedup over the best-known classical algorithm) Classical and Quantum Algorithms for Exponential Congruences by van Dam and Shparlinski (cubic speedup) Quantum Search with Multiple Walk Steps per Oracle Query by Wong and Ambainis (cubic speedup)
{ "domain": "quantumcomputing.stackexchange", "id": 5466, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-algorithms, complexity-theory, speedup, applications", "url": null }
thermodynamics, energy, universe Thus, the death of the Universe. So, the total energy of the Universe is still there but it is equally and evenly spread out over the entire Universe and all that Energy is sort of useless as previously mentioned. There are lots of sources for delving deeper into the idea of the "Heat Death" and Google can find many of them.
{ "domain": "physics.stackexchange", "id": 31512, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "thermodynamics, energy, universe", "url": null }
A parabola does not have a radius of curvature. Each point of the parabola does. So, if you are asked to find the radius of curvature on a parabola, you must also be give the point on the parabola. We can draw a tangent (Call it 't') at any point (call it 'p')on a curve. We can also draw a circle to which 't' is a tangent. The radius of this circle is the radius of curvature to the given curve at the point 'p'. An analogy from motion of a body along a curved path may help easier understanding. When a body moves along a curved path, its velocity keeps changing. However, we can talk of the instantaneous velocity of the body at each and every point along the curve. On similar lines, for a given curve the radius of curvature keeps changing along the curve. However, we can talk of radius of curvature at each and every point along the curve. It refers to the radius of the circle which has a common tangent with the given curve at the point under consideration.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964215865321, "lm_q1q2_score": 0.8102644502904589, "lm_q2_score": 0.822189134878876, "openwebmath_perplexity": 211.4335232354338, "openwebmath_score": 0.8258881568908691, "tags": null, "url": "https://physics.stackexchange.com/questions/190262/radius-of-curvature/190278" }
python, python-3.x, error-handling, logging, decorator-pattern if asyncio.iscoroutinefunction(decoratee): @functools.wraps(decoratee) async def decorator(*decoratee_args, **decoratee_kwargs): with logger_scope() as scope: inject_logger(scope, decoratee_kwargs) scope.started(**on_started(params(*decoratee_args, **decoratee_kwargs))) try: result = await decoratee(*decoratee_args, **decoratee_kwargs) scope.completed(**on_completed(result)) return result except ContinuationError as e: if hasattr(e, "result"): scope.canceled(**(on_completed(e.result) | e.details)) return e.result else: scope.canceled(**e.details) else: @functools.wraps(decoratee)
{ "domain": "codereview.stackexchange", "id": 44545, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, error-handling, logging, decorator-pattern", "url": null }
lambda-calculus, type-theory, syntax, syntax-trees Just like ASTs, ABTs have little to no semantics on their own, even when instantiated to a particular syntax. An ABT describing the syntax for the untyped lambda calculus is doing just that, describing syntax. Until you add the beta rule, it's not the lambda calculus. Similarly, if I make an ABT for the the syntax of the simply typed lambda calculus, the ABT won't stop me from making ill-typed nonsense. A type checker still needs to be implemented. Indeed, the exact same ABT could be used for very different type systems or semantics. For example, the difference between the linear lambda calculus and the typed lambda calculus is not a matter of syntax. Similarly, the difference between the call-by-value untyped lambda calculus and the call-by-name lambda calculus is entirely in when the beta rule can be applied, syntactically they are identical.
{ "domain": "cs.stackexchange", "id": 8048, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "lambda-calculus, type-theory, syntax, syntax-trees", "url": null }
Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers. Gauss-Jordan elimination yields: Thus, the kernel of consists of all elements of the form:. Let T: V-> W be a linear transformation between vector spaces V and W. asked • 17d find the kernel of the linear transformation :-1-T:R 3 →R 3,T(x,y,z)=(0,0,0). Describe in geometrical terms the linear transformation defined by the following matrices: a. Note: It is convention to use the Greek letter 'phi' for this transformation , so I'll use. linear transformation. Determine whether T is an isomorphism. array([4,1,0, 1,4]) By combing the existing and new feature, we can certainly draw a line to separate the yellow purple dots (shown on the right). Remarks I The kernel of a linear transformation is a. (If all real numbers are solutions, enter REALS. (The dimension of the image space is sometimes called the rank of T, and the dimension of
{ "domain": "tuning-style.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9838471647042428, "lm_q1q2_score": 0.8439127109138213, "lm_q2_score": 0.8577680977182186, "openwebmath_perplexity": 420.58524934978, "openwebmath_score": 0.7735112905502319, "tags": null, "url": "http://tuning-style.it/wdmc/how-to-find-the-kernel-of-a-linear-transformation.html" }
python, genetic-algorithm readability Code should be written to be read and understood. Descriptive names help. But, lines of code that are too long or that wrap to the next line are more difficult to read than shorter lines. So there is a balance between how descriptive a name is and how long it is. misc return doesn't need parens. return schedule instead of return(schedule) The default start for range() is '0', so range(99) is the same as range(0, 99). Try to avoid magic numbers: sessionLengthsCosts.append((18 - i) * 5). Where do the 5 and 18 come from? If the code is edited somewhere else (like the size of a data structure, or the value of quantaDuration) how do you know if these numbers should change? Are they used anywhere else in the code? It would be better to make them a constant, or at least add a doc string or comment to explain them.
{ "domain": "codereview.stackexchange", "id": 35993, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, genetic-algorithm", "url": null }
python, python-3.x, client Sorte: vollsperrung Straße: GF4 Überschrift: Sachsenhäuserufer bis Schaumainkai Einzelheiten: Zwischen Alte Brücke und Untermainbrücke gesperrt, bis 03.01.2022 08:00 Uhr Sachsenhausen, Sperrung Sachsenhäuser Ufer und Schaumainkai (südliches Mainufer), Sachsenhäuser Ufer und Schaumainkai zwischen Alter Brücke und Untermainbrücke werden für den Jahreswechsel gesperrt. Verkehrsteilnehmer werden gebeten den genannten Bereich weiträumig zu umfahren. Vom 30.12.2021 bis 03.01.2022 ca. 07:00 Uhr. Sorte: vollsperrung Straße: L1070 Überschrift: Ebertstraße zwischen Hannah-Arendt-Straße und Scheidemannstraße in beiden Richtungen Einzelheiten: Gesperrt, Veranstaltung, bis 02.01.2022 23:59 Uhr Sorte: verkehrsmeldung Straße: Überschrift: Höchst Mainfähre Höchst Einzelheiten: In beiden Richtungen, Personenfähre außer Betrieb, bis 19.01.2022 Mitternacht
{ "domain": "codereview.stackexchange", "id": 42632, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, python-3.x, client", "url": null }
mechanical-engineering, fluid-mechanics, chemical-engineering, pumps Title: Centrifugal pumps working Why is it not recommend to have pump shut off head lower than its operating head? Is the answer related to dropping curve by any chance? Also why is the discharge valve closed when starting the pump operation? Any help on this appreciated To address the first point without further clarification from your side: I think you mean unstable pump curves with that. Otherwise I wouldn't know how you could achieve a higher operating head than shut off head. The result would be an oscillating behavior which is not desired. For the second part of your question the main reasons I know are lower load on the driver during start up avoiding recirculation if the operating pressure in the pipe is high maintaining a constant pressure in the pipe, i.e. the valve is beeing opened when the discharge pressure is equal or exceeds the pipe pressure avoiding a dry pump, especially if the flow on the suction can be interrupted
{ "domain": "engineering.stackexchange", "id": 1051, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "mechanical-engineering, fluid-mechanics, chemical-engineering, pumps", "url": null }
Find step response: \begin{align} y[n] &= x[n] * h[n] = u[n] * h[n] = \sum_{k=-\infty}^{\infty} u[k]h[n-k] \\ &= \sum_{k=-\infty}^{\infty} u[k] \left ( u[n-k] - \frac {1}{2} \right ) = \sum_{k=-\infty}^{\infty} u[k]u[n-k] - \frac{1}{2} \sum_{k=-\infty}^{\infty} u[k] \\ &= \sum_{k=0}^{\infty} u[n-k] - \frac{1}{2} \sum_{k=0}^{\infty} 1 = -\infty \end{align} (this seems unreasonable!) Note: The original eq. $y[n] - y[n-1] = x[n]\$ can be expressed as: $h[n] - h[n-1] = \delta [n]\$ By observation, $h[n] = u[n] + c\$ for any constant c. And further: the step response is divergent for $c \ne 0\$. So, what is c equal to? once again --mireille.boutin.1, Fri, 26 Oct 2007 14:30:38 Dividing by zero is not recommended. Please clarify --ross.a.howard.1, Fri, 26 Oct 2007 18:16:00 Can you please clarify where I divided by zero? I still do not know what to do with the arbitrary constant that comes up in the solution... ## Nyquist Example
{ "domain": "projectrhea.org", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9748211590308922, "lm_q1q2_score": 0.8246425815312649, "lm_q2_score": 0.8459424314825853, "openwebmath_perplexity": 1219.5656107466257, "openwebmath_score": 0.9422564506530762, "tags": null, "url": "https://www.projectrhea.org/rhea/index.php?title=ECE_301_Fall_2007_mboutin_Examples&diff=cur&oldid=484" }
I see that some years ago, I commented on the accepted answer (by @Clive Newstead) and said why it was incomplete. And there is an answer by @Ovi explaining why a common chain-rule theorem for limits doesn't apply. But no answer yet states a precise, true theorem about limits that does apply here to explain the answer. So let me fix that. As Ovi noted, one theorem is that $$\lim \limits _ { x \to c } f ( g ( x ) ) = f ( w )$$ if $$w = \lim \limits _ { x \to c } g ( x )$$ exists and $$f$$ is continuous there. This is completely inapplicable, since $$w$$ is infinite in this case, and so there's no way that $$f$$ could be continuous there; we can't even say that $$f$$ is defined at $$w$$.
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9626731126558706, "lm_q1q2_score": 0.8123951270209749, "lm_q2_score": 0.8438951045175643, "openwebmath_perplexity": 189.94456059369736, "openwebmath_score": 0.9304672479629517, "tags": null, "url": "https://math.stackexchange.com/questions/503022/how-does-the-chain-rule-for-limits-work" }
neural-network, backpropagation that is $$a_i = \frac{e^{z_i}}{\sum_{j=1}^N e^{z_j}}.$$ $a$ is indeed a function of $z$ and we want to differentiate $a$ with respect to $z$. The interesting thing is we are able to express this final outcome as an expression of $a$ in an elegant fashion. If you look at the section of "Derivative of Softmax Function" in your link, using quotient rule: We can see that if $i=m$, \begin{align}\frac{\partial a_i}{\partial z_m} &=\left(\frac{e^{z_i}}{\sum_{j=1}^N e^{z_j}}\right)\left(\frac{\sum_{j=1}^Ne^{z^j}-e^{z_m}}{\sum_{j=1}^N e^{z_j}} \right)=a_i(1-a_m)\end{align} if $i\ne m$, \begin{align}\frac{\partial a_i}{\partial z_m} &=-\left(\frac{e^{z_m}}{\sum_{j=1}^N e^{z_j}}\right)\left(\frac{e^{z_i}}{\sum_{j=1}^N e^{z_j}} \right)=-a_m(a_i)\end{align} If you want to evaluate things in terms of $z$, you can still use the middle term though using the formula $$\frac{da}{dz}=ae^T\circ (I-ea^T)$$ is more elegant.
{ "domain": "datascience.stackexchange", "id": 5159, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "neural-network, backpropagation", "url": null }
quantum-mechanics, wavefunction, fourier-transform, heisenberg-uncertainty-principle As the Fourier transform $\mathcal{F}: \mathcal{H} \to \mathcal{H}$ defined by $\tilde{\psi}(p) = (\mathcal{F}\psi)(p)=\int_{-\infty}^{+\infty}dx\frac{e^{-ip x /\hbar}}{\sqrt{2 \pi \hbar}} \psi(x)$ is a unitary transformation, all observations obtained in the "x-representation" must have a counterpart in the "p-representation": the "momentum operator" $\tilde{P} = \mathcal{F} P \mathcal{F}^{-1}$ is now simply a multiplication operator $\tilde{P} \tilde{\psi}(p)=p \tilde{\psi}(p)$ with domain $\mathcal{D}(\tilde{P})=\{\tilde{\psi} \in \mathcal{H} | p \tilde{\psi}(p) \in \mathcal{H}\}$.
{ "domain": "physics.stackexchange", "id": 91916, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, wavefunction, fourier-transform, heisenberg-uncertainty-principle", "url": null }
c#, object-oriented, classes foreach(var question in Questions) { var questionScore = Ask(question); totalScore += questionScore; } PrintResults(totalScore); } Before we delve into the Ask and PrintResults methods, look at how simple and straightforward the structure of this algorithm is. Ask each question, then print the end result. Compare this to your code, where you have a recursive method with an interation in each step, and custom written end clause where a completely different task (printing the results) is being run within the same recursive stack. private int Ask(Question q) { Timer timer = new Timer(QuestionTimeLimit); timer.Elapsed += (sender, e) => { Console.WriteLine("Time limit over..."); return 0; };
{ "domain": "codereview.stackexchange", "id": 39410, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c#, object-oriented, classes", "url": null }
math, proofs, automated-theorem-proving Title: Can a computer make a proof by induction? Can a computer solve the following problem, i.e. make a proof by induction? And why? Prove by induction that $$\sum_{k=1}^nk^3=\left(\frac{n(n+1)}{2}\right)^2, \, \, \, \forall n\in\mathbb N .$$
{ "domain": "ai.stackexchange", "id": 2858, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "math, proofs, automated-theorem-proving", "url": null }
php, laravel }); The Super-admin has several abilities related to user management: use App\Models\User; use App\Models\Role; class UserRightsController extends Controller { public function roles() { return Role::all(); } public function index() { $users = User::paginate(10); return view('dashboard/user-rights', ['users' => $users]); } public function change_role($id) { $user = User::find($id); return view('dashboard/change-role',['user' => $user, 'roles' => $this->roles()]); } public function update_role(Request $request, $id) { $user = User::find($id); $user->role_id = $request->get('role_id'); $user->save(); return redirect()->route('user-rights')->with('success', 'The role for ' . $user->first_name . ' ' . $user->last_name . ' was updated'); } public function ban_user($id){ User::find($id)->update(['active' => 0]); return redirect()->back()->with('success', 'The user is now banned'); }
{ "domain": "codereview.stackexchange", "id": 44325, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "php, laravel", "url": null }
javascript, beginner, jquery, html, calculator <p>Subscription Fees</p> </div> <div class="col-xs-2"> <div class="input-group"><span class="input-group-addon">$</span> <input type="number" id="sfTotal1" name="sfTotal1" value="0.00" placeholder="0.00" readonly class="form-control"> </div> </div> <div class="col-xs-2"> <div class="input-group"><span class="input-group-addon">$</span> <input type="number" id="sfTotal2" name="sfTotal2" value="0.00" placeholder="0.00" readonly class="form-control"> </div> </div> <div class="col-xs-2"> <div class="input-group"><span class="input-group-addon">$</span> <input type="number" id="sfTotal3" name="sfTotal3" value="0.00" placeholder="0.00" readonly class="form-control"> </div> </div> <div class="col-xs-2">
{ "domain": "codereview.stackexchange", "id": 19155, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "javascript, beginner, jquery, html, calculator", "url": null }
c++, simulation, c++14 return argmask_; } void list(uint16_t &w) const { std::cout << mnemonic_; if (argmask_) { std::cout << " 0x" << hex4(argmask_ & w); } std::cout << '\n'; } uint16_t assemble(uint16_t &w) const { return (w & ~mask_) | pattern_; } private: void bitsToMask(const std::string &bits) { uint16_t maskval = 1u << 15; for (int ch : bits) { switch(ch) { case '1': pattern_ |= maskval; // drop through to '0' case case '0': mask_ |= maskval; maskval >>= 1; break; case 'x': maskval >>= 1; argmask_ = 0xfff; break; case 'y': argmask_ = 0xff; maskval >>= 1;
{ "domain": "codereview.stackexchange", "id": 17608, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "c++, simulation, c++14", "url": null }
python, performance, numpy, simulation, numba # Check if the current step is the first step. if self.current_step < 1: # Set the flapping velocities to be zero for all points. Then, return the # flapping velocities. flapping_velocities = np.zeros((self.current_airplane.num_panels, 3)) return flapping_velocities # Get the current airplane's bound vortices' front legs' centers, and the # last airplane's bound vortices' front # legs' centers. these_front_leg_centers = self.panel_front_vortex_centers last_front_leg_centers = self.last_panel_front_vortex_centers # Calculate and return the flapping velocities. flapping_velocities = ( these_front_leg_centers - last_front_leg_centers ) / self.delta_time return flapping_velocities
{ "domain": "codereview.stackexchange", "id": 40925, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, performance, numpy, simulation, numba", "url": null }
java, game I'm curious why you are using an array to hold the state here. This could simply be: private int from; private int to; private int steps; That way you don't have to worry about the problems that can come along with arrays. Notice also that I declared them private. Without a modifier, they have default access, which means any other class in the same package as it can modify it's values. Rarely a good idea. public PacmanRoughDraft() { pacManState[FROM] = 12; pacManState[TO] = 13; pacManState[STEPS] = 0; } 12 and 13 here are magic numbers. You should replace them with constants declared near the top of the class so you can easily modify. And with the previous suggestion, this could be rewritten as // near the top of the class private static final int INITIAL_FROM = 12; private static final int INITIAL_TO = 13; private static final int INITIAL_STEPS = 0;
{ "domain": "codereview.stackexchange", "id": 7373, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "java, game", "url": null }
ros, pi-tracker, skeleton-tracker, skeleton, skeletal-tracker Title: Multiple user tracking using pi_tracker Hello Everyone, I am using using ROS Electric, and pi_tracker package for skeletal tracking. In the published /skeleton topic by pi_tracker, there is a field named 'user_id'. Although in the tracking window, the tracker can track more than one person, but in the /skeleton topic message, user_id field is always equal to 1. I am not sure, whether it can't track more than one person, or there is any other parameter that needs to be set to get multiple user tracking data. Your help will be highly appreciated. Thanks.
{ "domain": "robotics.stackexchange", "id": 13668, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, pi-tracker, skeleton-tracker, skeleton, skeletal-tracker", "url": null }
python, numpy # ---------------------------------------------------------------- orderForSurfaceFit = 5 main(orderForSurfaceFit) [Edit: Clarified that the 3d to 4d conversion is solved] Add PEP484 type hints to all of your signatures, and your members whose type can't be inferred during construction. _abc_powers need not return a list: it can return a generator, which will (a) avoid materialisation to memory and (b) avoid the creation of a hidden, inner generator function. PEP8 asks for all of these figures: 0.1,0.2,0.8,0.7 to have spaces after the comma. This line: self.axis_3d = Axes3D(fig, rect=[0.1,0.2,0.8,0.7])
{ "domain": "codereview.stackexchange", "id": 42943, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, numpy", "url": null }
ros, parameter, best-practices, dynamic-reconfigure, parameter-server Original comments Comment by Philip on 2013-04-05: Thanks for your answer and listing the (dis)advantages! I'm worried a little about the last point. http://answers.ros.org/question/12276/is-there-a-c-api-for-a-dynamic-reconfigure-client indicates that there are topics I can use to access the configuration of a node, but I haven't found more info. Comment by joq on 2013-04-05: C++ should use system("rosrun dynamic_reconfigure dynparam ..."). In Python there is a decent API: http://www.ros.org/wiki/hokuyo_node/Tutorials/UsingDynparamToChangeHokuyoLaserParameters#PythonAPI Comment by Philip on 2013-04-07: EDIT: Perfect, nice find! So I'll use the system-call for setting parameters (I'm using c++) and query the parameter-server to access them. To be on the safe side, I'm clearing the according parameters on the server at the startup of each node to avoid ghosts from the last run :-) Comment by joq on 2013-04-09:
{ "domain": "robotics.stackexchange", "id": 13665, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "ros, parameter, best-practices, dynamic-reconfigure, parameter-server", "url": null }
• Basically whenever you have two pairs of primes such that $p_1+q_1=p_2+q_2$ then one pair lies on an ellipse of the other, and vice versa. I reckon that for larger numbers it happens more often (see for example Goldbach's conjecture wiki). So you'd have a better chance of a counterexample with smaller primes. There are other ways to have points on an ellipse that you have to check though. Still, $11$ and $23$ looks like it could be a good candidate, or $23$ and $31$. – Jaap Scherphuis Aug 21 '18 at 15:14 • @JaapScherphuis Thanks for your comment Jaap. I tried indeed other ways, but this is the only one that (it seems) is valid for all the couple of primes I tried, and I tried many. Other ways involved to get 5 primes on a conic, etc. but they are not as general as this one. The only other general way I found so far is here: math.stackexchange.com/q/2886024/559615. Thanks!! – user559615 Aug 21 '18 at 16:41
{ "domain": "stackexchange.com", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.974434788304004, "lm_q1q2_score": 0.8098947060036488, "lm_q2_score": 0.831143054132195, "openwebmath_perplexity": 302.11556123800943, "openwebmath_score": 0.8976564407348633, "tags": null, "url": "https://math.stackexchange.com/questions/2889805/elliptic-primes" }
newtonian-mechanics, forces, kinematics, acceleration Title: Do linear motion equations follow from any of the Newton's three laws? The distance $x$ covers in time $t$ by a body having initial velocity $u$ having a constant acceleration $a$ is given by $x= ut+(1/2)at^2.$ Does this result follow from any of the Newtonian laws? Similarly, are other equations like $v=u+at$ result of these laws. or not? If they are what are the laws it follows?? The equations that you have quoted are called kinematic equations. The dictionary definition of kinematics is: the branch of mechanics that deals with pure motion, without reference to the masses or forces involved in it So kinematic equations are not derived from Newton's laws of motion. They would be correct irrespective of whether or not Newton's laws of motion were correct. However dynamics the branch of mechanics concerned with the motion of bodies under the action of forces is very much to do with Newton's laws of motion.
{ "domain": "physics.stackexchange", "id": 37169, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "newtonian-mechanics, forces, kinematics, acceleration", "url": null }
# Logics and integer-programming representations Tags: Updated: YALMIP does a lot of modelling for you behind the scenes, but sometimes it is important to know how models are created and what the standard building blocks and tricks are. Creating integer programming representable models seem like magic to some, but there are really only a few standard tricks used leading to a family of models. Some simple rules and strategies when deriving models for complex logic and combinatorials models: 1. Try to represent things with disjoint events of the kind “exactly one of these things occur” with a binary variable associated to each event. 2. Try to arrive at “binary variable implies set of constraints” 3. Introduce intermediate auxilliary variables to keep things clean 4. Decompose the logic using intermediate variables to connect parts
{ "domain": "github.io", "id": null, "lm_label": "1. YES\n2. YES", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.985496421586532, "lm_q1q2_score": 0.8212384026206947, "lm_q2_score": 0.8333245911726382, "openwebmath_perplexity": 816.054317907762, "openwebmath_score": 0.7899975776672363, "tags": null, "url": "https://yalmip.github.io/tutorial/logicprogramming/" }
navigation, robot-pose-ekf, transform Title: base_link to base_footprint transform? Hi, I am trying to use robot_pose_ekf for my navigation stack, I have done every thing according to this thread but I faced a problem about my transformations! Robot_pose_ekf is publishing a base_footprint tf, but i dont know how should i connect base_link tf to base_footprint tf. what is the relation between them? Originally posted by Alireza on ROS Answers with karma: 717 on 2012-01-26 Post score: 5 base_link is typically the center of mass or the center of turning for your robot, while base_footprint is located at ground level directly below base_link. base_footprint is a projection of base_link onto the ground. EDIT: If your Center of Mass is 0.5m above the ground, you can publish a transform with parent=base_footprint and child=base_link with a transform of 0.5z. If you want base_link to be the parent, you would publish -0.5z.
{ "domain": "robotics.stackexchange", "id": 8003, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "navigation, robot-pose-ekf, transform", "url": null }
haskell, recursion, mergesort It also builds its result in reversed order. We can make it an internal function to reduce, so that its argument fw could be referred to in rpairs body. At the same time there is no need in the separate accumulator really, we can just build the result naturally, in lazy fashion: where reduce _ [] = [] reduce fw [xs] = if fw then xs else reverse xs reduce fw s = reduce (not fw) (reverse $ pairs s) where pairs [] = [] pairs [x] = [reverse x] pairs (x:y:zs) = merge fw x y : pairs zs
{ "domain": "codereview.stackexchange", "id": 4106, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "haskell, recursion, mergesort", "url": null }
cell-biology, gene-expression, gene I have found some articles which describe methylation in intergenic regions and introns activating transcription but, since you're asking specifically about promoters, I'll limit the examples to methylation in the 5' flanking region. Please note that I'm grossly oversimplifying these articles, you should actually read them to get the full picture.
{ "domain": "biology.stackexchange", "id": 3390, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cell-biology, gene-expression, gene", "url": null }
cc.complexity-theory, quantum-computing, circuit-complexity, randomness, circuit-depth I am looking to something analogous to Hastad switching lemme, Boppana result that the total influence is small or LMN theorem. 2) The same question as 1) but with bounded depth quantum circuits. There are some relatively recent papers by Emanuele Viola et al., which deal with the complexity of sampling distributions. They focus on restricted model of computations, like bounded depth decision trees or bounded depth circuits. Unfortunately they don't discuss reversible gates. On the contrary there is often loss in the output length. Nevertheless these papers may be a good starting point. Bounded-Depth Circuits Cannot Sample Good Codes The complexity of Distributions
{ "domain": "cstheory.stackexchange", "id": 1815, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "cc.complexity-theory, quantum-computing, circuit-complexity, randomness, circuit-depth", "url": null }
rotational-dynamics ie in other words if torque is zero that means body rotates with constant angular velocity but is there a force MAINTAINING this constant angular velocity or is it just like inertia in linear motion ? (Also the body is rotating about a fixed axis and is rigid) Think of angular velocity $\omega$, angular acceleration $\alpha$, moment-of-inertia $I$ and torque $\tau$ in the exact same way as you think of normal (translational) velocity $v$, acceleration $a$, inertia (mass) $m$ and force $F$. They have their two equivalent laws combining them: $$\sum F=ma\qquad , \qquad \sum \tau=I\alpha$$ And you can trust these laws.
{ "domain": "physics.stackexchange", "id": 39989, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rotational-dynamics", "url": null }
.net, vb.net End If If listStatus.Contains("DO") Then DoneStatus = "Y" End If If listStatus.Contains("NDO") Then If String.IsNullOrEmpty(DoneStatus) Then DoneStatus = "N" Else DoneStatus = DoneStatus & ",N" End If End It's interesting to notice that when you parse your input, you break a comma-separated string into a list of values. The end result of your code can be achieved much more cleanly if you take a similar (but inverted) approach, i.e. generate a list of values and then have the comma-separated string generated from that list.
{ "domain": "codereview.stackexchange", "id": 38136, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": ".net, vb.net", "url": null }
everyday-life Title: Why do I hear the telephone ring through grandpa’s hearing aid before the actual phone rings? I was sitting next to my grandpa (Tato), who wears a hearing aid, on the couch. I’ve noticed that when the landline telephone rings I actually hear the phone ring through his hearing aid (less than one second) before I actually hear the landline ring. At first, I thought that I was imagining it but it has now happened several times. Can someone explain how something like this is even plausible? I will amplify my comment:
{ "domain": "physics.stackexchange", "id": 16947, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "everyday-life", "url": null }
human-biology, cancer Title: A study claims that the consumption of fish increases the likelihood of getting skin cancer, does this have any relation to their omega-3 content? A study claims that fish consumption increases the likelihood of getting skin cancer.
{ "domain": "biology.stackexchange", "id": 11960, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "human-biology, cancer", "url": null }
quantum-mechanics, angular-momentum, atomic-physics, history, orbitals I won't actually try to answer the question "what was Bohr thinking when he came up with this?" For that, you are probably better off asking at the history of science stack exchange. However, I can offer some sense of why, from a physics point of view, such a postulate is useful for explaining the motion of electrons in the atom. Through a fascinating series of experiments in the early 1900s, physicists in the mid 1910s were led a picture of the atom in which a negatively charged, light, electron orbited a heavy, positively charged nucleus. The simplest version of this picture would be a "planetary model," in which the electron is like a little Earth orbiting the nucleus, which is like the Sun.
{ "domain": "physics.stackexchange", "id": 73050, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, angular-momentum, atomic-physics, history, orbitals", "url": null }
reinforcement-learning, training, game-ai Title: How can I train a RL agent to play board games successfully without human play? How would you go about training an RL Tic Tac Toe (well, any board game, really) application to learn how to play successfully (win the game), without a human having to play against the RL? Obviously, it would take a lot longer to train the AI if I have to sit and play "real" games against it. Is there a way for me to automate the training? I guess creating "a human player" to train the AI who just selects random positions on the board won't help the AI to learn properly, as it won't be up against something that's not using a strategy to try to beat it. The approach will vary depending on some features of the game:
{ "domain": "ai.stackexchange", "id": 1765, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "reinforcement-learning, training, game-ai", "url": null }
beginner, c, file /* * open_or_gen_key: if key_filename exists, it will be opened in read mode and * the pointer returned, otherwise, if it doesn't exists, it * will be created, its size will be key_length bytes and it * will be filled with bytes from URANDOM. A pointer to it * will be returned after reopening the file in read mode. * If an error occurs, returns NULL. */ static FILE *open_or_gen_key(const char *key_filename, size_t key_length); /* * fclose_all: close three file it gets as input. It is safe to pass NULL * pointer as file, no operation on it will be performed. */ static void fclose_all(FILE *in, FILE *out, FILE *key);
{ "domain": "codereview.stackexchange", "id": 28331, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "beginner, c, file", "url": null }
python, tic-tac-toe, pyqt newAction = QtGui.QAction('&New game', self) newAction.setShortcut('Ctrl+N') newAction.setStatusTip('Make a new game') newAction.triggered.connect(self.new_game) # add an exit feature exitAction = QtGui.QAction('&Leave', self) exitAction.setShortcut('Ctrl+Q') exitAction.setStatusTip('Leave the app') exitAction.triggered.connect(self.close_application) self.statusBar() # menu part of exit feature mainMenu = self.menuBar() fileMenu = mainMenu.addMenu('&File') # new game feature fileMenu.addAction(newAction) # exit fileMenu.addAction(exitAction) # set up game board self.btn0 = QtGui.QPushButton('', self) # first argument is the text self.btn0.clicked.connect(lambda: self.clicked(0, self.playerCoin)) self.btn0.resize(100,100) self.btn0.move(20,280)
{ "domain": "codereview.stackexchange", "id": 22842, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, tic-tac-toe, pyqt", "url": null }
All logarithms have two parts. Sometimes this is omitted. 005 per share charge will be assessed on the number of shares in excess of 10,000. Final report from the 2019 Annual Rule of Law Conference, which focused on rule of law strategies to more effectively address the ever-changing cybersecurity. 2 Mb] Turkish. RS Permission granted to photocopy for personal use only. 1201 GENERAL PURPOSE OF THE BOARD (a) The purpose of the Board is to regulate the practice of pharmacy in North Carolina in order to safeguard and protect the life and health of the people of North Carolina, and in order to promote the public welfare. Removal/inactivation occurs through filtration and/or disinfection. ” The definition of a logarithm indicates that a logarithm is an exponent. The TAC is maintained by the Office of the Secretary of State and is available online by clicking on the links below. Irish Financial Services Law, Womble Bond Dickinson, Commentaries, 2020 Commentaries Banks/Credit Institutions,
{ "domain": "clicksmart.it", "id": null, "lm_label": "1. YES\n2. YES\n\n", "lm_name": "Qwen/Qwen-72B", "lm_q1_score": 0.9854964211605606, "lm_q1q2_score": 0.812504271451398, "lm_q2_score": 0.8244619199068831, "openwebmath_perplexity": 2107.3554604779924, "openwebmath_score": 0.5253328084945679, "tags": null, "url": "http://purd.clicksmart.it/logarithm-rules-pdf.html" }
python, beginner, python-2.x, random if guess > 10: tries += 1 print("\nWay too high! Try a number 10 or lower.") else: tries += 1 print("\nTry something lower.") The value of tries will be increment no matter what. So you can pull it up, out of the if-else: tries += 1 if guess > 10: print("\nWay too high! Try a number 10 or lower.") else: print("\nTry something lower.") Keep try blocks small You have a very large try block here: try: guess = int(guess) # ... many lines ... # Input not an integer except ValueError: # ... Since the only place where you expect something to go wrong is the guess = int(guess) line, it would be better to wrap only that in the try-except. Comparison with boolean values Don't use == or != with boolean values. Instead of: while correct == False: The recommended way is: while not correct: Pointless comments The comments on these lines really don't tell anything new: if guess == number: # Correct answer # ... elif guess > number: # Guess too high
{ "domain": "codereview.stackexchange", "id": 18946, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "python, beginner, python-2.x, random", "url": null }
wavelet, time-frequency, visualization, cwt, scattering Musical genre, phone classification Acoustic scene classification Audio texture syntehsis Spoken digit recognition Seizure classification 2D, Images Texture classification CIFAR10 3D, Chemistry Molecular atomization energies regression Other Generative networks (-- lecture) Related material Joint Time-Frequency Scattering: extends wavelet scattering, further increasing discriminability; covered here. Scattering Invariant Deep Networks for Classification - lecture series, contrasting scattering w/ CNNs Deep Scattering Spectrum - scattering properties, derivations, applications Group Invariant Scattering - fundamental paper; advanced reading "Center frequency" explanation - intuition on a concept central to time-frequency analysis References
{ "domain": "dsp.stackexchange", "id": 10561, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "wavelet, time-frequency, visualization, cwt, scattering", "url": null }
rebol Does this code follow common best practices? Does it have some security issues? Is there any problems with a performance using this code? Does it have some security issues? Well, you're doing an evaluation of code. If that code comes from a foreign source somehow, that could be a problem. If it's your code, it's no more dangerous than anything else. But as you wrote it, it does have the property that it can infinite loop within itself. Because after your substitution you start at the beginning again: arr: [REP [quote REP]] That's a stable state, but you could keep growing without bound too. My answers will assume you didn't want this. Does this code follow common best practices? It's C-like. Rebol is a great language for writing bad C code. :-) Using COMPOSE is the obvious answer here: >> compose [ ("code1") | 'something "f" | [ f | 3 ] (40 + 2) ] == ["code1" | 'something "f" | [ f | 3 ] 42]
{ "domain": "codereview.stackexchange", "id": 17563, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "rebol", "url": null }
quantum-mechanics, schroedingers-cat EDIT: I am particularly interested in the apparent paradox of an event triggering an event in the past. How, in quantum terms, would this be explained? Variation 2 is also simple but a bit more dramatic. Here the cat is replaced with a (very small) explosive device – just enough to blow the box part. If I never look inside the box and hence the quantum state is never observed, does the box never explode? If it does explode before I look inside, why? And if, after a long time, the box has not explored and I then look inside, does this mean it’s very like the box will exploded at that moment and I get my hair singed! Your thoughts please. Bryan. I think the easiest resolution of the Schrodinger cat situation is to think that the state of a macroscopic system is never in a superposition of states, you can search about decoherence to understand this a little bit better.
{ "domain": "physics.stackexchange", "id": 52608, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "quantum-mechanics, schroedingers-cat", "url": null }
nuclear-physics, stability, binding-energy, isotopes For your specific example, this is a bit tricky because a large variety of decay channels are potentially allowed. Edit Another way to proceed is to look at a binding energy per nucleon or mass excess against A diagram:
{ "domain": "physics.stackexchange", "id": 3, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "nuclear-physics, stability, binding-energy, isotopes", "url": null }
machine-learning, feature-extraction, one-hot-encoding Title: Isn't one-hot encoding a waste of information? I was just playing around with one-hot representations of features and thought of the following: Say that we're having 4 categories for a given feature (e.g. fruit) {Apple, Orange, Pear, Melon}. In this case the one-hot encoding would yield: Apple: [1 0 0 0] Orange: [0 1 0 0] Pear: [0 0 1 0] Melon: [0 0 0 1] The above means that we quadruple the feature space as we go from having one feature to having four. This looks like it's wasting a few bits, as we can represent 4 values with $\log_{2}4=2$ bits/features: Apple: [0 0] Orange: [0 1] Pear: [1 0] Melon: [1 1]
{ "domain": "datascience.stackexchange", "id": 6896, "lm_label": null, "lm_name": null, "lm_q1_score": null, "lm_q1q2_score": null, "lm_q2_score": null, "openwebmath_perplexity": null, "openwebmath_score": null, "tags": "machine-learning, feature-extraction, one-hot-encoding", "url": null }