This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en-us"> | |
<head> | |
<title>Your Skill</title> | |
</head> | |
<body> | |
<div> | |
<p>Welcome to the skill</p> | |
<p>Click on the button to continue</p> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from ask_sdk_core.utils import is_intent_name, is_request_type | |
from ask_sdk_core.dispatch_components import AbstractRequestHandler | |
from ask_sdk_model.ui import LinkAccountCard | |
import httplib2 | |
from googleapiclient.discovery import build | |
from oauth2client.client import AccessTokenCredentials, AccessTokenCredentialsError | |
class SummaryHandler(AbstractRequestHandler): | |
def can_handle(self, handler_input): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from facebook_business.adobjects.offlineconversiondataset import OfflineConversionDataSet | |
from facebook_business.api import FacebookAdsApi | |
class FacebookService: | |
def __init__(self): | |
self.api = FacebookAdsApi.init(app_id='your_app_id', app_secret='your_app_secret', | |
access_token='your_access_token') | |
def create_offline_event_set(self, name): | |
params = { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from facebook_business.adobjects.offlineconversiondataset import OfflineConversionDataSet | |
from facebook_business.api import FacebookAdsApi | |
class FacebookService: | |
def __init__(self): | |
self.api = FacebookAdsApi.init(app_id='your_app_id', app_secret='your_app_secret', | |
access_token='your_access_token') | |
self.offline_dataset = OfflineConversionDataSet('offline_set_id') | |
def upload_offline_conversion(self, csv_filename): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import argparse | |
import json | |
import os | |
import logging | |
import apache_beam as beam | |
from apache_beam.options.pipeline_options import PipelineOptions, StandardOptions | |
logging.basicConfig(level=logging.INFO) | |
logging.getLogger().setLevel(logging.INFO) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# requirements | |
# google-cloud-pubsub==1.7.0 | |
import json | |
import time | |
from datetime import datetime | |
from random import random | |
from google.auth import jwt | |
from google.cloud import pubsub_v1 | |
# --- Base variables and auth path |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
API_KEY = "" # TODO | |
VERSION = "v5" | |
class GooglePageSpeedService: | |
def __init__(self): | |
self.api_key = API_KEY | |
self.base_url = ( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
API_KEY = "" # TODO | |
VERSION = "v1alpha1" | |
class GoogleFactCheckService: | |
def __init__(self): | |
self.api_key = API_KEY | |
self.base_url = f"https://factchecktools.googleapis.com/{VERSION}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
from typing import List | |
API_KEY = "" # TODO | |
VERSION = "v1" | |
class GoogleKnowledgeSearchService: | |
def __init__(self): | |
self.api_key = API_KEY |