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
API_KEY=[REDACTED] | |
CHAT_MODEL_NAME=gemini-pro | |
INIT_PROMPT=You are a Pizza order bot. You take orders for Pizza This is all you can do. | |
INIT_PROMPT_AGREEMENT=I under stand I am a pizza bot I will only take orders for pizza. |
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
var pageStreamer = new PageStreamer<Google.Apis.Drive.v3.Data.File, FilesResource.ListRequest, Google.Apis.Drive.v3.Data.FileList, string>( | |
(request, token) => request.PageToken = token, | |
response => response.NextPageToken, | |
response => response.Files); | |
var req = service.Files.List(); | |
req.PageSize = 1000; | |
foreach (var result in pageStreamer.Fetch(req)) | |
{ |
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
using Google.Apis.Drive.v3; | |
using Google.Apis.Drive.v3.Data; | |
using System; | |
using Google.Apis.Requests; | |
namespace GoogleApiSample.Drivev3 | |
{ | |
public static class AboutExamples | |
{ |
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
I am going to give you a source JSon object and a destination JSon object. I want you to transform the data in source object to the format of the destination JSon object. The birth date format is mm-dd-YYYY. | |
This is the source object '{source}' | |
This is the destination object '{destination}' The date format for the destination object is YYYY-mm-dd. Given is an array of given names. | |
Please return the destination object with the values given in the source object. |
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
using Google.Apis.Json; | |
using Google.Apis.Util.Store; | |
using System; | |
using System.Data.Common; | |
using System.Threading.Tasks; | |
namespace GoogleAuthDataStores | |
{ | |
/// <summary> | |
/// Database data store that implements <see cref="IDataStore"/>. This store creates a different row for each |
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
// npm install googleapis@105 @google-cloud/local-auth@2.1.0 --save | |
const fs = require('fs'); | |
const fsp = fs.promises; | |
const path = require('path'); | |
const process = require('process'); | |
const {authenticate} = require('@google-cloud/local-auth'); | |
const {google} = require('googleapis'); |
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
# Tutorial https://www.daimto.com/how-to-get-a-google-access-token-with-curl/ | |
# YouTube video https://youtu.be/hBC_tVJIx5w | |
# Client id from Google Developer console | |
# Client Secret from Google Developer console | |
# Scope this is a space seprated list of the scopes of access you are requesting. | |
# Authorization link. Place this in a browser and copy the code that is returned after you accept the scopes. | |
https://accounts.google.com/o/oauth2/auth?client_id=[Application Client Id]&redirect_uri=http://127.0.0.1&scope=[Scopes]&response_type=code | |
# Exchange Authorization code for an access token and a refresh token. |
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
using Google.Apis.Auth.OAuth2; | |
using Google.Apis.Drive.v3; | |
using Google.Apis.Services; | |
using Google.Apis.Util.Store; | |
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Threading; | |
namespace GoogleDriveListAllFilesSample |
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
using Google.Apis.AnalyticsReporting.v4; | |
using Google.Apis.Auth.OAuth2; | |
using Google.Apis.Services; | |
using System; | |
using System.IO; | |
using System.Security.Cryptography.X509Certificates; | |
namespace GoogleAnaltyics.V4 | |
{ | |
public class ServiceAccountJson |
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
{ | |
"resourceType": "Bundle", | |
"id": "2d3be3fe-f464-4bb1-b0eb-110c2a88e8a9", | |
"meta": { | |
"profile": [ | |
"http://gateway.kl.dk/1.0/StructureDefinition/klgateway-care-delivery-report" | |
] | |
}, | |
"type": "collection", | |
"timestamp": "2022-03-03T12:07:20.91+01:00", |
NewerOlder