Learning Resources
Here you'll find a series of instructive and educational notebooks organized by topic areas.
Gemini API
Create a marketing campaign
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.
Analyze audio recordings
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.
Use System instructions in chat
Use System instructions in chat
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.
Function calling
Using function calling allows you to control how the Gemini API acts when tools have been specified.
Prompting with a text file
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.
Compare Gemini and ChatGPT responses
Compare Gemini and ChatGPT responses
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
Inspect Rich Documents with Gemini Multimodality and Multimodal RAG
Inspect Rich Documents with Gemini Multimodality and Multimodal RAG
Use this self-paced lab from Google Cloud to inspect rich documents with Gemini.
Music Transcription with Transformers
Music Transcription with Transformers
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.
Generating Music with Transformers
Generating Music with Transformers
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.
Text Classification with Movie Reviews
Text Classification with Movie Reviews
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.
Multilingual Universal Sentence Encoder Q&A Retrieval
Multilingual Universal Sentence Encoder Q&A Retrieval
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.
Create and Train a Custom RL Agent
Create and Train a Custom RL Agent
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).
Visualize RL Agent Training on TensorBoard
Visualize RL Agent Training on TensorBoard
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.
Hyperparameter Tuning with Tensorboard
Hyperparameter Tuning with Tensorboard
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
10 Minutes to RAPIDS cuDF's pandas accelerator mode
10 Minutes to RAPIDS cuDF's pandas accelerator mode
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.
Working with time series in Python
Working with time series in Python
This notebook introduces how to work with timestamps, time intervals, periods, time deltas, and durations.
Exploratory Data Analysis Intro
Exploratory Data Analysis Intro
Getting started with data analysis on colab using python
Advanced Business Analytics and Mathematics
Advanced Business Analytics and Mathematics
Programmatic Google Colab Notebook Series (2018-2023)
Twitter Pulse Checker
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
Colab + BigQuery — Perfect Together
Colab + BigQuery — Perfect Together
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.
Online prediction with BigQuery ML
Online prediction with BigQuery ML
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.
Serving PyTorch image models with prebuilt containers on Vertex AI
Serving PyTorch image models with prebuilt containers on Vertex AI
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.
AutoML training tabular binary classification model for batch explanation
AutoML training tabular binary classification model for batch explanation
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
Explore Patent Database with ML
Explore Patent Database with ML
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.
mediapy
Read, write, and show images and videos in a Colab notebook
Visualize Chemical Structures in a Notebook
Visualize Chemical Structures in a 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 with Python
Exploratory Data Analysis with Python
Exploratory Data Analysis or (EDA) is understanding the data sets by summarizing their main characteristics and, usually, plotting them visually.
Education
Colab Primer
Quick primer on Colab and Jupyter notebooks
Intro Python Tutorial
Stanford CS231n Python Tutorial With Google Colab
Advanced Python Tutorial
In this tutorial, we will be exploring some advanced Python concepts and techniques using Google Colab.
Fun
Fast Style Transfer for Arbitrary Styles
Fast Style Transfer for Arbitrary Styles
Based on the model code in magenta and the publication: Exploring the structure of a real-time, arbitrary neural artistic stylization network.
Brax - Physics Environments for Simulations
Brax - Physics Environments for Simulations
Brax simulates physical systems made up of rigid bodies, joints, and actutators.
Predict Shakespeare with Keras+CloudTPU
Predict Shakespeare with Keras+CloudTPU
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
AlphaFold
This Colab notebook allows you to easily predict the structure of a protein using a slightly simplified version of AlphaFold v2.3.2.
AlphaTensor
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.
Google Earth API
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.
Molecular Dynamics Simulations
Molecular Dynamics Simulations
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.