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
from google.cloud import language
from google.cloud.language import enums
from google.cloud.language import types
def analyze(request):
request_json = request.get_json()
client = language.LanguageServiceClient()
sentance = request_json['content']
document = types.Document(
content=sentance,
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();
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
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