This file contains hidden or 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
| # Load the rvest package | |
| library(rvest) | |
| library(ggplot2) | |
| library(tidytext) | |
| library(tidyverse) | |
| library(topicmodels) | |
| library(tm) | |
| library(wordcloud) | |
| library(RColorBrewer) |
This file contains hidden or 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
| # Network Analysis with R | |
| # https://www.coursera.org/learn/applying-data-analytics-business-in-marketing/lecture/7FPYu/network-analysis-with-r-part-2 | |
| # Create a method in R to extract all posts listed on https://bogleheads.org and return their Author, Title, and Url. | |
| # | |
| # For example, the first result in the list might be: | |
| # Title: Helping elderly parents with diminishing mental capacity | |
| # Author: yakk0 | |
| # Url: https://www.bogleheads.org/forum/viewtopic.php?f=2&t=413715&newpost=7484050 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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
| --- | |
| title: "Word Cloud Comparison" | |
| author: "Kory Becker" | |
| date: "2023-09-11" | |
| output: html_document | |
| --- | |
| ```{r setup, include=FALSE} | |
| knitr::opts_chunk$set(echo = TRUE) | |
| ``` |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or 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 Qiskit and numpy | |
| from qiskit import QuantumCircuit, QuantumRegister, ClassicalRegister, execute, Aer | |
| import numpy as np | |
| # Define the quantum register and the classical register | |
| qreg = QuantumRegister(1) | |
| creg = ClassicalRegister(1) | |
| qc = QuantumCircuit(qreg, creg) | |
| # Define the basis states for rock, paper, and scissors |
This file contains hidden or 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
| // Given an input of a dictionary of words and an input senetnce that does not contain spaces, write a method that returns the input sentence split into words. | |
| // Input: "applesauceisfun", ["apple","applesauce","is","good"] | |
| // Output: "applesauce is fun" | |
| const dict = ["apple","applesauce","is","good"]; | |
| // Simple approach with indexOf (uses shorter words). | |
| const sentenceSplit = (s, dict) => { | |
| dict.sort((a, b) => { return b.length - a.length }).forEach(word => { |
This file contains hidden or 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 merge = (nums1, m, nums2, n) => { | |
| let index = m + n - 1; // Pointer to the current index being written to. | |
| let i = m - 1; // Pointer to value to compare in nums1. | |
| let j = n - 1; // Pointer to value to compare in nums2. | |
| // Move from right to left, compare values i, j and write larger at index. | |
| // If no more vaues in nums2, just choose nums1. | |
| while (index >= 0) { | |
| nums1[index--] = j < 0 || nums1[i] > nums2[j] ? nums1[i--] : nums2[j--]; | |
| } |
This file contains hidden or 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 longestNiceSubstring = s => { | |
| // Brute-force. | |
| let result = ''; | |
| let max = 0; | |
| const adder = 32; // uppercase or lowercase compliment | |
| // Begin building the word from the left and appending 1 character at a time. | |
| for (let i=0; i<s.length-1; i++) { | |
| const hash = {}; | |
| let word = s[i]; |
This file contains hidden or 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
| QUESTION 1/10 | |
| What is Al ethics? | |
| 1 point | |
| I How and why an Al system arrived at a particular outcome or recommendation | |
| An organization's act of governing Al through its corporate instructions, staff, processes, and systems | |
| ** A multidisciplinary field that investigates how to maximize Al's beneficial impacts while reducing risks and adverse impacts | |
| How to build and use Al in ways that align with human ethics and expectations | |
| QUESTION 2/10 | |
| In Al, what is fairness? |