Skip to content

Instantly share code, notes, and snippets.

View unicomp21's full-sized avatar

John Davis unicomp21

View GitHub Profile
@unicomp21
unicomp21 / gpt4_and_elon
Created March 22, 2023 09:53
gpt-4 and elon musk
who is elon musk? what is elon's method of operation?
Elon Musk is an entrepreneur, inventor, and business magnate who was born on June 28, 1971, in Pretoria, South Africa. He is best known as the CEO, CTO, and lead designer of SpaceX, the CEO and product architect of Tesla, Inc., and the co-founder of Neuralink and The Boring Company. Elon Musk's work primarily focuses on revolutionizing transportation, both on Earth and in space, and sustainable energy solutions.
Musk's method of operation can be characterized by the following traits:
Visionary thinking: Elon Musk is known for his ambitious and visionary goals, such as colonizing Mars, building sustainable cities, and creating hyperloop transportation systems.
First principles approach: Musk is known for using a first principles approach to problem-solving, which involves breaking down complex problems into their fundamental components and building up solutions from the ground up.
Vertical integration: In companies like Tesla and SpaceX, Musk has imple
@unicomp21
unicomp21 / common.impl.ts
Created April 24, 2023 12:11
code and tests written by gpt-4, aka "gpt protocol buffers"
import {HexLengthDelimitedInt} from "./hexLengthDelimitedInt.impl";
function processSerializedString(input: string, offset: number): { length: number, value: string, nextOffset: number } {
const lengthResult = HexLengthDelimitedInt.deserialize(input, offset);
offset = lengthResult.nextOffset;
const value = input.slice(offset, offset + lengthResult.number);
offset += lengthResult.number;
return {length: lengthResult.number, value, nextOffset: offset};
}
declare module 'xatlas.js' {
export const xatlas: XAtlas;
interface XAtlas {
create(): XAtlasInstance;
addMesh(instance: XAtlasInstance, positions: Float32Array, indices: Uint32Array): void;
generate(instance: XAtlasInstance, options?: Partial<GenerateOptions>): void;
destroy(instance: XAtlasInstance): void;
}
@unicomp21
unicomp21 / Dockerfile
Created June 28, 2023 12:12
Dockerfile for filament webgl build
# Start from a Ubuntu image with the latest version of Ubuntu
FROM ubuntu:latest
# Update and upgrade Ubuntu packages
RUN apt-get update && apt-get upgrade -y
# Install necessary packages (libglu1-mesa-dev vs libgl-dev)
RUN apt-get install -y git python3 cmake build-essential clang llvm libc++-dev libc++abi-dev libgl-dev
# Set Clang as default C and C++ compiler
@unicomp21
unicomp21 / gist:030c55084517fcb6d26845e880aaac1c
Created July 8, 2023 18:53
BAPS - Base64 prefixed strings
Shared Chat
Model: Default
Python BAPS Encoding Functions
July 8, 2023
Sure, here is a specification for the functions:
1. Function `encode_baps(s: str) -> str`:
- Input: A string `s`.
- Output: A BAPS-encoded string.
@unicomp21
unicomp21 / Dockerfile
Created July 28, 2023 13:07
filament webgl build failing
# Start from a Ubuntu image with the latest version of Ubuntu
FROM debian:latest
# Update and upgrade Ubuntu packages
RUN apt-get update && apt-get upgrade -y
# Install necessary packages (libglu1-mesa-dev vs libgl-dev)
RUN apt-get install -y git python3 cmake build-essential clang llvm libc++-dev libc++abi-dev libgl-dev
# Set Clang as default C and C++ compiler
@unicomp21
unicomp21 / gist:9cfc53704197f52c0d5127c6014e3568
Created July 30, 2023 16:16
Current python packages found in OpenAI code interpreter. DO NOT look at this as a reliable/definitive list.
Here is a summary of each package mentioned:
1. absl-py==1.4.0: A library for building machine learning models using Google's Abseil framework.
2. affine==2.4.0: A library for performing affine transformations on geometric objects.
3. aiohttp==3.8.1: An asynchronous HTTP client/server framework for Python.
4. aiosignal==1.3.1: A library for working with signals in asynchronous Python applications.
5. analytics-python==1.4.post1: A library for tracking events and user data for analytics purposes.
6. anyio==3.7.1: A library for writing asynchronous code with multiple concurrency frameworks.
7. anytree==2.8.0: A library for working with tree data structures.
8. argcomplete==1.10.3: A library for generating command-line argument completions.
<!DOCTYPE html><html><head><meta charSet="utf-8"/><meta name="title" content="ChatGPT: Get instant answers, find inspiration, learn something new"/><meta name="keywords" content="ai chat,ai,chap gpt,chat gbt,chat gpt 3,chat gpt login,chat gpt website,chat gpt,chat gtp,chat openai,chat,chatai,chatbot gpt,chatg,chatgpt login,chatgpt,gpt chat,open ai,openai chat,openai chatgpt,openai"/><meta http-equiv="Content-Type" content="text/html; charset=utf-8"/><meta name="viewport" content="width=device-width, initial-scale=1"/><meta property="og:title" content="ChatGPT"/><meta property="og:url" content="https://chat.openai.com"/><meta name="apple-itunes-app" content="app-id=6448311069"/><title>Fusion Reactions Energy Ranking</title><meta property="og:site_name" content="ChatGPT"/><meta name="robots" content="noindex,nofollow"/><meta property="og:title" content="Fusion Reactions Energy Ranking"/><meta property="og:decription" content="Shared via ChatGPT"/><meta property="og:image" content="/images/chatgpt-share-og.png"