Instructive and educational notebooks

Top Notebooks

  • abstract art notebook thumbnail

    Analyze audio recordings

    This notebook provides an example of how to prompt Gemini Flash 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.

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    Get started with Video generation using Veo

    Learn how to use Veo to generate videos from text prompts and images. Control lighting, camera, audio, dialog, and more!

    See notebook

Gemini API

  • abstract art notebook thumbnail

    Create a marketing campaign

    This notebook contains a code 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.

    See notebook
  • abstract art notebook thumbnail

    Analyze audio recordings

    This notebook provides an example of how to prompt Gemini Flash 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.

    See notebook
  • abstract art notebook thumbnail

    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. Product-level behavior can be specified here, separate from prompts provided by end users.

    See notebook
  • abstract art notebook thumbnail

    Function calling

    Using function calling allows you to control how the Gemini API acts when tools have been specified

    See notebook
  • abstract art notebook thumbnail

    Prompting with a text file

    This notebook provides a quick example of how to prompt Gemini using a text file. In this case, you'll use a 400 page transcript from Apollo 11.

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook

AI & Machine Learning

  • abstract art notebook thumbnail

    Inspect Rich Documents with Gemini Multimodality and Multimodal RAG

    Use this self paced lab from Google Cloud to inspect rich documents with Gemini.

    See notebook
  • abstract art notebook thumbnail

    Music Transcriptions with Transformers

    This notebook is an 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.

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    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).

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    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 set of hyperparameters.

    See notebook

Data & Analytics

  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    Working with time series in Python

    This notebook introduces how to work with timestamps, time intervals, periods, time deltas, and durations.

    See notebook
  • abstract art notebook thumbnail

    Exploratory Data Analysis Intro

    Getting started with data analysis on colab using python.

    See notebook
  • abstract art notebook thumbnail

    Advanced Business Analytics and Mathematics

    Programmatic Google Colab Notebook Series (2018-2023)

    See on GitHub
  • abstract art notebook thumbnail

    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.

    See notebook

Cloud Computing

  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    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 BigQuer registered to Vertex AI Model Registry, and deployed to an...

    See notebook
  • abstract art notebook thumbnail

    Serving PyTorch image models with prebuilt containers on Vertex Al

    In this tutorial containers on Vertex Al package and deploy a PyTorch image classification model using a prebuilt Vertex Al container with TorchServe for serving online and batch predictions

    See notebook
  • abstract art notebook thumbnail

    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 Al Batch Prediction to make predictions with explanations

    See notebook

Data Visualization

  • abstract art notebook thumbnail

    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 readin..

    Read blog post
  • abstract art notebook thumbnail

    mediapy

    Read, write, and show images and videos in a Colab notebook

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook

Education

  • abstract art notebook thumbnail

    Colab Primer

    Quick primer on Colab and Jupyter notebooks

    See notebook
  • abstract art notebook thumbnail

    Intro Python Tutorial

    Stanford CS231n Python Tutorial With Google Colab

    See notebook
  • abstract art notebook thumbnail

    Advanced Python Tutorial

    In this tutorial, we will be exploring some advanced Python concepts and techniques using Google Colab

    See notebook

Fun

  • abstract art notebook thumbnail

    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.

    See notebook
  • abstract art notebook thumbnail

    Brax - Physics Environments for Simulations

    Brax simulates physical systems made up of rigid bodies, joints, and actutators.

    See notebook
  • abstract art notebook thumbnail

    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 th...

    See notebook
  • abstract art notebook thumbnail

    Binary Classification of Rice

    Examine a rice dataset and create a binary classifier to sort grains of rice into two species. Then evaluate the performance of the model.

    See notebook

Science

  • abstract art notebook thumbnail

    AlphaFold

    This Colab notebook allows you to easily predict the structure of a protein using a slightly simplified version of AlphaFold v2.3.2.

    See notebook
  • abstract art notebook thumbnail

    AlphaTensor

    This Colab shows how to load the provided .npz file with rank- 49 factorizations of Y4 in standard arithmetic, and how to compute the invariants IZ and :IC in order to demonstrate that these factorizations are mutually...

    See notebook
  • abstract art notebook thumbnail

    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 simulation...

    See notebook
  • abstract art notebook thumbnail

    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.

    See notebook