How to run the practice code of the book "Creating a profitable AI with Python" on Google Colaboratory

Introduction

He is the author of the book "Creating a Profitable AI with Python".

スクリーンショット 2020-09-19 14.27.39.png

Amazon link (book) https://www.amazon.co.jp/dp/4296106961

Amazon Link (Kindle) https://www.amazon.co.jp/dp/B08F9P726T

In this book, all the training codes are published on the book support site. https://github.com/makaishi2/profitable_ai_book_info/blob/master/README.md

These codes are supposed to run on Google Colaboratory, a cloud environment that can be used without installation. If you are considering purchasing a book, this article will explain the procedure for running the practice code of this book on Google Colaboratory so that you can use it as a reference for trying out the practice code.

Advance preparation

There are two necessary preparations: getting a gmail account and installing a Chrome browser.

gmail account

As for gmail account acquisition, there are guides in various places, so I will omit the explanation.

Introducing Chrome

The recommended browser for running Colaboratory is Google Chrome. If you haven't installed it on your computer yet, please download and install it from the link below.

https://www.google.co.jp/chrome/

Log in to gmail with chrome

After completing the above two preparations, launch Chrome and log in to gmail. Now everything is ready.

Start Colaboratory

Launch of Colaboratory

Open a new tab and enter the URL below.

https://colab.research.google.com/

A screen like the one below will appear. Select the ** Github ** tab.

スクリーンショット 2020-09-13 18.44.19.png

When the screen below appears ① Enter https://github.com/makaishi2 in the top field and press the Enter key.

② The field below it will change to dropdown, so click it and select profitable_ai_book_info.

スクリーンショット 2020-09-13 18.46.50.png

The screen below will appear, so select the file you want to read.

Please refer to the following link for the correspondence between the file name and the contents. https://github.com/makaishi2/profitable_ai_book_info/blob/master/refs/notebooks.md

For example, if you want to select the practice in Chapter 3, select ch03_03_first_ml.ipynb as shown in the figure below.

スクリーンショット 2020-09-13 18.54.17.png

If it looks like the figure below, the notebook has been successfully loaded.

スクリーンショット 2020-09-13 18.56.53.png

As a minimum usage, click the mouse in the "#Introduction of Japanese localization library" area at the top to select it, and then repeat Shift + Enter to make one unit of processing called a cell. It is possible to execute them one by one. Only at the very beginning, the warning below will appear, so select "** Run as is **" on the right.

スクリーンショット 2020-09-13 18.58.47.png

If you can run it to the end, you should see this screen.

スクリーンショット 2020-09-13 19.01.58.png

Recommended Posts

How to run the practice code of the book "Creating a profitable AI with Python" on Google Colaboratory
Run the program without building a Python environment! !! (How to get started with Google Colaboratory)
A memo on how to overcome the difficult problem of capturing FX with AI
Introducing the book "Creating a profitable AI with Python" that allows you to learn machine learning in the shortest course
How to easily draw the structure of a neural network on Google Colaboratory using "convnet-drawer"
[Introduction to Python] How to sort the contents of a list efficiently with list sort
How to get a list of files in the same directory with python
[Introduction to Python] How to get the index of data with a for statement
Run the output code with tkinter, saying "A, pretending to be B" in python
How to identify the element with the smallest number of characters in a Python list?
Run the Caffe model on Google Colaboratory to predict the age and gender of the world's supermodels
Detailed explanation How to run the sample code of UNIX programming 3rd edition on Mac
How to know the number of GPUs from python ~ Notes on using multiprocessing with pytorch ~
How to determine the existence of a selenium element in Python
[Introduction to Python] How to split a character string with the split function
How to check the memory size of a variable in Python
How to check the memory size of a dictionary in Python
How to connect to Cloud Firestore from Google Cloud Functions with python code
How to update the python version of Cloud Shell on GCP
How to send a request to the DMM (FANZA) API with python
Run the output code on the local web server as "A, pretending to be B" in python
How to search Google Drive with Google Colaboratory
Run Python code on A2019 Community Edition
How to run a Maya Python script
Have Alexa run Python to give you a sense of the future
How to crop the lower right part of the image with Python OpenCV
[Python] Explains how to use the range function with a concrete example
I was addicted to creating a Python venv environment with VS Code
Steps to create a Python virtual environment with VS Code on Windows
I tried to get the authentication code of Qiita API with Python.
How to draw a vertical line on a heatmap drawn with Python seaborn
Run a batch of Python 2.7 with nohup on Amazon Linux AMI on EC2
[Introduction to Python] How to write a character string with the format function
Python code to determine the monthly signal of a relative strength investment
"A book to train programming skills to fight in the world" Python code answer example --1.9 Rotation of strings
How to automatically check if the code you wrote in Google Colaboratory corresponds to the python coding standard "pep8"
How to pass the execution result of a shell command in a list in Python
How to calculate the volatility of a brand
Try to solve the traveling salesman problem with a genetic algorithm (Python code)
How to read a CSV file with Python 2/3
How to publish a blog on Amazon S3 with the static Blog engine'Pelican'for Pythonista
Strategy on how to monetize with Python Java
The story of creating Botonyan that returns the contents of Google Docs in response to a specific keyword on Slack
[Circuit x Python] How to find the transfer function of a circuit using Lcapy
How to drop Google Docs in one folder in a .txt file with python
How to access the contents of a Linux disk on a Mac (but read-only)
Around the authentication of PyDrive2, a package that operates Google Drive with Python
How to run MeCab on Ubuntu 18.04 LTS Python
[python] How to sort by the Nth Mth element of a multidimensional array
[Python] How to save images on the Web at once with Beautiful Soup
How to specify attributes with Mock of python
Introduction to Python with Atom (on the way)
Checklist on how to avoid turning the elements of numpy's array with for
Note: How to get the last day of the month with python (added the first day of the month)
[Python] How to deal with the is instance error "is instance () arg 2 must be a type or tuple of types"
Convert the character code of the file with Python3
How to deal with "^ [[A ^ [[B ^ [[C ^ [[D"] when you press the arrow keys when executing python on mac
"A book to train programming skills to fight in the world" Python code answer example --1.2 Count the number of the same characters
How to set a shared folder with the host OS in CentOS7 on VirtualBOX
An easy way to pad the number with zeros depending on the number of digits [Python]
[Note] How to write QR code and description in the same image with python