Skip to content

Instantly share code, notes, and snippets.

View tanaikech's full-sized avatar

Kanshi TANAIKE tanaikech

View GitHub Profile
@tanaikech
tanaikech / submit.md
Created November 6, 2024 00:20
Exporting Google Sheets Tables as PDFs using Google Apps Script

Exporting Google Sheets Tables as PDFs using Google Apps Script

Description

Recently, I reported on a workaround for effectively working with Google Sheets tables using Google Apps Script: Ref. This approach addressed limitations in directly retrieving table data and ranges within Apps Script. In this follow-up report, I'm excited to provide a sample script that leverages this workaround to export your valuable Google Sheets tables directly as PDF files. This functionality empowers you to easily share and distribute your data in a clear and universally accessible format.

Sample tables on a Google Spreadsheet

@tanaikech
tanaikech / submit.md
Created November 2, 2024 01:15
Workaround: Using Google Sheets Tables with Google Apps Script

Workaround: Using Google Sheets Tables with Google Apps Script

Abstract

Google Sheets' new Tables feature enhances data organization but lacks direct management via Apps Script. This report proposes a workaround solution using Apps Script until native support arrives.

Introduction

@tanaikech
tanaikech / submit.md
Created October 17, 2024 00:08
Unlocking Power: Leverage the Google Docs API Beyond Apps Script's Document Service

Unlocking Power: Leverage the Google Docs API Beyond Apps Script's Document Service

Abstract

Google Apps Script offers Document service for basic document tasks and Google Docs API for advanced control, requiring more technical expertise. This report bridges the gap with sample scripts to unlock the API's potential.

Introduction

@tanaikech
tanaikech / submit.md
Created October 12, 2024 07:13
Place Rows from a Sheet to Multiple Sheets on Google Spreadsheet using New Javascript Methods with Google Apps Script

Place Rows from a Sheet to Multiple Sheets on Google Spreadsheet using New Javascript Methods with Google Apps Script

Abstract

This report showcases a practical application of Google Apps Script, demonstrating how new JavaScript methods can be used to create a script that automatically transfers selected rows between sheets in a Google Sheet.

Introduction

JavaScript, a fundamental pillar of contemporary web development, has experienced a significant rise in popularity due to its versatility and widespread adoption. As JavaScript's influence has expanded, so too has Google Apps Script, a cloud-based scripting language constructed on the V8 JavaScript engine. This evolution has led to the introduction of novel methods and features, thereby expanding the capabilities of developers working within the Google Workspace ecosystem.

@tanaikech
tanaikech / submit.md
Created October 8, 2024 23:57
Improving Gemini's Text Generation Accuracy with Corpus Managed by Google Spreadsheet as RAG

Improving Gemini's Text Generation Accuracy with Corpus Managed by Google Spreadsheet as RAG

Abstract

Gemini excels at text generation with RAG for large datasets, but smaller ones benefit from prompting or data upload. This report explores using Gemini 1.5 Flash/Pro with RAG on medium-sized, Google Spreadsheet-stored datasets for improved accuracy and effectiveness.

Introduction

@tanaikech
tanaikech / submit.md
Last active October 1, 2024 01:50
Pseudo Function Calling for Gemini API Through Prompt Engineering

Pseudo Function Calling for Gemini API Through Prompt Engineering

Abstract

This research explores "pseudo function calling" in Gemini API using prompt engineering with JSON schema, bypassing model dependency limitations.

Introduction

Large Language Models (LLMs) like Gemini and ChatGPT offer powerful functionalities, but their capabilities can be further extended through function calling. This feature allows the LLM to execute pre-defined functions with arguments generated based on the user's prompt. This unlocks a wide range of applications, as demonstrated in these resources (see References).

@tanaikech
tanaikech / submit.md
Created September 25, 2024 06:39
Harnessing Gemini's Power: A Guide to Generating Content from Structured Data

Harnessing Gemini's Power: A Guide to Generating Content from Structured Data

Abstract

This report presents a method to train AI to effectively generate content from smaller, structured datasets using Python. Gemini's token processing capabilities are leveraged to effectively utilize limited data, while techniques for interpreting CSV and JSON formats are explored.

Introduction

In the era of rapidly advancing artificial intelligence (AI), the ability to analyze and leverage large datasets is paramount. While RAG (Retrieval Augmented Generation) environments are often ideal for such tasks, there are scenarios where content generation needs to be achieved with smaller datasets.

@tanaikech
tanaikech / submit.md
Last active September 19, 2024 03:10
Flexible Labeling for Gmail using Gemini API with Google Apps Script Part 3

Flexible Labeling for Gmail using Gemini API with Google Apps Script Part 3

Abstract

This report improves Gmail email labeling with Gemini API using JSON schema and leverages advancements in Gemini 1.5 Flash for faster processing.

Introduction

@tanaikech
tanaikech / submit.md
Created September 17, 2024 02:09
Simplifying Spreadsheet Management: Introducing a Google Apps Script Automation

Simplifying Spreadsheet Management: Introducing a Google Apps Script Automation

Abstract

This post introduces a Google Apps Script solution that automates the creation, sharing, and monitoring of multiple Google Spreadsheets, providing a more efficient and streamlined approach to managing user data.

Introduction

@tanaikech
tanaikech / submit.md
Last active September 12, 2024 06:29
Gemini-Powered Dynamic Pseudo-RAG for Efficient Script Generation

Gemini-Powered Dynamic Pseudo-RAG for Efficient Script Generation

Abstract

This report presents a method to optimize AI-generated scripts for processing costs using Gemini and Google Apps Script. By incorporating external knowledge from sources like StackOverflow, we demonstrate the effective generation of efficient scripts that minimize overhead while maintaining desired outcomes. This approach can be considered a dynamic pseudo-RAG technique.

Introduction

The proliferation of generative AI, exemplified by Google Gemini, has led to a surge in AI-generated scripts. This trend is evident in the growing number of questions on platforms like StackOverflow that involve AI-generated scripts. While this indicates a significant improvement in AI performance, it's crucial to note that AI-generated scripts may not always be optimized for processing costs, especially when the prompt fails to provide sufficient context.