This is a 90-min tech talk along with hands-on exercises gives a comprehensive, vendor-agnostic overview of cloud computing, primarily targeting educators in the higher education market but is open to any developer. This is followed by an introduction to products in Google Cloud Platform, focusing on its serverless and machine learning products. .
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
How Google Cloud Platform can help in the classroom/lab
1. Google Cloud Platform
How GCP can help in the classroom/lab
Wesley Chun
Developer Advocate, Google
Adjunct CS Faculty, Foothill College
Laurie White
CS Professor Emeritus, Mercer University
GCP Developer Relations, Google
G Suite Dev Show
goo.gl/JpBQ40
About the speaker
Developer Advocate, Google
● Mission: enable current and future
developers everywhere to be
successful using Google Cloud and
other Google developer tools & APIs
● Videos: host of the G Suite Dev Show
on YouTube
● Blogs: developers.googleblog.com &
gsuite-developers.googleblog.com
● Twitters: @wescpy, @GoogleDevs,
@GSuiteDevs
Previous experience / background
● Software engineer & architect for 20+ years
● One of the original Yahoo!Mail engineers
● Author of bestselling "Core Python" books
(corepython.com)
● Technical trainer, teacher, instructor since
1983 (Computer Science, C, Linux, Python)
● Fellow of the Python Software Foundation
● AB (Math/CS) & CMP (Music/Piano), UC
Berkeley and MSCS, UC Santa Barbara
● Adjunct Computer Science Faculty, Foothill
College (Silicon Valley)
2. Why and Agenda
● Cloud has taken industry by storm (all?)
● Not enough cloud computing in higher-ed curriculum
● How the cloud can help with your courses/research
● You leave with hands-on experience using cloud computing services
● Help prep next-generation cloud-ready workforce
● We do many student events; faculty/staff: "What about us?!?"
Cloud computing
overview
1
Introduction to
Google Cloud
2
Hosting your code
(+storage options)
3
Machine
Learning
4 5
Other APIs
to consider
6
Wrap-up
Cloud computing overview
All you need to know about the cloud1
3. What is cloud computing?
spar
What is Google Cloud Platform?
Getting things done using someone else’s computers, especially
where someone else worries about maintenance, provisioning, system
administration, security, networking, failure recover, etc.
4. Google Compute Engine, Google Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
Cloud service levels/"pillars"
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
Google BigQuery, Cloud SQL,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Google Apps Script, App Maker
Salesforce1/force.com
G Suite (Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Summary of responsibility
SaaS
Software as a Service
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
IaaS
Infrastructure as a Service
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
PaaS
Platform as a Service
Managed by YOU Managed by cloud vendor
Applications
Data
Runtime
Middleware
OS
Virtualization
Servers
Storage
Networking
on-prem
all you, no cloud
5. Theme - Spec/Reqs
Logistics - Design app
Space - Provision HW
Food - Build & serve app
Manage - Manage app
on-prem
(DIY)
IaaS
(Compute Engine)
PaaS
(App Engine/GCF)
SaaS
(G Suite)
Pick theme
Plan party
Find space
Cook
On-call
Pick theme
Plan party
Rent hall
Cook
On-call
Pick theme
Plan party
Rent hall
Hire Caterer
Hire manager
Pick theme
Hire planner
Rent hall
Hire caterer
Hire manager
Imagine you’re hosting a party...
How can Google Cloud help in higher ed?
● What can we provide faculty, researchers, IT staff, students?
○ Virtual machines, GPUs, and variety of data storage
○ Ability to craft & design your own network/subnet
○ Pre-trained machine learning models
○ Container-hosting, ML build & deploy infrastructure
○ Serverless compute & data services
○ Additional or emergency compute & storage capacity
○ Productivity tools students already use (G Suite)
○ Education grants (use our cloud w/o personal credit cards)
6. Possible courses using Google Cloud
● Most likely
○ Software Engineering, Cloud Computing, Machine Learning/AI
○ Networking (OS), Database (RDBMS, NoSQL), System Admin/DevOps
○ Web app courses, mobile app courses, business applications
○ Any class where student coursework requires coding
● Possible
○ Data Structures & Algorithms, Compilers, Numerical Analysis (math)
○ Lower division undergrad intro to CS, independent study
○ (outside Eng) Geography, Library & Information Studies, b-school
○ Capstone projects, university entrepreneurship center projects
2 Introduction to
Google Cloud
GCP and G Suite tools & APIs
9. What is Google Cloud Platform?
GCP lets you build & host code (web apps, mobile
backends, web services, containers), store &
analyze data, and much more, all on Google’s
highly-scalable & reliable computing infrastructure
Compute
Big Data
BigQuery
Cloud
Dataflow
Cloud
Dataproc
Cloud
Datalab
Cloud
Pub/Sub
Genomics
Cloud AI/ML
Cloud Machine
Learning Engine
Cloud
Vision
Cloud
Speech-to-Text
Cloud Natural
Language
Cloud
Translation
Cloud
Jobs
Cloud
Dataprep
Cloud Video
Intelligence
Advanced
Solutions Lab
Compute
Engine
App
Engine
Kubernetes
Engine
GPU
Cloud
Functions
Identity & Security
Cloud IAM
Cloud Resource
Manager
Cloud Security
Scanner
Key
Management
Service
BeyondCorp
Data Loss
Prevention
Identity-Aware
Proxy
Security Key
Enforcement
Cloud
AutoML
Cloud
Text-to-Speech
Cloud TPU
Dialogflow
Enterprise
Edition
Cloud
Composer
Cloud Security
Command
Center
Cloud Run
AutoML
Tables
10. Developer Tools
Cloud SDK
Cloud Source
Repositories
Maven App
Engine Plugin
Cloud Tools
for IntelliJ
Cloud
Tools for
PowerShell
Cloud
Tools for
Visual Studio
Container
Registry
Cloud Tools
for Eclipse
Cloud Build
API Platform & Ecosystems
API
Analytics
API
Monetization
Apigee API
Platform
Apigee
Sense
Cloud
Endpoints
Developer
Portal
Gradle App
Engine Plugin
IDE plugins
Internet of Things
Cloud IoT
Core
Data (storage,
databases, transfer)
Cloud
Storage
Cloud
Bigtable
Cloud
Datastore
Cloud SQL
Cloud
Spanner
Persistent
Disk
Cloud
Memorystore
Cloud
Filestore
Cloud
Test Lab
Cloud IoT
Edge
Container-
Optimized OS
Healthcare
API
Cloud Code
Cloud
Firestore
Transfer
Appliance
Networking
Virtual
Private Cloud
Cloud Load
Balancing
Cloud
CDN
Dedicated
Interconnect
Cloud DNS
Cloud
Network
Cloud
External IP
Addresses
Cloud
Firewall Rules
Cloud
Routes
Cloud VPN
Management Tools
Stackdriver Monitoring Logging
Error
Reporting
Trace
Debugger
Cloud
Deployment
Manager
Cloud
Console
Cloud
Shell
Cloud Mobile
App
Cloud
Billing API
Cloud
APIs
Cloud
Router
Partner
Interconnect
Cloud Armor
Standard
Network Tier
Premium
Network Tier
Profiler
GCP products and
services without a
unique icon have a
generic hexagon.
Cloud NAT
11. Cloud/GCP console
console.cloud.google.com
● Hub of all developer activity
● Applications == projects
○ New project for new apps
○ Projects have a billing acct
● Manage billing accounts
○ Financial instrument required
○ Personal or corporate credit cards,
Free Trial, and education grants
● Access GCP product settings
● Manage users & security
● Manage APIs in devconsole
Navigating the Cloud console
12. ● View application statistics
● En-/disable Google APIs
● Obtain application credentials
Using Google APIs
goo.gl/RbyTFD
API manager aka Developers Console (devconsole)
console.developers.google.com
OAuth2 or
API key
HTTP-based REST APIs 1
HTTP
2
Google APIs request-response workflow
● Application makes request
● Request received by service
● Process data, return response
● Results sent to application
(typical client-server model)
13. What is Google Cloud Platform?some Google Cloud Platform products (tl;dr)
Compute Big Data
BigQuery
Cloud
Dataflow
Cloud
Dataproc
Cloud
Datalab
Cloud
Pub/Sub
Genomics
Storage & Databases
Cloud
Storage
Cloud
Bigtable
Cloud
Datastore
Cloud SQL
Cloud
Spanner
Persistent
Disk
Machine Learning
Cloud ML
Engine
Cloud
Vision API
Cloud
Speech APIs
Cloud Natural
Language API
Cloud
Translation
API
Cloud
Jobs API
Data
Studio
Cloud
Dataprep
Cloud Video
Intelligence
API
AutoML auite
Compute
Engine
App
Engine
Kubernete
s Engine
GPU
Cloud
Functions
Container-
Optimized OS
Identity & Security
Cloud IAM
Cloud Resource
Manager
Cloud Security
Scanner
Key
Management
Service
BeyondCorp
Data Loss
Prevention API
Identity-Aware
Proxy
Security Key
Enforcement
Transfer
Appliance
Cloud
Firestore
Internet of Things
Cloud IoT
Core
QwikLabs codelabs
● Codelabs == self-paced, hands-on tutorials
● "Quests" == group of codelabs arranged in a "learning path"
● No Google account ( provisioned on-the-fly)
● Apply for QwikLabs coupons at cloud.google.com/edu
○ Individual grant 200 credits … OR
○ Request 5000 credits for use in courses
● Special for attendees of this event!
○ Credits (15 credits) to complete a pair of quests:
■ GCP Essentials and one other; recommended: "Baseline" series
○ Sign up today at bit.ly/2kJL39T … link expires 2019 Dec 20
15. Running Code: Compute Engine
>
Google Compute Engine
delivers configurable
virtual machines of
all shapes and sizes,
from "micro" to 416
vCPUs, 11.75 TB RAM,
64 TB HDD or SSD disk
(Debian, CentOS, CoreOS, SUSE, Red Hat
Enterprise Linux, Ubuntu, FreeBSD;
Windows Server 2008 R2, 2012 R2, 2016)
cloud.google.com/compute
Classroom use
Provide servers on demand for:
● Web dev classes
● DevOps/SysAdmin courses
● R-studio and similar projects
● Networking classes
● Linux or OS courses
How? Find "Compute Engine" in
left-nav of GCP cloud console:
16. Compute Engine
exercise
Let's create a free* VM now!
* users get one free "micro" VM/month (see cloud.google.com/free)
(If you forget all this later, go to gcplab.me and search for "Creating a Virtual Machine.")
>
Google Compute Engine configurable
VMs of all shapes & sizes, from
"micro" to 416 vCPUs, 11.75 TB RAM,
64 TB HDD/SSD plus Google Cloud
Storage for blobs/cloud data lake
(Debian, CentOS, CoreOS, SUSE, Red Hat Enterprise Linux,
Ubuntu, FreeBSD; Windows Server 2008 R2, 2012 R2, 2016)
cloud.google.com/compute
cloud.google.com/storage
Yeah, we got VMs & big disk… but why*?
17. Serverless: what & why
● What is serverless?
○ Misnomer
○ "No worries"
○ Developers focus on writing code & solving business problems*
● Why serverless?
○ Fastest growing segment of cloud... per analyst research*:
■ $1.9B (2016) and $4.25B (2018) ⇒ $7.7B (2021) and $14.93B (2023)
○ What if you go viral? Autoscaling: your new best friend
○ What if you don't? Code not running? You're not paying.
* in USD; source:Forbes (May 2018), MarketsandMarkets™ & CB Insights (Aug 2018)
Google Compute Engine, Google Cloud Storage
AWS EC2 & S3; Rackspace; Joyent
SaaS
Software as a Service
PaaS
Platform as a Service
IaaS
Infrastructure as a Service
G Suite (Google Apps)
Yahoo!Mail, Hotmail, Salesforce, Netsuite
Google App Engine, Cloud Functions
Heroku, Cloud Foundry, Engine Yard, AWS Lambda
Google BigQuery, Cloud SQL,
Cloud Datastore, NL, Vision, Pub/Sub
AWS Kinesis, RDS; Windows Azure SQL, Docker
Serverless: PaaS-y compute/processing
Google Apps Script, App Maker
Salesforce1/force.com
18. Why does App Engine exist?
● Focus on app not DevOps
○ Web app
○ Mobile backend
○ Cloud service
● Enhance productivity
● Deploy globally
● Fully-managed
● Auto-scaling
● Pay-per-use
● Familiar languages
App Engine to the rescue!!
● Focus on app not DevOps
● Enhance productivity
● Deploy globally
● Fully-managed
● Auto-scaling
● Pay-per-use
● Familiar standard runtimes
● 2nd gen std platforms
○ Python 3.7
○ Java 8, 11
○ PHP 7.2
○ Go 1.11
○ JS/Node.js 8, 10
○ Ruby 2.5
20. Running Code: Cloud Functions
Don't have an entire app? Just want
to deploy small microservices or
"RPCs" online globally? That's what
Google Cloud Functions are for!
(+Firebase version for mobile apps)
cloud.google.com/functions
firebase.google.com/products/functions
Why does Cloud Functions exist?
● Don't have entire app?
○ No framework "overhead" (LAMP, MEAN...)
○ Deploy microservices
● Event-driven
○ Triggered via HTTP or background events
■ Pub/Sub, Cloud Storage, Firebase, etc.
○ Auto-scaling & highly-available; pay per use
● Flexible development environment
○ Cmd-line or developer console
● Cloud Functions for Firebase
○ Mobile app use-cases
● Available runtimes
○ JS/Node.js 6, 8, 10
○ Python 3.7
○ Go 1.11, 1.12
○ Java 8
21. main.py
def hello_world(request):
return 'Hello World!'
Deploy:
$ gcloud functions deploy hello --runtime python37 --trigger-http
Access globally (curl):
curl -X POST https://GCP_REGION-PROJECT_ID.cloudfunctions.net/hello
-H "Content-Type:application/json"
Access globally (browser):
GCP_REGION-PROJECT_ID.cloudfunctions.net/hello
Hello World (Python "MVP")
No cmd-line
access?
Use in-browser
dev environment!
● setup
● code
● deploy
● test
22. Cloud Functions
exercise
Python QuickStart tutorial
(also in Node.js & Go)
Running Code: Cloud Run
Got a containerized app? Want its
flexibility along with the convenience
of serverless that's fully-managed
plus auto-scales? Google Cloud Run is
exactly what you're looking for!
cloud.google.com/run
23. Code, build, deploy
.js .rb .go
.sh.py ...
● Any language, library, binary
○ HTTP port, stateless
● Bundle into container
○ Build w/Docker OR
○ Google Cloud Build
○ Image ⇒ Container Registry
● Deploy to Cloud Run (managed or GKE)
StateHTTP
https://yourservice.run.app
Hello World (3 files: Python "MVP")
Dockerfile
FROM python:3.7
ENV APP_HOME /app
ENV TARGET MHacks2019
WORKDIR $APP_HOME
COPY . .
RUN pip install Flask gunicorn
CMD exec gunicorn --bind :$PORT --workers 1 --threads 8 app:app
cloud.google.com/run/docs/quickstarts/build-and-deploy or
github.com/knative/docs/tree/master/docs/serving/samples/h
ello-world/helloworld-python
.dockerignore
Dockerfile
README.md
*.pyc
*.pyo
*.pyd
__pycache__
25. Cloud Run exercise
Python QuickStart tutorial
(also in Node.js, Java, Ruby, C#/.NET, PHP,
Dart, Kotlin, Go, Rust)
Storage
(where to put your data)
26. Storing Data: Cloud Storage & Cloud Filestore
cloud.google.com/storage
cloud.google.com/filestore
Storing Data: Cloud SQL
SQL servers in the cloud
High-performance, fully-managed
600MB to 416GB RAM; up to 64 vCPUs
Up to 10 TB storage; 40,000 IOPS
Types:
MySQL
Postgres
SQLServer (2019)
cloud.google.com/sql
27. Storing Data: Cloud Datastore
Cloud Datastore: a fully-
managed, highly-scalable
NoSQL database for your web
and mobile applications
cloud.google.com/datastore
Storing Data: Firebase
Firebase data is stored
as JSON & synchronized in
real-time to every
connected client; other
tools + FB == v2 mobile
development platform
firebase.google.com
28. Storing Data: Cloud Firestore
The best of both worlds: the
next generation of Cloud
Datastore (w/product rebrand)
plus features from the
Firebase realtime database
cloud.google.com/firestore
● Ordinary database - explicitiy query database for
new updates (but when?)
● Realtime database - automatically receive deltas
when database updated (setup client listener object)
● Highly scalable database
● Multi-regional data replication
● Strong consistency (vs. eventual consistency): read
your writes!
Cloud Firestore key features
29. Cloud Firestore data model
collections subcollections
Cloud Firestore easy querying
35. Google Photos
Did you ever stop
to notice this app
has a search bar?!?
Machine Learning
(analyze your data)
36. GCP Machine Learning APIs
● Gain insights from data using GCP's
pre-trained machine learning models
● Leverage the same technology as
Google Translate, Photos, and Assistant
● Requires ZERO prior knowledge of ML
● If you can call an API, you can use AI/ML!
Vision Video
Intelligence
Speech
(S2T & T2S)
Natural
Language
Translation
Machine Learning: Cloud Vision
Google Cloud Vision API
enables developers to extract
metadata & understand the
content of an image
cloud.google.com/vision
37. from google.cloud import vision
image_uri = 'gs://cloud-samples-data/vision/using_curl/shanghai.jpeg'
client = vision.ImageAnnotatorClient()
image = vision.types.Image()
image.source.image_uri = image_uri
response = client.label_detection(image=image)
print('Labels (and confidence score):')
print('=' * 30)
for label in response.label_annotations:
print(f'{label.description} ({label.score*100.:.2f}%)')
Vision: label annotation/object detection
$ python3 label-detect.py
Labels (and confidence score):
==============================
People (95.05%)
Street (89.12%)
Mode of transport (89.09%)
Transport (85.13%)
Vehicle (84.69%)
Snapshot (84.11%)
Urban area (80.29%)
Infrastructure (73.14%)
Road (72.74%)
Pedestrian (68.90%)
Vision: label annotation/object detection
codelabs.developers.google.com/codelabs/cloud-vision-api-python#6
39. Machine Learning: Cloud Natural Language
Google Cloud Natural Language API
reveals the structure & meaning
of text; also performs content
classification and sentiment
analysis; multi-lingual
cloud.google.com/language
Simple sentiment & classification analysis
TEXT = '''Google, headquartered in Mountain View, unveiled the new
Android phone at the Consumer Electronics Show. Sundar Pichai said
in his keynote that users love their new Android phones.'''
print('TEXT:', TEXT)
data = {'type': 'PLAIN_TEXT', 'content': TEXT}
NL = discovery.build('language', 'v1', developerKey=API_KEY)
# sentiment analysis
sent = NL.documents().analyzeSentiment(
body={'document': data}).execute().get('documentSentiment')
print('nSENTIMENT: score (%s), magnitude (%s)' % (sent['score'], sent['magnitude']))
# content classification
print('nCATEGORIES:')
cats = NL.documents().classifyText(body={'document': data}).execute().get('categories')
for cat in cats:
print('* %s (%s)' % (cat['name'][1:], cat['confidence']))
40. Simple sentiment & classification analysis
$ python nl_sent_simple.py
TEXT: Google, headquartered in Mountain View, unveiled the new Android
phone at the Consumer Electronics Show. Sundar Pichai said in
his keynote that users love their new Android phones.
SENTIMENT: score (0.3), magnitude (0.6)
CATEGORIES:
* Internet & Telecom (0.76)
* Computers & Electronics (0.64)
* News (0.56)
Machine Learning: Cloud Speech
Google Cloud Speech APIs enable
developers to convert
speech-to-text and vice versa
cloud.google.com/speech
cloud.google.com/text-to-speech
41. Text-to-Speech: synthsizing audio text
# request body (with text body using 16-bit linear PCM audio encoding)
body = {
'input': {'text': text},
'voice': {
'languageCode': 'en-US',
'ssmlGender': 'FEMALE',
},
'audioConfig': {'audioEncoding': 'LINEAR16'},
}
# call Text-to-Speech API to synthesize text (write to text.wav file)
T2S = discovery.build('texttospeech', 'v1', developerKey=API_KEY)
audio = T2S.text().synthesize(body=body).execute().get('audioContent')
with open('text.wav', 'wb') as f:
f.write(base64.b64decode(audio))
Speech-to-Text: transcribing audio text
# request body (16-bit linear PCM audio content, i.e., from text.wav)
body = {
'audio': {'content': audio},
'config': {
'languageCode': 'en-US',
'encoding': 'LINEAR16',
},
}
# call Speech-to-Text API to recognize text
S2T = discovery.build('speech', 'v1', developerKey=API_KEY)
rsp = S2T.speech().recognize(
body=body).execute().get('results')[0]['alternatives'][0]
print('** %.2f%% confident of this transcript:n%r' % (
rsp['confidence']*100., rsp['transcript']))
42. Speech-to-Text: transcribing audio text
$ python s2t_demo.py
** 92.03% confident of this transcript:
'Google headquarters in Mountain View unveiled the new
Android phone at the Consumer Electronics Show Sundar
pichai said in his keynote that users love their new
Android phones'
Machine Learning: Cloud Video Intelligence
Google Cloud Video Intelligence
API makes videos searchable, and
discoverable, by extracting
metadata. Other features: object
tracking, shot change detection,
and text detection
cloud.google.com/video-intelligence
43. Video intelligence: make videos searchable
# request body (single payload, base64 binary video)
body = {
"inputContent": video,
"features": ['LABEL_DETECTION', 'SPEECH_TRANSCRIPTION'],
"videoContext": {"speechTranscriptionConfig": {"languageCode": 'en-US'}},
}
# perform video shot analysis followed by speech analysis
VINTEL = discovery.build('videointelligence', 'v1', developerKey=API_KEY)
resource = VINTEL.videos().annotate(body=body).execute().get('name')
while True:
results = VINTEL.operations().get(name=resource).execute()
if results.get('done'):
break
time.sleep(random.randrange(8)) # expo-backoff probably better
Video intelligence: make videos searchable
# display shot labels followed by speech transcription
for labels in results['response']['annotationResults']:
if 'shotLabelAnnotations' in labels:
print('n** Video shot analysis labeling')
for shot in labels['shotLabelAnnotations']:
seg = shot['segments'][0]
print(' - %s (%.2f%%)' % (
shot['entity']['description'], seg['confidence']*100.))
if 'speechTranscriptions' in labels:
print('** Speech transcription')
speech = labels['speechTranscriptions'][0]['alternatives'][0]
print(' - %r (%.2f%%)' % (
speech['transcript'], speech['confidence']*100.))
44. Video intelligence: make videos searchable
$ python3 vid_demo.py you-need-a-hug.mp4
** Video shot analysis labeling
- vacation (30.62%)
- fun (61.53%)
- interaction (38.93%)
- summer (57.10%)
** Speech transcription
- 'you need a hug come here' (79.27%)
Machine Learning: Cloud Translation
Access Google Translate
programmatically through this
API; translate an arbitrary
string into any supported
language using state-of-the-art
Neural Machine Translation
cloud.google.com/translate
45. Translate some texts: “Hello World!”
const {Translate} = require('@google-cloud/translate');
const translate = new Translate({projectConfig});
const text = 'Hello World!'; // Text to translate
const target = 'ru'; // Target language
// Translates some text into Russian
const translation = await translate.translate(text, {from: 'en', to:
target}));
// Translation: Привет, мир!
console.log('Translation:', translation[0]);
Machine Learning: AutoML
AutoML: a suite of cloud APIs for
developers with limited machine
learning expertise; chooses the best
models & allows for further training
of those models for your data
(Translation, Vision, Natural Language,
Video Intelligence, Tables)
cloud.google.com/automl
cloud.google.com/automl-tables
46. ● General steps
a. Prep your training data
b. Create dataset
c. Import items into dataset
d. Create/train model
e. Evaluate/validate model
f. Make predictions
Cloud AutoML: how to use
Machine Learning: Cloud ML Engine
Google Cloud Machine Learning Engine
is a managed service that lets you
build, train, and deploy machine
learning models (scikit-learn,
XGBoost, Keras, TensorFlow), then make
predictions with trained models
cloud.google.com/ml-engine
47. Full Spectrum of AI & ML Offerings
App Developer Data Scientist ML Scientist/Researcher
Use pre-built models Use/extend OSS SDK
ML EngineAuto ML
Build custom models
ML APIs
Other APIs to consider
What else may be useful?5
48. Big data
(move, process, and
analyze your data)
Storing and Analyzing Data: BigQuery
Google BigQuery is a fast, highly
scalable, fully-managed data
warehouse in the cloud for
analytics with built-in machine
learning (BQML); issue SQL queries
across multi-terabytes of data
cloud.google.com/bigquery
49. BigQuery: querying Shakespeare words
TITLE = "The top 10 most common words in all of Shakespeare's works"
QUERY = '''
SELECT LOWER(word) AS word, sum(word_count) AS count
FROM [bigquery-public-data:samples.shakespeare]
GROUP BY word ORDER BY count DESC LIMIT 10
'''
rsp = BQ.query(body={'query': QUERY}, projectId=PROJ_ID).execute()
print('n*** Results for %r:n' % TITLE)
for col in rsp['schema']['fields']: # HEADERS
print(col['name'].upper(), end='t')
print()
for row in rsp['rows']: # DATA
for col in row['f']:
print(col['v'], end='t')
print()
Top 10 most common Shakespeare words
$ python bq_shake.py
*** Results for "The most common words in all of Shakespeare's works":
WORD COUNT
the 29801
and 27529
i 21029
to 20957
of 18514
a 15370
you 14010
my 12936
in 11722
that 11519
50. Passing Data & Events: Pub/Sub
Google Pub/Sub: a fast, highly
scalable, fully-managed multi
fan-in/fan-out publisher-subscriber
queuing system for messaging &
event ingestion (and processing)
cloud.google.com/pubsub
G Suite APIs
Top-level documentation and comprehensive developers
overview video at developers.google.com/gsuite
51. Other Google APIs & platforms
● Firebase (mobile development platform + RT DB)
○ firebase.google.com
● Google Data Studio (data visualization, dashboards, etc.)
○ marketingplatform.google.com/about/data-studio
● Actions on Google/Assistant/DialogFlow (voice apps)
○ developers.google.com/actions
● YouTube (Data, Analytics, and Livestreaming APIs)
○ developers.google.com/youtube
● Google Maps (Maps, Routes, and Places APIs)
○ developers.google.com/maps
● Flutter (native apps [Android, iOS, web] w/1 code base[!])
○ flutter.dev
6 Wrap-up
Summary & resources for faculty, lecturers, researchers
52. ● Key GCP product code samples for students
github.com/GoogleCloudPlatform/hackathon-toolkit
● GCP documentation - cloud.google.com/{appengine,functions,vision,
language,speech,text-to-speech,translate,automl,firestore,bigquery}
● Like GCP? Wanna use it in class or your research lab? Send your profs
to cloud.google.com/edu to apply for teaching or research credits!
● Other docs
○ Firebase - firebase.google.com
○ G Suite - developers.google.com/{gsuite,drive,docs,sheets,slides}
○ Free trial (ignore) and Always Free (FYI) - cloud.google.com/free
Resources
Learning resources
● Codelabs: self-paced, hands-on tutorials
○ Google codelabs: need a Gmail account, always free
■ g.co/codelabs/cloud
○ Qwiklabs codelabs: don't need a Gmail acct; typically not free
■ google.qwiklabs.com
■ Request free credits ("tokens") at cloud.google.com/edu
● Official GCP documentation
○ cloud.google.com/gcp/getting-started
○ Recommended: Getting Started, Cloud Console, Cloud Shell, Cloud SDK, Community
● YouTube video series:
○ youtube.com/GoogleCloud
○ Recommended: Cloud Minute shorts & Cloud NEXT videos
○ G Suite Dev Show: goo.gl/JpBQ40
53. Resources for Higher Education
● Education grant program
○ Teaching grants (per-course basis)
■ $50USD for students & $100USD for faculty & TAs
■ Must exceed "Always Free" daily/monthly quota to incur billing
■ Students will barely use it… average utilization: <25%
■ KEY: not giving Google your personal credit card
○ Research grants
■ Larger amounts; consider as seed funding
■ Over a longer period of time (more than a single term)
○ Apply at cloud.google.com/edu
○ Turnaround time: "within a few business days"
○ Redeem at console.cloud.google.com/edu
Thank you! Questions?
Wesley Chun
@wescpy
Progress bars: goo.gl/69EJVw
Slides: bit.ly/32kpJbm