Skip to content

Instantly share code, notes, and snippets.

Avatar

Kory Becker primaryobjects

View GitHub Profile
@primaryobjects
primaryobjects / index.html
Last active March 28, 2023 02:16
Creating a random 3D maze with WebGL and three.js along with ChatGPT4 on Bing https://3D-Maze.primaryobjects.repl.co
View index.html
<!DOCTYPE html>
<html>
<head>
<title>3D Maze with GPT4</title>
<link rel="stylesheet" href="style.css">
<script src="https://code.jquery.com/jquery-3.6.4.slim.min.js" integrity="sha256-a2yjHM4jnF9f54xUQakjZGaqYs/V1CYvWpoqZzC2/Bw=" crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/three.js/r128/three.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/gl-matrix/2.8.1/gl-matrix-min.js"></script>
<script src="script.js"></script>
</head>
@primaryobjects
primaryobjects / genetic.py
Created March 20, 2023 03:10
Genetic algorithm for generating a program in BF to output a target string. Created with the help of ChatGPT. https://replit.com/@primaryobjects/Genetic-Algorithm-BF
View genetic.py
import random
import string
TARGET = "hello"
POPULATION_SIZE = 100
GENOME_SIZE = 50
MUTATION_RATE = 0.01
MEMORY_SIZE = 255
MAX_TICKS = 1000
MAX_EPOCHS = 100000
@primaryobjects
primaryobjects / app.js
Last active March 13, 2023 21:24
A chatbot that speaks, created by pair-programming with ChatGPT.
View app.js
const readline = require('readline');
const say = require('say');
const responses = [
{ keyword: 'hello', message: 'Hi there, how can I help you?' },
{ keyword: 'hi', message: 'Hey, what\'s up?' },
{ keyword: 'hey', message: 'Hi! How are you doing today?' },
{ keyword: 'good morning', message: 'Good morning! How can I assist you today?' },
{ keyword: 'good afternoon', message: 'Good afternoon! What brings you here?' },
{ keyword: 'good evening', message: 'Good evening! Is there anything I can help you with?' },
@primaryobjects
primaryobjects / app.js
Created March 13, 2023 03:00
Text to speech app created with ChatGPT. https://youtu.be/esq7vHKzwKA
View app.js
const fs = require('fs');
const say = require('say');
// Read command line arguments
const args = process.argv.slice(2);
const fileName = args[0];
// Read the file contents
fs.readFile(fileName, 'utf8', (err, data) => {
if (err) throw err;
@primaryobjects
primaryobjects / hotspot.txt
Last active March 6, 2023 15:40
Windows 10 mobile hotspot shortcut
View hotspot.txt
C:\Windows\explorer.exe ms-settings:network-mobilehotspot
@primaryobjects
primaryobjects / superposition.ipynb
Last active March 7, 2023 00:37
Super Duper Quantum Computer: Superposition. Learn how to partially invert a qubit and draw a unicorn or gremlin from the measured values!
View superposition.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@primaryobjects
primaryobjects / rock-paper-scissors.ipynb
Last active March 3, 2023 02:56
Quantum Rock Paper Scissors
View rock-paper-scissors.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@primaryobjects
primaryobjects / data.dat
Last active February 25, 2023 02:35
How to protect a JavaScript file with encryption. https://jsfiddle.net/yo0dvrjt/2/
View data.dat
U2FsdGVkX1/7DNglflcflNX1NepqxK7hBWR8E7BW3ZYSrQ4a7/EuyFNJe2mVXZqb63/Ln0Jf93I+ZX3h7oT1ew==
@primaryobjects
primaryobjects / qgreeting.ipynb
Last active February 22, 2023 17:53
An example of a greeting program in quantum computing using Qiskit. Three methods: classical, superposition random greetings, superimposed greetings, and majority vote. ❤️ Sponsor me :) https://github.com/sponsors/primaryobjects
View qgreeting.ipynb
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@primaryobjects
primaryobjects / app.py
Created February 12, 2023 02:40
Example of a simple game with smooth keyboard movement of a ball around the screen. Uses pygame and Python.
View app.py
import pygame
# Initialize pygame
pygame.init()
# Define colors
black = (0, 0, 0)
# Set the height and width of the screen
size=[800, 600]