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
#CracklePop Program | |
def crackle_pop(n): | |
""" | |
a function that takes an integer n | |
calls check_if_divisible on every integer between 1-100 inclusive | |
prints the result | |
keyword arguments -- integer n | |
""" |
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
import java.util.*; | |
public class GameOfLife { | |
// GAME OF LIFE | |
// Starts with a grid of square cells, each of which is in one of two possible states, alive or dead | |
// Every cell interacts with its 8 neighbors, which are the cells that are horizontally, vertically, | |
// or diagonally adjacent. At each step in time, the following transitions occur: | |
// Any live cell with fewer than two live neighbors dies, as if by underpopulation. | |
// Any live cell with two or three live neighbors lives on to the next generation. |
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
# tic tac toe | |
# TODO: adding support for a computer player to your game. | |
# You can start with random moves and make the AI smarter if you have time. | |
player_dict = {0: "*", | |
1: "", | |
2: ""} | |
board = [[0, 0, 0], [0, 0, 0], [0, 0, 0]] |
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
from twilio.rest import Client | |
import os | |
def calc_nps(scores): | |
promoters = 0 | |
neutral = 0 | |
detractors = 0 | |
for score in scores: | |
if score >= 9: | |
promoters += 1 |
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
import json | |
import os | |
import pandas as pd | |
import requests | |
from flask import Flask, request, send_file | |
app = Flask(__name__) | |
app.config['SECRET_KEY'] = os.environ.get('FLASK_SECRET_KEY') | |
MOVIE_DB_API_KEY = os.environ.get('MOVIE_DB_API_KEY') |
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
{ | |
"description": "sms_appointment_reminder", | |
"states": [ | |
{ | |
"name": "Trigger", | |
"type": "trigger", | |
"transitions": [ | |
{ | |
"event": "incomingMessage" | |
}, |
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
const airtable = require("airtable"); | |
exports.handler = function (context, event, callback) { | |
const base = new airtable({apiKey: context.AIRTABLE_API_KEY}).base(context.AIRTABLE_BASE_ID); | |
const client = context.getTwilioClient() | |
let paramsMap = new Map(); | |
base("appointments") | |
.select() |
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
{ | |
"description": "IVR", | |
"states": [ | |
{ | |
"name": "Trigger", | |
"type": "trigger", | |
"transitions": [ | |
{ | |
"event": "incomingMessage" | |
}, |