How to get the python.exe location programmatically?
Find full path of the Python interpreter?
Currently the migration path options from SO are:   Meta.SO Serverfault SuperUser Webmasters Programmers   If we are going to be limited to 5 options, shouldn't we periodically re-evaluate which sites are most appropriate?   (10k only) indicate that the top sites for the last 90 days are:   Superuser - 564 - 5% rejected ServerFault - 278 - 10% rejected Tex - 157 - 13% rejected DBA - 144 - 2% rejected Sharepoint - 127 - 1% rejected Programmers - 126 - 26% rejected CodeReview - 100 - 3% rejected Meta.SO - 81 - 18% rejected Wordpress - 75 - 14% rejected Webmasters - 58 - 8% rejected   All these migrations for sites out of the list required a flag and a moderator to process it.  This is just extra work for the mod team!  If we had the top 5 destinations by volume as the 5 options, we would have had a net savings of 160 flags to be processed.  I suspect we will actually see these numbers change quite a bit if it's easier for users to put questions in the appropriate spot without moderator intervention.  Can we have a review of the migration path list based on migration volume?  Think of the flags! Is there a thumb-rule for designing neural-networks? I know that a neural-network architecture is mostly based on the problem itself and the types of input/output, but still - there's always a "square one" when starting to build one. So my question is - given a input dataset of MxN (M  is the number of records, N is the number of features) and a C possible output classes - is there a thumb-rule to how many layers/units should we start with? What's the purpose of two capacitors in parallel? What's the purpose of the two capacitors in parallel on each side of the regulator in      I've seen similar setups in other similar circuits and can guess that it's related to one being polarized an one not, but I don't really understand what's going on there. finding examples for a non negative and continuous function for which the infinite integral is finite but the limit at infinity doesn't exist Question:  a. Find an example for a non-negative and continuous function s.t. $\int _0^\infty f(x)dx$ is finite but the following limit doesn't exist: $\lim_{x\to \infty} f(x)$.  b. Is it possible that $\int _0^\infty f(x)dx$ is bounded but $f(x)$ is not bounded?  What we did with A: We suggested the function $|sin(x^2)|$ which has periods that get smaller and smaller until they no longer imply on the sum. But since it's a trig function it doesn't have a determinate limit. Wolfram didn't have the integral value for that func, and we were wondering if it really converges and if it is really a good example.  What we did with B: We thought about the function: $f(x)=  { x\in \Bbb N },{e^{-x} \notin \Bbb N }$ and we had a disagreement whether f(x) is integrable. I said no because similarly to Dirichlet function, one sum's limit will be 0 while the other one's will be infinite. My partner said that if I find a $\delta&lt;1$ then the definition of Riemann's integral does hold and so this integral is equal to that of $f(x)=e^{-x}$ She was trying to say this functions integral will be 0, but still it won't be bounded. I disagreed. Who's right? Run python script when a file has been added to a folder? Is it possible to run a Python script when a file has been added to a folder?  In my scenario I have a folder that contains movies and the Python script gets the details (name, year, plot, rating, etc) from OMDb and puts them into a file, which MySQL uses.   Every time I add a movie I have to run the Python script.  I want to know if it is possible to automatically run the Python script when a file has been added to the folder?  Thanks in advance. What is the difference between an indeterminate and variable? From Wikipedia-     In mathematics, and particularly in formal algebra, an indeterminate is a symbol that is treated as a variable, but does not stand for anything else but itself and is used as a placeholder in objects such as polynomials and formal power series.   So, how it is different from variable which is also used as a placeholder? What is the use of the indeterminate? Evaluating $\lim_{n \to \infty} (1 + 1/n)^{n}$ I was recently thinking about how I could evaluate the famous limit of 'e' as I haven't ever seen a proof. I can't really find anything online so I've tried to evaluate the limit myself. And I was also thinking it would be nonsensical to use L'Hopital's rule, am I right?  So I did the following:  $$\lim_{n \to \infty} \left(1 + \frac{1}{n} \right)^{n} = \exp \left(\lim_{n \to \infty} n \cdot \ln \left(1 + \frac{1}{n} \right) \right)$$  $$=\lim_{n \to \infty} \exp \left( n \cdot \left( \frac{1}{n} - \frac{(1/n)^{2}}{2} + \cdots \right) \right)$$  $$= \lim_{n \to \infty} \exp \left( 1 - \frac{(1/n)}{2} + \cdots \right)$$  $$= e$$  I am not sure, is my logic correct or does it create circularity by taking logarithms and assuming $$f(x) = \exp \left( \ln f(x) \right)$$ ? Book with travellers, alien artefacts and age reversal Looking for the title of a book I read about 5 years ago though I believe the book was a lot older.  Essentially the main male character was on a task and was travelling with a group of people. The mode of transport if I recall was a boat and they were on a remote planet travelling via a river. One of the group was a father to a young female infant. There's a reference to alien artefact/temple that essentially reverse aged a female scientist (the baby) a day at a time and the father is trying to undo it. Also a line I remember is the father used to say see you later alligator and the daughter will reply that awhile crocodile until a day where she forgot.  Another fellow traveller was a pilgrim and his male disciple. There are several other male and female travellers all had different reasons to travel to that location.  The aliens was located within the temple (time locked?) Were invisible to humans. Killed any that entered. Got the impression that they were quadpeds with organic blades/razors that cut people.  I believe the book may be part of a series. The male author though I don't recall the name, has written other works that have received awards. The book or series may have received one too. Which is probably why I decided to read it in the first place.  Question never asked anywhere else. I am from Australia, book was a paper copy bought locally. Can I levitate an object without using an electromagnet? New UI encourages askers to confirm or dispute duplicate votes How do I troubleshoot random rebooting? I am trying to mimic the interesting proof from  to give a generating set of the ideal correspond to the $d$-uple embedding: We fix the notation $\Delta = \big\{ (\nu_0, \dots, \nu_n) \in {\mathbb{N}}^{n+1}_0 ~:~ \nu_0 + \dots + \nu_n = d \big\}$. The polynomial map is $\theta : k[y_\nu : \nu \in \Delta] \rightarrow k[x_0, \dotsc, x_n]$ given by $$ \theta ( y_\nu ) := x^{\nu_0}_0 \cdots x^{\nu_n}_n $$ and we know that ${\mathrm{ker}}~\theta$ is the ideal of the $d$-uple embedding, i.e., $\rho_d({\mathbb{P}}^n) = Z({\mathrm{ker}}~\theta)$ (cf. Exercise I.2.12 Hartshorne). Now let $W \leq k[y_\nu : \nu \in \Delta]$ denote the ideal $$ W := \Big\langle y_{\tau_1} y_{\tau_2} - y_{\tau^{\prime}_1} y_{\tau^{\prime}_2} ~:~ \tau_1, \tau_2, \tau^{\prime}_1, \tau^{\prime}_2 \in \Delta, \tau_1 + \tau_2 = \tau^{\prime}_1 + \tau^{\prime}_2 \Big\rangle $$ Clearly, $W \subseteq {\mathrm{ker}}~\theta$. Using the lemma in the above link, we need to produce a $k$-subspace $T \subseteq k[y_\nu : \nu \in \Delta]$ with the conditions $$ T + W = k[y_\nu : \nu \in \Delta], \hspace{.2in} \theta \lvert_{T} = {\mathrm{injective}} $$ After a few thoughts it seems reasonable to think of the following subspace as a candidate for $T$: First define the equivalence relation on $\Delta \times \Delta$ given by $(\tau_1, \tau_2) \sim (\tau^{\prime}_1, \tau^{\prime}_2)$ if $\tau_1 + \tau_2 = \tau^{\prime}_1 + \tau^{\prime}_2$. Let $\Omega \subseteq \Delta \times \Delta$ be a subset with a unique representative from each class of $\sim$. Now let $T$ be the $k$-span of the monomials $y^{\alpha_1}_{\tau_1} \dotsc y^{\alpha_r}_{\tau_r}$ (with the distinct elements $\tau_1, \dotsc, \tau_r \in \Delta$ and $\alpha_1, \dotsc, \alpha_r \geq 1$) such that $(\tau_i, \tau_j) \in \Omega$ for each $i \neq j$. Clearly, $\theta$ is injective if restricted to $T$. I got lost in the step : Each monomial $M$ of $k[y_\nu : \nu \in \Delta]$ satisfy $M \equiv b$ mod $W$ for some $b \in T$. Did I do anything wrong? Hyperref "enquotes" metadata Prove that if $\sum{a_n}$ converges absolutely, then $\sum{a_n^2}$ converges absolutely I'm trying to re-learn my undergrad math, and I'm using Stephen Abbot's Understanding Analysis. In section 2.7, he has the following exercise:  Exercise 2.7.5 (a) Show that if $\sum{a_n}$ converges absolutely, then $\sum{a_n^2}$ also converges absolutely. Does this proposition hold without absolute convergence?  I'm posting about this here because my answer to that last question about whether the proposition holds without absolute convergence is "Yes", but my suspicions are raised by him merely asking the question. Usually questions like this are asked to point out that certain conditions are necessary in the statement of propositions, theorems, etc. I just want to see if I'm missing something here.  Anyway, here's how I prove the absolute convergence of $\sum{a_n^2}$, and note that I never use the fact that $\sum{a_n}$ is absolutely convergent:  Proof: Let $s_n = \sum_{i=1}^n{a_n^2}$. I want to show that $(s_n)$ is a Cauchy sequence. So, let $\epsilon &gt; 0$ and $n &gt; m$, and consider, \begin{equation}   \begin{aligned}     |s_n - s_m| &amp;= |(a_1^2 + a_2^2 + \cdots a_n^2) - (a_1^2 + a_2^2 + \cdots a_m^2)|\\                 &amp;= |(a_{m+1})^2 + (a_{m+2})^2 + \cdots + a_n^2|\\                 &amp;= |a_{m+1}|^2 + |a_{m+2}|^2 + \cdots + |a_n|^2\\   \end{aligned} \end{equation} Now, since $\sum{a_m}$ converges, the sequence $(a_m)$ has limit 0. Therefore I can choose an $N$ such that $|a_m| &lt; \sqrt{\epsilon/n}$ for all $m &gt; N$. So for all $n &gt; m&gt; N$,  we have, \begin{equation}   \begin{aligned}     |s_n - s_m| &amp;= |a_{m+1}|^2 + |a_{m+2}|^2 + \cdots + |a_n|^2\\                 &amp;&lt; \left(\sqrt{\frac{\epsilon}{n}}\right)^2 + \left(\sqrt{\frac{\epsilon}{n}}\right)^2 + \cdots + \left(\sqrt{\frac{\epsilon}{n}}\right)^2\\                 &amp;&lt; \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2 + \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2 + \cdots + \left(\sqrt{\frac{\epsilon}{n-m}}\right)^2\\                 &amp;= \epsilon   \end{aligned} \end{equation} Therefore $(s_n)$ is Cauchy and $\sum{a_n^2}$ converges. And since $\sum{a_n^2} = \sum{|a_n^2|}$, the series $\sum{a_n^2}$ is absolutely convergent. &#x220E;  Am I doing something wrong here? Am I right in thinking that $\sum{a_n}$ need not be absolutely convergent for $\sum{a_n^2}$ to be absolutely convergent? How to switch between low latency and generic kernels? Clean URLs and php extension on nginx I've looked at dozens of other questions and references on the web - and by all my calculations, my setup should work, but it doesn't.  I have nginx installation with php-fpm.  If I try to access a .php file, it runs correctly and I get the correct results.  I got this in my config file:  location ~ \.php$ {     try_files $uri =404;     fastcgi_pass unix:/var/run/php5-fpm.sock;     include fastcgi_params;     fastcgi_param SCRIPT_FILENAME  $document_root$fastcgi_script_name; }   Now, I want to setup my web app so that /somedir/file automatically executes /somdir/file.php while still displaying /somdir/file in the browser's address bar.  So I modified my config to contain the following:  location / {     try_files $uri $uri/ $uri.php?query_string }   This kind of works, that is, the server does access the .php file.  Yet, instead of executing it using the existing location ~ \.php$ block above, it simply spits the php source code as the download into the browser.  If I append the .php manually to the requested URL, then the php is executed.  It feels as if once the server matches try_files to $uri.php, it then does not do another pass at locations to see that what it needs to do with the php files.  I tried putting the php block above and below the location /, but it makes no difference.  How can I get the php to be executed? How do you do it? Given a byte array:  byte[] foo = new byte[4096];   How would I get the first x bytes of the array as a separate array? (Specifically, I need it as an IEnumerable&lt;byte&gt;)  This is for working with Sockets. I figure the easiest way would be array slicing, similar to Perls syntax:  @bar = @foo[0..40];   Which would return the first 41 elements into the @bar array. Is there something in C# that I'm just missing, or is there some other thing I should be doing?  LINQ is an option for me (.NET 3.5), if that helps any. How to resolve BackgroundContainer.dll error on startup? When I start my desktop it gives me an error about BackgroundContainer.dll.    How to get rid of it?  I found nothing when i started regedit.exe and searched (F3 or CTRL+F) for BackgroundContainer.dll My system is not dual-boot, I run a standard Ubuntu desktop system "on the metal" (I think running it in a VM is the same).  Pressing c while booting does not cause the GRUB menu to appear (which I believe it does for a dual-boot system).  How can I get the GRUB-menu to present itself on a single-boot system? How long can you store used cooking oil How long can you store used cooking oil then re-use it? I deep fried a turkey one year ago and have had it refrigerated since.