Skip to content

Instantly share code, notes, and snippets.

View agustinscigliano's full-sized avatar

Agustin Scigliano agustinscigliano

View GitHub Profile
@agustinscigliano
agustinscigliano / structure.js
Last active April 13, 2018 20:54
Google app script for structure creation
function structureCreation2() {
var ss=SpreadsheetApp.getActiveSpreadsheet();
var original_sheet = ss.getSheetByName('structure_original');
var data_sheet = ss.getSheetByName('input');
var work_sheet = ss.getSheetByName('structure');
var keywords = ["{{customer}}","{{shop_url}}","{{brand}}","{{competitors}}","{{keyword}}","{{category_ad}}","{{url}}","{{match-type}}","{{campaign-type}}","{{bid}}"];
var column_data_source = [1,3,5,7,9,10,11,13,15,16];
var row_data_source_beginning = 4;
var options = {};
var options_size = {};
@agustinscigliano
agustinscigliano / combinations.py
Created April 4, 2018 13:47
Combinations of keywords in matrix
def combinations(keywords, opts):
if len(keywords) == 0:
return [[]]
else:
res = []
for opt in opts[keywords[0]]:
for combination in combinations(keywords[1:], opts):
res.append([opt] + combination)
return res
@agustinscigliano
agustinscigliano / example.py
Created January 24, 2018 18:03
Test fucking unicodes
with open('raw.csv', 'w') as output:
csvwriter = csv.writer(output, delimiter=',')
csvwriter.writerow(["Frequency"])
response_list = list()
frequency2 = u'3.1837371813'
response_list.append(frequency2)
adset_row = response_list
csvwriter.writerow(adset_row)
pass