Skip to content

Instantly share code, notes, and snippets.

View themacmarketer's full-sized avatar

edutech.world themacmarketer

View GitHub Profile
/* @version: 1.5
*
* Close variant report
*/
var SPREADSHEET_URL = "https://docs.google.com/spreadsheets/YOUR-SHEET-URL-HERE"; //insert a new blank spreadsheet url
var CAMPAIGNLABEL = ""; // Leave blank for all campaigns
var DATE_RANGE = 'LAST_30_DAYS';
var MATCH_TYPE = '[EXACT, NEAR_EXACT]';
// ID: 5a92f7fa7a689734ad71adb3579baff8
/**
*
* Make Exact Match Exact
*
* Adds negatives for any search query that doesn't actually exactly match an exact
* match keyword.
*
* Version: 2.0
* Google AdWords Script maintained on brainlabsdigital.com
/**
*
* Search Query Mining Tool
*
* This script calculates the contribution of each word or phrase found in the
* search query report and outputs a report into a Google Doc spreadsheet.
*
* Version: October 2021
*
* original author brainlabsdigital
/**
* @name Quality Score Analysis
*
* @overview Export keyword performance data along with quality score
* parameters to the give spreadsheet.
*
*
* Copyright (c) 2017 - Karooya Technologies Pvt. Ltd. All Rights Reserved.
* http://www.karooya.com
*
// Adds a label to adverts with an estimated creation date
var LABEL_PREFIX = 'Created:';
var DAYS_IN_REPORT = 30;
function main() {
//First we get the impression history of our ads
var ret_map = getAccountImpressionHistory();
//Then we apply our labels
applyAdLabels(ret_map);
}
/**
*
* Low Quality Score Alert
*
* This script finds the low QS keywords (determined by a user defined threshold)
* and sends an email listing them. Optionally it also labels and/or pauses the
* keywords.
*
* Version: 1.0
* Google AdWords Script maintained on brainlabsdigital.com

Source: https://www.reddit.com/r/ChatGPT/comments/11twe7z/prompt_to_summarize/

Dear ChatGPT,

I would like to request your assistance in creating an AI-powered prompt rewriter, which can help me rewrite and refine prompts that I intend to use with you, ChatGPT, for the purpose of obtaining improved responses. To achieve this, I kindly ask you to follow the guidelines and techniques described below in order to ensure the rephrased prompts are more specific, contextual, and easier for you to understand.

Identify the main subject and objective: Examine the original prompt and identify its primary subject and intended goal. Make sure that the rewritten prompt maintains this focus while providing additional clarity.

Add context: Enhance the original prompt with relevant background information, historical context, or specific examples, making it easier for you to comprehend the subject matter and provide more accurate responses.

#Install meta.api using pip install meta-ai-api
#Reference: https://github.com/Strvm/meta-ai-api
import os
import time
from meta_ai_api import MetaAI
ai = MetaAI()
# Get all text files in the current directory
text_files = [f for f in os.listdir() if f.endswith('.txt')]
@themacmarketer
themacmarketer / Breakup Into Docs Based on H1.js
Created May 13, 2024 06:55
docId will be broken up into individual docs, saved into the same folder as docId
//docId will be broken up into individual docs, saved into the same folder as docId
function extractLecturesToDocs() {
const docId = "98989qeWT71TOm9PvG3TzWWlEscDfMkbO4A0LQBV8V5t4"; // Correct document ID
const sourceDoc = DocumentApp.openById(docId);
const body = sourceDoc.getBody();
const elements = body.getParagraphs();
const folder = DriveApp.getFileById(docId).getParents().next(); // Get parent folder directly as a Folder object
let currentDoc = null;
let currentBody = null;