Skip to content

Instantly share code, notes, and snippets.

View admariner's full-sized avatar

Periklis Papanikolaou admariner

  • admariner
  • Thessaloniki
View GitHub Profile
@mariolambe
mariolambe / google-autocomplete.ipynb
Created February 27, 2020 16:21
Extract Google Autocomplete keywords with Python
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
/**
* @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'
@Robin-Lord
Robin-Lord / restaurant_bot.py
Created April 28, 2020 13:07
Short code which works with Twilio to record
"""
ADD THE FOLLOWING LINES TO YOUR REQUIREMENTS.TXT:
flask
twilio
pytz
"""
@caseypage
caseypage / AdwordsScript.js
Last active January 30, 2025 04:41
This will automate setting custom parameters for your adwords tracking template at the campaign and adgroup level.
// 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()
@DerekHawkins
DerekHawkins / core_web_vitals_analysis_example.py
Created June 1, 2020 13:47
core_web_vitals_analysis_example.py
import pandas as pd
import requests
import urllib
import time
import re
# Data Visualization
from plotly import tools
import chart_studio
# 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']
@KalebNyquist
KalebNyquist / airtable_helper.py
Last active August 6, 2024 02:14
Simple Download/Upload of Airtable Data into/from Python using Airtable API
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:
@johnmurch
johnmurch / keywordsFromUrl.js
Last active October 22, 2020 01:36
Parse keywords from URL
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
// 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);