Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Refactor README.md file to divide the folder into 2 sections: #3686

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 5, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 38 additions & 6 deletions notebooks/README.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,52 @@
# Notebook Tutorials
# AI Platform Notebooks

This directory contains Jupyter notebook tutorials for Google Cloud Platform.
The tutorials assume you have performed the following steps:
[AI Platform Notebooks](https://cloud.google.com/ai-platform-notebooks)
is a managed service that offers an integrated and secure JupyterLab
environment for data scientists and machine learning developers to
experiment, develop, and deploy models into production.

1. Install Jupyter notebooks ([instructions](https://jupyter.org/install))
This directory contains AI Platform Notebooks code samples and
tutorials. The tutorials are divided into 2 sections:
- AI Platform Notebooks [API code samples](samples)
- AI Platform Notebooks [tutorials](tutorials)

## Notebooks API

In [this](samples) folder you will find Python code samples to interact
with the
[AI Platform Notebooks API](https://cloud.google.com/ai-platform/notebooks/docs/reference/rest)

## AI Platform Notebooks tutorials

**Run in AI Platform Notebooks**

1. Create a Notebook
[instance](https://cloud.google.com/ai-platform/notebooks/docs#how-to)
2. Clone this repository via Jupyter console or using the Git clone
button

```bash
git clone https://github.com/GoogleCloudPlatform/python-docs-samples.git
```

3. Open the tutorials folder and open the Jupyter notebooks


**Run locally**

1. Install Jupyter notebooks
([instructions](https://jupyter.org/install))
1. Install the dependencies in the [requirements.txt](./requirements.txt) file ([instructions below](#install-the-dependencies))
1. Registered the `google-cloud-bigquery` magic commands ([instructions below](#register-magics-and-configure-matplotlib))
1. Set `matplotlib` to render inline ([instructions below](#register-magics-and-configure-matplotlib))

## Install the dependencies
### Install the dependencies

Install the dependencies with the following command:

pip install --upgrade -r requirements.txt

## Register magics and configure matplotlib
### Register magics and configure matplotlib

You can either perform these set up steps in a single notebook, or add the
steps to your IPython configuration file to apply to all notebooks.
Expand Down
39 changes: 39 additions & 0 deletions notebooks/samples/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# AI Platform Notebooks API code samples

Sample command-line programs for interacting with the Notebooks API.

## Prerequisites to run locally:

* [Python 3](https://www.python.org/downloads/)
* [pip](https://pypi.python.org/pypi/pip)

Go to the [Google Cloud Console](https://console.cloud.google.com).

Under API Manager, search for the Google Cloud Notebooks API and enable
it. You can also enable API via Command Line:

```bash
gcloud services enable notebooks.googleapis.com
```

## Set Up Your Local Dev Environment

To install, run the following commands. If you want to use
[virtualenv](https://virtualenv.readthedocs.org/en/latest/)
(recommended), run the commands within a virtualenv.

```bash
pip install -r requirements.txt
```

**Note:** While this sample demonstrates interacting with Notebooks via
the API, the functionality demonstrated here could also be accomplished
using the Cloud Console or the
[gcloud CLI](https://cloud.google.com/sdk/gcloud/reference/beta/notebooks)

## Authentication

Please see the
[Google cloud authentication guide](https://cloud.google.com/docs/authentication/).
The recommended approach to running these samples is a Service Account
with a JSON key.
1 change: 1 addition & 0 deletions notebooks/samples/requirements-test.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest==5.3.2
1 change: 1 addition & 0 deletions notebooks/samples/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
google-api-python-client>=1.8.2