Jupyter not Launching after Updating to MacOS 10.12.5

If you have been itching to update the operating system on your shiny Mac, beware that there is a broken link when launching Jupyter.

Do not panic, simply follow these simple steps:

  • Open a terminal and type the following command:
jupyter notebook --generate-config
  • In the terminal navigate to the place where the configuration file is. In other words, type the following:
cd ~/.jupyter/jupyter_notebook_config.py
  • Open the jupyter_noteebook_config.py file and look for a line that says:
# c.NotebookApp.browser = ''

Change the line as follows: Delete the hash and write the name of your browser in between the quotes.

For SAFARI it would look as follows

c.NotebookApp.browser = 'safari'

If you are a CHROME supporter, the command looks a tad bit more complicated:

c.NotebookApp.browser = 'open -a /Applications/Google\ Chrome.app %s'
  • Save the script and close it.
  • Restart your terminal and launch Jupyter…

Et voilà!

Google Drive not synching on your Mac? Here is what to do

I am not a big used of Google Drive. It is a good service and it mostly does what one may need from a suite of productivity apps… but for some reason I only use it in very limited cases.

So, no surprise that I had not noticed that the synching between the cloud version of my documents and those in my mac had gone pear shaped. I tried logging out of Drive but that did not help. I attempted forcing the synch by making changed in both the cloud version and the Mac, but same result. Google Drive

I managed to sort it out in the end and here is what I did:

  1. Exit the Drive application
  2. Navigate to the Application Support folder and look for the Google folderYou may need to find the hidden Library folder
    • In Finder look for the Go menu and press Option + Cmd to reveal the hidden folder
    • Once there look for the “Application Support”
    • Alternatively you can press Cmd + Shift + G and go to “~/Library/Application Support/Google”
  3. Delete the Drive fokder
  4. Start the Drive application

Et voilà

A quick way to tame Mac notification while giving a presentation

Surely you have suffered this same situation: You are giving a really good presentation, with a fantastic slide deck in your shiny MacBook, you are dominating the stage and people are nodding at your witty insights… and then an email notification appears in the top right-hand corner of the screen, followed by a FaceTime call from your other-half…. Noooooo!

A good way to disable these notification is to ⌥-click (option-click) the notification bar:

Disable Notifications

 

In that way, any notifications handled by the notification bar are not shown. Once you are ready to receive notifications, simply ⌥-click (option-click) again. Et voilà!

MacTex updates for El Capitan

El Capitan! Great! The new version of the OS X operating system. New features, new fonts, new problems… I knew that updating was going to bring some unexpected problems with my applications, but I wanted to update… And ditto, as soon as I tried to take a look under the hood for a couple of things I realised that a fresh installation of homebrewwas going to be needed.

More importantly, with my new book on data science (aka “Data Science and Analytics with Python”), LaTeX is probably one of the most used things in my computer. So, I wanted to check that things were fine and although I could compile (currently trying to finish Chapter 3 in case you are wondering) but there were some issues here and there, for example TeX Live thought I was using version 0 (yes zero!) and it could not find some files.

It turns out that El Capitan does not let us write to /usr and the 2015 TeX distribution creates symbolic links to /usr/texbin, is removed (if it was there from a previous OS version) and cannot be installed. If a GUI looks by default at that location it will sadly no longer find it. That is why the terminal was not affected! (Phew!)

The solution is to tell the broken applications to look at /Library/TeX/texbin, in /Library/TeX which is “owned” by MacTEX so is allowed by El Capitan. So to fix Tex Live do the following:

  •  Open TEX Live Utility  Preferences and click on the Choose. . .
  •  That opens a file chooser. Type Shift-Cmd-G , enter /Library/TeX  into the dialog box and then press Return .
  • Finally Double-Click  on texbin
  • Et voilà

 

For more info see this link.

El Capitan

No shuffle in new iOS 8.4 Music App

I was not too sure about the new Apple Music offering, but so far it seems quite alright! The music choices are generally good, and I hope that as I use the music app in iOS 8.4 more the choices get better.

Unfortunately I ended up using the app while not having mobile coverage and no WiFi either… so I reverted to “My Music” and since I was in the middle of a run, I wanted just to hit the shuffle button and hope for the best… However, I was surprised that there was no shuffle button to be seen… I ended up hitting the first song in the list and take it from there. It turns out that the shuffle option is set by default, you just have to seed it by starting playing any song. That seems good, except for the fact that it is not obvious at all.

You can select if you want the shuffle mode or not after starting playing any song and expanding the “Now Playing” bar:

iTunes Shuffle 1

 

And there you will be able to see the usual Shuffle icon:

iTunes Shuffle

 

Enable NTFS read and write in your Mac

CES 2013 - OWC Mac mini external storage - min...
CES 2013 – OWC Mac mini external storage – miniStack Max (Photo credit: the JoshMeister)

