Skip to content

Instantly share code, notes, and snippets.

@atalv
atalv / setup.py
Created Apr 19, 2020
Sample setup.py configuration for creating a Python Wheel/Egg
View setup.py
from setuptools import setup, find_packages
setup(
#this will be the package name you will see, e.g. the output of 'conda list' in anaconda prompt
name = '<some name of the distribution>',
#some version number you may wish to add - increment this after every update
version='1.0',
# Use one of the below approach to define package and/or module names:
@atalv
atalv / assignEditUrls.gs
Last active Apr 12, 2020
Google Apps Script code to add Google Form edit response links in the linked Google Sheet. It will also append the form edit links for newly added responses - instead of generating links for all the responses each time.
View assignEditUrls.gs
function assignEditUrls() {
// Function to add edit form link for each response recorded in sheets. Will append for new responses.
var formUrl = SpreadsheetApp.getActiveSpreadsheet().getFormUrl();
var form = FormApp.openByUrl(formUrl);
// Provide the sheet name where Google Form responses are being recorded
var sheet = SpreadsheetApp.getActiveSpreadsheet().getSheetByName('Form Responses 1');
var data = sheet.getDataRange().getValues();
// Identifying existing edit form url column - 'editFormURL' - if exists then add edit links this column, else add a new column
// Assuming first row contains headers
var findCol = sheet.getRange(1, 1, 1, sheet.getLastColumn()).createTextFinder('editFormURL').matchEntireCell(true).findNext();
You can’t perform that action at this time.