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
// Configuration constants for API interactions and limits | |
const CONFIG = { | |
MAX_SMS_LENGTH: 1600, | |
RECENT_HISTORY_LIMIT: 50, | |
MAX_HISTORY_LENGTH: 200, | |
OPENAI_API_URL: 'https://api.openai.com/v1/chat/completions', | |
}; | |
// Valid dimensions for verification | |
const VALID_DIMENSIONS = [ |
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
Introduction | |
This policy explains how we handle and protect your information when you use the Memory Mate API. | |
1. What We Collect | |
• Memory Data: We store the information you provide through the API. | |
• Authentication: We use secure access through a token to protect your data. | |
2. How We Use Your Information |
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
Prompt: | |
“Develop an AI assistant named Meta Question Master, engineered to sharpen users’ ability to ask high-impact, transformative questions. This assistant is designed to immerse users in the art of questioning, helping them break down complexity and approach problems with precision through advanced techniques like Socratic Thinking, Eigenquestions, and First Principles Thinking. | |
Meta Question Master should challenge users by presenting them with real-world scenarios that escalate in difficulty, dynamically adjusting based on the user’s performance. The assistant’s feedback must be immediate and direct—pushing users to refine their thinking, showing them why their questions either hit the mark or miss the core of the issue. | |
At the start of each session, Meta Question Master invites users to select a domain of interest—whether it’s leadership, product management, or relationships. It then presents scenarios tailored to that domain, offering a sandbox for users to craft questions that probe deeper, reveal |
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
//inspired by Robert Heaton's programming projects for advanced beginners | |
//https://robertheaton.com/2018/06/12/programming-projects-for-advanced-beginners-ascii-art/ | |
const Caman = require('caman').Caman; | |
//Note: With error "TypeError: Canvas is not a constructor", update node_modules/caman/dist/caman.full.js on line 371 to this.canvas = new Canvas.Canvas(this.imageWidth(), this.imageHeight()); AND on line 2530, update canvas = new Canvas.Canvas(newDims.width, newDims.height); | |
const picture = Caman('img/ascii-pineapple.jpg', function () { | |
const factor = 7; | |
this.resize({ |
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
let snail = arr => { | |
const firstRow = arrayOfArrays => arrayOfArrays.shift() | |
const popLastElement = arrayOfArrays => arrayOfArrays.map(el => el.pop()) | |
const shiftFirstElement = arrayOfArrays => arrayOfArrays.map(el => el.shift()).reverse() | |
const lastRowReversed = arrayOfArrays => arrayOfArrays.pop().reverse() | |
let snailedArray = [] | |
while (arr.length > 1) { | |
snailedArray = [...snailedArray, ...firstRow(arr), ...popLastElement(arr), ...lastRowReversed(arr), ...shiftFirstElement(arr)] | |
} | |
return arr.length ? [...snailedArray, ...arr[0]] : [...snailedArray] |
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
""" | |
This program will return the area of: | |
-a triangle | |
-a circle | |
""" | |
from math import pi | |
from time import sleep | |
from datetime import datetime |
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
<div id='app'> | |
<div id='headers'> | |
<h1 id='title'>Play the Guessing Game!</h1> | |
<h3 id='subtitle'>Guess a number between 1-100!</h3> | |
</div> | |
<div id='main'> | |
<div> | |
<input placeholder="#" maxlength='3' autofocus=autofocus></input> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Guessing Game</title> | |
<!-- Bootstrap and CSS here--> | |
<style> | |
.center { | |
text-align: center; | |
} |
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
// The Babylonian Method | |
// http://en.wikipedia.org/wiki/Methods_of_computing_square_roots#Babylonian_method | |
// @param n - the number to compute the square root of | |
// @param g - the best guess so far (can omit from initial call) | |
function squirt(n, g) { | |
if (!g) { | |
// Take an initial guess at the square root | |
g = n / 2.0; | |
} | |
var d = n / g; // Divide our guess into the number |
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
#!/bin/bash | |
VERSION=0.1.0 | |
USAGE="Usage: [sudo] proxy -shv <networkservice>" | |
change_state() | |
{ | |
if [[ $# == 0 ]] || ([[ $1 != "on" ]] && [[ $1 != "off" ]]); then | |
echo "argument should be on/off" |