Skip to content

Instantly share code, notes, and snippets.

View mandnyc's full-sized avatar

Mandy Chan mandnyc

View GitHub Profile
@mandnyc
mandnyc / Planet Glossary Part 2.js
Last active February 12, 2019 15:23
Planet Glossary Part 2.js
// Copyright 2018 Google LLC.SPDX-License-Identifier: Apache-2.0
'use strict';
const {dialogflow} = require('actions-on-google');
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const app = dialogflow({debug: true});
admin.initializeApp();
@mandnyc
mandnyc / Planet Glossary Part 1.js
Last active January 16, 2019 19:00
Planet Glossary Part 1.js
//Copyright 2018 Google LLC.SPDX-License-Identifier: Apache-2.0
'use strict';
const {dialogflow} = require('actions-on-google');
const functions = require('firebase-functions');
const admin = require('firebase-admin');
const app = dialogflow({debug: true});
admin.initializeApp();
@mandnyc
mandnyc / actions-glossary
Last active June 25, 2018 03:29
Actions Glossary
const {dialogflow} = require('actions-on-google');
const functions = require('firebase-functions');
const app = dialogflow({debug: true});
const glossary = {
'intent': {
'word': 'intent',
'definition': 'mapping between what users say to what task the user ' +
'requests for',
@mandnyc
mandnyc / Mandy's awesome programming resources
Last active August 5, 2019 01:50
Mandy's awesome programming resources
Competitive Programmer’s Handbook
https://cses.fi/book.html
Firecode.io
https://www.firecode.io/calibration/index
Great resources for peer programming and live mock interviews
Pramp
https://www.pramp.com/#/
var Speech = require("ssml-builder");
var speech = new Speech();
speech.say("it's a")
.prosody({volume: "-5dB", pitch:"low", rate: "50%"}, "chilly")
.prosody({volume: "-5dB", pitch: "high", rate: "80%"}, " 54 degrees outside")
.sentence("So Mandy, dress ")
.prosody({volume: "+5dB", pitch: "medium",rate: "80%"}, "warm ")
.prosody({volume: "+10dB", pitch: "high", rate: "60%"}, " and don't ")
.say("forget to bring ")
.prosody({volume: "+20dB", pitch:"medium", rate: "80%"}, "an umbrella")
<speak>its a
<prosody rate='50%' pitch='low' volume='-5dB'>chilly</prosody>
<prosody rate='80%' pitch='high' volume='-5dB'> 54 degrees outside</prosody>
<s>So Mandy, dress </s>
<prosody rate='80%' pitch='medium' volume='+5dB'>warm </prosody>
<prosody rate='60%' pitch='high' volume='+10dB'> and dont </prosody> forget to bring
<prosody rate='80%' pitch='medium' volume='+20dB'>an umbrella</prosody>
<break time='100ms'/> since its raining
</speak>
var Speech = require("ssml-builder");
var speech = new Speech();
speech.say("It's a 54 degrees outside. So Mandy, ")
.pause("200ms")
.say("dress warm and don't forget to bring an umbrella since it's raining");
var ssml = speech.ssml();
<speak>Its a 54 degrees outside. So Mandy,
<break time='200ms'/> dress warm and dont forget to bring an umbrella since its raining
</speak>
<speak>People who live in Illinois say
<phoneme alphabet='ipa' ph='pi.ka:n'>pecan</phoneme>
<break time='5ms'/> those in Louisiana say
<phoneme alphabet='ipa' ph='pɪˈkɑːn'>pecan</phoneme>
<break time='5ms'/> and in New York, we say
<phoneme alphabet='ipa' ph='pi.kæn'>pecan</phoneme>
</speak>
var Speech = require("ssml-builder");
var speech = new Speech()
.say("People who live in Illinois say ")
.phoneme("ipa", "pi.ka:n", "pecan")
.pause("5ms")
.say("those in Louisiana say ")
.phoneme("ipa", "pɪˈkɑːn", "pecan")
.pause("5ms")
.say("and in New York, we say ")
.phoneme("ipa", "pi.kæn", "pecan");