‘bash\r’: No such file or directory. Or, editing unix files on a Windows machine

'bash\r': No such file or directory

What does that mean, you ask yourself? It usually means you are editing *nix script files on a windows system, and then running the files on a *nix machine. For instance in docker, or a VM.

Your GUI solution is to use a text editor that allows you to save with unix line endings. `Notepad++` calls it, very reasonably, `'EOL conversion'`. Sublime text calls it `View->Line Endings`.

Your commandline solution in a bash shell on macos is sed -i.bak $'s/\r//' * and on linux the same but you don't need the ansi-C quoting: sed -i.bak 's/\r//' *
A further complication if you are using git is that it keeps getting reset back to windows. You could fix this with `git config core.autocrlf false` but that may have other consequences which you don't want to bother with.

Use a public docker image in AWS ECS

Amazon Web Services carefully explain how to use a private docker image in ECS, the Amazon container service. But fails to mention what repository URL to use for a dockerhub public repository. The answer is … none at all. Just the same as the docker CLI, if you specify just namespace/imagename for a container image, ECS will pull it from dockerhub.

BootCamp says “Can’t install the software because it is not currently available from the Software Update server”

If you see this error message when trying to install bootcamp:

  • Press the back button and try again
  • Wait half an hour/day/month and try again

Deep Learning & Unintended Algorithm Bias

This was a 5 minute talk on deep learning for the very excellent @chesterdevs. Like others talking about deep learning, I took visuals and the face-learning example from the landmark 2012 paper, Quoc Le/Google/Andrew Ng paper, “Building High-level Features Using Large Scale Unsupervised Learning.”

Only afterwards did I notice that the subset of images which their system show as “most like a face” from their test set were 90% male and 90% white, as is the prototypical face that the machine outputs.

And so we have a neat demonstration of unintended algorithm bias: their input was 10 million randomly-chosen youtube videos; the output was white and male. I bet they didn't expect that.

A salutary reminder that—as the hard-working statistician will tell you—“random selection” does not mean “unbiased”.