Skip to content

Instantly share code, notes, and snippets.

View brianray's full-sized avatar
🐍

Brian Ray brianray

🐍
  • Maven Wave Partners
  • Los Angeles | Chicago
View GitHub Profile
function add_x_y() {
var sheet = SpreadsheetApp.getActiveSheet();
var x = sheet.getRange(2,1);
var y = sheet.getRange(2,2);
data = {"x": x.getValue(), "y": y.getValue()};
// TODO: Add your URL below
var URL = "https://us-central1-mw-automl-first-look.cloudfunctions.net/tutorial"
var options = {
function add_x_y() {
var sheet = SpreadsheetApp.getActiveSheet();
var x = sheet.getRange(2,1);
var y = sheet.getRange(2,2);
data = {"x": x.getValue(), "y": y.getValue()};
var URL = "https://us-central1-mw-automl-first-look.cloudfunctions.net/tutorial" //< Add your URL
var options = {
'method' : 'post',
'contentType': 'application/json',
def add_x_y(request):
""" Our tutorial function """
request_json = request.get_json()
return str(request_json["x"] + request_json["y"])
function add_x_y() {
var sheet = SpreadsheetApp.getActiveSheet();
var x = sheet.getRange(2,1);
var y = sheet.getRange(2,2);
return x.getValue() + y.getValue();
}
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@brianray
brianray / orphan-branch.sh
Created January 29, 2018 03:28 — forked from tebeka/orphan-branch.sh
Create Empty Orphan Branch for Code Review
# Create empty orphan branch for code review
git checkout --orphan code-review
git rm -rf .
git commit --allow-empty -m 'Code review - nuke all'
git push --set-upstream origin code-review
class DProcess(multiprocessing.Process):
"""
A subclass of multiprocessing.Process which can keep track of the exception raised in the child process
"""
def __init__(self, *args, **kwargs):
multiprocessing.Process.__init__(self, *args, **kwargs)
self._pconn, self._cconn = multiprocessing.Pipe()
self._exception = None