Here you'll find a series of instructive and educational notebooks organized by topic areas.
Curated Notebooks
Gemini API
This notebook contains an example of using the Gemini API to analyze a a product sketch (in this case, a drawing of a Jet Backpack), create a marketing campaign for it, and output taglines in JSON format.
This notebook provides an example of how to prompt Gemini 1.5 Pro using an audio file. In this case, you'll use a sound recording of President John F. Kennedy’s 1961 State of the Union address.
System instructions allow you to steer the behavior of the model. By setting the system instruction, you are giving the model additional context to understand the task, provide more customized responses, and adhere to guidelines over the user interaction.
Using function calling allows you to control how the Gemini API acts when tools have been specified.
This notebook provides a quick example of how to prompt Gemini 1.5 Pro using a text file. In this case, you'll use a 400 page transcript from Apollo 11.
Use Google's latest model release, Gemini, to teach you what you want to know and compare those with ChatGPT's responses. The models are specifically prompted not to generate extra text to make it easier to compare any differences.
AI & Machine Learning
Use this self-paced lab from Google Cloud to inspect rich documents with Gemini.
Interactive demo of a few music transcription models created by Google's Magenta team. You can upload audio and have one of our models automatically transcribe it.
This Colab notebook lets you play with pretrained Transformer models for piano music generation, based on the Music Transformer model introduced by Huang et al. in 2018.
This notebook classifies movie reviews as positive or negative using the text of the review. This is an example of binary—or two-class—classification, an important and widely applicable kind of machine learning problem.
Demo for using Universal Encoder Multilingual Q&A model for question-answer retrieval of text, illustrating the use of question_encoder and response_encoder of the model.
This colab demonstrates how to create a variant of a provided agent (Example 1) and how to create a new agent from scratch (Example 2).
This colab allows you to easily view the trained baselines with Tensorboard (even if you don't have Tensorboard on your local machine!). Simply specify the game you would like to visualize and then run the cells in order.
The HParams dashboard in TensorBoard provides several tools to help with this process of identifying the best experiment or most promising sets of hyperparameters.
Data & Analytics
cuDF is a Python GPU DataFrame library for loading, joining, aggregating, filtering, and otherwise manipulating tabular data using a DataFrame style API in the style of pandas.
This notebook introduces how to work with timestamps, time intervals, periods, time deltas, and durations.
Getting started with data analysis on colab using python
Programmatic Google Colab Notebook Series (2018-2023)
This is a quick and dirty way to get a sense of what's trending on Twitter related to a particular Topic. For my use case, I am focusing on the city of Seattle but you can easily apply this to any topic.
Cloud Computing
The goal of this Colab notebook is to highlight some benefits of using Google BigQuery and Colab together to perform some common data science tasks.
In this tutorial, you learn how to train and deploy a churn prediction model for real-time inference, with the data in BigQuery and model trained using BigQuery ML, registered to Vertex AI Model Registry, and deployed to an endpoint on Vertex AI for online predictions.
In this tutorial, you learn how to package and deploy a PyTorch image classification model using a prebuilt Vertex AI container with TorchServe for serving online and batch predictions.
In this tutorial, you learn to use AutoML to create a tabular binary classification model from a Python script, and then learn to use Vertex AI Batch Prediction to make predictions with explanations.
Data Visualization
Patent landscaping is an analytical approach commonly used by corporations, patent offices, and academics to better understand the potential technical coverage of a large number of patents where manual review (i.e., actually reading the patents) is not feasible due to time or cost constraints.
Read, write, and show images and videos in a Colab notebook
Molecules can be represented as strings with SMILES. Simplified molecular-input line-entry system (SMILES) is a string based representation of a molecule.
Exploratory Data Analysis or (EDA) is understanding the data sets by summarizing their main characteristics and, usually, plotting them visually.
Education
Quick primer on Colab and Jupyter notebooks
Stanford CS231n Python Tutorial With Google Colab
In this tutorial, we will be exploring some advanced Python concepts and techniques using Google Colab.
Fun
Based on the model code in magenta and the publication: Exploring the structure of a real-time, arbitrary neural artistic stylization network.
Brax simulates physical systems made up of rigid bodies, joints, and actutators.
This example uses tf.keras to build a language model and train it on a Cloud TPU. This language model predicts the next character of text given the text so far. The trained model can generate new snippets of text that read in a similar style to the text training data.
Science
This Colab notebook allows you to easily predict the structure of a protein using a slightly simplified version of AlphaFold v2.3.2.
This Colab shows how to load the provided .npz file with rank- 49 factorizations of 𝓣4 in standard arithmetic, and how to compute the invariants ℛ and 𝒦 in order to demonstrate that these factorizations are mutually nonequivalent.
This notebook demonstrates how to setup the Earth Engine Python API in Colab and provides several examples of how to print and visualize Earth Engine processed data.
Notebook for running Molecular Dynamics (MD) simulations using OpenMM engine and AMBER force field for PROTEIN systems. This notebook is a supplementary material of the paper "Making it rain: Cloud-based molecular simulations for everyone" (link here) and we encourage you to read it before using this pipeline.