Skip to content

Instantly share code, notes, and snippets.

@bradtraversy
bradtraversy / myscript.sh
Last active May 5, 2025 08:32
Basic Shell Scripting
#! /bin/bash
# ECHO COMMAND
# echo Hello World!
# VARIABLES
# Uppercase by convention
# Letters, numbers, underscores
NAME="Bob"
# echo "My name is $NAME"
@jeff3dx
jeff3dx / d3-in-react.js
Last active October 27, 2022 09:24
D3 in React with Hooks
import React, { useRef, useEffect } from 'react';
import * as d3 from 'd3';
interface IProps {
data?: number[];
}
/* Component */
export const MyD3Component = (props: IProps) => {
/* The useRef Hook creates a variable that "holds on" to a value across rendering
@rw3iss
rw3iss / build.js
Last active June 10, 2023 20:29
esbuild.js frontend build script
var fs = require("fs");
var path = require("path");
// Config params (relative to where npm/script is called from):
const APP_BASE = './src';
const ENTRY_FILE = `index.tsx`;
const OUTPUT_DIR = './build';
const OUTPUT_FILE = 'app.js';
const IS_DEV = false;
const TARGET = 'es2018';
@lost-books
lost-books / predefined-responses-framework.md
Created April 8, 2023 17:46
Predefined Responses For LLMs Framework Sketch

A common framework for required elements that companies offering LLMs should provide as predefined, verified responses could be established as a set of best practices. These best practices would aim to enhance transparency, ensure ethical conduct, and provide users with accurate and important information about the LLM. Here are some potential common requirements and best practices for predefined, verified responses:

  • Model Identification: Chatbots should clearly and accurately identify the LLM or AI technology used, including the name, version, and source (proprietary or open-source).

  • Model Capabilities and Limitations: Chatbots should provide information about the capabilities, strengths, and limitations of the LLM, including any known biases or potential inaccuracies.

  • Model Card and Documentation: Chatbots should link to model cards or official documentation that describe the LLM's abilities, limitations, training data, evaluation metrics, risks, and ethical considerations.

  • **Use Case