Skip to content

Instantly share code, notes, and snippets.

View donovanfm's full-sized avatar

Donovan McMurray donovanfm

  • Google
  • Atlanta, GA
View GitHub Profile
@donovanfm
donovanfm / update_line_items.py
Created May 2, 2019 02:56
Code for a Google Cloud Function that updates a Cloud SQL instance with recently modified Ad Manager LineItems.
import datetime
from googleads import ad_manager
from googleads import oauth2
from google.oauth2 import service_account
from google.cloud import bigquery
from os import getenv
import pymysql
import pytz
def handle_request(data, context):
@donovanfm
donovanfm / 01_gcf_readme.md
Last active May 8, 2019 17:21
Code for a Google Cloud Function that handles chat messages to a Hangouts Chat API endpoint.

README: Google Cloud Function Demo

The following files can be used in Google Cloud Functions (GCF). Each GCF should consist of a file named "main.py", a file named "requirements.txt", and an OAuth keyfile with the extension ".json". All GCFs should have handle_request as the "Function to execute".

Report Bot Configuration

GCF Trigger Type:
HTTP

Required environment variables:
GCP_PROJECT_ID - the id of your Google Cloud Platform project to which the GCF belongs

rating count
Excellent 36
Very Good 22
Good 18
Average 15
Poor 69
Other 50