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
/* *********************************************************************************** | |
Hero authors of RFC 3986 (http://www.ietf.org/rfc/rfc3986.txt) gave us this regex | |
for parsing (well-formed) URLs into their constituent pieces: | |
^(([^:/?#]+):)?(//([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))? | |
Which for the following URL: | |
http://www.ics.uci.edu/pub/ietf/uri/#Related |
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
library(ggmap) | |
library(gtools) | |
library(dplyr) | |
library(ggplot2) | |
library(ggrepel) | |
what_to_see <- c('prague bus station', | |
"Pivo a parek, prague", | |
"Bar Na Palme, prague", | |
"Pivovar Hostivar,pragie", | |
"Pivni rozmanitost, prague", |
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 OPENAI_API_KEY = ""; // <- PASTE YOUR SECRET KEY HERE | |
const OPENAI_API_URL = "https://api.openai.com/v1/completions"; | |
/** | |
* Submits a prompt to GPT-3 and returns the completion | |
* | |
* @param {string} prompt Prompt to submit to GPT-3 | |
* @param {float} temperature Model temperature (0-1) | |
* @param {string} model Model name (e.g. text-davinci-002) |