Skip to content

Instantly share code, notes, and snippets.

View primaryobjects's full-sized avatar

Kory Becker primaryobjects

View GitHub Profile
@primaryobjects
primaryobjects / quiz2.txt
Created August 4, 2023 01:58
IBM Introduction to Artificial Intelligence, Quiz 2, https://www.coursera.org/learn/introduction-to-ai
QUESTION 1/10
Which of these statements is true?
1 point
) Cognitive systems can only process neatly organized structured data
Cognitive systems can only translate small volumes of audio data into their literal text translations at massive speeds
Cognitive systems can derive mathematically precise answers following a rigid decision tree approach
** Cognitive systems can learn from their successes and failures
QUESTION 2/10
Which of these statements is true?
@primaryobjects
primaryobjects / quiz1.txt
Last active August 4, 2023 19:40
IBM Introduction to Artificial Intelligence, Quiz 1, https://www.coursera.org/learn/introduction-to-ai
Which of the following is NOT a good way to define Al?
1 point
) Al is Augmented Intelligence and is not intended to replace human intelligence rather extend human capabilities
Al is the use of algorithms that enable computers to find patterns without humans having to hard code them manually
I Al is the application of computing to solve problems in an intelligent way using algorithms.
** Al is all about machines replacing human
Which of the following is an attribute of Strong or
Generalized Al?
1 point
const plusOne = digits => {
// Set the index to the last digit.
let i = digits.length - 1;
// If the index digit < 9, increment it and return answer.
if (digits[i] < 9) {
digits[i]++;
return digits;
}
else {
@primaryobjects
primaryobjects / document-search.ipynb
Created July 29, 2023 22:28
Building a web page search engine using NLP and ChatGPT
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@primaryobjects
primaryobjects / launch.json
Last active July 17, 2023 19:52
VSCode launch.json for Perl. Download https://strawberryperl.com and install Perl Debugger in VSCode https://marketplace.visualstudio.com/items?itemName=bscan.perlnavigator
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "perl",
"request": "launch",
"name": "Perl Debug",
const eraseOverlapIntervals1 = intervals => {
let count = 0;
const hash = {};
// Sort intervals by their ending time ascending.
intervals.sort((a, b) => {
return a[1] - b[1];
});
// Build a list of all occupied slots.
@primaryobjects
primaryobjects / data.py
Last active July 10, 2025 21:16
LLM ChatGPT prompt engineering accuracy statistics. Using F-score and accuracy to measure effectiveness of prompts for classification. https://learn.deeplearning.ai/chatgpt-prompt-eng/lesson/1/introduction
messages = [
{'content': 'I hate this food.', 'truth': 1},
{'content': 'This movie is terrible.', 'truth': 1},
{'content': 'I really like this play.', 'truth': 0},
{'content': 'I am just not sure.', 'truth': 0},
{'content': 'I can\'t believe you would do something like that!', 'truth': 1},
{'content': 'This is absolutely unacceptable!', 'truth': 1},
{'content': 'I am so angry right now, I can\'t even think straight.', 'truth': 1},
{'content': 'How could you be so thoughtless?', 'truth': 1},
{'content': 'You have no idea how much you\'ve hurt me.', 'truth': 1},
function birthday1(s, d, m) {
// Naive approach, O(n^2)
let count = 0;
if (s && s.length) {
for (let i=0; i<s.length - m + 1; i++) {
// Find all contiguous groups of m-length from this point.
let sum = 0;
for (let j=i; j<i+m; j++) {
@primaryobjects
primaryobjects / 1-rational.md
Last active June 1, 2023 22:08
Rational, Natural, and Open Systems in organizations

In the context of an organization such as a legal company, a rational system would be one that operates based on formal rules and procedures. The company would have a well-defined hierarchy and chain of command, with clear lines of authority and responsibility. Decision-making would be centralized, with top management making most of the important decisions. The company would have specific goals and objectives, and its operations would be designed to achieve these goals in the most efficient and effective manner possible. Employees would have clearly defined roles and responsibilities, and their performance would be evaluated based on their ability to meet specific targets and objectives. The company would also have formal systems in place for monitoring and controlling its operations, to ensure that it is achieving its goals and operating within legal and ethical boundaries. Would you like to know more about how a rational system might operate in a legal company?

<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>Polynomial Solver Game</title>
<style>
body {
font-family: 'Arial', sans-serif;
}