I found a weird thing:  When I do in the console,  alias a='echo aaa' a   I get the output aaa as expected. But when I do a script, let's name it script.sh  #!/bin/bash alias a='echo aaa' a   and run it by doing bash script.sh, I get script.sh: line 2: a: command not found  How is this possible and how can I fix it?
In my ~/.bashrc file reside two definitions:   commandA, which is an alias to a longer path commandB, which is an alias to a Bash script   I want to process the same file with these two commands, so I wrote the following Bash script:    #!/bin/bash  for file in "$@"     do     commandA $file     commandB $file done   Even after logging out of my session and logging back in, Bash prompts me with command not found errors for both commands when I run this script.  What am I doing wrong?
How do I login to the Gamecenter on PewDiePie's Tuber Simulator, if you have not done it when they asked? I was watching the  tutorial by Andrew Price and I was able to follow along in Cycles until I hit the part where he mixes the day and night materials together so that the lights show up on the "dark side" of the earth.  How can I recreate this effect in cycles? I thought I could use the ray information to tell me if there was incoming light but I've found no such node to give me this information. I'm quite new to neural networks and currently I'm trying to train a non convolutional neural network on the MNIST data set. I'm observing some behaviour I don't quite understand.   This is the code written with keras as the library:  # the data, split between train and test sets (x_train, y_train), (x_test, y_test) = fashion_mnist.load_data()  y_train = keras.utils.to_categorical(y_train, 10) y_test = keras.utils.to_categorical(y_test, 10) model = Sequential()  early_stopper = EarlyStopping(patience=3)  model.add(Flatten(input_shape=(28,28))) model.add(Dense(128, activation="relu")) model.add(Dense(128, activation="relu")) model.add(Dense(10, activation="softmax")) model.compile(loss="categorical_crossentropy", optimizer="adam", metrics=["accuracy"])  model.fit(x_train, y_train, epochs=20, validation_data=(x_test, y_test), callbacks=[early_stopper])   This gives me a validation_acc of around 20%. The funny thing is, when I change the activation functions to "sigmoid", the loss function to "mean_squared_error" and the optimizer to "sgd" my performance improves to around 85% after 50 epochs.   Having read  I wonder what's the reason for the bad performance of the network I presented in the code. ReLU, cross-entropy and a dynamic optimizer like Adam all seem to improve on the idea of a very vanilla neural network with stochastic gradient optimization, mean squared error as loss and sigmoid activation functions. Yet I get a really bad performance and if I increase the number of nodes in the hidden layers I often get a network that doesn't learn at all.   EDIT: I figured out it has something to do with me not normalizing the input to values between 0 and 1 ... but why is this the problem? What happens when you die? Diablo's first and second installments handled death differently, both in terms of exp\gold penalties and also in if you respawned or not or instead had to reload from an earlier point.  In Diablo III what happens when you die? How to copy files into /usr/local/? (permission denied) I'm still a little new to Ubuntu and was wondering how I can copy files, in this case Aptana Studio, to /usr/local/ without being denied.   Is there a way to do it in terminal? Or a way to allow myself permission?  I should add that I am using 10.10 Desktop edition, not server. I know this may be a tough or confusing question, but I have numerous existing materials I created and reuse for a project, which were all prepared for Blender Internal.  Now, I want to start the transition to Cycles, but I've hit a roadblock. How can I transition my materials without completely starting over? Or should I just forget it and start with fresh materials? "How are" or "How is" the wife and kid? Boot drops to a (initramfs) prompts/busybox Mysql: Select rows from a table that are not in another What are the limitations of healing magic? While reading Sorcerer's Stone, I just finished the chapter where Harry walks in on Snape and Filch bandaging Snape's leg.  In a previous chapter Neville falls off of his broom and we see that magic can easily heal his broken wrist.  If magic can heal an injury like broken bones, why wouldn't Snape heal his leg, which was just torn up by a 3-headed dog?  My initial thought was that only certain people specialize in healing magic, but while poking around this site I came across this question:   This shows that Snape had at least some healing abilities.  So why didn't he heal his own leg?  Are there limitations that prevented Snape from healing his own wounds? Why is the installer not showing any partitions? I'm having a problem installing Ubuntu, and Kali as well. I downloaded the iso from the official site &amp; tried installing using USB. I also tried desktop installation, but the problem is same.  It shows a single drive i.e. my total Hard Disk and if I select it, it asks me to create a new partition &amp; shows total space as FREE.  It's with all Ubuntu I downloaded, 11.10 Server, 12.10 and 13.04. I also tried to install BackTrack's new version Kali Linux but again I got the same problem.  I hope I meet thier system requirements. Here's my system details for your ease:   OS: Windows 7 Ultimate Processor: Intel P4 2.80 GHz RAM: 3GB Hard Disk: 320GB No of Local Drives: 4 (1 Primary, 3 Logical) Free Space: 195GB (about) Motherboard: G31 Cache: 1MB Help me, please. Trouble With Persistence After Making a USB Live Thumb Drive Using Pendrivelinux I created a bootable Ubuntu on my 32GB thumb drive (on a NTFS partition) and I selected a persistence of 4GB.  I've noticed that when I reboot from the initial booting off of the USB thumb drive, nothing is preserved.  No apps that were installed nor saved bookmarks.  Is there a way for me to manually force persistence? Problem from Herstein on group theory Why Lasso or ElasticNet perform better than Ridge when the features are correlated I have a set of 150 features, and many of them are highly correlated with each other. My goal is to predict the value of a discrete variable, whose range is 1-8. My sample size is 550, and I am using 10-fold cross-validation.   AFAIK, among the regularization methods (Lasso, ElasticNet, and Ridge), Ridge is more rigorous to correlation among the features.  That is why I expected that with Ridge, I should obtain a more accurate prediction.  However, my results show that the mean absolute error of Lasso or Elastic is around 0.61 whereas this score is 0.97 for the ridge regression. I wonder what would be an explanation for this.  Is this because I have many features, and Lasso performs better because it makes a sort of feature selection, getting rid of the redundant features? $y_{2n}, y_{2n+1}$ and $y_{3n}$ all converge. What can we say about the sequence $ y_n$? My friend and I are currently debating the following question:      Let $y_n$ be a sequence in a metric space and assume that the subsequences    $y_{2n}$, $y_{2n + 1}$, and $y_{3n}$ all converge. What can we say about the sequence $y_n$?    To me it seems that all the subsequences will converge to a limit say $y$. Then any term in the original sequence will be in one of these subsequences, it follows that the entire sequence $y_n$ converges to $y$.  I let $\varepsilon &gt; 0$. Since $y_{2n}$ converges to $y$ there exists an index $2N$ such that $d(y_{2n},y) &lt; \varepsilon$ for $2n \geq 2N$, and since $(y_{2n+1})$ converges to $y$ there exists $2M + 1$ such that $d(y_{2n+1}, y) &lt; \varepsilon$ for $2n + 1 \geq 2M + 1$.  Let $m \geq \max\{2N,2M+1\}$. If  $m$ is even, since $m\geq 2N$ we have $d(y_m,y)&lt;\varepsilon$; if $m$ is odd, since $m\geq 2M+1$ we have $d(y_m,y)&lt;\varepsilon$. Thus $d(y_m,y)&lt;\varepsilon$ for any $m \geq \max\{2N,2M+1\}$, and we conclude that $(y_n)$ converges to $y$.   However, my friend does not think that this is completely correct because I didn't use the $y_{3n}$ in the proof. I think he is right, that I do in fact need it, but I am unsure of how to add it in. All in all, I think that since any term in the original sequence will be in one of these subsequences, it follows that the entire sequence $(y_n)$ converges to $y$.  $2n+1$ covers all the odd terms and $2n$ converse all the even terms, so is $3n$ even needed? I would like to use it since the proof has it in the question, but I am unsure of what to do. Could someone kindly help me construct this proof in a better manner,and is my line of thinking correct? Thank you! "the better" vs "the best" of two players When using the Text Editor, what is the best command to include inside a script which will abort the script at that line?  quit() and sys.exit() stop the script, but also kill Blender. How can I convert a vector to a cell array? $127$ has an interesting property: It is the $31$st prime number and its rank ($31$) is also a prime. $31$ is the $11$th prime so its rank is also a prime. $11$ is also a prime number with a rank ($5$) that is also a prime. $5$ is the 3rd prime number and and so its rank ($3$) is also a prime. And finally $3$ is the $2$nd prime so its rank is also a prime... Is there a name for primes whose rank (index in the prime series) is also a prime? That is:     If $a_i$ is the $i$th prime number, then $i$ is a also a prime.   How about numbers like $127$ where going down ranks of ranks always produce prime numbers (down to rank $2$ of course)? The first $11$ :-) primes in this (infinite) series would be:  $3, 5, 11, 31, 127, 709, 5381, 52711, 648391, 9737333, 174440041, \dotsc$  Many thanks! Customize Ubuntu for a library Internet kiosk