Random thoughts about random subjects… From science to literature and between manga and watercolours, passing by data science and rugby; including film, physics and fiction, programming, pictures and puns.
Have you tried taking a screenshot in your Mac and are annoyed at having to wait for the floating thumbnail – in other words you wait for 5 seconds before the screenshot becomes a file? Well here you can find out how to get rid of that.
Follow these steps:
1) Type CMD + SHIFT + 5 2) Click OPTIONS 3) Uncheck “Show Floating Thumbnail” 4) Et voilà!
I have recently taken Mojave for a spin and I am really happy with the changes in the new OS. I know it is merely eye-candy, but I really like the dark theme. Things have been working well, but I came across a nagging issue with my MagicMouse:
For some reason the secondary click would simply not work. I had made sure the settings were enabled by making sure that the “Secondary Click” option was ticked (see screenshot below). I tried ticking it on and off, restarting the machine, deleting the mouse and reconnecting it… nothing had worked…
Finally I decided to take a look at some of the plist files and here is my solution to this problem:
Hello everyone! I am very pleased to take a question from John who got in touch with Quantum Tunnel using the form here. John’s favourite scientist is Einstein and his question is as follows:
In Mac mail I cannot delete unwanted email addresses. I have done the routine of deleting all addresses from the previous receiptant list, but when starting a new email unwanted addresses appear.. Any help is appreciated. Thanks, John
John is referring to the solution I provided in this earlier post. Sadly, the list of his lucky friends/colleagues/family (delete as appropriate) he has email recently persists even after clearing the “Previous Recipients” as explained in the post before.
There may be a way to force the clearing of these persistent email address:
Quit Mail and Address Book (in case the latter is open)
I was looking for the location of iBooks files (including ePub, PDFs and others) so that I can curate the list of manually exported files. Finding iBooks in my Mac should not be a difficult task, although it took a few minutes. I thought of sharing that here in the blog for future reference and in the hope that some of yo may find it useful.
We will use the Terminal, as doing things from Finder tends to redirect us. A first place to look into is the following one:
It is not unusual to come across encoding problems when opening files in Python 3. The subject matter is a large topic of discussion, and here I am providing some quick ways to deal with a typical encoding issue you are likely to encounter.
Say you are interested in opening a CSV file to be loaded into a pandas dataframe. If the stars align and the generator of your CSV is magnanimous, they may have saved the file using UTF-8. If so you may get away with reading the file (here called my file.csv) as follows
import python as pd
df = pd.read_csv('myfile.csv')
You should in principle pass a parameter to pandas telling it what encoding the file has been saved with, so a more complete version of the snippet above would be:
import python as pd
df = pd.read_csv('myfile.csv', encoding='utf-8')
What happens when you don’t know what encoding was used to save the file? Well, you can ask, but it is very unlikely that the file generator know… What to do? Well there are some libraries that can be helpful.
Install the chardet module as follows from the terminal
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.
I managed to sort it out in the end and here is what I did:
Exit the Drive application
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”
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:
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à!
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 .