Less triggering than a chicken in a barnyard

AI Platform Notebooks provide managed JupyterLab notebook instances, a familiar tool to experiment, develop, and deploy models into production.

The missing piece is training models for production; this typically runs much longer than the initial experimentation or the production prediction. The interactive Notebook in which you did your experimentation is probably not the right place for this: browser sessions time out, connections are lost, image rendering freezes, and the instance isn’t right-sized for training.

This article focuses on two approaches to running your training in a headless manner:

AI Hub JupyterLab VM: Papermill

Papermill is a tool…

Edges and nodes for days

Ever bumped into the Google admin-managed Groups parent limits? They can be an issue for B2B multi-tenant application authorization, particularly if you are serving Google Cloud Storage objects in a differentiated way.

Use this utility to proactively check whether you’re getting close to these limits, and to understand hotspots.

  • It provides a visualizer as well as CSVs for offline analysis
  • Batch mode enables you to run it at low load times and analyze the cached results later

You can search for an identity (user, service account, or group) whose ancestry to map, or for a group prefix for which to…

Hacky workarounds 103

As you may have noticed, the Apps Script paragraph.getAttributes() function returns mostly nulls.

This is because paragraph styles are inherited from the named styles unless they’re explicitly set on the paragraph (as demonstrated in this Advanced Docs sample), over-riding the default styles. Unfortunately, the Apps Script Document Service doesn’t provide an API to get the named styles.

Fortunately, the Advanced Docs Service does. The following snippet demonstrates its use; one thing to be aware of is that opening a large document with the Advanced Docs Service can be slow (eg. 30+ seconds for a 150 page document).

When building your own Advanced Docs Service scripts, this rather hard-to-read discovery document is a helpful tool for navigating the available methods. An astonishing amount of supplemental context is available in the Overview.

Productivity tools

As you may know, G Suite provides the ability to create shared group calendars, which are great for 1:many sharing.

Many teams would like to have visibility not only into a shared administrative calendar, but also their team-mates’ calendars; while you can do this by adding your team members in your calendar left-nav, it’s a chunk of manual clicking every time, particularly if you have a large team.

A shared team calendar would seem to be the trick; however, many users (me included) don’t want to copy their appointments from their main calendar to a shared calendar; it’s just too…

Hacky workarounds 102

As you may have noticed, the heading id isn’t one of the attributes, and there isn’t a method to retrieve it in the basic Document Service; however, there are a couple of workarounds.

Heading Id Argument from Table of Contents

You can get the heading argument from the Table of Contents (TOC), and that may be the better way to go depending on your use case:

  • It’s about twice as fast for large documents as the alternative described below; it can still be fairly slow from a user experience perspective.
  • It depends on your users updating the TOC, which puts it a bit outside your script’s scope…

Hacky workarounds 101

As you may have noticed, Apps Script is moving increasingly to a Stackdriver logging model. However, as far as I can tell, the Stackdriver javascript profiler has hard node.js dependencies; corrections in the comments below, would love to be wrong about this.

Yet some scripts take a long time, particularly if they’re add-ons manipulating large Google documents, so a performance profiler is essential to understand where to spend your optimization time.

Following is a quick utility to provide rudimentary profiling information, ie. total duration and number of iterations of each function, as well as detailed durations for each iteration.


Bringing the cloud down to earth

Hybrid is a bit of an overloaded term; in this article, hybrid management refers to managing applications and infrastructure located on-premise (where on-premise may included a managed service provider) and in the cloud in the same way and using the same tools; it does not refer to extending on-premise network boundaries to the cloud, or distributing components of your application between on-premise and the cloud.

There are a few reasons some enterprises may also wish to run Google infrastructure elsewhere; they may be…

  • Based in countries which have stringent data sovereignty requirements, and in which Google Cloud Platform doesn’t have…

Scaling securely

One of the advantages of moving to Google Cloud Platform is that security is woven into the fabric of the cloud. Still, most large enterprises have developed robust threat detection and protection ecosystems around their on-premise workloads, and would like to bring some of that explicit insight and control to the cloud.

One of Google Cloud’s goals is to meet you where you are, and one of the core building blocks of Google’s Security by Design is that…

Google Cloud Platform’s infrastructure security is designed in progressive layers — hardware, services, user identity, storage, internet communication, and operations. …

Lions and tigers and bears, oh my

Google Cloud Platform brings a vast array of security monitoring facilities to its various platforms, and provides tools including Stackdriver and Cloud Security Command Center to monitor them. In addition, there’s a rich partner ecosystem, and many customers have already implemented security monitoring policy in their Splunk implementation.

This solutions article provides a great overview of how to build a data lake on Google Cloud Platform. The following diagram shows the relationship between Google Cloud Platform security sources and sinks, to assist you in mapping the data lake guidance to a Security Operations Center (SOC) scenario.

Security Operations Center data lake architecture; related sources and sinks are the same color.

Data lake components

Google Stackdriver

Stackdriver aggregates metrics, logs…

Remember all the things with Apps Script

Gmail released a nudge feature last year which automagically reminds you of emails you have sent or received which haven’t been responded to.

This is a great start, but for the control-freaks amongst us it’s a bit random which emails get nudged and when.

The following Apps Script gives you more control, with a little more work: you need to install and configure the script, and you need to label or forward those emails you wish to be reminded of.

It takes advantage of filters, labels, and a little-know Gmail feature: any text after a plus (“+”) sign is ignored…

Ferris Argyle

These are my personal writings; the views expressed in these pages are mine alone and not those of my employer, Google.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store