0  I have to activate the virtual environment (venv) so I running these commands manually in terminal:  source .venv/bin/activate     # To activate the virtual env.  and  deactivate                    # To deactivate the virtual env  This works fine when running manually. Now I have to insert these commands in a bash script to make AWS CodeDeploy to deploy it on a Ubuntu 18.04 server.  My bash script named after_install.sh looks like this...  #!/usr/bin/env bash  set -e source .venv/bin/activate ## DO SOME STUFF ## deactivate   For local testing, I made the script executable and ran the script using bash after_install.sh. But nothing happened. It doesn't activate the virtual environment. It seems none of the above commands worked while running the bash script.  I am not getting why these commands work when I run them manually but not with a bash script. What is going on? I need to write these commands inside the bash script so that AWS CodeDeploy can deploy it on the server.
I am executing my ./shell.sh which contains   eval "$(pyenv init -)" pyenv shell 3.8.2   But nothing happens. If i run this code in bash manually it works fine and shell version of python switches from 2.7.10 to 3.8.2.  I am in the right directory and I gave the .sh file execution permissions.
Finding the 1st three derivatives of a function and plotting all four curves Zombies are always after human beings. How do Zombies differentiate between a zombie and a human being? Why don't zombies eat each other? Who created the veil in the death chamber, and why? Was the veil created by someone or was it always there in HP? What is its purpose? If one can't communicate with the dead through the veil, then what/how do unspeakables learn from the the veil? (except investigating how does it flutter,I suppose,,,,) Is there a comma needed before quotation? Proving $\frac{\sin x}{x} =\left(1-\frac{x^2}{\pi^2}\right)\left(1-\frac{x^2}{2^2\pi^2}\right) \left(1-\frac{x^2}{3^2\pi^2}\right)\cdots$ How to prove the following product? $$\frac{\sin(x)}{x}= \left(1+\frac{x}{\pi}\right) \left(1-\frac{x}{\pi}\right) \left(1+\frac{x}{2\pi}\right) \left(1-\frac{x}{2\pi}\right) \left(1+\frac{x}{3\pi}\right) \left(1-\frac{x}{3\pi}\right)\cdots$$ Is the following correct, or is there more to it?  "I forgot his name" — I knew his name, but I forgot it.  "I forget his name" — I keep forgetting his name. Where using "forget" basically means that you tried to remember this information before as well, but you couldn't then either. Transpose/Unzip Function (inverse of zip)? I have a list of 2-item tuples and I'd like to convert them to 2 lists where the first contains the first item in each tuple and the second list holds the second item.  For example:  original = [('a', 1), ('b', 2), ('c', 3), ('d', 4)] # and I want to become... result = (['a', 'b', 'c', 'd'], [1, 2, 3, 4])   Is there a builtin function that does that? What is the mass density distribution of an electron? Close locked file in Windows Share using Powershell and Openfiles I work with a lot of folder shares, but there are a bunch of locked files which have been opened by some other process.  I need to close those files. So far I've been using MMC - System Tools - Shared Folders - Open Files.  It would be far more convenient if I could use PowerShell to filter the list/table retrieved by OpenFiles.exe and once I get the file ID close it with net file  /close, or some other PS native means to similar effect.  I am new to PowerShell, so I wonder if there is a way to create a PS script that receives the file's path and then used the file ID to close that file? Are DSLRs a dying breed, making now the time to switch to a mirrorless camera system? I came across this  on Stuck in Customs today that makes a strong case to hold off too much investment in DSLR gear, and instead switch to mirror-less cameras like the Sony NEX. The author prefers to call such cameras 3rd generation cameras to prevent any bias.  The crux of the argument lies in the smaller size and faster shooting speeds of the new cameras, while the sensor size is an area where they seem to be lacking (Sony &amp; Samsung cameras are APS-C sized though). Currently the big makers - Nikon &amp; Canon - have practically no presence in this market (Nikon seems to be doing something with the V1). However, they seem to have slowed down the introduction of new entry level DSLR models over the last year as well.  So, as DSLR users looking to build and enhance their kit (there are many like me who've jumped the bandwagon over the last couple of years, and are just starting to build their kit), what are the advantages of sticking with the DSLR system rather than switching to the 3rd gen cameras?  IMO, one point that could cause a massive switch in the DSLR base would be if Nikon &amp; Canon announced mirror-less models compatible with their current lens lineups, but that is a hypothetical scenario.  P.S. There is a similar question on mirror-less cameras, but that seems to be from the perspective of a person starting out rather than a person already invested in the DSLR system. Switching motherboard without new install? Can "THAT" be omitted here? So we can say   "Do you think (that) he'll come?"   (in other words, we can omit THAT in conversation)  But what about with a sentence like   "Did he deny （that） he went to Thailand?"   Can "that" also be omitted like in the sentence above? prevent php classes from being extends Can players on a PC and an Xbox play together in any way? I.e. can Xbox users connect to a (modfied?) PC server, or vice versa? How can I save application settings in a Windows Forms application? What I want to achieve is very simple: I have a Windows Forms (.NET 3.5) application that uses a path for reading information. This path can be modified by the user, by using the options form I provide.  Now, I want to save the path value to a file for later use. This would be one of the many settings saved to this file. This file would sit directly in the application folder.  I understand three options are available:   ConfigurationSettings file (appname.exe.config) Registry Custom XML file   I read that the .NET configuration file is not foreseen for saving values back to it. As for the registry, I would like to get as far away from it as possible.  Does this mean that I should use a custom XML file to save configuration settings?  If so, I would like to see code example of that (C#).  I have seen other discussions on this subject, but it is still not clear to me. injective linear transformation basis. Let $T : V → W $ be an injective linear transformation, where $V, W$ are vector spaces of dimension $n$ over the field $K$. If $\{e_1,\ldots , e_n\}$ is a basis for $V$ , show that $\{T(e_1),\ldots , T(e_n)\}$ is a basis for $W$. What does the helpful flag mean? I don't see "Helpful" in the list of things I can do when I press the flag link.   In my profile page I saw "6 helpful flags."  How do I earn these flags?  May I make them on other peoples' posts or comments?   This is what I am talking about: What are some typical LuaTeX gotchas? What is the C# equivalent of NaN or IsNumeric? How do I show apt-get package management history via command line?