Remove Unwanted Google Calendars

white and black weekly planner on gray surface
Photo by Bich Tran on

I have been using GSuite in the last year or so at work. In general it seem to be fine, good usage of the email capabilities provided by Gmail and the storage, together with shared drives, and things like that are fine.

Calendar is ok and it does the work, however there was a very irritating thing when being invited to see other colleague’s calendars and/or subscriptions to them. On the one hand it is useful to see calendar availability, but I don’t want to see all of those calendars on my mobile device, or the Calendar app on my Macbook all the time.

A quick solution would be to “uncheck” the unwanted calendars on your device, but… The problem is, when you uncheck those calendars, they’re still there. You may not see them, but boy, you do continue getting reminders, notifications, alerts – and most (all?) of the time they are not even for me to act on!

So if you require to remove these extra calendar, bit still access then via the web and Google apps then do the following:

  1. Go to
  2. Login to your Google Account, and
  3. Uncheck the calendars you don’t want to sync

Then you can select what device you may want to be able to see the delegated calendars in the Apple Calendar app. Simply

  1. Go to Calendar – Preferences
  2. Select Account Information and look for the Google Account in question
  3. Select the “Delegation” tab and check the things you may want to see (or not)

Et voilà!

Importing Organised Picture Folders to Apple Photos

I have been considering moving a considerable photo collection I have amassed for a few years now after getting my first digital camera. I used to take a lot of pictures before that with a beloved Cannon SLR that belonged to my father. Sadly that camera got stolen in a holiday in Cancun… but that is a story for another time.

Anyway, I used to use Picasa to organise my photos into albums and upload or share some with friends and family. Picasa was superseded by Google Photos and I never quite liked losing some control on where my photos went.

I have been an iOS user of Apple Photos — I like the simplicity of taking a picture and it being part of an album that I keep in my phone until I clean the album… I did try using the Mac version, but as I said I never liked just getting a soup of pictures. I wanted to keep them in the album/folder hierarchy I curated myself. It is until now that I have found a way for Apple Photos to respect my hierarchy. Here is what you need to do:

  1. Find the place where your pictures are organised folders and drag the top folder onto the Photos App icon in the Dock. It does not matter if the App is running
    • NOTE: Do not drag it to the Photo App window. If you do, the applications behaves in a different way and you will end up with a soup of photographs.
  2. At the top of the window you will see a checkbox that reads “Keep Folder Organisation” on the top right (see the screenshot above)
  3. Click the blue button, “Import All New Items”

Et voilà! Your imported photos will show up in an organised folder in the sidebar.

Sci-Advent – Writing Reports Tailored for AI Readers

This is a reblog from an article by John Naughton in the Guardian on Dec 5th 2020. Read the original here.

My eye was caught by the title of a working paper published by the National Bureau for Economic Research (NBER): How to Talk When a Machine Is Listening: Corporate Disclosure in the Age of AI. So I clicked and downloaded, as one does. And then started to read.

The paper is an analysis of the 10-K and 10-Q filings that American public companies are obliged to file with the Securities and Exchange Commission (SEC). The 10-K is a version of a company’s annual report, but without the glossy photos and PR hype: a corporate nerd’s delight. It has, says one guide, “the-everything-and-the-kitchen-sink data you can spend hours going through – everything from the geographic source of revenue to the maturity schedule of bonds the company has issued”. Some investors and commentators (yours truly included) find the 10-K impenetrable, but for those who possess the requisite stamina (big companies can have 10-Ks that run to several hundred pages), that’s the kind of thing they like. The 10-Q filing is the 10-K’s quarterly little brother.

The observation that triggered the research reported in the paper was that “mechanical” (ie machine-generated) downloads of corporate 10-K and 10-Q filings increased from 360,861 in 2003 to about 165m in 2016, when 78% of all downloads appear to have been triggered by request from a computer. A good deal of research in AI now goes into assessing how good computers are at extracting actionable meaning from such a tsunami of data. There’s a lot riding on this, because the output of machine-read reports is the feedstock that can drive algorithmic traders, robot investment advisers, and quantitative analysts of all stripes.

The NBER researchers, however, looked at the supply side of the tsunami – how companies have adjusted their language and reporting in order to achieve maximum impact with algorithms that are reading their corporate disclosures. And what they found is instructive for anyone wondering what life in an algorithmically dominated future might be like.

The researchers found that “increasing machine and AI readership … motivates firms to prepare filings that are more friendly to machine parsing and processing”. So far, so predictable. But there’s more: “firms with high expected machine downloads manage textual sentiment and audio emotion in ways catered to machine and AI readers”.

In other words, machine readability – measured in terms of how easily the information can be parsed and processed by an algorithm – has become an important factor in composing company reports. So a table in a report might have a low readability score because its formatting makes it difficult for a machine to recognise it as a table; but the same table could receive a high readability score if it made effective use of tagging.

The researchers contend, though, that companies are now going beyond machine readability to try and adjust the sentiment and tone of their reports in ways that might induce algorithmic “readers” to draw favourable conclusions about the content. They do so by avoiding words that are listed as negative in the criteria given to text-reading algorithms. And they are also adjusting the tones of voice used in the standard quarterly conference calls with analysts, because they suspect those on the other end of the call are using voice analysis software to identify vocal patterns and emotions in their commentary.

