Skip to content

Instantly share code, notes, and snippets.

@Ednaordinary
Ednaordinary / run_constupdate.py
Created June 18, 2023 22:06
Immediate NeRF from webcams
#!/usr/bin/env python3
# Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
@Ednaordinary
Ednaordinary / run_constupdate_win.py
Created June 22, 2023 05:45
Immediate NeRF from webcams modified to probably work on windows
#!/usr/bin/env python3
# Copyright (c) 2020-2022, NVIDIA CORPORATION. All rights reserved.
#
# NVIDIA CORPORATION and its licensors retain all intellectual property
# and proprietary rights in and to this software, related documentation
# and any modifications thereto. Any use, reproduction, disclosure or
# distribution of this software and related documentation without an express
# license agreement from NVIDIA CORPORATION is strictly prohibited.
@Ednaordinary
Ednaordinary / collatz.py
Created July 1, 2023 10:10
Graph the collatz conjecture using Turtle
import turtle as Turtle
def sequence(n):
steps = 0
while n != 1:
if n % 2 == 0:
n = n / 2
steps += 1
else:
n = n*3 + 1
steps += 1
@Ednaordinary
Ednaordinary / reviews.py
Created July 14, 2023 21:09
very basic program for review averages
reviews = []
review = None
while review != "exit":
while True:
review = input("What is the next review? (or exit to exit with list) ")
if review == "exit": break
try:
review = int(review)
if not 5 >= review >= 0: print("Please enter an integer between 0 and 5")
else: break
@Ednaordinary
Ednaordinary / 20Questions.py
Created July 16, 2023 05:58
A simple learning algorithm for 20 questions
import random
data = {}
questions = [
"Is it alive?",
"Is it real?",
"Can it bend without breaking?",
"Does it move?",
"Does it roll?",
"Is it mechanical?",
"Does it have a memory?",
@Ednaordinary
Ednaordinary / predict.py
Created July 26, 2023 22:57
Predict the next n numbers in a sequence of numbers
import math
def predict(*nums, n):
ognummap = [0] * (len(nums) - 1)
pos = 0
for i in range(len(nums)):
if pos >= len(nums) - 1: continue
ognummap[i] = nums[i + 1] - nums[i]
pos += 1
values = {}
for i in range(len(ognummap)):
@Ednaordinary
Ednaordinary / emoji_scanner.py
Created May 12, 2024 00:51
Discord bot with a command to efficiently scan through the server and find every time a user has reacted with an emoji, then compile it into a report
import nextcord as discord
from dotenv import load_dotenv
import sys
import time
import textwrap
import os
load_dotenv()
TOKEN = os.getenv('DISCORD_TOKEN')
intents = discord.Intents.all()