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
#https://www.geeksforgeeks.com/get-post-requests-using-python/ | |
import requests | |
URL = "https://topherpedersen.github.io/helloworld.html" | |
PARAMS = {'key':'value'} | |
server_response = requests.get(url = URL, params = PARAMS) | |
print(server_response.text) |
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
#https://www.geeksforgeeks.com/get-post-requests-using-python/ | |
import requests | |
URL = "https://api.weather.gov/stations/KDAL/observations/latest/" | |
server_response = requests.get(url = URL) | |
data = server_response.json() | |
temperature = data['properties']['temperature']['value'] |
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 pyttsx3 | |
from random import * | |
engine = pyttsx3.init() | |
def properNoun(): | |
global properNounThing | |
n = randint(1,50) | |
if n == 1: | |
properNounThing = "Barry " | |
elif n == 2: |
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 flask import Flask | |
from twilio.twiml.messaging_response import MessagingResponse | |
import random | |
app = Flask(__name__) | |
@app.route("/", methods=['GET', 'POST']) | |
def sms_reply(): | |
"""Respond to incoming calls with a simple text message.""" |
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 flask import Flask, request, redirect | |
from twilio.twiml.messaging_response import MessagingResponse | |
app = Flask(__name__) | |
@app.route("/sms", methods=['GET', 'POST']) | |
def incoming_sms(): | |
"""Send a dynamic reply to an incoming text message""" | |
# Get the message the user sent our Twilio number | |
body = request.values.get('Body', None) |
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
// Code Snippet by Timmy Chen | |
// REFERENCE: https://repl.it/@timmy_i_chen/readline-sync-example-node | |
const rs = require('readline-sync'); | |
const x = rs.question('enter thing: '); | |
console.log('wow you entered ' + x); |
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 pyttsx3 | |
import random | |
from random import * | |
import turtle | |
import datetime | |
from datetime import datetime | |
import time | |
from playsound import playsound | |
import requests | |
import math |
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
Array.prototype.randomElement = function () { | |
return this[Math.floor(Math.random() * this.length)]; | |
} | |
var consonant = [ | |
"th", | |
"th", | |
"n", | |
"mb", | |
"r", |
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
// REFERENCE (Working with .txt Files in JS): https://www.freecodecamp.org/forum/t/how-to-read-local-text-file-into-a-js/231112 | |
var fs = require('fs'); | |
var textByLine = fs.readFileSync('allthewords.txt').toString().split("\n"); | |
//get random element from array | |
Array.prototype.randomElement = function () { | |
return this[Math.floor(Math.random() * this.length)]; | |
} | |
//console.log(textByLine[500]); | |
company = textByLine.randomElement() + " " + textByLine.randomElement() + "ly"; |