In one sense, this kind of arms race is predictable in any human activity where a market edge may be acquired by whoever has better technology. It’s a bit like the war between Google and the so-called “optimisers” who try to figure out how to game the latest version of the search engine’s page ranking algorithm. But at another level, it’s an example of how we are being changed by digital technology – as Brett Frischmann and Evan Selinger argued in their sobering book Re-Engineering Humanity.

After I’d typed that last sentence, I went looking for publication information on the book and found myself trying to log in to a site that, before it would admit me, demanded that I solve a visual puzzle: on an image of a road junction divided into 8 x 4 squares I had to click on all squares that showed traffic lights. I did so, and was immediately presented with another, similar puzzle, which I also dutifully solved, like an obedient monkey in a lab.

And the purpose of this absurd challenge? To convince the computer hosting the site that I was not a robot. It was an inverted Turing test in other words: instead of a machine trying to fool a human into thinking that it was human, I was called upon to convince a computer that I was a human. I was being re-engineered. The road to the future has taken a funny turn.

Getting Answers for Core ML deployment from my own Book

I was working today in the deployment of a small neural network model prototype converted to Core ML to be used in an iPhone app.

I was trying to find the best way to get things to work and then it occurred to me I had solved a similar issue before… where‽ when‽ aha!

The answer was actually in my Advanced Data Science and Analytics with Python.

Computer Programming Knowledge

I came across the image above in the Slack channel of the University of Hertfordshire Centre for Astrophysics Research. It summarises some of the fundamental knowledge in computer science that was assumed necessary at some point in time: Binar, CPU execution and algorithms.

They refer to 7 algorithms, but actually rather than actual algorithms they are classes:

  1. Sort
  2. Search
  3. Hashing
  4. Dynamic Programming
  5. Binary Exponentiation
  6. String Matching and Parsing
  7. Primality Testing

I like the periodic table shown at the bottom of the graphic. Showing some old friends such as Fortran, C, Basic and Cobol. Some other that are probably not used all that much, and others that have definitely been rising: Javascript, Java, C++, Lisp. It is great to se Python, number 35, listed as Multi-Paradigm!


LibreOffice – Dialogue boxes showing blanks

I have been using LibreOffice on and off for a few years now and generally I think it is a great alternative to the MS Office offering. It does the tasks that are required and the improvements over different versions have been steady and useful

I had however a very strange experience in which dialogue boxes and other windows such as alerts and messages just showed blank text. It was obvious that there was some important information in them, but it was not possible to read them. In some cases it was ok… I mean I knew here the “OK” button was expected to appear, or where “Cancel” should be placed. However, it was an annoying (at best) and limiting (at worst) exoperience.

After digging in a bit I realised what the problem was. The fonts that were supposed to be showing were at fault. The culprits were as follows:

  • DINRegular.ttf, and
  • DINRegularAlternate.ttf

After removing these two fonts from ~/Library/Fonts/ everything went back to normal. I hope this helps in case you are having a similar issue.

MacOS – No Floating Thumbnail when taking a screenshot

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à!

See the screenshot above!

Adding new conda environment kernel to Jupyter and nteract

I know there are a ton of posts out there covering this very topic. I am writing this post more for my out benefit, so that I have a reliable place to check the commands I need to add a new conda environment to my Jupyter and nteract IDEs.

First to create an environment that contains, say TensorFlow, Pillow, Keras and pandas we need to type the following in the command line:

$ conda create -n tensorflow_env tensorflow pillow keras pandas jupyter ipykernel nb_conda

Now, to add this to the list of available environments in either Jupyter or nteract, we type the following:

$ conda activate tensor_env

$ python -m ipykernel install --name tensorflow_env

$ conda deactivate

Et voilà, you should now see the environment in the dropdown menu!

Python – Pendulum

Working with dates and times in programming can be a painful test at times. In Python, there are some excellent libraries that help with all the pain, and recently I became aware of Pendulum. It is effectively are replacement for the standard datetime class and it has a number of improvements. Check out the documentation for further information.

Installation of the packages is straightforward with pip:

$ pip install pendulum

For example, some simple manipulations involving time zones:

import pendulum

now ='Europe/Paris')

# Changing timezone

# Default support for common datetime formats

# Shifting

Duration can be used as a replacement for the standard timedelta class:

dur = pendulum.duration(days=15)

# More properties

# Handy methods
'2 weeks 1 day'

It also supports the definition of a period, i.e. a duration that is aware of the DateTime instances that created it. For example:

dt1 =
dt2 = dt1.add(days=3)

# A period is the difference between 2 instances
period = dt2 - dt1


# A period is iterable
for dt in period:

Give it a go, and let me know what you think of it. 

File Encoding with the Command Line – Determining and Converting

With the changes that Python 3 has brought to bear in terms of dealing with character encodings, I have written before some tips that I use on my day to day work. It is sometimes useful to determine the character encoding of a files at a much earlier stage. The command line is a perfect tool to help us with these issues. 

The basic syntax you need is the following one:

$ file -I filename

Furthermore, you can even use the command line to convert the encoding of a file into another one. The syntax is as follows:

$ iconv -f encoding_source -t encoding_target filename

For instance if you needed to convert an ISO88592 file called input.txt into UTF8 you can use the following line:

$ iconv -f iso-8859-1 -t utf-8 < input.txt > output.txt

If you want to check a list of know coded characters that you can handle with this command simply type:

$ iconv --list

Et voilà!