This file contains 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
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 = {}; |
This file contains 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
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 | |
This file contains 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
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 |