bigquery-public-data.new_york_taxi_trips.tlc_yellow_trips_2017
Table size 12.79 GB
Number of rows 113,496,874
``SELECT total_amount, pickup_datetime, trip_distance
import os | |
import json | |
import functions_framework | |
import google.cloud.logging | |
import vertexai | |
from vertexai.language_models import TextGenerationModel | |
PROJECT_ID = os.environ.get('GCP_PROJECT','-') |
const browser = await puppeteer.launch({args: ['--no-sandbox']}); | |
const page = await browser.newPage(); | |
await page.goto("https://loveiscomix.com/random"); | |
let imageurl = await page.evaluate(() => { | |
let item = document.querySelector('#primary > main > article > div > div.cellcomic > a > img'); | |
return 'https://loveiscomix.com/' + item.getAttribute('src'); | |
}) | |
browser.close(); |
let LoveIsComic_HTMLTemplate = ( | |
url | |
) => { | |
return ` | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Love Is Comic</title> | |
</head> | |
<body> |
function retrieveSentimentCF (line) { | |
var apiEndpoint = 'YOUR_CLOUDFUNCTIONS_HTTPS_ENDPOINT'; | |
var reviewData = { | |
review_text: line | |
}; | |
var cfCallOptions = { | |
method : 'post', | |
contentType: 'application/json', |
'use strict'; | |
const Language = require('@google-cloud/language'); | |
// Instantiates a client | |
const language = new Language.LanguageServiceClient(); | |
exports.analyzeSentiment = (req, res) => { | |
if (req.body.review_text == undefined) { | |
res.status(400).send("No review text provided"); |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('Review Analysis Tools') | |
.addItem('Analyze Sentiment', 'analyzeSentiment') | |
.addToUi(); | |
} | |
function analyzeSentiment() { | |
function onOpen() { | |
var ui = SpreadsheetApp.getUi(); | |
ui.createMenu('Review Analysis Tools') | |
.addItem('Analyze Sentiment', 'analyzeSentiment') | |
.addToUi(); | |
} | |
function analyzeSentiment() { | |
const admin = require('firebase-admin'); | |
const functions = require('firebase-functions'); | |
//Initialize Firebase | |
admin.initializeApp(functions.config().firebase); | |
const db = admin.firestore(); | |
//Number of Questions. We could have evaluated the count of questions, but thats for a future |
'use strict'; | |
const axios = require("axios"); | |
const url = "https://api.coindesk.com/v1/bpi/currentprice.json" | |
function verifyWebhook (body) { | |
if (!body || body.token !== "--YOUR_VERIFICATION_TOKEN--") { | |
const error = new Error('Invalid credentials'); | |
error.code = 401; | |
throw error; |