Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
/** | |
* @OnlyCurrentDoc | |
*/ | |
var MAXROWS = 1000 | |
var SEEKWELL_J_SHORT_DATES = { day: "yyyy-MM-dd", month: "yyyy-MM", year: "yyyy", dayNum: "dd", monthNum: "MM", yearNum: "yyyy", week: "W" } | |
var SEEKWELL_J_TIMEZONE = "UTC" | |
var HOST = '35.196.130.133' | |
var PORT = '3306' | |
var USERNAME = 'apps_script_demo' |
This file contains hidden or 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
""" | |
ADD THE FOLLOWING LINES TO YOUR REQUIREMENTS.TXT: | |
flask | |
twilio | |
pytz | |
""" |
This file contains hidden or 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
// Sample Tracking Template | |
// {lpurl}?utm_medium=adwords&utm_campaign={_campaign}&utm_source={_adgroup}&utm_term={keyword} | |
// This script will set custom parameters {_campaign} and {_adgroup} at the campaign and adgroup level respectively. | |
function main() { | |
///// Update Campaigns | |
// get all campaigns | |
var campaignSelector = AdsApp | |
.campaigns() |
This file contains hidden or 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 pandas as pd | |
import requests | |
import urllib | |
import time | |
import re | |
# Data Visualization | |
from plotly import tools | |
import chart_studio |
This file contains hidden or 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
# Scrape Shopify themes using scrapy.org | |
#!pip install scrapy | |
#%%writefile shopify_theme_spider.py | |
import scrapy | |
class ShopifyThemeSpider(scrapy.Spider): | |
name = 'bshopifyspider' | |
start_urls = ['https://themes.shopify.com/themes?page=1'] |
This file contains hidden or 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 scrapy | |
import pickle | |
class ShopifyThemeLinkSpider(scrapy.Spider): | |
name = 'shopifyspider' | |
with open('theme_links.pkl', 'rb') as f: | |
theme_links = pickle.load(f) |
This file contains hidden or 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 | |
import json | |
import pandas as pd | |
def airtable_download(table, params_dict={}, api_key=None, base_id=None, record_id=None): | |
"""Makes a request to Airtable for all records from a single table. | |
Returns data in dictionary format. | |
Keyword Arguments: |
This file contains hidden or 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
let url = "https://www.amazon.com/SanDisk-128GB-microSDXC-Memory-Adapter/dp/B073JYC4XM/"; | |
let kwparse = (url.replace('https://','').replace('http://','').replace('www','').replace('com','').split('-').join().split('/').join().split('.')).join(',').replace(/^,/, '') | |
let kwuniq = [...new Set(kwparse.split(','))].filter(function(e){return e}); | |
console.log(kwuniq) | |
// ["amazon", "SanDisk", "128GB", "microSDXC", "Memory", "Adapter", "dp", "B073JYC4XM"] | |
// Hat Tip - Find a cleaner version at https://gist.github.com/dsottimano/52060e6a43d96804f33c59366c472305 |
This file contains hidden or 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
// Parse the IDs from the first four rows of the sheet | |
function getIds() { | |
const sheet = SpreadsheetApp.getActiveSheet(); | |
const ids = { | |
accountId: sheet.getRange('B1').getValue().toString(), | |
containerId: sheet.getRange('B2').getValue().toString(), | |
workspaceId: sheet.getRange('B3').getValue().toString(), | |
variableId: sheet.getRange('B4').getValue().toString() | |
}; | |
if (ids.workspaceId.toLowerCase() === 'default') ids.workspaceId = getDefaultWorkspaceId(ids.accountId, ids.containerId); |