I was confronted with an old issue, that had not been an issue for a while: writing to an external hard drive that was formatted with Windows (NTFS) from my mac. I used to have NTFS-3G (together with MacFUSE) installed and that used to be fine. However, I guess something when a bit eerie with Mavericks as I was not able to get my old solution to work.

So, here is what I did (you will need superuser powers, so be prepared to type your password):

Open a Terminal (Terminal.app) and create a file called stab in the /etc folder. For instance you can type:

$ sudo nano /etc/fstab

You can now enter some information in your newly created file telling MacOS information about your device. If your external drive is called mydevice enter the following:

LABEL=mydevice none ntfs rw,auto,nobrowse

Use tabs between the fields listed above. Save your file and you are now ready to plug your device.

There is a small caveat: Once you do this, your hard drive is not going to appear in your Desktop. But do not disappear, you can still use the terminal to access the drives mounted by going to /Volumes folder as follows:

$ sudo ln -s /Volumes ~/Desktop/Volumes

et voilà!

Enhanced by Zemanta

Changing date/time in Ubuntu virtualbox

I was a bit puzzled by the fact I could not easily change the date/time in an instance of a virtualbox as used by the High Performance Scientific Computing Coursera course run by Dr. Randall J. LeVeque via Coursera.

I tried using the simple date command but I kept on being told that

date: cannot set date: Operation not permitted

I tried updating the Ubuntu distro, but no luck. Eventually I found a solution using a symlink to localtime:

$ cd /etc
$ mv localtime localtime_original
$ ln -s /usr/share/zoneinfo/Europe/London ./localtime

You will have to use the correct zone for your location. Et voilà!

Ubuntu-Desktop
Ubuntu-Desktop
Enhanced by Zemanta

Navigating the terminal

"Leopard" Icons in Black

The work computer of one of my colleagues has recently closed the circle and he has now a shiny new apple computer. He is very well-versed in a bunch of computer related tasks, nonetheless he asked me the other day about shortcuts to navigate a shell terminal. I showed him a few tricks, and I thought posting some here just in case they are helpful to my readers too:

  • To go to the beginning of the command line – Ctlr+A
  • To go to the end of the command line – Ctr+E
  • To delete from the current position to the beginning of the line – Ctrl+U
  • To undelete – Ctrl+Y
  • To delete words to the front of current position – Ctrl+K
  • To delete words to the back of current position – Ctrl-W

He also was wondering about an easy way to create a file and open it immediately. The way I do that is with a bash function placed in my .bashrc file

mytouch {
   touch #1
   open #1
}

Enjoy!

Enhanced by Zemanta

Aquaterm plotting issue with Octave and Gnuplot (Mac)

Octave Mac

I recently updated my version of Octave using Homebrew and something went a bit eerie… Nothing major except that instead of plotting to the Aquaterm terminal, Octave and Gnuplot were only happy with X11. Not the greatest of issues, but I really prefer the look of graphs in Aquaterm and here are some steps I followed to get things sorted:

First I uninstalled gnuplot from Homebrew using:

brew uninstall gnuplot

Just in case the problem was with AquaTerm I re-downloaded it and installed it again. You can obtain AquaTerm here. I then reinstalled gnuplot just to realise that some symlinks were not created. You can check them thy typing:

ls /usr/local/lib/libaquaterm*
ls /usr/local/include/aquaterm/*

If they do not, you can set them up by typing the following commands in your shell:

sudo ln -s /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm /usr/local/lib/libaquaterm.dylib

sudo ln -s /Library/Frameworks/AquaTerm.framework/Versions/A/AquaTerm /usr/local/lib/libaquaterm.1.0.0.dylib

sudo ln -s /Library/Frameworks/AquaTerm.framework/Versions/A/Headers/* /usr/local/include/aquaterm/

That did the trick for me. I hope you find this helpful.

Syncing Gmail contacts with Mac (OS)

Aha… now that I have posted about Gmail contacts and iOS, it seems that some of us are having questions about syncing with Mac OS… Well, here is a brief post about this.

OPTION 1 – Synchronize with Google 

Open the Contacts App and go to “Preferences”. Go to “On My Mac” and you will see the following window:

 

SyncWithGoogle

 

Select “Synchronize with Google”, you will need to accept the terms and conditions and then authenticate your account. Note that, this method will bring all Gmail contacts under All Contacts (which includes everybody you have emailed) and they will be pushed to your Mac OS X address book. If you want to keep your Gmail and iCloud (for instance) or any other account separate from each other, then the next option is for you.

OPTION 2 – Separate Accounts

If you want to keep your Gmail contacts separate, then go to the “Preferences” in the Contacts app and follow these steps:

  1. Open the Accounts category.
  2. Click + and select CardDAV
  3. Type your full Gmail address for the User name and authenticate your account
  4. Under server enter “google.com” and click “Create”

If you do not want to sync your Mail, Notes or Calendars, make sure they are not selected. After you do this you will have your Gmail contacts under a new account in the groups list.

Enjoy!